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 10:20
Shown below is the start of a coding region within the fist exon of a gene. 5'--3' 3'--5' how many cas9 pam sequences are present?
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
What type of file does a cookie place on web site visitors' computers so that web site managers can customize their sites to their visitors' preferences?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 10:00
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
You know the right answer?
Lc-3 assembly language.

one of the things an assembler has to do is take assembly langua...
Questions
question
History, 07.06.2021 18:30
question
Mathematics, 07.06.2021 18:30
question
Arts, 07.06.2021 18:30
question
English, 07.06.2021 18:30
question
Mathematics, 07.06.2021 18:30
Questions on the website: 13722360