First page Back Continue Last page Overview Graphics
Assembler Directives: Macros
A macro allows a group of assembly instructions to be inserted into a program by specifying the macro name at the appropriate place.
A label is used to identify the macro.
A macro begins with the keyword macro and ends with the keyword endm.
Macros allow a program to be more easily read since a single meaningful statement can replace several lines of assembly code. Execution speed can be improved (at the expense of memory) if inline macro code replaces calls to subroutines. This macro execution speed would be no different than writing the code inline to begin with.