Product Code Database
Example Keywords: undershirt -suit $8-183
barcode-scavenger
   » » Wiki: Small-c
Tag Wiki 'Small-c'.
Tag

Small-C is both a subset of the C programming language, suitable for resource-limited and , and an implementation of that subset. Originally valuable as an early 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 system with an account provided by John Bass for Small C development. The provided was released with management permission into the . Small-C was important for tiny computers in a manner somewhat analogous to the importance of GCC for larger computers. Just like its counterparts, the compiler generates assembler code, which then must be translated to by an available assembler.

Small-C is a retargetable compiler. Porting Small-C requires only that the back-end code generator and the library to operating system interface calls be rewritten for the target processor.


Language subset
The original Small-C compiler excluded many features from standard C for minimalism. Types are limited to char and int, while Arrays of these types are restricted to one dimensional arrays only. The only loop statement that is available is the . Boolean operators were not included, meaning that logical statements had to be done with the equivalent bitwise operators, of which only and were given. Compilation was done in one pass with no optimization, although one could provide the compiler with an optimizer to use.

A second version, now called Version 2.1, of the Small-C compiler was later developed by James E. Hendix, extending Small-C with many features commonly used in C. The new compiler optimized code by default and allowed preprocessor directives for conditional compilation. Added features include boolean operators, , Do while loops, , and . This allowed programming much closer to standard C.

Rick Grehan ported Small-C to MS-DOS and in 1988 for a new version of the benchmarks.


See also
  • (1979) – C compiler for Z80 and 8080 systems
  • MISOSYS C (1985) - C compiler for TRS-80 (Z80 CPU)
  • Tiny C (2002) – C compiler for slow x86 and ARM computers having little disk space


Small-C variants
  • Z88DK – Cross Small-C implementation for Z80 based microcomputers
  • cc65 – Cross Small-C implementation for 6502 computers
  • Deep Blue C – Small-C for the Atari 8-bit computers
  • A.J.Travis – Native Small-C for the
  • Clarkson College of Technology - For on Zenith Z-100


Notes
  • 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,
  • James E. Hendrix, A Small C Compiler: Language, Usage, Theory, and Design, M & T Books 1988,
  • James E. Hendrix, Small C Compiler, M & T Books 1990,


External links

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs