Changeset 505 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm


Ignore:
Timestamp:
Feb 25, 2013, 4:23:09 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Reverted the changes to MenuEvents.inc done in r492 since they broke the F1 key function in XTIDECFG.
  • Added a tail-call optimized variant of the CALL_DISPLAY_LIBRARY macro (JMP_DISPLAY_LIBRARY).
  • Put a block size limit in AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL. I think it's needed but if not, it's easy to remove.
  • Other optimizations and fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm

    r500 r505  
    3434    call    HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars
    3535    ; Fall to HotkeyBar_DrawToTopOfScreen
    36        
    37        
     36
     37
    3838;--------------------------------------------------------------------
    3939; HotkeyBar_DrawToTopOfScreen
     
    127127    call    FormatFunctionHotkeyString
    128128%endif
    129     ; Fall to .PrintRomBootHotkey       
     129    ; Fall to .PrintRomBootHotkey
    130130
    131131;--------------------------------------------------------------------
     
    169169;--------------------------------------------------------------------
    170170HotkeyBar_ClearRestOfTopRow:
    171     CALL_DISPLAY_LIBRARY    GetColumnsToALandRowsToAH
     171    CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
    172172    eMOVZX  cx, al
    173     CALL_DISPLAY_LIBRARY    GetSoftwareCoordinatesToAX
     173    CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX
    174174    sub     cl, al
    175175    mov     al, ' '
    176     CALL_DISPLAY_LIBRARY    PrintRepeatedCharacterFromALwithCountInCX
    177     ret
     176    JMP_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
    178177
    179178
     
    216215
    217216    mov     si, ATTRIBUTE_CHARS.cHurryTimeout       ; Selected hotkey
    218     jz      SHORT GetDescriptionAttributeToDX       ; From compare with bScancode above
     217    je      SHORT GetDescriptionAttributeToDX       ; From compare with bScancode above
    219218
    220219GetNonSelectedHotkeyDescriptionAttributeToDX:
     
    226225    call    MenuAttribute_GetToAXfromTypeInSI
    227226    xchg    dx, ax                  ; DX = Description attribute
    228     ;;  fall through to PushHotkeyParamsAndFormat 
     227    ;;  fall through to PushHotkeyParamsAndFormat
    229228
    230229
     
    232231
    233232    mov     dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK
    234     jz      SHORT SelectAttributeFromDHorDLbasedOnVideoMode         ; From compare with bScancode above
     233    je      SHORT SelectAttributeFromDHorDLbasedOnVideoMode     ; From compare with bScancode above
    235234
    236235GetNonSelectedHotkeyDescriptionAttributeToDX:
     
    245244    mov     dl, dh
    246245.AttributeLoadedToDL:
    247     ;;  fall through to PushHotkeyParamsAndFormat       
     246    ;;  fall through to PushHotkeyParamsAndFormat
    248247
    249248%endif ; MODULE_BOOT_MENU
     
    277276    push    di              ; Description string
    278277    push    cx              ; Description string parameter
    279        
     278
    280279    push    si              ; Key attribute for last space
    281280
     
    308307;--------------------------------------------------------------------
    309308HotkeyBar_RestoreCursorCoordinatesFromAX:
    310     CALL_DISPLAY_LIBRARY    SetCursorCoordinatesFromAX
    311     ret
     309    JMP_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
    312310
    313311
     
    325323HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL:
    326324    eMOVZX  ax, dl
    327     xor     al, 32  ; Upper case drive letter to lower case keystroke
     325    or      al, 32  ; Upper case drive letter to lower case keystroke
    328326    jmp     SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX
    329327
     
    364362    ; All scancodes are saved, even if it wasn't a drive letter,
    365363    ; which also covers our function key case.  Invalid function keys
    366     ; will not do anything (won't be printed, won't be accepted as input)       
     364    ; will not do anything (won't be printed, won't be accepted as input)
    367365    mov     [es:di], ah
    368        
     366
    369367    ; Drive letter hotkeys remaining, allow 'a' to 'z'
    370368    call    Char_IsLowerCaseLetterInAL
    371369    jnc     SHORT .KeystrokeIsNotValidDriveLetter
    372     xor     al, 32                  ; We want to print upper case letters
     370    and     al, ~32                 ; We want to print upper case letters
    373371
    374372    ; Clear HD First flag to assume Floppy Drive hotkey
     
    377375
    378376    ; Determine if Floppy or Hard Drive hotkey
    379     eMOVZX  cx, al                  ; Clear CH to clear scancode
     377    xchg    cx, ax
    380378    call    DriveXlate_GetLetterForFirstHardDriveToAX
    381379    cmp     cl, al
     
    386384
    387385.StoreDriveLetter:
    388     sbb     di, BYTE 1          ; Sub CF if Floppy Drive
     386    sbb     di, BYTE 1              ; Sub CF if Floppy Drive
    389387    xchg    ax, cx
    390     mov     [es:di], al         ; AH = zero to clear function hotkey
    391 
    392 .KeystrokeIsNotValidDriveLetter:       
     388    mov     [es:di], al
     389
     390.KeystrokeIsNotValidDriveLetter:
    393391NoHotkeyToProcess:
    394392    mov     al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode]
     
    407405HotkeyBar_GetBootDriveNumbersToDX:
    408406    mov     dx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters]
    409     test    BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST       
     407    test    BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST
    410408    jnz     .noflip
    411409    xchg    dl, dh
    412 .noflip:   
     410.noflip:
    413411    call    DriveXlate_ConvertDriveLetterInDLtoDriveNumber
    414412    xchg    dl, dh
    415     ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber       
    416        
    417 HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber:     
    418 
     413    ; Fall to HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber
     414
     415HotkeyBar_FallThroughTo_DriveXlate_ConvertDriveLetterInDLtoDriveNumber:
     416
Note: See TracChangeset for help on using the changeset viewer.