Changeset 69 in xtideuniversalbios for trunk/Assembly_Library/Src


Ignore:
Timestamp:
Dec 10, 2010, 8:17:22 AM (14 years ago)
Author:
Tomi Tilli
google:author:
aitotat
Message:

Changes to Assembly Library:

  • Progress Bar now displays properly.
File:
1 edited

Legend:

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

    r64 r69  
    22; Project name  :   Assembly Library
    33; Created date  :   15.8.2010
    4 ; Last update   :   5.12.2010
     4; Last update   :   10.12.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Displays progress bar dialog and starts progress task.
     
    8383    call    TimerTicks_ReadFromBdaToAX
    8484    mov     [si+PROGRESS_DIALOG_IO.wStartTimeTicks], ax
    85     MAX_U   WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], 0FFFFh  ; Max cannot be zero
     85    MAX_U   WORD [si+PROGRESS_DIALOG_IO.wMaxProgressValue], 1   ; Max cannot be zero
    8686    jmp     SHORT CalculateProgressNeededBeforeUpdatingCharacter
    8787
     
    169169DrawProgressBarFromDialogIoInDSSI:
    170170    call    .GetFullCharsToCXandEmptyCharsToDXwithDialogIoInDSSI
    171     jcxz    .DrawEmptyCharsOnly
    172171
    173172    mov     al, PROGRESS_COMPLETE_CHARACTER
    174     CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
    175 
    176 .DrawEmptyCharsOnly:
     173    call    .RepeatProgressCharacterCXtimesFromAL
     174
    177175    mov     cx, dx
    178     jcxz    .NothingLeftToDraw
    179176    mov     al, PROGRESS_INCOMPLETE_CHARACTER
    180     CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
    181 
    182 .NothingLeftToDraw:
    183     ret
     177    jmp     SHORT .RepeatProgressCharacterCXtimesFromAL
    184178
    185179;--------------------------------------------------------------------
     
    205199    sub     ax, cx
    206200    xchg    dx, ax      ; DX = Number of empty chars
     201    ret
     202
     203;--------------------------------------------------------------------
     204; .RepeatProgressCharacterCXtimesFromAL
     205;   Parameters:
     206;       AL:     Progress bar character to repeat
     207;       CX:     Number of times to repeat the progress character
     208;   Returns:
     209;       Nothing
     210;   Corrupts:
     211;       AX, CX, DI
     212;--------------------------------------------------------------------
     213ALIGN JUMP_ALIGN
     214.RepeatProgressCharacterCXtimesFromAL:
     215    jcxz    .NothingToRepeat
     216    CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX
     217ALIGN JUMP_ALIGN, ret
     218.NothingToRepeat:
    207219    ret
    208220
Note: See TracChangeset for help on using the changeset viewer.