write a program that adds three 16bit integers using only re
write a program that adds three 16-bit
 integers using only registers. Insert a call DumpRegs
 statement to display the register values.
Solution
Here we are storing three values in value1, value2 and in value3 and summation of three values is stored in result.
.data
 ;Setting the valiarbles
 value1 DWORD 20000h
 value2 DWORD 30000h
 value3 DWORD 50000h
 result DWORD ?
.code
 main PROC
 mov ax,@data
 mov ds,ax
 mov eax,value1 ; get first value
 add eax,value2 ; adds second value
 add eax,value3 ; adds third value
 mov result,eax ; store the result
 call DumpRegs ; display registers
 exit
main ENDP

