larsbrinkhoff / xForth

Experimental Forth cross compiler for tiny devices
GNU General Public License v3.0
61 stars 14 forks source link

DEFER #11

Open larsbrinkhoff opened 7 years ago

larsbrinkhoff commented 7 years ago

Add DEFER, IS, ACTION-OF, DEFER@, and DEFER!.

A deferred word should probably compile to a single jump instruction.

IS should work at both compile time and run time.

larsbrinkhoff commented 6 years ago

On second thought, that wouldn't work on machines with read-only or inaccessible program memory.

TG9541 commented 6 years ago

The problem is similar to VARIABLE : another level of indirection is required. And, of course, initialization.