Assembly Program to add two Integers

include irvine32.inc

.data
msg  byte " This Program Add 2 Integer numbers: ",0,13h,10h
msg2 byte " First No is  =  ",0
msg3 byte " Second No is =  ",0
msg4 byte " Sum is equal to  =  ",0
num1 word 10
num2 word 20

.code                                     ;;;code start from here
main proc
call clrscr
mov edx,offset msg
call writestring
call crlf

call crlf
mov edx,offset msg2
call writestring
mov ax,num1
call writeint
call crlf

mov edx,offset msg3
call writestring
mov ax,num2
call writeint
call crlf

call crlf
mov edx,offset msg4
call writestring
mov ax,num1
add ax,num2
call writeint
call crlf

exit
main endp
end main


No comments

Powered by Blogger.