User’s Manual MCUez HC12 Assembler
184 Assembler Directives MOTOROLA
Assembler Directives
Example: The following is an example of using conditional assembly
directives:
Try: EQU 0
IFNE Try
LDD #1023
ELSE
LDD #0
ENDIF
The valueof TRY determines the instruction to be assembled in
the program. As shown, the LDD #0 instruction generates
code. Changing the directive to IFEQcausesthe LDD #1023
instruction to generate code instead.
The following shows the listing provided by theassembler for
these lines of code:
Try: EQU 0
IFNE Try
ELSE
00000 37 B5 00 00 LDD #0
ENDIF