Changeset 181 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm


Ignore:
Timestamp:
Nov 13, 2011, 3:38:40 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes to all parts of the project:

  • Size optimizations.
  • Added a define (EXCLUDE_FROM_XTIDECFG) to exclude unused library code from XTIDECFG.
  • Tried to minimize time spent with interrupts disabled.
  • Some minor attempts to improve speed (reordering instructions etc).
  • Tried to improve readability, did some cleanup and fixed some errors in comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r162 r181  
    127127    ret
    128128
     129
    129130;--------------------------------------------------------------------
    130131; .GetWidthBasedOnParentMenuToAL
     
    141142    mov     al, [ss:bx+MENUINIT.bWidth]
    142143    sub     al, DIALOG_DELTA_WIDTH_FROM_PARENT
    143     MIN_U   al, DIALOG_MAX_WIDTH
    144     ret
     144    cmp     al, DIALOG_MAX_WIDTH
     145    jb      .ALlessThanDIALOG_MAX_WIDTH
     146    mov     al, DIALOG_MAX_WIDTH
     147ALIGN JUMP_ALIGN, ret
     148.ALlessThanDIALOG_MAX_WIDTH:
     149    ret
     150
    145151
    146152;--------------------------------------------------------------------
     
    161167    add     ah, [bp+MENUINIT.bInfoLines]
    162168    add     ah, BYTE MENU_VERTICAL_BORDER_LINES
    163     MIN_U   ah, bh
    164     MIN_U   ah, DIALOG_MAX_HEIGHT
     169    cmp     ah, bh
     170    jb      .AHlessThanBH
     171    xchg    bx, ax
     172ALIGN JUMP_ALIGN
     173.AHlessThanBH:
     174    cmp     ah, DIALOG_MAX_HEIGHT
     175    jb      .AHlessThanDIALOG_MAX_HEIGHT
     176    mov     ah, DIALOG_MAX_HEIGHT
     177ALIGN JUMP_ALIGN, ret
     178.AHlessThanDIALOG_MAX_HEIGHT:
    165179    ret
    166180
Note: See TracChangeset for help on using the changeset viewer.