//0AB1: call @copy_string 4 text 0@ start 0 end 9 to_buffer 1@
:copy_string
var
1@: int
2@: int
4@: int
5@: int
end
if 1@ < 0
then
059A: return_false
ret 0
end
0C17: 5@ = strlen 0@
if 2@ > 5@
then
2@ = 5@
end
if 5@ <= 0
then
059A: return_false
ret 0
end
if 2@ < 1@
then
059A: return_false
ret 0
end
if 1@ >= 1
then
for 4@ = 0 to 1@
inc(0@)
end
end
2@ -= 1@
inc(2@)
0C10: memcpy destination 3@ source 0@ size 2@
0485: return_true
ret 0
:copy_string
var
1@: int
2@: int
4@: int
5@: int
end
if 1@ < 0
then
059A: return_false
ret 0
end
0C17: 5@ = strlen 0@
if 2@ > 5@
then
2@ = 5@
end
if 5@ <= 0
then
059A: return_false
ret 0
end
if 2@ < 1@
then
059A: return_false
ret 0
end
if 1@ >= 1
then
for 4@ = 0 to 1@
inc(0@)
end
end
2@ -= 1@
inc(2@)
0C10: memcpy destination 3@ source 0@ size 2@
0485: return_true
ret 0