Professional Documents
Culture Documents
Assignment 6
Assignment 6
Assignment 6
ZARRAR ALI
include irvine32.inc
.data
array byte 10h dup(0)
num1 dd ?
msg1 byte 'Enter name ',0
msg2 byte 'Reverse name ',0
.code
main proc
mov ecx,eax
mov num1,ecx
mov ax,0
mov esi,0
mov edi,0
Loop1:
mov al,array[esi]
push ax
inc esi
loop Loop1
mov ecx,num1
mov ax,0
Loop2:
pop ax
mov array[edi],al
inc edi
loop Loop2
mov edx,offset msg2
call writestring
mov edx,offset array
call writestring
call crlf
exit
main endp
end main