beautypg.com

Ddir decoder directive – Zilog Z80380 User Manual

Page 77

background image

5-43

Z380

U

SER

'

S

M

ANUAL

Z

ILOG

DC-8297-03

DDIR

DECODER DIRECTIVE

DDIR mode mode = W or LW, IB or IW

Operation:

None, decoder directive only

This is not an instruction, but rather a directive to the instruction decoder.

The instruction decoder may be directed to fetch an additional byte or word of immediate
data or address with the instruction, as well as tagging the instruction for execution in either
Word or Long Word mode. All eight combinations of the two options are supported, as shown
in the encoding below. Instructions which do not support decoder directives are assembled
by the instruction decoder as if the decoder directive were not present.

The IB decoder directive causes the decoder to fetch an additional byte immediately after
the existing immediate data or direct address, and in front of any trailing opcode bytes (with
instructions starting with DD-CB or FD-CB, for example).

Likewise, the IW decoder directive causes the decoder to fetch an additional word
immediately after the existing immediate data or direct address, and in front of any trailing
opcode bytes.

Byte ordering within the instruction follows the usual convention; least significant byte first,
followed by more significant bytes. More-significant immediate data or direct address bytes
not specified in the instruction are taken as all zeros by the processor.

The W decoder directive causes the instruction decoder to tag the instruction for execution
in Word mode. This is useful while the Long Word (LW) bit in the Select Register (SR) is set,
but 16-bit data manipulation is required for this instruction.

The LW decoder directive causes the instruction decoder to tag the instruction for execution
in Long Word mode. This is useful while the LW bit in the SR is cleared, but 32-bit data
manipulation is required for this instruction.

Flags:

S:

Unaffected

Z:

Unaffected

H:

Unaffected

V:

Unaffected

N:

Unaffected

C:

Unaffected

Addressing

Execute

Mode

Syntax

Instruction Format

Time

Note

DDIR mode

11w11101 110000im

0

Field Encodings:

wim: 000 W

Word mode

001 IB,W

Immediate byte, Word mode

010 IW,W

Immediate word, Word mode

011 IB

Immediate byte

100 LW

Long Word mode

101 IB,LW

Immediate byte, Long Word mode

110 IW,LW

Immediate word, Long Word mode

111 IW

Immediate word