home *** CD-ROM | disk | FTP | other *** search
/ Groovy Bytes: Behind the Moon / groovybytes.iso / GROOVY / SND_TOOL / FUNK108A.ZIP / DOS32V30.ZIP / PAL / STRINGS / STRLWR.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-05-20  |  902 b   |  40 lines

  1. ;******************************************************************************
  2. ; Filename: STRLWR.ASM
  3. ;   Author: Peter Andersson
  4. ;  Version: 0.0
  5. ;  Created: 1995.03.12
  6. ;  Updated: 
  7. ;******************************************************************************
  8. ; Copyright Peter Andersson, 1994-1995.
  9. ; All rights reserved.
  10. ;******************************************************************************
  11. ; Function: PSZ @strlwr(PSZ str)
  12. ;  Comment: Converts a string to lowercase.
  13. ;    Input: Eax - string pointer
  14. ;  Returns: str
  15. ;******************************************************************************
  16.  
  17.     Include    STDDEF.INC
  18.  
  19.     Codeseg
  20.  
  21. Proc    strlwr  ,1
  22.         Mov    Edx,Eax
  23.         Clear    Ecx
  24.     Align    4
  25. @@Loop:        Mov    Cl,[Eax]
  26.         Mov    Cl,[Ecx+LowerCaseTable]
  27.         Mov    [Eax],Cl
  28.         Inc    Eax
  29.         TestZ    Cl
  30.         Jnz    @@Loop
  31.         Mov    Eax,Edx
  32.         Ret
  33. Endp
  34.  
  35.     Dataseg
  36.  
  37.         Include    "LOWCASE.INC"
  38.  
  39.     End
  40.