LOCAL - Declare Local Macro Variable

MPASM Assembler

LOCAL - Declare Local Macro Variable

Syntax

local <label>[,<label>...]

Description

Declares that the specified data elements are to be considered in local context to the macro. <label> may be identical to another label declared outside the macro definition; there will be no conflict between the two.

If the macro is called recursively, each invocation will have its own local copy.

Example

<main code segment>

:

:

len equ 10 ; global version

size equ 20 ; note that a local variable

; may now be created and modified

test macro size

local len, label ; local len and label

len set size ; modify local len

label res len ; reserve buffer

len set len-20

endm ; end macro

See Also

ENDM MACRO


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