119 lines
		
	
	
	
		
			8.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			119 lines
		
	
	
	
		
			8.5 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<html lang="en">
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								<title>TIC54X-Builtins - Using as</title>
							 | 
						||
| 
								 | 
							
								<meta http-equiv="Content-Type" content="text/html">
							 | 
						||
| 
								 | 
							
								<meta name="description" content="Using as">
							 | 
						||
| 
								 | 
							
								<meta name="generator" content="makeinfo 4.7">
							 | 
						||
| 
								 | 
							
								<link title="Top" rel="start" href="index.html#Top">
							 | 
						||
| 
								 | 
							
								<link rel="up" href="TIC54X_002dDependent.html#TIC54X_002dDependent" title="TIC54X-Dependent">
							 | 
						||
| 
								 | 
							
								<link rel="prev" href="TIC54X_002dLocals.html#TIC54X_002dLocals" title="TIC54X-Locals">
							 | 
						||
| 
								 | 
							
								<link rel="next" href="TIC54X_002dExt.html#TIC54X_002dExt" title="TIC54X-Ext">
							 | 
						||
| 
								 | 
							
								<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
							 | 
						||
| 
								 | 
							
								<!--
							 | 
						||
| 
								 | 
							
								This file documents the GNU Assembler "as".
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
							 | 
						||
| 
								 | 
							
								2006, 2007 Free Software Foundation, Inc.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Permission is granted to copy, distribute and/or modify this document
							 | 
						||
| 
								 | 
							
								under the terms of the GNU Free Documentation License, Version 1.1
							 | 
						||
| 
								 | 
							
								or any later version published by the Free Software Foundation;
							 | 
						||
| 
								 | 
							
								with no Invariant Sections, with no Front-Cover Texts, and with no
							 | 
						||
| 
								 | 
							
								Back-Cover Texts.  A copy of the license is included in the
							 | 
						||
| 
								 | 
							
								section entitled ``GNU Free Documentation License''.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								man end-->
							 | 
						||
| 
								 | 
							
								<meta http-equiv="Content-Style-Type" content="text/css">
							 | 
						||
| 
								 | 
							
								<style type="text/css"><!--
							 | 
						||
| 
								 | 
							
								  pre.display { font-family:inherit }
							 | 
						||
| 
								 | 
							
								  pre.format  { font-family:inherit }
							 | 
						||
| 
								 | 
							
								  pre.smalldisplay { font-family:inherit; font-size:smaller }
							 | 
						||
| 
								 | 
							
								  pre.smallformat  { font-family:inherit; font-size:smaller }
							 | 
						||
| 
								 | 
							
								  pre.smallexample { font-size:smaller }
							 | 
						||
| 
								 | 
							
								  pre.smalllisp    { font-size:smaller }
							 | 
						||
| 
								 | 
							
								  span.sc { font-variant:small-caps }
							 | 
						||
| 
								 | 
							
								  span.roman { font-family: serif; font-weight: normal; } 
							 | 
						||
| 
								 | 
							
								--></style>
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								<div class="node">
							 | 
						||
| 
								 | 
							
								<p>
							 | 
						||
| 
								 | 
							
								<a name="TIC54X_002dBuiltins"></a>Next: <a rel="next" accesskey="n" href="TIC54X_002dExt.html#TIC54X_002dExt">TIC54X-Ext</a>,
							 | 
						||
| 
								 | 
							
								Previous: <a rel="previous" accesskey="p" href="TIC54X_002dLocals.html#TIC54X_002dLocals">TIC54X-Locals</a>,
							 | 
						||
| 
								 | 
							
								Up: <a rel="up" accesskey="u" href="TIC54X_002dDependent.html#TIC54X_002dDependent">TIC54X-Dependent</a>
							 | 
						||
| 
								 | 
							
								<hr><br>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<h4 class="subsection">9.31.7 Math Builtins</h4>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p><a name="index-math-builtins_002c-TIC54X-1550"></a><a name="index-TIC54X-builtin-math-functions-1551"></a><a name="index-builtin-math-functions_002c-TIC54X-1552"></a>
							 | 
						||
| 
								 | 
							
								The following built-in functions may be used to generate a
							 | 
						||
| 
								 | 
							
								floating-point value.  All return a floating-point value except
							 | 
						||
| 
								 | 
							
								<span class="samp">$cvi</span>, <span class="samp">$int</span>, and <span class="samp">$sgn</span>, which return an integer
							 | 
						||
| 
								 | 
							
								value.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     
							 | 
						||
| 
								 | 
							
								<a name="index-_0040code_007b_0024acos_007d-math-builtin_002c-TIC54X-1553"></a>
							 | 
						||
