Question: This problem should be done on CodeWarrior Allocate a 6-byte array samples initialized with the signed integers, $20, S30, $40, SA0, SB0 and $90, and

This problem should be done on CodeWarrior

This problem should be done on CodeWarrior Allocate a 6-byte array samples

Allocate a 6-byte array samples initialized with the signed integers, $20, S30, $40, SA0, SB0 and $90, and a variable sum in the RAM area of memory. Write a program which computes the sum of the six integers in samples. The integers in samples are to be added in the order they are in samples, i.e., the first integer first and the last integer last. Each partial sum (being overwritten) and the final total sum must be stored in sum. 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 sum 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, 3rd and 5th additions is completed and also right after the total sum is stored in sum. The first addition refers to the addition of the first two integers 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 each addition is performed and 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!