Changeset 44 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/MenuTime.asm


Ignore:
Timestamp:
Sep 27, 2010, 7:23:36 PM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Spaces can now be generated before format specifier when printing formatted string.
Background character and attribute can now be easily specified before compiling.

File:
1 edited

Legend:

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

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   25.7.2010
    4 ; Last update   :   13.8.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Menu timeouts other time related functions.
     
    141141;       Nothing
    142142;   Corrupts registers:
    143 ;       AX, DX, SI, DI
     143;       AX, CX, DX, SI, DI
    144144;--------------------------------------------------------------------
    145145ALIGN JUMP_ALIGN
    146146DrawTimeoutInAXoverMenuBorders:
    147     xchg    dx, ax
     147    xchg    cx, ax
    148148    call    MenuBorders_AdjustDisplayContextForDrawingBorders
    149149    call    MenuLocation_GetBottomBordersTopLeftCoordinatesToAX
     
    154154; .PrintTimeoutStringWithSecondsInDX
    155155;   Parameters
    156 ;       DX:     Seconds to print
     156;       CX:     Seconds to print
    157157;       SS:BP:  Ptr to MENU
    158158;   Returns:
     
    166166
    167167    mov     bp, sp
    168     call    .GetTimeoutAttributeToAXfromSecondsInDX
     168    call    .GetTimeoutAttributeToAXfromSecondsInCX
    169169    mov     si, .szSelectionTimeout
    170170    push    ax          ; Push attribute
    171     push    dx          ; Push seconds
     171    push    cx          ; Push seconds
    172172    CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
    173173    pop     bp
     
    178178    db      DOUBLE_BOTTOM_LEFT_CORNER
    179179    db      DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL
    180     db      "%AAutoselection in %2ds",NULL
    181 
    182 ;--------------------------------------------------------------------
    183 ; .GetTimeoutAttributeToAXfromSecondsInDX
    184 ;   Parameters
    185 ;       DX:     Seconds to print
     180    db      "%AAutoselection in %2-ds",NULL
     181
     182;--------------------------------------------------------------------
     183; .GetTimeoutAttributeToAXfromSecondsInCX
     184;   Parameters
     185;       CX:     Seconds to print
    186186;   Returns:
    187187;       AX:     Attribute byte for seconds
    188 ;       DX:     Seconds to print
     188;       CX:     Seconds to print
    189189;   Corrupts registers:
    190190;       SI, DI
    191191;--------------------------------------------------------------------
    192192ALIGN JUMP_ALIGN
    193 .GetTimeoutAttributeToAXfromSecondsInDX:
     193.GetTimeoutAttributeToAXfromSecondsInCX:
    194194    mov     si, ATTRIBUTE_CHARS.cNormalTimeout
    195     cmp     dx, BYTE 3
     195    cmp     cx, BYTE 3
    196196    ja      SHORT .GetAttributeToAX
    197197    add     si, BYTE ATTRIBUTE_CHARS.cHurryTimeout - ATTRIBUTE_CHARS.cNormalTimeout
Note: See TracChangeset for help on using the changeset viewer.