beautypg.com

Zilog Z80380 User Manual

Page 226

background image

U

SER

'

S

M

ANUAL

Z

ILOG

The four instruction formats are shown in Tables A-1
through A-4. Within each format, several different configu-
rations are possible, depending on whether the instruction
involves addressing mode escape bytes, addresses, dis-
placements, or immediate data. In Table A-1 through A-4,

the symbol “A.esc” is used to indicate the presence of an
addressing mode escape byte, “O.esc” is used to indicate
the presence of an opcode escape byte, “disp.” is an
abbreviation for displacement and “addr.” is an abbrevia-
tion for address.

Table A-1. Format 1 Instructions Encodings

Instruction Format

Assembly

Hexadecimal

Opcode

LD A,C

79

Opcode

2-byte Address

LD A,(addr)

3A addr (L) addr (H)

Opcode

1-byte Displacement

DJNZ addr

10 disp

Opcode

Immediate

LD E,n

1E n

A.esc

Opcode

2-byte Address

LD IX,(addr)

DD 2A addr (L) addr (H)

A.esc

Opcode

1-byte Displacement

LD A, (IX+d)

DD 7E disp

A.esc

Opcode

Immediate

LD IX,nn

DD 21 n(L) n(H)

A.esc

Opcode

1-byte Displacement Immediate

LD (IY+d),n

FD 36 d n

Note:

“A.esc” is an addressing mode escape byte, and either 0DDH or 0FDH.

Table A-2. Format 2 Instructions Encodings

Instruction Format

Assembly

Hexadecimal

Opcode

LD A,C

79

O.esc

Opcode

Immediate (1 byte)

TST n

ED 64 n

O.esc

Opcode

Immediate (2 bytes)

LD (BC),nn

ED 06 n(L) n(H)

O.esc

Opcode

Address (2 bytes)

LD BC,(addr)

ED 4B addr (L) addr (H)

O.esc

Opcode

Displacement (1 byte)

CALR e

ED CD e

O.esc

Opcode

Displacement (2 bytes)

JR ee

DD 18 d(L) d(H)

O.esc

Opcode

Displacement (3 bytes)

JR eee

FD 18 d(L) d(M) d(H)

Note:

“O.esc” is an opcode escape byte, and either 0DDH, 0EDH or 0FDH.

Table A-3. Format 3 Instruction Encoding

CB

Opcode

RLC (HL)

CB 06

A.esc

CB

1 Byte Displacement Opcode

RLC (IX+d)

DD CB d 06

Note:

“A.esc” is an addressing mode escape byte, and either 0DDH or 0FDH.

Table A-4. Format 4 Instruction Encoding

ED

CB

Opcode

RRCW BC

ED CB 08

ED

CB

Opcode Immediate

MULTW nn

ED CB 97 n(L) n(H)