[148] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Int 13h function AH=23h,
|
---|
| 3 | ; Set Controller Features Register.
|
---|
| 4 |
|
---|
| 5 | ; Section containing code
|
---|
| 6 | SECTION .text
|
---|
| 7 |
|
---|
| 8 | ;--------------------------------------------------------------------
|
---|
| 9 | ; Int 13h function AH=23h, Set Controller Features Register.
|
---|
| 10 | ;
|
---|
| 11 | ; AH23h_HandlerForSetControllerFeatures
|
---|
| 12 | ; Parameters:
|
---|
[148] | 13 | ; AL, CX: Same as in INTPACK
|
---|
| 14 | ; DL: Translated Drive number
|
---|
| 15 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
[150] | 16 | ; SS:BP: Ptr to IDEPACK
|
---|
| 17 | ; Parameters on INTPACK:
|
---|
[3] | 18 | ; AL: Feature Number (parameter to Features Register = subcommand)
|
---|
[150] | 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:
|
---|
[148] | 25 | ; AH: Int 13h return status
|
---|
| 26 | ; CF: 0 if succesfull, 1 if error
|
---|
| 27 | ;--------------------------------------------------------------------
|
---|
| 28 | ALIGN JUMP_ALIGN
|
---|
| 29 | AH23h_HandlerForSetControllerFeatures:
|
---|
[150] | 30 | xchg si, ax ; SI = Feature Number
|
---|
| 31 | mov dx, [bp+IDEPACK.intpack+INTPACK.bx]
|
---|
[148] | 32 | %ifndef USE_186
|
---|
| 33 | call AH23h_SetControllerFeatures
|
---|
| 34 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
| 35 | %else
|
---|
| 36 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
[162] | 37 | ; Fall to AH23h_SetControllerFeatures
|
---|
[148] | 38 | %endif
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | ;--------------------------------------------------------------------
|
---|
| 42 | ; AH23h_SetControllerFeatures
|
---|
| 43 | ; Parameters:
|
---|
[150] | 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)
|
---|
[148] | 49 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
[150] | 50 | ; SS:BP: Ptr to IDEPACK
|
---|
[3] | 51 | ; Returns:
|
---|
| 52 | ; AH: Int 13h return status
|
---|
| 53 | ; CF: 0 if succesfull, 1 if error
|
---|
| 54 | ; Corrupts registers:
|
---|
[150] | 55 | ; AL, BX, CX, DX
|
---|
[3] | 56 | ;--------------------------------------------------------------------
|
---|
| 57 | ALIGN JUMP_ALIGN
|
---|
[148] | 58 | AH23h_SetControllerFeatures:
|
---|
[150] | 59 | mov al, COMMAND_SET_FEATURES
|
---|
| 60 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
|
---|
| 61 | jmp Idepack_StoreNonExtParametersAndIssueCommandFromAL
|
---|