Learning Goal: I’m working on a assembly language question and need the explanation and answer to help me learn.
Subtracting three integers.
Using the ADDSUB program from the section 3.2 as a reference, write a program that subtracts three integers only 16-bit registers. Insert a cal DumpRegs statement to display the register values
This program must be done using Visual studio. Please submit .asm file or copy/paste your program here.
Please note that you will have two extra days of grace period for all homeworks, including midterm and final exam projects.Could you give the answer with a unique one (integer) so that I do not get detected?
here is the code of the ADDSUB;
TITLE Add and Subtract, Version 2 (AddSub2.asm); This program adds and subtracts 32-bit unsigned; integers and stores the sum in a variable.INCLUDE Irvine32.inc.dataval1 DWORD 10000hval2 DWORD 40000hval3 DWORD 20000hfinalVal DWORD ?.codemain PROCmov eax,val1 ; start with 10000hadd eax,val2 ; add 40000hsub eax,val3 ; subtract 20000hmov finalVal,eax ; store the result (30000h)call DumpRegs ; display the registersexitmain ENDPEND main