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 lines LC machine code program that processes data that we provide that you may assume starts at address 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 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 LC 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 LC Tutor begins executing instructions at the address specifed in the first line ie 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 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 LC 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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
