5.1.1 .LIST and .NLIST
Listing options can be specified in the through the .LIST and .NLIST directives.
text of a MACll program These are of the form:
where:
.LIST arg .NLIST arg
arg represents one or more optional arguments.
When used without arguments, the listing directives alter the listing level count. The listing level count causes the listing to be suppressed when it is negative. The count is initialized to zero, incremented for each .LIST and decremented for each .NLIST. For example:
.MACRO LTEST iA-THIS LINE SHOULD LIST
.NLIST
iB-THIS LINE SHOULD NOT .NLIST
iC-THIS LINE SHOULD NOT .LIST
iD-THIS LINE SHOULD NOT .LIST
iE-THIS LINE SHOULD LIST .ENDM
iLTEST
iA-THIS LINE SHOULD LIST .NLIST
. LIST
iLIST TEST
LIST LIST
LIST (LEVEL NOT BACK TO (LEVEL BACK TO ZERO)
iCALL THE MACRO
iE-THIS LINE SHOULD LIST (LEVEL BACK TO ZERO)
ZERO)
The primary purpose of the level count is to allow macro expansions to be selectively listed and yet exit with the level returned to the status current during the macro call.
The use of arguments with the listing directives does not affect the level counti however, use of .LIST and .NLIST can be used to override the current listing control. For example:
.MACRO XX
.LIST X= .
. NLIST
.ENDM .NLIST HE XX
.LIST X=.
iLIST NEXT LINE
iDO NOT LIST REMAINDER iOF MACRO EXPANSION
iDO NOT LIST MACRO EXPANSIONS iLIST NEXT LINE
Allowable arguments for use with the listing directives are as follows (these arguments can be used singly or in combination):
Argument Default
SEQ list
LOC list
BIN list
BEX list
SRC list
COM list
MD list
HC list
HE no list
MEB no list
Function
Controls the listing of source line sequence numbers. Error flags are normally printed on the line preceding the questionable source statement.
Controls the listing of the location counter (this field would not normally be suppressed) .
Controls the listing of generated binary code.
Controls listing of binary extensionsi that is, those locations and binary contents beyond the first binary word (per source statement) This is a subset of the BIN argument.
Controls the listing of the source code.
Controls the listing of comments. This is a subset of the SRC argument and can be used to reduce listing time and/or space where comments are unnecessary.
Controls listing of macro definitions and repeat range expansions.
Controls listing of macro calls and repeat range expressions.
Controls listing of macro expansions.
Controls listing of macro expansion binary code. A .LIST MEB causes only those macro expansion statements producing binary code to be listed. This is a subset of the ME
Argument Default Function CND
LD
TOC
TTM
SYM
list
no list
list
Teletype mode
list
Controls the listing of conditions and all .IF and .ENDC This argument permits conditional to be listed without including code.
unsatisfied statements.
assemblies unsatisfied Control listing of all listing directives having no arguments (those used to alter the listing level count).
Control listing of tables of contents on pass 1 of the assembly (see Section 5.1.4 describing the .SBTTL directive). The full assembly listing is printed during pass 1 of the assembly.
Controls listing output format. The TTM argument (the default case) causes output lines to be truncated to 72 characters.
Binary code is printed with the binary extensions below the first binary word. The alternative (.NLIST TTM) to Teletype mode is line printer mode, which is shown in Figure 5-1.
Controls the listing of the symbol table for the assembly.
An example of an assembly listing is shown in Figure 5-1.
5.1.2 Page Headings
The MACII Assembler outputs each page in the format shown in Figure 5-1, Line Printer Listing. On the first line of each listing page the Assembler prints (from right to left):
1. title taken from .TITLE directive.
2. assembler version identification 3. page number.
The second line of each listing page contains the subtitle text specified in the last encountered .SBTTL directive.
5.1.3 .TITLE
The .TITLE directive is used to assign a name to the listing output.
The name is the first symbol following the directive and must be six Radix-50 characters or less (any characters beyond the first six are ignored). Non-Radix 50 characters are not acceptable. For example:
.TITLE PROG TO PERFORM DAILY ACCOUNTING
causes the listing output of the assembled program to be named PROG (this name is distinguished from the filename of the binary output specified in the command string to the Assembler).
PIRt:X.149 LINt: PRINTt:R 1
MACll XVM V1AOOO PAGE 29 DKIVER FUR LP11/15
LP INTERRUPT t:NTRANCt:
2 (132-column line printer)
If there is no .TITLE statement, the default name assigned to the first listing output is
.MAIN.
The first tab or space following the .TITLE directive is not considered part of the listing output name or header text, although subsequent tabs and spaces are significant.
If there is more than one .TITLE directive, the last .TITLE directive in the program conveys the name of the listing output.
5.1.4 .SBTTL
The .SBTTL directive is used to provide the elements for a printed table of contents of the assembly listing. The text following the directive is printed as the second line of each of the following assembly listing pages until the next occurrence of a .SBTTL directive. For example:
.SBTTL CONDITIONAL ASSEMBLIES The text
CONDITIONAL ASSEMBLIES
is printed as the second line of each of the following assembly listing pages.
During pass 1 of the assembly process, MACll automatically prints a table of contents for the listing containing the line sequence number and text of each .SBTTL directive in the program.
An example of the table of contents is shown in Figure 5-2. Note that the first word of the subtitle heading is not limited to six characters since it is not a module name.
MACRO VIA
SUBROUTINE CALL DEFINITIONS PARAMETERS
EXPRESSION TO CODE-ROLL CONVERSIONS CODE ROLL STORAGE
DIRECTIVES
DATA-GENERATING DIRECTIVES CONDITIONALS
LISTING CONTROL
ENABL/ DSABL FUNCTIONS CROSS REFERENCE HANDLERS LISTING STUFF
KEYBOARD HANDLERS OBJECT CODE HANDLERS LISTING OUTPUT
I/O BUFFERS
EXPRESSION EVALUATOR TERM EVALUATOR
SYMBOL/CHARACTER HANDLERS ROLL HANDLERS
REGISTER STORAGE MACRO HANDLERS FIN
Table of Contents text is taken from directive. The associated numbers are numbers of the .SBTTL directive.
the text of each .SBTTL the page and line sequence
Figure 5-2
Assembly Listing Table of Contents
GENERAL ASSEMBLER DIRECTIVES 5.1.5 Page Ejection
There are several means of obtaining a page eject in a MACll assembly listing:
1. After a line count of 58 lines, MACll automatically performs a page eject to skip over page perforations on line printer paper and to formulate terminal output into pages.
2. A form feed character used as a line terminator only character on a line) causes a page eject.
macro definition a form feed character causes a A page eject is not performed when the macro is
(or as the Used within a page eject.
invoked.
3. More commonly, the .PAGE directive is used within the source code to perform a page eject at that point. The format of this directive is
. PAGE
This directive takes no arguments and causes a skip to the top of the next page.
Used within a macro definition, the .PAGE is ignored, but the page eject is performed at each invocation of that macro.