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 03:30
Which group on the home tab allows you to add shapes to a powerpoint slide?
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
You know the right answer?
Write an assembly language program (lc3) that prompts the user to input two numeric characters ('0'...
Questions
question
Social Studies, 22.04.2021 16:30
question
Mathematics, 22.04.2021 16:30
question
Mathematics, 22.04.2021 16:30
question
Mathematics, 22.04.2021 16:30
question
Social Studies, 22.04.2021 16:30
question
English, 22.04.2021 16:30
Questions on the website: 13722362