Epson S5U1C17001C Manual page 23

Cmos 16-bit single chip microcontroller (c compiler package for s1c17 family) (ver. 3.2)
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

Symbol
imm3
3-bit immediate data
imm5
5-bit immediate data
imm7
7-bit immediate data
sign7
Signed 7-bit immediate data
sign8
Signed 8-bit immediate data
sign10
Signed 10-bit immediate data
imm13
13-bit immediate data
imm16
16-bit immediate data
sign16
Signed 16-bit immediate data
imm20
20-bit immediate data
sign21
Signed 21-bit immediate data
sign23
Signed 23-bit immediate data
imm24
24-bit immediate data
sign24
Signed 24-bit immediate data
(3)
Symbols
In specifying an address with immediate data, you can use a symbol defined in the source files.
 Definition of symbols
Usable symbols are defined as 24-bit values by any of the following methods:
1. It is described as a label (in text, data or bss section)
Example: LABEL1:
LABEL1 is a symbol that indicates the address of a described location in the .text, .data, or .bss
section.
2. It is defined with the .set directive
Example: .set ADDR1,0xff00
ADDR1 is a symbol that represents absolute address 0x00ff00.
 Restrictions on characters
The characters that can be used are limited to the following:
A–Z a–z _ 0–9
Note that a symbol cannot begin with a numeral. Uppercase and lowercase characters are discriminated.
 Local and global symbols
Defined symbols are normally local symbols that can only be referenced in the file where they are defined.
Therefore, you can define symbols with the same name in multiple files.
To reference a symbol defined in some other file, you must declare it to be global in the file where the symbol is defined by
using the .global directive.
 Extended notation of symbols
When referencing an address with a symbol, you normally write the name of that symbol in the operand where an address
is specified.
call
Example:
ld.a
The as assembler also accepts the referencing of an address with a specified displacement as shown below.
LABEL + imm24 LABEL + sign24
Example: xcall
S5U1C17001C Manual
(Rev. 1.0)
Table 2.3.2.1 Types of immediate data and their specifiable ranges
Type
Decimal
0 to 7
0 to 31
0 to 127
-64 to 63
-128 to 127
-512 to 511
0 to 8,191
0 to 65,535
-32,768 to 32,767
0 to 1,048,575
-1,048,576 to 1,048,575
-4194304 to 4194303
0 to 16,777,215
-8,388,608 to 8,388,607
← LABEL = sign10
LABEL
%rd,LABEL ← LABEL = sign7
LABEL+0x10
Seiko Epson Corporation
Hexadecimal
0x0 to 0x7
0b0 to 0b111
0x0 to 0x1f
0b0 to 0b1 1111
0x0 to 0x7f
0b0 to 0b111 1111
0x0 to 0x7f
0b0 to 0b111 1111
0x0 to 0xff
0b0 to 0b1111 1111
0x0 to 0x3ff
0b0 to 0b11 1111 1111
0x0 to 0x1fff
0b0 to 0b1 1111 1111 1111
0x0 to 0xffff
0b0 to 0b1111 1111 1111 1111
0x0 to 0xffff
0b0 to 0b1111 1111 1111 1111
0x0 to 0xfffff
0b0 to 0b1111 1111 1111 1111 1111
0x0 to 0x1fffff
0b0 to 0b1 1111 1111 1111 1111 1111
0x0 to 0x7fffff
0b0 to 0b111 1111 1111 1111 1111 1111
0x0 to 0xffffff
0b0 to 0b1111 1111 1111 1111 1111 1111
0x0 to 0xffffff
0b0 to 0b1111 1111 1111 1111 1111 1111
2 Source Files
Binary
2-10

Advertisement

Table of Contents
loading

Table of Contents