| 
								 | 
							
								<dl><dt><code>$acos(</code><var>expr</var><code>)</code><dd>Returns the floating point arccosine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024asin_007d-math-builtin_002c-TIC54X-1554"></a><br><dt><code>$asin(</code><var>expr</var><code>)</code><dd>Returns the floating point arcsine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024atan_007d-math-builtin_002c-TIC54X-1555"></a><br><dt><code>$atan(</code><var>expr</var><code>)</code><dd>Returns the floating point arctangent of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024atan2_007d-math-builtin_002c-TIC54X-1556"></a><br><dt><code>$atan2(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point arctangent of <var>expr1</var> / <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024ceil_007d-math-builtin_002c-TIC54X-1557"></a><br><dt><code>$ceil(</code><var>expr</var><code>)</code><dd>Returns the smallest integer not less than <var>expr</var> as floating point.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024cosh_007d-math-builtin_002c-TIC54X-1558"></a><br><dt><code>$cosh(</code><var>expr</var><code>)</code><dd>Returns the floating point hyperbolic cosine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024cos_007d-math-builtin_002c-TIC54X-1559"></a><br><dt><code>$cos(</code><var>expr</var><code>)</code><dd>Returns the floating point cosine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024cvf_007d-math-builtin_002c-TIC54X-1560"></a><br><dt><code>$cvf(</code><var>expr</var><code>)</code><dd>Returns the integer value <var>expr</var> converted to floating-point.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024cvi_007d-math-builtin_002c-TIC54X-1561"></a><br><dt><code>$cvi(</code><var>expr</var><code>)</code><dd>Returns the floating point value <var>expr</var> converted to integer.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024exp_007d-math-builtin_002c-TIC54X-1562"></a><br><dt><code>$exp(</code><var>expr</var><code>)</code><dd>Returns the floating point value e ^ <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024fabs_007d-math-builtin_002c-TIC54X-1563"></a><br><dt><code>$fabs(</code><var>expr</var><code>)</code><dd>Returns the floating point absolute value of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024floor_007d-math-builtin_002c-TIC54X-1564"></a><br><dt><code>$floor(</code><var>expr</var><code>)</code><dd>Returns the largest integer that is not greater than <var>expr</var> as
							 | 
						||
| 
								 | 
							
								floating point.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024fmod_007d-math-builtin_002c-TIC54X-1565"></a><br><dt><code>$fmod(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point remainder of <var>expr1</var> / <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024int_007d-math-builtin_002c-TIC54X-1566"></a><br><dt><code>$int(</code><var>expr</var><code>)</code><dd>Returns 1 if <var>expr</var> evaluates to an integer, zero otherwise.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024ldexp_007d-math-builtin_002c-TIC54X-1567"></a><br><dt><code>$ldexp(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point value <var>expr1</var> * 2 ^ <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024log10_007d-math-builtin_002c-TIC54X-1568"></a><br><dt><code>$log10(</code><var>expr</var><code>)</code><dd>Returns the base 10 logarithm of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024log_007d-math-builtin_002c-TIC54X-1569"></a><br><dt><code>$log(</code><var>expr</var><code>)</code><dd>Returns the natural logarithm of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024max_007d-math-builtin_002c-TIC54X-1570"></a><br><dt><code>$max(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point maximum of <var>expr1</var> and <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024min_007d-math-builtin_002c-TIC54X-1571"></a><br><dt><code>$min(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point minimum of <var>expr1</var> and <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024pow_007d-math-builtin_002c-TIC54X-1572"></a><br><dt><code>$pow(</code><var>expr1</var><code>,</code><var>expr2</var><code>)</code><dd>Returns the floating point value <var>expr1</var> ^ <var>expr2</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024round_007d-math-builtin_002c-TIC54X-1573"></a><br><dt><code>$round(</code><var>expr</var><code>)</code><dd>Returns the nearest integer to <var>expr</var> as a floating point number.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024sgn_007d-math-builtin_002c-TIC54X-1574"></a><br><dt><code>$sgn(</code><var>expr</var><code>)</code><dd>Returns -1, 0, or 1 based on the sign of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024sin_007d-math-builtin_002c-TIC54X-1575"></a><br><dt><code>$sin(</code><var>expr</var><code>)</code><dd>Returns the floating point sine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024sinh_007d-math-builtin_002c-TIC54X-1576"></a><br><dt><code>$sinh(</code><var>expr</var><code>)</code><dd>Returns the floating point hyperbolic sine of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024sqrt_007d-math-builtin_002c-TIC54X-1577"></a><br><dt><code>$sqrt(</code><var>expr</var><code>)</code><dd>Returns the floating point square root of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024tan_007d-math-builtin_002c-TIC54X-1578"></a><br><dt><code>$tan(</code><var>expr</var><code>)</code><dd>Returns the floating point tangent of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024tanh_007d-math-builtin_002c-TIC54X-1579"></a><br><dt><code>$tanh(</code><var>expr</var><code>)</code><dd>Returns the floating point hyperbolic tangent of <var>expr</var>.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								     <p><a name="index-_0040code_007b_0024trunc_007d-math-builtin_002c-TIC54X-1580"></a><br><dt><code>$trunc(</code><var>expr</var><code>)</code><dd>Returns the integer value of <var>expr</var> truncated towards zero as
							 | 
						||
| 
								 | 
							
								floating point.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   </dl>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								   </body></html>
							 | 
						||
| 
								 | 
							
								
							 |