25 mlist — list macro expansions, Mlist — list macro expansions – Motorola HC12 User Manual

Page 191

Advertising
background image

Assembler Directives

MLIST — List Macro Expansions

MCUez HC12 Assembler

User’s Manual

MOTOROLA

Assembler Directives

191

8.25 MLIST — List Macro Expansions

Syntax:

MLIST

[ON | OFF]

Description:

When the

ON

keyword is entered with an

MLIST

directive, the

assembler includes the macro expansions in the listing and
debug files. When the

OFF

keyword is entered, macro

expansions are omitted from the listing and debug files. This
directive is not written to the listing and debug files, and the
default value is

ON

.

Example:

This listing shows a macro definition and expansion with

MLIST ON

:

10 10 swap: macro

12 12 ldx \2

13 13 std \2

14 14 stx \1

15 15 endm

16 16

18 18

swap first, second

19 11m 000000 FC xxxx + ldd first

20 12m 000003 FE xxxx + ldx second

21 13m 000006 7C xxxx + std second

22 14m 000009 7E xxxx + stx first

23 19 00000C A7 NOP

For the same code, with

MLIST OFF

, the listing file is:

10 10 swap: macro

11 11 ldd \1

12 12 ldx \2

13 13 std \2

14 14 stx \1

15 15 endm

16 16

18 18

swap first, second

23 19 00000C A7 NOP

Advertising