Changeset 293 in xtideuniversalbios for trunk/Configurator/Src/Libraries/menu/menuloop.asm


Ignore:
Timestamp:
Mar 4, 2012, 1:33:52 AM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Commit 1/2 (Library, Configurators and Serial Server):

  • Changed Emulate.inc so that making 286 and 386 versions now works. Additionally, only one processor type define is needed in the makefile.
  • Minor optimizations.
  • Fixed spelling and did some cleaning.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Configurator/Src/Libraries/menu/menuloop.asm

    r9 r293  
    1 ; File name     :   menuloop.asm
    21; Project name  :   Menu library
    3 ; Created date  :   11.11.2009
    4 ; Last update   :   25.5.2010
    5 ; Author        :   Tomi Tilli
    6 ; Description   :   ASM library to menu system.
     2; Description   :   ASM library for menu system.
    73;                   Contains event dispatching loop.
    84
     
    143139
    144140    ; Jump to process menu key
    145     mov     di, CNT_MENU_KEYS-1 ; Convert CX... 
     141    mov     di, CNT_MENU_KEYS-1 ; Convert CX...
    146142    sub     di, cx              ; ...to lookup index
    147143    shl     di, 1               ; Prepare for word lookup
     
    186182    jnz     .TextScrollUp                   ;  If so, go to text scrolling
    187183%endif
    188     mov     ax, [bp+MENUVARS.wItemSel]      ; Load selected index 
     184    mov     ax, [bp+MENUVARS.wItemSel]      ; Load selected index
    189185    test    ax, ax                          ; Already at top?
    190186    jz      .KeyEnd                         ;  If so, go to end
     
    222218    je      .KeyHome                        ;  If so, go to beginning
    223219    mov     [bp+MENUVARS.wItemSel], ax      ; Store new menuitem index
    224     eMOVZX  bx, BYTE [bp+MENUVARS.bVisCnt]  ; Load number of visible items
     220    eMOVZX  bx, [bp+MENUVARS.bVisCnt]       ; Load number of visible items
    225221    add     bx, [bp+MENUVARS.wItemTop]      ; BX to one past last visible index
    226222    cmp     ax, bx                          ; Need to scroll?
     
    235231ALIGN JUMP_ALIGN
    236232.TextScrollDown:
    237     eMOVZX  ax, BYTE [bp+MENUVARS.bVisCnt]  ; Load visible items
     233    eMOVZX  ax, [bp+MENUVARS.bVisCnt]       ; Load visible items
    238234    add     ax, [bp+MENUVARS.wItemTop]      ; Add topmost menuitem index
    239235    cmp     ax, [bp+MENUVARS.wItemCnt]      ; Already at the bottom?
     
    261257    sbb     bh, 0
    262258    mov     [bp+MENUVARS.wItemTop], bx      ; Store first menuitem to draw
    263     jnc     .ScrollMenu 
     259    jnc     .ScrollMenu
    264260    mov     WORD [bp+MENUVARS.wItemTop], 0  ; Overflow, start with 0
    265261    jmp     .ScrollMenu
     
    284280    inc     ax                              ; Increment page
    285281    mul     BYTE [bp+MENUVARS.bVisCnt]      ; AX=First menuitem on page
    286     eMOVZX  bx, BYTE [bp+MENUVARS.bVisCnt]  ; Load number of visible items
     282    eMOVZX  bx, [bp+MENUVARS.bVisCnt]       ; Load number of visible items
    287283    add     bx, ax                          ; BX now one past last visible
    288284    cmp     bx, [bp+MENUVARS.wItemCnt]      ; Went over last?
     
    331327    dw      .KeyEnd     ; KEY_END
    332328; Scan code to jump index translation table
    333 .rgbKeyToIdx:   
     329.rgbKeyToIdx:
    334330    db  KEY_ENTER,  KEY_ESC,    KEY_UP,     KEY_DOWN,
    335331    db  KEY_PGUP,   KEY_PGDN,   KEY_HOME,   KEY_END
Note: See TracChangeset for help on using the changeset viewer.