ECE 271 Spring 2012 Homework 3 1. What is the best instruction to use for each of the following? A. Add 1 to the A register. B. Make the A register contain $00. C. Make the carry flag equal to 1. D. Copy the A register to the B register. 2. Under what condition will the result of adding 1 to the B register be different from adding 1 to the D register? 3. The COMA instruction and the NEGA instruction will subtract the A register from $FF and $00, respectively. What is the significance of these two operations? 4. After adding two numbers, you find the V bit is set and the C bit is cleared. What can you say about whether the original numbers were signed or unsigned? What can you say about the correctness of the result of the addition operation? 5. Give the instruction corresponding to each of the following opcodes: $05, $ED, $7A. (Include the Addressing Mode.) 6. Processor memory beginning at $0100 contains the following bytes: $7f $88 $C0 $08. Explain in words what happens when this code is executed. 7. Use words to describe what you know about the CCR register after the instruction "CLR $8800" is executed. Repeat for "COMA". How many bytes does each of these instructions take? How many clock cycles does each take to execute? 8. Which of these registers can hold a double byte number: A, B, D, CCR, X, Y, PC, SP? Which of the registers is typically used to hold data (as opposed to addresses)?