Changeset 181 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
- Timestamp:
- Nov 13, 2011, 3:38:40 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r73 r181 1 ; File name : DialogProgress.asm2 1 ; Project name : Assembly Library 3 ; Created date : 15.8.20104 ; Last update : 10.12.20105 ; Author : Tomi Tilli6 2 ; Description : Displays progress bar dialog and starts progress task. 7 3 … … 41 37 lds si, [bp+DIALOG.fpDialogIO] 42 38 mov bx, [si+PROGRESS_DIALOG_IO.wMaxProgressValue] 43 MIN_U ax, bx 44 cmp ax, bx ; Make sure that last progress character is shown 45 je SHORT .UpdateProgressBar 46 39 cmp ax, bx 40 jb SHORT .AXlessThanBX 41 mov ax, bx 42 jmp SHORT .UpdateProgressBar 43 ALIGN JUMP_ALIGN 44 .AXlessThanBX: 47 45 mov bx, ax 48 46 sub bx, [si+PROGRESS_DIALOG_IO.wCurrentProgressValue] … … 172 170 ALIGN JUMP_ALIGN 173 171 DrawProgressBarFromDialogIoInDSSI: 174 call .GetFullCharsToCXandEmptyCharsToDXwithDialogIoInDSSI 175 176 mov al, PROGRESS_COMPLETE_CHARACTER 177 call .RepeatProgressCharacterCXtimesFromAL 178 179 mov cx, dx 180 mov al, PROGRESS_INCOMPLETE_CHARACTER 181 jmp SHORT .RepeatProgressCharacterCXtimesFromAL 182 183 ;-------------------------------------------------------------------- 184 ; .GetFullCharsToCXandEmptyCharsToDXwithDialogIoInDSSI 185 ; Parameters: 186 ; DS:SI: Ptr to PROGRESS_DIALOG_IO 187 ; SS:BP: Ptr to DIALOG 188 ; Returns: 189 ; CX: Number of full progress bar characters 190 ; DX: Number of empty progress bar characters 191 ; Corrupts: 192 ; AX, BX 193 ;-------------------------------------------------------------------- 194 ALIGN JUMP_ALIGN 195 .GetFullCharsToCXandEmptyCharsToDXwithDialogIoInDSSI: 172 ; Get full chars to CX and empty chars to DX 196 173 call MenuLocation_GetMaxTextLineLengthToAX 197 174 mov cx, ax … … 200 177 div bx 201 178 xchg cx, ax ; AX = Text line length, CX = Number of full chars 202 203 179 sub ax, cx 204 180 xchg dx, ax ; DX = Number of empty chars 205 ret 181 182 mov al, PROGRESS_COMPLETE_CHARACTER 183 call .RepeatProgressCharacterCXtimesFromAL 184 185 mov cx, dx 186 mov al, PROGRESS_INCOMPLETE_CHARACTER 187 ; Fall to .RepeatProgressCharacterCXtimesFromAL 206 188 207 189 ;-------------------------------------------------------------------- … … 239 221 ret 240 222 241 223 242 224 ;-------------------------------------------------------------------- 243 225 ; DrawTimeElapsedFromDX … … 286 268 287 269 sub cx, [si+PROGRESS_DIALOG_IO.wMinProgressValue] 288 j cxz.PreventDivisionByZero270 jz SHORT .PreventDivisionByZero 289 271 div cx ; AX = Estimated ticks left 290 272 xchg dx, ax 291 jmp SHORT FormatTicksFromDX273 SKIP2B f ; cmp ax, <next instruction> 292 274 .PreventDivisionByZero: 293 275 xor dx, dx
Note:
See TracChangeset
for help on using the changeset viewer.