From 7b76929487f4ce7aedee51252da1788cc5380fda Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 20 Apr 2019 09:59:10 +0200 Subject: [PATCH] bootdive loaded from dl --- boot.asm | 6 ++++-- boot.bin | Bin 512 -> 512 bytes disk.img | Bin 737280 -> 737280 bytes 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/boot.asm b/boot.asm index f140a73..8717405 100755 --- a/boot.asm +++ b/boot.asm @@ -5,7 +5,7 @@ ;cmp dl, 0x05 ;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 welcome: @@ -55,6 +55,7 @@ load_it_all_0: mov dh, 00 ; Head to read = 0 ; DL hasn't been destroyed by our bootloader code and still ; contains boot drive # passed to our bootloader by the BIOS + mov dl, [bootdev] int 13h jc wolf_error @@ -88,6 +89,7 @@ load_it_all_1: mov dh, 00 ; Head to read = 0 ; DL hasn't been destroyed by our bootloader code and still ; contains boot drive # passed to our bootloader by the BIOS + mov dl, [bootdev] int 13h 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_msg1 db 'Press any key to restart..',0 -;bootdev db 0 ; Boot device number +bootdev db 0 ; Boot device number times 510-($-$$) db 0 dw 0xAA55 diff --git a/boot.bin b/boot.bin index c7b6db47a87b5dce5ae2508874206f5fc36c625b..de3895b9d356185cc6096e658a97d32d7ebf190f 100755 GIT binary patch delta 134 zcmZo*X<&)$5EHF6JkWQe@4#+`hQ7<4NB-zfdQmgVGGj+#;pt+nYS@?0nIooTx2%)6@vl;!>=zO)ix6YB_*H|96$*H au*B1v7kmu+eod^CWGvn|BZ`qJbQJ)ZFFE%B delta 147 zcmZo*X<$(|JkWQe@4#+`hQ7<4NB-=aS@WWdVGF}qF&l#tHXFkdo!2G%j@P_Mny4)q zaaOp|0v%qK;t;!&xyKgAz6y!xDqnHTy2t zyvSmh^Ajj4yn}%Oq*!4K(+0+^3>%rZF?0dVI4fLaHun{S0t3UZFCf)669XkBpb{KF z2?4Og)0!824EugftdnFc-Z&$QvH2fk`#(kyW&&bnAZ7t#Rv=~rVs;?r0Afxc=Gy*` Ik(CHs!oyhxg; zEg5lExX5VkD+UDyhF@Pmf))&Oegc&W?_gj6nIN!*X#?X{hK)?yfMP`)K$QYul{af% z@Ghvyy8#4wSHM;X5nv`s?AB)f<;YF-|sM