Skip to content

Instantly share code, notes, and snippets.

@KowalczykBartek
Created April 9, 2019 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KowalczykBartek/cc7496ce3e19a9737f28146d1d02360f to your computer and use it in GitHub Desktop.
Save KowalczykBartek/cc7496ce3e19a9737f28146d1d02360f to your computer and use it in GitHub Desktop.
[org 0x7c00]
mov bx, GOODBYE_MSG
call print_string
mov bx, HELLO_MSG
call print_string
jmp infinite_loope
print_string:
pusha
while:
mov dl, [bx]
cmp dx, 0
je return
mov ah, 0x0e
mov al, [bx]
int 0x10
add bx, 0x1
jmp while
return:
popa
ret
infinite_loope:
jmp $
GOODBYE_MSG:
db 'Goodbye !', 0
HELLO_MSG:
db 'Hello world !', 0
times 510-($-$$) db 0
dw 0xaa55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment