Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A. Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression: A = (B)-(C D), using registers.
A. Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression: A = (B)-(C D), using registers. Assign integer values to the EAX, EBX, ECX, and EDX registers. (Hint: replace A, B, C, & D with the registers EAX to EDX) 1. Click here to download the code examples and required libraries for the book. Unzip the downloaded 2. 3. file into a directory named Irvine on Drive C Download the program from: Click here to download a zip file containing a 32-bit Visual Studio 2015 project Do the following steps, in order: Start Visual Studio To begin, selecting File/Open/Project from the Visual Studio menu Navigate to your working tolder where you unzipped our project tile, and select the tile named Project.sln Once the project has been opened, you will see the project name in the Solution Explorer window. You should also see an assembly language source file in the project named AddTwo.asm. Double-click the file name to open i , pen our sampl le Visual Studio project file by in the editor 4. You should see the following program in the editor window: ;AddTwo. asm - adds two 32-bit integers. ; Chapter 3 example 386 model flat,stdcall stack 4096 ExitProcess proto, dwExitCode:dword code main proC eax, 5 eax, 6 mov add invoke ExitProcess, 0 main endp end main Make the required changes. A = (B)-(C + D) 6. Select Build Project (this will assemble and link your program) from the Build menu. Yoiu should see messages like the following, indicating the build progress
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started