define

Name

define --  defines a symbol to be used in the source program

Syntax

classsyntaxminimal syntax
invocation line only

/define =symbol [=value]

/d =symbol [=value]

Description

This control is used to define a symbol from the invocation line. This could then be used within the program to create different versions, etc. The conditional assembly directive, .ifdef or .ifndef, can also detect if the symbol has been defined. If no value is specified for the symbol, it is assigned a value of 1. The symbol name is case-sensitive.

Example

Set LOOPCOUNT to 10

	C:\COP8\NSASM\EXAMPLES>asmcop.exe sample1.asm /DEF=LOOPCOUNT=10
	

Set VERSION2 to default of 1

	C:\COP8\NSASM\EXAMPLES>asmcop.exe sample1.asm /D=VERSION2