Strcat
:strcat
// 0@ - destination, 1@ - source
// Example: 0AB1: @strcat 2 destination 0@ source 1@
0AB1: @strlen 1 string 0@ _return: 2@
0AB1: @strlen 1 string 1@ _return: 3@
005A: 0@ += 2@ // (int)
0AB1: @memcpy 3 destination 0@ source 1@ size 3@
005A: 0@ += 3@ // (int)
0AB1: @memset 3 destination 0@ value 0 size 1
0AB2: ret 0
:strlen
{
Example: 0AB1: @strlen 1 string 1@ _return: 3@
In: 0@ - text;
Out: 1@ - size;
}
for 1@ = 0 to 1024
0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0
if not 2@ == 0
jf break
0@ += 1
end
0AB2: ret 1 1@
Strncpy
:strncpy
var
0@ : integer
1@ : integer
2@ : integer
30@ : integer
31@ : integer
end
// 0@ - destination, 1@ - source, 2@ - size
// Example: 0AB1: @strncpy 3...