Samsung KS57C2308 Manual page 132

Single-chip cmos microcontroller
Table of Contents

Advertisement

SAM47 INSTRUCTION SET
JR
— Jump Relative (Very Short)
JR
dst
Operation:
Operand
#im
@WX
@EA
Description:
JR causes the relative address to be added to the program counter and passes control to the
instruction whose address is now in the PC. The range of the relative address is current PC – 15
to current PC + 16. The destination address for this jump is specified to the assembler by a label,
an actual address, or by immediate data using a plus sign (+) or a minus sign (–).
For immediate addressing, the (+) range is from 2 to 16 and the (–) range is from –1 to –15. If a
0, 1, or any other number that is outside these ranges are used, the assembler interprets it as an
error.
For JR @WX and JR @EA branch relative instructions, the valid range for the relative address is
0H–0FFH. The destination address for these jumps can be specified to the assembler by a label
that lies anywhere within the current 256-byte block.
Normally, the "JR @WX" and "JR @EA" instructions jump to the address in the page in which the
instruction is located. However, if the first byte of the instruction code is located at address
xxFEH or xxFFH, the instruction will jump to the next page.
Operand
*
#im
@WX
@EA
*
JR #im
5-58
Operation Summary
Branch to relative immediate address
Branch relative to contents of WX register
Branch relative to contents of EA
Binary Code
1
1
0
1
0
1
1
0
1
1
0
1
0
1
1
0
First Byte
0
0
0
1
a3
0
0
0
0
a3
PC13–0
1
1
0
1
PC13–0
0
1
0
0
1
1
0
1
PC13–0
0
0
0
0
a2
a1
a0 PC
a2
a1
a0 PC
KS57C2308/P2308/C2316/P2316
Bytes
Cycles
1
2
2
Operation Notation
ADR (PC–15 to PC+16)
PC13–8 + (WX)
PC13–8 + (EA)
Condition
PC+2 to PC+16
PC–1 to PC–15
2
3
3

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents