Ax51 User's Guide

Macro / Include File / Save Stack Format

In the listing file, the assembler displays the macro nesting level, the include file level, and the level of the SAVE/RESTORE stack. These nesting levels are shown before and after the LINE number as shown in the following listing.

LOC    OBJ         LINE     SOURCE
                      1     $GEN   ; Enable Macro Listing
                      2
                      3     MYMACRO MACRO         ; A sample macro
                      4             INC     A     ; Macro Level 1
                      5             MACRO2
                      6             ENDM
                      7
                      8     MACRO2  MACRO         ; Macro 2
                      9             NOP           ; Macro Level 2
                     10             ENDM
                     11
                     12
------               13     MYPROG  SEGMENT CODE
------               14             RSEG    MYPROG
                     15
000000 7400          16             MOV     A,#0
                     17             MYMACRO
000002 04            18+1           INC     A     ; Macro Level 1
                     19+1           MACRO2
000003 00            20+2           NOP           ; Macro Level 2
                     21     $INCLUDE (MYFILE.INC) ; A include file
                +1   22     ; This is a comment   ; Include Level 1
                +1   23             MACRO2
000004 00       +1   24+1           NOP           ; Macro Level 1
000005 7401          25             MOV     A,#1
                     26  +1 $SAVE                 ; Save Control
                     27  +1         MYMACRO       ; SAVE Level 1
000007 04            28+1+1         INC     A     ; Macro Level 1
                     29+1+1         MACRO2
000008 00            30+2+1         NOP           ; Macro Level 2
                     31  +1 $RESTORE
000009 00            32             NOP
                     33             END