<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Forth — Parallax Forums</title>
        <link>https://forums.parallax.com/</link>
        <pubDate>Sun, 05 Jul 2026 12:50:13 +0000</pubDate>
        <language>en</language>
            <description>Forth — Parallax Forums</description>
    <atom:link href="https://forums.parallax.com/categories/forthspace/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Precompiled Overlays???</title>
        <link>https://forums.parallax.com/discussion/178126/precompiled-overlays</link>
        <pubDate>Thu, 28 May 2026 07:58:16 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">178126@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
as we are all running short of RAM sooner or later, I wanted to start some discussion about precompiled overlays. Idea is instead of holding everything in RAM all the time, have the machine quickly load a chunk of stuff from SD card. For example an editor or an assembler does not need to be in RAM all the time.<br />
So far I have found one resource about this: <a href="https://www.forth.org/fd/FD-V05N1.pdf" rel="nofollow">https://www.forth.org/fd/FD-V05N1.pdf</a><br />
Do you know other implementations? Ideas, comments, suggestions?<br />
Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>Fastest qrotate of an array in hubram? - Found</title>
        <link>https://forums.parallax.com/discussion/177919/fastest-qrotate-of-an-array-in-hubram-found</link>
        <pubDate>Mon, 01 Dec 2025 03:00:39 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>bob_g4bby</dc:creator>
        <guid isPermaLink="false">177919@/discussions</guid>
        <description><![CDATA[<p>I have a 1024 element buffer in hubram of x0,y0,x1,y1,x2,y2 .. x1023,y1023. I set x1023,y1023 to 1000,0. I'm attempting to fill the buffer with a sinewave, amplitude 1000 with this code:-</p>

<pre spellcheck="false" tabindex="0">code sine       ( array arraysize binangle -- )
    mov PTRA,b
    shl PTRA,#3
    add PTRA,c
    sub PTRA,#8                         ' ptra points to last sample in the array
    rdlong xx,ptra++
    rdlong yy,ptra                      ' xx,yy loaded with last sample in the array
    mov zz,a                               ' zz loaded with the intersample binangle
    mov PTRA,c                          ' PTRA points to start of array
    rep #3,#preload                  ' repeat preloading a number of x,y points into the cordic queue
    setq yy                                       ' yy = y value of sample
    qrotate xx,zz                             ' rotate xx,yy by zz binangle
    add zz,a                                     ' zz = zz + binangle
    ' rep #7,#therest                 ' repeat reading rotated x,y + writing more points to cordic
    ' getqx r2
    ' wrlong r2,ptra++                     ' store rotated x in array
    ' getqy r2                                    ' store rotated y in array
    ' wrlong r2,ptra++
    ' setq yy                                      ' y value
    ' qrotate xx,zz                            ' rotate x,y, by zz angle
    ' add zz,a                                     ' zz = zz + binangle
    rep #4,#preload                   ' repeat reading the remaining points from the cordic queue
    getqx r2                                       ' store rotated x in array
    wrlong r2,ptra++
    getqy r2                                       ' store rotated y in array
    wrlong r2,ptra++
    3DROP;                                   ' tidy up the data stack
end
</pre>

<p>If I uncomment the middle section, 'sine' crashes. I suspect my timing is off and cordic results are being lost. Has anyone successfully  done an 'overlapped' cordic on a large buffer in hub ram. Some sample code would be appreciated if you have. I'm tempted to learn some more Spin and rewrite in Pnut, but (I presume) you can't single step this code, it would still leave me guessing at what's wrong. (The cordic engine doesn't slow down during single step and results would be lost)</p>

<p>Cheers, Bob</p>
]]>
        </description>
    </item>
    <item>
        <title>Very simple and high accuracy temperature measurement with the SMT 172 / FORTH / Prop2</title>
        <link>https://forums.parallax.com/discussion/177890/very-simple-and-high-accuracy-temperature-measurement-with-the-smt-172-forth-prop2</link>
        <pubDate>Sat, 01 Nov 2025 11:10:57 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>MGreim</dc:creator>
        <guid isPermaLink="false">177890@/discussions</guid>
        <description><![CDATA[<p>Hi folks,</p>

<p>even if this FORTH forum is quite dead, a small peace of code for extreme simple temperature measurement. For about 40 years there is the SMT 172 (former SMT 160) temperature sensor around. <br />
Its output is not analog nor I2C but a PWM modulated signal. The sensor accuracy is better then ±0.06°C (range +10°C to +40°C) and the power consumption about 60 µA. <br />
The total temperature range is -45°C to +130°C.<br />
The data sheet you may find at: <br /><a href="https://sensorsandpower.angst-pfister.com/fileadmin/products/datasheets/276/SMT172_1650-21914-0013-E-0224.pdf" rel="nofollow">https://sensorsandpower.angst-pfister.com/fileadmin/products/datasheets/276/SMT172_1650-21914-0013-E-0224.pdf</a></p>

<p>You need only one pin aside the power supply (3.3V and GND) and you can easily connect 16 of the sensors to the Propeller 2 w/o any add. hardware or interfaces. it gives the temperature between -45°C and + 130°C With our (loved and hated) TAQOZ 2.8 the software is incredible simple. <br />
Here an example, the sensor is connected to pin 30. The integration time is 0.1 s. It prints the temperature with 7 decimal places. For faster measurements juts reduce the number in the word SMT. <br />
Still missing the output in Fahrenheit, Kelvin or whatever ... should be not sooo difficult. <br />
Disadvantage: the price of the sensor is about 6 ... 8 €/$</p>

<p>P.S. I am in no relation to the manufacturer, just a user.</p>

<pre spellcheck="false" tabindex="0">( 30  := SMTPIN \ f. SMT 172  3.3 V green, GND = bn, signal = white )

pub SMTINIT ( -- )
    SMTPIN PIN
    ;


\ there are 2 methods to claculate the temperature from the PWM 
\ the linear calculation SMTLIN (linear calculation) and the slightly more accurate 
\ SMTQUAD with a second order equation
\ the measurment length in us gives a kind of integration time. 
\ as longer the time, as more stable the temperature signal. 



pub SMTLIN  ( meas_length_us -- temp 10_7 )
    RAWFREQ? ( clocks states periods )
    DROP
    \ duty = states * 100_000 / clocks
    SWAP 100_000 SWAP
    */ DUP
    \ CRLF ." Duty = " 2 .DP ." %" CRLF  ( clocks periods )
    \ T = 212,77 * DC - 68,085
    21277 *
    \ Erg : 919_166_400 = 91,91
    680_850_000 -
    \ 68,085 -
    ." Temp = " 2 .DP ." C" CRLF
    ;


pub SMTQUAD ( meas_length_us -- temp 10_7 )
    RAWFREQ? ( clocks states periods )
    DROP
    \ duty = states * 100_000 / clocks
    SWAP 100_000 SWAP
    \ CRLF ." SWAP 100_000 SWAP " CRLF
    */ DUP
    \ CRLF ." Duty = " 2 .DP ." %" CRLF  ( clocks periods )
    \ T = 212,77 * DC - 68,085
    DUP DUP *
    100000 /
    -143 *
    SWAP
    21456 * +
    \ Erg : 919_166_400 = 91,91
    686_000_000 -
    \ 68,6 -
     ." SMT:TEMP:+ " 2 .DP ." ;" CRLF
    ;



\ measure the temperature with the second order equation. 
\ the printout is the temperature in Clesius with 2.7 digits  

pub SMT (  --  )
    !SP
    SMTINIT
    100000 SMTQUAD
    ;



</pre>
]]>
        </description>
    </item>
    <item>
        <title>TAQOZ ROM FORTH - Using Smartpins to transmit and receive asych serial data</title>
        <link>https://forums.parallax.com/discussion/173773/taqoz-rom-forth-using-smartpins-to-transmit-and-receive-asych-serial-data</link>
        <pubDate>Tue, 07 Sep 2021 19:01:26 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Peter_F</dc:creator>
        <guid isPermaLink="false">173773@/discussions</guid>
        <description><![CDATA[<p>I have been experimenting with TAQOZ ROM Forth to read serial data from SDI-12 sensors and now have a working bit-bashed serial data program for transmitting and receiving data.  Developing the program has been great fun and has taught me a lot about the P2 and how to use TAQOZ.</p>

<p>I'd like to simplify the program using Smartpins in asynch serial mode.  The transmit side is working thanks to Peter and Bob's examples in 'The Bit Bashers Guide to the Parallax P2', where there are examples of transmitting serial data, but I am struggling to work out how to receive serial data using Smartpins.</p>

<p>Does anyone have any experience of receiving and handling serial data with Smartpins using TAQOZ ROM FORTH?</p>

<p>Thanks, Pete</p>
]]>
        </description>
    </item>
    <item>
        <title>Pondering about another Forth for P2</title>
        <link>https://forums.parallax.com/discussion/176121/pondering-about-another-forth-for-p2</link>
        <pubDate>Tue, 11 Feb 2025 11:05:54 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">176121@/discussions</guid>
        <description><![CDATA[<p>So while I do appreciate Taqoz, because it is optimized for P2, fast, compact and complete, I nevertheless ponder and wonder, if there could be an alternate way.</p>

<p><strong>Motivations</strong><br />
1. It would be nice, if we could use drivers, others have written and placed in OBEX, so an integration into FlexProp together with SPIN or C files would be nice. Forth as a script language inside FlexProp.<br />
2. Because Taqoz holds both stacks in LUT, it is not really suitable to do classical PAUSE multitasking. You have to swap loads of longs in and out of LUT and COG ram.<br />
3. It would be nice to have an ANSI Forth. Because of portability and documentation.<br />
4. I wonder, if the reason that Peter did not use certain elements of P2, was because they came late in P2's development? For example it seems natural to use PUSHA and POPA to implement the data stack.</p>

<p>So one direction, I am thinking is <strong>porting a Forth, that is written in C</strong>. Unfortunately my first goal the great ESP32Forth by Brad Nelson was a dead end, because it uses elements from C++ and is not documented enough for my needs to find work-arounds.<br />
Out of pForth, Atlast, YAFFA, lbForth, ceForth and cForth the last one, cForth by Mitch Bradley seems  attractive because it is very complete. Up to now I have not yet understood how I could bring the many source files into a structure, that can be compiled with FlexProp.</p>

<p>An idea is to make a Forth compiler for the FlexProp <strong>nucode-machine</strong>. As this uses only one stack this is not straight forward and would mean a lot of overhead for each subroutine level. I am not sure, if you can mix nucode with native code.</p>

<p>A totally different thing would be a <strong>new direct threaded Forth</strong> implementation:<br />
1. Use direct threaded or subroutine threaded code, that can inline small core words like Forth09 <a href="https://colorcomputerarchive.com/repo/Documents/Manuals/Programming/Forth09%20(D.P.%20Johnson).pdf" rel="nofollow">https://colorcomputerarchive.com/repo/Documents/Manuals/Programming/Forth09 (D.P. Johnson).pdf</a> . Inlining is limited by a size limit per word. IP is the program counter. Code is machine code. The idea would be, that this enables the micro cache of P2 to chime in. Downside is low code density.<br />
2. Use PTRA for data stack (POPA, PUSHA), only TOS and NOS (2nd) in cog ram. Use PTRB for return stack (CALLB, RETB). So the stacks are in HUB Ram and can be switched easily.<br />
3. As this machine would not be capable of calling high level code of other languages (at least I don't know how) perhaps a ServerCog could be used.</p>

<p>Comments? Ideas?</p>

<p>Cheers, Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>Compiling Taqoz Reloaded under P/NUT - fixed</title>
        <link>https://forums.parallax.com/discussion/176049/compiling-taqoz-reloaded-under-p-nut-fixed</link>
        <pubDate>Sun, 01 Dec 2024 16:19:29 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>bob_g4bby</dc:creator>
        <guid isPermaLink="false">176049@/discussions</guid>
        <description><![CDATA[<p>I've been successful in getting Taqoz to compile under P/NUT and it seems to run OK. I moved the Taqoz serial terminal to two alternate pins, so that the P/NUT debugger could keep using the P2EVAL usb serial port at 2Mbaud.</p>

<p>Taqoz runs normally after selecting "Compile and Load RAM"<br />
Taqoz starts up (outputs start message) but does not respond to the serial terminal after selecting "Compile and Load RAM and Debug"</p>

<p>Anyone tried this? - it'd be nice sometimes to use the very useful P/NUT debugger when PASM coding.</p>

<p>Attached is my Taqoz source fle, which needed a few minor typos fixing before it would compile. ( CON moved to column zero etc)</p>
]]>
        </description>
    </item>
    <item>
        <title>TAQOZ Reloaded v2.8 - Word Glossary</title>
        <link>https://forums.parallax.com/discussion/173302/taqoz-reloaded-v2-8-word-glossary</link>
        <pubDate>Fri, 16 Apr 2021 13:55:24 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>bob_g4bby</dc:creator>
        <guid isPermaLink="false">173302@/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="https://github.com/bob-g4bby/Bob-Edwards--Forth-Stuff/blob/main/Parallax%20Propeller%202/TAQOZ%20RELOADED%20GLOSSARY.pdf">This glossary</a> is for Taqoz Reloaded v2.8, a forth tool set resident on FLASH or the SD card. The document probably contains a few holes and errors. Please get in touch on this thread with any info to make the glossary more useful. The glossary contains all the public words in the kernel, extend.fth and file.fth. At the back there are plenty of links to other Taqoz material and guidance on loading Taqoz onto a P2 evaluation board.</p>
]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: Linear Movement of 4 Step Motors</title>
        <link>https://forums.parallax.com/discussion/176022/p2-taqoz-v2-8-linear-movement-of-4-step-motors</link>
        <pubDate>Mon, 28 Oct 2024 15:57:23 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">176022@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
perhaps this might be interesting, if you want up to 4 axis of step motors moving in parallel. It is intended to be used with step drivers, which need a direction and a step signal like A4988 or (better) TMC2209 as described here: <a href="https://forums.parallax.com/discussion/176017/tmc2209-cnc-shield-p2-a-nice-combination-to-control-step-motors#latest" rel="nofollow">https://forums.parallax.com/discussion/176017/tmc2209-cnc-shield-p2-a-nice-combination-to-control-step-motors#latest</a><br />
This driver uses local variables as described here: <a href="https://forums.parallax.com/discussion/174970/p2-taqoz-v2-8-lutlongs-value-type-variables-locals-now-faster#latest" rel="nofollow">https://forums.parallax.com/discussion/174970/p2-taqoz-v2-8-lutlongs-value-type-variables-locals-now-faster#latest</a></p>

<p>The driver is coded in Forth, no assembler, and capable of 18_000 clocks per step = 200_000_000/18_000 = 11_000 steps per second for each of the 4 motors in parallel. Linear movement of 4 axis in parallel is done like this:</p>

<ul><li>The axis with the maximum of steps in that movement is found as the leading axis. It gets assigned the fixed step-time.</li>
<li>For each of the other axis, which have lower distance to travel, their time per step is precalculated in a way, that they will arrive at the same time.</li>
<li>To achieve acceleration and deceleration nearby the start and the destination, a factor for the step time is calculated and applied for each axis.</li>
</ul><p>Acceleration/deceleration is defined by 2 constants <br />
accel# is (not exactly) the number of steps until full speed is reached.<br />
minDist# defines the speed at start.</p>

<p>In my setup right now a minimum of 12_000 clocks per step would be possible, before some resonance is starting at one axis. So this driver leaves some sort of safety factor for the speed....</p>

<p>Have fun!<br />
Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>Taqoz and Game of Life</title>
        <link>https://forums.parallax.com/discussion/176021/taqoz-and-game-of-life</link>
        <pubDate>Sun, 27 Oct 2024 10:28:44 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">176021@/discussions</guid>
        <description><![CDATA[<p>Inspired by Ross <a href="https://forums.parallax.com/discussion/176007/a-lua-luau#latest" rel="nofollow">https://forums.parallax.com/discussion/176007/a-lua-luau#latest</a> ( post # 7 ) I wanted to know a little bit about Game of Life and possible speed with Taqoz. So here is a port for Taqoz V2.8. Output to the Ansi terminal.<br />
Have fun,<br />
Christof</p>

<p>`<br />
\ -<em>- Mode: Forth -</em>-<br />
\ <a href="https://gist.github.com/nfunato/5018107" rel="nofollow">https://gist.github.com/nfunato/5018107</a></p>

<p>\ Conway's Game of Life<br />
\   originally from <a href="http://rosettacode.org/wiki/Conway's.Game.of.Life#Forth" rel="nofollow">http://rosettacode.org/wiki/Conway's.Game.of.Life#Forth</a><br />
\   see also <a href="http://en.wikipedia.org/wiki/Conway's.Game.of.Life" rel="nofollow">http://en.wikipedia.org/wiki/Conway's.Game.of.Life</a></p>

<p>\ -------------------------------------------------------------------</p>

<p>IFDEF <em>LIFE</em><br />
   oldorg org<br />
   FORGET <em>LIFE</em> }</p>

<p>pub <em>LIFE</em> PRINT" GameOfLifeB.fth" ;<br />
0 bytes oldorg</p>

<p>\ The fast wrapping requires dimensions that are powers of 2.<br />
\ CWE: switched for slower wrapping ==&gt; any width allowed<br />
\ (for playing just size, you may set terminal size to 64x17)<br />
alias := constant</p>

<dl><dt>80 constant .width.</dt>
<dt>30 constant .height.</dt>
<dd>
<p>nrows .width. * 2* ;<br />
1        nrows constant .row.<br />
.height. nrows constant .size.<br />
.size. .width. - 1- := wrapper</p>
</dd>

<dt>\ create$ world .size. allot</dt>
<dt>.size. bytes world</dt>
<dt>world         value old</dt>
<dt>old .width. + value new</dt>
<dd>clear-world world .size. erase ;</dd>

<dd>flip-world  new old to new to old ;</dd>

<dd>foreach-row ( xt -- )  .size. 0 do i over execute .row. +loop drop ;</dd>

<dd>
<p>row+  .row. + ;</p>
</dd>

<dd>row-  .row. - ;</dd>

<dd>col+  1+ ;<br />
\ : col-  1- dup .width. and + ;  \ avoid borrow into row</dd>

<dd>col- 1- dup .width. // 0= if .width. + then ; \ for any width<br />
\ : wrap ( i -- i   ) [ .size. .width. - 1- ] literal and ;<br />
\ : wrap wrapper and ;<br />
\ : wrap ;</dd>

<dd>wow@ ( i -- 0/1 ) ( wrap ) old + c@ ;</dd>

<dd>wow! ( 0/1 i -- ) ( wrap ) old + c! ;</dd>

<dd>ow@  ( i -- 0/1 ) old + c@ ;</dd>

<dd>nw!  ( 0/1 i -- ) new + c! ;</dd>

<dd>
<p>sum-neighbors ( i -- i n )<br />
dup  col- row- wow@     over      row- wow@  +  over col+ row- wow@  +<br />
over col-      wow@  +                          over col+      wow@  +<br />
over col- row+ wow@  +  over      row+ wow@  +  over col+ row+ wow@  + ;</p>
</dd>

<dt>long <em>gen</em>                  \ generation</dt>
<dd>clear  clear-world  0 <em>gen</em>  ! ;</dd>

<dd>age    flip-world   1 <em>gen</em> +! ;</dd>

<dt>\ the core Game of Life rules: just 3=&gt;born, 2or3=&gt;still alive, else=&gt;die</dt>
<dd>gencell ( i -- )  sum-neighbors over ow@ or 3 = 1 and swap nw! ;</dd>

<dd>genrow  ( i -- )  .width. over + swap do i gencell loop ;<br />
\ : gen     (   -- )  ['] genrow foreach-row age ;</dd>

<dd>gen     (   -- )  ' genrow foreach-row age ;<br />
32 := bl</dd>

<dd>emit-pos    ( 0/1-- )  if '*' else bl then emit ;</dd>

<dd>showrow     ( i  -- )  crlf  old + .width. over + swap do i c@ emit-pos loop ;</dd>

<dd>show        (    -- )  ' showrow foreach-row  crlf ." Generation " <em>gen</em> @ . ;</dd>

<dt>\ alias %XY at-xy</dt>
<dt>\ : home 0 0 at-xy ;</dt>
<dd>life ( -- ) key drop begin gen %home show key until ;</dd>
</dl><p>\ -------------------------------------------------------------------<br />
\ patterns<br />
\</p>

<dl><dt>\ char | constant '|'</dt>
<dd>pat' ( i addr len -- )<br />
rot dup 2swap  over + swap do<br />
i c@ '|' = if drop row+ dup else<br />
i c@ bl  = 1+ over wow! col+ then<br />
loop 2drop ;</dd>

<dd>count dup len$ ;</dd>

<dd>pat ( i c-addr -- ) count pat' ;</dd>

<dt>\ sample usage: "pentomino test-pat"</dt>
<dt>\ (also you may try "' pentomino test-pat" for random image)</dt>
<dd>ini' ( qp x y -- ) .width. * + swap clear pat page %home show ;</dd>

<dd>ini  ( qp     -- ) .width. 2/ .height. 2 - ini' ;</dd>

<dd>nex  ( -- ) gen %home show ;</dd>

<dt>{</dt>
<dd>test-pat' ( qp -- )<br />
begin<br />
    key case<br />
        [char] x of     1 endof<br />
        [char] n of nex 0 endof<br />
        ( do nothing )  0<br />
    endcase<br />
until ;</dd>

<dd>test-pat ini test-pat' ;<br />
}</dd>

<dt>\ still lifes</dt>
<dd>block.     " <strong>|</strong>" ;</dd>

<dd>beehive    "  **|*  *| **" ;</dd>

<dd>loaf       "  **|*  *| * *|  *" ;</dd>

<dd>boat       " **|* *| *" ;</dd>

<dt>\ oscillators</dt>
<dd>blinker    " ***" ;                    \ period  2</dd>

<dd>toad       " ***| ***" ;               \ period  2</dd>

<dd>beacon     " <strong>|</strong>|  **|  **" ;        \ period  2</dd>

<dd>clock      "  *|  <strong>|</strong>|  *" ;         \ period  2</dd>

<dd>pulsar     " *****|*   *" ;            \ period  3 after prelude</dd>

<dd>decathlon  " **********" ;             \ period 15 after prelude</dd>

<dd>pulsar3    "  " ;                      \ not yet implemented</dd>

<dt>\ spaceships</dt>
<dd>glider     "  *|  *|***" ;</dd>

<dd>lwss       "  ****|*   <em>|    *|</em>  *" ; \ light weight space ship</dd>

<dd>ship       "  ****|*   *|    *|   *" ; \ another lwss</dd>

<dt>\ breeder (if wide screen)</dt>
<dd>1d-breeder " ******** *****   ***      ******* *****" ;<br />
\ : test-1db   1d-breeder .width. 2/ 2/ .height. 2 - ini' test-pat' ;</dd>

<dt>\ long life</dt>
<dd>pentomino  " **| **| *" ;           \ finally still</dd>

<dd>pi.        " <strong>| **|</strong>" ;           \ finally oscillator</dd>

<dd>diehard    "       *|**| *   ***" ; \ die off after 130-gen</dd>

<dd>acorn      "  *|   *|**  ***" ;     \ spawn 13 gliders in 5206-gen (if wide)</dd>
</dl><p>\ -------------------------------------------------------------------<br />
\ some usage demos<br />
\</p>

<p>\ clear 0 glider ini life</p>

<p>{<br />
clear 0 glider ini life<br />
  *<br />
   *</p>

<hr /><p>Generation 0  ok</p>

<p>gen show<br />
 * *<br />
  **<br />
  *<br />
Generation 1  ok</p>

<dl><dt>clear 500 pulsar show</dt>
<dt>life</dt>
<dt>}</dt>
<dd>tst<br />
\ clear<br />
0 blinker<br />
ini<br />
10 for<br />
  lap gen lap<br />
  %home show \ lap<br />
  .lap<br />
next<br />
;<br />
\ 128 * 32<br />
\ Generation 10 35,466,424 cycles= 177,332,120ns @200MHz ok<br />
\ 80 * 30 mit display: 24,029,273 cycles= 120,146,365ns @200MHz ok<br />
\ 80 * 30 ohne display: 17,574,728 cycles= 87,873,640ns @200MHz ok<br />
`</dd>
</dl>]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: Calling a Forth Word from Assembler Code</title>
        <link>https://forums.parallax.com/discussion/175918/p2-taqoz-v2-8-calling-a-forth-word-from-assembler-code</link>
        <pubDate>Thu, 27 Jun 2024 08:36:13 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175918@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
perhaps this might be useful for others...</p>

<p>The idea is to be able to call a Forth Word from inside a code word. Of course you must be careful, that your register variables might get overwritten by the Forth code. While it is easy to call the Forth word, some effort must be done to enable correct return to the calling routine. - If anyone has a more elegant way to do it, feel free to post it...</p>

<pre spellcheck="false" tabindex="0">484 := wPointer \ store for the Instruction word Pointer
$31 := doNext

: prtHello \ do something
   crlf
   ."    Hello"
   ."  from Forth"
   crlf

   \ return to assembler
   SUB:
      mov PTRA,wPointer ' \ return from Forth restore IP
      pop r1            ' \ discard one return level
      ret
   FORTH:
   ."  never reached "
;

' prtHello := aPrtHello  \ get start address


code cTest ( x -- x+6 ) ' \ calls a Forth word
   add a,#1
   mov wPointer,PTRA      ' \ save IP
   mov PTRA,##aPrtHello
   call #doNext
   add a,#5
   ret
end


: cT
   1 cTest . \ use the code word
;
</pre>

<p>Have Fun! Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>PASM2/FORTH</title>
        <link>https://forums.parallax.com/discussion/175911/pasm2-forth</link>
        <pubDate>Thu, 13 Jun 2024 18:31:29 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>garyri</dc:creator>
        <guid isPermaLink="false">175911@/discussions</guid>
        <description><![CDATA[<p>The ROM (internal) FORTH interface needs only a PropPlug and a serial terminal emulator to work.<br />
It is possible to call multiple assembly language functions in another cog from FORTH.<br />
This can be done by setting a shared command variable like for instance 'Cmd'.<br />
PASM2 commands can then be investigated interactively to find out exactly how they work.<br />
This can be used to make documentation.</p>

<p>Functions DoPush and DoPop shown below work with the initialized cog's hardware stack.<br />
The opcodes can be found by hand assembly if no assembler is available.</p>

<p>The FORTH words in this block set up a cog to do this.</p>

<pre spellcheck="false" tabindex="0">long Cmd long Xhub long Yhub 27 longs TestCode
$FD800007 TestCode   0 + ! ---          JMP     #\ClearCmd  '
Cmd       TestCode   4 + ! --- Cmd_ptr  LONG    0           ' Pointers
Xhub      TestCode   8 + ! --- X_ptr    LONG    0           '  to hub     (for Xhub)
Yhub      TestCode  12 + ! --- Y_ptr    LONG    0           '  variables. (for Yhub)
$00000000 TestCode  16 + ! --- Cmd      LONG    0           ' Local command to exec.
$00000000 TestCode  20 + ! --- Xcog     LONG    0           ' Local input variable.
$00000000 TestCode  24 + ! --- Ycog     LONG    0           ' Local return variable.
                           --- '----------------------------------------------------
$F6040800 TestCode  28 + ! --- ClearCmd MOV     Cmd,#0      ' Clear command.
$FC600801 TestCode  32 + ! ---          WRLONG  Cmd,Cmd_ptr ' Store in hub.
$FB000801 TestCode  36 + ! --- DoInstr  RDLONG  Cmd,Cmd_ptr ' Get command from hub.
$F21C0800 TestCode  40 + ! ---          CMP     Cmd,#0  WCZ '
$AD800009 TestCode  44 + ! ---   IF_Z   JMP     #\DoInstr   ' If (Cmd==0) Wait.
$ED800007 TestCode  48 + ! ---   IF_LE  JMP     #\ClearCmd  ' If (Cmd&lt;=0) Clear Cmd.
$F21C0802 TestCode  52 + ! ---          CMP     Cmd,#2  WCZ '
$1D800007 TestCode  56 + ! ---   IF_A   JMP     #\ClearCmd  ' If (Cmd&gt;2) Clear Cmd.
                           --- '----------------------------------------------------
$FD600830 TestCode  60 + ! ---          JMPREL  Cmd         ' Jump table.
$FD800009 TestCode  64 + ! ---          JMP     #\DoInstr   ' 0=Do nothing.
$FD800013 TestCode  68 + ! ---          JMP     #\DoPush    ' 1=Do first function.
$FD800017 TestCode  72 + ! ---          JMP     #\DoPop     ' 2=Do second function.
                           --- '----------------------------------------------------
$FD640C5F TestCode  76 + ! --- DoPush   DRVNOT  #6
$FB000A02 TestCode  80 + ! ---          RDLONG  Xcog,X_ptr  ' Xcog=Xhub;
$FD600A2A TestCode  84 + ! ---          PUSH    Xcog        '
$FD800007 TestCode  88 + ! ---          JMP     #\ClearCmd  '
                           --- '----------------------------------------------------
$FD640C5F TestCode  92 + ! --- DoPop    DRVNOT  #6
$FD600C2B TestCode  96 + ! ---          POP     Ycog        '
$FC600C03 TestCode 100 + ! ---          WRLONG  Ycog,Y_ptr  ' Store Ycog to Yhub.
$FD800007 TestCode 104 + ! ---          JMP     #\ClearCmd  '
TestCode 1 COGINIT ---  ok
</pre>

<p>Then the cog's (in this case) two functions can be used like this.<br />
  3 Xhub ! --- Stores 3 in the shared memory variable Xhub to be pushed to the stack.<br />
  1 Cmd !  --- Stores 1 into Cmd. This causes the DoPush function to push Xhub to the stack.</p>

<p>2 Cmd !  --- Stores 2 into Cmd. This causes the the DoPop function to pop Yhub from the stack.<br />
  Yhub @ . --- Prints the resulting Yhub.</p>

<p>This block shows 10 numbers being pushed to the hardware stack.</p>

<pre spellcheck="false" tabindex="0"># 10 Xhub ! 1 Cmd ! ---  ok
#  9 Xhub ! 1 Cmd ! ---  ok
#  8 Xhub ! 1 Cmd ! ---  ok
#  7 Xhub ! 1 Cmd ! ---  ok
#  6 Xhub ! 1 Cmd ! ---  ok
#  5 Xhub ! 1 Cmd ! ---  ok
#  4 Xhub ! 1 Cmd ! ---  ok
#  3 Xhub ! 1 Cmd ! ---  ok
#  2 Xhub ! 1 Cmd ! ---  ok
#  1 Xhub ! 1 Cmd ! ---  ok
</pre>

<p>And this shows trying to read them back.</p>

<pre spellcheck="false" tabindex="0"># 2 Cmd ! Yhub @ . --- 1 ok
# 2 Cmd ! Yhub @ . --- 2 ok
# 2 Cmd ! Yhub @ . --- 3 ok
# 2 Cmd ! Yhub @ . --- 4 ok
# 2 Cmd ! Yhub @ . --- 5 ok
# 2 Cmd ! Yhub @ . --- 6 ok
# 2 Cmd ! Yhub @ . --- 7 ok
# 2 Cmd ! Yhub @ . --- 8 ok
# 2 Cmd ! Yhub @ . --- 8 ok (The cog's hardware stack is indeed 8 levels deep.)
</pre>

<p>Many things could be investigated using this idea.<br />
1.    The CNT counter.<br />
2.    Bit operations.<br />
3.    Conditional execution.<br />
4.    JMP CALL RET branching.<br />
5.    Smart pins.<br />
6.    Math instructions details. Like how the Carry and Zero flags work.<br />
7.    CORDIC functions.<br />
8.    Repeating instructions.<br />
9.    FIFO/Streamer.<br />
10.  Locks.<br />
11.  Event handling.<br />
12.  Etc...</p>

<hr /><p>Here is some added information about the idea.<br />
As before, a cog can be started with code stored in a longs array.</p>

<pre spellcheck="false" tabindex="0">25 longs AnArray
{ Long   Address ByteOffset Add Store }
$00000000 AnArray     0      +     !
$00000001 AnArray     4      +     !
...
</pre>

<p>Then a new cog can be started like this.</p>

<pre spellcheck="false" tabindex="0">AnArray 1 COGINIT
</pre>

<p>Executing the word AnArray returns the address where the code longs are located.</p>

<hr /><p>A cog can also be started with longs loaded in a published word. It requires less typing.</p>

<pre spellcheck="false" tabindex="0">pub SomeWord
$00000000 , $ 00000000 , etc ...
;
</pre>

<p>Trying to execute the word SomeWord would probably crash because it is not FORTH code.<br />
A new cog that runs these assembly code longs can be started like this.</p>

<div>
<img src="https://forums.parallax.com/uploads/editor/79/a6or4jxbx4d6.png" alt="image" /></div>

<p>COGINIT uses two stack parameters (HubAddress CogNum -- )<br />
The tick mark ( ' ) retrieves the address of SomeWord and puts it into the stack,<br />
ready for COGINIT to use. So ( ' ) needs to be included.</p>

<p>Assembly code to count low to high transitions of a smart pin.<br />
It arbitrarily uses pin 5.</p>

<pre spellcheck="false" tabindex="0">         '=======================================================================
         ' Put total number of lo/hi transitions on pin in hub Count variable.
         '-----------------------------------------------------------------------
                   ORG
         '-----------------------------------------------------------------------
$FD800006 Top       JMP     #\Init     ' Jump over variables.
$00000000 pCount    LONG    0          ' Pointer to hub Count.
$00000005 pin       LONG    5          ' Local pin number.
$00000000 tmp       LONG    0          ' Used to transfer count.
         '                    AAAA_BBBB_FFF_MMMMMMMMMMMMM_TT_SSSSS_0 
$0000001C incUp     LONG    %0000_0000_000_0000000000000_00_01110_0 ' Inc A up.
$0098967E halfsec   LONG    9_999_998  ' 20,000,000 MHz / 2 - 2 clock.
         '-----------------------------------------------------------------------
$FD600440 Init      DIRL    pin        ' Hold pin in reset.
$FC000802           WRPIN   incUp,pin  ' Mode = increment on A-rise.
$FC180002           WXPIN   #0,pin     ' Measurement is continuous not periodic.
$FC280002           WYPIN   #0,pin     ' Ignore adjacent B pin.
$FD600441           DIRH    pin        ' Start smart pin.
$FA880602 L1        RDPIN   tmp,pin    ' Get count. Ack pin.
$FC600601           WRLONG  tmp,pCount ' HUB["count"]= (A-rise) count;
$FD64025F           DRVNOT  #1         ' Blink LED 1.
$FD600A1F           WAITX   halfsec    ' Wait for 1/2 second.
$FD80000B           JMP     #\L1       ' Keep reading and writing count.
         '-----------------------------------------------------------------------
</pre>

<p>Here is how to run this using internal FORTH.</p>

<div>
<img src="https://forums.parallax.com/uploads/editor/rf/rmp5r42prrqc.png" alt="image" /></div>

<p>The cog first initializes pin 5 as a smart pin to count total Low to High transitions.<br />
Then it goes into a loop that keeps writing the total count of transitions and a 1/2 second delay.<br />
Here is what it looks like to query the variable Count while the cog is running.</p>

<div>
<img src="https://forums.parallax.com/uploads/editor/sd/vkppjhzacbki.png" alt="image" /></div>

<p>Because buttons are usually noisy, often the count will skip ahead more than one.<br />
The smart pin does not know about the 1/2 second delay.<br />
For some unknown reason, this button is very quiet. But it skips sometimes.</p>

<p>This cog code can be used as a digital logic counter.</p>
]]>
        </description>
    </item>
    <item>
        <title>Newer Consistent Set of Kernel + Source Files?</title>
        <link>https://forums.parallax.com/discussion/175797/newer-consistent-set-of-kernel-source-files</link>
        <pubDate>Mon, 08 Apr 2024 08:51:35 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175797@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
as for my new project I will probably need to recompile the kernel, I have tried to find a consistent set of files for a newer kernel than 2.8, like 2.14. But so far I have not been able to put the right files together.<br />
I need Kernel+Extend+Pasm+File/Flat32+Media.</p>

<p>The newest Kernel Source code seems to be in TAQOZ.zip  2024-02-19  2.4 MB in <a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/</a><br />
After minor tweaks I am able to compile this kernel.<br />
The fth-files in this zip are not up to date and do not compile.</p>

<p>The fth-files here: <a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/Forth/" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/Forth/</a><br />
do compile but the VGA output seems to be broken.<br />
Edit: VGA does work but there now is a difference between C! and c!  <img src="https://forums.parallax.com/resources/emoji/confounded.png" title=":s" alt=":s" height="20" /></p>

<p>Has someone got a complete set of working files?<br />
Thanks a lot!<br />
Christof</p>

<p>Edit2: <br />
Ok, there are a lot of other "deep" changes with 2.14, like assembler registers r3 and r4 are no longer available, but consistency seems to be given. The bug in CASE is fixed in the kernel using a register in cog ram. ALIAS is fixed too in Extend. My !MOUNTA has found its way into FLAT32, but only as a comment and so my "bad" cards are still not working without the patch. (So, Peter, you seem to read our posts, hi there!) <br />
There are LOCALS ( &gt;a type ) now. But they have no stack?</p>
]]>
        </description>
    </item>
    <item>
        <title>tTaqoz = Taqoz V2.8 with a compact Tile Driver</title>
        <link>https://forums.parallax.com/discussion/175807/ttaqoz-taqoz-v2-8-with-a-compact-tile-driver</link>
        <pubDate>Tue, 16 Apr 2024 09:15:59 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175807@/discussions</guid>
        <description><![CDATA[<p>Less is more!</p>

<p><strong>Why?</strong><br />
Taqoz V2.8 comes with a versatile VGA Bitmap Driver, which can do nice graphics. When I made my local Forth Editor it became clear, that color is quite desirable for syntax highlight and of course you want to see a lot of text at the same time. Unfortunately you also want to hold long texts in RAM. <br />
Something like a dream would be to have multitasking with several screens. A keystroke brings you to another task, like OS9 on the coco3.</p>

<p>With the original Bitmap Driver, you need H<em>W</em>(Color=4) = 10 * 6 * 4=240 bits per Character, which is for 96 Lines and 128 columns 96 * 128 * 240 / 8=368.640 bytes.</p>

<p><strong>Inspirations</strong><br />
There was a time, when microcomputers had limited RAM, so it was interresting to look at formats of old computers. A nice format is found for C128 for it's 80 columns screen. They used only one color for background for the entire screen.<br />
Another inspiration comes from ZX80 and Amstrad CPC: To have a character set with 2*2 sub-tiles, which you can use to plot figures with 4 fold resolution.</p>

<p><strong>Implementation "Tile12":</strong><br />
So the idea was to bring in a compact Tile Driver for VGA, which needs 12bits per Character. 8 Bits for the Char and 3 bits for 8 colors plus 1 bit for inverse. So we need 96 * 128 * 12 / 8=18.432 bytes per screen.<br />
The driver is a variation and simplification of Eric Smiths Tile Driver, which comes with Flex. Of course Taqoz is by Peter Jakacky. Many thanks for both!</p>

<p>Tile12 has the screen buffer format:<br />
EvenChar, ColorByte, OddChar; EvenChar, ColorByte, OddChar;….<br />
ColorByte has the format: %ICCCiccc <br />
The capitals stand for the bits for the odd char, the othes for the even char.</p>

<p>The Color Palette is dynamically reloaded, so you can manipulate the colors while the Driver is Running.<br />
$80808000 tileColors 16 cells + !      - Will change the background color.<br />
Also you can set a new screen buffer base address, which can give you several screens.</p>

<p>I did consider to implement the tile driver with own Taqoz's P2asm, but while this tool is very nice for small code words, it is not well suited for longer routines with lots of labels, which often point forward.<br />
Also I did have a look at Taqoz V2.14, but I found myself not willing to rewrite my own code because of incompatibilities and I found no striking advantages.</p>

<p>So the driver is put into the end of the kernel in tTaqozC.SPIN2 (There is no Spin in it.) And only two new Forth words could be squeezed in:<br />
TILEENTRY@ ( -- startaddress ) gives the address in hub ram of the driver<br />
COGINITP ( to_ptra startaddr cognr -- ) can start assembler code using setq to pass a parameter in ptra to the cog.<br />
tTaqoz.SPIN2 is compiled with FlexProp 6.9.1. <br />
Be aware, that I put <br />
_xinfreq    = 25_000_000 <br />
for the Kiss board.</p>

<p>While the driver is part of the kernel, timing parameters, color palette, character set and handling routines are loaded with TileDrvC.fth. Order of Modules is:<br />
Kernel - Extend-A.fth - File-A.fth - AutoT-A.fth - TileDrvC.fth</p>

<p>The base pin for the VGA output is set to 8 and the timings are for 1024x768 with 65MHz pixel frequency.<br />
At the moment the character set (8x8) is the Parallax set but to have the graphics, the last 16 chars are patched. It would be nice to use the Amstrad CPC set, but I could not yet find a hex dump of it.</p>

<p>A nice feature of Forth and of Taqoz is the ability to redirect output. The word TILE redirects to the Tile driver, CON back to serial, CONTILE activates both.<br />
tSetScrn ( 0-3 -- ) selects the active screen out 4.<br />
^p will cycle through the screens</p>

<p>Have Fun<br />
Christof!</p>

<p><img src="https://forums.parallax.com/uploads/editor/ck/4elq1tysmkop.jpg" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>TAQOZ Link List</title>
        <link>https://forums.parallax.com/discussion/175778/taqoz-link-list</link>
        <pubDate>Wed, 20 Mar 2024 08:34:06 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175778@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
some links, which I find helpful:</p>

<p><strong>About Forth basics:</strong><br /><a href="http://www.murphywong.net/hello/simple.htm#L00" rel="nofollow">http://www.murphywong.net/hello/simple.htm#L00</a></p>

<p><strong>About TAQOZ Forth for Propeller P2:</strong><br />
This Version of TAQOZ is well described and has a complete listing:<br /><a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/OLD/TAQOZ.zip/download" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/OLD/TAQOZ.zip/download</a></p>

<p>This Version is described in Bobs Great Glossary:<br /><a href="https://github.com/bob-g4bby/Bob-Edwards--Forth-Stuff/blob/main/Parallax%20Propeller%202/TAQOZ%20RELOADED%20GLOSSARY.pdf" rel="nofollow">https://github.com/bob-g4bby/Bob-Edwards--Forth-Stuff/blob/main/Parallax Propeller 2/TAQOZ RELOADED GLOSSARY.pdf</a><br />
Which is discussed here: <a href="https://forums.parallax.com/discussion/173302/taqoz-reloaded-v2-8-word-glossary/p1" rel="nofollow">https://forums.parallax.com/discussion/173302/taqoz-reloaded-v2-8-word-glossary/p1</a></p>

<p><strong>For the Taqoz inline assembler:</strong><br /><a href="https://github.com/bob-g4bby/Bob-Edwards--Forth-Stuff/blob/main/Parallax%20Propeller%202/Taqoz%20v2.8%20-%20Writing%20inline%20assembly%20language%20version%2016.pdf" rel="nofollow">https://github.com/bob-g4bby/Bob-Edwards--Forth-Stuff/blob/main/Parallax Propeller 2/Taqoz v2.8 - Writing inline assembly language version 16.pdf</a></p>

<p>Propeller P2 assembler instructions:<br /><a href="https://docs.google.com/spreadsheets/d/1_vJk-Ad569UMwgXTKTdfJkHYHpc1rZwxB-DcIiAZNdk/edit#gid=0" rel="nofollow">https://docs.google.com/spreadsheets/d/1_vJk-Ad569UMwgXTKTdfJkHYHpc1rZwxB-DcIiAZNdk/edit#gid=0</a><br />
And: <a href="https://p2docs.github.io/p2_optable.html" rel="nofollow">https://p2docs.github.io/p2_optable.html</a></p>

<p>Incomplete Assembler Manual:<br /><a href="https://docs.google.com/document/d/1rQ_2FPLebT9GL6cZxgwHFbqxO9Kh9SfO6yn9gGTT6EE/edit" rel="nofollow">https://docs.google.com/document/d/1rQ_2FPLebT9GL6cZxgwHFbqxO9Kh9SfO6yn9gGTT6EE/edit</a></p>

<p>P2 Docu:<br /><a href="https://docs.google.com/document/d/1gn6oaT5Ib7CytvlZHacmrSbVBJsD9t_-kmvjd7nUR6o/edit" rel="nofollow">https://docs.google.com/document/d/1gn6oaT5Ib7CytvlZHacmrSbVBJsD9t_-kmvjd7nUR6o/edit</a></p>

<p><a href="https://p2docs.github.io/" rel="nofollow">https://p2docs.github.io/</a></p>

<p>P2 datasheet:<br /><a href="https://www.parallax.com/package/propeller-2-p2x8c4m64p-datasheet/" rel="nofollow">https://www.parallax.com/package/propeller-2-p2x8c4m64p-datasheet/</a></p>

<p>P2 Boot process:<br /><a href="https://forums.parallax.com/discussion/170637/p2-sd-boot-code-rev-2-silicon/p1" rel="nofollow">https://forums.parallax.com/discussion/170637/p2-sd-boot-code-rev-2-silicon/p1</a></p>

<p>P2 SPIN Language (contains constants)<br /><a href="https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit?usp=sharing" rel="nofollow">https://docs.google.com/document/d/16qVkmA6Co5fUNKJHF6pBfGfDupuRwDtf-wyieh_fbqw/edit?usp=sharing</a></p>

<p><strong>Kiss board hardware:</strong><br /><a href="https://forums.parallax.com/discussion/172225/kiss-eval-board-general-discussion/p1" rel="nofollow">https://forums.parallax.com/discussion/172225/kiss-eval-board-general-discussion/p1</a></p>

<p><strong>Other useful stuff:</strong></p>

<p>ASCII Table:<br /><a href="https://www.torsten-horn.de/techdocs/ascii.htm" rel="nofollow">https://www.torsten-horn.de/techdocs/ascii.htm</a></p>

<p>VT100 escape sequences:<br /><a href="https://espterm.github.io/docs/VT100%20escape%20codes.html" rel="nofollow">https://espterm.github.io/docs/VT100 escape codes.html</a></p>

<p><strong>My contributions:</strong></p>

<p>Named local variables:<br /><a href="https://forums.parallax.com/discussion/174970/p2-taqoz-v2-8-lutlongs-value-type-variables-locals-now-faster#latest" rel="nofollow">https://forums.parallax.com/discussion/174970/p2-taqoz-v2-8-lutlongs-value-type-variables-locals-now-faster#latest</a></p>

<p>Editor for forth source code:<br /><a href="https://forums.parallax.com/discussion/175634/fed-a-local-forth-source-code-editor-for-p2-taqoz#latest" rel="nofollow">https://forums.parallax.com/discussion/175634/fed-a-local-forth-source-code-editor-for-p2-taqoz#latest</a></p>

<p>Perhaps we can have this "sticky"? <br />
Have fun!<br />
Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>New to Forth and TAQOZ</title>
        <link>https://forums.parallax.com/discussion/175777/new-to-forth-and-taqoz</link>
        <pubDate>Wed, 20 Mar 2024 00:22:22 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>travgm</dc:creator>
        <guid isPermaLink="false">175777@/discussions</guid>
        <description><![CDATA[<p>Hello!</p>

<p>I am new to Forth and currently going through the online version of Starting Forth and was using the terminal to execute the words on the P2 using TAQOZ, but I feel there are some differences and that may not be the best possible route? I have started going through the links that I found in some previous posts for the Wiki and github repos. Am I missing that TAQOZ is not fully compliant or there are just minor differences between Forth implementations? For example:</p>

<p>TAQOZ# :  ?FULL 12 = IF . " It's full " THEN ; ---  ok<br />
TAQOZ# 11 ?FULL ---  ok<br />
TAQOZ# 12 ?FULL --- 50096  ok</p>

<dl><dt>but in ForthWin</dt>
<dd>
<p>?FULL 12 = IF ." It's full " THEN ;<br />
Ok<br />
11 ?FULL<br />
Ok<br />
12 ?FULL<br />
It's full  Ok</p>
</dd>
</dl><p>Is there a best resource for me to learn how to properly learn how to do everything in TAQOZ? or have I been doing something wrong?</p>

<p>Thank you!</p>

<p>EDIT: It was noted to me of the space before the quote in the IF statement.</p>
]]>
        </description>
    </item>
    <item>
        <title>Problem reading a binary files</title>
        <link>https://forums.parallax.com/discussion/175732/problem-reading-a-binary-files</link>
        <pubDate>Sun, 18 Feb 2024 16:10:07 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>MGreim</dc:creator>
        <guid isPermaLink="false">175732@/discussions</guid>
        <description><![CDATA[<p>Hi,</p>

<p>I am trying to read a binary file from SD card. After some hours fiddling around i found the following solution working for me:</p>

<pre spellcheck="false" tabindex="0">pub FILEDUMP ( -- ) 
FOPEN test.bin
FSIZE@
0
." ----- " CRLF
DO
 I  16  //   \ CRLF each 16 bytes
 0=
  IF
    CRLF
    I .ADDR ." " 
  THEN
 I SDC@
 .BYTE ."  | "
LOOP
FCLOSE
;
</pre>

<p>for the first call it works perfectly <br />
BUT<br />
at a second call I got different data. <br />
For me it seems that TAQOZ was reading another sector after the first call of the word. <br />
A 3rd and 4th call of FILEDUMP is showing the same wrong data. <br />
Any ideas, or is there a better solution? The max. file size is about 32 kByte. <br />
I want to output the data  4 byte by 4 byte to some device and forget the data afterwards.</p>

<p>Markus</p>
]]>
        </description>
    </item>
    <item>
        <title>Latest _BOOT_P2.BIX, January 2024 on the P2 Edge Rev D?</title>
        <link>https://forums.parallax.com/discussion/175733/latest-boot-p2-bix-january-2024-on-the-p2-edge-rev-d</link>
        <pubDate>Sun, 18 Feb 2024 17:01:17 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>MGreim</dc:creator>
        <guid isPermaLink="false">175733@/discussions</guid>
        <description><![CDATA[<p>Hi, <br />
on Sourceforge<br /><a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/</a><br />
I found a new BIX image from January, 06 2024. <br />
Unfortunately it shows only: <br /><code spellcheck="false" tabindex="0">BOOTING....  CARD: SANDISK   SD SH32G REV$80 #2962451868 DATE:2023/4</code><br />
then it hangs. <br />
Same Hardware, SD-card etc. as with the BIX file from April 2021. <br />
Also using a new SD (SanDisk Max Endurance 32 Gbyte), re-formating etc. doesn't help. <br />
Is the new software expecting any hardware, that doesn't exist on the P2 Edge Rev. D with the P2 Edge Mini Breakout?</p>

<p>Markus</p>
]]>
        </description>
    </item>
    <item>
        <title>How is forth working with files, programs or scripts on the Parallax Propeller P2</title>
        <link>https://forums.parallax.com/discussion/175724/how-is-forth-working-with-files-programs-or-scripts-on-the-parallax-propeller-p2</link>
        <pubDate>Tue, 13 Feb 2024 09:23:30 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>AndyProp</dc:creator>
        <guid isPermaLink="false">175724@/discussions</guid>
        <description><![CDATA[<p>Ive been watching a load of videos about forth and kind of getting lost in the subject of most videos being about stacks and math; and few I find about actually doing anything more than flashing some Leds from a single line of code or running single line commands that do other things. I get the idea that it does what you want it to do along the lines of configuring a PLC to automate some tasks; and words are like functions but how about something more normal like an application that is saved as a file on an SD card that gets ran.</p>

<p>This got me wondering how forth uses external programs. Lets say we have a program that is saved as .fth</p>

<p>I know that you can create functions and make them part of the running forth which would be lost at the next power cycle but lets say I want a bunch of applications/functions or words that arnt saved into the tachoz system on flash but instead are files on some media.</p>

<p>How do you go about loading a file and running it. Like one that sends "hello world" to the terminal or one that does a bunch of tasks to be more than one line of code.</p>

<p>Also, is it possible to store such applications on the Flash to be called up by Tachoz</p>

<p>While I am writing, I am thinking about the concept to not tinker with the running Tachoz itself but create external forth scripts that are loaded and ran by the Tachoz, in the usual file system way like we would with Basic</p>

<p>Last one, of course if all the files are stored on lets say SD, and the P2 was power cycled, what would run the first application, basically it needs some user intervention to get rolling, does Tachoz look for some specific file/word on the lines of Autoexec.bat</p>

<p>This subject is likely very useful for others also looking at forth and Tachoz.</p>

<p>Anyone can enlighten this a little bit.</p>
]]>
        </description>
    </item>
    <item>
        <title>TAQOZ for implementing a parallel bus</title>
        <link>https://forums.parallax.com/discussion/174762/taqoz-for-implementing-a-parallel-bus</link>
        <pubDate>Fri, 12 Aug 2022 08:24:26 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>MGreim</dc:creator>
        <guid isPermaLink="false">174762@/discussions</guid>
        <description><![CDATA[<p>Hi, <br />
first statement: I am a TAQOZ newbie</p>

<p>My task: I want to realize a USB  &lt;-&gt; 16 bit parallel bus (similar to ISA or UNIBUS)  R/W interface with the Prop 2 using TAQOZ. <br />
Some words like<br />
SENDBUS  address data<br />
or<br />
READBUS addres data</p>

<p>should write a word of 16 bit to PIN 0..15 and set also R/W PIN16 to high and also handle Address/Data line at PIN17. etc..<br />
I know that I can easy handle each PIN with Forth, but all the documentation of TAQOZ and Assembler is for a beginner overwhelming. <br />
So I am just looking for some hints, how to handle such a task in the most professional / elegant way. <br />
Is bit banging of each pin the right way? Or is there some command to set 16 bit input / output as a single command? <br />
Many thanks in advance for each reply<br />
Markus</p>
]]>
        </description>
    </item>
    <item>
        <title>Upload from putty...</title>
        <link>https://forums.parallax.com/discussion/175706/upload-from-putty</link>
        <pubDate>Thu, 25 Jan 2024 19:27:14 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>frank freedman</dc:creator>
        <guid isPermaLink="false">175706@/discussions</guid>
        <description><![CDATA[<p>Getting back to FORTH after a too  long break. If I wanted to add or write a something-process.fth, I think there was a way to just upload the  module using putty, just can't find my notes on that or a how to after much searching for this.  If anyone knows how or knows the link to the how to do this that would be most appreciated.  Thanks...</p>
]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: Include for SD-files</title>
        <link>https://forums.parallax.com/discussion/175651/p2-taqoz-v2-8-include-for-sd-files</link>
        <pubDate>Tue, 19 Dec 2023 08:49:53 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175651@/discussions</guid>
        <description><![CDATA[<p>Hi, <br />
like so many things in Forth here is a solution so simple, that it might be too trivial to post. But perhaps it might come handy?</p>

<p>The parent-file contains <br />
include </p>

<p>The child must end with <br />
endInclude<br />
to go back to the parent.</p>

<p>(Tested with version _BOOT_P2.BIX in Taqoz.zip in <a href="https://sourceforge.net/projects/tachyon-" rel="nofollow">https://sourceforge.net/projects/tachyon-</a><br />
forth/files/TAQOZ/binaries/ . ) <br />
Have Fun! Christof</p>

<pre spellcheck="false" tabindex="0">long incDepth   incDepth ~

pre include \ &lt;filename&gt;
   incDepth ++
   filesect @ &gt;L
   _fread @ &gt;L
   [C] FOPEN
   @FILE OPEN-SECTOR
;

: endInclude \ resume to the including file
   incDepth @ 0exit
   incDepth --
   L&gt; _fread !
   L&gt; filesect !
   get$ drop \ drop the file name
;

include test2.fth

." Welcome back from test1.fth"

{
\ test2.fth
." Hello from test2!"

endInclude

}
</pre>
]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: Patch for LEN$</title>
        <link>https://forums.parallax.com/discussion/175633/p2-taqoz-v2-8-patch-for-len</link>
        <pubDate>Sun, 10 Dec 2023 10:11:27 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175633@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
the kernel word LEN$ is not safe, when the serial interrupt occurs during it's execution, as discussed here: <a href="https://forums.parallax.com/discussion/175631/is-this-code-with-rdfast-secure/p1?new=1" rel="nofollow">https://forums.parallax.com/discussion/175631/is-this-code-with-rdfast-secure/p1?new=1</a><br />
Normally this is not very likely to occur.</p>

<p>The original version is very elegant, fast and compact. So the suggested patch is not so fast and does not fit into the same space and will be sitting in HUB RAM.<br />
As the original word is used by other words, the suggestion is to patch a jump to the new version into the original code in cog memory.</p>

<pre spellcheck="false" tabindex="0">code newLEN$ ( str$ -- length ) ' \ original fails when interrupted
   mov r0,a
   mov a,#0
   .l1 rdbyte r1,r0 wz
      if_z ret
      add r0,#1
      add a,#1
   jmp #l1
   jmp #\0 ' \ dummy to get the code for patch
end
\ 0BC22 FD80_0000     jmp #\0 ' \ dummy to get the code for patch
' newLEN$ 2+ $FD80_0000 or $7b cog! \ patch jmp to newLEN$ into original cog routine
</pre>

<p>(Mandatory for this is the use of the version _BOOT_P2.BIX in Taqoz.zip in <a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/</a> . )</p>

<p>@bob_g4bby , perhaps it would be a good idea to place a warning in your Glossary?</p>

<p>Have fun, Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>Control Accessory</title>
        <link>https://forums.parallax.com/discussion/175625/control-accessory</link>
        <pubDate>Tue, 05 Dec 2023 03:37:44 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Unsoundcode</dc:creator>
        <guid isPermaLink="false">175625@/discussions</guid>
        <description><![CDATA[<p>Furthering my effort to get familiar with the P2's IO I created a rudimentary Forth app to enable control of the Parallax "control accessory" which has 4 tactile push buttons and 4 blue leds. The accessory was connected to pins 24 - 31</p>

<p>These are the 5 words and 1 variable that I used</p>

<dl><dt>byte pin_#  \ variable for the pin connected to the pressed button</dt>
<dd>
<p>rst 0 pin_# ! ; \ word to initialize the variable to zero</p>
</dd>

<dd>
<p>set_pd pin 2304 wrpin L ; \ set a pin to 1k5 pull down</p>
</dd>

<dd>
<p>read_buttons 32 28 do I pin@ -1 = if I pin_# ! then loop ;  \ monitor the buttons and store the value in pin_#</p>
</dd>

<dd>
<p>case_test switch 28 case 25 pin H break 29 case 24 pin H break 30 case 26 pin H break 31 case 27 pin H break ; \ switch case pin_# and set led high</p>
</dd>

<dd>
<p>all_low 28 24 do I pin L loop ; \ take all led pins low</p>
</dd>
</dl><p>usage <br />
Make sure pins 28 to 31 are set to pull down before running the following loop</p>

<p>begin rst read_buttons pin_# @ case_test 100 ms all_low key until</p>

<p><span data-youtube="youtube-_ic6K-wFW2o?autoplay=1"><a rel="nofollow" href="https://www.youtube.com/watch?v=_ic6K-wFW2o"><img src="https://img.youtube.com/vi/_ic6K-wFW2o/0.jpg" width="640" height="385" border="0" alt="image" /></a></span></p>
]]>
        </description>
    </item>
    <item>
        <title>PULLUP PULLDOWN</title>
        <link>https://forums.parallax.com/discussion/175617/pullup-pulldown</link>
        <pubDate>Wed, 29 Nov 2023 21:06:23 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Unsoundcode</dc:creator>
        <guid isPermaLink="false">175617@/discussions</guid>
        <description><![CDATA[<p>I have the accessory set for the evaluation board and I want to test the one that has buttons and leds but I'm thinking I need to put PULLDOWN on the input pin. This is what I have tried and it does not seem to work any tips would be appreciated</p>

<p><code spellcheck="false" tabindex="0">TAQOZ# 36 PIN R SETPIN PULLDOWN</code></p>

<p>I can see where it sets the pin low when I check "lsio" but it is not reading the input from the control button when I press it, the leds are working fine.</p>
]]>
        </description>
    </item>
    <item>
        <title>Charlieplexing</title>
        <link>https://forums.parallax.com/discussion/175620/charlieplexing</link>
        <pubDate>Sat, 02 Dec 2023 15:28:19 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Unsoundcode</dc:creator>
        <guid isPermaLink="false">175620@/discussions</guid>
        <description><![CDATA[<p>A simple example of charlieplexing using 4 simple words and one variable in the Forth language. The 4th word was duplicated so that I could run the example at two different speeds to clearly show the switching sequence. I learnt a lot from this small project I am sure there are mistakes and optimizations that could be applied but I feel progress has been made in the last 5 days since I began with Forth. This is Manna for noobs.</p>

<p>Video</p>

<p><span data-youtube="youtube-x7NSPe-vVzI?autoplay=1"><a rel="nofollow" href="https://www.youtube.com/watch?v=x7NSPe-vVzI"><img src="https://img.youtube.com/vi/x7NSPe-vVzI/0.jpg" width="640" height="385" border="0" alt="image" /></a></span></p>
]]>
        </description>
    </item>
    <item>
        <title>How to use MLOAD? - Solved: ( EVALUATE)</title>
        <link>https://forums.parallax.com/discussion/175622/how-to-use-mload-solved-evaluate</link>
        <pubDate>Sat, 02 Dec 2023 17:08:17 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175622@/discussions</guid>
        <description><![CDATA[<p>Hi,<br />
can anyone direct me to some example, how to use mload ( or another word ) to immediately interprete source code, which is given in a string?<br />
The problem is, that the code is only executed, AFTER switching back to the interpreter.<br />
Thank You in advance! Christof</p>

<pre spellcheck="false" tabindex="0">TAQOZ# : ml ---
   " 1 .  " ---
   dup ---
   dup len$ 1- + $000D swap ! ---
   mload ---
   2 . ---
; ---  ok
TAQOZ#  ---  ok

TAQOZ# ml --- 2  ok
TAQOZ# 1 .  --- 1  ok
</pre>
]]>
        </description>
    </item>
    <item>
        <title>Need a little help getting started</title>
        <link>https://forums.parallax.com/discussion/175608/need-a-little-help-getting-started</link>
        <pubDate>Mon, 27 Nov 2023 03:30:09 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Unsoundcode</dc:creator>
        <guid isPermaLink="false">175608@/discussions</guid>
        <description><![CDATA[<p>Hi, it was recommended to me that I try Forth with the P2. Forth is not mentioned on the product page under the heading Programming Tools (IDEs) but at the bottom of the page "Taqoz discussion" has a link, so if you can make the connection between Taqoz and Forth then the link takes you to a post that has a TAQOZ.zip file buried 50 posts deep in the Forth forum.</p>

<p>So I'm wondering if there is a place where a noob like me can get help to get started, a page perhaps with examples such as "blink.forth" or just generally controlling gpio.</p>

<p>Also is the zip I downloaded the best file to have or use, the zip has files that I put on an SD card and that worked nicely. It reports that I have v2.7 of <em>Taqoz Reloaded sIDE</em> is this the version I need.</p>

<p>The report seemed to suggest that I have 17 modules on the SD card is there a link on how to use a module or add other modules.</p>

<p>I started exploring Forth for the first time yesterday. I can now add the two values on the top of the stack, I think that's the correct way to phrase it. So I'm sure a lot of the questions I have will be answered as I learn Forth but a jump start will be appreciated.</p>

<p>I have attached a video if I'm heading in the wrong direction please tell me so that I can change course.</p>

<p>T.I.A.</p>

<p>Video:  <span data-youtube="youtube-YoVUo0Iz6b8?autoplay=1"><a rel="nofollow" href="https://www.youtube.com/watch?v=YoVUo0Iz6b8"><img src="https://img.youtube.com/vi/YoVUo0Iz6b8/0.jpg" width="640" height="385" border="0" alt="image" /></a></span></p>
]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: The Glossary Onboard at Your Fingertips</title>
        <link>https://forums.parallax.com/discussion/175618/p2-taqoz-v2-8-the-glossary-onboard-at-your-fingertips</link>
        <pubDate>Thu, 30 Nov 2023 11:22:34 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175618@/discussions</guid>
        <description><![CDATA[<p>Writing an Editor for Taqoz, it became clear, that it would be nice to have @bob_g4bby 's great Glossary onboard.<br />
So here you find a pure version of the Glossary and a few words to find content in it.<br />
On the SD-card GlosA.fth must be GLOS.FTH.<br />
(In my editor, it is possible to print the line about the word sitting under the cursor with ctrl-W.)<br />
The format of GlosA.fth is choosen in a way that the tool can also filter the first lines of definitions of any other forth source file. PUB-words give the headlines, :-words are "normal".</p>

<p>As always: <br />
(Mandatory for this is the use of the version _BOOT_P2.BIX in Taqoz.zip in <a href="https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/" rel="nofollow">https://sourceforge.net/projects/tachyon-forth/files/TAQOZ/binaries/</a> . )<br /><img src="https://forums.parallax.com/uploads/editor/uh/f4bao8pthof1.png" alt="" title="" /></p>

<p>Have fun!<br />
Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>P2 Taqoz V2.8: The Challenge: Make a Local Editor, so advantageous, that we will really use it?</title>
        <link>https://forums.parallax.com/discussion/175605/p2-taqoz-v2-8-the-challenge-make-a-local-editor-so-advantageous-that-we-will-really-use-it</link>
        <pubDate>Sat, 25 Nov 2023 18:26:59 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>Christof Eb.</dc:creator>
        <guid isPermaLink="false">175605@/discussions</guid>
        <description><![CDATA[<p>This is some follow-up of <a href="https://forums.parallax.com/discussion/174049/thoughts-about-a-local-hybrideditor-for-forth-on-a-microcontroller#latest" rel="nofollow">https://forums.parallax.com/discussion/174049/thoughts-about-a-local-hybrideditor-for-forth-on-a-microcontroller#latest</a></p>

<p>When I write programs with Taqoz, I have P2 connected to a Windows PC and use the nice editor Notepad++. I then copy the program into the Tera Term. When the program gets longer, this procedure gets increasingly cumbersome and slower. Due to the limited serial buffer of Taqoz, problems start to arise and you have to load into a file on the SD card and then compile from SD card.</p>

<p>So, if there was an Editor in Taqoz, which had a certain "sufficient" level of comfort, perhaps you could really use this? The idea is still to have the PC with Teraterm, because web and pdf documents have to be accessible.</p>

<p>I have now begun to write this Editor. It is no longer a Block Editor but still has fixed length lines. And it does not spill over from line to line. When the file is saved then the fixed length of each line is converted to a line ending with CRLF. Taqoz has a file system with names and the FAT is compatible with Windows.<br />
For my monitors a height of 48 of 54 lines and a width of 100 columns is much better than the old 16*64 screens. ( In my opinion, those old crammed screens have contributed a lot, that many people know Forth as write only language... )</p>

<p>The picture shows syntax highlighting and there is the feature to jump to the beginnings of definitions. In the upper part of the screen there is a list of the definitions as a table of contents, which can be used to jump very quickly. If a word is defined with PUB it will be printed in red in this table, which gives the possibility to structure.<br />
The dictionary is used for the color too: If a word is not existent in the vocabulary, then it will be printed in yellow. So here we can have an advantage, that we are on the target machine. This feature is quite nice, because words with typos will be yellow too. In the picture, the inline assembler is yellow, because its vocabulary is not activated.</p>

<p><img src="https://forums.parallax.com/uploads/editor/ez/vgeiv7lp3cor.png" alt="" title="" /></p>

<p>This is work in progress. I think, some sort of block copy will be needed and I am thinking about a feature which shows the first line of the definition of the word under the cursor. Jump to this definition and back again. <br />
Also it seems feasible to display a relevant line from Bobs Forth Glossary.</p>

<p>Other thoughts, ideas?<br />
Have fun, Christof</p>
]]>
        </description>
    </item>
    <item>
        <title>TAQOZ Reloaded - SWITCH statement cannot be run by more than one cog</title>
        <link>https://forums.parallax.com/discussion/174584/taqoz-reloaded-switch-statement-cannot-be-run-by-more-than-one-cog</link>
        <pubDate>Thu, 12 May 2022 09:34:35 +0000</pubDate>
        <category>Forth</category>
        <dc:creator>bob_g4bby</dc:creator>
        <guid isPermaLink="false">174584@/discussions</guid>
        <description><![CDATA[<p>In the Taqoz source code, I've been trying to fix a problem caused by long 'uswitch' being located in Hub memory, rather than where it should be in COG memory.  If two or more COGS attempt to use a SWITCH statement simultaneously, then a race condition exists on the value stored at 'uswitch' and one or other SWITCH constructs will misbehave.</p>

<p>I'm looking for help to fix this as my knowledge of Taqoz source code and assembly language is limited. Here's what I've tried - assembling using flexprop 5.9.9 using <a rel="nofollow" href="https://forums.parallax.com/discussion/174353/solved-issues-to-compile-taqoz-with-flexprop-v-5-9-8">this source code</a>.</p>

<p>I add a new long 'cswitch' to COG memory:-</p>

<pre spellcheck="false" tabindex="0">txpin       long    tx_pin

pinreg      long    0       ' PIN  - access via PIN operation'
cswitch     long    0       ' storage for the SWITCH selection

u
ACC     long    0       ' accumulator register cleared to zero before instruction'
xx
x       long    0
</pre>

<p>I substitute for words _SWITCH and SWFETCH:-</p>

<pre spellcheck="false" tabindex="0">' ************** CASE STATEMENTS *********************8
{
' SWITCH ( val -- )
_SWITCH word    rg+uswitch,STOREX+ex


' SWITCH@ ( -- val )
SWFETCH word    rg+uswitch,FETCHX+ex      ' Peter's original words
}

_SWITCH word cswitch,STOREX+ex

SWFETCH word cswitch,FETCHX+ex               ' New words cause Taqoz boot to fail or other hiccups

</pre>

<p>I've tried a number of different phrases but haven't hit on the right one over several days. the problem could do with a fresh pair of eyes!</p>
]]>
        </description>
    </item>
   </channel>
</rss>
