Small-C
From Wikipedia, the free encyclopedia
In computing, Small-C is both a subset of the C programming language, suitable for resource-limited microcomputers and embedded systems, and an implementation of that subset. Originally valuable as an early compiler for microcomputer systems available during the late 1970s and early 1980s, the implementation has also been useful as an example simple enough for teaching purposes.
The original compiler, written in Small-C for the Intel 8080 by Ron Cain, appeared in the May 1980 issue of Dr. Dobb's Journal. James E. Hendrix improved and extended the original compiler, and wrote The Small-C Handbook. Ron bootstrapped Small-C on the SRI International PDP 11/45 Unix system with an account provided by John Bass for Small C development (with management permission, provided the compiler sources were released as public domain). Small-C was important for tiny computers in a manner somewhat analogous to the importance of GCC for larger computers. Just like its Unix counterparts, the compiler generates assembler code, which then must be translated to machine code by an available assembler.
Porting Small-C requires only that the back-end code generator be rewritten for the target processor.
As of 2007, Small-C — now almost twenty-five years old — is still being used, ported, hacked and studied by people who want to learn how a compiler is written.
- cpcn.zip by CAPROCK SYSTEMS, version N, 1982;
- cc02.zip;
- smallc-1.1 c80 for VMS 1982 by Jeff Lomicka (also c80rtl for library);
- sm88-1.0.zip, smc88dos, labelled by Byte Magazine by Rick Grehan, ca. 1988 and 1992;
- SmallC.lha by Willi Kusche, 1988 to Amiga computers;
- smallc V04 for the RT-11 by John Wilson, August 1984;
- smallc22.zip;
- smallmac.zip, the macro assembler written in Small-c for the PC;
- 8xccb.zip, 8xccb5.zip;
- zinc8-30.zip;
- v072.zip;
- smallc.zip for swtp computer;
- Small-C by A. J. Travis for the BBC computer, 1989;
- sm88-1.0.zip, smc88dos, labelled by Byte Magazine by Rick Grehan, ca. 1988 and 1992;
- small_c.zip for the ZSHELL by Jeremy Dewey;
- smallc v4.1 for the Usgard calculator? by Jeremy Dewey,
- ccGB.zip or cc-b2.zip, version b2, by Alan Baldwin, 1990. (GB is GameBoy, with a Z80 processor);
- csc.zip, ver. 1.0, March 30, 1996, originally detailed in DDJ by Andy Yuen;
- c80dos.zip;
- accash.zip, v4.0 by lord_nexus@usa.net, for the TI-85 calculator, 1984;
- small-c-linux.tar.gz, v3.0R1 by Chris Lewis, includes several back-ends, 1984;
- smallc-mot.arc v2.1;
- zcc-096, zcc_16;
- smcnt30, smcnt31: ported to Windows, based on 2.2 rev 117, by Hans Walheim June 1998;
- smallc11.zip by John Dumas, 68HC11 processor, February 1987;
- cug163.zip;
- cug309.zip;
- cug211_01.zip for Flex OS on 6809 processors;
- sccavr.zip, v2.4.7 for the Atmel AVR processors, by Ron Kreymborg, ca. 1984;
- smallc-1.2 DOS cross-compiler for CP/M by Bob Keys; (includes an editor, loader, cp/m emulator, and z80 assembler)
- smallc v1.1 for CP/M-86 by Bob M. White, 1982;
- smallcp.zip v1.0, Small-C/Plus, from SIG/M vol. 224 with Z80 floating point by R M Yorston, 1990;
- the original version written for the Intel 8080 processor;
- Z88DK Small-C cross compiler is capable of generating code for many Zilog Z80–based computers
- scc6502 Small-C cross compiler by I. A Curtis, July 1997. Hosted on Unix/Linux to generate executables for LUnix (operating system for the C-64)
[edit] References
- Ron Cain, "A Small C Compiler for the 8080's", Dr. Dobb's Journal, April-May 1980, pp. 5-19
- James E. Hendrix, The Small-C Handbook, Reston 1984, ISBN 0-8359-7012-4
- James E. Hendrix, A Small C Compiler: Language, Usage, Theory, and Design, M & T Books 1988, ISBN 0-934375-88-7
- James E. Hendrix, Small C Compiler, M & T Books 1990, ISBN 1-55851-124-5