13.07.2015 Views

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3−28PCP Reference Manual.DEFINESyntax.DEFINE symbol stringDescriptionWith the .DEFINE directive you define a substitution string that you canuse on all following source lines. The assembler searches all succeedinglines for an occurrence of symbol, and replaces it with string. If the symboloccurs in a double quoted string it is also replaced. Strings between singlequotes are not expanded.This directive is useful for providing better documentation in the sourceprogram. A symbol can consist of letters, digits and underscore characters(_), and the first character cannot be a digit.The assembler issues a warning if you redefine an existing symbol.ASSEMBLY LANGUAGEMacros represent a special case. .DEFINE directive translations are appliedto the macro definition as it is encountered. When the macro is expandedany active .DEFINE directive translations will again be applied.A label is not allowed before this directive.ExampleIf the following .DEFINE directive occurred in the first part of the sourceprogram:.DEFINE LEN ’32’then the source line below:.SPACE LEN.MESSAGE "The length is: LEN"would be transformed by the assembler to the following:.SPACE 32.MESSAGE "The length is: 32"Related information.UNDEF (Undefine .DEFINE symbol).SET (Set temporary value to a symbol)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!