[Menu]>[Guide to use the PIC]


Directive Summary

The following summary is the directives supported by MPASM.
MPASM has 58 kinds of directives.
[ ]:Optional Argumentsexpr:Expression
< >:Variables. Text you supply
:Space
|:An OR selection




DirectiveDescriptionSyntax
_ _BADRAMSpecify invalid RAM locations_ _badram<expr>[-<expr>][,<expr>[-<expr>]]
BANKISELGenerate RAM bank selecting code for indirect addressingbankisel<label>
BANKSELGenerate RAM bank selecting codebanksel<label>
CBLOCKDefine a Block Constantscblock[<expr>]
ENDCendc
CODEBegins executable code section[<name>]code[<address>]
_ _CONFIGSpecify configuration bits_ _config<expr>
CONSTANTDeclare Symbol Constantconstant<label>[=<expr>,...,<label>[=<expr>]]
DAStore Strings in Program Memory[<label>]da<expr>[,<expr>,...,<expr>]
DATACreate Numeric and Text Data [<label>]data<expr>[,<expr>,...,<expr>]
[<label>]data"<text_string>"[,"<text_string>",...]
DBDeclare Data of One Byte [<label>]db<expr>[,<expr>,...,<expr>]
[<label>]db"<text_string>"[,"<text_string>",...]
DEDefine EEPROM Data [<label>]de<expr>[,<expr>,...,<expr>]
[<label>]de"<text_string>"[,"<text_string>",...]
#DEFINEDefine a text Substitution Label #define<name>[<value>]
#define<name>[<arg>,...,<arg>]<value>
#UNDEFINEDelete a Substitution Label#undefine<label>
DTDefine Table [<label>]dt<expr>[,<expr>,...,<expr>]
[<label>]dt"<text_string>"[,"<text_string>",...]
DWDeclare Data of One Word [<label>]dw<expr>[,<expr>,...,<expr>]
[<label>]dw"<text_string>"[,"<text_string>",...]
ENDEnd Program Blockend
EQUDefine an Assembly Constant<label>equ<expr>
ERRORIssue an Error Messageerror"<text_string>"
ERRORLEVELSet Error Levelerrorlevel"0|1|2 <+|-><message_number>"
EXITMExit from a Macroexitm
EXPANDExpand Macro Listingexpand
NOEXPANDTurn off Macro Expansionnoexpand
EXTERNDeclares an external labelextern<label>[,<label>]
FILLFill Memory[<label>]fill<expr>,<count>
GLOBALExports a defined labelglobal<label>[,<label>]
IDATABegin initialized data section[<name>]idata[<address>]
_ _IDLOCSSpecify ID locations_ _idlocs<expr>
#IFBegin Conditionally Assembled Code Block#if<expr>
#ELSEBegin Alternative Assembly Block to IF#else
#ENDIFEnd conditional Assembly Block#endif
#IFDEFExecute if Symbol has Been Defined#ifdef<label>
#IFNDEFExecute if Symbol has not Been Defined#ifndef<label>
INCLUDEInclude Additional Source Fileinclude<<include_file>>|"<include_file>"
LISTListing Optionslist[<list_optin>,...,<list_option>]
NOLISTTurn off Listing Outputnolist
LOCALDeclare Local Macro Variablelocal<label>[,<label>]
MACRODeclare Macro Definition<label>macro[<arg>,...,<arg>]
ENDMEnd a Macro Definitionendm
_ _MAXRAMSpecify maximum RAM address_ _maxram<expr>
MESSGCreate User Defined Messagemessg"<message_text>"
ORGSet Program Origin[<label>]org<expr>
PAGEInsert Listing Page Ejectpage
PAGESELGenerate ROM page selecting codepagesel<label>
PROCESSORSet Processor Typeprocessor<processor_type>
RADIXSpecify Default Radixradix<default_radix>
RESReserve Memory[<label>]res<mem_units>
SETDefine an Assembler Variable<label>set<expr>
SPACEInsert Blank Listing Linesspace<expr>
TITLESpecify Program Titletitle"<title_text>"
SUBTITLESpecify Program Subtitlesubtitle"<sub_text>"
UDATABegin uninitialized data section[<name>]udata[<address>]
UDATA_ACSBegins access uninitialized data section[<name>]udata_acs[<address>]
UDATA_OVRBegin overlayed uninitialized data section[<name>]udata_ovr[<address>]
UDATA_SHRBegin shared uninitialized data section[<name>]udata_shr[<address>]
VARIABLEDeclare Symbol Variablevariable<label>[=<expr>,...,<label>[=<expr>]]
WHILEPerform Loop While Condition is Truewhile<expr>
ENDWEnd a While Loopendw