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/special/lvm.asm

    r117 r118  
    320320        mov     si,offset [LVMSector]
    321321        mov     di,ds
     322        mov     ax, cx                      ; LBA low is now in AX
    322323        call    DriveIO_ReadSectorLBA
    323324        pop     di
     
    541542        mov     si,offset [LVMSector]
    542543        mov     di,ds
     544        mov     ax, cx                      ; LBA low is now in AX
    543545        call    DriveIO_ReadSectorLBA
    544546        pop     di
Note: See TracChangeset for help on using the changeset viewer.