Changeset 424 in xtideuniversalbios for trunk/BIOS_Drive_Information_Tool/Src/Print.asm


Ignore:
Timestamp:
May 16, 2012, 4:23:10 PM (12 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to BIOS Drive Information Tool:

  • Up to date with recent CHS translation changes.
  • Block mode and PIO capabilities are now displayed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BIOS_Drive_Information_Tool/Src/Print.asm

    r376 r424  
    3030;       AX, BX, DI
    3131;--------------------------------------------------------------------
    32 ALIGN JUMP_ALIGN
    3332Print_SetCharacterOutputToSTDOUT:
    3433    mov     bl, ATTRIBUTES_NOT_USED
     
    5049;       AX, DX
    5150;--------------------------------------------------------------------
    52 ALIGN JUMP_ALIGN
    5351DosCharOut:
    5452    xchg    dx, ax
     
    6866;       AX, BP, SI, DI (CF remains unchanged)
    6967;--------------------------------------------------------------------
    70 ALIGN JUMP_ALIGN
    7168Print_ErrorMessageFromAHifError:
    7269    jnc     SHORT .NoErrors
    7370    eMOVZX  ax, ah
    7471    mov     si, g_szBiosError
    75     call    Print_BiosFunctionNumberFromAXusingFormatStringInSI
     72    call    Print_FormatStringFromSIwithParameterInAX
    7673    stc     ; Keep the CF set
    7774ALIGN JUMP_ALIGN
     
    8279;---------------------------------------------------------------------
    8380; Print_DriveNumberFromDLusingFormatStringInSI
    84 ; Print_VersionStringFromAXusingFormatStringInSI
    85 ; Print_BiosFunctionNumberFromAXusingFormatStringInSI
    86 ; Print_SectorSizeFromAXusingFormatStringInSI
    8781;   Parameters:
    8882;       DL:     Drive Number
    89 ;       AX:     Function number
     83;       SI:     Offset to format string
    9084;   Returns:
    9185;       Nothing
     
    9387;       AX, BP, DI
    9488;--------------------------------------------------------------------
    95 ALIGN JUMP_ALIGN
    9689Print_DriveNumberFromDLusingFormatStringInSI:
    9790    eMOVZX  ax, dl
    98 Print_VersionStringFromAXusingFormatStringInSI:
    99 Print_BiosFunctionNumberFromAXusingFormatStringInSI:
    100 Print_SectorSizeFromAXusingFormatStringInSI:
    101     mov     bp, sp
    102     push    ax
    103     jmp     SHORT JumpToFormatNullTerminatedStringFromSI
     91    ; Fall to Print_FormatStringFromSIwithParameterInAX
     92
     93
     94;---------------------------------------------------------------------
     95; Print_FormatStringFromSIwithParameterInAX
     96; Print_FormatStringFromSIwithParametersInAXDX
     97; Print_FormatStringFromSIwithParametersInAXDXCX
     98;   Parameters:
     99;       AX:     Format parameter 1
     100;       DX:     Format parameter 2
     101;       CX:     Format parameter 3
     102;       SI:     Offset to format string
     103;   Returns:
     104;       Nothing
     105;   Corrupts registers:
     106;       AX, BP, DI
     107;--------------------------------------------------------------------
     108Print_FormatStringFromSIwithParameterInAX:
     109    mov     bp, sp
     110    push    ax
     111    jmp     JumpToFormatNullTerminatedStringFromSI
     112
     113Print_FormatStringFromSIwithParametersInAXDX:
     114    mov     bp, sp
     115    push    ax
     116    push    dx
     117    jmp     JumpToFormatNullTerminatedStringFromSI
     118
     119Print_FormatStringFromSIwithParametersInAXDXCX:
     120    mov     bp, sp
     121    push    ax
     122    push    dx
     123    push    cx
     124    jmp     SHORT JumpToFormatNullTerminatedStringFromSI
     125
     126
     127;---------------------------------------------------------------------
     128; Print_ModeFromDLandCHSfromAXBLBH
     129;   Parameters:
     130;       AX:     Number of L-CHS cylinders (1...1024)
     131;       BL:     Number of L-CHS heads (1...255)
     132;       BH:     Number of L-CHS sectors per track (1...63)
     133;       DL:     CHS Translate Mode
     134;   Returns:
     135;       Nothing
     136;   Corrupts registers:
     137;       AX, BP, SI, DI
     138;--------------------------------------------------------------------
     139Print_ModeFromDLandCHSfromAXLBH:
     140    mov     bp, sp
     141
     142    xor     dh, dh
     143    mov     si, dx
     144    shl     si, 1       ; Shift for WORD lookup
     145    push    WORD [si+.rgszXlateModeToString]
     146
     147    ePUSH_T si, g_szFormatCHS
     148    push    ax          ; Cylinders
     149    eMOVZX  ax, bl
     150    push    ax          ; Heads
     151    mov     al, bh
     152    push    ax          ; Sectors per track
     153
     154    mov     si, g_szXlateAndCHS
     155    jmp     SHORT JumpToFormatNullTerminatedStringFromSI
     156
     157.rgszXlateModeToString:
     158    dw      g_szNormal
     159    dw      g_szLarge
     160    dw      g_szLBA
    104161
    105162
     
    115172;       AX, BP, DI
    116173;--------------------------------------------------------------------
    117 ALIGN JUMP_ALIGN
    118174Print_CHSfromCXDXAX:
    119175    push    si
     
    139195;       AX, CX, BP, SI, DI
    140196;--------------------------------------------------------------------
    141 ALIGN JUMP_ALIGN
    142197Print_NameFromAtaInfoInBX:
    143198    cld
     
    171226;       AX, BX, BP, DI
    172227;--------------------------------------------------------------------
    173 ALIGN JUMP_ALIGN
    174228Print_TotalSectorsFromBXDXAX:
    175229    ePUSH_T di, 0
     
    200254;       AX, BP, SI, DI
    201255;--------------------------------------------------------------------
    202 ALIGN JUMP_ALIGN
    203256Print_EbiosVersionFromBXandExtensionsFromCX:
    204257    mov     bp, sp
     
    219272;       AX, DI
    220273;--------------------------------------------------------------------
    221 ALIGN JUMP_ALIGN
    222274JumpToFormatNullTerminatedStringFromSI:
    223275    CALL_DISPLAY_LIBRARY    FormatNullTerminatedStringFromCSSI
     
    234286;       AX, DI
    235287;--------------------------------------------------------------------
    236 ALIGN JUMP_ALIGN
    237288Print_NullTerminatedStringFromSI:
    238289    CALL_DISPLAY_LIBRARY    PrintNullTerminatedStringFromCSSI
Note: See TracChangeset for help on using the changeset viewer.