Jenny,
Jenny Brien wrote:
> On Apr 25, 3:18 pm, s...@[EMAIL PROTECTED]
wrote:
>
>> turns up numerous atmega capable forth systems. I have no experience
with
>> any of them, but it seems like a fun learning experience, for the cost
of
>> an Arduino + programmer ... 8-).
>>
> Apparently AVR, (like most standalone Forths?) would overwrite the
> Arduino bootloader. :(
For amforth the situation is as follows: The dictionary is in the flash.
For that, you need a way to write to the flash to work with the
dictionary. That is a design decision: where to store the dictionary.
The atmegas have a rather complex method to perform the flash
write, that requires a lot of work. This work is done in every
bootloader, but only one (for an USB Atmega) provides an API to
use the routines in normal applications. All other bootloaders
(Arduino, AVR Butterfly etc) can only do the special operation
"read/write (many) blocks from/to serial interface and get/put them
into flash". They simply do not offer the internal routines to
applications running on the controller.
For technical reason the code doing the flash write operation has to
be in the booloader flash section. So, what can you do: The relevant
code needs to be in a special address range. That area is rather small
and there is already code from an unknown source and you do not know
where free space is left. My decision is to ignore all bootloaders
and use the bootloader area as much as possible (there are other side-
effects).
If you design a forth that stores the dictionary (or the extensible part
of it) on different storage areas (RAM or serial EEPROM etc) the
situation is easier, but you create dependencies on the hardware and
you cannot use the assembler (executable code is only allowed in flash).
For the arduino the situation could be changed if they would adapt their
bootloader a little, amforth uses a single cell write operation, btw...
Looking at the schematics of the arduino's, I'd say that amforth runs
without problems on most of them.
Bye
Matthias
(author of amforth)


|