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

Last change on this file since 369 was 369, checked in by gregli@…, 12 years ago

Removed align directives for initalization code and added define for align in boot-time calls to the assembly library (defaulting to 1), resulting in a significant savings for the AT and 386 builds. Fixed a bug with switch command line handling in the serial server. Put in CR characters in licesnse.txt, so that it properly displays on Windows. In the configurator, added default values for user supplied CHS and LBA values, defaulting to values within range when those features are enabled. Updated the copyright message in the configurator as the literal word Copyright is important.

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;--------------------------------------------------------------------
28AH23h_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;--------------------------------------------------------------------
56AH23h_SetControllerFeatures:
57    mov     al, COMMAND_SET_FEATURES
58    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
59    jmp     Idepack_StoreNonExtParametersAndIssueCommandFromAL
Note: See TracBrowser for help on using the repository browser.