Question: use codewarrior to do code warrior Allocate a 6-byte array samples and a variable tsum in the RAM area of memory. Initialize the array, samples,

use codewarrior to do
code warrior
use codewarrior to docode warrior Allocate a 6-byte array samples and a

Allocate a 6-byte array samples and a variable tsum in the RAM area of memory. Initialize the array, samples, with the signed integers, $10, $20, $30, $AO, $BO and $CO. Write a program (do not use a loop) which computes the sum of the six integers in the array samples and stores the total sum in the variable tsum. The integers in samples are to be added to the register a from the first integer toward the last (6th) one, i.e., using the register a as an accumulator. The variable tsum should be accessed only after the total sum is obtained. You are required to use all of the 4 addressing modes, i.e., extended, constant offset indexed, register offset indexed and auto- increment/decrement indexed addressing modes. Your program should work correctly independent of the contents (integer values) of 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 execute it in the single-step mode with the contents of samples and tsum displayed in the memory window. Do screen-captures the source, register and memory windows) at each of the following instances: Right after each of the 1st, 3rdh and 5th additions is completed and also right after the total sum is stored in tsum. Submit a single PDF file including the list file of your code, the 4 sets of screen-captures, and the 4 flags (if each of N, Z, C, and V is set or cleared) right after each addition (also determine if and when an overflow occurs). Allocate a 6-byte array samples and a variable tsum in the RAM area of memory. Initialize the array, samples, with the signed integers, $10, $20, $30, $AO, $BO and $CO. Write a program (do not use a loop) which computes the sum of the six integers in the array samples and stores the total sum in the variable tsum. The integers in samples are to be added to the register a from the first integer toward the last (6th) one, i.e., using the register a as an accumulator. The variable tsum should be accessed only after the total sum is obtained. You are required to use all of the 4 addressing modes, i.e., extended, constant offset indexed, register offset indexed and auto- increment/decrement indexed addressing modes. Your program should work correctly independent of the contents (integer values) of 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 execute it in the single-step mode with the contents of samples and tsum displayed in the memory window. Do screen-captures the source, register and memory windows) at each of the following instances: Right after each of the 1st, 3rdh and 5th additions is completed and also right after the total sum is stored in tsum. Submit a single PDF file including the list file of your code, the 4 sets of screen-captures, and the 4 flags (if each of N, Z, C, and V is set or cleared) right after each addition (also determine if and when an overflow occurs)

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 Databases Questions!