How I developed an Am29000 C compiler and web browser
-->
Main page
Intel 8080 emulator
Chess programs
Contests
Store
Retrogaming
FAQ
Links
About me
Ver en español
How I developed an Am29000 C compiler and web browser
by Oscar Toledo G. Aug/16/2026
If you have read my previous article, you’ll know that I developed a windowed operating system in 32-bit machine code for a homebrew computer based on the Am29000 processor. In this article, I’ll talk about the development of my C compiler for these processors, and a web browser.
We are talking about Christmas 1998 and up to my birthday in 1999. I was age 20, Internet was spreading like fire in Mexico, Bruce Willis just saved the Earth from a giant asteroid, new careers emerged for the nascent Internet (it was a gold year for graphic designers), people was scared that the year 2000 bug would trigger a digital armageddon (even the Simpsons ran an episode where Homer forgets updating the computers), and Arnold Schwarzenegger was killing demons with bullets in End of Days.
Find me a C compiler
Along 1997, I developed some utilities, printer drivers (I had an HP DeskJet 500, and managed to print in color in the Epson Stylus 600), and even managed to send and receive fax using the modem card. It was a time when everyone asked if you had a fax machine to send you advertisements, or to get information. We even bought a fax machine, and the next year, no one asked again for a fax. Welcome to the e-mail!
Anyways, working in machine code was hard, and it was like doing a deep dive in muddy water. Unless you get a dive mask to see under (the notes about addresses and some documentation), you’ll get more and more lost.
Even with all my teen energy, I started to get tired, because I couldn’t code new functions without devising a careful memory planning, how to move the code to make space, or worst, relocate several jumps and introducing unexpected bugs because I missed one change. At some point, I just thought “this could grow” and inside the code you can find sequences of 5 to 10 NOP instructions for further expansion. Another thing you can find is routines out of place, because these didn't fit the original place.
As I was already a regular visitor to an Internet café (or more known in Mexico as cybercafé). One of the first Internet café was located just crossing the street from the now defunct Bazar Pericoapa, and it also served coffee. We browsed the Internet at the rhythm of "Ciega, sordomuda", "Amor de papel", “Laura no esta” and “Barbie girl”. Of course, they soon recognized their mistake when cappuccinos and expressos were spilled into keyboards, and coffee was never served again.
I was searching anything about the Am29000 processor, and I found about the High-C 29k compiler, and GNU C compiler v2.8.1 with support for Am29000. I had no way of buying the High-C 29k compiler, so I could download only the GCC sources, and I found it required at least 2 mb. of RAM in the computer (and probably more if we think in the virtual memory), when my computer only had 512 kb of RAM. Worst, it required two more programs: Flex and Bison.
Also it required a lot of support from the underlining operating system, that I barely had (plus an assembler and a linker). I needed to bootstrap the compiler somehow, but I was completely unwilling to port two big programs for a single use. So, I resorted to a closer galaxy: my C compiler for the transputer.
My main problem is the completely different architecture of the Am29000 processor with many registers. I couldn’t figure how to assign the registers in my single pass compiler. It was pretty important that normal variables could be kept in local registers, but if a single indirection appeared (for example, &a) then that variable should be kept in memory.
My first try was a port of the Small-C compiler to Am29000, I know I did it because I made a note in my daily log in December 1997. Probably it was an utter failure and lacking usefulness, because there’s no further mention of it.
Again in February 2, 1998 I mention i needed urgently a C compiler, and I installed DJGPP (a GCC compiler ported to MS-DOS) on a 80486 PC to help with development. I couldn’t use the transputer as it only had 128 KB of onboard RAM.
DJGPP is the abbreviation of DJ G++, I cannot say how so much DJ Delorie helped to developers all around the world when the compilers were still sold for big prices, and this guy created a version of the GNU C++ compiler for DOS that worked right away.
Growing a compiler in the tree
It was until May 6, 1998 when I took the source code of my C compiler for transputer, and managed to compile it with DJGPP as a test. This means I had to replace my non-standard input/output functions with standard C library functions.
My daily log didn’t include any further information, but while searching for more information, I found I preserved all the steps of the Am29000 C compiler creation in a floppy disk. Here is a...