Changeset 183 in xtideuniversalbios for trunk/Assembly_Library/Inc


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.

File:
1 edited

Legend:

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

    r58 r183  
    1919;       All
    2020;--------------------------------------------------------------------
     21
     22;
     23; There are two ways to use MENUEVENT:
     24;
     25; 1. If the program needs two different menus, include the definition of the MENUEVENT structure below,
     26;    instantiate with members that point to the routines that make up the menu.
     27;
     28; 2. If the program needs only one menu, %define MENUEVENT_INLINE_OFFSETS before this include file,
     29;    and define (through EQU statements) each of the entry points as offsets from a base address. 
     30;    Entry points must be within 256 bytes of the base (only a byte is used to pass the offset).
     31;
     32
     33%ifndef MENUEVENT_INLINE_OFFSETS
     34
    2135struc MENUEVENT
    2236    ; Parameters:
     
    2539    ;   DS:SI:      Ptr to initialized MENUINIT struct
    2640    .InitializeMenuinitFromDSSI     resb    2
     41%define MENUEVENT_InitializeMenuinitFromDSSI MENUEVENT.InitializeMenuinitFromDSSI
    2742
    2843    ; Parameters:
     
    3247    ;               Clear to cancel exit
    3348    .ExitMenu                       resb    2
     49%define MENUEVENT_ExitMenu MENUEVENT.ExitMenu
    3450
    3551    ; Parameters:
    3652    ;   None
    3753    .IdleProcessing                 resb    2
     54%define MENUEVENT_IdleProcessing MENUEVENT.IdleProcessing
    3855
    3956    ; Parameters:
     
    4158    ;   DX:         Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
    4259    .ItemHighlightedFromCX          resb    2
     60%define MENUEVENT_ItemHighlightedFromCX MENUEVENT.ItemHighlightedFromCX
    4361
    4462    ; Parameters:
    4563    ;   CX:         Index of selected item
    4664    .ItemSelectedFromCX             resb    2
     65%define MENUEVENT_ItemSelectedFromCX MENUEVENT.ItemSelectedFromCX
    4766
    4867    ; Parameters:
     
    5069    ;   AH:         Keyboard library scan code for the key
    5170    .KeyStrokeInAX                  resb    2
     71%define MENUEVENT_KeyStrokeInAX MENUEVENT.KeyStrokeInAX
    5272
    5373    ; Parameters:
     
    5676    .RefreshTitle                   resb    2
    5777    .RefreshInformation             resb    2
     78%define MENUEVENT_RefreshTitle MENUEVENT.RefreshTitle
     79%define MENUEVENT_RefreshInformation MENUEVENT.RefreshInformation
    5880
    5981    ; Parameters:
     
    6183    ;   Cursor has been positioned to the beginning of item line
    6284    .RefreshItemFromCX              resb    2
     85%define MENUEVENT_RefreshItemFromCX MENUEVENT.RefreshItemFromCX
    6386endstruc
    6487
     88%endif ; MENUEVENTS_INLINE_OFFSETS
    6589
    6690%endif ; MENUEVENTS_INC
Note: See TracChangeset for help on using the changeset viewer.