Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH25h_HDrvID.asm
r120 r148 10 10 ; AH25h_HandlerForGetDriveInformation 11 11 ; Parameters: 12 ; AH: Bios function 25h 13 ; DL: Drive number 12 ; ES: Same as in INTPACK 13 ; DL: Translated Drive number 14 ; DS:DI: Ptr to DPT (in RAMVARS segment) 15 ; SS:BP: Ptr to INTPACK 16 ; Parameters on INTPACK in SS:BP: 14 17 ; ES:BX: Ptr to buffer to receive 512-byte drive information 15 ; Parameters loaded by Int13h_Jump: 16 ; DS: RAMVARS segment 17 ; Returns: 18 ; ES:BX: Ptr to 512-byte buffer to receive drive Information 18 ; Returns with INTPACK in SS:BP: 19 19 ; AH: Int 13h return status 20 20 ; CF: 0 if succesfull, 1 if error 21 ; IF: 122 ; Corrupts registers:23 ; Flags24 21 ;-------------------------------------------------------------------- 25 22 ALIGN JUMP_ALIGN 26 23 AH25h_HandlerForGetDriveInformation: 27 push dx28 push cx29 push bx30 push ax31 push es32 33 24 ; Wait until previously selected drive is ready 34 call FindDPT_ForDriveNumber ; DS:DI now points to DPT35 25 call HDrvSel_SelectDriveAndDisableIRQ 36 jc SHORT .Return 26 jc SHORT .ReturnWithErrorCodeInAH ; Return if error 37 27 38 28 ; Get drive information 29 mov bx, [bp+INTPACK.bx] 39 30 call HPIO_NormalizeDataPointer 40 31 push bx … … 45 36 pop di ; Pop buffer offset to DI 46 37 call AH25h_GetDriveInfo ; Get drive information 47 .Return: 48 pop es 49 jmp Int13h_PopXRegsAndReturn 38 .ReturnWithErrorCodeInAH: 39 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 50 40 51 41 … … 87 77 eCMOVE cl, B_TIMEOUT_RESET ; If so, load long timeout 88 78 call HStatus_WaitRdy ; Wait until ready to accept commands 89 jc SHORT .Return ; Return if error79 jc SHORT .ReturnWithErrorCodeInAH 90 80 91 81 ; Output command … … 93 83 out dx, al ; Output command 94 84 call HStatus_WaitDrqDefTime ; Wait until ready to transfer (no IRQ!) 95 jc SHORT .Return ; Return if error85 jc SHORT .ReturnWithErrorCodeInAH 96 86 97 87 ; Transfer data … … 102 92 call HStatus_WaitRdyDefTime ; Wait until drive ready 103 93 104 .Return :94 .ReturnWithErrorCodeInAH: 105 95 pop bx 106 96 pop dx
Note:
See TracChangeset
for help on using the changeset viewer.