Question: Write an Assembly program that will declare four global variables. Assign values to the variables. Sum the first three variables and store the result
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 , add , add , add , add , 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
Step by Step Solution
There are 3 Steps involved in it
assembly section data var1 dd 10 declare and assign value to variable 1 var2 dd 20 declare and as... View full answer
Get step-by-step solutions from verified subject matter experts
