Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Forth for 68k

212 views
Skip to first unread message

J.Plewe

unread,
Feb 9, 1995, 10:44:39 AM2/9/95
to

Hello!

Is anybody here interested in Forth programming??

I am able to provide a low-cost (or even no-cost in most cases) Forth
system conforming the new ANSI Forth standard:

F68KANS

The system generates 32bit native code for the 680x0-series. It is
*very* easy to implement on any hardware. No assembly of the system is
necessary. The binary itself is portable.
What you need are two small functions recieving and emitting
characters. With these, F68KANS provides an interactive programming
environment directly running on the hardware. No cross-development!

This may be useful when bringing up a new hardware. Just make it run
the two functions and then bring up the rest interactively.

If you want to go further you can easily do application programming
with F68KANS, too. E.g. it already includes a simple (but fast!)
round-robin multitasker, which is sufficient for a lot of problems.

If you have libraries, F68KANS offers an open and easy-to-use interface.


F68KANS has turned out to be
- fast
- reliable
- easy to use
- inexpensive
- versatile


I'm doing F68KANS as a hobby, so I apologize advertising it here. If
there will be no positive echo, I swear I will never disturb again.

- Joerg Plewe

Prefered E-mail: j...@Forth-ev.de

Ed Gow

unread,
Feb 17, 1995, 1:55:21 PM2/17/95
to
Larry Battraw (cic...@indirect.com) wrote:

: In article <3hdd97$9...@ks.mpi-dortmund.mpg.de> plewe@sk (J.Plewe) writes:
: >Is anybody here interested in Forth programming??


: >I am able to provide a low-cost (or even no-cost in most cases) Forth
: >system conforming the new ANSI Forth standard:
: > F68KANS

: >This may be useful when bringing up a new hardware. Just make it run


: >the two functions and then bring up the rest interactively.

: >If you want to go further you can easily do application programming
: >with F68KANS, too. E.g. it already includes a simple (but fast!)
: >round-robin multitasker, which is sufficient for a lot of problems.

: >If you have libraries, F68KANS offers an open and easy-to-use interface.

: >Prefered E-mail: j...@Forth-ev.de

: I'd like to back Joerg up on this; I've been using F68KANS for some time
: now, and it is a very clean, well structured implementation of FORTH. It was
: the first language I was able to load onto my bare 68020 (homebuilt) board,
: and will probably be the last, as it is so easy to use. Porting was a snap as

... more glowing report deleted

: Larry Battraw
: (cic...@indirect.com)


I have less experience with F68KANS than Larry, but I can attest to
the ease with which it can be ported. I'm planning to use it in a
hobby project to revive an old 68K machine that I have which has no
usable OS.

To get familiar with F68KANS I ported it to a machine
I have that runs OS-9/68000. Even though the F68KANS register usage
conflicts with OS-9's, I found the port to be easy. In the little bit
of use I have given it so far, F68KANS has worked well. Since so
many of the basic FORTH words are written in FORTH, it was easy to
hack DUMP to work with absolute hardware addresses rather than relative
to FORTH data space.

I've cross posted this message to alt.comp.hardware.homebuilt because the
area in which I feel Joerg's F68KANS really shines is in bringing up a
bare piece of new hardware. If you can supply machine code routines to
write a byte and read a byte, then you can make it run. It needs no other
support infrastructure.

I have seen some interest expressed in a.c.h.h in building 68K based
systems. For anyone doing this, I can't recommend F68KANS too highly.
I think there's no better tool for twiddling bits to exercise
hardware.

The only other software that I think could contribute as much to
68K based homebuilt systems would be a port of Andrew Valencia's
VSTA message passing microkernel OS to some 68K processor with an MMU
(683xx, '030, or '040). If I could win the lottery or something so I
wouldn't have to spend so much time at work, I'd do that myself.
But I digress...

The 68K architecture is a good one (as opposed to some others that I
can think of), and F68KANS makes it an attractive target for the
home computer builder. Give it a try.

Ed

Allen C. Pomeroy

unread,
Feb 21, 1995, 8:56:29 AM2/21/95
to
In article <D45r8...@isgtec.com>, g...@isgtec.com (Ed Gow) says:
>
>Larry Battraw (cic...@indirect.com) wrote:
>
>: In article <3hdd97$9...@ks.mpi-dortmund.mpg.de> plewe@sk (J.Plewe) writes:
>: >Is anybody here interested in Forth programming??
>: >I am able to provide a low-cost (or even no-cost in most cases) Forth
>: >system conforming the new ANSI Forth standard:
>: > F68KANS
>
[snip]

Where can I get a copy of this FORTH code? What is the FORTH interp
written in (C)? I have a C compiler for my 68K.

>: >If you have libraries, F68KANS offers an open and easy-to-use interface.
>

What call prototype does F68KANS require? Can I use my C libs?

[snip]


>I have less experience with F68KANS than Larry, but I can attest to
>the ease with which it can be ported. I'm planning to use it in a
>hobby project to revive an old 68K machine that I have which has no
>usable OS.

Me too. I have a 68000 based development system I bought many moons
ago, I have ripped out the crappy (hand assembled) EPROM monitor
that came with the system, and have implemented a C based monitor
(complete with interrupt handling done in C source).

[snip]


>I have seen some interest expressed in a.c.h.h in building 68K based
>systems. For anyone doing this, I can't recommend F68KANS too highly.
>I think there's no better tool for twiddling bits to exercise
>hardware.

Thanks for pointing out this group. I will start lurking there until
I can free up enough time to resume my current 68K project: a
microcontroller module (with 60pin interconnect for "application"
add on PCBs). The FORTH mentioned here would fit well.

[snip]
>
> Ed

Please follow up post here, as my e-mail is spotty at best right now.
...Al

Jarek Lis

unread,
Feb 22, 1995, 4:11:47 AM2/22/95
to
Allen C. Pomeroy (pome...@cuug.ab.ca) wrote:
: >: In article <3hdd97$9...@ks.mpi-dortmund.mpg.de> plewe@sk (J.Plewe) writes:
: >: >Is anybody here interested in Forth programming??
: >: >I am able to provide a low-cost (or even no-cost in most cases) Forth
: >: >system conforming the new ANSI Forth standard:
: >: > F68KANS
: >

: Where can I get a copy of this FORTH code? What is the FORTH interp

: written in (C)? I have a C compiler for my 68K.

Well, lon time ago, when I played with F., most of FORTH interpeter was
written in ... FORTH. No kidding.
For the small amount of most basic procedures, assembly is probably
the best choice.
To say the true, my own implementation of Forth (No ask, please, I forgot
on which diskette it resides), most was written in 'assembly' language,
but it was not really assembler, but rather macros which created forth
structures.

Jaroslaw Lis

+------------------------------------------------------------------------+
| E-mail (Internet): | Institute of Engineering Cybernetics |
| jj...@ict.pwr.wroc.pl | Technical University of Wroclaw, Poland |
+------------------------------------------------------------------------+

Joerg Plewe

unread,
Feb 24, 1995, 3:22:31 AM2/24/95
to
pome...@cuug.ab.ca (Allen C. Pomeroy) wrote:
>
> >: >I am able to provide a low-cost (or even no-cost in most cases) Forth
> >: >system conforming the new ANSI Forth standard:
> >: > F68KANS

> Where can I get a copy of this FORTH code? What is the FORTH interp

> written in (C)? I have a C compiler for my 68K.

I've got a couple of responses so I dare to post the answer here.

The latest release of F68KANS (oct94) can be found on

ftp://taygeta.oc.nps.navy.mil/pub/Forth/ANS/f68kans.zip

I'm on the turn to distribute the next release, but don't hold your breath.

F68KANS is free for private use. For commercial exploit, a license agreement
has to be taken with me.

The interpreter is written in assembler and Forth, of course. But you will
not have to recompile the interpreter, because you can use my binary image.
You may use your C-compiler to write a little loader program which has to
start F68KANS. You will find details how to do this in the doc or you can
ask me at any time.


> >: >If you have libraries, F68KANS offers an open and easy-to-use interface.
> >
>
> What call prototype does F68KANS require? Can I use my C libs?

Yes, you can. You bind them to the loader program together with some data
structure containing pointers to your lib-functions. In Forth, you create
a similar structure then using your functions. Here are some lines of my
CLIB-binding on the Forth-side:

systeminterface initCLIB CLIB CONSTANT CLIBBASE

CLIBBASE 0

[snip]

( memory )
( when returning pointer, the memory words return it as an absolute )
( address, because they will have to be checked against NULL in a )
( high-level call )
_n _n SI: _calloc outint ( n size -- aaddr )
_a SI: _free nothing ( block -- )
_n SI: _malloc outint ( size -- aaddr )
_a _n SI: _realloc outint ( block news -- aaddr )

[snip]


> Me too. I have a 68000 based development system I bought many moons
> ago, I have ripped out the crappy (hand assembled) EPROM monitor
> that came with the system, and have implemented a C based monitor
> (complete with interrupt handling done in C source).

Good! You can use this work as a basis for F68KANS.


I am strongly interested to hear about anybodies success with F68KANS.
Hope I could help,

- Joerg


Larry Battraw

unread,
Feb 24, 1995, 8:46:29 AM2/24/95
to
In article <D4Cs5...@cuug.ab.ca> pome...@cuug.ab.ca (Allen C. Pomeroy) writes:
>From: pome...@cuug.ab.ca (Allen C. Pomeroy)
>Subject: Re: Forth for 68k
>Date: Tue, 21 Feb 1995 13:56:29 GMT

>In article <D45r8...@isgtec.com>, g...@isgtec.com (Ed Gow) says:
>>
>>Larry Battraw (cic...@indirect.com) wrote:
>>
>>: In article <3hdd97$9...@ks.mpi-dortmund.mpg.de> plewe@sk (J.Plewe) writes:
>>: >Is anybody here interested in Forth programming??
>>: >I am able to provide a low-cost (or even no-cost in most cases) Forth
>>: >system conforming the new ANSI Forth standard:
>>: > F68KANS
>>
>[snip]

>Where can I get a copy of this FORTH code? What is the FORTH interp
>written in (C)? I have a C compiler for my 68K.

F68KANS can be found on ftp.asterix.inescn.pt, ftp.taygeta.oc.nps.navy.mil,
and a couple other places. The FORTH interpreter kernel is written in
assembly (source is included), but since there is a compiled binary image
file, it's not necessary (or easy) to re-compile. You load the image file at
run-time, along with a stack frame pointing to necessary functions. The
loader program is in charge of determing where to stick the code, and
allocating enough memory for it. On systems like yours, you can write it in
C, although I use a small assembly program on mine.

>>: >If you have libraries, F68KANS offers an open and easy-to-use interface.
>>

>What call prototype does F68KANS require? Can I use my C libs?

F68KANS does a jsr to functions specified, placing parameters on the stack,
and getting a return parameter in D0. Joerg Plewe (author of F68KANS) uses C
functions extensively to extend F68KANS, taking advantage of the environment
it runs in (an Atari, I believe). To add a C function/ASM function, you need
to build extend the basic stack frame passed to F68KANS when you load it.
Within the stack passed, there are pointers to the basic functions of
character I/O. By tacking on additional pointers to functions you want, you
can call them using FORTH. This is a really incomplete and possibly confusing
description of how F68KANS uses external functions, but I advise actually
getting a copy and reading the documentation, which explains it a little
better.

Philip Veilleux

unread,
Feb 27, 1995, 9:39:30 AM2/27/95
to
Hi, I need to produce 68332 (much like 68020-68010) assembly code from
C code via a PC. For the moment, I use gcc-2.6.3 cross-compiled for a
dpx2 target on a risc6000-aix host.

The assembly generated is not 100% compatible but I can retouch it with
sed... The biggest problem is that this 68332 is the central part of
the lower-brain of a mobile robot and is interfaced with a PC's data
bus and I want to program it in-situ. So it will have to be *Unplugged*
from the net and from it's "telnet/ftp/risc/C compiler" !

I tried with cc68k but I found it a bit tricky to use ( don't have
the _C_SWITCH function, and many other things...). I also tried to
cross-compile the DJGPP port to a dpx2 host without succes.

There *must* be a m68k C compiler for the PC somewhere in the world !

Any help appreciated ! Thanx in advance !

Francois Perron 484-7735
fpe...@info.polymtl.ca
directeur technique,
SAE Robotique
Ecole Polytechnique de Montreal 340-3998


Juergen Suessmaier

unread,
Feb 28, 1995, 4:13:55 AM2/28/95
to
Philip Veilleux (fpe...@info.polymtl.ca) wrote:
: Hi, I need to produce 68332 (much like 68020-68010) assembly code from

: C code via a PC. For the moment, I use gcc-2.6.3 cross-compiled for a

Try the Hi-Tech C Compiler. It generates extremely efficient code
(args passed in registers, no seperate stack frame) and is sold
at an affordable price. It doesn't have too mant fancy tools, but
the compiler is - in my opinion - excellent. I'm using this compiler
now for about 2 years, and I'm extremely happy with it. If you need
info, mail to hit...@hitech.com.au. to obtain a distributor list
(I don't know if you can buy the development package directly from
Hi-Tech). Demo versions of several compilers are also available.

Good luck,
Juergen

Brett Baumberger

unread,
Feb 28, 1995, 10:13:33 AM2/28/95
to
Philip Veilleux (fpe...@info.polymtl.ca) wrote:
: Hi, I need to produce 68332 (much like 68020-68010) assembly code from

: C code via a PC.

HP makes one.

Brett

Concord Academy

unread,
Mar 1, 1995, 12:08:37 PM3/1/95
to
In article <3iso72$i...@charles.cdec.polymtl.ca>, fpe...@info.polymtl.ca
(Philip Veilleux) wrote:
*snip*

>
> There *must* be a m68k C compiler for the PC somewhere in the world !
>
*snip*

Try Aztec C its kind of nifty. I have used it for embedded development
with a 68332. Its pretty good.

Good luck.
i...@world.std.com

(plenty of 68K compiolers for Macintosh, but... )

chrisp

unread,
Mar 2, 1995, 10:10:41 AM3/2/95
to
fpe...@info.polymtl.ca (Philip Veilleux) wrote:
>
> There *must* be a m68k C compiler for the PC somewhere in the world !
>

I'm using the gnu tools on a pc to generate 68332 code and can
generate assembler code from gcc quite handily. If you don't mind
struggling with command-line switches I've used it to generate
assembler prototype code for interrupts and only had to clean it up
a little. Having access to a PC-based Background Mode Debugger such
as the one produced by Nohau will make your life alot easier. You
have to generate some test code to figure out the C calling conventions
if you want to make the assembler routines C-callable.

chr...@sentex.net (Chris Pella)
Guelph, Ont.

0 new messages