Motorola dsp assembler Reference Manual



Yüklə 4,8 Kb.
Pdf görüntüsü
səhifə15/91
tarix08.10.2017
ölçüsü4,8 Kb.
#3546
1   ...   11   12   13   14   15   16   17   18   ...   91

Expressions
Functions
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
3-11
@ASN()
Returns the arc sine of  as a floating point value in the range -pi/2 to
pi/2.  The result of  must be between -1 and 1.  The memory space
attribute of the result will be None.
Example:
ARCSINE SET
@ASN(-1.0)
; ARCSINE  =  -1.570796
@AT2()
Returns the arc tangent of / as a floating point value in the range
-pi to pi.  Expr1 and expr2 must be separated by a comma.  The memory space
attribute of the result will be None.
Example:
ATAN
EQU
@AT2(-1.0,1.0)
; ATAN  =  -0.7853982
@ATN()
Returns the arc tangent of  as a floating point value in the range -pi/
2 to pi/2.  The memory space attribute of the result will be None.
Example:
MOVE
#@ATN(1.0),D0.S
; load arc tangent
@CCC()
Returns the cumulative cycle count as an integer.  Useful in conjunction with the
CCNOCC, and CONTCC Assembler options (see the OPT directive).  The mem-
ory space attribute of the result will be None.
Example:
IF
@CCC() > 200
; cycle count > 200?
@CEL()
Returns a floating point value which represents the smallest integer greater than or
equal to .  The memory space attribute of the result will be None.
Example:
CEIL
SET
@CEL(-1.05)
; CEIL  =  -1.0


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 CKNOCK, 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({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


Expressions
Functions
MOTOROLA
DSP ASSEMBLER REFERENCE MANUAL
3-13
@CVF()
Converts the result of  to a floating point value.  The memory space
attribute of the result will be None.
Example:
FLOAT
SET
@CVF(5)
; FLOAT  =  5.0
@CVI()
Converts the result of  to an integer value.  This function should be
used with caution since the conversions can be inexact (e.g., floating point values
are truncated).  The memory space attribute of the result will be None.
Example:
INT
SET
@CVI(-1.05)
; INT  =  -1
@CVS({E | N},)
Converts the memory space attribute of  to that specified by the first
argument; returns . See section 3.3 for more information on memory
space attributes. The  may be relative or absolute.
Example:
LOADDR
EQU
@CVS(X,TARGET)
; set LOADDR to X:TARGET
@DEF()
Returns an integer 1 (memory space attribute N) if  has been defined, 0
otherwise.   may be any label not associated with a MACRO or SECTION
directive.  If  is quoted it is looked up as a DEFINE symbol; if it is not quot-
ed it is looked up as an ordinary label.
Example:
IF
@DEF(ANGLE)
; assemble if ANGLE defined
@EXP()
Returns an integer 1 (memory space attribute N) if the evaluation of 
would not result in errors.  Returns 0 if the evaluation of  would cause
an error.  No error will be output by the Assembler if contains an er-
ror.  No test is made by the Assembler for warnings.  The  may be
relative or absolute.
Example:
IF
!@EXP(@FRC(VAL))
; skip on error


Yüklə 4,8 Kb.

Dostları ilə paylaş:
1   ...   11   12   13   14   15   16   17   18   ...   91




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə