Changeset 45 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu
- Timestamp:
- Sep 29, 2010, 5:59:07 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library/Src/Menu
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r44 r45 2 2 ; Project name : Assembly Library 3 3 ; Created date : 6.9.2010 4 ; Last update : 2 7.9.20104 ; Last update : 28.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays file dialog. … … 253 253 xchg ax, cx 254 254 CALL_DISPLAY_LIBRARY SetCharacterPointerFromBXAX 255 mov dl, ATTRIBUTES_NOT_USED255 mov bl, ATTRIBUTES_NOT_USED 256 256 mov ax, BUFFER_OUTPUT_WITH_CHAR_ONLY 257 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagIn DL257 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 258 258 259 259 call .FormatFileOrDirectoryToBufferFromDTAinDSSI -
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r41 r45 2 2 ; Project name : Assembly Library 3 3 ; Created date : 15.8.2010 4 ; Last update : 16.9.20104 ; Last update : 28.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays progress bar dialog and starts progress task. … … 167 167 jcxz .DrawEmptyCharsOnly 168 168 169 mov al, SCROLL_THUMB_CHARACTER169 mov al, PROGRESS_COMPLETE_CHARACTER 170 170 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 171 171 … … 173 173 mov cx, dx 174 174 jcxz .NothingLeftToDraw 175 mov al, SCROLL_TRACK_CHARACTER175 mov al, PROGRESS_INCOMPLETE_CHARACTER 176 176 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 177 177 -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r44 r45 2 2 ; Project name : Assembly Library 3 3 ; Created date : 14.7.2010 4 ; Last update : 2 7.9.20104 ; Last update : 28.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for drawing menu borders. … … 45 45 ; Nothing 46 46 ; Corrupts registers: 47 ; AX, DX, SI, DI47 ; AX, BX, SI, DI 48 48 ;-------------------------------------------------------------------- 49 49 ALIGN JUMP_ALIGN 50 50 MenuBorders_AdjustDisplayContextForDrawingBorders: 51 mov dl, ATTRIBUTES_ARE_USED51 mov bl, ATTRIBUTES_ARE_USED 52 52 mov ax, MenuCharOut_MenuBorderTeletypeOutputWithAttribute 53 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagIn DL53 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 54 54 55 55 mov ax, bp … … 269 269 call MenuAttribute_SetToDisplayContextFromTypeInSI 270 270 271 push dx272 mov dl, ATTRIBUTES_ARE_USED271 push bx 272 mov bl, ATTRIBUTES_ARE_USED 273 273 mov ax, FAST_OUTPUT_WITH_ATTRIBUTE_ONLY 274 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagIn DL275 pop dx274 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 275 pop bx 276 276 277 277 call PrintMultipleBorderCharactersFromAL ; AL does not matter -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r44 r45 2 2 ; Project name : Assembly Library 3 3 ; Created date : 21.7.2010 4 ; Last update : 2 7.9.20104 ; Last update : 28.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for drawing menu texts by the user. … … 218 218 ; Nothing 219 219 ; Corrupts registers: 220 ; AX, DX, SI, DI220 ; AX, BX, SI, DI 221 221 ;-------------------------------------------------------------------- 222 222 ALIGN JUMP_ALIGN 223 223 AdjustDisplayContextForDrawingTexts: 224 mov dl, ATTRIBUTES_ARE_USED224 mov bl, ATTRIBUTES_ARE_USED 225 225 mov ax, MenuCharOut_MenuTextTeletypeOutputWithAttribute 226 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagIn DL226 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 227 227 228 228 mov ax, bp -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r44 r45 2 2 ; Project name : Assembly Library 3 3 ; Created date : 25.7.2010 4 ; Last update : 2 7.9.20104 ; Last update : 28.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu timeouts other time related functions. … … 56 56 ALIGN JUMP_ALIGN 57 57 MenuTime_UpdateSelectionTimeout: 58 cmp WORD [bp+MENUINIT.wTimeoutTicks], BYTE 059 je SHORT .ReturnSinceTimeoutDisabled ; CF cleared60 58 push ds 61 59 62 call GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX 63 cmp al, [bp+MENU.bLastSecondPrinted] 64 je SHORT .SetCFifTimeoutAndReturn 65 mov [bp+MENU.bLastSecondPrinted], al 66 call DrawTimeoutInAXoverMenuBorders 60 call MenuTime_DrawWithoutUpdating 61 jnc SHORT .TimeoutDisabled 62 call PointDSBXtoTimeoutCounter 63 call TimerTicks_SetCarryIfTimeoutFromDSBX 67 64 68 65 ALIGN JUMP_ALIGN 69 .SetCFifTimeoutAndReturn: 70 call TimerTicks_SetCarryIfTimeoutFromDSBX 66 .TimeoutDisabled: 71 67 pop ds 72 .ReturnSinceTimeoutDisabled:73 68 ret 74 75 69 76 70 ;-------------------------------------------------------------------- … … 79 73 ; SS:BP: Ptr to MENU 80 74 ; Returns: 81 ; Nothing 75 ; CF: Set if timeout enabled 76 ; Cleared if timeout disabled 82 77 ; Corrupts registers: 83 78 ; AX, BX, CX, DX, SI, DI … … 86 81 MenuTime_DrawWithoutUpdating: 87 82 cmp WORD [bp+MENUINIT.wTimeoutTicks], BYTE 0 88 je SHORT .ReturnSinceTimeoutDisabled 83 je SHORT .ReturnSinceTimeoutDisabled ; Clear CF 89 84 90 85 push ds 91 call GetSeconds UntilTimeoutToAXandPtrToTimeoutCounterToDSBX86 call GetSecondsLeftUntilTimeoutToAXandCounterToDSBX 92 87 call DrawTimeoutInAXoverMenuBorders 93 88 pop ds 89 stc 90 ALIGN JUMP_ALIGN, ret 94 91 .ReturnSinceTimeoutDisabled: 95 92 ret 93 94 95 ;-------------------------------------------------------------------- 96 ; GetSecondsLeftUntilTimeoutToAXandCounterToDSBX 97 ; Parameters 98 ; SS:BP: Ptr to MENU 99 ; Returns: 100 ; AX: Seconds until timeout 101 ; DS:BX: Ptr to timeout counter 102 ; Corrupts registers: 103 ; AX, CX, DX 104 ;-------------------------------------------------------------------- 105 ALIGN JUMP_ALIGN 106 GetSecondsLeftUntilTimeoutToAXandCounterToDSBX: 107 call PointDSBXtoTimeoutCounter 108 call TimerTicks_GetElapsedToAXfromDSBX 109 neg ax ; Negate since DS:BX points to end time 110 MAX_S ax, 0 ; Set to zero if overflow 111 xchg dx, ax 112 jmp TimerTicks_GetSecondsToAXfromTicksInDX 96 113 97 114 … … 111 128 lea bx, [bp+MENU.wTimeoutCounter] 112 129 ret 113 114 115 ;--------------------------------------------------------------------116 ; GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX117 ; Parameters118 ; SS:BP: Ptr to MENU119 ; Returns:120 ; AX: Seconds until timeout121 ; DS:BX: Ptr to timeout counter122 ; Corrupts registers:123 ; AX, CX, DX124 ;--------------------------------------------------------------------125 ALIGN JUMP_ALIGN126 GetSecondsUntilTimeoutToAXandPtrToTimeoutCounterToDSBX:127 call PointDSBXtoTimeoutCounter128 call TimerTicks_GetElapsedToAXfromDSBX129 neg ax ; Negate since DS:BX points to end time130 MAX_S ax, 0 ; Set to zero if overflow131 xchg dx, ax132 jmp TimerTicks_GetSecondsToAXfromTicksInDX133 130 134 131 … … 173 170 pop bp 174 171 172 ; Draw right border with normal border color 175 173 mov al, DOUBLE_RIGHT_HORIZONTAL_TO_SINGLE_VERTICAL 176 174 jmp MenuBorders_PrintSingleBorderCharacterFromAL … … 178 176 db DOUBLE_BOTTOM_LEFT_CORNER 179 177 db DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL 180 db "%AAutoselection in %2- ds",NULL178 db "%AAutoselection in %2-us",NULL 181 179 182 180 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.