Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using lc 3 code, write a code supported by the details. Details The program must start at address x 3 0 0 0 . Here
using lc code, write a code supported by the details. Details
The program must start at address x Heres how the program must behave:
The program sends a newline to the console and then prints Enter First Number binary digits: which serves as a prompt to tell the user that the program is waiting for input. The prompt string is a string, followed by a single space.
The user types a fourdigit binary number on the keyboard. As the numbers are typed on the keyboard they should be echoed onto the console window. Any illegal input values are ignored after they are echoed. The program must check and accept only or numerical digits. The program should recognize the entry as complete when it sees valid digits.
The program sends a newline to the console and then prints Enter Second Number binary digits: which serves as a prompt to tell the user that the program is waiting for input. The prompt string is a string, followed by a single space.
The user types a fourdigit binary number on the keyboard. As the numbers are typed on the keyboard they should be echoed onto the console window. Any illegal input values are ignored after they are echoed. The program must check and accept only binary numerical digits. The program should recognize the entry is complete when it sees valid digits.
If the user types the character q at any time the program should display a newline and the string Thank you for playing! and then Halt.
The program will perform an OR function on the first number and second numbers, of the values that have been entered on the keyboard. These userentered numbers must be converted to binary for
the function. The program then converts this largest binary number to a fourdigit binary number and converts the digits to ASCII code.
The program sends a newline to the console and then prints the following on the console:
The OR function of the two numbers is: zzzz
where zzzz is the fourdigit binary number. A linefeed newline is printed at the end of the string. Your code will not print in boldface, of course; thats just used for emphasis here.
The program returns to step
Do not use subroutines the JSR instruction for this assignment. Points will be deducted if you do
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