Question: Define these 8-bit numbers in memory: 1 16 5 21 10 13 -1 Define three adjacent 8-bit fields in memory named SUM1, SUM2, and SUM3.
Define these 8-bit numbers in memory:\ 1 16 5 21 10 13 -1\ Define three adjacent 8-bit fields in memory named SUM1, SUM2, and SUM3.\ Ignore carries and overflow.\ Part 1. Using a loop, compute their sum, and store their sum into an 8-bit field called SUM1.\ Include the -1. You know how many numbers there are, so coding the loop should be\ straightforward. To drive the loop, use a counter starting at zero.\ Part 2. Repeat part 1, storing the sum into SUM2. To drive the loop, use a counter starting at\ the number of numbers.\ Part 3. This time, write code that could be used to add up an array of 8-bit numbers, of any\ length. The last number is -1. That's the end-of-list indicator, not a member of the array to be\ added. Store the sum into SUM3.\ End your code with a HALT instruction. For grading, submit the .asm file using the naming\ convention lastnameAn.asm.
Step by Step Solution
There are 3 Steps involved in it
The question involves coding a loop to sum a list of 8bit numbers while storing the sum in specific memory fields It requires a stepbystep understandi... View full answer
Get step-by-step solutions from verified subject matter experts
