1 | ; Project name : XTIDE Universal BIOS
|
---|
2 | ; Description : Int 13h function AH=25h, Get Drive Information.
|
---|
3 |
|
---|
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 |
|
---|
20 | ; Section containing code
|
---|
21 | SECTION .text
|
---|
22 |
|
---|
23 | ;--------------------------------------------------------------------
|
---|
24 | ; Int 13h function AH=25h, Get Drive Information.
|
---|
25 | ;
|
---|
26 | ; AH25h_HandlerForGetDriveInformation
|
---|
27 | ; Parameters:
|
---|
28 | ; ES: 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 | ; ES:BX: Ptr to buffer to receive 512-byte drive information
|
---|
34 | ; Returns with INTPACK:
|
---|
35 | ; AH: Int 13h return status
|
---|
36 | ; CF: 0 if successful, 1 if error
|
---|
37 | ;--------------------------------------------------------------------
|
---|
38 | AH25h_HandlerForGetDriveInformation:
|
---|
39 | mov ax, (COMMAND_IDENTIFY_DEVICE << 8 | 1) ; Read 1 sector
|
---|
40 | call Prepare_BufferToESSIforOldInt13hTransfer ; Preserves AX
|
---|
41 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
|
---|
42 | %ifdef USE_186
|
---|
43 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
44 | jmp Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
|
---|
45 | %else
|
---|
46 | call Idepack_TranslateOldInt13hAddressAndIssueCommandFromAH
|
---|
47 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
48 | %endif
|
---|