fixes from 0.3 to a more 'standard' forth syntax use retroforth for inspiration * remove as much state-smartness as possible (i.e. : -> :# etc) * add link (tethered mode) * think about using one dictionary. this eases mixing of target and tethered definitions. -> this works now, but is a big hack. maybe i should have used attributes from the start, but that would not enable the direct approach. the only thing which is complex now, is the dictionary lookup for the different interpret and compile modes, which would be simpler using attributes. * colors: empty host word _ host macro , target macro # target tethered word tethering --------- tethered mode is not implemented yet, but the basic idea is this: * the host forth is used for defining target macros (code generators) this is the pure (offline) compiler part * the host forth can be used to (incrementally) upload code blocks to the target, and execute code, either in native mode, or tethered mode where words are partially defined in the host, executing words on the target. * serialization and session save is not completely sane, but we can save -- target code dump + dictionary can be reloaded -- command history saved to file could be reloaded maybe it's possible to combine tethered definition and native code definition for testing, empty and final upload. 8bit / 16bit ------------ it might be cleaner to do the eventual forth as IDT/DT 16bit forth. and use the 8bit (native) forth only to write the 16bit's primitives and interpreter. assembler --------- add some standard looking rpn asm lop ( imm -- ) fop ( reg dest|bank -- ) write 16bit forth in 8bit forth ------------------------------- seems a lot better to do it that way instead of duplicating code. all primitives could be defined with a prefix, and later renamed as macros. this allows to reuse the drivers etc. and enables some more factoring and clarity. * the dtc forth could use the FSR1 as data stack, with FSR2 scratch, and FSR0 the stc data stack. enter dtc = drop, leave dtc = dup. config bits: ------------ * hspll * watchdog af serial port: ------------ * interrupt + read/write coroutines * main loop met sleep unused instructions: -------------------- INCF/DECF + skip for multibyte counters CRLF SETF -> 0 x ! / -1 x ! CPFS -> compare and skip possible optimizations ---------------------- and or xor for conditions ? then followed by exit