Ignore:
Timestamp:
Apr 8, 2017, 12:26:16 AM (8 years ago)
Author:
Ben Rietbroek
Message:

More hard-coded '80h' corrections [v1.1.1-testing]

Code in 'partmain.asm' around line 1350 needs some more attention.
Possibly the whole 'boot-flag' stuff is not needed with modern BIOSses.
Updating them is disabled for now, which should only affect very old
BIOSses that don't leave this checking to the MBR code.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/regular/other.asm

    r76 r78  
    166166        call    MBR_TeletypeNL
    167167
     168        ;
     169        ; Write MBR back to disk to sync MBR variables.
     170        ; Otherwise subsequent MBR loads will differ from the RAM stored one,
     171        ; which is used by MBR protection to validate parts of the MBR.
     172        ;
     173        xor     bx, bx
     174        mov     cx, 1
     175        xor     dh, dh
     176        mov     dl, [BIOS_BootDisk]
     177        mov     al, 1
     178        mov     ah, 03h
     179        int     13h
     180
     181
     182        ; Start with disk at index 0
    168183        xor     cx,cx
     184
    169185    PRECRAP_Main_next_disk:
    170186
     187        ; Get next disk and convert to BIOS disk-number
    171188        mov     dl,cl
    172189        or      dl,80h
     
    431448        mov     ah, 41h
    432449        mov     bx, 55AAh
    433         mov     dl, 80h
     450        mov     dl, [BIOS_BootDisk]     ; We check using the boot-disk
    434451        int     13h
    435452        cmp     bx, 0AA55h
Note: See TracChangeset for help on using the changeset viewer.