![Epson S1C17 Series Manual Download Page 39](http://html.mh-extra.com/html/epson/s1c17-series/s1c17-series_manual_107781039.webp)
S1C17 CORE MANUAL
Seiko Epson Corporation
5-17
(Rev. 1.2)
5.8 Branch and Delayed Branch Instructions
5.8.1 Types of Branch Instructions
(1) PC relative jump instructions
PC relative jump instructions include the following:
jr* sign7
jpr sign10
jpr %rb
PC relative jump instructions are provided for relocatable programming, so that the program branches to the ad-
dress calculated as PC + 2 (the next address of the branch instruction) + signed displacement (specified by the
operand).
The number of instruction steps to the jump address is specified for
sign7/10
or
rb
. However, since the instruc-
tion length in the S1C17 Core is fixed to 16 bits, the value of
sign7/10
is doubled to become a word address in
16-bit units. Therefore, the displacement actually added to the PC is a signed 8-bit/11-bit quantity derived by
doubling
sign7/10
(least significant bit always 0). When the
rb
register is used to specify the displacement, the
register contents are added to the PC without doubling.
The specifiable displacement can be extended by the
ext
instruction, as shown below.
For branch instructions used singly
jr* sign7
Functions as “
jr* sign8
” (
sign8
= {
sign7
, 0})
For the
jr*
instructions that are used singly, a signed 7-bit displacement (
sign7
) can be specified.
S
0
8 7
sign7
0
sign8
S
S
S S S S S S S S S S S S S S
23
1
0
0
Current address
PC
Branch destination address
PC
+
2
+
The range of addresses to which jumped is (PC - 126) to (PC + 128).
jpr sign10
Functions as “
jpr sign11
” (
sign11
= {
sign10
, 0})
For the
jpr
instruction that is used singly, a signed 10-bit displacement (
sign10
) can be specified.
S
0
11 10
sign10
0
sign11
S
S
S S S S S S S S S S S
23
1
0
0
Current address
PC
Branch destination address
PC
+
2
+
The range of addresses to which jumped is (PC - 2,046) to (PC + 2,048).