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

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

Changes to XTIDE Universal BIOS:

  • Added Advanced ATA Module (MODULE_ADVANCED_ATA) with native support for QDI Vision QD6500 and QD6580 VLB IDE Controllers.
  • Hopefully optimized IDE transfer functions for 8088 (replaced some memory accesses from WORD to BYTE).
  • XT build does not fit in 8k at the moment!!!
File size: 3.5 KB
RevLine 
[88]1; Project name  :   XTIDE Universal BIOS
[3]2; Description   :   Functions for printing drive configuration
3;                   information on Boot Menu.
[258]4;
5; Included by BootMenuPrint.asm, this routine is to be inserted into
6; BootMenuPrint_HardDiskRefreshInformation.
7;
[3]8; Section containing code
9SECTION .text
10
[258]11;;; fall-into from BootMenuPrint_HardDiskRefreshInformation.
12
[3]13;--------------------------------------------------------------------
14; Prints Hard Disk configuration for drive handled by our BIOS.
15; Cursor is set to configuration header string position.
16;
17; BootMenuPrintCfg_ForOurDrive
18;   Parameters:
[241]19;       DS:DI:      Pointer to DPT
[3]20;   Returns:
21;       Nothing
22;   Corrupts registers:
[258]23;       AX, BX, CX, DX
[3]24;--------------------------------------------------------------------
[258]25.BootMenuPrintCfg_ForOurDrive:
[294]26    eMOVZX  ax, [di+DPT.bIdevarsOffset]
[258]27    xchg    bx, ax                      ; CS:BX now points to IDEVARS
[194]28    ; Fall to .PushAndFormatCfgString
[3]29
30;--------------------------------------------------------------------
[88]31; PushAddressingMode
[3]32;   Parameters:
33;       DS:DI:  Ptr to DPT
[258]34;       CS:BX:  Ptr to IDEVARS
[3]35;   Returns:
[88]36;       Nothing (jumps to next push below)
[3]37;   Corrupts registers:
[258]38;       AX, CX
[3]39;--------------------------------------------------------------------
[194]40.PushAddressingMode:
[200]41    AccessDPT_GetUnshiftedAddressModeToALZF
[294]42    ;;
43    ;; This multiply both shifts the addressing mode bits down to low order bits, and
[193]44    ;; at the same time multiplies by the size of the string displacement.  The result is in AH,
45    ;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
[294]46    ;;
[258]47    mov     cl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
48    mul     cl
[193]49    xchg    al,ah
[182]50    add     ax,g_szAddressingModes
51    push    ax
[294]52
[3]53;--------------------------------------------------------------------
[88]54; PushBlockMode
[3]55;   Parameters:
56;       DS:DI:  Ptr to DPT
[258]57;       CS:BX:  Ptr to IDEVARS
[3]58;   Returns:
59;       Nothing (falls to next push below)
60;   Corrupts registers:
[88]61;       AX
[3]62;--------------------------------------------------------------------
[194]63.PushBlockMode:
[150]64    mov     ax, 1
[158]65    test    BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
[150]66    jz      SHORT .PushBlockSizeFromAX
67    mov     al, [di+DPT_ATA.bSetBlock]
68.PushBlockSizeFromAX:
[3]69    push    ax
70
71;--------------------------------------------------------------------
[88]72; PushBusType
[3]73;   Parameters:
74;       DS:DI:  Ptr to DPT
[258]75;       CS:BX:  Ptr to IDEVARS
[3]76;   Returns:
77;       Nothing (jumps to next push below)
78;   Corrupts registers:
79;       AX, DX
80;--------------------------------------------------------------------
[194]81.PushBusType:
[182]82    mov     al,g_szBusTypeValues_Displacement
[258]83    mul     BYTE [cs:bx+IDEVARS.bDevice]
[294]84
[186]85    shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
[294]86
[182]87    add     ax,g_szBusTypeValues
[294]88    push    ax
89
[3]90;--------------------------------------------------------------------
[88]91; PushIRQ
[3]92;   Parameters:
93;       DS:DI:  Ptr to DPT
[258]94;       CS:BX:  Ptr to IDEVARS
[3]95;   Returns:
96;       Nothing (falls to next push below)
97;   Corrupts registers:
[88]98;       AX, DX
[3]99;--------------------------------------------------------------------
[194]100.PushIRQ:
[294]101    mov     al, [cs:bx+IDEVARS.bIRQ]
[241]102    cbw
[3]103    push    ax
104
105;--------------------------------------------------------------------
[88]106; PushResetStatus
[3]107;   Parameters:
108;       DS:DI:  Ptr to DPT
[258]109;       CS:BX:  Ptr to IDEVARS
[3]110;   Returns:
[88]111;       Nothing (falls to next push below)
[3]112;   Corrupts registers:
[363]113;       AX, BX, DX, ES
[3]114;--------------------------------------------------------------------
[194]115.PushResetStatus:
[363]116    call    BootMenuInfo_IsAvailable    ; Load segment to ES
117    call    BootMenuInfo_ConvertDPTtoBX
118    push    WORD [es:bx+BOOTMENUINFO.wInitErrorFlags]
[3]119
[258]120;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
Note: See TracBrowser for help on using the repository browser.