Ingeniero En Telecomunicaciones
MPASM™ Assembler Usage
MPASM Directive Summary (Con’t)
MPASM Directive Summary
Directive
Directive
Description
Description
Syntax
DATA
Syntax
Create Numeric/
Text Data
data ,
[,,...,]
data ""
[,"",...]
CONTROL DIRECTIVES
CONSTANT
Declare Symbol
Constant
constant [= ,
..., [= ]]
DB
Declare Data of
OneByte
db
[,,...,]
#DEFINE
Define Text
Substitution
#define
[[(,...,)]]
DE
Declare EEPROM
Data
de
[,,...,]
DT
Define Table
dt
[,,...,]
DW
Declare Data of
One Word
dw
[,,...,]
END
End Program Block
end
EQU
Define Assembly
Constant
equ
#INCLUDE
Include Source File
include
ORG
Set Program Origin
org
ENDCEnd CBlock
endc
PROCESSOR
Set Processor
Type
processor
FILL
Specify Memory
Fill Value
fill ,
RADIX
Specify Default
Radix
radix
_ _ IDLOCS
Set ID locations
_ _idlocs
_ _MAXRAM
_ _maxram
SET
Assign Value to
Variable
set
Specify max RAM
adr
_ _MAXROM
Delete a
Substitution Label
#undefine
Specify max ROM
adr
__maxrom
#UNDEFINE
RES
Reserve Memory
res
VARIABLE
Declare Symbol
Variable
variable
[= ,...,]
LISTING
ERROR
CONDITIONAL ASSEMBLY
ELSE
Begin Alternative
Assembly to IF
else
Issue an Error
Message
error ""
ERRORLEVEL
Set Message Level
errorlevel 0|1|2|
LIST
Listing Options
list [[,...,]]
MESSG
User Defined
Message
messg ""
ENDIFEnd Conditional
Assembly
endif
ENDW
End a While Loop
endw
IF
Begin Conditional
ASM Code
if
NOLIST
Turn off Listing
Output
nolist
IFDEF
Execute If Symbol
Defined
ifdef
PAGE
Insert Listing Page
Eject
page
IFNDEF
Execute If Symbol
Not Defined
ifndef
SPACE
Insert Blank
Listing Lines
space []
WHILE
Perform Loop
WhileTrue
while
SUBTITLE
Specify Program
Subtitle
subtitl ""
TITLE
Specify Program
Title
title ""
DATA
_ _BADRAM
Specify invalid
RAM locations
_ _badram
_ _BADROM
Specify invalid
ROM locations
_ _badrom
ENDM
End a Macro
Definition
endm
CBLOCK
Define Block of
Constants
cblock []
EXITM
Exit from a Macro
exitm
EXPAND
expandSet configuration
bits
_ _config OR
_ _config ,
(PIC18 MCU)
Expand Macro
Listing
LOCAL
Declare Local
Macro Variable
local [,]
CONFIG
Set configuration
bits (PIC18 MCU)
config setting=value
[, setting=value]
MACRO
Declare Macro
Definition
macro
[,...,]
DA
Pack Strings in
14-bit Memory
[] da
[, , ..., ]
NOEXPAND
Turn off MacroExpansion
noexpand
_ _CONFIG
MACROS
1
MPASM™/MPLINK™ PICmicro® MCU Quick Chart
MPLINK™ Linker Usage
MPASM Directive Summary (Con’t)
Directive
Description
MPLINK Command Line Options
Syntax
OBJECT FILE DIRECTIVES
Option
ACCESS_OVR
Overlay section in
Access RAM
[] access_ovr
[]
BANKISEL
Select Bank for
indirect
bankisel
BANKSEL
Select RAMbank
CODE
Description
/a hexformat
Specify format of hex output file
/h, /?
Display help screen
/k pathlist
Add directories to linker script search path
banksel
/l pathlist
Add directories to library search path
Executable code
section
[] code []
/m filename
Create map file ‘filename’
/n length
Specify number of lines per listing page
Packeddata in
program memory
[] code_pack
[]
/o filename
Specify output file ‘filename’. Default is a.out.
Declare external
label
extern [ ,]
/q
Quiet mode
/w
GLOBAL
Export defined
label
extern [ .]
Suppress mp2cod.exe - prevent the
generation of a .cod file and a .lst file
/x
IDATA
Initialized data
section
[] idata []
Suppress mp2hex.exe -...
Regístrate para leer el documento completo.