Re: Build your own Forth for Microchip PIC: Design thoughts
- From: Elizabeth D Rather <eratherXXX@xxxxxxxxx>
- Date: Wed, 27 Jun 2007 21:35:59 -1000
none Byron Jeff wrote:
Hi folks,....
I'm back for another round after thinking about it a couple of days. I'm
coming to the stark realization that I'm really a Forth novice. My lack
of Forth experience seems to have two spheres of influence:
Yes, this is why I recommended you get a free SwiftX cross-compiler and experiment with it for a while. Write some Forth apps and make them work on some processor SwiftX supports (since the boards are cheap and you aren't developing any new hardware it should be non-traumatic).
Questions:
1. Instead of taking input from the normal input buffer, I want to
fundamentally parse a dictionary definition. The way I see it is
something like running "see <word>" taking the output and parsing it.
What I'm out of the loop with is accessing dictionary definitions
directly and parsing the words in those definitions.
2. I know that create puts new words in the dictionary and allot will
allocate space. I'm unsure how to access that allotted space once I
created it or exactly how to get a pointer to the definition's alloted
area. Brad used C, to extend and write into the dictionary space for
example.
3. I used strings above due to ignorance. How could one simplify the
examples to
add2 picompile
add2 picload
for example?
The normal way of things is that you load on your host a cross-compiler that looks just like the resident compiler, but generates PIC code. So, no such thing as picompile, just process the source in the same way but you get pic code, ideally automatically downloaded.
4. I know that Forth parses and does dictionary lookups. What kinds of
words should I be looking for to do these activities? Can parsing be
done from an arbitrary buffer?
Ideally it should replicate the resident system, but generate PIC code and download it transparently. Use the same parsing words, same logic, just feed to a different version of :, CREATE, VARIABLE, etc.
I'm sure I have more, but I think this is enough to motivate some
discussion on the subject. Am I thinking about the problem in terms that
are even remotely Forthlike? Or would another approach make more sense.
Thanks for any thoughts on the matter,
You haven't read the XC standard docs yet, have you?
Cheers,
Elizabeth
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com
"Forth-based products and Services for real-time
applications since 1973."
==================================================
.
- Follow-Ups:
- References:
- Prev by Date: Re: Build your own Forth for Microchip PIC: Design thoughts
- Next by Date: Re: Random Distribution in Forth
- Previous by thread: Re: Build your own Forth for Microchip PIC: Design thoughts
- Next by thread: Re: Build your own Forth for Microchip PIC: Design thoughts
- Index(es):