Expressions
Functions
3-12
DSP ASSEMBLER REFERENCE MANUAL
MOTOROLA
@CHK()
Returns the current instruction/data checksum value as an integer. Useful in con-
junction with the
CK,
NOCK, and
CONTCK Assembler options (see the
OPT direc-
tive). Note that assignment of the checksum value with directives other than
SET
could cause phasing errors due to different generated instruction values between
passes. The memory space attribute of the result will be
None.
Example:
CHKSUM SET
@CHK()
; reserve checksum value
@CNT()
Returns the count of the current macro expansion arguments as an integer. A
warning will be issued if this function is used when no macro expansion is active.
The memory space attribute of the result will be
None.
Example:
ARGCNT
SET
@CNT()
; squirrel away arg count
@COH()
Returns the hyperbolic cosine of as a floating point value. The mem-
ory space attribute of the result will be None.
Example:
HYCOS
EQU
@COH(VAL)
; compute hyperbolic cosine
@COS()
Returns the cosine of as a floating point value. The memory space
attribute of the result will be None.
Example:
DC
-@COS(@CVF(COUNT)*FREQ) ; compute cosine value
@CTR({L | R})
If L is specified as the argument, returns the counter number of the load location
counter. If R is specified, returns the counter number of the runtime location
counter. The counter number is returned as an integer value with memory space
of None.
Example:
CNUM
=
@CTR(R)
; runtime counter number