Changeset 62 in xtideuniversalbios for trunk/Assembly_Library/Src
- Timestamp:
- Nov 30, 2010, 8:06:44 AM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library/Src/Menu
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r60 r62 2 2 ; Project name : Assembly Library 3 3 ; Created date : 14.7.2010 4 ; Last update : 25.11.20104 ; Last update : 30.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for drawing menu borders. … … 34 34 call RefreshInformationBorders 35 35 call DrawBottomBorderLine 36 call DrawTimeoutCounterOverBottomBorderLine37 36 jmp DrawBottomShadowLine 38 37 … … 53 52 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 54 53 call GetNumberOfMiddleCharactersToDX 55 jmp DrawBottomBorderLine 56 57 58 ;-------------------------------------------------------------------- 59 ; MenuBorders_RedrawTimeoutValue 60 ; Parameters 61 ; SS:BP: Ptr to MENU 62 ; Returns: 63 ; Nothing 64 ; Corrupts registers: 65 ; AX, BX, SI, DI 66 ;-------------------------------------------------------------------- 67 ALIGN JUMP_ALIGN 68 MenuBorders_RedrawTimeoutValue: 69 call MenuBorders_AdjustDisplayContextForDrawingBorders 70 call MenuLocation_GetBottomBordersTopLeftCoordinatesToAX 71 inc ah ; Increment for shadow border 72 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 73 jmp DrawTimeoutCounterOverBottomBorderLine 54 jmp SHORT DrawBottomBorderLine 74 55 75 56 … … 235 216 DrawBottomBorderLine: 236 217 mov si, g_rgbBottomBorderCharacters 237 jmp SHORT PrintBorderCharactersFromCSSIandShadowCharacter238 239 ALIGN JUMP_ALIGN240 DrawTimeoutCounterOverBottomBorderLine:241 218 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN 242 jz SHORT .NoNeedToDrawSinceTimeoutDisabled243 mov ax, (-1)<<8 ; Decrement row 244 call MenuLocation_MoveCursorByALcolumnsAndAHrows245 call MenuTime_GetTimeoutSecondsLeftToAX246 call PrintTimeoutStringWithSecondsInAX247 jmp SHORT PrintNewlineToEndBorderLine248 .NoNeedToDrawSinceTimeoutDisabled: 219 jz SHORT PrintBorderCharactersFromCSSIandShadowCharacter 220 221 call DrawTimeoutCounterString 222 sub dx, BYTE MENU_TIMEOUT_STRING_CHARACTERS 223 mov si, g_BottomBorderWithTimeoutCharacters 224 call PrintBorderCharactersFromCSSIandShadowCharacter 225 add dx, BYTE MENU_TIMEOUT_STRING_CHARACTERS 249 226 ret 250 227 … … 382 359 383 360 ;-------------------------------------------------------------------- 384 ; PrintTimeoutStringWithSecondsInAX 361 ; DrawTimeoutCounterString 362 ; Parameters 363 ; SS:BP: Ptr to MENU 364 ; Returns: 365 ; Nothing 366 ; Corrupts registers: 367 ; AX, SI, DI 368 ;-------------------------------------------------------------------- 369 ALIGN JUMP_ALIGN 370 DrawTimeoutCounterString: 371 call MenuTime_GetTimeoutSecondsLeftToAX 372 ; Fall to .PrintTimeoutStringWithSecondsInAX 373 374 ;-------------------------------------------------------------------- 375 ; .PrintTimeoutStringWithSecondsInAX 385 376 ; Parameters 386 377 ; AX: Seconds to print … … 391 382 ; AX, SI, DI 392 383 ;-------------------------------------------------------------------- 393 ALIGN JUMP_ALIGN394 PrintTimeoutStringWithSecondsInAX:384 ;ALIGN JUMP_ALIGN 385 .PrintTimeoutStringWithSecondsInAX: 395 386 push bp 396 387 … … 403 394 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 404 395 pop bp 405 406 ; Draw right border with normal border color 407 mov al, DOUBLE_RIGHT_HORIZONTAL_TO_SINGLE_VERTICAL 408 jmp MenuBorders_PrintSingleBorderCharacterFromAL 396 ret 409 397 .szSelectionTimeout: 410 398 db DOUBLE_BOTTOM_LEFT_CORNER … … 424 412 .GetTimeoutAttributeToAXfromSecondsInDI: 425 413 mov si, ATTRIBUTE_CHARS.cNormalTimeout 426 cmp di, BYTE 3414 cmp di, BYTE MENU_TIMEOUT_SECONDS_FOR_HURRY 427 415 eCMOVB si, ATTRIBUTE_CHARS.cHurryTimeout 428 416 jmp MenuAttribute_GetToAXfromTypeInSI … … 451 439 iend 452 440 441 g_BottomBorderWithTimeoutCharacters: 442 istruc BORDER_CHARS 443 at BORDER_CHARS.cLeft, db DOUBLE_RIGHT_HORIZONTAL_TO_SINGLE_VERTICAL 444 at BORDER_CHARS.cMiddle, db DOUBLE_HORIZONTAL 445 at BORDER_CHARS.cRight, db DOUBLE_BOTTOM_RIGHT_CORNER 446 iend 447 453 448 g_rgbTextBorderCharacters: 454 449 istruc BORDER_CHARS -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r60 r62 2 2 ; Project name : Assembly Library 3 3 ; Created date : 25.7.2010 4 ; Last update : 25.11.20104 ; Last update : 30.11.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu timeouts other time related functions. … … 75 75 ALIGN JUMP_ALIGN 76 76 .RedrawSinceNoTimeout: 77 call MenuBorders_Redraw TimeoutValue77 call MenuBorders_RedrawBottomBorderLine 78 78 clc 79 79 ALIGN JUMP_ALIGN … … 100 100 call PointDSBXtoTimeoutCounter 101 101 call TimerTicks_GetTimeoutTicksLeftToAXfromDSBX 102 jc SHORT .TimeoutHasOccurred 102 jc SHORT .TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero 103 103 104 104 xchg dx, ax 105 105 call TimerTicks_GetSecondsToAXfromTicksInDX 106 clc107 106 jmp SHORT .PopRegistersAndReturn 108 .TimeoutHasOccurred :107 .TimeoutHasOccurredSoMakeSureTicksAreNotBelowZero: 109 108 xor ax, ax 110 stc111 109 .PopRegistersAndReturn: 112 110 pop bx
Note:
See TracChangeset
for help on using the changeset viewer.