Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Converting 32 bit to 64 bit Assembly program. I need to convert the following 32

ID: 3726814 • Letter: C

Question

Converting 32 bit to 64 bit Assembly program.

I need to convert the following 32 bit program into 64 bit.

Here is the 32 bit version provided by the book.

Here is my 64 bit version that I worked on.

I know the Include irvine32.inc probably shouldn't be there but when I removed that line, I still get other errors.

But I get the following errors:

What am I doing incorrectly? Thank you for your help.

AddVars64.asm × AddVariablesasm ; AddVariables.asm - Chapter 3 Example 2 3 INCLUDE Irvine32.inc ; Had to add 4 386 5 .model flat, stdcall 6 .stack 4096 7 ExitProcess PROTO, dwExitCode DWORD 8 9.data 10 firstval DWORD 20002000h 11 secondval 12 thirdval DWORD 22222222h 13 sum DWORD 0 14 15 code 16 main PROC 17 18 19 20 21 mov eax, firstval add eax, secondval add eax, thirdval mov sum, eax call DumpRegs call WaitMsg ; Had to add ; Had to add 23 24 25 INVOKE ExitProcess, 0 main ENDP 26 END main 90 %

Explanation / Answer

I had a similar issue and I used an older version of MASM (6.15 in my case), and it worked.