source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.asm@ 550

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

Changes:

  • Update of the copyright notices to include the year 2013.
File size: 2.4 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h function AH=Ch, Seek.
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=Ch, Seek.
25;
26; AHCh_HandlerForSeek
27; Parameters:
28; CX, DH: Same as in INTPACK
29; DL: Translated Drive number
30; DS:DI: Ptr to DPT (in RAMVARS segment)
31; SS:BP: Ptr to IDEREGS_AND_INTPACK
32; Parameters on INTPACK:
33; CH: Cylinder number, bits 7...0
34; CL: Bits 7...6: Cylinder number bits 9 and 8
35; Bits 5...0: Starting sector number (1...63)
36; DH: Starting head number (0...255)
37; Returns with INTPACK:
38; AH: BIOS Error code
39; CF: 0 if successful, 1 if error
40;--------------------------------------------------------------------
41ALIGN JUMP_ALIGN
42AHCh_HandlerForSeek:
43%ifndef USE_186
44 call AHCh_SeekToCylinder
45 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
46%else
47 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
48 ; Fall to AHCh_SeekToCylinder
49%endif
50
51;--------------------------------------------------------------------
52; AHCh_SeekToCylinder
53; Parameters:
54; CH: Cylinder number, bits 7...0
55; CL: Bits 7...6: Cylinder number bits 9 and 8
56; Bits 5...0: Starting sector number (1...63)
57; DH: Starting head number (0...255)
58; DS:DI: Ptr to DPT (in RAMVARS segment)
59; SS:BP: Ptr to IDEREGS_AND_INTPACK
60; Returns:
61; AH: BIOS Error code
62; CF: 0 if successful, 1 if error
63; Corrupts registers:
64; AL, BX, CX, DX
65;--------------------------------------------------------------------
66AHCh_SeekToCylinder:
67 mov ah, COMMAND_SEEK
68 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRDY)
69 jmp Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
Note: See TracBrowser for help on using the repository browser.