Question: In machine code and prints to screen. Write a short ( 1 5 lines ) LC - 3 machine code program that processes data that

In machine code and prints to screen.
Write a short (15 lines) LC-3 machine code program that processes data that we provide that you may assume starts at address x3000. The data is a variable number of values in a list, and the end of the list is
marked with a terminating value that is 0. Process each value in the list following this simple algorithm:
Initialize index to zero
For each data value
Add index to the value
Output the resulting sum as an ASCII character
Increment index
Repeat for the next data value until the terminating value is reached
Halt the program
The first list of data below is for developing your program. If your program is working correctly, it will display "CS" and then halt. Recall that the first line is the starting address that LC3 Tutor requires.
{:;
Use the larger list of data below to confirm your program still works for a different size list. Without changing any of your program's instructions, just replace the data and run the program. A working program will
display a recognizable word, name, or phrase.
ASIDE: Recall LC3 Tutor begins executing instructions at the address specifed in the first line (i.e.,x3000), but that's the start of the list of data. How does execution skip over this data to get to your code? It actually
executes each data value as an instruction, but the execution does nothing! As discussed in lecture, any data of the form 00000000 XXXX XXXX is executed as a "branch never" operation, which is consider a NOP
since it does No OPeration.
Provide the complete machine code including the larger list of data above followed by your program's instructions. Assembly code programs will not receive credit. For grading, we'll copy and paste your submission
into LC3 Tutor's RAW editor. For full credit, your submission should process without any errors, load into the simulator, and run displaying the correct result. We will also run your code on a secret list of data of a
different size to confirm your program operates as specified. You may assume this secret data list is in the correct format - a list of values terminated with a 0.
In machine code and prints to screen. Write a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!