Hi Enoch,

> I hope that you would be interested in the following AmForth
> development. I will send you the patch under a separate cover.

I am interested. And regardless what you think of what
follows, I appreciate your work.
 
> http://pastebin.com/sDGsKjhb

A few remarks: Your patch include some pseudo changes to
files that are not really changed (e.g. amforth-interpreter
with some whitespace changes). I was slightly puzzeled wether
I mis-read the patch until I was sure, that the changes are
purely cosmetic. changing the r0 to temp0 is something very
close.

Second: Your patch steps behind what amforth has already
solved years ago: If an interrupt source has to be cleared
*within* the ISR, it will block the controller with your new code

I once spent a lot of time to deal with the reasons. I wrote
a small article for the German Forth Group, unfortunatly (for you)
in German. It seems, I should translate it into (my version of) English 
ASAP. There I explain the current interrupt handling in more detail.

Basically your patch is the old interrupt handling plus queue (A solution
I once considered too, btw.)

Third: What makes you sure that a queue with 8 entries
can do the job? The code comments indicate, that you're
not that sure yourself. The default action "Drop the interrupt"
is IMHO the worst solution.

And finally: What exactly is the use case of having a reentrant
interrupt service routine? In my understanding of interrupts, this
is a situation, that must be avoided at any price. e.g. it does not
make much sense to process a character from the usart if the
previous one is not already processed. Or to stack timer events.

Re-enabling interrupts within the current ISR is no big deal. Just
call +INT and you're done. New interrupts will arrive as they they
are triggered.

> P/S It includes some unrelated (though desired) stuff such as cinvert to
> complement a byte, etc.

There are many word that can be implemented in assembly as well.
A theoretical use case doesn't convince me. A cinvert could be a 
factor for invert ;)

Matthias

------------------------------------------------------------------------------
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

Reply via email to