SAM47 INSTRUCTION SET
KS57C2308/P2308/C2316/P2316
5-58
JR
— Jump Relative (Very Short)
JR
dst
Operation:
Operand
Operation Summary
Bytes
Cycles
#im
Branch to relative immediate address
1
2
@WX
Branch relative to contents of WX register
2
3
@EA
Branch relative to contents of EA
2
3
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
Binary Code
Operation Notation
#im
*
PC13–0
←
ADR (PC–15 to PC+16)
@WX
1
1
0
1
1
1
0
1
PC13–0
←
PC13–8 + (WX)
0
1
1
0
0
1
0
0
@EA
1
1
0
1
1
1
0
1
PC13–0
←
PC13–8 + (EA)
0
1
1
0
0
0
0
0
First Byte
Condition
*
JR #im
0
0
0
1
a3
a2
a1
a0
PC
←
PC+2 to PC+16
0
0
0
0
a3
a2
a1
a0
PC
←
PC–1 to PC–15
Summary of Contents for KS57C2308
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......