5
INSTRUCTION SET
24
EPSON
S1C33 FAMILY C33 PE CORE MANUAL
5
.
5
.
5
Register Indirect Addressing with Displacement
In this mode, memory is accessed beginning with the address that is derived by adding a specified immediate
(displacement) to the register content. Unless
ext
instructions are used, this addressing mode can only be used for
load instructions that have
[%sp+
imm6
]
as the operand.
Examples:
ld.b %r0,[%sp+0x10]
The byte data at the address derived by adding
0
x
10
to the content of the current SP is loaded into the
R
0
register. For byte data transfers, the
6
-bit immediate is added directly as the displacement.
ld.h %r0,[%sp+0x10]
The halfword data at the address derived by adding
0
x
20
to the content of the current SP is loaded into
the R
0
register. For halfword data transfers, because halfword boundary addresses are accessed, twice
the
6
-bit immediate (least significant bit always
0
) is the displacement.
ld.w %r0,[%sp+0x10]
The word data at the address derived by adding
0
x
40
to the content of the current SP is loaded into the
R
0
register. For word data transfers, because word boundary addresses are accessed, four times the
6
-bit
immediate (
2
low-order bits always
0
) is the displacement.
If
ext
instructions described in Section
5
.
6
are used, ordinary register indirect addressing (
[
%rb
]
) becomes a
special addressing mode in which the immediate specified by the
ext
instruction constitutes the displacement.
Example:
ext
imm13
ld.b
%rd
,[
%rb
]
The memory address to be accessed is
“
%rb
+
imm13
.
”
5
.
5
.
6
Signed PC Relative Addressing
This addressing mode is used for branch instructions that have a signed
8
-bit immediate (
sign8
) in their operand.
When these instructions are executed, the program branches to the address derived by adding twice the
sign8
value
(halfword boundary) to the current PC.
Example: PC +
0
jrne 0x04
The program branches to the PC +
8
address when the
jrne
branch
:
:
condition holds true.
:
:
(PC +
0
) +
0
x
04
∗
2
→
PC +
8
PC +
8
Содержание S1C33 Series
Страница 1: ...CMOS 32 BIT SINGLE CHIP MICROCOMPUTER Core Manual S1C33 Family C33 PE ...
Страница 4: ......