Uppercase\lowercase convertions

Started by Vortex, December 20, 2008, 10:43:10 AM

Previous topic - Next topic

Vortex

Here are two functions converting strings to uppercase and lowercase.


.386
.model flat, stdcall
option casemap:none

include     \GeneSys\include\windows.inc
include     \GeneSys\include\kernel32.inc
include     \GeneSys\include\GeneSys.inc

includelib  \GeneSys\lib\kernel32.lib
includelib  \GeneSys\lib\GeneSys.lib

uppercase   PROTO :DWORD
lowercase   PROTO :DWORD

.data

str1        db 'string converted to uppercase.',13,10,0
str2        db 'THIS STRING CONVERTED TO LOWERCASE.',0

.code

start:

    invoke  uppercase,ADDR str1
    invoke  ConsoleOut,eax
    invoke  lowercase,ADDR str2
    invoke  ConsoleOut,eax
    invoke  ExitProcess,0

END start

[attachment deleted by admin]

Vortex

Removed the unnecessary forward conditional jump in the lowercase routine.

[attachment deleted by admin]