
Expressions
Functions
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
For More Information On This Product,
Go to: www.freescale.com
3-19
@SCP(
<str1>,<str2>
)
Returns an integer 1 (memory space attribute
N
) if the two strings compare, 0 oth-
erwise. The two strings must be separated by a comma.
Example:
IF
@SCP(
STR,'MAIN'
)
; does STR equal MAIN
@SGN(
<expression>
)
Returns the sign of <expression> as an integer: -1 if the argument is negative, 0 if
zero, 1 if positive. The memory space attribute of the result will be
N
one. The <ex-
pression> may be relative or absolute.
Example:
IF
@SGN(
INPUT
)
; is sign positive
@SIN(
<expression>
)
Returns the sine of <expression> as a floating point value. The memory space at-
tribute of the result will be
N
one.
Example:
DC
@SIN(
@CVF(COUNT)*FREQ
)
; compute sine value
@SNH(
<expression>
)
Returns the hyperbolic sine of <expression> as a floating point value. The memory
space attribute of the result will be
N
one.
Example:
HSINE
EQU
@SNH(
VAL
)
; hyperbolic sine
@SQT(
<expression>
)
Returns the square root of <expression> as a floating point value. <expression>
must be positive. The memory space attribute of the result will be
N
one.
Example:
SQRT
EQU
@SQT(
3.5
)
; SQRT = 1.870829
F
Freescale Semiconductor, Inc.
n
.