<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Stack-based math (STAKMATH) for ASM8 updated in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233263#M19436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The print macro(s) can now print any combination of strings, variables, and constants in a single statement (much like a HLL).&amp;nbsp; They can be found &lt;A href="http://www.aspisys.com/code/hc08/print.html"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Dec 2013 20:18:21 GMT</pubDate>
    <dc:creator>tonyp</dc:creator>
    <dc:date>2013-12-01T20:18:21Z</dc:date>
    <item>
      <title>Stack-based math (STAKMATH) for ASM8 updated</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233259#M19432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(For some reason I cannot change the subject when replying to a previous thread, so I started a new one.)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have updated the &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.aspisys.com%2Fcode%2Fhc08%2Fstakmath.html" rel="nofollow" target="_blank"&gt;STAKMATH&lt;/A&gt; module for ASM8 to include an expression parser set of macros.&amp;nbsp; You need the latest ASM8 v8.80&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This allows you to write an expression like the one below, and it will be converted to the appropriate macro calls.&lt;/P&gt;&lt;P&gt;For example: @Eval32 Ans=123*(N1+N2)/(N1-N2)-5&lt;/P&gt;&lt;P&gt;will result in the following sequence.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;Expr: Ans=123*(N1+N2)/(N1-N2)-5&lt;/P&gt;&lt;P&gt;--------------------------------------------------&lt;/P&gt;&lt;P&gt;Load32 #5&lt;/P&gt;&lt;P&gt;Load32 N2&lt;/P&gt;&lt;P&gt;Load32 N1&lt;/P&gt;&lt;P&gt;Sub32&lt;/P&gt;&lt;P&gt;Load32 N2&lt;/P&gt;&lt;P&gt;Load32 N1&lt;/P&gt;&lt;P&gt;Add32&lt;/P&gt;&lt;P&gt;Load32 #123&lt;/P&gt;&lt;P&gt;Mul32&lt;/P&gt;&lt;P&gt;Div32&lt;/P&gt;&lt;P&gt;Sub32&lt;/P&gt;&lt;P&gt;Save32 Ans&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;You can use nested parentheses, spaces between operands/operators, and the assignment variable is optional.&amp;nbsp; If not used, the result will remain on top-of-stack.&amp;nbsp; Numeric constants are recognized automatically, while named constants must be given as #CONSTANT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;You can also use SP-based variables (in #SPAUTO mode).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;Hope you like it.&amp;nbsp; (If you find errors in parsing, please let me know.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;tonyp&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 18:54:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233259#M19432</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2013-03-20T18:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Stack-based math (STAKMATH) for ASM8 updated</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233260#M19433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tony,&lt;/P&gt;&lt;P&gt;this is extremely helpful, thanks for contributing!&lt;/P&gt;&lt;P&gt;Best regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 22:51:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233260#M19433</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-03-26T22:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stack-based math (STAKMATH) for ASM8 updated</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233261#M19434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another update is available that uses the new features of the ASM8 v8.90 assembler (just released -- for details, see other message in that thread).&amp;nbsp; Use the same link as in my previous message above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In short,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. You can now use with different size variables, and the macros will auto-adjust the operand sizes to match.&amp;nbsp; (Note: Wrong or excessive use may inflate the produced code significantly.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The expression parsing (Eval* macro) is done much more efficiently (and faster) by using the new MSET syntax extensions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you like them.&amp;nbsp; (If you find problems, please let me know.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2013 11:24:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233261#M19434</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2013-04-04T11:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stack-based math (STAKMATH) for ASM8 updated</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233262#M19435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The latest version has these enhancements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Optional atomic loading/saving of stack for use under a multitasker (for 16-bit or longer variables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Eval guesses the right size to use based on largest var/constant used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* EvalN (eg., Eval32) will use a N-bit or higher library, but nothing smaller.&amp;nbsp; Previously, it would require exactly 32-bit.&amp;nbsp; This allows to optionally include only the highest-bit version needed in the whole application, and it will still automatically select the same or next higher bit version, in case multiple versions are included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* ABS(), NEG(), and SQR() function simulations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ASM8 v9.31 is the latest, so you would need to update that, also!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 16:37:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233262#M19435</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2013-05-20T16:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Stack-based math (STAKMATH) for ASM8 updated</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233263#M19436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The print macro(s) can now print any combination of strings, variables, and constants in a single statement (much like a HLL).&amp;nbsp; They can be found &lt;A href="http://www.aspisys.com/code/hc08/print.html"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Dec 2013 20:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Stack-based-math-STAKMATH-for-ASM8-updated/m-p/233263#M19436</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2013-12-01T20:18:21Z</dc:date>
    </item>
  </channel>
</rss>

