[165] | 1 | ; Project name : XTIDE Universal BIOS |
---|
| 2 | ; Description : Int 13h function AH=43h, Extended Write Sectors. |
---|
| 3 | |
---|
| 4 | ; Section containing code |
---|
| 5 | SECTION .text |
---|
| 6 | |
---|
| 7 | ;-------------------------------------------------------------------- |
---|
| 8 | ; Int 13h function AH=43h, Extended Write Sectors. |
---|
| 9 | ; |
---|
| 10 | ; AH43h_HandlerForExtendedWriteSectors |
---|
| 11 | ; Parameters: |
---|
| 12 | ; SI: Same as in INTPACK |
---|
| 13 | ; DL: Translated Drive number |
---|
| 14 | ; DS:DI: Ptr to DPT (in RAMVARS segment) |
---|
| 15 | ; SS:BP: Ptr to IDEPACK |
---|
| 16 | ; Parameters on INTPACK: |
---|
| 17 | ; AL: 0 or 1 to write with verify off |
---|
| 18 | ; 2 to write with verify (if supported) |
---|
| 19 | ; DS:SI: Ptr to Disk Address Packet |
---|
| 20 | ; Returns with INTPACK: |
---|
| 21 | ; AH: Int 13h return status |
---|
| 22 | ; CF: 0 if succesfull, 1 if error |
---|
| 23 | ; Return with Disk Address Packet in INTPACK: |
---|
| 24 | ; .bSectorCount Number of sectors written successfully |
---|
| 25 | ;-------------------------------------------------------------------- |
---|
| 26 | ALIGN JUMP_ALIGN |
---|
| 27 | AH43h_HandlerForExtendedWriteSectors: |
---|
| 28 | cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 2 ; Verify requested? |
---|
[169] | 29 | jae SHORT AH42h_ReturnWithInvalidFunctionError |
---|
[165] | 30 | |
---|
| 31 | call AH42h_LoadDapToESSIandVerifyForTransfer |
---|
| 32 | call CommandLookup_GetEbiosIndexToBX |
---|
| 33 | mov ah, [cs:bx+g_rgbWriteCommandLookup] |
---|
| 34 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ) |
---|
| 35 | %ifdef USE_186 |
---|
| 36 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH |
---|
| 37 | jmp Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
| 38 | %else |
---|
| 39 | call Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
| 40 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH |
---|
| 41 | %endif |
---|