Re: Build your own Forth for Microchip PIC (Episode 837)
- From: Coos Haak <chforth@xxxxxxxxx>
- Date: Sun, 24 Jun 2007 19:12:11 +0200
Op Sun, 24 Jun 2007 10:12:40 -0500 schreef none:
In article <137sb0raq9lv503@xxxxxxxxxxxxxxxxxx>,<snip>
Elizabeth D Rather <eratherXXX@xxxxxxxxx> wrote:
none Byron Jeff wrote:
It's a Harvard architecture that's difficult to access and slow to
update. So transferring little bits at a time is a highly desireable
trait.
Yes. But you need somewhere to transfer them to that's a little more
accessible than that. PIC doesn't seem to support ram development,
which is the best way to do incremental testing.
This is the reason I'm wanting to use the host as a remote execution
environment. The model you see is:
1. Compile words on the host
2. Transfer compiled code words to RAM.
3. Test/Debug code on target recompiling and reloading as necessary.
4. When finished transfer code to more permanent memory on target.
A perfectly workable model.
I doubt it, what about inline data (like literals, branches etc.)
You have to have two different token interpreters: one for executing code
out of data memory (that would be RAM I assume) and one for code in code
memory. One of them would have to have an extra indirection. As they say
around here: two believers in one bed, the devil sleeps between them.
Look at the 8051s, here it is possible to overlay code and data regions, so
the CPU does not know it's executing from RAM.
<snip>
Code or data space?BTW I realized that I'm still trying to figure out how in the heck forth
compiles a number into a definition. What is the xt for a number?
It's the address for (or call to) a word that pushes the actual value on
the stack, followed by the value:
... [xt of LIT] [value] ...
So the number is inlined into the code.
Many Forths synthesize the second stack, be it the return or data one, no
There may be different versions for 8, 16, or 32-bit literals. It has
to advance the interpreter pointer or PC beyond the value, in addition
to pushing the value on the stack.
That's problematic for an STC that doesn't have access to the hardware
return stack. It'll have to be inlined.
problem here.
--
Coos
CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html
.
- Follow-Ups:
- References:
- Build your own Forth for Microchip PIC (Episode 837)
- From: none
- Re: Build your own Forth for Microchip PIC (Episode 837)
- From: Elizabeth D Rather
- Re: Build your own Forth for Microchip PIC (Episode 837)
- From: none
- Re: Build your own Forth for Microchip PIC (Episode 837)
- From: Elizabeth D Rather
- Re: Build your own Forth for Microchip PIC (Episode 837)
- From: none
- Build your own Forth for Microchip PIC (Episode 837)
- Prev by Date: Re: Gforth and gcc "progress"
- Next by Date: Re: Build your own Forth for microchip PIC (Episode 839)
- Previous by thread: Re: Build your own Forth for Microchip PIC (Episode 837)
- Next by thread: Re: Build your own Forth for Microchip PIC (Episode 837)
- Index(es):
Relevant Pages
|