Created
April 9, 2019 21:18
-
-
Save KowalczykBartek/cc7496ce3e19a9737f28146d1d02360f to your computer and use it in GitHub Desktop.
Solution for http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf question 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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