The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: Chuck Simmons
Organization: You jest.
X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.0.33 i586)
Subject: Re: Basic Stamp vs Pic processors
References: <firstname.lastname@example.org> <email@example.com> <firstname.lastname@example.org>
Date: Mon, 07 Oct 2002 12:58:30 GMT
NNTP-Posting-Date: Mon, 07 Oct 2002 05:58:30 PDT
Tony Williams wrote:
> In article <email@example.com>,
> Gibbo wrote:
> > Interesting how we all have different ways of doing things
> > and different preferences. I grew up on forth, I dislike
> > anything else.
> If my experiences are anything to go by I would suggest
> that you have an engineering background... I notice that
> engineers take immediately to Reverse Polish, without
> even knowing (or caring) about what RP means.
> > I use alot of PICs and always start with a standard routine
> > that gives me a user stack and push and pop subroutines.
> The Forth's lifo data stack is slightly awkward on a PIC.
> AIUI one of the few uP's to implement stacks in h'ware,
> aligned to Forth's requirements, was the Zilog Super-8.
> I never got a chance to use it though.
Actually for an efficient Forth machine, you need to have three hardware
stacks because using the usual return stack as Forth's own return stack
is fraught with danger particularly since some Forth constructs tend to
use the return stack for parameters as well (rot is often implemented
using the return stack). The Forth inner interpreter or address
interpreter is also tricky. The idea is to do a double indirect jump
saving the return address on Forth's return stack. Various machines
handle this with greater or less efficiency. The best I have seen is
VAX-11 and PDP-11 in which this takes 2 instructions. A big surprise to
me when I wrote Forth for RCA 1802 was that of all the 8 bit micros I
have ever used, it was the best Forth machine by miles. In writing a
Forth for TMS320C20, I have to class it as one of the worst because it
is a horror at byte and bit manipulation and access to program memory is
awkward. After writing the UART I/O for the TMS320C20, I was ready to
climb the walls and butter myself. I consider AVR a possible for Forth
execution. It cannot have a full functioning Forth because program
memory cannot be written from a program. It allows simple implementation
of additional stacks though the inner interpreter is clumsy.
Generally, von Neumann machines with highly "orthogonal" instruction
sets are good for Forth. For example, the RCA 1802 had a highly
"orthogonal" instruction set and was a piece of cake for Forth. The Z80
with its semirandom mix of instructions was pretty inefficient at Forth.
I forgot to mention. The first Forth I ever saw was one written by Chuck
Moore running on a Data General Nova 820.
... The times have been,
That, when the brains were out,
the man would die. ... Macbeth
Chuck Simmons firstname.lastname@example.org
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup