[88] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Int 13h function AH=25h, Get Drive Information.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .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 | ;--------------------------------------------------------------------
|
---|
| 22 | ALIGN JUMP_ALIGN
|
---|
| 23 | AH25h_HandlerForGetDriveInformation:
|
---|
[165] | 24 | mov si, [bp+IDEPACK.intpack+INTPACK.bx]
|
---|
| 25 | %ifdef USE_186
|
---|
| 26 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
[167] | 27 | ; Fall to AH25h_GetDriveInformationToBufferInESSI
|
---|
[165] | 28 | %else
|
---|
[167] | 29 | call AH25h_GetDriveInformationToBufferInESSI
|
---|
[165] | 30 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
| 31 | %endif
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | ;--------------------------------------------------------------------
|
---|
[167] | 35 | ; AH25h_GetDriveInformationToBufferInESSI
|
---|
[165] | 36 | ; Parameters:
|
---|
| 37 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
| 38 | ; ES:SI: Ptr to buffer to receive 512-byte drive information
|
---|
| 39 | ; Returns with INTPACK:
|
---|
| 40 | ; AH: Int 13h return status
|
---|
| 41 | ; CF: 0 if succesfull, 1 if error
|
---|
| 42 | ; Corrupts registers:
|
---|
| 43 | ; AL, BX, CX, DX
|
---|
| 44 | ;--------------------------------------------------------------------
|
---|
[167] | 45 | ALIGN JUMP_ALIGN
|
---|
| 46 | AH25h_GetDriveInformationToBufferInESSI:
|
---|
[165] | 47 | push es
|
---|
[150] | 48 | push bp
|
---|
[165] | 49 | push di
|
---|
| 50 | push si
|
---|
[3] | 51 |
|
---|
[150] | 52 | call AccessDPT_GetDriveSelectByteToAL
|
---|
| 53 | mov bh, al
|
---|
| 54 | eMOVZX ax, BYTE [di+DPT.bIdevarsOffset]
|
---|
| 55 | xchg bp, ax
|
---|
| 56 | call Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
|
---|
| 57 |
|
---|
[165] | 58 | pop si
|
---|
| 59 | pop di
|
---|
[150] | 60 | pop bp
|
---|
[165] | 61 | pop es
|
---|
| 62 | ret
|
---|