From 4b2a42963f8af63d7f5e35699eb458c1af85aa2f Mon Sep 17 00:00:00 2001 From: Brian Palmer Date: Thu, 12 May 2005 02:57:13 +0000 Subject: [PATCH] Support getting the boot drive from the BIOS or the value in the BPB. svn path=/trunk/; revision=15233 --- reactos/boot/freeldr/bootsect/fat.asm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reactos/boot/freeldr/bootsect/fat.asm b/reactos/boot/freeldr/bootsect/fat.asm index 36e7091df64..79aac6a5dec 100644 --- a/reactos/boot/freeldr/bootsect/fat.asm +++ b/reactos/boot/freeldr/bootsect/fat.asm @@ -73,7 +73,7 @@ SectorsPerTrack dw 18 NumberOfHeads dw 2 HiddenSectors dd 0 TotalSectorsBig dd 0 -BootDrive db 0 +BootDrive db 0xff Reserved db 0 ExtendSig db 29h SerialNumber dd 00000000h @@ -89,6 +89,9 @@ main: mov es,ax ; Make ES correct + cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it + jne GetDriveParameters + mov [BYTE bp+BootDrive],dl ; Save the boot drive