Hello Matthias, I hope that you would be interested in the following AmForth development. I will send you the patch under a separate cover.
Regards, Enoch. ----------------------------------------------------------------- 1 Objective ------------ One of AmForth features is the ability to write interrupt service routines (ISRs) in Forth. However, in the existing implementation as of SVN r1423 those ISRs should run with the hardware interrupt system (SREG I-bit) disabled. This means that one has to keep those ISRs very short and defer long processing to the "main" (aka user mode). The following changes to the kernel introduce an eight level soft interrupt queue, allowing Forth ISRs to be interruptible and thus be as slow to execute as necessary (and even reentrant). 2 Implementation ----------------- To the existing +int and -int ("hard front-end") words that control the SREG I-bit the following ("soft rear-end") words were added: 2.1 int+ ( -- ) "soft interrupts on" ======================================= Enables the soft interrupts. By default soft interrupts are enabled. 2.2 int- ( -- ) "soft interrupts off" ======================================== Disables the soft interrupts. 2.3 int' ( -- addr ) "soft interrupts apostrophe" ==================================================== Returns the address of a system variable where the lower byte, if non zero, indicates the occurance of a hard interrupt overflow. The overflow mark is the interrupting-device program address. Clear this mark by: 0 int' c! The higher byte, if non-zero, indicates having the soft interrupts inhibited. 3 Compatibility ---------------- Existing code should not be affected. ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amforth-devel