The Search for a C Compiler
Saturday, 4th June 2016
I've spent more time playing with the HP 100LX I bought last September. For a while I've had a CF disk full of strategy games, but more recently I've added to it a disk full of RPG and adventure games, and another one full of platformers and puzzlers. And now I want to have a development disk too.
Back in the day, I started playing with Personal C Compiler and moved on to DJGPP, the DOS port of GCC. I also used a few commercial compilers: Topspeed C, Microsoft QuickC and Borland Turbo C. More recently I've become aware of Watcom C too.
DJGPP is no use to me if I want to target the 100LX. It's limited to 32-bit architectures like the 80386 and later. The 100LX has an 80186 processor, so not only can I not run DJGPP on it, but I can't even develop for the 100LX on a modern PC. I'll have to rule out Topspeed C and QuickC too, as I can no longer get hold of a copy. So my choices are now:
- Watcom C
- Personal C Compiler
- Borland Turbo C
I've been playing with Watcom C under DOSBox. I've written a few programs that play with the CGA Palettes I wrote about previously, loading images and writing them to CGA screen memory. It seems competent, but I'm not sure I'll manage to squeeze it onto the 16MB CF card I have available.
Personal C Compiler is small, and creates small fast executables too: perfect for a small project on the 100LX. The downside is that it's K&R compatible, not ANSI standard, and its own documentation is incomplete. So I'll have to rely quite a bit on those old C books I have on the shelf.
Finally there's Turbo C, which is probably the most promising of the lot. It's been released for free download, had a great deal of popularity back in the day, and will certainly support any of the projects I want to do on the 100LX. It also has modest disk space requirements. My first attempts to use it under DOSBox didn't go well, however.
I think I'll put both Personal C and Turbo C on the CF disk, and see how each one goes.