Keil Logo

Directive List

The following table is an alphabetical list of the control directives available in the C251 Compiler.

Directive Group Description
ASM Source Marks the beginning of an inline assembly block.
ASMEXPAND Source Marks the beginning of an inline assembly block.
BROWSE1 Object Enables source browser information.
CODE1 Listing Includes generated assembly in the listing file.
COND1 Listing Includes (in the listing file) conditional source lines skipped by the preprocessor.
DEBUG1 Object Includes debugging information in the object file.
DEFINE2 Source Defines preprocessor names on the command line.
DISABLE Object Disables interrupts for the duration of a single function.
EJECT Listing Inserts a form feed character into the listing file.
ENDASM Source Marks the end of an inline assembly block.
FIXDRK1 Object Replaces the INC DRk,#const instruction with an ADD DRk,#const instruction.
FLOAT64 Object Enables 64-bit (double-precision) floating-point math for double variable types.
FLOATFUZZY Object Sets the number of bits rounded for floating-point comparisons.
FUNCTIONS Object Allows the memory model and reentrant attribute to be changed.
HPTR Object Changes the default memory type to huge for the memory models SMALL, XSMALL, and LARGE.
HOLD Object Numeric size limits for global variables placed in data, near, and xdata memory.
INCDIR1 Source Sets additional include file paths.
INTERVAL1 Object Specifies the interval to use for interrupt vectors.
INTR21 Object Informs the C251 compiler that the 251 MCU saves the low order 16 bits of the program counter but does not automatically save PSW1 when entering an interrupt.
INTVECTOR1 Object Specifies the base address for interrupt vectors.
LARGE1 Object Selects the LARGE memory model.
LISTINCLUDE Listing Adds contents of include files into the listing file.
MAXARGS1 Object Specifies the maximum size of variable-length argument lists.
MODBIN Object Instructs the C251 compiler to generate instructions for the binary mode of the 251.
NAME Object The name of the object module may be changed.
NOALIAS1 Object Disable alias checking for pointer access optimization.
NOAMAKE1 Object Disables AutoMAKE project information records.
NVM_CONST1 Object Assume that const variables change in value due to in-system programming.
NOAASMEXPAND Object Prevents expanding symbols used in ASM/ENDASM blocks.
NOCASE1 Object Convert indentifiers to upper case for the object file.
NOCOND1 Listing Excludes (from the listing file) conditional source lines skipped by the preprocessor.
NOEXTEND1 Source Disables C251 extensions to ANSI C.
NOINTVECTOR1 Object Disables generation of interrupt vectors.
NOOBJECT1 Object Disables object file generation.
NOPRINT1 Listing Disables listing file generation.
NOREGPARMS Object Disables passing parameter in registers.
OBJECT1 Object Specifies the name for the object file.
OBJECTADVANCED1 Object Adds additional information to the object file for linker-level program optimizations.
OPTIMIZE Object Specifies the level of optimization performed by the compiler.
ORDER1 Object Allocates storage for variables in the order in which they are declared.
PACK1 object Controls the packing of structure types.
PAGELENGTH1 Listing Specifies the number of lines on a page in the listing file.
PAGEWIDTH1 Listing Specifies the number of characters on a line in the listing file.
PARM2511 Object Use C251 parameter passing conventions (default).
PARM511 Object Use C51 parameter passing conventions (default).
PREPRINT1 Listing Produces a preprocessor listing file with expanded macros.
PREPRINTONLY1 Source Create a preprocessor output file only, no translation and code generation takes place.
PRINT1 Listing Specifies the name for the listing file.
REGFILE1 Object Specifies the register definition file for global register optimization.
REGPARMS Object Enables passing parameter in registers.
RENAMECODE Object Rename a code segment.
RESTORE Object Restores settings for REGPARMS, and OPTIMIZE directives.
ROM1 Object Control generation of JMP/CALL instructions.
SAVE Object Saves settings for REGPARMS, and OPTIMIZE directives.
SMALL1 Object Selects the SMALL memory model.
SRC1 Object Creates an assembler source file instead of an object file.
STRING1 Object Locates implicit string constants to xdata or far memory.
SYMBOLS1 Listing Includes a symbol list in the listing file.
TABS1 Listing Specifies the tab character expansion width for the listing file.
TINY1 Object Select TINY memory model (Default).
UNSIGNED_CHAR1 Object Treat plain char as unsigned char.
USERCLASS1 Object Renames memory classes which allows more flexible variable location.


Listing Change a Warning to an Error or disable a warning.
WARNINGLEVEL1 Listing Selects the level of warning detection.
XSMALL1 Object Select XSMALL memory model.
XTINY1 Object Select XTINY memory model.


  1. These directives apply to the entire source file and may be specified only once on the command line or at the beginning of the source file using the #pragma statement. They may not be used more than once in a source file.
  2. Directives and arguments, with the exception of arguments specified with the DEFINE directive, are not case sensitive.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.