]> git.dujemihanovic.xyz Git - nameless-os.git/blob - boot.s
Add print function with some examples
[nameless-os.git] / boot.s
1 bits 16 ; boot sectors run in real mode
2 org 7c00h ; boot sector is loaded at 0x7c00
3
4 mov di, printing_numbers
5 call print
6
7 mov dx, 0DEADh ; number to print
8 call print_word
9 mov dx, 0BEEFh
10 call print_word
11
12 mov di, goodbye
13 call print
14
15 jmp $
16
17 printing_numbers: db "Printing some random hex numbers", 0
18 goodbye: db "Thank you for your attention", 0
19
20 %include "print.s"
21
22 times 510-($-$$) db 0 ; fill with 0 until 0x1fc is reached
23 dw 0AA55h ; BIOS MBR signature