

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; Professor: He; Class: Microcomputer Systems; Subject: ECE Elect & Computer Engr; University: Tennessee Tech University; Term: Spring 2008;
Typology: Lab Reports
1 / 3
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 68HCS using assembler directives and arithmetic instructions. You will NEED to study the directives and arithmetic operation instructions in Huang chapter 2 before attempting this program.
Prepare the pseudocode and the first draft of the program and calculate the expected results (Sum, Average, Difference) by hand. 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:
Procedure : First, use D-Bug12 to fill memory locations $1000 through $1600 with zeros. Then assemble, download, and single-step through the program to debug it. Verify that each value change, in registers and memory, 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. When finished debugging and executing, copy the entire terminal window output and paste it into a Notepad or Word document for inclusion in the report. You may edit out mistakes and repetitions before submission.
_Approved: Lab TA _____________________ Date _____________
Generally, follow the format for source code as described in the ECE3120 Assembly Language Practice document. Specifically for our class: