TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PETER PERCIVAL
from: MARTIN GREGORIE
date: 2018-06-28 00:22:00
subject: Re: Forth

On Wed, 27 Jun 2018 21:00:08 +0100, Peter Percival wrote:

> Gareth's Downstairs Computer wrote:
>> On 27/06/2018 20:23, Peter Percival wrote:
>>> There seem to be a number of Forths that run on Raspberry Pi.  Is it
>>> possible to say which one of them is best?
>>
>> The one that you write for yourself?
>>
>>
> Would that I could!

Without knowing what you know, its hard to know what to suggest, but here
goes....

I last played with Forth in the early/mid '80s, running it under FLEX09
on a 6809-based system. On mosing round that, I discovered that Forth is
very easy to port because there's almost no machine-specific code in it.
In this case, the loaded file's entry point pointed to a single JMP
instruction that that started the first Forth word running. The first
10-20 words contained assembler - probably no more than 100 instructions
in total. These were enough to start its builtin Forth compiler which
compiled the rest of the runtime words (all written in Forth) and ran
them, initialising the system and ended up by outputting a greeting line
and a command prompt. So, if you know ARM assembler, porting it yourself
should be quite easy.

That said, I think you could do worse that trying pForth -
http://www.softsynth.com/pforth/

This claims to be fully portable because its low-level words and startup
code are written in C. It has a number of precompiled downloads,
including one for the RPi. It looks as though you're supposed to pull the
source from Git and compile it on your RPi.

Try some of the links here if you don't like the sound of pForth:
https://raspberrypi.stackexchange.com/questions/15095/baremetal-forth-for-
raspberry-pi

Baremetal implementations may not be what you want, since they should be
exactly that: no OS, no filing system - just an SD card that boots
directly into Forth and (if its a really traditional Forth
implementation), treats the part of the SD card that is not occupied by
the Forth boot image as an array of 1KB pages. These pages are numbered
and are used by Forth as its filing system. A page may contain  (part of)
a Forth program or data to be read or written by a Forth program and all
are addressed by page number.

Have fun!


--
Martin    | martin at
Gregorie  | gregorie dot org

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.