Created
April 1, 2020 10:10
-
-
Save ryesalvador/d274044c06beadb160f0158d0358ab1d to your computer and use it in GitHub Desktop.
Ku-DOS Project bootloader
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
;KudOS bootdisk (c) Ryan Salvador 04-Jan-2015 | |
bits 16 ;It says we want our code in real mode. | |
org 0 | |
jmp 07c0h:begin ;The effective address of the start | |
;of our bootloader. | |
bootmsg db 'Ku-DOS bootdisk alpha v.1 (c) 2015-2020',10,13,'!Boot successful',10,13,'# ',0 | |
begin: | |
mov ax, cs ;We copy the address of our code segment to | |
mov ds, ax ;the ax register and copy it to data segment | |
mov es, ax ;for us to define data. | |
mov ax, 0003h ;Setup video mode | |
int 10h | |
mov si, bootmsg | |
echo: ;Our print routine. | |
lodsb | |
cmp al, 0 | |
je end | |
mov ah, 0eh | |
int 10h | |
jmp echo | |
end: | |
jmp $ | |
times 510 - ($-$$) db 0 ;We pad the remaining bytes with 0's. | |
dw 0aa55h ;Boot key. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment