Extension Of Register Direct Addressing - Epson S1C17 Series Manual

Cmos 16-bit single chip microcontroller
Hide thumbs Also See for S1C17 Series:
Table of Contents

Advertisement

Extension of sign7
The sign7 immediate is extended to a 16-bit immediate.
Extending to a 16-bit immediate
To extend the immediate to 16-bit quantity, enter one ext instruction directly before the target instruction.
Example: ext
imm13
ld
%rd,sign7
Extended immediate
15
S
imm13
Bit 8 of the imm13 in the ext instruction is the sign, with the immediate extended to become signed
16-bit data. The most significant bit in sign7 is handled as the MSB data of 7-bit data, and not as the
sign.

5.3.2 Extension of Register Direct Addressing

Extending register-to-register operation instructions
Register-to-register operation instructions are extended by one or two ext instructions. Unlike data transfer
instructions, these instructions add or subtract the content of the rs register and the immediate specified by an
ext instruction according to the arithmetic operation to be performed. They then store the result in the rd reg-
ister. The content of the rd register does not affect the arithmetic operation performed. An example of how to
extend for an add operation is shown below.
Extending to rs + imm13 (for 16-bit and 24-bit
To extend to rs + imm13, enter one ext instruction directly before the target instruction.
Example: ext
imm13
add.a
%rd,%rs
If not extended, rd = rd + rs
When extended by one ext instruction, rd = rs + imm13
23
rs
23
Immediate
23
rd
Extending to rs + imm16 (for 16-bit
To extend to rs + imm16, enter two ext instructions directly before the target instruction.
Example: ext
imm13
ext
imm13
add
%rd,%rs
If not extended, rd = rd + rs
When extended by two ext instructions, rd = rs + imm16
23
rs
Immediate
23
rd
S1C17 CORE MANUAL
(Rev. 1.2)
7
6
sign7
(7:0)
0 0 0 0 0 0 0
0 0 0 0
Data + imm13
operation instructions)
(1)
(2)
16
15
X X X X X X X X
15
(1)
imm13
16
15
0 0 0 0 0 0 0 0
Seiko Epson Corporation
0
operation instructions)
Data
+
13 12
imm13
Data
+
13 12
imm13 (2)
(2:0)
Data + imm16
5 INSTRUCTION SET
0
0
0
0
0
0
5-9

Advertisement

Table of Contents
loading

Table of Contents