source: xtideuniversalbios/tags/XTIDE_Universal_BIOS_v2.0.0_beta1/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm@ 623

Last change on this file since 623 was 294, checked in by krille_n_@…, 12 years ago

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File size: 1.5 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h function AH=43h, Extended Write Sectors.
3
4; Section containing code
5SECTION .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 successful, 1 if error
23; Return with Disk Address Packet in INTPACK:
24; .wSectorCount Number of sectors written successfully
25;--------------------------------------------------------------------
26ALIGN JUMP_ALIGN
27AH43h_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
Note: See TracBrowser for help on using the repository browser.