hewlett-packard HP 9835A — 062

62 Assembly Language Fundamentals The primary purpose of this capability is to allow as much modularity in the listings as you can get in source code. To implement this purpose, a "listing counter" is used. Whenever an LST instruction is encountered during an assembly, the listing counter is in- cremented. Whenever an UNL instruction is encountered during an assembly, the listing counter is decremented. Source lines are listed whenever the counter is greater than O. Whenever it is equal to 0 or negative, then no lines are listed. The counter is set to 0 upon execution of the !ASSEMBLE statement. This is why there is no automatic listing.

However, if the LIST option is included in the IASSEMBLE statement, then the counter is initialized to 1. This is why that option creates a listing. Thus, you could defeat a occurs for each module assembled, so if you have more than one module indicated in your LIST option by placing an UNL instruction at the beginning of a module. This initialization IASSEMBLE statement, the counter is set at the beginning of the assembly for each. This capability sees its greatest usefulness during debugging stages and while working with independently written sections of source code.

For example, a number of people could be writing different sections of code, each containing their own LST and UNL instructions. These instructions could then be overridden when they were combined into a single module by preceding the sections with an LST instruction (to get a listing) or an UNL (to suppress the listings). Page Format Each and every assembly listing page has the following format- The word "PAGE" and the current page number of the listing occurs on the first line starting at column 49 . • A heading occurs on the second line, left-justified. The heading always includes - where {name} is the name of the module currently being assembled.

Additional heading information can be specified for this line (see "Page Heading" below).