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, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Which one of the following functions is not available on the autosum tool? sum average if max
Answers: 3
question
Computers and Technology, 24.06.2019 15:30
Python. primary u.s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west.
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: 13722359