Hi Enoch,

>> Well. I think its definitly worth some documentation. It is
>> not obvious how to use it.
> 
> Easy:
> 
> Suppose we have a relay connected to PORTA.0
> 
> PORTA 0 port:hi! relay_on
> PORTA 0 port:lo! relay_off

ok. Now I understand what you intent. I think that
your code is a pretty good example to demonstrate
how to use machine code without loading the full
assembler.

> BTW, bitnames.frt, IMO, needs to be simplifed in two respects:
> 1. It is extremely rare for a port to be of bidirectional use.

I've recently came across 1-wire devices. They switch very
frequently.

> 2. Port address can be limited to 0..255.

That is what earlier releases had. Now look at the ardiuno
Mega devices and what can we find there? PORTJ (261) and PORTK
(264).

>> Any given and active forth ISR is never interrupted itself by
>> another interrupt. The communication between ISR and the
>> main program is close but different (IMHO).
> 
> That's no good. Interrupt routines MUST BE interruptible or otherwise
> they would introduce unacceptable latency.

Interrupts are per se not interruptable, guess why the
I flag is cleared upon ISR start. A programmer may re-enable
interrupts within the ISR, but that's up to him/her.

> By the way, let the programmer worry about avoiding re-entrancy.

If (s)he takes care of re-entrancy (s)he will be capable to
enable it properly. I'm sure. The other way is far more
troublesome.

Matthias


------------------------------------------------------------------------------
The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, 
is your hub for all things parallel software development, from weekly thought 
leadership blogs to news, videos, case studies, tutorials, tech docs, 
whitepapers, evaluation guides, and opinion stories. Check out the most 
recent posts - join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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