Question: Allocate a 7-byte array, samples and a variable tsum in the RAM arca of memory. Initialize thc array, samples, with the signed integers, SDO, SBO,

Allocate a 7-byte array, samples and a variable tsum in the RAM arca of memory. Initialize thc array, samples, with the signed integers, SDO, SBO, $90, S70, $50, S30 and $10. Write a progranm which computes the sum of the seven integers in the array, samples and storcs the total sum in the variable, tsum. The integers in samples are to be added to the register a in the reverse order, i.c., the last (the 7th) integer first and the first one last. Use the register a as an accumulator and tsum should be accessed only after the total sum is obtained. You are required to use all of the 4 addressing modes, i.c., extended, constant offset indexed, register offsct indexed and auto- increment/decrement indexed addressing modes. Your program should work correctly independent of the contents in the array. The auto-increment/decrement indexed addressing mode should be used at least twice in a row. RAMStart-$0800 and ROMStart-$4000 Assemble the program and cxccute it in the single-stcp mode with the contents of samples and tsum displayed in the memory window. Do screen-captures (the source, register and memory windows) at cach of the following instances Right after cach of the 3rd, 5th and 7th additions is completed and also right after the total sum is stored in tsum. Submit the list file of your code with the 4 sets of screen-captures attached. Also, record the 4 flags (N, Z, C, and V) right after cach addition is performed and determine if and when an overflow occurS. Allocate a 7-byte array, samples and a variable tsum in the RAM arca of memory. Initialize thc array, samples, with the signed integers, SDO, SBO, $90, S70, $50, S30 and $10. Write a progranm which computes the sum of the seven integers in the array, samples and storcs the total sum in the variable, tsum. The integers in samples are to be added to the register a in the reverse order, i.c., the last (the 7th) integer first and the first one last. Use the register a as an accumulator and tsum should be accessed only after the total sum is obtained. You are required to use all of the 4 addressing modes, i.c., extended, constant offset indexed, register offsct indexed and auto- increment/decrement indexed addressing modes. Your program should work correctly independent of the contents in the array. The auto-increment/decrement indexed addressing mode should be used at least twice in a row. RAMStart-$0800 and ROMStart-$4000 Assemble the program and cxccute it in the single-stcp mode with the contents of samples and tsum displayed in the memory window. Do screen-captures (the source, register and memory windows) at cach of the following instances Right after cach of the 3rd, 5th and 7th additions is completed and also right after the total sum is stored in tsum. Submit the list file of your code with the 4 sets of screen-captures attached. Also, record the 4 flags (N, Z, C, and V) right after cach addition is performed and determine if and when an overflow occurS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
