subject

Write an assembly language program (lc3) that prompts the user to input two numeric characters ('0' '9') from the user using trap x20 (getc). make sure to echo the characters and store them into different registers. the second number will be subtracted from the first, and the operation reported in the console: ? = .

output to the console the operation being performed (e. g. 4 ? 6 = ). using the same registers, convert the numeric characters into the actual numbers they represent (e. g.convert ‘2’ into 2).

perform the subtraction operation, and determine the sign (+/? ) of the result; if negative, determine the magnitude of the result (i. e. take 2's complement).

(ex) program performs (4? 6) and stores the result, ? 2, in a register. program recognizes that result is negative, converts ? 2 to 2, and sets flag for minus sign.

convert resulting number back to a printable character and print it, together with minus sign if necessary.

(ex) program converts 2 into '2', and stores it back in same register. program outputs the two characters ? 2 followed by newline. thus completing the subtraction operation output.

expected/ sample output

in this assignment, your output must exactly match the following, including:

a. the prompt, followed by newline

b. each input "echoed" and followed by a newline

c. the subtraction operation, including spaces as shown, also followed by a newline:

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:50
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What are ways to switch windows in excel? check all that apply. on the status bar, click the windows button, and then click the file name. on the task bar, click to display the excel jump list, and then click the file name. on the view tab, in the window group, click switch windows, and then click the file name. on the review tab, in the viewing group, click files, and then click the file name.
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
You know the right answer?
Write an assembly language program (lc3) that prompts the user to input two numeric characters ('0'...
Questions
question
Mathematics, 08.12.2020 23:50
question
Social Studies, 08.12.2020 23:50
question
Mathematics, 08.12.2020 23:50
question
English, 08.12.2020 23:50
question
Mathematics, 08.12.2020 23:50
question
Mathematics, 08.12.2020 23:50
question
Mathematics, 08.12.2020 23:50
Questions on the website: 13722361