You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 satır
9.6KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- This file documents the GNU Assembler "as".
  4. Copyright (C) 1991-2020 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>TIC54X-Builtins (Using as)</title>
  16. <meta name="description" content="TIC54X-Builtins (Using as)">
  17. <meta name="keywords" content="TIC54X-Builtins (Using as)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="AS-Index.html#AS-Index" rel="index" title="AS Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="TIC54X_002dDependent.html#TIC54X_002dDependent" rel="up" title="TIC54X-Dependent">
  25. <link href="TIC54X_002dExt.html#TIC54X_002dExt" rel="next" title="TIC54X-Ext">
  26. <link href="TIC54X_002dLocals.html#TIC54X_002dLocals" rel="prev" title="TIC54X-Locals">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="TIC54X_002dBuiltins"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="TIC54X_002dExt.html#TIC54X_002dExt" accesskey="n" rel="next">TIC54X-Ext</a>, Previous: <a href="TIC54X_002dLocals.html#TIC54X_002dLocals" accesskey="p" rel="prev">TIC54X-Locals</a>, Up: <a href="TIC54X_002dDependent.html#TIC54X_002dDependent" accesskey="u" rel="up">TIC54X-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="Math-Builtins"></a>
  63. <h4 class="subsection">9.45.7 Math Builtins</h4>
  64. <a name="index-math-builtins_002c-TIC54X"></a>
  65. <a name="index-TIC54X-builtin-math-functions"></a>
  66. <a name="index-builtin-math-functions_002c-TIC54X"></a>
  67. <p>The following built-in functions may be used to generate a
  68. floating-point value. All return a floating-point value except
  69. &lsquo;<samp>$cvi</samp>&rsquo;, &lsquo;<samp>$int</samp>&rsquo;, and &lsquo;<samp>$sgn</samp>&rsquo;, which return an integer
  70. value.
  71. </p>
  72. <dl compact="compact">
  73. <dd><a name="index-_0024acos-math-builtin_002c-TIC54X"></a>
  74. </dd>
  75. <dt><code><code>$acos(<var>expr</var>)</code></code></dt>
  76. <dd><p>Returns the floating point arccosine of <var>expr</var>.
  77. </p>
  78. <a name="index-_0024asin-math-builtin_002c-TIC54X"></a>
  79. </dd>
  80. <dt><code><code>$asin(<var>expr</var>)</code></code></dt>
  81. <dd><p>Returns the floating point arcsine of <var>expr</var>.
  82. </p>
  83. <a name="index-_0024atan-math-builtin_002c-TIC54X"></a>
  84. </dd>
  85. <dt><code><code>$atan(<var>expr</var>)</code></code></dt>
  86. <dd><p>Returns the floating point arctangent of <var>expr</var>.
  87. </p>
  88. <a name="index-_0024atan2-math-builtin_002c-TIC54X"></a>
  89. </dd>
  90. <dt><code><code>$atan2(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  91. <dd><p>Returns the floating point arctangent of <var>expr1</var> / <var>expr2</var>.
  92. </p>
  93. <a name="index-_0024ceil-math-builtin_002c-TIC54X"></a>
  94. </dd>
  95. <dt><code><code>$ceil(<var>expr</var>)</code></code></dt>
  96. <dd><p>Returns the smallest integer not less than <var>expr</var> as floating point.
  97. </p>
  98. <a name="index-_0024cosh-math-builtin_002c-TIC54X"></a>
  99. </dd>
  100. <dt><code><code>$cosh(<var>expr</var>)</code></code></dt>
  101. <dd><p>Returns the floating point hyperbolic cosine of <var>expr</var>.
  102. </p>
  103. <a name="index-_0024cos-math-builtin_002c-TIC54X"></a>
  104. </dd>
  105. <dt><code><code>$cos(<var>expr</var>)</code></code></dt>
  106. <dd><p>Returns the floating point cosine of <var>expr</var>.
  107. </p>
  108. <a name="index-_0024cvf-math-builtin_002c-TIC54X"></a>
  109. </dd>
  110. <dt><code><code>$cvf(<var>expr</var>)</code></code></dt>
  111. <dd><p>Returns the integer value <var>expr</var> converted to floating-point.
  112. </p>
  113. <a name="index-_0024cvi-math-builtin_002c-TIC54X"></a>
  114. </dd>
  115. <dt><code><code>$cvi(<var>expr</var>)</code></code></dt>
  116. <dd><p>Returns the floating point value <var>expr</var> converted to integer.
  117. </p>
  118. <a name="index-_0024exp-math-builtin_002c-TIC54X"></a>
  119. </dd>
  120. <dt><code><code>$exp(<var>expr</var>)</code></code></dt>
  121. <dd><p>Returns the floating point value e ^ <var>expr</var>.
  122. </p>
  123. <a name="index-_0024fabs-math-builtin_002c-TIC54X"></a>
  124. </dd>
  125. <dt><code><code>$fabs(<var>expr</var>)</code></code></dt>
  126. <dd><p>Returns the floating point absolute value of <var>expr</var>.
  127. </p>
  128. <a name="index-_0024floor-math-builtin_002c-TIC54X"></a>
  129. </dd>
  130. <dt><code><code>$floor(<var>expr</var>)</code></code></dt>
  131. <dd><p>Returns the largest integer that is not greater than <var>expr</var> as
  132. floating point.
  133. </p>
  134. <a name="index-_0024fmod-math-builtin_002c-TIC54X"></a>
  135. </dd>
  136. <dt><code><code>$fmod(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  137. <dd><p>Returns the floating point remainder of <var>expr1</var> / <var>expr2</var>.
  138. </p>
  139. <a name="index-_0024int-math-builtin_002c-TIC54X"></a>
  140. </dd>
  141. <dt><code><code>$int(<var>expr</var>)</code></code></dt>
  142. <dd><p>Returns 1 if <var>expr</var> evaluates to an integer, zero otherwise.
  143. </p>
  144. <a name="index-_0024ldexp-math-builtin_002c-TIC54X"></a>
  145. </dd>
  146. <dt><code><code>$ldexp(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  147. <dd><p>Returns the floating point value <var>expr1</var> * 2 ^ <var>expr2</var>.
  148. </p>
  149. <a name="index-_0024log10-math-builtin_002c-TIC54X"></a>
  150. </dd>
  151. <dt><code><code>$log10(<var>expr</var>)</code></code></dt>
  152. <dd><p>Returns the base 10 logarithm of <var>expr</var>.
  153. </p>
  154. <a name="index-_0024log-math-builtin_002c-TIC54X"></a>
  155. </dd>
  156. <dt><code><code>$log(<var>expr</var>)</code></code></dt>
  157. <dd><p>Returns the natural logarithm of <var>expr</var>.
  158. </p>
  159. <a name="index-_0024max-math-builtin_002c-TIC54X"></a>
  160. </dd>
  161. <dt><code><code>$max(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  162. <dd><p>Returns the floating point maximum of <var>expr1</var> and <var>expr2</var>.
  163. </p>
  164. <a name="index-_0024min-math-builtin_002c-TIC54X"></a>
  165. </dd>
  166. <dt><code><code>$min(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  167. <dd><p>Returns the floating point minimum of <var>expr1</var> and <var>expr2</var>.
  168. </p>
  169. <a name="index-_0024pow-math-builtin_002c-TIC54X"></a>
  170. </dd>
  171. <dt><code><code>$pow(<var>expr1</var>,<var>expr2</var>)</code></code></dt>
  172. <dd><p>Returns the floating point value <var>expr1</var> ^ <var>expr2</var>.
  173. </p>
  174. <a name="index-_0024round-math-builtin_002c-TIC54X"></a>
  175. </dd>
  176. <dt><code><code>$round(<var>expr</var>)</code></code></dt>
  177. <dd><p>Returns the nearest integer to <var>expr</var> as a floating point number.
  178. </p>
  179. <a name="index-_0024sgn-math-builtin_002c-TIC54X"></a>
  180. </dd>
  181. <dt><code><code>$sgn(<var>expr</var>)</code></code></dt>
  182. <dd><p>Returns -1, 0, or 1 based on the sign of <var>expr</var>.
  183. </p>
  184. <a name="index-_0024sin-math-builtin_002c-TIC54X"></a>
  185. </dd>
  186. <dt><code><code>$sin(<var>expr</var>)</code></code></dt>
  187. <dd><p>Returns the floating point sine of <var>expr</var>.
  188. </p>
  189. <a name="index-_0024sinh-math-builtin_002c-TIC54X"></a>
  190. </dd>
  191. <dt><code><code>$sinh(<var>expr</var>)</code></code></dt>
  192. <dd><p>Returns the floating point hyperbolic sine of <var>expr</var>.
  193. </p>
  194. <a name="index-_0024sqrt-math-builtin_002c-TIC54X"></a>
  195. </dd>
  196. <dt><code><code>$sqrt(<var>expr</var>)</code></code></dt>
  197. <dd><p>Returns the floating point square root of <var>expr</var>.
  198. </p>
  199. <a name="index-_0024tan-math-builtin_002c-TIC54X"></a>
  200. </dd>
  201. <dt><code><code>$tan(<var>expr</var>)</code></code></dt>
  202. <dd><p>Returns the floating point tangent of <var>expr</var>.
  203. </p>
  204. <a name="index-_0024tanh-math-builtin_002c-TIC54X"></a>
  205. </dd>
  206. <dt><code><code>$tanh(<var>expr</var>)</code></code></dt>
  207. <dd><p>Returns the floating point hyperbolic tangent of <var>expr</var>.
  208. </p>
  209. <a name="index-_0024trunc-math-builtin_002c-TIC54X"></a>
  210. </dd>
  211. <dt><code><code>$trunc(<var>expr</var>)</code></code></dt>
  212. <dd><p>Returns the integer value of <var>expr</var> truncated towards zero as
  213. floating point.
  214. </p>
  215. </dd>
  216. </dl>
  217. <hr>
  218. <div class="header">
  219. <p>
  220. Next: <a href="TIC54X_002dExt.html#TIC54X_002dExt" accesskey="n" rel="next">TIC54X-Ext</a>, Previous: <a href="TIC54X_002dLocals.html#TIC54X_002dLocals" accesskey="p" rel="prev">TIC54X-Locals</a>, Up: <a href="TIC54X_002dDependent.html#TIC54X_002dDependent" accesskey="u" rel="up">TIC54X-Dependent</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="AS-Index.html#AS-Index" title="Index" rel="index">Index</a>]</p>
  221. </div>
  222. </body>
  223. </html>