Motorola HC12 User Manual

Page of 328
MCUez HC12 Assembler
User’s Manual
MOTOROLA
Macros
203
User’s Manual — MCUez HC12 Assembler
Section 9. Macros
9.1  Contents
9.2  Introduction
This chapter describes the functionality and use of macros for the MCUez HC12
assembler used with an MCUez application.
9.3  Macro Overview
A macro is a template for a code sequence. A macro must be defined before it
is called. When a macro is defined, it is given a name. This name becomes the
reference by which the macro is subsequently called. Once a macro is defined,
subsequent references to the macro name are replaced by its code sequence.
The assembler expands the macro definition each time the macro is called. The
macro call causes source statements to be generated, which may include macro
arguments. A macro definition may contain any code or directive except nested
macro definitions. Calling previously defined macros is also allowed. Source