Download MCUez ASSEMBLER USER`S MANUAL
Transcript
Freescale Semiconductor, Inc. ASSEMBLER DIRECTIVES 8.24 MEXIT - TERMINATE MACRO EXPANSION Syntax: MEXIT Description: MEXIT is usually used together with conditional assembly within a macro. In that case, the macro expansion might terminate prior to termination of the macro definition. The MEXIT directive causes macro expansion to skip any remaining source lines ahead of the ENDM Freescale Semiconductor, Inc... directive. Example: Following portion of code: save: codSec: entry: XDEF entry MACRO LDHX #storage LDA \1 STA 0,x LDA \2 STA 2,x IFC '\3', '' MEXIT ENDC LDA \3 STA 4,X ENDM SECTION ; Start macro definition ; save first argument ; save second argument ; is there a 3rd argument? ; no, exit from macro. ; save third argument ; End of macro definition save char1, char2 Generates following listing file: 16 17 18 19 16 2m 3m 4m 000000 45 xx00 000003 C6 xxxx 000006 E700 + + + 20 21 5m 6m 000008 C6 xxxx 00000B E702 + + argument 22 7m MCUEZASM08/D 0000 0001 + save char1, char2 LDHX #storage LDA char1 STA 0,x ; save first argument LDA char2 STA 2,x ; sa v e s ec o nd IFC For More Information On This Product, Go to: www.freescale.com '', '' 8-31