Fri Sep 6 02:52:32 EDT 2013

16bit forth VM

- unified address space
- return stacks in RAM for task switching
- threading for code density / long jumps

See pic18/double-math.ss for a starting point on the primitives.

I had a start of an inner interpreter.  Where did it go?  Looks like
vm-core.f is gone...

\ pic18/direct.f:    
load vm-core.f        \ 14bit payload virtual machine
load double-math.f    \ arithmetic: these are straight from the STC library
load double-pred.f    \ predicates    
load mul16-global.f   \ multiplier with global temp state
load vm-mem.f         \ memory model
load stack-global.f   \ basic stack manips with global temp state
Ok, I see..  Search for 'vm-core.f' in the blog.  I had pasted the
exotic code there and started working on dtc.ss which is in

There are some other interesting experiments, e.g. the mcf
(metacircular forth interpreter).

I remember now.  The idea is to make a direct threaded forth where
primtivies are 8-bit native functions and the inner interpreter is

: continue begin @f+ @f+ execute/b again

This has an extra jump, so is slower, but the compatibility is
probably more important.

See staapl/staapl-exp/experimental/pic18/dtc*.ss

There seem to be 2 versions: one with on-target immediate words, and
one using macros.

For now it seems the Staapl-hosted version is more interesting as it
requires less on-target complexity.

Man, so much over-clever stuff..  Forgot all of it.