Write an Assembly program that will declare four global variables. Assign values to the variables.
Sum the first three variables and store the result in the fourth variable.
add
Integer addition
The add instruction adds together its two operands, storing the result in its second
operand. Note, whereas both operands may be registers, at most one operand may be a
memory location.
Syntax
add <reg>, <reg>
add <mem>, <reg>
add <reg>, <mem>
add <con>, <reg>
add <con>, <mem>
<con> Any 8-, 16-, 32 or 64 - bit immediate
Examples
add $10, %eax - EAX is set to EAX + 10
addb $10, (%eax) - add 10 to the single byte stored at memory address stored
in EAX