source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH41h_CheckIfExtensionsPresent.asm @ 294

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

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File size: 1.2 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Int 13h function AH=41h, Check if Extensions Present.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; Int 13h function AH=41h, Check if Extensions Present.
9;
10; AH41h_HandlerForCheckIfExtensionsPresent
11;   Parameters:
12;       DL:     Translated Drive number
13;       DS:DI:  Ptr to DPT (in RAMVARS segment)
14;       SS:BP:  Ptr to IDEPACK
15;   Parameters on INTPACK:
16;       BX:     55AAh
17;   Returns with INTPACK:
18;       AH:     Major version of EBIOS extensions
19;       BX:     AA55h
20;       CX:     Support bits
21;       CF:     0 if successful, 1 if error
22;--------------------------------------------------------------------
23ALIGN JUMP_ALIGN
24AH41h_HandlerForCheckIfExtensionsPresent:
25    cmp     WORD [bp+IDEPACK.intpack+INTPACK.bx], 55AAh
26    jne     SHORT .EbiosNotSupported
27
28    mov     BYTE [bp+IDEPACK.intpack+INTPACK.ah], EBIOS_VERSION
29    mov     WORD [bp+IDEPACK.intpack+INTPACK.bx], 0AA55h
30    mov     WORD [bp+IDEPACK.intpack+INTPACK.cx], ENHANCED_DRIVE_ACCESS_SUPPORT
31    and     BYTE [bp+IDEPACK.intpack+INTPACK.flags], ~FLG_FLAGS_CF  ; Return with CF cleared
32    jmp     Int13h_ReturnFromHandlerWithoutStoringErrorCode
33.EbiosNotSupported:
34    jmp     Int13h_UnsupportedFunction
Note: See TracBrowser for help on using the repository browser.