5
INSTRUCTION SET
S1C33 FAMILY C33 PE CORE MANUAL
EPSON
23
Actual special register names are written as follows:
Processor status register
%psr
Stack pointer
%sp
Arithmetic operation low register
%alr
Arithmetic operation high register
%ahr
Trap table base register
%ttbr
The register names are always prefixed by
“
%
”
to discriminate them from symbol names, label names, and the like.
5
.
5
.
3
Register Indirect Addressing
In this mode, memory is accessed indirectly by specifying a general-purpose register that holds the address needed.
This addressing mode is used only for load instructions that have
[
%rb
]
as the operand. Actually, this general-
purpose register is written as
[%r0]
,
[%r1]
, ... or
[%r15]
, with the register name enclosed in brackets
“
[]
.
”
The processor refers to the content of a specified register as the base address, and transfers data in the format that is
determined by the type of load instruction.
Examples: Memory
→
Register
ld.b %r0,[%r1]
ld.h %r0,[%r1]
ld.w %r0,[%r1]
Register
→
Memory
ld.b [%r1],%r0
ld.h [%r1],%r0
ld.w [%r1],%r0
In this example, the address indicated by r
1
is the memory address from or to which data is to be
transferred.
In halfword and word transfers, the base address that is set in a register must be on a halfword boundary (least
significant address bit =
0
) or word boundary (
2
low-order address bits =
0
), respectively. Otherwise, an address-
misaligned exception will be generated.
5
.
5
.
4
Register Indirect Addressing with Postincrement
As in register indirect addressing, the memory location to be accessed is specified indirectly by a general-purpose
register. When a data transfer finishes, the base address held in a specified register is incremented* by an amount
equal to the transferred data size. In this way, data can be read from or written to continuous addresses in memory
only by setting the start address once at the beginning.
∗
Increment size
Byte transfer (
ld.b
,
ld.ub
):
rb
→
rb
+
1
Halfword transfer (
ld.h
,
ld.uh
):
rb
→
rb
+
2
Word transfer (
ld.w
):
rb
→
rb
+
4
This addressing mode is specified by enclosing the register name in brackets
“
[]
,
”
which is then suffixed by
“
+
.
”
The register name is actually written as
[%r0]+
,
[%r1]+
, ... or
[%r15]+
.
Содержание S1C33 Series
Страница 1: ...CMOS 32 BIT SINGLE CHIP MICROCOMPUTER Core Manual S1C33 Family C33 PE ...
Страница 4: ......