Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AHCh_HSeek.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/AHCh_HSeek.asm
r116 r148 10 10 ; AHCh_HandlerForSeek 11 11 ; Parameters: 12 ; AH: Bios function Ch 12 ; CX, DH: 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: 13 17 ; CH: Cylinder number, bits 7...0 14 18 ; CL: Bits 7...6: Cylinder number bits 9 and 8 15 19 ; Bits 5...0: Starting sector number (1...63) 16 20 ; DH: Starting head number (0...255) 17 ; DL: Drive number 18 ; Parameters loaded by Int13h_Jump: 19 ; DS: RAMVARS segment 20 ; Returns: 21 ; Returns with INTPACK in SS:BP: 21 22 ; AH: BIOS Error code 22 23 ; CF: 0 if succesfull, 1 if error 23 ; IF: 124 ; Corrupts registers:25 ; Flags26 24 ;-------------------------------------------------------------------- 27 25 ALIGN JUMP_ALIGN 28 26 AHCh_HandlerForSeek: 29 push dx30 push cx31 push bx32 push ax33 27 %ifndef USE_186 34 28 call AHCh_SeekToCylinder 35 jmp Int13h_ PopXRegsAndReturn29 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 36 30 %else 37 push Int13h_ PopXRegsAndReturn31 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 38 32 ; Fall through to AHCh_SeekToCylinder 39 33 %endif … … 41 35 42 36 ;-------------------------------------------------------------------- 43 ; Seeks to a cylinder.44 ;45 37 ; AHCh_SeekToCylinder 46 38 ; Parameters: … … 49 41 ; Bits 5...0: Starting sector number (1...63) 50 42 ; DH: Starting head number (0...255) 51 ; DL: Drive Number 52 ; DS: RAMVARS segment 43 ; DS:DI: Ptr to DPT (in RAMVARS segment) 53 44 ; Returns: 54 ; DS:DI: Ptr to DPT55 45 ; AH: BIOS Error code 56 46 ; CF: 0 if succesfull, 1 if error … … 58 48 ; AL, BX, CX, DX 59 49 ;-------------------------------------------------------------------- 60 ALIGN JUMP_ALIGN61 50 AHCh_SeekToCylinder: 62 call FindDPT_ForDriveNumber ; DS:DI now points to DPT63 51 mov ax, HCMD_SEEK<<8 ; Load cmd to AH, AL=zero sector cnt 64 52 call HCommand_OutputCountAndLCHSandCommand 65 jc SHORT .Return ; Return if error53 jc SHORT .ReturnWithErrorCodeInAH 66 54 mov bx, di ; DS:BX now points to DPT 67 55 jmp HStatus_WaitIrqOrRdy ; Wait for IRQ or RDY 68 .Return :56 .ReturnWithErrorCodeInAH: 69 57 ret
Note:
See TracChangeset
for help on using the changeset viewer.