Skip to content
This repository was archived by the owner on Sep 10, 2020. It is now read-only.

Commit c4707f1

Browse files
author
cmp
committed
Boiler my plates
1 parent 92e7db4 commit c4707f1

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ebin.img

0 Bytes
Binary file not shown.

main.asm

+8-6
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ print_str:
2525
int 0x10 ; Print char from al (BIOS)
2626
jmp .loop ; Keep looping
2727
.exit:
28-
pop si
2928
pop ax
29+
pop si
3030
ret ; Return from function
3131

3232
; halt
@@ -50,6 +50,8 @@ dd 0x00
5050
start:
5151
xor ax, ax ; Clear ax
5252
cli
53+
jmp 0x0000:boiler_my_plates
54+
boiler_my_plates:
5355
mov ss, ax ; Segment bullshit
5456
mov ds, ax
5557
mov es, ax
@@ -154,9 +156,9 @@ strcmp:
154156
.e:
155157
mov dl, 0x01 ; Happy couple, still gay
156158
.done:
157-
pop ax ; Goodbye!
158-
pop si
159159
pop di
160+
pop si
161+
pop ax
160162
ret
161163

162164
; clear_input
@@ -169,8 +171,8 @@ clear_input:
169171
mov cx, 128 ; Set cx to 128
170172
cld ; Go forwards
171173
rep stosb ; Store zeroes until the end
172-
pop di
173174
pop cx
175+
pop di
174176
ret ; Return
175177

176178
; shell
@@ -204,9 +206,9 @@ shell:
204206
mov si, endl ; 0x0D, 0x0A, 0x00
205207
call print_str ; Print the newline
206208
call print_harmful ; Print that it's harmful
207-
pop si
208-
pop di
209209
pop cx
210+
pop di
211+
pop si
210212
jmp shell ; Initialize shell again
211213
.delet:
212214
cmp cx, 127 ; Check if it's the start of string

0 commit comments

Comments
 (0)