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

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.3 Macro Instructions (#macro ... #endm)
Any statement string can be left defined as a macro using the macro instruction (#macro), and the content of that
definition can be invoked from different parts of the program with the macro name. Unlike a subroutine, the part
that is invoking a macro is replaced with the content of the definition by the pp33.
Instruction format
114
#macro
#endm
<Macro name>:
$1–$32:
<Statement string>:
* Internal branch label
Sample definition:
#define
#macro
#ifdef
#else
#endif
A macro is spread over to several locations in the source. Therefore, if you describe a label in a
macro, a double definition will result, with an error issued. So, use internal branch labels which are
only valid within a macro.
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 macro name.
Dummy parameter symbols for macro definition. They are described when a macro to be defined
needs parameters. Not more than 32 symbols can be specified.
No other symbols than $1 to $32 can be used. You need to begin always with $1 and to arrange
them in an ascending order ($1
One or more spaces or tab settings are necessary between the macro name and $1. When
describing multiple parameters, a comma (,) is necessary between one parameter and another.
The following statements can be described:
- Basic instruction (mnemonic and operand)
- Extended instruction (see Instruction Extender)
- Conditional assembly instruction
- Internal branch label*
- Comments
The following statements cannot be described:
- Preprocessor pseudo-instructions (excluding conditional assembly instruction)
- Assembler pseudo-instructions
- Other labels than internal branch labels
- Macro invocation
A maximum of 64 internal branch labels can be described per macro.
The labels should be arranged like this: $$1–$$64 in order of description. (Each macro should
begin with $$1.)
<Macro name> [$1] [,$2] . . . [,$32]
<Statement string>
Areg
ADD
ld.w
add
DEBUG
cmp
cmp
xjrne
%r1
$1, $2
Areg, $1
Areg, $2
Areg, 0x1
Areg, 0x2
$$1
$32).
EPSON
(C COMPILER PACKAGE FOR S1C33 FAMILY) (Ver. 4)
S5U1C33000C MANUAL

Related parts for s5u1c33000c