Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE FREESCALE CODEWARRIOR WHEN ANSWERING THE QUESTION! (New Project -> HCS12 -> MC9S12C32 -> Full Chip Simulation ->Absolute Assembly -> Finish) Allocate two 6-byte arrays,

USE FREESCALE CODEWARRIOR WHEN ANSWERING THE QUESTION!

(New Project -> HCS12 -> MC9S12C32 -> Full Chip Simulation ->Absolute Assembly -> Finish)

Allocate two 6-byte arrays, sarray and darray, in the RAM area of memory and initialize the array, sarray, with the numbers, $12, $34, $56, $78. $9A and $BC. Write a program which copies the contents of sarray into darray in the reverse order. That is, the first byte of sarray is copied into the last byte of darray, the second byte into the second last 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 offset indexed, register offset 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 file of your code with the 4 sets of screen-captures attached.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Is conflict always unhealthy? Why or why not? (Objective 4)

Answered: 1 week ago