So I'm having trouble with my code I'm trying to reverse the string so the output ends in "gnirts ecruos eht si sihT". However, I can't seem to figure out the problem.
INCLUDE Irvine32.inc
;Data section declaring variables
.data
source BYTE "This is the source string",0
target BYTE SIZEOF source DUP('#')
;main code
.code
main PROC
mov esi,0
mov edi,LENGTHOF source - 2
mov ecx,SIZEOF source
L1:
mov al,source[edi]
mov target[edi],al
inc esi
dec edi
loop L1
mov edx, OFFSET target
call WriteString
Invoke ExitProcess,0
main ENDP
END main