SW500010 Microchip Technology, SW500010 Datasheet - Page 136

HI-TECH C PRO FOR PIC10/12/16

SW500010

Manufacturer Part Number
SW500010
Description
HI-TECH C PRO FOR PIC10/12/16
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC10/12/16r
Datasheets

Specifications of SW500010

Supported Families
PIC10, PIC12, PIC16
Core Architecture
PIC
Software Edition
Professional
Kit Contents
Software And Docs
Mcu Supported Families
PIC10/12/16
Tool Type
Compiler
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC10, PIC12, PIC14, PIC16, PIC16E
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Other names
019P
778-1006
778-1006
HI-TECH C Assembly Language
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.20 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:
expands to:
A point to note in the above example: the & character is used to permit the concatenation of macro
parameters with other text, but is removed in the actual expansion.
storage) by opening the comment with a double semicolon, ;;.
comma (or other delimiter such as a space) in an argument then angle brackets < and > may be used
to quote the argument. In addition the exclamation mark, ! may be used to quote a single character.
The character immediately following the exclamation mark will be passed into the macro argument
even if it is normally a comment indicator.
136
For example:
A comment may be suppressed within the expansion of a macro (thus saving space in the macro
When invoking a macro, the argument list must be comma-separated. If it is desired to include a
;macro: movlf
;args:
;
;descr: Move a literal value into a nominated file register:
movlf
ENDM
movlw arg1
movwf arg2 mod 080h
movlf 2,tempvar
movlw 2
movwf tempvar mod 080h
arg1 - the literal value to load
arg2 - the NAME of the source variable
MACRO
arg1,arg2
Macro Assembler

Related parts for SW500010