42 lines
732 B
NASM
42 lines
732 B
NASM
[ org 0x7c00 ] ; Tells the assemble to start inside the boot location
|
|
|
|
mov [BOOT_DRIVE], dl
|
|
|
|
|
|
mov bp, 0x8000
|
|
mov sp, bp
|
|
|
|
mov ebx, BOOTING_MSG
|
|
mov edx, 2
|
|
call print
|
|
|
|
mov bx, 0x9000
|
|
mov dh, 5
|
|
mov dl, [BOOT_DRIVE]
|
|
call disk_load
|
|
|
|
mov dx, [0x9000]
|
|
call print_hex
|
|
|
|
mov dx, [0x9000 + 512]
|
|
call print_hex
|
|
|
|
jmp $
|
|
|
|
; Imports print
|
|
%include "./x16/print/print.asm"
|
|
%include "./x16/print/print_hex.asm"
|
|
%include "./x16/disk/disk_load.asm"
|
|
|
|
BOOT_DRIVE: db 0
|
|
|
|
BOOTING_MSG: db 'Booting Obsidian Starlight OS (OST OS)',0
|
|
RANDOM_MSG: db 'Ya like jazz?',0
|
|
|
|
times 510-($-$$) db 0 ; Pad the boot sector out with zeros
|
|
dw 0xaa55
|
|
|
|
times 256 dw 0xdada
|
|
times 256 dw 0xface
|
|
|
|
times 2097152 db 0 ; Only for VirtualBox |