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


Ignore:
Timestamp:
Nov 15, 2011, 4:35:14 AM (13 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Space optimization, added option to inline offsets for MENUEVENT structure, for situations (such as the XTIDE bios) where only one menu is needed. Ifdef'd change (set in main.asm) so either method can be used.

File:
1 edited

Legend:

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

    r140 r183  
    2424ALIGN JUMP_ALIGN
    2525BootMenuEvent_Handler:
     26       
     27%ifdef MENUEVENT_INLINE_OFFSETS
     28       
     29    add     bx, BootMenuEvent_Handler
     30    jmp     bx
     31       
     32%else
     33       
    2634    cmp     bx, BYTE MENUEVENT.RefreshItemFromCX    ; Above last supported item?
    2735    ja      SHORT .EventNotHandled
    2836    jmp     [cs:bx+.rgfnEventSpecificHandlers]
     37       
     38%endif
     39       
    2940.EventNotHandled:
    3041    clc
    3142    ret
    3243
     44%ifdef MENUEVENT_INLINE_OFFSETS
     45       
     46MENUEVENT_InitializeMenuinitFromDSSI equ  (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler)
     47MENUEVENT_ExitMenu equ  (BootMenuEvent_Handler.EventCompleted - BootMenuEvent_Handler)
     48MENUEVENT_IdleProcessing equ (BootMenuEvent_Handler.EventNotHandled - BootMenuEvent_Handler)
     49MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler)
     50MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler)
     51MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler)
     52MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler)
     53MENUEVENT_RefreshInformation equ (BootMenuEvent_Handler.RefreshInformation - BootMenuEvent_Handler)
     54MENUEVENT_RefreshItemFromCX equ (BootMenuEvent_Handler.RefreshItemFromCX - BootMenuEvent_Handler)
     55
     56%else
     57       
    3358ALIGN WORD_ALIGN
    3459.rgfnEventSpecificHandlers:
     
    4267    dw      .RefreshInformation         ; MENUEVENT.RefreshInformation
    4368    dw      .RefreshItemFromCX          ; MENUEVENT.RefreshItemFromCX
     69       
     70%endif
    4471
    4572
Note: See TracChangeset for help on using the changeset viewer.