Back
Next
Z8
Zilog Z8 - eZ8 (current design)
Program counter is 16 bits = 64K with a 16 bit dedicated adder.
Control Registers
Stack pointer
* Earlier versions with smaller register files allowed for external stack.
8 bit stack only (R255) - used to address a stack implemented within the
CPU's register file.
Used with R254 (16-bit) to address a much larger external stack in
external r/w program memory.
Condition (Flags) register
2 user settable and testable flags - not affected by the ALU or reset.
Not usable by branch commands.
Carry flag - notes carry out of or into most sig. bit of register.
Zero flag - notes if action results in zero.
Sign flag - most sig. bit of register (sign).
Overflow - carry from 7th to 8th bit (assumes value signed).
Half carry - used for BCD math.
Decimal Adjust - indicates if last command was add or subtract.
Used by decimal adjust command to correct result if using BCD.
Register Pointer - eZ8 treats the Register file as a cache of registers.
4 low bits point to 1 of 16 registers.
4 high bits point to 1 of 9 to 16 register groups. (depends on model)
Allows for fast context switching between multiple task.
Instructions use a 4 bit address which is concatenated with register
pointer.
Or as a single range of 236 general registers via an 8-bit address field.
Addressing modes
* Register
* Indirect register
* Immediate
* Direct address
* Indexed with 8-bit displacement e.g R1,24
* Program-counter relative
Register, Indirect register, and Immediate work with
Load, Arithmetic, Logical, Shift, Rotate and Stack instructions.
Conditional jumps work with
Direct address and program-counter relative.
JUMP and CALL work with
direct address and indirect register addressing modes.