Changeset 369 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu
- Timestamp:
- Mar 29, 2012, 9:29:28 AM (13 years ago)
- google:author:
- gregli@hotmail.com
- Location:
- trunk/Assembly_Library/Src/Menu
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r181 r369 14 14 ; AX, DX, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN16 ALIGN MENU_JUMP_ALIGN 17 17 CharOutLineSplitter_PrepareForPrintingTextLines: 18 18 ; Get first text line column offset to DX … … 41 41 ; Nothing 42 42 ;-------------------------------------------------------------------- 43 ALIGN JUMP_ALIGN43 ALIGN MENU_JUMP_ALIGN 44 44 CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX: 45 45 call MenuLocation_GetTitleBordersTopLeftCoordinatesToAX … … 60 60 ; DX 61 61 ;-------------------------------------------------------------------- 62 ALIGN JUMP_ALIGN62 ALIGN MENU_JUMP_ALIGN 63 63 CharOutLineSplitter_IsCursorAtTheEndOfTextLine: 64 64 push ax … … 86 86 ; AX, DX 87 87 ;-------------------------------------------------------------------- 88 ALIGN JUMP_ALIGN88 ALIGN MENU_JUMP_ALIGN 89 89 CharOutLineSplitter_MovePartialWordToNewTextLine: 90 90 push si … … 106 106 mov cx, di 107 107 mov si, di 108 ALIGN JUMP_ALIGN108 ALIGN MENU_JUMP_ALIGN 109 109 .ScanNextCharacter: ; Space will always be found since one comes after border 110 110 dec si -
trunk/Assembly_Library/Src/Menu/Menu.asm
r181 r369 17 17 ; AX (unless used as a return register), DI 18 18 ;-------------------------------------------------------------------- 19 ALIGN JUMP_ALIGN19 ALIGN MENU_JUMP_ALIGN 20 20 Menu_FunctionFromDI: 21 21 push si -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r223 r369 28 28 ; AX, SI, DI 29 29 ;-------------------------------------------------------------------- 30 ALIGN JUMP_ALIGN30 ALIGN MENU_JUMP_ALIGN 31 31 MenuAttribute_SetToDisplayContextFromTypeInSI: 32 32 call MenuAttribute_GetToAXfromTypeInSI … … 44 44 ; SI 45 45 ;-------------------------------------------------------------------- 46 ALIGN JUMP_ALIGN46 ALIGN MENU_JUMP_ALIGN 47 47 MenuAttribute_GetToAXfromTypeInSI: 48 48 push ds … … 59 59 jmp SHORT .LoadAttributeAndReturn 60 60 61 ALIGN JUMP_ALIGN61 ALIGN MENU_JUMP_ALIGN 62 62 .LoadMonoAttribute: 63 63 add si, .rgcMonochromeAttributes 64 64 jmp SHORT .LoadAttributeAndReturn 65 65 66 ALIGN JUMP_ALIGN66 ALIGN MENU_JUMP_ALIGN 67 67 .LoadColorAttribute: 68 68 add si, .rgcColorAttributes -
trunk/Assembly_Library/Src/Menu/MenuBorders.asm
r293 r369 22 22 ; AX, BX, CX, DX, SI, DI 23 23 ;-------------------------------------------------------------------- 24 ALIGN JUMP_ALIGN24 ALIGN MENU_JUMP_ALIGN 25 25 MenuBorders_RefreshAll: 26 26 %ifndef USE_186 … … 52 52 ; AX, BX, DX, SI, DI 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuBorders_RedrawBottomBorderLine: 56 56 call MenuBorders_AdjustDisplayContextForDrawingBorders … … 71 71 ;-------------------------------------------------------------------- 72 72 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 73 ALIGN JUMP_ALIGN73 ALIGN MENU_JUMP_ALIGN 74 74 MenuBorders_RefreshItemBorders: 75 75 call MenuBorders_AdjustDisplayContextForDrawingBorders … … 91 91 ; AX, BX, SI, DI 92 92 ;-------------------------------------------------------------------- 93 ALIGN JUMP_ALIGN93 ALIGN MENU_JUMP_ALIGN 94 94 MenuBorders_AdjustDisplayContextForDrawingBorders: 95 95 mov bl, ATTRIBUTES_ARE_USED … … 116 116 ; Nothing 117 117 ;-------------------------------------------------------------------- 118 ALIGN JUMP_ALIGN118 ALIGN MENU_JUMP_ALIGN 119 119 MenuBorders_GetNumberOfMiddleCharactersToDX: 120 120 eMOVZX dx, [bp+MENUINIT.bWidth] … … 133 133 ; AX, BX, CX, SI, DI 134 134 ;-------------------------------------------------------------------- 135 ALIGN JUMP_ALIGN135 ALIGN MENU_JUMP_ALIGN 136 136 RefreshTitleBorders: 137 137 call DrawTopBorderLine … … 149 149 ; AX, BX, CX, SI, DI 150 150 ;-------------------------------------------------------------------- 151 ALIGN JUMP_ALIGN151 ALIGN MENU_JUMP_ALIGN 152 152 RefreshInformationBorders: 153 153 call DrawSeparationBorderLine … … 165 165 ; AX, BX, CX, SI, DI 166 166 ;-------------------------------------------------------------------- 167 ALIGN JUMP_ALIGN167 ALIGN MENU_JUMP_ALIGN 168 168 RefreshItemBorders: 169 169 call DrawSeparationBorderLine … … 184 184 DrawTextBorderLinesByCXtimes: 185 185 jcxz .NoBorderLinesToDraw 186 ALIGN JUMP_ALIGN186 ALIGN MENU_JUMP_ALIGN 187 187 .DrawBordersWithFunctionInBX: 188 188 call DrawTextBorderLine … … 207 207 ; AX, SI, DI 208 208 ;-------------------------------------------------------------------- 209 ALIGN JUMP_ALIGN209 ALIGN MENU_JUMP_ALIGN 210 210 DrawTopBorderLine: 211 211 mov si, g_rgbTopBorderCharacters … … 213 213 jmp SHORT PrintNewlineToEndBorderLine 214 214 215 ALIGN JUMP_ALIGN215 ALIGN MENU_JUMP_ALIGN 216 216 DrawSeparationBorderLine: 217 217 mov si, g_rgbSeparationBorderCharacters 218 218 jmp SHORT PrintBorderCharactersFromCSSIandShadowCharacter 219 219 220 ALIGN JUMP_ALIGN220 ALIGN MENU_JUMP_ALIGN 221 221 DrawBottomBorderLine: 222 222 mov si, g_rgbBottomBorderCharacters … … 231 231 ret 232 232 233 ALIGN JUMP_ALIGN233 ALIGN MENU_JUMP_ALIGN 234 234 DrawBottomShadowLine: 235 235 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX … … 243 243 ret 244 244 245 ALIGN JUMP_ALIGN245 ALIGN MENU_JUMP_ALIGN 246 246 DrawTextBorderLine: 247 247 mov si, g_rgbTextBorderCharacters … … 259 259 ; AX, SI, DI 260 260 ;-------------------------------------------------------------------- 261 ALIGN JUMP_ALIGN261 ALIGN MENU_JUMP_ALIGN 262 262 PrintBorderCharactersFromCSSIandShadowCharacter: 263 263 call PrintBorderCharactersFromCSSI … … 277 277 ; AX, DI 278 278 ;-------------------------------------------------------------------- 279 ALIGN JUMP_ALIGN279 ALIGN MENU_JUMP_ALIGN 280 280 PrintNewlineToEndBorderLine: 281 281 CALL_DISPLAY_LIBRARY PrintNewlineCharacters … … 293 293 ; AX, SI, DI 294 294 ;-------------------------------------------------------------------- 295 ALIGN JUMP_ALIGN295 ALIGN MENU_JUMP_ALIGN 296 296 PrintShadowCharactersByDXtimes: 297 297 CALL_DISPLAY_LIBRARY PushDisplayContext … … 323 323 ; AX, SI, DI 324 324 ;-------------------------------------------------------------------- 325 ALIGN JUMP_ALIGN325 ALIGN MENU_JUMP_ALIGN 326 326 PrintBorderCharactersFromCSSI: 327 327 cs lodsb ; Load from [cs:si+BORDER_CHARS.cLeft] to AL … … 346 346 ; AX, DI 347 347 ;-------------------------------------------------------------------- 348 ALIGN JUMP_ALIGN348 ALIGN MENU_JUMP_ALIGN 349 349 MenuBorders_PrintSingleBorderCharacterFromAL: 350 350 CALL_DISPLAY_LIBRARY PrintCharacterFromAL 351 351 ret 352 352 353 ALIGN JUMP_ALIGN353 ALIGN MENU_JUMP_ALIGN 354 354 MenuBorders_PrintMultipleBorderCharactersFromAL: 355 355 push cx … … 369 369 ; AX, SI, DI 370 370 ;-------------------------------------------------------------------- 371 ALIGN JUMP_ALIGN371 ALIGN MENU_JUMP_ALIGN 372 372 DrawTimeoutCounterString: 373 373 call MenuTime_GetTimeoutSecondsLeftToAX -
trunk/Assembly_Library/Src/Menu/MenuCharOut.asm
r293 r369 21 21 ; AX, DX 22 22 ;-------------------------------------------------------------------- 23 ALIGN JUMP_ALIGN23 ALIGN MENU_JUMP_ALIGN 24 24 MenuCharOut_MenuTeletypeOutputWithAutomaticLineChange: 25 25 call CharOutLineSplitter_IsCursorAtTheEndOfTextLine … … 30 30 ; Fall to MenuCharOut_MenuTextTeletypeOutputWithAttribute 31 31 32 ALIGN JUMP_ALIGN32 ALIGN MENU_JUMP_ALIGN 33 33 MenuCharOut_MenuTeletypeOutput: 34 34 cmp al, CR … … 51 51 ; AX, DX 52 52 ;-------------------------------------------------------------------- 53 ALIGN JUMP_ALIGN53 ALIGN MENU_JUMP_ALIGN 54 54 MenuCharOut_PrintLFCRandAdjustOffsetForStartOfLine: 55 55 mov al, LF … … 57 57 ; Fall to PrintCRandAdjustOffsetForStartOfLine 58 58 59 ALIGN JUMP_ALIGN59 ALIGN MENU_JUMP_ALIGN 60 60 PrintCRandAdjustOffsetForStartOfLine: 61 61 mov al, CR -
trunk/Assembly_Library/Src/Menu/MenuEvent.asm
r189 r369 16 16 ; AX, BX, DX 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuEvent_InitializeMenuinit: 20 20 push ss … … 35 35 ; AX, BX, DX 36 36 ;-------------------------------------------------------------------- 37 ALIGN JUMP_ALIGN37 ALIGN MENU_JUMP_ALIGN 38 38 MenuEvent_ExitMenu: 39 39 mov bl, MENUEVENT_ExitMenu … … 52 52 ; AX, BX, DX 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuEvent_IdleProcessing: 56 56 mov bl, MENUEVENT_IdleProcessing … … 70 70 ; AX, CX, BX, DX 71 71 ;-------------------------------------------------------------------- 72 ALIGN JUMP_ALIGN72 ALIGN MENU_JUMP_ALIGN 73 73 MenuEvent_RefreshTitle: 74 74 mov bl, MENUEVENT_RefreshTitle … … 93 93 ; AX, BX, DX 94 94 ;-------------------------------------------------------------------- 95 ALIGN JUMP_ALIGN95 ALIGN MENU_JUMP_ALIGN 96 96 MenuEvent_RefreshItemFromCX: 97 97 mov bl, MENUEVENT_RefreshItemFromCX … … 109 109 ; AX, BX, DX, SI, DI 110 110 ;-------------------------------------------------------------------- 111 ALIGN JUMP_ALIGN111 ALIGN MENU_JUMP_ALIGN 112 112 MenuEvent_HighlightItemFromCX: 113 113 mov dx, cx … … 136 136 ; AX, BX, DX 137 137 ;-------------------------------------------------------------------- 138 ALIGN JUMP_ALIGN138 ALIGN MENU_JUMP_ALIGN 139 139 MenuEvent_KeyStrokeInAX: 140 140 mov bl, MENUEVENT_KeyStrokeInAX … … 171 171 ; BX 172 172 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN173 ALIGN MENU_JUMP_ALIGN 174 174 MenuEvent_SendFromBX: 175 175 push es -
trunk/Assembly_Library/Src/Menu/MenuInit.asm
r289 r369 15 15 ; All except segments 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuInit_DisplayMenuWithHandlerInBXandUserDataInDXAX: 19 19 push es … … 49 49 ; All, except SS:BP 50 50 ;-------------------------------------------------------------------- 51 ALIGN JUMP_ALIGN51 ALIGN MENU_JUMP_ALIGN 52 52 MenuInit_EnterMenuWithHandlerInBXandUserDataInDXAX: 53 53 mov [bp+MENU.fnEventHandler], bx … … 76 76 ; AX, BX, CX, DX, SI, DI 77 77 ;-------------------------------------------------------------------- 78 ALIGN JUMP_ALIGN78 ALIGN MENU_JUMP_ALIGN 79 79 MenuInit_RefreshMenuWindow: 80 80 call MenuBorders_RefreshAll ; Draw borders … … 94 94 ;-------------------------------------------------------------------- 95 95 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 96 ALIGN JUMP_ALIGN96 ALIGN MENU_JUMP_ALIGN 97 97 MenuInit_CloseMenuIfExitEventAllows: 98 98 call MenuEvent_ExitMenu … … 111 111 ; Nothing 112 112 ;-------------------------------------------------------------------- 113 ALIGN JUMP_ALIGN113 ALIGN MENU_JUMP_ALIGN 114 114 MenuInit_CloseMenuWindow: 115 115 or BYTE [bp+MENU.bFlags], FLG_MENU_EXIT … … 127 127 ; AX, BX, CX, DX, SI, DI 128 128 ;-------------------------------------------------------------------- 129 ALIGN JUMP_ALIGN129 ALIGN MENU_JUMP_ALIGN 130 130 MenuInit_HighlightItemFromAX: 131 131 sub ax, [bp+MENUINIT.wHighlightedItem] … … 142 142 ;-------------------------------------------------------------------- 143 143 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 144 ALIGN JUMP_ALIGN144 ALIGN MENU_JUMP_ALIGN 145 145 MenuInit_GetHighlightedItemToAX: 146 146 mov ax, [bp+MENUINIT.wHighlightedItem] … … 162 162 ;-------------------------------------------------------------------- 163 163 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 164 ALIGN JUMP_ALIGN164 ALIGN MENU_JUMP_ALIGN 165 165 MenuInit_SetTitleHeightFromAL: 166 166 mov [bp+MENUINIT.bTitleLines], al 167 167 ret 168 168 169 ALIGN JUMP_ALIGN169 ALIGN MENU_JUMP_ALIGN 170 170 MenuInit_SetInformationHeightFromAL: 171 171 mov [bp+MENUINIT.bInfoLines], al 172 172 ret 173 173 174 ALIGN JUMP_ALIGN174 ALIGN MENU_JUMP_ALIGN 175 175 MenuInit_SetTotalItemsFromAX: 176 176 mov [bp+MENUINIT.wItems], ax … … 191 191 ;-------------------------------------------------------------------- 192 192 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 193 ALIGN JUMP_ALIGN193 ALIGN MENU_JUMP_ALIGN 194 194 MenuInit_SetUserDataFromDSSI: 195 195 mov [bp+MENU.dwUserData], si … … 197 197 ret 198 198 199 ALIGN JUMP_ALIGN199 ALIGN MENU_JUMP_ALIGN 200 200 MenuInit_GetUserDataToDSSI: 201 201 lds si, [bp+MENU.dwUserData] -
trunk/Assembly_Library/Src/Menu/MenuLocation.asm
r293 r369 16 16 ; Nothing 17 17 ;-------------------------------------------------------------------- 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuLocation_GetTextCoordinatesToAXforItemInAX: 20 20 sub ax, [bp+MENU.wFirstVisibleItem] ; Item to line … … 42 42 jmp SHORT AddItemBordersTopLeftCoordinatesToAX 43 43 44 ALIGN JUMP_ALIGN44 ALIGN MENU_JUMP_ALIGN 45 45 MenuLocation_GetTitleTextTopLeftCoordinatesToAX: 46 46 mov ax, (MENU_TEXT_ROW_OFFSET<<8) | MENU_TEXT_COLUMN_OFFSET … … 50 50 jmp SHORT MenuLocation_AddTitleBordersTopLeftCoordinatesToAX 51 51 52 ALIGN JUMP_ALIGN52 ALIGN MENU_JUMP_ALIGN 53 53 MenuLocation_GetInformationTextTopLeftCoordinatesToAX: 54 54 mov ax, (MENU_TEXT_ROW_OFFSET<<8) | MENU_TEXT_COLUMN_OFFSET 55 55 jmp SHORT AddInformationBordersTopLeftCoordinatesToAX 56 56 57 ALIGN JUMP_ALIGN57 ALIGN MENU_JUMP_ALIGN 58 58 MenuLocation_GetBottomBordersTopLeftCoordinatesToAX: 59 59 xor ax, ax … … 77 77 stc ; Compensate for Information top border 78 78 adc ah, [bp+MENUINIT.bInfoLines] 79 ALIGN JUMP_ALIGN79 ALIGN MENU_JUMP_ALIGN 80 80 AddInformationBordersTopLeftCoordinatesToAX: 81 81 push cx … … 84 84 add ah, cl 85 85 pop cx 86 ALIGN JUMP_ALIGN86 ALIGN MENU_JUMP_ALIGN 87 87 AddItemBordersTopLeftCoordinatesToAX: 88 88 stc ; Compensate for Title top border 89 89 adc ah, [bp+MENUINIT.bTitleLines] 90 ALIGN JUMP_ALIGN90 ALIGN MENU_JUMP_ALIGN 91 91 MenuLocation_AddTitleBordersTopLeftCoordinatesToAX: 92 92 push di … … 112 112 ; Nothing 113 113 ;-------------------------------------------------------------------- 114 ALIGN JUMP_ALIGN114 ALIGN MENU_JUMP_ALIGN 115 115 MenuLocation_GetMaxTextLineLengthToAX: 116 116 eMOVZX ax, [bp+MENUINIT.bWidth] -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r189 r369 14 14 ; AX, BX, CX, DX, SI, DI 15 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN16 ALIGN MENU_JUMP_ALIGN 17 17 MenuLoop_Enter: 18 18 call KeystrokeProcessing … … 36 36 ; All, except SS:BP 37 37 ;-------------------------------------------------------------------- 38 ALIGN JUMP_ALIGN38 ALIGN MENU_JUMP_ALIGN 39 39 KeystrokeProcessing: 40 40 call Keyboard_GetKeystrokeToAX … … 43 43 ret 44 44 45 ALIGN JUMP_ALIGN45 ALIGN MENU_JUMP_ALIGN 46 46 TimeoutProcessing: 47 47 call MenuTime_UpdateSelectionTimeout … … 62 62 ; AX, BX, CX, DX, SI, DI 63 63 ;-------------------------------------------------------------------- 64 ALIGN JUMP_ALIGN64 ALIGN MENU_JUMP_ALIGN 65 65 ProcessKeystrokeFromAX: 66 66 xchg cx, ax … … 85 85 ; BX, CX, DX, SI, DI 86 86 ;-------------------------------------------------------------------- 87 ALIGN JUMP_ALIGN87 ALIGN MENU_JUMP_ALIGN 88 88 .ProcessMenuSystemKeystrokeFromAX: 89 89 cmp al, ESC … … 96 96 ret ; Return with CF cleared since keystroke not processed 97 97 98 ALIGN JUMP_ALIGN98 ALIGN MENU_JUMP_ALIGN 99 99 .LeaveMenuWithoutSelectingItem: 100 100 call MenuEvent_ExitMenu … … 106 106 ret 107 107 108 ALIGN JUMP_ALIGN108 ALIGN MENU_JUMP_ALIGN 109 109 .SelectItem: 110 110 mov cx, [bp+MENUINIT.wHighlightedItem] … … 128 128 ; BX, CX, DX, SI, DI 129 129 ;-------------------------------------------------------------------- 130 ALIGN JUMP_ALIGN130 ALIGN MENU_JUMP_ALIGN 131 131 MenuLoop_ProcessScrollingKeysFromAX: 132 132 xchg ah, al … … 148 148 ret 149 149 150 ALIGN JUMP_ALIGN150 ALIGN MENU_JUMP_ALIGN 151 151 .ChangeToPreviousPage: 152 152 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 157 157 jge SHORT .MoveHighlightedItemByAX ; No rotation for PgUp 158 158 ; Fall to .SelectFirstItem 159 ALIGN JUMP_ALIGN159 ALIGN MENU_JUMP_ALIGN 160 160 .SelectFirstItem: 161 161 mov ax, [bp+MENUINIT.wHighlightedItem] … … 163 163 jmp SHORT .MoveHighlightedItemByAX 164 164 165 ALIGN JUMP_ALIGN165 ALIGN MENU_JUMP_ALIGN 166 166 .ChangeToNextPage: 167 167 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 172 172 jb SHORT .MoveHighlightedItemByAX ; No rotation for PgDn 173 173 ; Fall to .SelectLastItem 174 ALIGN JUMP_ALIGN174 ALIGN MENU_JUMP_ALIGN 175 175 .SelectLastItem: 176 176 stc … … 179 179 jmp SHORT .MoveHighlightedItemByAX 180 180 181 ALIGN JUMP_ALIGN181 ALIGN MENU_JUMP_ALIGN 182 182 .DecrementSelectedItem: 183 183 mov ax, -1 … … 185 185 .IncrementSelectedItem: 186 186 mov al, 1 ; AH is already 0 187 ALIGN JUMP_ALIGN187 ALIGN MENU_JUMP_ALIGN 188 188 .MoveHighlightedItemByAX: 189 189 call MenuScrollbars_MoveHighlightedItemByAX -
trunk/Assembly_Library/Src/Menu/MenuScrollbars.asm
r293 r369 15 15 ; AX 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuScrollbars_AreScrollbarsNeeded: 19 19 xchg ax, cx … … 34 34 ; AH, CX, DX 35 35 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN36 ALIGN MENU_JUMP_ALIGN 37 37 MenuScrollbars_GetScrollCharacterToALForLineInDI: 38 38 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 45 45 call .GetLastThumbLineToAX 46 46 cmp ax, di ; After last thumb line? 47 ALIGN JUMP_ALIGN47 ALIGN MENU_JUMP_ALIGN 48 48 .ReturnTrackCharacter: 49 49 mov al, SCROLL_TRACK_CHARACTER 50 50 jb SHORT .Return 51 51 mov al, SCROLL_THUMB_CHARACTER 52 ALIGN JUMP_ALIGN, ret52 ALIGN MENU_JUMP_ALIGN, ret 53 53 .Return: 54 54 ret … … 64 64 ; CX, DX 65 65 ;-------------------------------------------------------------------- 66 ALIGN JUMP_ALIGN66 ALIGN MENU_JUMP_ALIGN 67 67 .GetLastThumbLineToAX: 68 68 call MenuScrollbars_GetLastVisibleItemOnPageToAX … … 80 80 ; CX, DX 81 81 ;-------------------------------------------------------------------- 82 ALIGN JUMP_ALIGN82 ALIGN MENU_JUMP_ALIGN 83 83 .CalculateFirstOrLastThumbLineToAX: 84 84 mul cx … … 97 97 ; AX, BX, CX, DX, SI, DI 98 98 ;-------------------------------------------------------------------- 99 ALIGN JUMP_ALIGN99 ALIGN MENU_JUMP_ALIGN 100 100 MenuScrollbars_MoveHighlightedItemByAX: 101 101 mov cx, [bp+MENUINIT.wHighlightedItem] … … 120 120 jae SHORT .ScrollPageForNewItemInCX 121 121 122 ALIGN JUMP_ALIGN122 ALIGN MENU_JUMP_ALIGN 123 123 .RotateNegativeItemInCX: 124 124 add cx, dx … … 135 135 ; AX, BX, CX, DX, SI, DI 136 136 ;-------------------------------------------------------------------- 137 ALIGN JUMP_ALIGN137 ALIGN MENU_JUMP_ALIGN 138 138 .ScrollPageForNewItemInCX: 139 139 call MenuScrollbars_IsItemInCXonVisiblePage … … 154 154 cwd ; This won't work if MaxFirstVisibleItem > 32767 155 155 156 ALIGN JUMP_ALIGN156 ALIGN MENU_JUMP_ALIGN 157 157 .DXisPositive: 158 158 cmp ax, dx … … 160 160 xchg dx, ax 161 161 162 ALIGN JUMP_ALIGN162 ALIGN MENU_JUMP_ALIGN 163 163 .AXisLessThanDX: 164 164 mov [bp+MENU.wFirstVisibleItem], ax 165 165 call MenuText_RefreshAllItems 166 166 167 ALIGN JUMP_ALIGN167 ALIGN MENU_JUMP_ALIGN 168 168 .HighlightNewItemOnCX: 169 169 jmp MenuEvent_HighlightItemFromCX … … 181 181 ; AX 182 182 ;-------------------------------------------------------------------- 183 ALIGN JUMP_ALIGN183 ALIGN MENU_JUMP_ALIGN 184 184 MenuScrollbars_IsItemInCXonVisiblePage: 185 185 cmp [bp+MENU.wFirstVisibleItem], cx … … 190 190 ja SHORT .ItemIsNotVisible 191 191 stc ; Item is visible 192 ALIGN JUMP_ALIGN, ret192 ALIGN MENU_JUMP_ALIGN, ret 193 193 .ItemIsNotVisible: 194 194 ret … … 204 204 ; Nothing 205 205 ;-------------------------------------------------------------------- 206 ALIGN JUMP_ALIGN206 ALIGN MENU_JUMP_ALIGN 207 207 MenuScrollbars_GetLastVisibleItemOnPageToAX: 208 208 xchg cx, ax … … 223 223 ; Nothing 224 224 ;-------------------------------------------------------------------- 225 ALIGN JUMP_ALIGN225 ALIGN MENU_JUMP_ALIGN 226 226 MenuScrollbars_GetActualVisibleItemsOnPageToCX: 227 227 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX … … 229 229 jb SHORT .Return 230 230 mov cx, [bp+MENUINIT.wItems] 231 ALIGN JUMP_ALIGN, ret231 ALIGN MENU_JUMP_ALIGN, ret 232 232 .Return: 233 233 ret … … 243 243 ; Nothing 244 244 ;-------------------------------------------------------------------- 245 ALIGN JUMP_ALIGN245 ALIGN MENU_JUMP_ALIGN 246 246 MenuScrollbars_GetMaxVisibleItemsOnPageToCX: 247 247 eMOVZX cx, [bp+MENUINIT.bHeight] -
trunk/Assembly_Library/Src/Menu/MenuText.asm
r194 r369 16 16 ;-------------------------------------------------------------------- 17 17 %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 18 ALIGN JUMP_ALIGN18 ALIGN MENU_JUMP_ALIGN 19 19 MenuText_ClearTitleArea: 20 20 CALL_DISPLAY_LIBRARY PushDisplayContext ; Save cursor coordinates … … 24 24 %endif 25 25 26 ALIGN JUMP_ALIGN26 ALIGN MENU_JUMP_ALIGN 27 27 MenuText_ClearInformationArea: 28 28 CALL_DISPLAY_LIBRARY PushDisplayContext ; Save cursor coordinates … … 50 50 ; AX, BX, CX, DX, SI, DI 51 51 ;-------------------------------------------------------------------- 52 ALIGN JUMP_ALIGN52 ALIGN MENU_JUMP_ALIGN 53 53 MenuText_RefreshTitle: 54 54 cmp BYTE [bp+MENUINIT.bTitleLines], 0 … … 57 57 jmp MenuEvent_RefreshTitle 58 58 59 ALIGN JUMP_ALIGN59 ALIGN MENU_JUMP_ALIGN 60 60 MenuText_RefreshInformation: 61 61 cmp BYTE [bp+MENUINIT.bInfoLines], 0 … … 74 74 ; AX, BX, DX, SI, DI 75 75 ;-------------------------------------------------------------------- 76 ALIGN JUMP_ALIGN76 ALIGN MENU_JUMP_ALIGN 77 77 PrepareToDrawTitleArea: 78 78 mov si, ATTRIBUTE_CHARS.cTitle … … 80 80 jmp SHORT FinishPreparationsToDrawTitleOrInformationArea 81 81 82 ALIGN JUMP_ALIGN82 ALIGN MENU_JUMP_ALIGN 83 83 MenuText_PrepareToDrawInformationArea: 84 84 mov si, ATTRIBUTE_CHARS.cInformation … … 98 98 ; AX, BX, DX, SI, DI 99 99 ;-------------------------------------------------------------------- 100 ALIGN JUMP_ALIGN100 ALIGN MENU_JUMP_ALIGN 101 101 MenuText_RefreshAllItems: 102 102 push cx … … 104 104 call MenuScrollbars_GetActualVisibleItemsOnPageToCX 105 105 mov ax, [bp+MENU.wFirstVisibleItem] 106 ALIGN JUMP_ALIGN106 ALIGN MENU_JUMP_ALIGN 107 107 .ItemRefreshLoop: 108 108 call MenuText_RefreshItemFromAX … … 124 124 ; BX, DX, SI, DI 125 125 ;-------------------------------------------------------------------- 126 ALIGN JUMP_ALIGN126 ALIGN MENU_JUMP_ALIGN 127 127 MenuText_RefreshItemFromAX: 128 128 push cx … … 151 151 ; AX, BX, DX, SI, DI 152 152 ;-------------------------------------------------------------------- 153 ALIGN JUMP_ALIGN153 ALIGN MENU_JUMP_ALIGN 154 154 MenuText_AdjustDisplayContextForDrawingItemFromCX: 155 155 mov ax, cx … … 171 171 ; AX, BX, DX, SI, DI 172 172 ;-------------------------------------------------------------------- 173 ALIGN JUMP_ALIGN173 ALIGN MENU_JUMP_ALIGN 174 174 AdjustDisplayContextForDrawingTextsAtCoordsInAXwithAttrTypeInSIandCharOutFunctionInDX: 175 175 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX … … 192 192 ; AX, BX, DX, DI 193 193 ;-------------------------------------------------------------------- 194 ALIGN JUMP_ALIGN194 ALIGN MENU_JUMP_ALIGN 195 195 ClearPreviousItem: 196 196 CALL_DISPLAY_LIBRARY GetSoftwareCoordinatesToAX … … 217 217 ; Nothing 218 218 ;-------------------------------------------------------------------- 219 ALIGN JUMP_ALIGN219 ALIGN MENU_JUMP_ALIGN 220 220 GetItemTextAttributeTypeToSIforItemInCX: 221 221 mov si, ATTRIBUTE_CHARS.cItem … … 226 226 jne SHORT .ReturnAttributeTypeInSI 227 227 sub si, BYTE ATTRIBUTE_CHARS.cItem - ATTRIBUTE_CHARS.cHighlightedItem 228 ALIGN JUMP_ALIGN, ret228 ALIGN MENU_JUMP_ALIGN, ret 229 229 .ReturnAttributeTypeInSI: 230 230 ret … … 241 241 ; AX, CX, BX, DX, SI, DI 242 242 ;-------------------------------------------------------------------- 243 ALIGN JUMP_ALIGN243 ALIGN MENU_JUMP_ALIGN 244 244 DrawScrollbarCharacterForItemInCXifNecessary: 245 245 call MenuScrollbars_AreScrollbarsNeeded … … 247 247 ret 248 248 249 ALIGN JUMP_ALIGN249 ALIGN MENU_JUMP_ALIGN 250 250 .DrawScrollbarCharacter: 251 251 call MenuBorders_AdjustDisplayContextForDrawingBorders -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r133 r369 15 15 ; AX, BX 16 16 ;-------------------------------------------------------------------- 17 ALIGN JUMP_ALIGN17 ALIGN MENU_JUMP_ALIGN 18 18 MenuTime_StartSelectionTimeoutWithTicksInAX: 19 19 push ds … … 34 34 ; AX, BX, DX, SI, DI 35 35 ;-------------------------------------------------------------------- 36 ALIGN JUMP_ALIGN36 ALIGN MENU_JUMP_ALIGN 37 37 MenuTime_StopSelectionTimeout: 38 38 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN … … 52 52 ; AX, BX, SI, DI 53 53 ;-------------------------------------------------------------------- 54 ALIGN JUMP_ALIGN54 ALIGN MENU_JUMP_ALIGN 55 55 MenuTime_UpdateSelectionTimeout: 56 56 test BYTE [bp+MENU.bFlags], FLG_MENU_TIMEOUT_COUNTDOWN … … 66 66 ret 67 67 68 ALIGN JUMP_ALIGN68 ALIGN MENU_JUMP_ALIGN 69 69 .RedrawSinceNoTimeout: 70 70 call MenuBorders_RedrawBottomBorderLine … … 84 84 ; AX 85 85 ;-------------------------------------------------------------------- 86 ALIGN JUMP_ALIGN86 ALIGN MENU_JUMP_ALIGN 87 87 MenuTime_GetTimeoutSecondsLeftToAX: 88 88 push ds … … 117 117 ; Nothing 118 118 ;-------------------------------------------------------------------- 119 ALIGN JUMP_ALIGN119 ALIGN MENU_JUMP_ALIGN 120 120 PointDSBXtoTimeoutCounter: 121 121 push ss
Note:
See TracChangeset
for help on using the changeset viewer.