James Harris wrote:
> In case someone else finds this useful, I found from recent tests with
> a 2006 Phoenix BIOS on a machine with multiple disks that whatever
> hard disk it booted it passed to the MBR the value of DL=0x80. I had
> expected it to pass DL=0x80, or 0x81 or 0x82 etc depending on which
> disk it booted.
>
> Two possible explanations:
>
> 1. DL was overwritten in between the start of the code and me printing
> it.
>
> 2. This BIOS always refers to the boot disk as 0x80.
when I remember my analysis of the GRUB-MBR then it seems to modify DL ?
> Not sure which is the right explanation. It wasn't my intention to
> test this but the code is below in case it is of interest to others.
> Hopefully we can always be sure that whatever the MBR gets in DL is
> the correct BIOS id of the boot drive.
OTOH, old DOS until incl. win98se always assigned drive-letter 'C:' to
the first partition of the HD it was booted from.
;my MBR test code:
;entered with HEXEDIT
000 push DX ;keep this alive
001 mov ax,0003h
004 int 10h ;set textmode+CLRScreen just in case it isn't.
006 mov BX,0070h ;page 0, gray on black
009 mov CX,0001h ;no repeat
00c pop AX ;get back DL-value
00d and AL,0fh
00f or AL,30h ;just the lower nibble is of interrest yet
011 mov AH,0Ah ;fn write single character
013 int 10h ;show either '0' or '1' or else ?
015 jmp self ;watch top left corner of screen until eye-blur...
expected '0' for IDE-master
'1' for IDE-slave
and '3' for SATA-02 (SATA 00 is empty, SATA 01 is a DVD-drive)
I checked just with one IDE and swapped master/slave including
correct jumper setting, but what a surprise, I see always Zero!
__
wolfgang