:LowerString
{
 Description: 
    Returns string with all alphabetic characters converted to lowercase.
 Type: SET  
 
 
 Parameters:
   Passed:
     0@, 1@, 2@, 3@ (0@v) - long string to lower
     4@ - type of variable to return (2 - short var, 4 - long var) 
 
 Example:
  0AB1: call_scm_func @LowerString 5 string 1@ 2@ 0 0 return_type 2 1@ 2@       
}
0A9F: 5@ = current_thread_pointer
5@ += 60    // 0@ adress  


:LowerStringLoop
0A8D: 6@ = read_memory 5@ size 1 virtual_protect 0
   
if
6@ <> 0x00
else_jump @LowerStringReturn

    if and
    6@ >= 65
    6@ <= 90
    then
    6@ += 32
    0A8C: write_memory 5@ size 1 value 6@ virtual_protect 0
    end
    
5@ += 1       
jump @LowerStringLoop

:LowerStringReturn

    if
    4@ == 4
    then
    0AB2: ret 4 0@ 1@ 2@ 3@
    else
    0AB2: ret 2 0@ 1@ 
    end