Question
The numbers X and Y are found at locations x3100 and x3101, respectively. Write an LC-3 assembly language program that does the following. Compute the
The numbers X and Y are found at locations x3100 and x3101, respectively. Write an LC-3 assembly language program that does the following.
Compute the sum X +Y and place it at location x3102.
Compute X AND Y and place it at location x3103.
Compute X OR Y and place it at location x3104.
Compute NOT(X) and place it at location x3105.
Compute NOT(Y) and place it at location x3106.
Compute X +3 and place it at location x3107.
Compute Y 3 and place it at location x3108.
If the X is even, place 0 at location x3109. If the number is odd, place 1 at the same location.
The operations AND, OR, and NOT are bitwise. The operation signified by + is the usual arithmetic addition
Inputs: The numbers X and Y are in locations x3100 and x3101, respectively:
x3100 | X |
x3101 | Y |
OUTPUTS: The outputs at their corresponding locations are as follows:
x3102 | X + Y |
x3103 | X AND Y |
x3104 | X OR Y |
x3105 | NOT(X) |
x3106 | NOT(Y) |
x3107 | X + 3 |
x3108 | Y - 3 |
x3109 | Z |
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