> I am looking for a tiny implementation of Forth written in ANSI C and
> that can run on a 16-bit microcontroller XC164 (C166/ST10-like).
How about pForth?
<http://www.softsynth.com/pforth/>
On 23 fév, 23:11, Charles Turner <vze26...@optonline.net> wrote:
> PForth looks interesting indeed, but I see that it requires "a few
> hundred k's of RAM". This is too much for my application, where I can
> only allocate say 10 kBytes
I'm guessing the lack of response here means there isn't any Forth
written for that chip. You might want to look at Frank Sargeant's
3-instruction Forth here:
<http://pygmy.utoh.org/forth.html>
or perhaps something like FlashForth for the MicroChip controller could
be a model:
<http://opencircuits.com/Programming_Languages#Forth_for_PICs>
Sounds like you'll be rolling your own.
HTH, Charles
I'm definately for C versions, but why would you want a C version?
Forth's in assembly are mostly Forth, with a small amount of assembly.
I.e., an "assembly" Forth may be easier to port and bootstrap.
http://www.forth.org/compilers.html
If you search for small or tiny Forth's in C, these names come up:
eForth
MinForth
hforth
pforth
kforth
yforth
Rod Pemberton
> I am looking for a tiny implementation of Forth written in ANSI C and
> that can run on a 16-bit microcontroller XC164 (C166/ST10-like).
Would you consider changing processors?
> I need a 16-bit word length, and a basic word set to allow programming
> short sequences (about 1 block long) with minimal memory requirement.
I suppose a 32-bit word (being a super set of a 16-bit word) would also
be ok?
My current Riscy Pygness (Pygmy Forth for the ARM) runs on both the ARM
instruction set and (now) the ARM Cortex-M3 instruction set. It runs on
the LPC2xxx ARM family and on the LPC17xx and STM32 families of ARM
Cortex M3 chips. It should be easy to port to other ARM and Cortex-M3
families.
It needs less than 4 KB of Flash and very little RAM, yet uses a 32-bit
word and addresses the full 4 GB address space. It includes a
multitasker. So, maybe one size could fit all.
;-)
I've never been a fan of the proprietary MCUs because they usually
lock you into a single provider for the tools. Of course not all do
that, the Microchip PICs are supported by many tool vendors, for
example. But the ARM CPU chips are supported by nearly every tool
available and will become the mainstay of the future. The CM3 was
developed specifically with embedding in mind and does a great job.
It receives the lions share of vendors development time and money so
that the competing products will become the "poor stepchild".
The only significant issue with switching between CM3 vendors is the
support of peripherals. Each vendor adds their own designs to the core
CPU. It can be more work porting to all the peripherals than changing
the CPU port! But once that is done, users can very easily re-target
their applications to the various processors from the many, many
vendors. With the ARM this gives you such a huge selection of MCUs to
choose from that you won't miss any of the proprietary MCU families
again.
At least that is how I see it. But it is important to get the support
in place for the various product lines.
I wonder how widely used Forth will be, even if a good open source
tool is available for a wide line of embedded processors. I still
remember mentioning in a vendor workshop that I wanted to program an
ARM in Forth and he laughed calling it that, "old stuff". I think a
lot of people have no interest at all in a Forth tool. Forth alone
puts me in a small enough group that I don't want to work with devices
that limit marketability so that I become completely invisible to
customers.
Rick