Created
July 18, 2019 03:55
-
-
Save KiFilterFiberContext/45834dbecf4a98cf1aaaf2ed3d4c1356 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
; bootloader which can only print hello world to the screen, I used qemu for emulation | |
; I might come back to this in the future, maybe | |
; Code is almost a year old so yeah I don't expect to understand it because it's poorly commented | |
[org 0x7c00] | |
call START | |
START: | |
mov bp, 0x8c00 | |
mov sp, bp | |
int 0x12 | |
mov bx, ax | |
xor ax, ax | |
mov ah, 0x0e | |
int 0x10 | |
jmp $ | |
PRINT: | |
mov ah, 0x0e | |
mov al, [bx] | |
cmp al, 0 | |
je RETURN | |
int 0x10 | |
xor ah, ah | |
add bx, 1 | |
call PRINT | |
RETURN: | |
ret | |
string db "Hello World" | |
times 510-($-$$) db 0 | |
dw 0xaa55 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment