EE 308

Homework Assignment 5
Due Feb. 18, 1999

  1. An HC12 has registers with the following values. Show the contents of the registers as the following instructions are executed. Assume that the address of the first instruction is 0x0800.
                         A    B     X     Y    SP    PC  CCR
                        A2   CF  0900  3456  0000  0800   D5
    
       LDS  #$0A00
       ABA
       PSHA
       PSHB
       PULY
       JSR  $835
    
    

  2. Write a sequence of instructions which will make bits 3-0 of PORT B input and bits 7-4 of PORT B output. These instructions should be in assembly language.


  3. Write the program for Lab 5. Make sure you use top-down design, and document your program with comments. This program should be in assembly language.


Bill Rison, <rison@ee.nmt.edu >