Notations Of Operands - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

4.3.2 notations of Operands

This section explains the notations for the register names, symbols, and constants that are used in the operands of
instructions.
(1) register names
The names of the internal registers of the S1C17 Core all contain a percentage symbol (%). Register names
may be written in either uppercase or lowercase letters.
general-purpose register (%rd, %rs, %rb)
General-purpose register R0–R7
Special register
Stack pointer SP
Program counter PC
Register names placed in brackets ([]) for indirect addressing must include the % symbol.
Examples: [%r7]
[%r1]+
note: A register name not containing % will be regarded as a symbol.
Conversely, all notations beginning with % will be regarded as registers, and will give rise to an
error if it is not a register name.
(2) numerical notations
The as assembler supports three kinds of numerical notations: decimal, hexadecimal and binary.
Decimal notations of values
Notations represented with 0–9 only will be regarded as decimal numbers. To specify a negative value, put
a minus sign (-) before the value.
Examples: 1
255
Characters other than 0–9 and the sign (-) cannot be used.
Hexadecimal notations of values
To specify a hexadecimal number, place "0x" before the value.
Examples: 0x1a
"0x" cannot be followed by characters other than 0–9, a–f, and A–F.
Binary notations of values
To specify a binary number, place "0b" before the value.
Examples: 0b1001
"0b" cannot be followed by characters other than 0 or 1.
Specified ranges of values
The size (specified range) of immediate data varies with each instruction.
The specifiable ranges of different immediate data are given below.
Table 4.3.2.1 Types of immediate data and their specifiable ranges
Symbol
Type
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 -512 to 511
imm13 13-bit immediate data
imm16 16-bit immediate data
sign16
Signed 16-bit immediate data -32,768 to 32,767
imm20 20-bit immediate data
sign21
Signed 21-bit immediate data -1,048,576 to 1,048,575 0x0 to 0x1fffff 0b0 to 0b1 1111 1111 1111 1111 1111
sign23
Signed 23-bit immediate data -4194304 to 4194303
imm24 24-bit immediate data
sign24
Signed 24-bit immediate data -8,388,608 to 8,388,607 0x0 to 0xffffff
S5U1C17001C ManUal
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
notation
%r0–%r7 or %R0–%R7
notation
%sp or %SP
%pc or %PC
[%sp+imm7]
-3
0xff00
0b01001100
Decimal
0 to 7
0 to 31
0 to 127
-64 to 63
-128 to 127
0 to 8,191
0 to 65,535
0 to 1,048,575
0 to 16,777,215
EPSOn
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 0x7fffff 0b0 to 0b111 1111 1111 1111 1111 1111
0x0 to 0xffffff
0b0 to 0b1111 1111 1111 1111 1111 1111
0b0 to 0b1111 1111 1111 1111 1111 1111
4 SOUrCE filES
4
SrcFiles
Binary
4-9

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the S5U1C17001C and is the answer not in the manual?

Table of Contents