Changeset 150 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
- Timestamp:
- Apr 29, 2011, 7:04:13 PM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
r148 r150 14 14 ; DL: Translated Drive number 15 15 ; DS:DI: Ptr to DPT (in RAMVARS segment) 16 ; SS:BP: Ptr to I NTPACK17 ; Parameters on INTPACK in SS:BP:16 ; SS:BP: Ptr to IDEPACK 17 ; Parameters on INTPACK: 18 18 ; AL: Feature Number (parameter to Features Register = subcommand) 19 ; (Parameter registers are undocumented, the re are specific for this BIOS):20 ; B H: Parameter to Sector Count Register (subcommand specific)21 ; B L: Parameter toSector Number Register (subcommand specific)22 ; CL: Parameter to L ow CylinderRegister (subcommand specific)23 ; CH: Parameter to High CylinderRegister (subcommand specific)24 ; Returns with INTPACK in SS:BP:19 ; (Parameter registers are undocumented, these are specific for this BIOS): 20 ; BL: Parameter to Sector Count Register (subcommand specific) 21 ; BH: Parameter to LBA Low / Sector Number Register (subcommand specific) 22 ; CL: Parameter to LBA Middle / Cylinder Low Register (subcommand specific) 23 ; CH: Parameter to LBA High / Cylinder High Register (subcommand specific) 24 ; Returns with INTPACK: 25 25 ; AH: Int 13h return status 26 26 ; CF: 0 if succesfull, 1 if error … … 28 28 ALIGN JUMP_ALIGN 29 29 AH23h_HandlerForSetControllerFeatures: 30 xchg si, ax ; SI = Feature Number 31 mov dx, [bp+IDEPACK.intpack+INTPACK.bx] 30 32 %ifndef USE_186 31 33 call AH23h_SetControllerFeatures … … 40 42 ; AH23h_SetControllerFeatures 41 43 ; Parameters: 42 ; AL: Feature Number (parameter to Features Register = subcommand)43 ; BH: Parameter to Sector CountRegister (subcommand specific)44 ; BL: Parameter to Sector NumberRegister (subcommand specific)45 ; C L: Parameter to Low CylinderRegister (subcommand specific)46 ; CH: Parameter to High Cylinder Register (subcommand specific)44 ; DL: Parameter to Sector Count Register (subcommand specific) 45 ; DH: Parameter to LBA Low / Sector Number Register (subcommand specific) 46 ; CL: Parameter to LBA Middle / Cylinder Low Register (subcommand specific) 47 ; CH: Parameter to LBA High / Cylinder High Register (subcommand specific) 48 ; SI: Feature Number (parameter to Features Register = subcommand) 47 49 ; DS:DI: Ptr to DPT (in RAMVARS segment) 50 ; SS:BP: Ptr to IDEPACK 48 51 ; Returns: 49 52 ; AH: Int 13h return status 50 53 ; CF: 0 if succesfull, 1 if error 51 54 ; Corrupts registers: 52 ; A X, BX, CX, DX, SI55 ; AL, BX, CX, DX 53 56 ;-------------------------------------------------------------------- 54 57 ALIGN JUMP_ALIGN 55 58 AH23h_SetControllerFeatures: 56 ; Backup AL and BH to SI 57 mov ah, bh 58 xchg si, ax 59 60 ; Select Master or Slave and wait until ready 61 call HDrvSel_SelectDriveAndDisableIRQ 62 jc SHORT .ReturnWithErrorCodeInAH 63 64 ; Output Feature Number 65 mov ax, si ; Feature number to AL 66 mov dx, [RAMVARS.wIdeBase] ; Load base port address 67 inc dx ; REGW_IDE_FEAT 68 out dx, al 69 70 ; Output parameters to Sector Number Register and Cylinder Registers 71 xor bh, bh ; Zero head number 72 dec dx ; Back to base port address 73 call HCommand_OutputTranslatedLCHSaddress 74 75 ; Output parameter to Sector Count Register and command 76 xchg ax, si ; Sector Count Reg param to AH 77 mov al, ah ; Sector Count Reg param to AL 78 mov ah, HCMD_SET_FEAT ; Load Set Features command to AH 79 call HCommand_OutputSectorCountAndCommand 80 81 jmp HStatus_WaitBsyDefTime ; Wait until drive ready 82 .ReturnWithErrorCodeInAH: 83 ret 59 mov al, COMMAND_SET_FEATURES 60 mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY) 61 jmp Idepack_StoreNonExtParametersAndIssueCommandFromAL
Note:
See TracChangeset
for help on using the changeset viewer.