Changeset 46 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/LineSplitter.asm
- Timestamp:
- Oct 4, 2010, 7:38:36 AM (14 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/LineSplitter.asm
r41 r46 2 2 ; Project name : Assembly Library 3 3 ; Created date : 8.8.2010 4 ; Last update : 1 5.9.20104 ; Last update : 1.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Splits long strings to multiple lines. … … 131 131 .ProcessControlCharacter: 132 132 cmp al, NULL ; End of string? 133 je SHORT . EndOfString133 je SHORT .RemoveEmptyLinesAtTheEndIfAnyExists 134 134 cmp al, LF ; Line feed? 135 135 je SHORT .NewlineCharacter … … 142 142 ALIGN JUMP_ALIGN 143 143 .NewlineCharacter: 144 mov BYTE [si-1], SOH 144 mov BYTE [si-1], SOH ; SOH marks previous newline character 145 145 mov [bp+LINE_SPLITTER.pLastWord], si 146 146 jmp SHORT .StartNewLine 147 147 148 148 ALIGN JUMP_ALIGN 149 .EndOfString: 150 ret 149 .RemoveEmptyLinesAtTheEndIfAnyExists: 150 mov al, [si-2] ; Load character before NULL 151 cmp al, SOH 152 je SHORT .RemoveEmptyLineAtTheEndOfString 153 cmp al, LF 154 je SHORT .RemoveEmptyLineAtTheEndOfString 155 ret 156 ALIGN JUMP_ALIGN 157 .RemoveEmptyLineAtTheEndOfString: 158 dec si 159 dec WORD [bp+LINE_SPLITTER.wLines] 160 mov BYTE [si-1], NULL 161 jmp SHORT .RemoveEmptyLinesAtTheEndIfAnyExists 151 162 152 163
Note:
See TracChangeset
for help on using the changeset viewer.