source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm@ 368

Last change on this file since 368 was 294, checked in by krille_n_@…, 13 years ago

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File size: 2.4 KB
Line 
1; Project name : XTIDE Universal BIOS
2; Description : Int 13h function AH=23h,
3; Set Controller Features Register.
4
5; Section containing code
6SECTION .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;--------------------------------------------------------------------
28ALIGN JUMP_ALIGN
29AH23h_HandlerForSetControllerFeatures:
30 xchg si, ax ; SI = Feature Number
31 mov dx, [bp+IDEPACK.intpack+INTPACK.bx]
32%ifndef USE_186
33 call AH23h_SetControllerFeatures
34 jmp Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
35%else
36 push Int13h_ReturnFromHandlerAfterStoringErrorCodeFromAH
37 ; Fall to AH23h_SetControllerFeatures
38%endif
39
40
41;--------------------------------------------------------------------
42; AH23h_SetControllerFeatures
43; Parameters:
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)
49; DS:DI: Ptr to DPT (in RAMVARS segment)
50; SS:BP: Ptr to IDEPACK
51; Returns:
52; AH: Int 13h return status
53; CF: 0 if successful, 1 if error
54; Corrupts registers:
55; AL, BX, CX, DX
56;--------------------------------------------------------------------
57;ALIGN JUMP_ALIGN
58AH23h_SetControllerFeatures:
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 TracBrowser for help on using the repository browser.