Jp cc – Zilog Z16F2810 User Manual
Page 130
![background image](https://www.manualsdir.com/files/771158/content/doc130.png)
JP cc Instruction
UM018809-0611
114
ZNEO
®
CPU Core
User Manual
JP CC
Definition
Jump Conditionally
Syntax
JP cc, dst
Operation
if cc (condition code) is true (1){
PC
destination address
}
Description
A conditional jump transfers program control to the destination address if the condition specified
by cc is true. Otherwise, the instruction following the JP instruction is executed. See the the
section on page 11 for more information.
In assembly language, the destination is typically specified as a label or 32-bit address operand.
The ZNEO CPU assembler automatically calculates a relative offset and generates the appropri-
ate JP cc opcode.
To specify an explicit relative offset, use the expression $+offset_in_bytes. The ‘$’ symbol
returns the address of the current instruction. The assembler converts this expression into the
appropriate object code operand.
Flags
Flags are not affected by this instruction.
Syntax and Opcodes
Example
The following instructions loop through successive memory addresses (pointed to by register R2)
until the LD instruction loads an
00H
value.
LOOP:
LD.UB R0, (R2++)
;Object Code: 1920
JP B, LOOP
;Object Code: E0FE
Instruction, Operands
Word 0
Word 1
Word 2
JP cc, rel8
{EH, cc4, rel8}
JP cc, rel16
{F22H, cc4}
rel[15:0]