This table looks like a definition of what the instruction (code 22h) does when the CPU executes it. So the instruction, in whole, has 5 steps to execute the whole process. To you, as a programmer, it still looks like just one instruction.
Z80 is an old 8 bit technology and at the time we could not read 64 bits at once (or even more with caches of today). So each read or write to the memory was one step and one byte at a time.
The table explains what is happening on each step. This is particularly important if you are trying to build a computer with that CPU. However, it is much less important if you are programming the chip unless you do something that includes timing that needs to be correct to the cycle.
So the MOV label, HL
would move 16 bits from memory at address label to the register HL
.
(1) First the processor reads one byte at PC and finds out that the instruction is 22h. Ah! That's a MOV label, HL
.
(2,3) The process now knows it has to read two more bytes from PC, representing a memory address. Z80 being a little endian, it first reads the low byte (from PC + 1) and then the high byte (from PC + 2).
(4,5) The address loaded with step (2,3) is now in a temporary register (internal CPU buffer called ZR
) and is used to read two bytes from memory. These two bytes are saved in the HL
register. HL
means High and Low bytes. So the byte at ZR
is loaded in L
and the byte at ZR + 1
is loaded in H
(again, we are loading the register in little endian).
Note: PC will end up being incremented by 3 and is possibly increment by one each time it is used to read one byte.
So it loads the contents of the HL
double register at once from a memory buffer specified by label
(a hard coded address in the 64Kb addressable memory.)
For example, if you start with HL
set to 0x0000
and you have the instruction:
MOV 0x2345, HL
and at address 0x2345
you have byte 0x12
and at address 0x2346
you have byte 0x56
then HL
ends up being: 0x5612
.
And the instruction will be encoded as: 0x22 0x45 0x23