Question: Create a CodeWarrior project using New Project Wizard (choose MC9S12C32, Assembly, Absolute Assembly, and Full-chip Simulation). Allocate two 6-byte arrays, sarray and darray, in the

Create a CodeWarrior project using New Project Wizard (choose MC9S12C32, Assembly, Absolute Assembly, and Full-chip Simulation).

Allocate two 6-byte arrays, sarray and darray, in the RAM area of memory and initialize the array, sarray, with the numbers, $10, $30, $50, $70. $90 and $B0. Write a program which copies the contents of sarray into darray in the same order. That is, the rst byte of sarray is copied into the rst byte of darray, the second byte into the second byte, etc. Copying must be done one byte at a time. You are required to use all of the 4 addressing modes, i.e., extended, constant oset indexed, register oset indexed and auto-increment/decrement indexed addressing modes. 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 the two arrays (in the variable and memory windows) displayed. Do screen-captures (the source, variable and memory windows) at each of the following instances: Before any instruction is executed, and right after each of the 1st, the 3rd and the 6th bytes is copied. Submit the list le of your code with the 4 sets of screen-captures attached.

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!