Addressing Modes With Ext; Extension Of Immediate Addressing - Epson S1C17 Series Manual

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

Advertisement

5 INSTRUCTION SET

5.3 Addressing Modes with ext

The immediate specifiable in 16-bit, fixed-length instruction code is specified in a bit field of a 7- or 10-bit length,
depending on the instruction used. The ext instructions are used to extend the size of this immediate.
The ext instructions are used in combination with data transfer, arithmetic/logic, or branch instructions, and is
placed directly before the instruction whose immediate needs to be extended. The instruction is expressed in the
form ext imm13, in which the immediate size extendable by one ext instruction is 13 bits and up to two ext
instructions can be written in succession to extend the immediate further.
The ext instructions are effective only for the instructions for which the immediate extension written directly after
ext is possible, and have no effect for all other instructions. When three or more ext instructions have been de-
scribed sequentially, the last two are effective and others are ignored.
When an instruction, which does not support the extension in the ext instruction, follows an ext, the ext instruc-
tion will be executed as a nop instruction.

5.3.1 Extension of Immediate Addressing

Extension of imm7
The imm7 immediate is extended to a 16-, 20-, or 24-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
add
%rd,imm7
Extended immediate
15
imm13
Extending to a 20-bit immediate
To extend the immediate to 20-bit quantity, enter one ext instruction directly before the target instruction.
Example: ext
imm13
add.a
%rd,imm7
Extended immediate
23
20 19
0
0
0 0
Bits 23–20 are filled with 0 (zero-extension).
Extending to a 24-bit immediate
To extend the immediate to 24-bit quantity, enter two ext instructions directly before the target instruction.
Example: ext
imm13
ext
imm13
ld
%rd,[imm7]
Extended immediate
23
20 19
imm13
(1)
(3:0)
5-8
; = add
%rd,imm16
7
6
imm7
(8:0)
; = add.a
imm13
(1)
(2)
; = ld
%rd,[imm24]
imm13 (2)
Seiko Epson Corporation
0
%rd,imm20
7
6
0
imm7
7
6
0
imm7
S1C17 CORE MANUAL
(REV. 1.2)

Advertisement

Table of Contents
loading

Table of Contents