EE 308
Homework Assignment 2
Due Feb. 2, 2000
- Consider the following hexadecimal 8-bit numbers as unsigned. Find their
decimal equivalents:
- 0xC5
- 0x82
- 0x78
- 0x5C
- Repeat Problem 1, considering the numbers as signed.
- Consider the hexadecimal 8-bit numbers below. Do the
indicated operation, and find the 8-bit result. Determine if a carry resulted.
Determine if an overflow resulted.
- 0x47 + 0x3C
- 0x9A + 0x81
- 0x92 - 0x83
- 0xD2 - 0x61
- Write an instruction sequence to add the 8-bit numbers at address
0x0900 and 0x0901, and store the result into address 0x0902.
- Write an instruction sequence to swap the contents of accumulators
X and Y. Hint: Use a memory location as a swap buffer.
- Consider the program of Figure 1 of Lab 2.
- 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
ldaa #12
will result in
addr code
0x0800 0x86
0x0801 0x0C
- How many instruction cycles will it take the HC12 to execute this program?
(Do not consider the swi instruction.)
How long will this take on an HC12 with an 8 MHz E-clock?
- Consider the program of Figure 3 of Lab 2.
- How many instruction cycles will it take to execute this
program?
- How long will this take on your EVBU?
(Do not consider the swi instruction.)
Bill Rison,
<rison@ee.nmt.edu >