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, 22.06.2019 02:00
When jen is planning to upgrade to a monitor with a better resolution, what should she be looking for in the new monitor?
Answers: 1
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
question
Computers and Technology, 24.06.2019 12:00
Jack is assisting his younger sibling mary with her mathematics assignment, which includes a study of the number system. jack explains to mary that whole numbers are counting numbers that could be used to record the number of fruits in a basket. which data type represents whole numbers? a.integers.b.floating-point numbers. c.strings.d.boolean
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