Question: In Laboratory Exercise #10, you wrote an LC-3 program that rotated a given bit pattern (ORIGINAL) by a given amount (AMOUNT) and stored the result
In Laboratory Exercise #10, you wrote an LC-3 program that rotated a given bit pattern (ORIGINAL) by a given amount (AMOUNT) and stored the result in ROTATED. In this programming activity, you will modify your program to prompt and retrieve the value of AMOUNT from the keyboard. Assume that the ORIGINAL is already in memory. Your program should then display the ORIGINAL and ROTATED bits as 16-character strings with correct labels.
Example: If ORIGINAL contains the bit pattern 1101000100001011 and the user entered a 5 as the amount to be rotated, then your program should display the following output:
AMOUNT: 5
ORIGINAL: 1101000100001011
ROTATED: 0010000101111010
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
