source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm @ 221

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

Changes to XTIDE Universal BIOS:

  • AH=0Ch (Seek) should work properly again.
  • More than 127 sectors are no longer allowed for EBIOS functions.
  • Changed location for BOOTNFO structs.
File size: 1.8 KB
RevLine 
[88]1; Project name  :   XTIDE Universal BIOS
[3]2; Description   :   Int 13h function AH=25h, Get Drive Information.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; Int 13h function AH=25h, Get Drive Information.
9;
10; AH25h_HandlerForGetDriveInformation
11;   Parameters:
[148]12;       ES:     Same as in INTPACK
13;       DL:     Translated Drive number
14;       DS:DI:  Ptr to DPT (in RAMVARS segment)
[150]15;       SS:BP:  Ptr to IDEPACK
16;   Parameters on INTPACK:
[3]17;       ES:BX:  Ptr to buffer to receive 512-byte drive information
[150]18;   Returns with INTPACK:
[3]19;       AH:     Int 13h return status
20;       CF:     0 if succesfull, 1 if error
21;--------------------------------------------------------------------
22ALIGN JUMP_ALIGN
23AH25h_HandlerForGetDriveInformation:
[221]24    mov     al, 1           ; Read 1 sector
25    call    Prepare_BufferToESSIforOldInt13hTransfer
[165]26%ifdef USE_186
27    push    Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
[167]28    ; Fall to AH25h_GetDriveInformationToBufferInESSI
[165]29%else
[167]30    call    AH25h_GetDriveInformationToBufferInESSI
[165]31    jmp     Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
32%endif
33
34
35;--------------------------------------------------------------------
[167]36; AH25h_GetDriveInformationToBufferInESSI
[165]37;   Parameters:
38;       DS:DI:  Ptr to DPT (in RAMVARS segment)
39;       ES:SI:  Ptr to buffer to receive 512-byte drive information
40;   Returns with INTPACK:
41;       AH:     Int 13h return status
42;       CF:     0 if succesfull, 1 if error
43;   Corrupts registers:
44;       AL, BX, CX, DX
45;--------------------------------------------------------------------
[170]46;ALIGN JUMP_ALIGN
[167]47AH25h_GetDriveInformationToBufferInESSI:
[165]48    push    es
[150]49    push    bp
[165]50    push    di
51    push    si
[3]52
[150]53    call    AccessDPT_GetDriveSelectByteToAL
54    mov     bh, al
55    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
56    xchg    bp, ax
57    call    Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
58
[165]59    pop     si
60    pop     di
[150]61    pop     bp
[165]62    pop     es
63    ret
Note: See TracBrowser for help on using the repository browser.