SW500009 Microchip Technology, SW500009 Datasheet - Page 113

HI-TECH FOR DSPIC/PIC24

SW500009

Manufacturer Part Number
SW500009
Description
HI-TECH FOR DSPIC/PIC24
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC24 & DsPICr
Datasheet

Specifications of SW500009

Supported Families
PIC24
Core Architecture
PIC, DsPIC
Software Edition
Standard
Kit Contents
Software And Docs
Tool Type
Compiler
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Lead Free Status / RoHS Status
Not applicable / RoHS Compliant
For Use With/related Products
DSPIC3X/PIC24
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
025
778-1003
778-1003
Macro Assembler
4.3.8.18 IF, ELSIF, ELSE and ENDIF
These directives implement conditional assembly. The argument to IF and ELSIF should be an
absolute expression. If it is non-zero, then the code following it up to the next matching ELSE,
ELSIF or ENDIF will be assembled. If the expression is zero then the code up to the next matching
ELSE or ENDIF will be skipped.
nate the conditional assembly block. Example:
In this example, if ABC is non-zero, the first jmp instruction will be assembled but not the second or
third. If ABC is zero and DEF is non-zero, the second jmp will be assembled but the first and third
will not. If both ABC and DEF are zero, the third jmp will be assembled. Conditional assembly blocks
may be nested.
4.3.8.19 MACRO and ENDM
These directives provide for the definition of macros. The MACRO directive should be preceded by
the macro name and optionally followed by a comma-separated list of formal parameters. When the
macro is used, the macro name should be used in the same manner as a machine opcode, followed
by a list of arguments to be substituted for the formal parameters.
When used, this macro will expand to the 2 instructions in the body of the macro, with the formal
parameters substituted by the arguments. Thus:
At an ELSE the sense of the conditional compilation will be inverted, while an ENDIF will termi-
For example:
IF ABC
ELSIF DEF
ELSE
ENDIF
;macro: movlf
;args: arg1 - the literal value to load
;
;descr: Move a literal value into a nominated file register:
movlf
ENDM
goto aardvark
goto denver
goto grapes
movlw arg1
movwf arg2 mod 080h
arg2 - the NAME of the source variable
MACRO
arg1,arg2
HI-TECH C Assembly Language
99

Related parts for SW500009