First page Back Continue Last page Overview Graphics
ldaa # 0
Wherever the label “ZeroPortS” is found in the program, the code between the macro and endm statements will be inserted. The above code assumes the label “PortS” is defined elsewhere.
This is a rather simple example of a macro. We have not yet covered some of the instructions that are most useful in macros. Macros can be very useful for setting, clearing and checking bits.