Ax51 User's Guide
http://www.keil.com/support/man/docs/a51/a51_ap_directives.htm
Directives
The Ax51 Assembler provides a number of directives you may use to control source file assembly. Directives are composed of one or more letters or digits and, unless otherwise specified, may be specified after the filename on the command line or within the source file when preceded by a dollar sign ('$'). For example:
A51 SAMPLE.A51 SYMBOLS DEBUG
or
$SYMBOLS DEBUG
or
$SYMBOLS $DEBUG
The source file to assemble is SAMPLE.A51 and SYMBOLS and DEBUG are the directives.
Assembler directives may be divided into two groups:
- Primary directives are specified on the assembler command line or in first few lines of the assembly source file. These directives control how the assembler behaves for the entire module. If conflicting primary directives are specified on the command line and in the source file, the command line directive takes precedence.
- General directives may be specified on the command line or anywhere in the source file. These directives control the immediate behaviour of the assembler and may be changed during assembly.
Note
- Syntax is the same for directives specified on the command line and those specified in the source file.
- Some directives may not be specified on the command line. If one of these directives is specified on the command line, the assembler generates a fatal error and aborts.
The following table is an alphabetical list of the control directives available in the Ax51 Assembler.
Directive |
Group |
Description |
Primary |
Enables case-sensitive symbol names. |
General |
Includes (in the listing file) conditional source lines skipped by the preprocessor. |
Primary |
Specifies the date to use in the listing file header. |
Primary |
Includes debugging information in the object file. |
Primary |
Defines C preprocessor symbols on the command line. |
Primary |
Allow expansion of generic CALL instruction to ECALL for the NXP 80C51MX devices. |
General |
Inserts a form feed character into the listing file. |
General |
Assemble block if the condition of a previous IF is false. |
General |
Assemble block if condition is true and a previous IF or ELSEIF is false. |
General |
Ends an IF block. |
Primary |
Specifies the file name for error messages. |
General |
Includes all macro expansions in the listing file. |
General |
Assemble block if condition is true. |
Primary |
Sets additional include file paths. |
General |
Includes the contents of another file. |
General |
Includes the assembly source text in the listing file. |
Primary |
Enables preprocessor expansion of standard macros. |
Primary |
Enables 24-bit contiguous addressing for Dallas Semiconductor devices. |
Primary |
Enables instruction set extensions for the NXP 80C51MX architecture. |
Primary |
Enables code generation and defines SFRs for classic 8051 devices. |
Primary |
Enables preprocessor expansion of MPL macros. |
Primary |
Excludes build information from the object file. |
Primary |
Disables case-sensitive symbol names. All symbols are converted to uppercase. |
Primary |
Excludes (from the listing file) conditional source lines skipped by the preprocessor. |
Primary |
Excludes debugging information from the object file. |
Primary |
Disables error messages output to the screen. |
General |
Excludes macro expansions from the listing file. |
Primary |
Excludes line number information from the generated object module. |
General |
Excludes the assembly source text from the listing file. |
Primary |
Disables preprocessor expansion of standard and MPL macros. |
Primary |
Suppresses SFRs definitions for classic 8051 devices |
Primary |
Disables preprocessor expansion of MPL macros. |
Primary |
Disables object file generation. |
Primary |
Disables listing file generation. |
Primary |
Disables memory space reservation for register banks. |
Primary |
Excludes the symbol table from the listing file. |
General |
Excludes subsequently defined symbols from the symbol table. |
Primary |
Excludes the cross-reference table from the listing file. |
Primary |
Specifies the name for the object file. |
Primary |
Specifies the number of lines on a page in the listing file. |
Primary |
Specifies the number of characters on a line in the listing file. |
Primary |
Specifies the name for the listing file. |
Primary |
Reserves memory space for register banks. |
General |
Specifies registers modified by the specified function. |
General |
Sets symbols, which may be tested by IF or ELSEIF, to false. |
General |
SAVE1 |
General |
General |
Sets symbols, which may be tested by IF or ELSEIF, to true or a specified value. |
Primary |
Includes the symbol table in the listing file. |
General |
Includes subsequently defined symbols in the symbol table. |
Primary |
Specifies the page header title in the listing file. |
Primary |
Includes the cross-reference table in the listing file. |
Note
- These directives may not be specified on the command line. They may only be specified in the source file.
- Primary directives may not be specified after an INCLUDE directive.