Reverse a string: Difference between revisions
m
→{{header|LC3 Assembly}}
Line 1,397:
=={{header|LC3 Assembly}}==
A string is stored as a zero-terminated array of character codes. To reverse it, we first scan forwards until we find the end; we then move backwards again, copying each code into a block of memory we have reserved for the purpose; and finally, when we have
<lang lc3asm> .ORIG 0x3000
|