Notations Of Operands - Epson S5U1C17001C Manual

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

2.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.
Example:[%r7] [%r1]+ [%sp+imm7]
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.
Example: 1 255 -3
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.
Example: 0x1a 0xff00
"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.
Example: 0b1001 0b01001100
"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.
S5U1C17001C Manual
(Rev. 1.0)
Notation
%r0–%r7 or %R0–%R7
Notation
%sp or %SP
%pc or %PC
Seiko Epson Corporation
2 Source Files
2-9

Advertisement

Table of Contents
loading

Table of Contents