- Small-C
In
computing , Small-C is both a subset of the C programming language, suitable for resource-limitedmicrocomputer s andembedded system s, and an implementation of that subset. Originally valuable as an earlycompiler 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 byRon Cain , appeared in the May1980 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 theSRI International PDP 11/45Unix 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 fortiny computer s 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 tomachine 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 forVMS 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 toAmiga computers;
# smallc V04 for theRT-11 by John Wilson, August 1984;
# smallc22.zip;
# smallmac.zip, themacro assembler written in Small-c for the PC;
# 8xccb.zip, 8xccb5.zip;
# zinc8-30.zip;
# v072.zip;
# smallc.zip for swtp computer;
# [http://mdfs.net/System/C/BBC/ 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 isGameBoy , 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 theTI-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 forFlex OS on 6809 processors;
# sccavr.zip, v2.4.7 for theAtmel AVR processors, by Ron Kreymborg, ca. 1984;
# smallc-1.2 DOScross-compiler forCP/M by Bob Keys; (includes an editor, loader, cp/m emulator, and z80 assembler)
# smallc v1.1 forCP/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 theIntel 8080 processor;
#Z88DK Small-Ccross compiler is capable of generating code for manyZilog Z80 –based computers
# [http://www.geocities.com/SiliconValley/Way/4588/scc6502.html scc6502] Small-C cross compiler by I. A Curtis, July 1997. Hosted on Unix/Linux to generate executables forLUnix (operating system for the C-64)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-5External links
* [http://www.cpm.z80.de/small_c.html Several implementations of Small-C]
* [http://www.bebits.com/app/2678 A Small-C compiler for Game Boy]
Wikimedia Foundation. 2010.