Assignment 6

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Assignment

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 edx,offset msg1


call writestring
mov edx,offset array
mov ecx,sizeof array
call readstring

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

You might also like