Changeset 294 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot


Ignore:
Timestamp:
Mar 4, 2012, 1:35:10 AM (13 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.
Location:
trunk/XTIDE_Universal_BIOS/Src/Boot
Files:
4 edited

Legend:

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

    r258 r294  
    4343    call    RamVars_GetSegmentToDS
    4444;;; fall-through
    45                        
     45
    4646ALIGN JUMP_ALIGN
    4747BootMenu_GetDriveToDXforMenuitemInCX:
     
    136136BootMenu_GetMenuitemToAXforAsciiHotkeyInAL:
    137137    call    Char_ALtoUpperCaseLetter
    138     xor     ah, ah
     138    cbw
    139139    xchg    ax, cx
    140140    call    BootMenu_GetLetterForFirstHardDiskToAL
  • 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
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm

    r258 r294  
    2424;--------------------------------------------------------------------
    2525.BootMenuPrintCfg_ForOurDrive:
    26     eMOVZX  ax, BYTE [di+DPT.bIdevarsOffset]
     26    eMOVZX  ax, [di+DPT.bIdevarsOffset]
    2727    xchg    bx, ax                      ; CS:BX now points to IDEVARS
    2828    ; Fall to .PushAndFormatCfgString
     
    4040.PushAddressingMode:
    4141    AccessDPT_GetUnshiftedAddressModeToALZF
    42     ;; 
    43     ;; This multiply both shifts the addressing mode bits down to low order bits, and 
     42    ;;
     43    ;; This multiply both shifts the addressing mode bits down to low order bits, and
    4444    ;; at the same time multiplies by the size of the string displacement.  The result is in AH,
    4545    ;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
    46     ;; 
     46    ;;
    4747    mov     cl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
    4848    mul     cl
     
    5050    add     ax,g_szAddressingModes
    5151    push    ax
    52        
     52
    5353;--------------------------------------------------------------------
    5454; PushBlockMode
     
    8282    mov     al,g_szBusTypeValues_Displacement
    8383    mul     BYTE [cs:bx+IDEVARS.bDevice]
    84        
     84
    8585    shr     ax,1            ; divide by 2 since IDEVARS.bDevice is multiplied by 2
    86        
     86
    8787    add     ax,g_szBusTypeValues
    88     push    ax 
    89                
     88    push    ax
     89
    9090;--------------------------------------------------------------------
    9191; PushIRQ
     
    9999;--------------------------------------------------------------------
    100100.PushIRQ:
    101     mov     al, BYTE [cs:bx+IDEVARS.bIRQ]
     101    mov     al, [cs:bx+IDEVARS.bIRQ]
    102102    cbw
    103103    push    ax
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm

    r148 r294  
    1111;       DS:     RAMVARS segment
    1212;   Returns:
    13 ;       ES:BX:  Ptr to boot sector (if successfull)
    14 ;       CF:     Set if boot sector loaded succesfully
     13;       ES:BX:  Ptr to boot sector (if successful)
     14;       CF:     Set if boot sector loaded successfully
    1515;               Cleared if failed to load boot sector
    1616;   Corrupts registers:
     
    4646;   Returns:
    4747;       AH:     INT 13h error code
    48 ;       ES:BX:  Ptr to boot sector (if successfull)
    49 ;       CF:     Cleared if read successfull
     48;       ES:BX:  Ptr to boot sector (if successful)
     49;       CF:     Cleared if read successful
    5050;               Set if any error
    5151;   Corrupts registers:
     
    7373;   Returns:
    7474;       AH:     INT 13h error code
    75 ;       CF:     Cleared if read successfull
     75;       CF:     Cleared if read successful
    7676;               Set if any error
    7777;   Corrupts registers:
     
    9696;       AH:     INT 13h error code
    9797;       ES:BX:  Ptr to boot sector
    98 ;       CF:     Cleared if read successfull
     98;       CF:     Cleared if read successful
    9999;               Set if any error
    100100;   Corrupts registers:
Note: See TracChangeset for help on using the changeset viewer.