Output
Assembly unit
-Ld
None
None
Instructs the Assembler to generate a listing file but not including any macro definitions. The listing file contains macro invocation and expansion lines as well as expanded include files.
ASMOPTIONS=-Ld
In the following example of assembly code, the cpChar macro accepts two parameters. The macro copies the value of the first parameter to the second one.
When the -Ld option is specified, the assembly source code in the following listing along with additional source code (Listing: Example source code from an include file) from the macro.inc file generates an assembler output listing (Listing: Example assembler output listing) file:
XDEF Start MyData: SECTION char1: DS.B 1 char2: DS.B 1 INCLUDE "macro.inc" CodeSec: SECTION Start: cpChar char1, char2 NOP
cpChar: MACRO LDA \1 STA \2 ENDM
Abs. Rel. Loc Obj. code Source line ---- ---- ------ --------- ----------- 1 1 XDEF Start 2 2 MyData: SECTION 3 3 000000 char1: DS.B 1 4 4 000001 char2: DS.B 1 5 5 INCLUDE "macro.inc" 6 1i cpChar: MACRO 10 6 CodeSec: SECTION 11 7 Start: 12 8 cpChar char1, char2 13 2m 000000 C6 xxxx + LDA char1 14 3m 000003 C7 xxxx + STA char2 15 9 000006 9D NOP
The Assembler stores that content of included files in the listing file. The Assembler also stores macro invocation and expansion in the listing file.
The listing file does not contain the source code from the macro definition.
For a detailed description of the listing file, see the Assembler Listing File chapter.
Assembler options: