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

Changed register interface for LBA read/write sector [v1.1.1-testing]

Changed passing the LBA address from BX:CX to BX:AX, so it corresponds
to the load/save sector functions, which do more checking.

This loses the return-status in AH for reading sectors and specifying
write-verify for writing sectors, but that does not really matter.
Status of the last operation should be available using INT13 function
01h and verification of sectors can be done with function 44h if wanted.
CF indicates success or not, which is enough.

This register combination makes it possible to hold both CHS and LBA
sector addresses in registers if needed:
BX:AX ; LBA32
DX:CX ; CHS10

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/partmain.asm

    r117 r118  
    22632263        ; Load LBA sector 0 from the disk specified in DL
    22642264        xor      bx,bx
    2265         xor      cx,cx
     2265        xor      ax,ax
    22662266        mov      di,ds
    22672267        mov      si,offset [TmpSector]
     
    24672467;        mov     di,ds
    24682468;        mov     si,offset [TmpSector]
     2469;        mov     ax, cx                      ; LBA low is now in AX
    24692470;        call    DriveIO_ReadSectorLBA
    24702471
Note: See TracChangeset for help on using the changeset viewer.