s5u1c33000c Epson Electronics America, Inc., s5u1c33000c Datasheet - Page 128

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
CHAPTER 9: PREPROCESSOR
9.5.2 Define Instruction (#define)
Any substitute character string can be left defined as a Define name by the define instruction (#define), and the
details of that definition can be referred to from various parts of the program using the Define name.
Instruction format
Expansion rule
112
#define <Define name> [<Substitute character string>]
<Define name>:
<Substitute character string>:
Sample definitions:
If a Define name defined appears in the source, the pp33 substitutes a defined character string for that
Define name.
Sample expansion:
When a number is specified for the substitute character string, the following rule is applied:
Sample expansion:
#define
#define
#define
#define
#define
#define
#define
#define
The first character is limited to a–z, A–Z and _.
The second and the subsequent characters can use a–z, A–Z, 0–9 and _.
Uppercase and lowercase characters are discriminated.
One or more spaces or tab settings are necessary between the instruction and the Define name.
The usable characters are limited to a–z, A–Z, 0–9, _, % and . (period). They must not contain any
space or comma (,).
Values, operators, mnemonics, labels, and register names also can be specified.
Uppercase and lowercase characters are discriminated.
One or more spaces or tab settings are necessary between the Define name and the substitute
character string.
The substitute character string can be omitted. In that case, NULL is defined in lieu of the
substitute character string. It can be used for the conditional assembly instruction.
The pp33 converts the defined number into a signed 32-bit data and expands it as a hexadecimal
number.
#define allows the substitute character strings to describe in an expression using operators. The
Define names that have been defined can also be used as terms of the expression.
TYPE1
L1
li
r1
Mr1
gp
ld.w
A
B
ld.w
:
:
LABEL_01
ld.w
%r1
[%r1]
%r8
[gp], %r1
0x12
A*2
%r2, A+B
EPSON
...Error [ ] and [ ]+ cannot be used.
...Expanded to "ld.w [%r8], %r1".
...Expanded to "ld.w %r2, 0x36".
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
S5U1C33000C MANUAL

Related parts for s5u1c33000c