Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
- Timestamp:
- Mar 19, 2011, 8:09:41 PM (13 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
r93 r148 10 10 ; AH8h_HandlerForReadDiskDriveParameters 11 11 ; Parameters: 12 ; AH: Bios function 8h 13 ; DL: Drive number 14 ; Parameters loaded by Int13h_Jump: 15 ; DS: RAMVARS segment 16 ; Returns: 12 ; DL: Translated Drive number 13 ; DS:DI: Ptr to DPT (in RAMVARS segment) 14 ; SS:BP: Ptr to INTPACK 15 ; Returns with INTPACK in SS:BP: 17 16 ; CH: Maximum cylinder number, bits 7...0 18 17 ; CL: Bits 7...6: Cylinder number bits 9...8 … … 22 21 ; AH: Int 13h/40h floppy return status 23 22 ; CF: 0 if successfull, 1 if error 24 ; IF: 125 ; Corrupts registers:26 ; Flags27 23 ;-------------------------------------------------------------------- 28 24 ALIGN JUMP_ALIGN … … 30 26 call RamVars_IsDriveHandledByThisBIOS 31 27 jnc SHORT .GetDriveParametersForForeignHardDiskInDL 28 call AH8h_GetDriveParameters 29 jmp SHORT .ReturnAfterStoringValuesToIntpack 32 30 33 push bx34 call AH8h_GetDriveParameters35 pop bx36 jmp Int13h_ReturnWithValueInDL37 38 ALIGN JUMP_ALIGN39 31 .GetDriveParametersForForeignHardDiskInDL: 40 32 call Int13h_CallPreviousInt13hHandler 41 33 jc SHORT .ReturnErrorFromPreviousInt13hHandler 42 34 call RamVars_GetCountOfKnownDrivesToDL 43 jmp Int13h_ReturnWithValueInDL 35 .ReturnAfterStoringValuesToIntpack: 36 mov [bp+INTPACK.cx], cx 37 mov [bp+INTPACK.dx], dx 38 xor ah, ah 44 39 .ReturnErrorFromPreviousInt13hHandler: 45 jmp Int13h_ PopDiDsAndReturn40 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 46 41 47 42 … … 51 46 ; AH8h_GetDriveParameters 52 47 ; Parameters: 53 ; DL: Drive number 54 ; DS: RAMVARS segment 48 ; DS:DI: Ptr to DPT (in RAMVARS segment) 55 49 ; Returns: 56 50 ; CH: Maximum cylinder number, bits 7...0 … … 59 53 ; DH: Maximum head number (0...255) 60 54 ; DL: Number of drives 61 ; DS:DI: Ptr to DPT62 ; AH: Int 13h/40h floppy return status63 ; CF: 0 if successfull, 1 if error64 55 ; Corrupts registers: 65 ; A L, BX56 ; AX, BX 66 57 ;-------------------------------------------------------------------- 67 58 ALIGN JUMP_ALIGN 68 59 AH8h_GetDriveParameters: 69 call FindDPT_ForDriveNumber70 60 call AccessDPT_GetLCHSfromPCHS ; AX=sectors, BX=cylinders, DX=heads 71 call AH8h_PackReturnValues 72 xor ax, ax ; Clear AH and CF 73 ret 74 61 ; Fall to .PackReturnValues 75 62 76 63 ;-------------------------------------------------------------------- 77 64 ; Packs L-CHS values to INT 13h, AH=08h return values. 78 65 ; 79 ; AH8h_PackReturnValues66 ; .PackReturnValues 80 67 ; Parameters: 81 68 ; AX: Number of L-CHS sectors per track (1...63) … … 92 79 ; AX, BX 93 80 ;-------------------------------------------------------------------- 94 ALIGN JUMP_ALIGN 95 AH8h_PackReturnValues: 81 .PackReturnValues: 96 82 dec bx ; Cylinder count to last cylinder 97 83 dec dx ; Head count to max head number
Note: See TracChangeset
for help on using the changeset viewer.