Free Pascal for 68K
Carl-Eric Codere, Free Pascal Compiler Architect

Free Pascal Compiler for 68k

by Carl-Eric Codere

Updated: 9/29/98

What is Free Pascal for 68k?

Free Pascal is a freeware compiler, written in Pascal. Its aim is to deliver a Turbo Pascal compatible compiler which comes under a slightly modified version of the GNU Public License (to allow the linking of static libraries) across several platforms, including 68k architectures.

Current Status of 68k Development

Mac 68k Development Hurdles

All the people I have asked to help me have declined the offer, either because they wanted to change the code generator to support the old Mac Classic (which is a no-no; the cg works, therefore it will stay as it is), or they said it was too difficult.

With regards to the code generator, other parts of the compiler might be accommodated for MacOS specific features. I am ready to create a MPW assembler writer (I have the docs), but there is no way I can test anything, as I don't have a Mac (well I have a very old Mac classic, but that's another story). I've been reading the Inside Macintosh series, and it does not seem that complicated to create a standard system unit; however, I need a shell program. If there is anyone who can help me obtain or create a shell program, please contact me at

All versions of Free Pascal produce console mode applications (i.e., no GUI support), and that is where I would like to start. For that you need a shell, just like the MPW Shell. The GUI support would be added after, but that means that at program startup we would have to create a fake console, similar to UNIX.

I will try to support the Classic m68k architecture first of all, and if everything works okay, I don't think it would be very difficult adding CFM-m68k architecture support, since library importing is already supported by Free Pascal.

In terms of help, to just port the m68k code requires just the runtime library implementation (and testing, of course). To add GUI support for Free Pascal applications would take a bit more time.

The compiler is entirely written in Pascal! Very little processor specific stuff at all. It is not ANSI nor Mac Pascal; it is Turbo Pascal, so bootstrapping onto another processor is required (this is how the Amiga binary is being produced).

Mac PPC Development Possibility

PowerPC is another story entirely. I wanted to create a new code generator which would be easy porting to other processors, but I'm not willing to commit 4 months almost full time to that, so unless someone is ready and willing to do the brunt of the work, there will never be any PowerPC version. If you are seriously interested in working on this, please contact me at I will be able to help a lot, myself with the cg (code-generator), so it would take two months each to complete. I have nearly all the CPU instruction sets at home, including the PPC instructions. Apart from creating a virtual stack by ourselves, this would not be that difficult to port.

m68k Participation

Those interested should subscribe to the FPC and FPC-DEVEL mailing lists. You can get directly in touch with the person responsible for the m68k port by e-mailing Carl-Eric Codere at If you want to start the PowerPC port of the code generator, you're welcome to do so. Carl-Eric wants to do it, but if he has to do it alone, he will probably not be able to start it until mid-1999.

Copyright ©1998 Carl-Eric Codere

Web page created and edited by Bill Catambay