source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH2h_HRead.asm@ 462

Last change on this file since 462 was 376, checked in by gregli@…, 12 years ago

WIDE checkin... Added copyright and license information to sorce files, as per the GPL instructions for usage.

File size: 2.3 KB
RevLine 
[148]1; Project name : XTIDE Universal BIOS
[3]2; Description : Int 13h function AH=2h, Read Disk Sectors.
3
[376]4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 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
[3]20; Section containing code
21SECTION .text
22
23;--------------------------------------------------------------------
24; Int 13h function AH=2h, Read Disk Sectors.
25;
26; AH2h_HandlerForReadDiskSectors
27; Parameters:
[148]28; AL, CX, DH, ES: Same as in INTPACK
29; DL: Translated Drive number
30; DS:DI: Ptr to DPT (in RAMVARS segment)
[150]31; SS:BP: Ptr to IDEPACK
32; Parameters on INTPACK:
[221]33; AL: Number of sectors to read (1...128)
[3]34; CH: Cylinder number, bits 7...0
35; CL: Bits 7...6: Cylinder number bits 9 and 8
36; Bits 5...0: Starting sector number (1...63)
37; DH: Starting head number (0...255)
[294]38; ES:BX: Pointer to buffer receiving data
[150]39; Returns with INTPACK:
[3]40; AH: Int 13h/40h floppy return status
[249]41; AL: Burst error length if AH returns 11h (we never return error code 11h)
42; Number of sectors actually read (only valid if CF set for someBIOSes)
[294]43; CF: 0 if successful, 1 if error
[3]44;--------------------------------------------------------------------
45ALIGN JUMP_ALIGN
46AH2h_HandlerForReadDiskSectors:
[221]47 call Prepare_BufferToESSIforOldInt13hTransfer
48 call Prepare_GetOldInt13hCommandIndexToBX
[165]49 mov ah, [cs:bx+g_rgbReadCommandLookup]
[150]50 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
51%ifdef USE_186
[249]52 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAHandTransferredSectorsFromCL
[150]53 jmp Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
54%else
55 call Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
[249]56 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAHandTransferredSectorsFromCL
[150]57%endif
[258]58
Note: See TracBrowser for help on using the repository browser.