Introduction to the small c Compiler

manual version 3.3 - by Jeremy Dewey

Why a compiler for a calculator?

Well, there are several reasons that I undertook this project. Mainly, I wanted to be able to quickly write software for my calculator with a level of functionality not easily availible in assembly. I first looked at the currently available tools, and was quite dissapointed at how limited they were. I then ran across the zcc096 package, and liked it. Unfortunately, it does not support the memory conventions used by ZShell. So I took the compiler, and rewrote the backend, and parts of the front end.

Why small c?

Well, I wanted to be able to do the conversion in one night. Primarily, though, small c provides a nice compromise between fuctionality and size.

Where is the optimizer?

Umm... I haven't written one yet. Feel free to do so yourself, or take a look at the other utilities in the zcc096 package. They may be useful.

What is required?

The compiler requires TASM, available at ticalc.org. It is also very useful (almost required) to have an understanding of assembly and c. The distributed version of zcc.exe is compiled as a Win32 Console app, so Windows 95/NT is required. However, recompiling the source for DOS is very trivial. If you need to do this, go for it.

What else?

Since small c is compiled to an assembly file:

For more information, see here

Only available between September and early May.