ST10 FAMILY PROGRAMMING MANUAL
7/172
The following indirect addressing modes are pro-
vided:
2.1.5 - Constants
The ST10 Family instruction set supports the use
of wordwide or bytewide immediate constants.
For optimum utilization of the available code stor-
age, these constants are represented in the
instruction formats by either 3, 4, 8 or 16 bits.
Therefore, short constants are always
zero-extended, while long constants can be trun-
cated to match the data format required for the
operation:
Note:
Immediate constants are always signified
by a leading number sign “#”.
2.1.6 - Branch target addressing modes
Jump and Call instructions use different address-
ing modes to specify the target address and seg-
ment.
Relative, absolute and indirect modes can be
used to update the Instruction Pointer register
(IP), while the Code Segment Pointer register
(CSP) can only be updated with an absolute
value.
A special mode is provided to address the
interrupt and trap jump vector table situated in the
lowest portion of code segment 0.
Table 3 : Table of indirect address modes
Mnemonic
Notes
[Rw]
Most instructions accept any GPR
(R15...R0) as indirect address pointer.
Some instructions, however, only
accept the lower four GPRs (R3...R0).
[Rw+]
The specified indirect address pointer
is automatically incremented by 2 or 1
(for word or byte data operations) after
the access.
[-Rw]
The specified indirect address pointer
is automatically decremented by 2 or 1
(for word or byte data operations)
before the access.
[Rw+#data
16
]
A 16-bit constant and the contents of
the indirect address pointer are added
before the long 16-bit address is calcu-
lated.
Table 4 : Table of constants
Mnemonic
Word operation
Byte operation
#data
3
0000
h
+ data
3
00
h
+ data
3
#data
4
0000
h
+ data
4
00
h
+ data
4
#data
8
0000
h
+ data
8
data
8
#data
16
data
16
data
16
^ FF
h
#mask
0000
h
+ mask
mask
Table 5 : Branch target address summary
Mnemonic
Target Address
Target Segment
Valid Address Range
caddr
(IP)
= caddr
-
caddr
= 0000h...FFFEh
rel
(IP)
= (IP) + 2*rel
-
rel
= 00h...7Fh
(IP)
= (IP) + 2*(~rel+1)
-
rel
= 80h...FFh
[Rw]
(IP)
= ((CP) + 2*Rw)
-
Rw
= 0...15
seg
-
(CSP) = seg
seg
= 0...255
#trap
7
(IP)
= 0000h + 4*trap
7
(CSP) = 0000h
trap
7
= 00h...7Fh
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...