Changeset 48 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/MenuText.asm
- Timestamp:
- Oct 8, 2010, 3:44:05 PM (15 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/MenuText.asm
r45 r48 2 2 ; Project name : Assembly Library 3 3 ; Created date : 21.7.2010 4 ; Last update : 28.9.20104 ; Last update : 7.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for drawing menu texts by the user. … … 10 10 11 11 ;-------------------------------------------------------------------- 12 ; MenuText_ClearTitleArea 13 ; MenuText_ClearInformationArea 14 ; Parameters 15 ; SS:BP: Ptr to MENU 16 ; Returns: 17 ; Nothing 18 ; Corrupts registers: 19 ; AX, BX, CX, DX, SI, DI 20 ;-------------------------------------------------------------------- 21 ALIGN JUMP_ALIGN 22 MenuText_ClearTitleArea: 23 call PrepareToDrawTitleArea 24 mov cl, [bp+MENUINIT.bTitleLines] 25 jmp SHORT ClearCLlinesOfText 26 27 ALIGN JUMP_ALIGN 28 MenuText_ClearInformationArea: 29 call PrepareToDrawInformationArea 30 mov cl, [bp+MENUINIT.bInfoLines] 31 ClearCLlinesOfText: 32 mov al, [bp+MENUINIT.bWidth] 33 sub al, MENU_HORIZONTAL_BORDER_LINES+MENU_TEXT_COLUMN_OFFSET 34 mul cl 35 xchg cx, ax 36 mov al, ' ' 37 CALL_DISPLAY_LIBRARY PrintRepeatedCharacterFromALwithCountInCX 38 ret 39 40 41 ;-------------------------------------------------------------------- 12 42 ; MenuText_RefreshTitle 13 43 ; MenuText_RefreshInformation … … 17 47 ; Nothing 18 48 ; Corrupts registers: 19 ; AX, BX, DX, SI, DI49 ; AX, BX, CX, DX, SI, DI 20 50 ;-------------------------------------------------------------------- 21 51 ALIGN JUMP_ALIGN … … 23 53 cmp BYTE [bp+MENUINIT.bTitleLines], 0 24 54 jz SHORT NothingToRefresh 25 26 mov si, ATTRIBUTE_CHARS.cTitle 27 call AdjustDisplayContextForDrawingTexts 28 call MenuLocation_GetTitleTextTopLeftCoordinatesToAX 29 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 55 call PrepareToDrawTitleArea 30 56 jmp MenuEvent_RefreshTitle 31 57 … … 34 60 cmp BYTE [bp+MENUINIT.bInfoLines], 0 35 61 jz SHORT NothingToRefresh 36 62 call PrepareToDrawInformationArea 63 jmp MenuEvent_RefreshInformation 64 65 ;-------------------------------------------------------------------- 66 ; PrepareToDrawTitleArea 67 ; PrepareToDrawInformationArea 68 ; Parameters 69 ; SS:BP: Ptr to MENU 70 ; Returns: 71 ; Nothing 72 ; Corrupts registers: 73 ; AX, BX, DX, SI, DI 74 ;-------------------------------------------------------------------- 75 ALIGN JUMP_ALIGN 76 PrepareToDrawTitleArea: 77 mov si, ATTRIBUTE_CHARS.cTitle 78 mov ax, MenuCharOut_MenuTextTeletypeOutputWithAttributeAndAutomaticLineChange 79 call AdjustDisplayContextForDrawingTextsWithCharOutFunctionFromAX 80 call MenuLocation_GetTitleTextTopLeftCoordinatesToAX 81 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 82 ret 83 84 ALIGN JUMP_ALIGN 85 PrepareToDrawInformationArea: 37 86 mov si, ATTRIBUTE_CHARS.cInformation 38 call AdjustDisplayContextForDrawingTexts 87 mov ax, MenuCharOut_MenuTextTeletypeOutputWithAttributeAndAutomaticLineChange 88 call AdjustDisplayContextForDrawingTextsWithCharOutFunctionFromAX 39 89 call MenuLocation_GetInformationTextTopLeftCoordinatesToAX 40 90 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 41 jmp MenuEvent_RefreshInformation91 ret 42 92 43 93 … … 109 159 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 110 160 call .GetItemTextAttributeTypeToSIforItemInCX 111 jmp SHORT AdjustDisplayContextForDrawingTexts 161 mov ax, MenuCharOut_MenuTextTeletypeOutputWithAttribute 162 jmp SHORT AdjustDisplayContextForDrawingTextsWithCharOutFunctionFromAX 112 163 113 164 ;-------------------------------------------------------------------- … … 142 193 ; Nothing 143 194 ; Corrupts registers: 144 ; AX, DX, SI, DI195 ; AX, BX, DX, SI, DI 145 196 ;-------------------------------------------------------------------- 146 197 ALIGN JUMP_ALIGN … … 188 239 ; Nothing 189 240 ; Corrupts registers: 190 ; AX, DX, SI, DI241 ; AX, BX, DX, SI, DI 191 242 ;-------------------------------------------------------------------- 192 243 ALIGN JUMP_ALIGN … … 194 245 push cx 195 246 196 mov si, ATTRIBUTE_CHARS.cBordersAndBackground 197 call MenuAttribute_SetToDisplayContextFromTypeInSI 247 call MenuBorders_AdjustDisplayContextForDrawingBorders 198 248 199 249 mov ax, cx … … 211 261 212 262 ;-------------------------------------------------------------------- 213 ; AdjustDisplayContextForDrawingTexts 214 ; Parameters 263 ; AdjustDisplayContextForDrawingTextsWithCharOutFunctionFromAX 264 ; Parameters 265 ; AX: Character output function 215 266 ; SI: Attribute type (from ATTRIBUTE_CHARS) 216 267 ; SS:BP: Ptr to MENU … … 221 272 ;-------------------------------------------------------------------- 222 273 ALIGN JUMP_ALIGN 223 AdjustDisplayContextForDrawingTexts :274 AdjustDisplayContextForDrawingTextsWithCharOutFunctionFromAX: 224 275 mov bl, ATTRIBUTES_ARE_USED 225 mov ax, MenuCharOut_MenuTextTeletypeOutputWithAttribute226 276 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 227 277
Note:
See TracChangeset
for help on using the changeset viewer.