RosettaCodeData/Task/Reverse-a-string/OxygenBasic/reverse-a-string-2.oxy

20 lines
206 B
Plaintext

string s="qwertyuiop"
sys p=strptr s, le=len s
mov esi,p
mov edi,esi
add edi,le
dec edi
(
cmp esi,edi
jge exit
mov al,[esi]
mov ah,[edi]
mov [esi],ah
mov [edi],al
inc esi
dec edi
repeat
)
print s