Indicate to the assembler the start of a code section.
Symbol field |
Mnemonic field |
Operand field |
Comment field |
[section-name] |
.cseg |
[relocation-attribute] |
[; comment] |
All instructions described following the .cseg directive belong to the code section until it comes across a section definition directives. |
The .cseg directive is used to describe instructions, .db, .dw directives, etc. in the code section defined by the .cseg directive. |
Description of one functional unit such as a subroutine should be defined as a single code section. |
If there is a label or an instruction to output object code before a section definition directive, a relocatable code section is generated as the default section. The section name here will be ".text", and the relocation attribute will be "TEXT". |
The assembler will output an error if a relocation attribute other than "Table 5.7 Relocation Attributes of .cseg" is specified. |
By describing a section name in the symbol field of the .cseg directive, the code section can be named. If no section name is specified for a code section, the assembler will automatically give a default section name to the code section. |
The default section names have the relocation attributes shown above. Giving them any other attributes is not possible.