beautypg.com

Zilog Z16F2810 User Manual

Page 128

background image

JP Instruction

UM018809-0611

112

ZNEO

®

CPU Core

User Manual

JP

Definition

Jump

Syntax

JP dst

Operation

PC

destination address

Description

The unconditional jump replaces the contents of the Program Counter with the destination
address. Program control then passes to the instruction addressed by the Program Counter.

In assembly language, the destination is typically specified as a label or 32-bit address operand.
When possible, the ZNEO CPU assembler automatically calculates a relative offset and generates
relative JP opcodes to produce more efficient object code. For a relative JP, the destination
address is the PC value plus two times the relative operand value.

In the JP (Rs) syntax, if the contents of Rs are odd the least significant bit is discarded, so that the
call destination address is always an even number.

To invoke a 32-bit addressed jump explicitly, use the JPA instruction.

Flags

Flags are not affected by this instruction.

Syntax and Opcodes

Example

Before:

PC=0000_0472H, R7=0000_3521H

JP (R7)

;Object Code: F207

After:

PC=0000_3520

Instruction, Operands

Word 0

Word 1

Word 2

JP (Rs)

{F20H, Rs}

JP rel12

{CH, rel12}

JP rel24

{F0H, rel[23:16]}

rel[15:0]

This manual is related to the following products: