1 | ; Project name : XTIDE Universal BIOS
|
---|
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:
|
---|
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 IDEPACK
|
---|
17 | ; Parameters on INTPACK:
|
---|
18 | ; AL: Feature Number (parameter to Features Register = subcommand)
|
---|
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 | ; AH: Int 13h return status
|
---|
26 | ; CF: 0 if successful, 1 if error
|
---|
27 | ;--------------------------------------------------------------------
|
---|
28 | AH23h_HandlerForSetControllerFeatures:
|
---|
29 | xchg si, ax ; SI = Feature Number
|
---|
30 | mov dx, [bp+IDEPACK.intpack+INTPACK.bx]
|
---|
31 | %ifndef USE_186
|
---|
32 | call AH23h_SetControllerFeatures
|
---|
33 | jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
34 | %else
|
---|
35 | push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
|
---|
36 | ; Fall to AH23h_SetControllerFeatures
|
---|
37 | %endif
|
---|
38 |
|
---|
39 |
|
---|
40 | ;--------------------------------------------------------------------
|
---|
41 | ; AH23h_SetControllerFeatures
|
---|
42 | ; Parameters:
|
---|
43 | ; DL: Parameter to Sector Count Register (subcommand specific)
|
---|
44 | ; DH: Parameter to LBA Low / Sector Number Register (subcommand specific)
|
---|
45 | ; CL: Parameter to LBA Middle / Cylinder Low Register (subcommand specific)
|
---|
46 | ; CH: Parameter to LBA High / Cylinder High Register (subcommand specific)
|
---|
47 | ; SI: Feature Number (parameter to Features Register = subcommand)
|
---|
48 | ; DS:DI: Ptr to DPT (in RAMVARS segment)
|
---|
49 | ; SS:BP: Ptr to IDEPACK
|
---|
50 | ; Returns:
|
---|
51 | ; AH: Int 13h return status
|
---|
52 | ; CF: 0 if successful, 1 if error
|
---|
53 | ; Corrupts registers:
|
---|
54 | ; AL, BX, CX, DX
|
---|
55 | ;--------------------------------------------------------------------
|
---|
56 | AH23h_SetControllerFeatures:
|
---|
57 | mov al, COMMAND_SET_FEATURES
|
---|
58 | mov bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
|
---|
59 | jmp Idepack_StoreNonExtParametersAndIssueCommandFromAL
|
---|