The Assembler command-line option, -l,
causes an assembly listing to standard output. For each line of
source code, the listing provides:
the hexadecimal representation of the assembled
code (possibly flagged with an asterisk (*)
to indicate address relocation)
The following is a line of assembly language as it appears
in the source file:
SAVE LDO VAL(%r0),%r20 ;retain value
|
The above line would appear in the assembly listing as follows:
line no. offset hex representation label opcode operands comment 16 0000004c (341400A) SAVE LDO VAL(%r0),%r20 ;retain value
|
The choice of line number 16 is arbitrary here. At the end
of the assembly listing, a symbol table is printed showing the name
and value of each symbol in the file. A type field for each symbol,
indicating either absolute or relocatable, is included.
Certain types of source lines generate multiple instructions.
Macro calls often expand to several instructions. The .ENTER
and .LEAVE pseudo-operations
can each generate more than one instruction. The predefined subspace
directives, such as .CODE
and .DATA, result
in a space and a subspace declaration.
You have the choice of listing a section of assembled code
in either the compressed or expanded form. The placement of the
.LISTON and .LISTOFF
directives determines which code will be expanded during listing.
The directive .LISTON
tells the Assembler to expand the listing of all subsequent source
lines until a .LISTOFF
directive is encountered. .LISTOFF
stays in effect until the occurrence of a .LISTON
directive.
The default is .LISTON.
The directives .LISTON
and .LISTOFF
may be placed anywhere in the source text and always go into effect
immediately. The .LISTON
and .LISTOFF
directives can be used as often as desired.