

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Class: Microcomputer Systems; Subject: ECE Elect & Computer Engr; University: Tennessee Tech University; Term: Spring 2004;
Typology: Lab Reports
1 / 2
This page cannot be seen from the preview
Don't miss anything!


The purpose of this lab is to introduce you to basic programming with the 68HC12 using assembler directives and arithmetic instructions. You will NEED to study the directives and arithmetic operation instructions in Huang chapter 2 before attempting any programming. The code is fairly simple to write since it is very similar to what you did in Lab1.
Prepare pseudocode and the first draft of the program and calculate the expected results. This must be completed before coming to the lab and shown to the lab instructor at the start of the lab session.
_Approved: Lab TA _____________________ Date _____________
Write a fully-commented program for the HC12 board, including appropriate directives and labels for memory operands and constants, called Arith.asm. The program should do the following:
Assemble, download, and then single-step through the program to debug it. Write an execution trace list, showing each instruction and recording every change in value of all registers (including CCR) and/or memory after each instruction. Verify that each change is correct and that the final values of average, sum, and difference are correct. Then reset the processor, download the program again, run it at full speed until it stops, and verify that the final values are still correct.
_Approved: Lab TA _____________________ Date _____________
2/13/04 Page 1 of 2 Lab 2
2/13/04 Page 2 of 2 Lab 2