Changeset 583 in xtideuniversalbios for trunk/Assembly_Library


Ignore:
Timestamp:
Apr 23, 2015, 4:28:47 PM (9 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Changed BOOT_MENU_DEFAULT_TIMEOUT to reduce rounding error.
  • Minor optimizations and fixes, mostly to the menu library code.
Location:
trunk/Assembly_Library
Files:
7 edited

Legend:

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

    r245 r583  
    7777    .wKBPtrStart    resb    2       ; 0:480h, Keyboard, Pointer to start of buffer (XT+)
    7878    .wKBPtrEnd      resb    2       ; 0:482h, Keyboard, Pointer to end of buffer (XT+)
    79     .bVidRows       resb    1       ; 0:484h, Video, Number of rows (EGA+)
     79    .bVidRows       resb    1       ; 0:484h, Video, Number of rows minus one (EGA+)
    8080    .wVidPpC        resb    2       ; 0:485h, Video, Pixels per character (EGA+)
    8181    .bVidOptns      resb    1       ; 0:487h, Video, Options (EGA+)
  • trunk/Assembly_Library/Src/Display/CgaSnow.asm

    r526 r583  
    2929;               Cleared if CGA not detected
    3030;   Corrupts registers:
    31 ;       AX
     31;       Nothing
    3232;--------------------------------------------------------------------
    3333ALIGN DISPLAY_JUMP_ALIGN
     
    3737
    3838    ; All standard CGA modes use 25 rows but only EGA and later store it to BDA.
    39     cmp     BYTE [BDA.bVidRows], 25
    40     jge     SHORT .CgaNotFound
    41     stc
     39    cmp     BYTE [BDA.bVidRows], 25     ; *FIXME* Shouldn't this be 24 (rows - 1)?
     40    jae     SHORT .CgaNotFound
    4241    ret
    4342ALIGN DISPLAY_JUMP_ALIGN
  • trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm

    r526 r583  
    180180    CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
    181181    xchg    bx, ax
    182     mov     ah, [bp+MENUINIT.bTitleLines]
     182    mov     ah, MENU_VERTICAL_BORDER_LINES
     183    add     ah, [bp+MENUINIT.bTitleLines]
    183184    add     ah, [bp+MENUINIT.wItems]
    184185    add     ah, [bp+MENUINIT.bInfoLines]
    185     add     ah, BYTE MENU_VERTICAL_BORDER_LINES
    186186    cmp     ah, bh
    187187    jb      .AHlessThanBH
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r580 r583  
    135135ALIGN MENU_JUMP_ALIGN
    136136MenuBorders_GetNumberOfMiddleCharactersToDX:
    137     eMOVZX  dx, [bp+MENUINIT.bWidth]
    138     sub     dx, BYTE MENU_HORIZONTAL_BORDER_LINES
     137    mov     dx, -MENU_HORIZONTAL_BORDER_LINES & 0FFh
     138    add     dl, [bp+MENUINIT.bWidth]
    139139    ret
    140140
  • trunk/Assembly_Library/Src/Menu/MenuLocation.asm

    r526 r583  
    133133ALIGN MENU_JUMP_ALIGN
    134134MenuLocation_GetMaxTextLineLengthToAX:
    135     eMOVZX  ax, [bp+MENUINIT.bWidth]
    136     sub     ax, BYTE MENU_HORIZONTAL_BORDER_LINES + MENU_TEXT_COLUMN_OFFSET
     135    mov     ax, -(MENU_HORIZONTAL_BORDER_LINES + MENU_TEXT_COLUMN_OFFSET) & 0FFh
     136    add     al, [bp+MENUINIT.bWidth]
    137137    ret
  • trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm

    r568 r583  
    248248ALIGN MENU_JUMP_ALIGN
    249249MenuScrollbars_GetMaxVisibleItemsOnPageToCX:
    250     eMOVZX  cx, [bp+MENUINIT.bHeight]
     250    mov     cx, -MENU_VERTICAL_BORDER_LINES & 0FFh
     251    add     cl, [bp+MENUINIT.bHeight]
    251252    sub     cl, [bp+MENUINIT.bTitleLines]
    252253    sub     cl, [bp+MENUINIT.bInfoLines]
    253     sub     cl, MENU_VERTICAL_BORDER_LINES
    254     ret
     254    ret
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r526 r583  
    240240    cmp     cx, [bp+MENUINIT.wHighlightedItem]
    241241    jne     SHORT .ReturnAttributeTypeInSI
    242     sub     si, BYTE ATTRIBUTE_CHARS.cItem - ATTRIBUTE_CHARS.cHighlightedItem
     242    inc     si      ; SI = ATTRIBUTE_CHARS.cHighlightedItem
    243243ALIGN MENU_JUMP_ALIGN, ret
    244244.ReturnAttributeTypeInSI:
Note: See TracChangeset for help on using the changeset viewer.