1 | ; Project name : XTIDE Universal BIOS
|
---|
2 | ; Description : Int 13h function AH=41h, Check if Extensions Present.
|
---|
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
|
---|
21 | SECTION .text
|
---|
22 |
|
---|
23 | ;--------------------------------------------------------------------
|
---|
24 | ; Int 13h function AH=41h, Check if Extensions Present.
|
---|
25 | ;
|
---|
26 | ; AH41h_HandlerForCheckIfExtensionsPresent
|
---|
27 | ; Parameters:
|
---|
28 | ; DL: Translated Drive number
|
---|
29 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
30 | ; SS:BP: Ptr to IDEPACK
|
---|
31 | ; Parameters on INTPACK:
|
---|
32 | ; BX: 55AAh
|
---|
33 | ; Returns with INTPACK:
|
---|
34 | ; AH: Major version of EBIOS extensions
|
---|
35 | ; BX: AA55h
|
---|
36 | ; CX: Support bits
|
---|
37 | ; CF: 0 if successful, 1 if error
|
---|
38 | ;--------------------------------------------------------------------
|
---|
39 | AH41h_HandlerForCheckIfExtensionsPresent:
|
---|
40 | cmp WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh
|
---|
41 | jne SHORT .EbiosNotSupported
|
---|
42 |
|
---|
43 | mov BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
|
---|
44 | mov WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h
|
---|
45 | mov WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT
|
---|
46 | and BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF ; Return with CF cleared
|
---|
47 | jmp Int13h_ReturnFromHandlerWithoutStoringErrorCode
|
---|
48 | .EbiosNotSupported:
|
---|
49 | jmp Int13h_DirectCallToAnotherBios
|
---|