Changeset 183 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src


Ignore:
Timestamp:
Nov 15, 2011, 4:35:14 AM (12 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.

Location:
trunk/XTIDE_Universal_BIOS/Src
Files:
2 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
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r181 r183  
    1515ORG 000h                        ; Code start offset 0000h
    1616
    17 
     17%define MENUEVENT_INLINE_OFFSETS    ; Only one menu required, save space and inline offsets
     18       
    1819    ; Included .inc files
    1920    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
     
    150151iend
    151152
    152 
    153153    ; Libraries and data
    154154    %include "AssemblyLibrary.asm"
     
    170170    %include "BootMenu.asm"         ; For Boot Menu operations
    171171    %include "BootMenuEvent.asm"    ; For menu library event handling
     172    %include "BootMenuPrint.asm"    ; For printing Boot Menu strings (needs to come after BootMenuEvent.asm)
    172173    %include "FloppyDrive.asm"      ; Floppy Drive related functions
    173174    %include "BootSector.asm"       ; For loading boot sector
    174175    %include "BootPrint.asm"        ; For printing boot information
    175     %include "BootMenuPrint.asm"    ; For printing Boot Menu strings
    176176    %include "BootMenuPrintCfg.asm" ; For printing hard disk configuration
    177177
Note: See TracChangeset for help on using the changeset viewer.