Sections

The output object file of an assembly program is made up of named sections that contain code and data. The assembler allows any number of sections to be created in parallel within the output object file, one of which can be accessed at a time. The section currently accessed is referred to as the current section.

The assembler maintains a separate location counter for each existing section. The assembler always adds new code or data to the end of the current section, moving the location counter in that section ahead to incorporate the new code or data. The Cross-section Data Allocation Statements section explains how to add data to a section that is not the current section.

Section directives and predefined section directives are used to define and switch between sections. Some section directives have flag and type operands that specify the flag and type attributes of a section.