Homework Assignment 3
Due Feb. 4, 1999
- Consider the program of Figure 1 of Lab 3.
- Hand assemble this program. Determine the hexadecimal
numbers which will be generated when this program is assembled, and at what
locations they will be stored in the HC11. For example, the first instruction
will result in
- How many instruction cycles will it take the HC12 to execute this program?
How long will this take on an HC12 with an 8 MHz E-clock?
- Consider the program of Figure 3 of Lab 3.
How many instruction cycles will it take to execute this
program? How long will this take on your EVBU?
- Dissassemble the following machine code into 68HC12 assembly
instructions. Use Table A-2 of the CPU Reference Guide.
96 80 7a fa 84 40 c3 7a fa fa 97 41
- Which of the conditional branch instructions in the following list
will cause a branch to be taken if the condition flags N = C = 1 and Z = V =
- BCC label
- BNE label
- BGE label
- BGT label
- BHI label
- BMI label
- Write a program to swap the last element of an array with the first
element, the next-to-last element with the second, etc. Assume the array has
0x20 8-bit numbers, and that the array starts at address 0x0900.
- Write a program to determine the number of negative numbers in an
array. Assume the array starts at address 0x8000 and ends at 0x9FFF.