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

no-image

s5u1c33000c

Manufacturer Part Number
s5u1c33000c
Description
Cmos 32-bit Single Chip Microcomputer S5u1c33000c Manual
Manufacturer
Epson Electronics America, Inc.
Datasheet
Examples
Precautions
S5U1C33000C MANUAL
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
#define
Since the operation is internally performed as 32 signed bits, caution is required depending on the type of
operation.
Pay attention to the calculation results of the >>, / and %% operators using hexadecimal numbers.
Examples:
The calculation result is delivered as a decimal number with a minus sign if it is negative, or a
hexadecimal number if it is positive.
Eamples:
Do not insert a space or a TAB between an operator and a term (number, Define name).
Examples:
#define NUM1 0xfffffffe/2
#define NUM2 0xfffffffe>>1
add %r0, -2+1
add %r0,(-2+1)&0x3f
ld.w %r0, 1+1
ld.w %r0, 1 + 1
ld.w %r0, (1+NUM1)*2
ld.w %r0, (1 + NUM1)*2
BAR
ld.w
xcall
xld.w %r1, [FOO+BAR+1] ...xld.w %r1, [FOO+0x2]
xld.w %r1, [BAR+FOO+1] ...An error will result if FOO is not a Define name.
0x1
%r0, BAR+2
LABEL+BAR*2
...-2/2 = -1 (0xffffffff)
...-2>>1 = -1 (0xffffffff)
...It will be expanded as "add %r0, -1".
...It will be expanded as "add %r0, 0x3f".
...OK
...NG
...OK
...NG
The / and %% operators can only be used within the signed
32-bit range.
Mask as (0xfffffffe>>1)&0x7fffffff.
...ld.w %r0, 0x3
...xcall LABEL+0x2
EPSON
CHAPTER 9: PREPROCESSOR
119

Related parts for s5u1c33000c