subject

Lc-3 assembly language.

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: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:30
Jessie has received a contract to build a real-time application for a baker. however, the baker doesn't want to invest too much money. his only requirement is that he wants the customers to know which cupcakes are available at what time and in what quantity. so his core requirement is that the details of product should be in real time. what platform can jessie use to develop this application?
Answers: 1
question
Computers and Technology, 22.06.2019 09:30
My mom and i are moving and we don’t have wifi for the next week, i want to know if using a using a hotspot with unlimited data is better than using regular wifi. i’m considering cost, speed, and data sacrifices.
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 17:00
What are the 12 colors of the spectrum called?
Answers: 1
You know the right answer?
Lc-3 assembly language.

one of the things an assembler has to do is take assembly langua...
Questions
Questions on the website: 13722363