Changeset 104 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
- Timestamp:
- Feb 2, 2011, 3:53:52 AM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r52 r104 1 ; File name : CharOutLineSplitter.asm2 1 ; Project name : Assembly Library 3 ; Created date : 11.10.20104 ; Last update : 12.10.20105 ; Author : Tomi Tilli6 2 ; Description : Functions for splitting menu lines during character output. 7 3 … … 20 16 ALIGN JUMP_ALIGN 21 17 CharOutLineSplitter_PrepareForPrintingTextLines: 22 call .GetLastTextLineColumnOffsetToDX 23 call CharOutLineSplitter_GetFirstTextLineColumnOffsetToAX 24 mov ah, dl ; AL = Text line first column, AH = Text line last column 18 ; Get first text line column offset to DX 19 call CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX 20 add al, MENU_TEXT_COLUMN_OFFSET<<1 21 xchg dx, ax 22 23 ; Get last text line column offset to AX 24 call MenuLocation_GetMaxTextLineLengthToAX 25 shl ax, 1 ; Characters to BYTEs 26 add ax, dx 27 28 xchg ax, dx ; AL = First text line column offset 29 mov ah, dl ; AH = Last text line column offset 25 30 CALL_DISPLAY_LIBRARY SetCharacterOutputParameterFromAX 26 ret27 28 ;--------------------------------------------------------------------29 ; .GetLastTextLineColumnOffsetToDX30 ; Parameters:31 ; SS:BP: Ptr to MENU32 ; Returns:33 ; DX: Offset to last (allowed) character in text line34 ; Corrupts registers:35 ; AX36 ;--------------------------------------------------------------------37 ALIGN JUMP_ALIGN38 .GetLastTextLineColumnOffsetToDX:39 call CharOutLineSplitter_GetFirstTextLineColumnOffsetToAX40 xchg dx, ax41 call MenuLocation_GetMaxTextLineLengthToAX42 shl ax, 143 add dx, ax44 31 ret 45 32 46 33 47 34 ;-------------------------------------------------------------------- 48 ; CharOutLineSplitter_GetFirstTextLineColumnOffsetToAX49 35 ; CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX 50 36 ; Parameters: … … 55 41 ; Nothing 56 42 ;-------------------------------------------------------------------- 57 ALIGN JUMP_ALIGN58 CharOutLineSplitter_GetFirstTextLineColumnOffsetToAX:59 call CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX60 add al, MENU_TEXT_COLUMN_OFFSET<<161 ret62 63 43 ALIGN JUMP_ALIGN 64 44 CharOutLineSplitter_GetFirstBorderLineColumnOffsetToAX: … … 111 91 push cx 112 92 push ax 113 114 call GetOffsetToPartialWordToSIandSizeToCX 115 call MenuCharOut_PrintLFCRandAdjustOffsetForStartOfLine 116 jcxz .NothingToMove 117 call MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX 118 .NothingToMove: 119 pop ax 120 pop cx 121 pop si 122 ret 123 93 ; Fall to .GetOffsetToPartialWordToSIandSizeToCX 124 94 125 95 ;-------------------------------------------------------------------- 126 ; GetOffsetToPartialWordToSIandSizeToCX96 ; .GetOffsetToPartialWordToSIandSizeToCX 127 97 ; Parameters: 128 98 ; ES:DI: Ptr to space before border character … … 133 103 ; Nothing 134 104 ;-------------------------------------------------------------------- 135 ALIGN JUMP_ALIGN 136 GetOffsetToPartialWordToSIandSizeToCX: 105 .GetOffsetToPartialWordToSIandSizeToCX: 137 106 xor cx, cx 138 107 mov si, di … … 150 119 inc si ; SI now points one past space 151 120 shl cx, 1 ; Characters to bytes 152 ret 153 121 ; Fall to .ChangeLine 154 122 155 123 ;-------------------------------------------------------------------- 156 ; MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX 124 ; .ChangeLine 125 ; Parameters: 126 ; Nothing 127 ; Returns: 128 ; Nothing 129 ; Corrupts registers: 130 ; AX, DX 131 ;-------------------------------------------------------------------- 132 .ChangeLine: 133 call MenuCharOut_PrintLFCRandAdjustOffsetForStartOfLine 134 jcxz .ReturnFromMovePartialWordToNewTextLine 135 ; Fall to .MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX 136 137 ;-------------------------------------------------------------------- 138 ; .MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX 157 139 ; Parameters: 158 140 ; CX: Number of BYTEs in partial word … … 165 147 ; AX, CX, DX, SI 166 148 ;-------------------------------------------------------------------- 167 ALIGN JUMP_ALIGN 168 MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX: 149 .MovePartialWordFromPreviousLineInESSItoNewLineInESDIwithSizeInCX: 169 150 push si 170 151 push cx … … 178 159 call DisplayPrint_RepeatCharacterFromALwithCountInCX 179 160 mov di, si 161 162 .ReturnFromMovePartialWordToNewTextLine: 163 pop ax 164 pop cx 165 pop si 180 166 ret
Note:
See TracChangeset
for help on using the changeset viewer.