Directive Usage

MPASM Assembler

Directive Usage


How to use the MPASM assembler directive language is shown using examples.

Directives are assembler commands that appear in the source code but are not translated directly into opcodes. They are used to control the assembler: its input, output, and data allocation.

Many of the assembler directives have alternate names and formats. These may exist to provide backward compatibility with previous assemblers from Microchip and to be compatible with individual programming practices. If portable code is desired, it is recommended that programs be written using the specifications contained within this document.

For a reference listing of all directives discussed in examples here, please see Directives.

Note: Although MPASM assembler is often used with MPLINK object linker, MPASM assembler directives are not supported by MPLINK linker. See MPLINK object linker documentation for more information on linker options to control listing and hex file output.

There are six basic types of directives provided by the assembler:

Note: Directives are not case-sensitive, e.g., cblock may be executed as CBLOCK, cblock, Cblock, etc.

For all directive types:


Microchip Technology Inc.
Microchip's Web Site
Voice: (480) 792-7200
Fax: (480) 899-9210
Microchip's E-mail Address
PreviousNext