Mikael Nordman

FlashForth is a standalone Forth system for the Microchip PIC 18, 24, 30, 33 and the Atmel Atmega series of microcontrollers. A Forth system with interpreter, compiler, assembler and multitasker is provided.

Frequently asked questions

PIC24, PIC30, PIC33 does not recognize all words
The 16-bit ASM30 generates faulty code randomly.
This fault has been reported in 2010 by me and it has been recognized by Microchip.
I do not know in which version of ASM30 the fault has been fixed.
Workaround: enable the program listing for the assembler.
Then the assembler will generate correct code.

  • Pete Zawasky
    Pete Zawasky

    The Wiki can be used to add snippets of code, helpful hints and work-a rounds for FlashForth.


    The Scale word:

    Multiply n1 and n2 then divide by n3. 32 bit intermediate result.

    : */    ( n1 n2 n3 -- quotient )
    */mod swap drop  ;

    FF3.8, FF4.8

    <> ( x1 x2 -- flag )
    Leave TRUE flag if x1 and x2 are not equal.
    In original ff38, <> is actually xor.

    <> does not leave a 'well formed' flag on the stack.

  • Pete Zawasky
    Pete Zawasky

    FlashForth 4.8
    DM300027 16-bit 28 Pin Starter Demo Board

    At start-up, FF 4.8 disables all the Peripheral Modules controlled by Peripheral Module Disable SFRs, PMD1 and PMD2.

    Note the necessity to power up the ADC in order to use it.

    : RP1_init  ( -- )
       pmd1 adcmd bclr     \ Enable the ADC Module
       ...   ;