{$CLEO}
0000:
wait 8500
0AC8: 0@ = allocate_memory_size 260
0AD3: 0@ = format "me3r3 co0apt3"
0AC8: 1@ = allocate_memory_size 260
0AB1: call_scm_func @get_digits_to_print param_count 2 text 0@ memory_to_store_digits_as_text 1@
0AD1: "%s" 1337 1@
0A93: end_custom_thread
:get_digits_to_print
{
0@ = text
1@ = pointer to memory where digits will be stored as text
}
0C17: 31@ = strlen 0@
for 30@ = 0 to 31@
0085: 29@ = 0@ // copy pointer
005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character)
0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the ascii number representing character
if and
28@ >= 0x30 // '0'
28@ <= 0x39 // '9'
then
0A8C: write_memory 1@ size 1 value 28@ virtual_protect 1
1@ += 1 // move to next address
end
end
0A8C: write_memory 1@ size 1 value 0 virtual_protect 1 // null-termination
0AB2: ret 0