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 | ; .wSectorCount Number of sectors written successfully |
---|
25 | ;-------------------------------------------------------------------- |
---|
26 | ALIGN JUMP_ALIGN |
---|
27 | AH43h_HandlerForExtendedWriteSectors: |
---|
28 | cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 2 ; Verify requested? |
---|
29 | jae SHORT Prepare_ReturnFromInt13hWithInvalidFunctionError |
---|
30 | |
---|
31 | call Prepare_ByLoadingDapToESSIandVerifyingForTransfer |
---|
32 | mov ah, [cs:bx+g_rgbWriteCommandLookup] |
---|
33 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ) |
---|
34 | %ifdef USE_186 |
---|
35 | push AH42h_ReturnFromInt13hAfterStoringErrorCodeFromAHandTransferredSectorsFromCX |
---|
36 | jmp Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
37 | %else |
---|
38 | call Idepack_ConvertDapToIdepackAndIssueCommandFromAH |
---|
39 | jmp SHORT AH42h_ReturnFromInt13hAfterStoringErrorCodeFromAHandTransferredSectorsFromCX |
---|
40 | %endif |
---|