Changeset 625 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
- Timestamp:
- Feb 19, 2023, 9:26:52 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/ItemLineSplitter.asm
r526 r625 4 4 ; 5 5 ; XTIDE Universal BIOS and Associated Tools 6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-20 13 by XTIDE Universal BIOS Team.6 ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2023 by XTIDE Universal BIOS Team. 7 7 ; 8 8 ; This program is free software; you can redistribute it and/or modify … … 51 51 call StringProcess_DSSIwithFunctionInDX 52 52 53 lea ax, [bx+1] 53 xchg bx, ax 54 inc ax 54 55 eLEAVE_STRUCT ITEM_LINE_SPLITTER_size 55 56 pop di … … 119 120 ProcessCharacterFromStringToSplit: 120 121 cmp al, ' ' 121 ja SHORT .CheckLineLength 122 mov di, si ; DS:DI now points start of new word 123 je SHORT .CheckLineLength 122 jbe SHORT .ControlCharacterOrSpace 124 123 125 cmp al, LF126 je SHORT .ChangeToNextLine127 cmp al, CR128 jne SHORT .IgnoreUnsupportedControlCharacter129 xor cx, cx ; Carriage return so reset line length so far130 131 ALIGN JUMP_ALIGN132 124 .CheckLineLength: 133 125 cmp [bp+ITEM_LINE_SPLITTER.wMaxTextLineLength], cx 134 126 jb SHORT .ChangeToNextLine 135 ret ; With CF cleared127 ret ; With CF cleared 136 128 137 129 ALIGN JUMP_ALIGN … … 140 132 je SHORT .WantedLineFound 141 133 142 inc bx ; Increment line 143 xor cx, cx ; Zero character counter (and clear CF) 144 mov si, di ; Start from complete word 134 inc bx ; Increment line 135 mov si, di ; Start from complete word 145 136 mov [bp+ITEM_LINE_SPLITTER.wStartOfLine], di 137 .CarriageReturn: 138 xor cx, cx ; Zero character counter (and clear CF) 146 139 ret 147 140 148 141 ALIGN JUMP_ALIGN 149 .IgnoreUnsupportedControlCharacter: 142 .ControlCharacterOrSpace: 143 mov di, si ; DS:DI now points start of new word 144 je SHORT .CheckLineLength ; Jump if space 145 cmp al, LF 146 je SHORT .ChangeToNextLine 147 cmp al, CR 148 je SHORT .CarriageReturn ; Reset line length 149 ; Unsupported control character - ignore it 150 150 dec cx 151 151 clc
Note:
See TracChangeset
for help on using the changeset viewer.