If I remember correctly, the z80 was designed to implement some behaviors of the
8080 so that code could be
ported over to it relatively easy. I recall that one of the
amusing things about the z80 was if you did this :
LD BC, 1
DEC BC
BC would have zero in it, but the cpu would not set the zero flag. So if you wanted to use BC in a loop, you could not just DEC BC and then make a conditional jump. You would have to something like:
myloop:
LD BC, count
(do some stuff)
DEC BC
LD A, B
OR C
JR NZ, myloop
The z80 is a lot of fun :-)