source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH43h_ExtendedWriteSectors.asm@ 552

Last change on this file since 552 was 526, checked in by krille_n_@…, 11 years ago

Changes:

  • Update of the copyright notices to include the year 2013.
File size: 2.2 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h function AH=43h, Extended Write Sectors.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
7;
8; This program is free software; you can redistribute it and/or modify
9; it under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2 of the License, or
11; (at your option) any later version.
12;
13; This program is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
18;
19
20; Section containing code
21SECTION .text
22
23;--------------------------------------------------------------------
24; Int 13h function AH=43h, Extended Write Sectors.
25;
26; AH43h_HandlerForExtendedWriteSectors
27; Parameters:
28; SI: Same as in INTPACK
29; DL: Translated Drive number
30; DS:DI: Ptr to DPT (in RAMVARS segment)
31; SS:BP: Ptr to IDEPACK
32; Parameters on INTPACK:
33; AL: 0 or 1 to write with verify off
34; 2 to write with verify (if supported)
35; DS:SI: Ptr to Disk Address Packet
36; Returns with INTPACK:
37; AH: Int 13h return status
38; CF: 0 if successful, 1 if error
39; Return with Disk Address Packet in INTPACK:
40; .wSectorCount Number of sectors written successfully
41;--------------------------------------------------------------------
42ALIGN JUMP_ALIGN
43AH43h_HandlerForExtendedWriteSectors:
44 cmp BYTE [bp+IDEPACK.intpack+INTPACK.al], 2 ; Verify requested?
45 jae SHORT Prepare_ReturnFromInt13hWithInvalidFunctionError
46
47 call Prepare_ByLoadingDapToESSIandVerifyingForTransfer
48 mov ah, [cs:bx+g_rgbWriteCommandLookup]
49 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
50%ifdef USE_186
51 push AH42h_ReturnFromInt13hAfterStoringErrorCodeFromAHandTransferredSectorsFromCX
52 jmp Idepack_ConvertDapToIdepackAndIssueCommandFromAH
53%else
54 call Idepack_ConvertDapToIdepackAndIssueCommandFromAH
55 jmp SHORT AH42h_ReturnFromInt13hAfterStoringErrorCodeFromAHandTransferredSectorsFromCX
56%endif
Note: See TracBrowser for help on using the repository browser.