Changeset 492 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Dec 21, 2012, 1:01:55 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Removed the dependency between MODULE_BOOT_MENU and MODULE_HOTKEYS. With these changes, 0, 1, or 2 of them can be included in a build. This change also means that the hotkeys don't work while the menu is up. But the most important hotkey there was for Rom Boot, and that has been added to the menu as a choice proper. Lots of changes across the board in the hotkeys code - even if we eventually back this change out (becaue, for example we want hotkeys to work in the menu) we should probably start from this base and add that functionality back in, as these changes results in approximately 120 bytes of savings and includes new functionality, such as the Rom Boot menu item and the Com Detect hotkey.

Location:
trunk/Assembly_Library
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/MenuEvents.inc

    r198 r492  
    5050    ;   DS:SI:      Ptr to initialized MENUINIT struct
    5151    .InitializeMenuinitFromDSSI     resb    2
    52 %define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI
     52MENUEVENT_InitializeMenuinitFromDSSI    equ     MENUEVENT.InitializeMenuinitFromDSSI
    5353
    5454    ; Parameters:
     
    5858    ;               Clear to cancel exit
    5959    .ExitMenu                       resb    2
    60 %define MENUEVENT_ExitMenu MENUEVENT.ExitMenu
     60MENUEVENT_ExitMenu                  equ     MENUEVENT.ExitMenu
    6161
    6262%ifdef MENUEVENT_IDLEPROCESSING_ENABLE
     
    6565    ; See the definition of MENUEVENT_IDLEPROCESSING_ENABLE below.
    6666    .IdleProcessing                 resb    2
    67 %define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing
     67MENUEVENT_IdleProcessing            equ     MENUEVENT.IdleProcessing
    6868%endif
    6969
     
    7272    ;   DX:         Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
    7373    .ItemHighlightedFromCX          resb    2
    74 %define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX
     74MENUEVENT_ItemHighlightedFromCX     equ     MENUEVENT.ItemHighlightedFromCX
    7575
    7676    ; Parameters:
    7777    ;   CX:         Index of selected item
    7878    .ItemSelectedFromCX             resb    2
    79 %define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX
     79MENUEVENT_ItemSelectedFromCX        equ     MENUEVENT.ItemSelectedFromCX
    8080
    8181    ; Parameters:
     
    8383    ;   AH:         Keyboard library scan code for the key
    8484    .KeyStrokeInAX                  resb    2
    85 %define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX
     85MENUEVENT_KeyStrokeInAX             equ     MENUEVENT.KeyStrokeInAX
    8686
    8787    ; Parameters:
     
    9090    .RefreshTitle                   resb    2
    9191    .RefreshInformation             resb    2
    92 %define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle
    93 %define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation
     92MENUEVENT_RefreshTitle              equ     MENUEVENT.RefreshTitle
     93MENUEVENT_RefreshInformation        equ     MENUEVENT.RefreshInformation
    9494
    9595    ; Parameters:
     
    9797    ;   Cursor has been positioned to the beginning of item line
    9898    .RefreshItemFromCX              resb    2
    99 %define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX
     99MENUEVENT_RefreshItemFromCX         equ     MENUEVENT.RefreshItemFromCX
    100100endstruc
    101101
  • trunk/Assembly_Library/Src/Display/DisplayPage.asm

    r376 r492  
    4141
    4242
     43%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     44    %define EXCLUDE
     45    %ifdef MODULE_HOTKEYS
     46        %undef EXCLUDE
     47    %endif
     48    %ifdef MODULE_BOOT_MENU
     49        %undef EXCLUDE
     50    %endif
     51%endif
     52
     53%ifndef EXCLUDE     
    4354;--------------------------------------------------------------------
    4455; DisplayPage_GetColumnsToALandRowsToAH
     
    5667    mov     ah, 25                          ; Always 25 rows on standard text modes
    5768    ret
    58 
     69%endif
     70%undef EXCLUDE     
    5971
    6072;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Display/DisplayPrint.asm

    r491 r492  
    296296%endif
    297297
    298 
     298%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     299    %define EXCLUDE
     300    %ifdef MODULE_HOTKEYS
     301        %undef EXCLUDE
     302    %endif
     303    %ifdef MODULE_BOOT_MENU
     304        %undef EXCLUDE
     305    %endif
     306%endif
     307
     308%ifndef EXCLUDE             
    299309;--------------------------------------------------------------------
    300310; DisplayPrint_RepeatCharacterFromALwithCountInCX
     
    324334.NothingToRepeat:
    325335    ret
    326 
     336%endif
     337%undef EXCLUDE
    327338
    328339;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Keyboard/Keyboard.asm

    r407 r492  
    289289;       Nothing
    290290;--------------------------------------------------------------------
     291
     292%ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
     293    %define EXCLUDE
     294    %ifdef MODULE_HOTKEYS
     295        %undef EXCLUDE
     296    %endif
     297    %ifdef MODULE_BOOT_MENU
     298        %undef EXCLUDE
     299    %endif
     300%endif
     301       
     302%ifndef EXCLUDE
     303
    291304ALIGN KEYBOARD_JUMP_ALIGN
    292305Keyboard_GetKeystrokeToAXandLeaveItToBuffer:
     
    294307    int     BIOS_KEYBOARD_INTERRUPT_16h
    295308    ret
     309       
    296310ALIGN KEYBOARD_JUMP_ALIGN
    297311Keyboard_GetKeystrokeToAX:
     
    306320Keyboard_GetKeystrokeToAXReturn:
    307321    ret
     322       
     323%endif
     324%undef EXCLUDE
  • trunk/Assembly_Library/Src/Menu/MenuEvent.asm

    r376 r492  
    5252;       AX, BX, DX
    5353;--------------------------------------------------------------------
     54%ifndef MENU_NO_ESC
    5455ALIGN MENU_JUMP_ALIGN
    5556MenuEvent_ExitMenu:
    5657    mov     bl, MENUEVENT_ExitMenu
    5758    jmp     SHORT MenuEvent_SendFromBX
    58 
     59%endif
     60       
    5961
    6062%ifdef MENUEVENT_IDLEPROCESSING_ENABLE
     
    153155;       AX, BX, DX
    154156;--------------------------------------------------------------------
     157%ifdef MENUEVENT_KeyStrokInAX
    155158ALIGN MENU_JUMP_ALIGN
    156159MenuEvent_KeyStrokeInAX:
    157160    mov     bl, MENUEVENT_KeyStrokeInAX
    158161    SKIP2B  dx  ; mov dx, <next instruction>
    159 
     162%endif
    160163
    161164;--------------------------------------------------------------------
  • trunk/Assembly_Library/Src/Menu/MenuLoop.asm

    r376 r492  
    8585    xchg    ax, cx
    8686    call    .ProcessMenuSystemKeystrokeFromAX
     87%ifdef MENUEVENT_KeyStrokeInAX
    8788    jc      SHORT NoKeystrokeToProcess
    8889    jmp     MenuEvent_KeyStrokeInAX
    89 
     90%else
     91    jmp     SHORT NoKeystrokeToProcess
     92%endif
     93       
    9094;--------------------------------------------------------------------
    9195; .ProcessMenuSystemKeystrokeFromAX
     
    104108ALIGN MENU_JUMP_ALIGN
    105109.ProcessMenuSystemKeystrokeFromAX:
     110%ifndef MENU_NO_ESC
    106111    cmp     al, ESC
    107112    je      SHORT .LeaveMenuWithoutSelectingItem
     113%endif
    108114    cmp     al, CR
    109115    je      SHORT .SelectItem
     
    113119    ret     ; Return with CF cleared since keystroke not processed
    114120
     121%ifndef MENU_NO_ESC     
    115122ALIGN MENU_JUMP_ALIGN
    116123.LeaveMenuWithoutSelectingItem:
     
    122129    stc
    123130    ret
    124 
     131%endif
     132       
    125133ALIGN MENU_JUMP_ALIGN
    126134.SelectItem:
Note: See TracChangeset for help on using the changeset viewer.