Question: Write a LC-3 assembly program to subtract two integers (between 0 and 9) provided by the user. Prompt the user to input two integers, subtract
Write a LC-3 assembly program to subtract two integers (between 0 and 9) provided by the user. Prompt the user to input two integers, subtract one from the other, and display the difference. If the difference is negative, display the negative sign also.
Heres the interaction for two different runs of the program:
Demo of a simple subtraction program:
Input an integer: 9
Input a second integer: 4
The difference is: 5
Demo of a simple subtraction program:
Input an integer: 5
Input a second integer: 8
The difference is: -3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
