TAQOZ - Tachyon Forth for the P2 BOOT ROM



  • no! no distraction! no, no, no! Not in those times ;-)
  • Hello @Peter Jakacki ,

    first of all many thanks for your work on TAQOZ - taking profit of the current forced 'holydays' I finally had time to dig into Forth and to carry on a project of mine waiting for five or six years now.
    Playing with the P2Eval is really joyful, waiting for your P2D2 to be shipped to ErNa. The project reads 4x serials, logs all the data to a uSD, make some calculations and spits out numbers via serial through radio and BT. Next step is to add more sensors via I2C and as soon as I have the P2D2 to take profit of the RTC as well. And, of course, a display is likely to be added, too :)

    I had been trapped in a nasty 'bug' due to the fact TaqOz is using a shared register amongst COGs for the SWITCH statement. It happened that one COG was changing the SWITCH value and therefore they went havoc, sometime one, sometime the other - not something immediate for me to trace! It took a while to discover it out, and when I realized what was happening I finally dug into your code. In order to avoid the trap, I finally changed TaqOz source code as follows:
    *** declaration
    uswitch         res 4           ' target parameter used in CASE structures
    *** hubexec code
    ' SWITCH ( val -- )
    _SWITCH word    rg+uswitch,STOREX+ex
    ' SWITCH@ ( -- val )
    SWFETCH word    rg+uswitch,FETCHX+ex
    *** declaration
    cswitch     long    0   
    *** COG code
    _SWITCH     mov     cswitch,a
                jmp     #DROP
    SWFETCH     mov     X, cswitch
                jmp     #PUSHX

    This is of course a quick'n dirty one, but I think it's good to point it out so to avoid others to fall into the same trap. If you have better solutions, they will of course be very welcome. And thank you again for letting me into Forth - that's really something absolutely powerful to be used with micros!!!
Sign In or Register to comment.