[148] | 1 | ; Project name : XTIDE Universal BIOS |
---|
[3] | 2 | ; Description : Int 13h function AH=4h, Verify Disk Sectors. |
---|
| 3 | |
---|
| 4 | ; Section containing code |
---|
| 5 | SECTION .text |
---|
| 6 | |
---|
| 7 | ;-------------------------------------------------------------------- |
---|
| 8 | ; Int 13h function AH=4h, Verify Disk Sectors. |
---|
| 9 | ; |
---|
| 10 | ; AH4h_HandlerForVerifyDiskSectors |
---|
| 11 | ; Parameters: |
---|
[148] | 12 | ; AL, CX, DH: Same as in INTPACK |
---|
| 13 | ; DL: Translated Drive number |
---|
| 14 | ; DS:DI: Ptr to DPT (in RAMVARS segment) |
---|
| 15 | ; SS:BP: Ptr to INTPACK |
---|
| 16 | ; Parameters on INTPACK in SS:BP: |
---|
[3] | 17 | ; AL: Number of sectors to verify |
---|
| 18 | ; CH: Cylinder number, bits 7...0 |
---|
| 19 | ; CL: Bits 7...6: Cylinder number bits 9 and 8 |
---|
| 20 | ; Bits 5...0: Starting sector number (1...63) |
---|
| 21 | ; DH: Starting head number (0...255) |
---|
[148] | 22 | ; Returns with INTPACK in SS:BP: |
---|
[3] | 23 | ; AH: Int 13h/40h floppy return status |
---|
| 24 | ; CF: 0 if successfull, 1 if error |
---|
| 25 | ;-------------------------------------------------------------------- |
---|
| 26 | ALIGN JUMP_ALIGN |
---|
| 27 | AH4h_HandlerForVerifyDiskSectors: |
---|
| 28 | test al, al ; Invalid sector count? |
---|
| 29 | jz SHORT AH2h_ZeroCntErr ; If so, return with error |
---|
| 30 | |
---|
| 31 | mov ah, HCMD_VERIFY_SECT ; Load command to AH |
---|
| 32 | call HCommand_OutputCountAndLCHSandCommand |
---|
[148] | 33 | jc SHORT .ReturnWithErrorCodeInAH |
---|
[3] | 34 | mov bx, di ; DS:BX now points to DPT |
---|
[148] | 35 | call HStatus_WaitIrqOrRdy ; Wait for IRQ or RDY |
---|
| 36 | .ReturnWithErrorCodeInAH: |
---|
| 37 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH |
---|