• Re: Implementing DOES>: How not to do it (and why not) and how to do it

    From albert@spenarnc.xs4all.nl@21:1/5 to FFmike on Sun Aug 4 13:24:42 2024
    In article <c2588b8c811fd3ae75d3976c3a927fc3@www.novabbs.com>,
    FFmike <oh2aun@gmail.com> wrote:
    FlashForth.

    This post inspired me to remove all the DOLIT DODOES DOCREATE and DOUSER >stuff and to instead
    compile a inline code literal and a jump to the common class code.

    CREATE was modified to compile one inline literal, a RETURN and a NOP,
    the literal points to the data area. Later the RETURN and NOP are
    replaced by a JUMP to code after DOES> or in USER.

    Afterwards a second DOES> is required to change the behaviour.
    Is that possible with this setup.
    <SNIP>

    The PIC18FX, has a nice feature, there is an instruction to push a
    literal to the parameter stack
    Mucho spectacular. ;-)
    <SNIP>


    Thanks, Mike

    Groetjes Albert
    --
    Don't praise the day before the evening. One swallow doesn't make spring.
    You must not say "hey" before you have crossed the bridge. Don't sell the
    hide of the bear until you shot it. Better one bird in the hand than ten in
    the air. First gain is a cat purring. - the Wise from Antrim -

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)