Changeset 148 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.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/AH23h_HFeatures.asm
r3 r148 1 ; File name : AH23h_HFeatures.asm 2 ; Project name : IDE BIOS 3 ; Created date : 28.12.2009 4 ; Last update : 12.4.2010 5 ; Author : Tomi Tilli 1 ; Project name : XTIDE Universal BIOS 6 2 ; Description : Int 13h function AH=23h, 7 3 ; Set Controller Features Register. … … 15 11 ; AH23h_HandlerForSetControllerFeatures 16 12 ; Parameters: 17 ; AH: Bios function 23h 13 ; AL, CX: Same as in INTPACK 14 ; DL: Translated Drive number 15 ; DS:DI: Ptr to DPT (in RAMVARS segment) 16 ; SS:BP: Ptr to INTPACK 17 ; Parameters on INTPACK in SS:BP: 18 18 ; AL: Feature Number (parameter to Features Register = subcommand) 19 ; DL: Drive number (8xh) 20 ; Parameters loaded by Int13h_Jump: 21 ; DS: RAMVARS segment 22 ; Parameter registers are undocumented, specific for this BIOS: 19 ; (Parameter registers are undocumented, there are specific for this BIOS): 23 20 ; BH: Parameter to Sector Count Register (subcommand specific) 24 21 ; BL: Parameter to Sector Number Register (subcommand specific) 25 22 ; CL: Parameter to Low Cylinder Register (subcommand specific) 26 23 ; CH: Parameter to High Cylinder Register (subcommand specific) 24 ; Returns with INTPACK in SS:BP: 25 ; AH: Int 13h return status 26 ; CF: 0 if succesfull, 1 if error 27 ;-------------------------------------------------------------------- 28 ALIGN JUMP_ALIGN 29 AH23h_HandlerForSetControllerFeatures: 30 %ifndef USE_186 31 call AH23h_SetControllerFeatures 32 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 33 %else 34 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH 35 ; Fall through to AH23h_SetControllerFeatures 36 %endif 37 38 39 ;-------------------------------------------------------------------- 40 ; AH23h_SetControllerFeatures 41 ; Parameters: 42 ; AL: Feature Number (parameter to Features Register = subcommand) 43 ; BH: Parameter to Sector Count Register (subcommand specific) 44 ; BL: Parameter to Sector Number Register (subcommand specific) 45 ; CL: Parameter to Low Cylinder Register (subcommand specific) 46 ; CH: Parameter to High Cylinder Register (subcommand specific) 47 ; DS:DI: Ptr to DPT (in RAMVARS segment) 27 48 ; Returns: 28 49 ; AH: Int 13h return status 29 50 ; CF: 0 if succesfull, 1 if error 30 ; IF: 131 51 ; Corrupts registers: 32 ; Flags52 ; AX, BX, CX, DX, SI 33 53 ;-------------------------------------------------------------------- 34 54 ALIGN JUMP_ALIGN 35 AH23h_HandlerForSetControllerFeatures: 36 push dx 37 push cx 38 push bx 39 push ax 40 push si 41 55 AH23h_SetControllerFeatures: 42 56 ; Backup AL and BH to SI 43 57 mov ah, bh … … 45 59 46 60 ; Select Master or Slave and wait until ready 47 call FindDPT_ForDriveNumber ; DS:DI now points to DPT48 61 call HDrvSel_SelectDriveAndDisableIRQ 49 jc SHORT .Return ; Return if error62 jc SHORT .ReturnWithErrorCodeInAH 50 63 51 64 ; Output Feature Number … … 66 79 call HCommand_OutputSectorCountAndCommand 67 80 68 call HStatus_WaitBsyDefTime ; Wait until drive ready 69 .Return: 70 pop si 71 jmp Int13h_PopXRegsAndReturn 81 jmp HStatus_WaitBsyDefTime ; Wait until drive ready 82 .ReturnWithErrorCodeInAH: 83 ret
Note:
See TracChangeset
for help on using the changeset viewer.