Programmer's view of Z-80


In this section we will see the basic architecture of the Z-80 Microprocessor, and different registers to write programs into it.

To write programs we have to care about the registers and some instructions to access them during program execution.

From this diagram it is clear that there are some special purpose registers like W, Z, some other registers like Stack Pointer (SP), Program Counter (PC) etc. three general purpose register pairs (BC, DE, HL) and Accumulator A. There is also an 8-bit flag register to hold the flag bits. Up to this, it is like the 8085 architecture, but in Z-80, there are some other 16-bit registers like IX, IY and alternative 8-bit secondary registers like (A’, F’, B’, C’, D’, E’, H’, L’).

The alternative registers are not for general uses. So the common instructions cannot use them directly. Like we can use LD B, A to load the data from Accumulator to B, but we cannot use LD B’, A’ or LD B, A’ or LD B’, A etc. These registers are used to store the main register contents only. So the B’ can store the content of B register, The D’ can store the content of D etc. There are two instructions for these registers. The first one is the EXX. It is 1-byte instruction. It copies the content of Register B, C, D, E, H, L to B’, C’, D’, E’, H’ and L’ respectively. Another 1-byte instruction is the EX AF, AF’. It copies the Accumulator and Flag bits into the A’F’

In this diagram, you can get the 8-bit and 16-bit registers of the Zilog Z-80 Microprocessor.

Published on 24-Dec-2018 16:05:48