bootdive loaded from dl

master
Your Name 6 years ago
parent b33cc00d31
commit 7b76929487

@ -5,7 +5,7 @@
;cmp dl, 0x05 ;cmp dl, 0x05
;je welcome ;je welcome
;mov [bootdev], dl ; Save boot device number mov [bootdev], dl ; Save boot device number
; Use the boot drive number passed to us by BIOS in register DL ; Use the boot drive number passed to us by BIOS in register DL
welcome: welcome:
@ -55,6 +55,7 @@ load_it_all_0:
mov dh, 00 ; Head to read = 0 mov dh, 00 ; Head to read = 0
; DL hasn't been destroyed by our bootloader code and still ; DL hasn't been destroyed by our bootloader code and still
; contains boot drive # passed to our bootloader by the BIOS ; contains boot drive # passed to our bootloader by the BIOS
mov dl, [bootdev]
int 13h int 13h
jc wolf_error jc wolf_error
@ -88,6 +89,7 @@ load_it_all_1:
mov dh, 00 ; Head to read = 0 mov dh, 00 ; Head to read = 0
; DL hasn't been destroyed by our bootloader code and still ; DL hasn't been destroyed by our bootloader code and still
; contains boot drive # passed to our bootloader by the BIOS ; contains boot drive # passed to our bootloader by the BIOS
mov dl, [bootdev]
int 13h int 13h
jc wolf_error jc wolf_error
@ -128,7 +130,7 @@ wolf_kernel_load db 'Loading program',0x0D,0x0A,0
wolf_error_msg db 'Program not found!',0x0D,0x0A,0 wolf_error_msg db 'Program not found!',0x0D,0x0A,0
wolf_error_msg1 db 'Press any key to restart..',0 wolf_error_msg1 db 'Press any key to restart..',0
;bootdev db 0 ; Boot device number bootdev db 0 ; Boot device number
times 510-($-$$) db 0 times 510-($-$$) db 0
dw 0xAA55 dw 0xAA55

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save