source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm @ 185

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

Some basic cleanup and fixing build problems with the Configurator (missing strings)

File size: 3.7 KB
RevLine 
[88]1; Project name  :   XTIDE Universal BIOS
[3]2; Description   :   Functions for printing drive configuration
3;                   information on Boot Menu.
4
5; Section containing code
6SECTION .text
7
8;--------------------------------------------------------------------
9; Prints Hard Disk configuration for drive handled by our BIOS.
10; Cursor is set to configuration header string position.
11;
12; BootMenuPrintCfg_ForOurDrive
13;   Parameters:
[127]14;       DS:     Segment to DPT
15;       Stack:  Offset to DPT
[3]16;   Returns:
17;       Nothing
18;   Corrupts registers:
[150]19;       AX, BX, CX, DX, SI, DI
[3]20;--------------------------------------------------------------------
21ALIGN JUMP_ALIGN
22BootMenuPrintCfg_ForOurDrive:
[127]23    pop     di
[96]24    mov     si, g_szCfgHeader
25    call    BootMenuPrint_NullTerminatedStringFromCSSIandSetCF
[150]26    eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
27    xchg    si, ax                      ; CS:SI now points to IDEVARS
[96]28    ; Fall to PushAndFormatCfgString
[3]29
30;--------------------------------------------------------------------
[96]31; PushAndFormatCfgString
[3]32;   Parameters:
33;       DS:DI:  Ptr to DPT
34;       CS:SI:  Ptr to IDEVARS
35;   Returns:
36;       Nothing
37;   Corrupts registers:
[88]38;       AX, DX, SI, DI
[3]39;--------------------------------------------------------------------
[96]40PushAndFormatCfgString:
[88]41    push    bp
42    mov     bp, sp
[3]43    ; Fall to first push below
44
45;--------------------------------------------------------------------
[88]46; PushAddressingMode
[3]47;   Parameters:
48;       DS:DI:  Ptr to DPT
49;       CS:SI:  Ptr to IDEVARS
50;   Returns:
[88]51;       Nothing (jumps to next push below)
[3]52;   Corrupts registers:
[96]53;       AX
[3]54;--------------------------------------------------------------------
[88]55PushAddressingMode:
[150]56    call    AccessDPT_GetAddressingModeForWordLookToBX
[182]57    mov     al,g_szAddressingModes_Displacement
58    mul     bl
59    add     ax,g_szAddressingModes
60    push    ax
61       
[3]62;--------------------------------------------------------------------
[88]63; PushBlockMode
[3]64;   Parameters:
65;       DS:DI:  Ptr to DPT
66;       CS:SI:  Ptr to IDEVARS
67;   Returns:
68;       Nothing (falls to next push below)
69;   Corrupts registers:
[88]70;       AX
[3]71;--------------------------------------------------------------------
[88]72PushBlockMode:
[150]73    mov     ax, 1
[158]74    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
[150]75    jz      SHORT .PushBlockSizeFromAX
76    mov     al, [di+DPT_ATA.bSetBlock]
77.PushBlockSizeFromAX:
[3]78    push    ax
79
80;--------------------------------------------------------------------
[88]81; PushBusType
[3]82;   Parameters:
83;       DS:DI:  Ptr to DPT
84;       CS:SI:  Ptr to IDEVARS
85;   Returns:
86;       Nothing (jumps to next push below)
87;   Corrupts registers:
88;       AX, DX
89;--------------------------------------------------------------------
[181]90;PushBusType:
[182]91    mov     al,g_szBusTypeValues_Displacement
92    mul     BYTE [cs:si+IDEVARS.bDevice]
93    shr     ax,1
94    add     ax,g_szBusTypeValues
95    push    ax 
96               
[3]97;--------------------------------------------------------------------
[88]98; PushIRQ
[3]99;   Parameters:
100;       DS:DI:  Ptr to DPT
101;       CS:SI:  Ptr to IDEVARS
102;   Returns:
103;       Nothing (falls to next push below)
104;   Corrupts registers:
[88]105;       AX, DX
[3]106;--------------------------------------------------------------------
[88]107PushIRQ:
[184]108    eMOVZX  ax, BYTE [cs:si+IDEVARS.bIRQ]
[3]109    push    ax
110
111;--------------------------------------------------------------------
[88]112; PushResetStatus
[3]113;   Parameters:
114;       DS:DI:  Ptr to DPT
115;       CS:SI:  Ptr to IDEVARS
116;   Returns:
[88]117;       Nothing (falls to next push below)
[3]118;   Corrupts registers:
[88]119;       AX
[3]120;--------------------------------------------------------------------
[88]121PushResetStatus:
[158]122    mov     al, [di+DPT.bFlagsHigh]
123    and     ax, MASKH_DPT_RESET
[88]124    push    ax
[3]125
126;--------------------------------------------------------------------
[96]127; PrintValuesFromStack
[3]128;   Parameters:
129;       Stack:  All formatting parameters
130;   Returns:
131;       Nothing
132;   Corrupts registers:
[88]133;       AX, SI, DI
[3]134;--------------------------------------------------------------------
[96]135PrintValuesFromStack:
[3]136    mov     si, g_szCfgFormat
[127]137    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
[96]138
Note: See TracBrowser for help on using the repository browser.