Changeset 46 in xtideuniversalbios for trunk/Assembly_Library/Src/String/String.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/String/String.asm

    r41 r46  
    22; Project name  :   Assembly Library
    33; Created date  :   12.7.2010
    4 ; Last update   :   6.9.2010
     4; Last update   :   1.10.2010
    55; Author        :   Tomi Tilli
    66; Description   :   Functions for handling characters.
     
    7676    pop     ax
    7777    ret
     78
     79
     80;--------------------------------------------------------------------
     81; String_ConvertDSSItoLowerCase
     82;   Parameters:
     83;       DS:SI:  Ptr to NULL terminated string to convert
     84;   Returns:
     85;       Nothing
     86;   Corrupts registers:
     87;       Nothing
     88;--------------------------------------------------------------------
     89ALIGN JUMP_ALIGN
     90String_ConvertDSSItoLowerCase:
     91    push    si
     92    push    ax
     93
     94ALIGN JUMP_ALIGN
     95.ConvertNextCharacter:
     96    lodsb
     97    test    al, al              ; NULL to end string?
     98    jz      SHORT .EndOfString
     99    call    Char_ALtoLowerCaseLetter
     100    mov     [si-1], al
     101    jmp     SHORT .ConvertNextCharacter
     102
     103ALIGN JUMP_ALIGN
     104.EndOfString:
     105    pop     ax
     106    pop     si
     107    ret
Note: See TracChangeset for help on using the changeset viewer.