Changeset 46 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog/LineSplitter.asm


Ignore:
Timestamp:
Oct 4, 2010, 7:38:36 AM (14 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to Assembly Library:
Sorting now works (pivot item is copied for comparison and index comparisons are now signed instead of unsigned).
Menu shadow now looks better on black and white modes.
Sorting is now implemented for File Fialog: directories are displayed before files.
File Dialog now displays directories with upper case letters and files with lower case letters.
Line splitter now removes all empty lines from the end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Src/Menu/Dialog/LineSplitter.asm

    r41 r46  
    22; Project name  :   Assembly Library
    33; Created date  :   8.8.2010
    4 ; Last update   :   15.9.2010
     4; Last update   :   1.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Splits long strings to multiple lines.
     
    131131.ProcessControlCharacter:
    132132    cmp     al, NULL            ; End of string?
    133     je      SHORT .EndOfString
     133    je      SHORT .RemoveEmptyLinesAtTheEndIfAnyExists
    134134    cmp     al, LF              ; Line feed?
    135135    je      SHORT .NewlineCharacter
     
    142142ALIGN JUMP_ALIGN
    143143.NewlineCharacter:
    144     mov     BYTE [si-1], SOH                    ; SOH marks previous newline character
     144    mov     BYTE [si-1], SOH    ; SOH marks previous newline character
    145145    mov     [bp+LINE_SPLITTER.pLastWord], si
    146146    jmp     SHORT .StartNewLine
    147147
    148148ALIGN 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
     156ALIGN JUMP_ALIGN
     157.RemoveEmptyLineAtTheEndOfString:
     158    dec     si
     159    dec     WORD [bp+LINE_SPLITTER.wLines]
     160    mov     BYTE [si-1], NULL
     161    jmp     SHORT .RemoveEmptyLinesAtTheEndIfAnyExists
    151162
    152163
Note: See TracChangeset for help on using the changeset viewer.