RosettaCodeData/Task/Reverse-a-string/OxygenBasic/reverse-a-string-2.basic
2023-07-01 13:44:08 -04:00

19 lines
206 B
Text

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