TITLE Sum up two integers and find avg (AvgOfTwo.asm) ; ; Last update: 10/19/17 ; INCLUDE Irvine32.inc .data int1 BYTE "Input the first integer: ", 0 int2 BYTE "Input the second integer: ", 0 ans BYTE "The result is: ", 0 temp DWORD 0 dvs DWORD 2 .code main PROC MOV EDX, offset int1 call WriteString call ReadInt ; EAX = int1 call dumpregs call WriteDec ; out int1 MOV temp, EAX ; temp = int1 (storage) ;--------------------------------------- call crlf call crlf MOV EDX, offset int2 call WriteString call ReadInt ; EAX = int2 call dumpregs call WriteDec ; out int2 call crlf call crlf ADD EAX, temp ; EAX += temp call WriteDec call dumpregs call crlf call crlf ;------------------------------- ;find avg MOV EDX, 0 ; readt for division EDX:EAX / dvs DIV dvs ; out the reult MOV EDX, offset ans call WriteString call WriteDec ;call dumpregs call crlf call crlf exit main ENDP END main