subject

One of the things an assembler has to do is take assembly language instructions (like add, and, and jmp) and convert those into binary opcodes. each assembly instruction has a corresponding 4-bit binary opcode. for example, the binary opcode for add is 0001, for and it's 0101, and for jmp it's 1100.

write an lc-3 assembly language program that does the following:

output a message to the screen that prompts the user to type in an lc-3 assembly language instruction (like add). the user ends their input by pressing enter/return.

if the instruction typed by the user is a legal lc-3 assembly language instruction, your program displays the corresponding 4-bit opcode. for example, if the user types "add", the program would print out "0001".

if the instruction typed by the user is not a legal lc-3 assembly language instruction (for example, "addd"), your program displays an appropriate error message.

after displaying the output, your program loops back to the top, reinitializes anything that needs to be reinitialized, and goes again.

your program will exit when the user types the string "quit" and presses enter/return.

note: your program must treat input as case insensitive, meaning that the user can type their input in any combination of upper and lower case. for example, "add", "add", and "add" would all be legal instructions.

note: as the user types an instruction, your program should echo each typed character to the monitor so they can see what they're typing.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
question
Computers and Technology, 24.06.2019 06:00
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Why might you choose to create a functional resume
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
Why is it uncommon for users to perform searches directly in database tables? a.)users are discouraged from interacting directly with tables because they might confuse tables with spreadsheets. b.) users are discouraged from interacting directly with tables because this may result in unintended changes to source data. c.)users do not have the technical skills required to perform searches directly in database tables. d.)users do not have the permissions required to perform searches directly in database tables.
Answers: 1
You know the right answer?
One of the things an assembler has to do is take assembly language instructions (like add, and, and...
Questions
question
Computers and Technology, 28.06.2019 21:30
Questions on the website: 13722363