Question: The program will contain four32-bit integer variables and add these values together, saving the result in a variable. The sum should still be in the

The program will contain four32-bit integer variables and add these values together, saving the result in a variable. The sum should still be in the EAX register when you call the library routine DumpRegs .

Have your values initialized in the data segment

INCLUDE Irvine32.inc

.data val1 DWORD 20 ;32-bit usigned integer val2 DWORD 28 ;32-bit usigned integer val3 DWORD 36 ;32-bit usigned integer val4 DWORD 42 ;32-bit usigned integer sum DWORD 0 ;32-bit usigned integer

.code main PROC mov eax, val1 ;EAX=val1(20) add eax, val2 ;EAX=eax(20)+val2(28), 48 add eax, val3 ;EAX=eax(48)+val3(36), 84 add eax, val4 ;EAX=eax(84)+val4(42), 126, 7E in hex mov sum, eax ;move EAX(126) into var sum call DumpRegs ;display registers exit main ENDP

END main

I have the code needed for the question above but I need more comments per line detailing what each line does. Please detail as much as possible for upvote.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!