beautypg.com

Jp jump – Zilog Z80380 User Manual

Page 114

background image

5-80

Z380

U

SER

'

S

M

ANUAL

DC-8297-03

Z

ILOG

JP
JUMP

JP [cc,]dst

dst = IR, DA

Operation:

if (cc is TRUE) then begin

if (XM) then begin

PC(31-0)

dst(31-0)

end

else begin

PC(15-0)

dst(15-0)

end

end

A conditional jump transfers program control to the destination address if the setting of a
selected flag satisfies the condition code “cc” specified in the instruction; an unconditional
jump always transfers control to the destination address. If the jump is taken, the Program
Counter (PC) is loaded with the destination address; otherwise the instruction following the
Jump instruction is executed.

Each of the Zero, Carry, Sign, and Overflow flags can be individually tested and a jump
performed conditionally on the setting of the flag.

When using DA mode with the JP instruction, the operand is not enclosed in parentheses.

Flags:

S:

Unaffected

Z:

Unaffected

H:

Unaffected

V:

Unaffected

N:

Unaffected

C:

Unaffected

Addressing

Execute

Mode

Syntax

Instruction Format

Time

Note

IR:

JP (HL)

11101001

2

X

JP (XY)

11y11101 11101001

2

X

DA:

JP CC,addr

11-cc010 -a(low)- -a(high)

2

I, X

JP addr

11000011 -a(low)- -a(high)

2

I, X

Field Encodings:

y:

0 for IX, 1 for IY

cc: 000 for NZ, 001 for Z, 010 for NC, 011 for C, 100 for PO/NV, 101 for PE/V, 110 for
P/NS,111 for M/S