ASSIGNMNTS
1. How is the accumulator different from the 8-bit general-purpose registers of the Z80 microprocessor?
2. Explain the function of the alternate registers.
3. What is a flag, and what is its function?
4. If the Z80 adds 87H and 79H, specify the contents of the accumulator and the status of the S, Z, and CY flags.
5. If the Z80 is an 8-bit microprocessor, why are the program counter and the stack pointer 16-bit registers?
6. If the Z80 has fetched the machine code located at the memory location 205FH, specify the contents of the program counter.
7. The index register IX holds the address 2058H• Specify the value of the displacement byte needed to make the effective address 2097H•
8. The index register IY holds the address 2070H• Specify the value of the displacement byte in 2’s complement needed to make the effective address 2050H•
9. List the six types of operations the Z80 performs.
10. Define opcode and operand, and specify the opcode and the operand in the instruction LD A, B.
11. Explain the instruction LD A, B. Specify the data source and destination.
12. If the instruction LD A, B is stored in memory location 2005H, what are the contents of the memory register?
13. Explain the instruction SUB H. List the operand implicit in the instruction.
14. Write mnemonics to load F8H into register C, and show the Hex codes with the memory address starting at 1800H•
15. Write -logical steps to load the following three Hex numbers (2F, 47, and 7 A) into Z80 registers B, C, and D, respectively. Add the numbers, and save the / sum in register H. •
16. Translate the steps in the previous question into Z80 assembly language.
17. Redraw the flowchart in Figure 6.5 by interchanging the answers of the decision block. For example, the program sequence will be altered if the answer is "Yes." (Hint: The flowchart can have two End statements.)
Draw a flowchart to represent the following problem. Load two numbers into Z80 registers, and subtract the second number from the first number. If the result generates a borrow, display FFH at the output port of the system; otherwise, display the second number.