Laboratory 2: Introduction to Looping

 


1. Objective

To become familiar with HC11 and writing machine and assembly language code to perform basic looping.

2. Tasks

Write a program that will copy the table occupying locations $31A0 - $31AF to locations $3190 -$319F in reverse order. That is: $31A0 --> $319F, $31A1 --> $319E, ..., $31AF --> $3190. Your code should closely resemble the discussions in the text book. Define the values in the table at the top of your program. Write a program that will add a series of bytes at addresses $3100 - $310F to the series of bytes at addresses $3110 - $311F, and stores the result in addresses $3120 - $312F respectively. The original bytes at $310x and $311x should remain unchanged. Define the values to be added to at the top of your program. Modify the program LAB1.ASM (that you wrote for the first lab) to use counting loops. So, anywhere you perform the same operation (or set of operations) on a group of consecutive bits, replace the repeated sets with a single counting loop. Notice the code you need to add is similar to the code you wrote for the first two parts of this lab.