Zilog Z80 註冊

暫存器:8 位:ABCDEHLFIR,16 位:SPPCIXIY,以及一些 8b 暫存器的陰影:A'B'C'D'E'H'L'F'

大多數 8 位暫存器也可以成對使用為 16 位暫存器:AFBCDEHL

SP堆疊指標,標記堆疊記憶體的底部(由 PUSH / POP / CALL / RET 指令使用)。
PC程式計數器,指向當前執行的指令。
I中斷暫存器,為 IM 2 中斷模式提供高位元組的向量表地址。
R重新整理暫存器,每次 CPU 取出操作碼(或操作碼字首)時遞增。
一些 Z80 處理器上存在一些非官方指令來操作 IX 的 8 位部分作為 IXH:IXLIY 作為 IYH:IYL

任何指令都不能直接訪問陰影變體,EX AF,AF'指令將在 AFAF'之間交換,EXX 指令將交換 BC,DE,HLBC',DE',HL'

將值載入到暫存器中:

    ; from other register
    LD   I,A        ; copies value in A into I (8 bit)
    LD   BC,HL      ; copies value in HL into BC (16 bit)
    ; directly with value encoded in instruction machine code
    LD   B,d8       ; 8b value d8 into B
    LD   DE,d16     ; 16b value d16 into DE
    ; from a memory (ROM/RAM)
    LD   A,(HL)     ; value from memory addressed by HL into A
    LD   A,(a16)    ; value from memory with address a16 into A
    LD   HL,(a16)   ; 16b value from memory with address a16 into HL
    POP  IX         ; 16b value popped from stack into IX
    LD   A,(IY+a8)  ; IX and IY allows addressing with 8b offset
    ; from I/O port (for writing value at I/O port use "OUT")
    IN   A,(C)      ; reads I/O port C, value goes to A

可能的源運算元和目標運算元的正確組合是有限的(例如,LD H,(a16) 不存在)。

將值儲存到記憶體中:

    LD   (HL),D     ; value D stored into memory addressed by HL
    LD   (a16),A    ; value A into memory with address a16
    LD   (a16),HL   ; value HL into 16b of memory with address a16
    LD   (IX+a8),d8 ; value d8 into memory at address IX+a8
    LD   (IY+a8),B  ; value B into memory at address IY+a8
    ; specials ;)
    PUSH DE         ; 16b value DE pushed to stack
    CALL a16        ; while primarily used for execution branching
      ; it also stores next instruction address into stack