Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm


Ignore:
Timestamp:
Mar 4, 2012, 1:35:10 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 2/2 (BIOS):

  • Fixed a bug in AH1h_HStatus.asm.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm

    r262 r294  
    77;--------------------------------------------------------------------
    88; BootMenuPrint_RefreshItem
    9 ; 
     9;
    1010;   Parameters:
    1111;       DL:     Untranslated Floppy Drive number
     
    1919    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
    2020    jnc     BootMenuEvent_EventCompleted            ; if no menu item selected, out we go
    21        
     21
    2222    push    bp
    2323    mov     bp, sp
     
    2929    mov     si, g_szDriveNumBOOTNFO                 ; special g_szDriveNum that prints from BDA
    3030    jmp     .go
    31        
     31
    3232.notOurs:
    33     mov     si,g_szDriveNum                                 
     33    mov     si,g_szDriveNum
    3434    mov     bx,g_szForeignHD                        ; assume a hard disk for the moment
    35        
    36     test    dl,80h                                         
     35
     36    test    dl, dl
    3737    js      .go
    3838    mov     bl,((g_szFloppyDrv)-$$ & 0xff)          ; and revisit the earlier assumption...
    39        
     39
    4040.go:
    4141    mov     ax, dx                                  ; preserve DL for the floppy drive letter addition
     
    4545    add     al, 'A'                                 ; floppy drive letter (we always push this although
    4646    push    ax                                      ; the hard disks don't ever use it, but it does no harm)
    47        
     47
    4848    jmp     short BootMenuPrint_RefreshInformation.FormatRelay
    4949
     
    8888    jmp     short BootMenuPrint_RefreshInformation.FormatRelay
    8989
    90        
     90
    9191;--------------------------------------------------------------------
    9292; BootMenuPrint_FloppyMenuitemInformation
     
    101101ALIGN JUMP_ALIGN
    102102BootMenuPrint_RefreshInformation:
    103     CALL_MENU_LIBRARY ClearInformationArea     
    104        
     103    CALL_MENU_LIBRARY ClearInformationArea
     104
    105105    call    BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
    106106    jnc     BootMenuEvent_EventCompleted                ; if no menu selection, abort
     
    115115    inc     dl                                          ; are we a hard disk?
    116116    dec     dl                                          ; inc/dec will set SF, without modifying CF or DL
    117     js      .HardDiskRefreshInformation 
     117    js      .HardDiskRefreshInformation
    118118
    119119    jnc     .ours                                       ; Based on CF from FindDPT_ForDriveNumberInDL above
     
    122122.ours:
    123123    call    AH8h_GetDriveParameters
    124 .around:               
     124.around:
    125125
    126126    mov     ax, g_szFddSizeOr                           ; .PrintXTFloppyType
    127     test    bl, bl                                      ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)     
     127    test    bl, bl                                      ; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)
    128128    jz      SHORT .PushAXAndOutput
    129129
     
    131131    cmp     bl, FLOPPY_TYPE_35_ED
    132132    ja      SHORT .PushAXAndOutput
    133        
     133
    134134    ; Fall to .PrintKnownFloppyType
    135135
     
    142142;   Corrupts registers:
    143143;       AX, BX, SI, DI
    144 ; 
     144;
    145145; Floppy Drive Types:
    146146;
    147 ;   0  Handled above 
     147;   0  Handled above
    148148;   1  FLOPPY_TYPE_525_DD          5 1/4   360K
    149149;   2  FLOPPY_TYPE_525_HD          5 1/4   1.2M
     
    153153;   6  FLOPPY_TYPE_35_ED           3 1/2   2.88M
    154154;   >6 Unknwon, handled above
    155 ; 
     155;
    156156;--------------------------------------------------------------------
    157157.PrintKnownFloppyType:
    158158    mov     al, (g_szFddSize - $$) & 0xff
    159159    push    ax
    160        
     160
    161161    mov     al, (g_szFddThreeHalf - $$) & 0xff
    162162    cmp     bl, FLOPPY_TYPE_525_HD
    163163    ja      .ThreeHalf
    164164    mov     al, (g_szFddFiveQuarter - $$) & 0xff
    165 .ThreeHalf:     
     165.ThreeHalf:
    166166    push    ax                                          ; "5 1/4" or "3 1/2"
    167167
     
    170170    mul     byte [cs:bx+FloppyTypes.rgbCapacity - 1]    ; -1 since 0 is handled above and not in the table
    171171
    172 .PushAXAndOutput:                   
     172.PushAXAndOutput:
    173173    push    ax
    174174
     
    189189;--------------------------------------------------------------------
    190190ALIGN JUMP_ALIGN
    191 .HardDiskRefreshInformation:       
     191.HardDiskRefreshInformation:
    192192    jc      .HardDiskMenuitemInfoForForeignDrive        ; Based on CF from FindDPT_ForDriveNumberInDL (way) above
    193193
     
    196196    call    BootMenuInfo_GetTotalSectorCount            ; Get Total LBA Size
    197197    jmp     .ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
    198        
     198
    199199.HardDiskMenuitemInfoForForeignDrive:
    200200    call    DriveXlate_ToOrBack
     
    208208    push    ax                      ; Size in magnitude
    209209    push    cx                      ; Tenths
    210     push    dx                      ; Magnitude character       
    211                
     210    push    dx                      ; Magnitude character
     211
    212212    test    di,di
    213213    jz      short BootMenuPrint_FormatCSSIfromParamsInSSBP
     
    225225;   Returns:
    226226;       BP:     Popped from stack
    227 ;       CF:     Set since menu event was handled successfully       
     227;       CF:     Set since menu event was handled successfully
    228228;   Corrupts registers:
    229229;       AX, DI
     
    232232BootMenuPrint_FormatCSSIfromParamsInSSBP:
    233233    CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
    234     stc             ; Successfull return from menu event
     234    stc             ; Successful return from menu event
    235235    pop     bp
    236236    ret
    237        
    238        
     237
     238
    239239;--------------------------------------------------------------------
    240240; BootMenuPrint_ClearScreen
     
    364364    push    cx          ; Key attribute for last space
    365365    mov     si, g_szHotkey
    366        
    367 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: 
     366
     367BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
    368368    jmp     SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP
    369369
Note: See TracChangeset for help on using the changeset viewer.