Changeset 44 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu


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.

Location:
trunk/Assembly_Library/Src/Menu
Files:
6 edited

Legend:

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

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   6.8.2010
    4 ; Last update   :   16.9.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Common functions for many dialogs.
     
    291291ALIGN JUMP_ALIGN
    292292.RedrawDialogAreaAndWholeParentWindow:
    293     mov     al, MONO_NORMAL
     293    mov     al, SCREEN_BACKGROUND_ATTRIBUTE
    294294    CALL_DISPLAY_LIBRARY SetCharacterAttributeFromAL
    295295    call    MenuLocation_GetTitleBordersTopLeftCoordinatesToAX
  • trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   6.9.2010
    4 ; Last update   :   16.9.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays file dialog.
     
    148148;       Nothing
    149149;   Corrupts registers:
    150 ;       AX, CX, SI, DI, DS, ES
     150;       AX, CX, DX, SI, DI, DS, ES
    151151;--------------------------------------------------------------------
    152152ALIGN JUMP_ALIGN
     
    171171;       Nothing
    172172;   Corrupts registers:
    173 ;       AX, CX, DI
     173;       AX, CX, DX, DI
    174174;--------------------------------------------------------------------
    175175;ALIGN JUMP_ALIGN
     
    225225;       DI:     Updated for next file
    226226;   Corrupts registers:
    227 ;       AX, BX, CX
     227;       AX, BX, CX, DX
    228228;--------------------------------------------------------------------
    229229ALIGN JUMP_ALIGN
     
    241241;       DI:     Updated for next file
    242242;   Corrupts registers:
    243 ;       AX, BX, CX
     243;       AX, BX, CX, DX
    244244;--------------------------------------------------------------------
    245245;ALIGN JUMP_ALIGN
     
    253253    xchg    ax, cx
    254254    CALL_DISPLAY_LIBRARY SetCharacterPointerFromBXAX
     255    mov     dl, ATTRIBUTES_NOT_USED
    255256    mov     ax, BUFFER_OUTPUT_WITH_CHAR_ONLY
    256     CALL_DISPLAY_LIBRARY SetCharacterOutputFunctionFromAX
     257    CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
    257258
    258259    call    .FormatFileOrDirectoryToBufferFromDTAinDSSI
  • trunk/Assembly_Library/Src/Menu/Dialog/StringsForDialogs.asm

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   14.9.2010
    4 ; Last update   :   16.9.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Strings used by dialogs.
     
    99g_szTimeElapsed:        db  "Time elapsed  :",NULL
    1010g_szTimeLeft:           db  "Estimated left:",NULL
    11 g_szTimeFormat:         db  " %2u min %2u sec",LF,CR,NULL
     11g_szTimeFormat:         db  " %2-u min %2-u sec",LF,CR,NULL
    1212
    1313; Strings for File Dialog
     
    2323
    2424g_szFileFormat:
    25     db      "%14S  %4u %c%cB",LF,NULL
     25    db      "%14S  %4-u %c%cB",LF,NULL
    2626g_szDirectoryFormat:
    2727    db      "[%12S]  %s-DIR",LF,NULL
  • trunk/Assembly_Library/Src/Menu/MenuBorders.asm

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   14.7.2010
    4 ; Last update   :   7.9.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for drawing menu borders.
     
    4545;       Nothing
    4646;   Corrupts registers:
    47 ;       AX, SI, DI
     47;       AX, DX, SI, DI
    4848;--------------------------------------------------------------------
    4949ALIGN JUMP_ALIGN
    5050MenuBorders_AdjustDisplayContextForDrawingBorders:
     51    mov     dl, ATTRIBUTES_ARE_USED
    5152    mov     ax, MenuCharOut_MenuBorderTeletypeOutputWithAttribute
    52     CALL_DISPLAY_LIBRARY SetCharacterOutputFunctionFromAX
     53    CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
    5354
    5455    mov     ax, bp
     
    268269    call    MenuAttribute_SetToDisplayContextFromTypeInSI
    269270
     271    push    dx
     272    mov     dl, ATTRIBUTES_ARE_USED
    270273    mov     ax, FAST_OUTPUT_WITH_ATTRIBUTE_ONLY
    271     CALL_DISPLAY_LIBRARY SetCharacterOutputFunctionFromAX
     274    CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
     275    pop     dx
    272276
    273277    call    PrintMultipleBorderCharactersFromAL ; AL does not matter
  • trunk/Assembly_Library/Src/Menu/MenuText.asm

    r41 r44  
    22; Project name  :   Assembly Library
    33; Created date  :   21.7.2010
    4 ; Last update   :   11.8.2010
     4; Last update   :   27.9.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for drawing menu texts by the user.
     
    218218;       Nothing
    219219;   Corrupts registers:
    220 ;       AX, SI, DI
     220;       AX, DX, SI, DI
    221221;--------------------------------------------------------------------
    222222ALIGN JUMP_ALIGN
    223223AdjustDisplayContextForDrawingTexts:
     224    mov     dl, ATTRIBUTES_ARE_USED
    224225    mov     ax, MenuCharOut_MenuTextTeletypeOutputWithAttribute
    225     CALL_DISPLAY_LIBRARY SetCharacterOutputFunctionFromAX
     226    CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInDL
    226227
    227228    mov     ax, bp
  • 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.