Question: Assembly language Using the AddSub program from Section 3.2 as a reference, write a program that subtracts three integers using only 16- bit registers. Insert

Assembly language
Using the AddSub program from Section 3.2 as a reference, write a program that subtracts three integers using only 16- bit registers. Insert a call DumpRegs statement to display the register values. TITLE Add and Subtract (AddSub.asm) ; This program adds and subtracts 32-bit integers. INCLUDE Irvine32.inc code main PROC mov eax,10000h add eax,40000h sub eax,20000h call DumpRegs exit main ENDP END main let use the following values varl 400 var2 100 var3 70 var4 9 and then move var1 in to EAX and then subtract var2, then var3, and then var4 EAX should then hold 221 TITLE Add and Subtract, Version 2 : This program adds and subtracts 32-bit unsigned ; integers and stores the sum in a variable. INCLUDE Irvine32.inc (AddSub2.asm) data vall DWORD 10000h val2 DWORD 40000h va13 DWORD 20000h finalVal DWORD? .code main PROC moy eax,vall add eax,val2 sub eax,val3 mov finalval.eax call DumpRegs exit start with 10000h : add 40000h : subtract 20000h : store the result (30000h) : display the registers : predefined MS-Win func tion main ENDP END main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
