beautypg.com

Jr cc – Zilog Z8F0130 User Manual

Page 177

background image

eZ8

CPU Core

User Manual

UM012820-0810

JR cc Instruction

162

JR CC

Definition

Jump Relative Conditionally.

Syntax

JR cc, DA

Operation

If cc (condition code) is true (1){

PC

 PC + X

}

where the jump offset, X, is calculated by the eZ8 CPU assembler from
the Program Counter (PC) value and the Destination Address (DA).

Description

If the condition specified by the

cc

is true, the relative address offset is

added to the Program Counter and control passes to the instruction
located at the address specified by the Program Counter. For control code
information, see

Condition Codes

on page 8. Otherwise, the instruction

following the JR instruction is executed. The range of the relative address
is +127 to –128 and the original value of the Program Counter is taken to
be the address of the first instruction byte following the JR instruction.

Flags

C

Unaffected

Z

Unaffected

S

Unaffected

V

Unaffected

D

Unaffected

H

Unaffected