Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Small-C
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Language subset == {{Over-quotation|section|date=June 2021}} "In May of 1980 Dr. Dobb's Journal ran an article entitled "A Small C Compiler for the 8080s" in which Ron Cain presented a small compiler for a subset of the C language. The most interesting feature of the compiler besides its small size was the language in which it was written—the one it compiled. It was a self-compiler! (Although this is commonplace today, it was a fairly novel idea at the time.) With a simple, one-pass algorithm, his compiler generated assembly language for the 8080 processor. Being small, however, it had its limitations. It recognized only characters, integers, and single dimension arrays of either type. The only loop controlling device was the while statement. There were no Boolean operators, so the bitwise logical operators & (AND) and | (OR) were used instead. But even with these limitations, it was a very capable language and a delight to use, especially compared to assembly language. "Recognizing the need for improvements, Ron encouraged me to produce a second version, and in December 1982 it also appeared in Dr. Dobb's Journal. The new compiler augmented Small C with (1) code optimizing, (2) data initializing, (3) conditional compiling, (4) the extern storage class, (5) the for, do/while, switch, and goto statements, (6) combination assignment operators, (7) Boolean operators, (8) the [[ones' complement]] operator, (9) block local variables, and (10) various other features. Then in 1984 Ernest Payne and I developed and published a CP/M compatible run-time library for the compiler. It consisted of over 80 functions and included most of those in the UNIX C Standard I/O Library—the ones that pertained to the CP/M environment. This became version 2.1 and the subject of The Small C Handbook."<ref>{{cite book |title= A Small-C Compiler: Language, Usage, Theory, and Design|url=https://www.drdobbs.com/developer-network-small-c-compiler-book/184415519?queryText=%2522small%2Bc%2522 |publisher= M & T Books 1988 / Dr. Dobb's Journal Developer Network 2005|chapter=Introduction|author=James E. Hendix}}</ref> Rick Grehan ported Small-C to MS-DOS and [[Macintosh]] in 1988 for a new version of the ''[[BYTE]]'' [[benchmark (computing)|benchmark]]s.<ref name="grehan198807">{{Cite magazine |last=Grehan |first=Rick |date=July 1988 |title=The Pitfalls of Porting |url=https://archive.org/details/byte-1988-07_202104/page/217/mode/1up?view=theater |access-date=2025-04-12 |magazine=[[Byte (magazine)|Byte]] |pages=217-222}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)