Re: [Flashforth-devel] Is */ missing from Flash forth 3.8 ?
Brought to you by:
oh2aun
From: Mikael N. <mik...@pp...> - 2014-03-25 05:59:20
|
I left some signed math operations out from the FF core because these were long, and can be compiled in later from math.txt. Another reason was that I have never needed signed scaling. The unsigned scaling operator is in the FF Core (UM*/MOD) In the file qmath.txt you can find scaling operators with 48-bit and 64-bit precision. I needed 64-bit intermediate precision, when calculating a 28-bit value for controlling a DDS. CREATE DOES> ... CREATE creates a dictionary entry that when executed return the first free address of the data space. Typically one then can the ALLOT more space and/or store data on the data space. DOES> defines the code that is executed by the previously created word. This code then does something with the data in the data area. Some more complex examples are in ct.txt jt.txt jumptable.txt seen.txt. BR Mike On 03/24/2014 10:50 PM, Simon Bradley wrote: > Hi, > > I have just started with this on a PIC 18F2550 and found that */ > seems to be missing. As this is a core part of Forth (I think), is > there a way to put it back in at that level? I know it is supposed > to use an intermediate double length result so replacing with * / > will not do the same. > > Forth takes some getting used to ... :) > > Any tips or short examples using CREATE and DOES> would be nice too :) > > That is, longer examples than the usual CONSTANT example where DOES> @ ; > is used. I don't quite understand how the mechanism works yet. > > Thanks, > Simon. > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |