Download User Manual - v8.8 Cross-Assembler, Linker/Locator, Utilities

Transcript
Macro Preprocessor
2−63
− An identifier
Is expanded in the same manner as it was specified as an actual
parameter.
Example:
DB, byte−var
− A string
A macro−name in the string is expanded first when the actual
parameters are used.
Example:
"13" −> 13, "1 + @VARS5 +3" −> 1 + 05h +3
− A macro−name
In normal mode, the macro−name is expanded in the actual
parameter. In literal mode, the macro−name itself appears in the
actual parameter and is expanded first when used.
Example:
@MC_VAR, @*MC1(dw).
− A parameter of an actual macro call.
This allows parameters to be further reached.
2.7.1.2 DEFINITION OF A MACRO VARIABLE WITH SET
Syntax:
@SET( macro−variable, expression )
A macro−variable represents a numerical value. Its expansion always
results in hexadecimal representation. This variable can be used similar to
a macro call (in assembly statements, in a macro call definition, in actual
parameter lists of a macro call, in expressions, during the definition of a
macro−string in the definition string).
If an actual parameter is a number, this can be used in the macro−body
using the corresponding formal parameters, similar to macro−variable.
2.7.1.3 DEFINITION OF A MACRO STRING WITH MATCH
Syntax:
@MATCH( macro−string, [macro−string, ] string )
MATCH defines a macro−string in the sense of simple text replacement, or
it processes text lists.
• • • • • • • •