Hi All, The code execution model of amForth can be easily changed to support ITC (Indirect Threading Code) and DTC (Direct Threading Code). On RISCV the DTC model takes advantage of a call and return using a register to provide the return address which uses fewer instruction cycles than the ITC. This has the advantage of faster execution and more compact compiled words (shared\words) the dictionary and sram. The changes are almost trivial, the NEXT macro in macros.s can have a conditional assembly of j (jump for ITC) or ret (return for DTC). Also an additional macro in macro.s which conditionally assembles to .word XT_(primative name) (for ITC) or a call PFA_(primative name) (for DTC). This new macro used within the shared\words\*.s files and it would prefix the primitive word name with XT_ (for ITC) or PFA_ (for DTC). Again this is still experimental.
Regards, John S _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ [email protected] https://lists.sourceforge.net/lists/listinfo/amforth-devel
