Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is done in assembly language. The first image is an example code illustrating how to add two variables together positively and add the result.
This is done in assembly language. The first image is an example code illustrating how to add two variables together positively and add the result.
The question that needs to be done is as follows:
INCLUDE asmlib.inc . data prompt BYTE "Enter a number", 0 outP BYTE "The sum offset your numbers is ", 0 val DwORD? . code main PROC mov edx, OFFSET prompt call writeLine call readInt mov val, eax call writeLine call readInt add eax, val mov edx, OFFSET outP call writestring call writeInt exit main ENDP END main Use the code that was given in the video to perform the following tasks: Create two DWORD variables. Prompt for input and store the values input from the keyboard into the variables. Subtract the second number from the first and output the difference. Using logic swap the values in the two variables with each other. Output the swapped values. Here is an example of how your program should run
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