| ||||||||||||||||
Technical Support On-Line Manuals A166 User's Guide | Macro ProcessorA macro processor enables you to define and to use macros in your assembly programs. When you define a macro, you provide text (usually assembly code) that you want to associate with a macro name. Then, when you want to include the macro text in your assembly program, you provide the name of the macro. The assembler replaces the macro name with the text specified in the macro definition. Macros provide several advantages when writing assembly programs.
A macro may be thought of as a subroutine call with the exception that the code that would be contained in the subroutine is included in–line at the point of the macro call. Macros should not be used to replace subroutines. Each invocation of a subroutine requires only the code necessary to call the subroutine. Each invocation of a macro includes the assembly code associated with the macro in–line in the assembly program. This can cause a program's size to grow rapidly if a large macro is used frequently. In a static environment, a subroutine is a better choice since program size can be considerably reduced. But in time-critical, dynamic programs, macros speed the execution of algorithms or other frequently-called statements without the penalty of the procedure calling overhead. You may use the following guidelines when deciding between macros or subroutines:
The A166 Macro Assembler provides two different macro languages:
The following table lists the assembler directives that may be used to enable or disable macro processing.
| |||||||||||||||
| ||||||||||||||||