Changes

Jump to: navigation, search

Small C

1,831 bytes added, 12:44, 23 November 2019
/* Specific */
= General In general =
''"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.''
''As of 2007<sup style="display: none" class="plainlinks noprint asof-tag update">[http://en.wikipedia.org/w/index.php?title=Small-C&action=edit <font size="2">[update</font>]]</sup>, 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."''
''(From Wikipedia, the free encyclopedia/ Link: <u><font color="#810081">[http://en.wikipedia.org/wiki/Small-C http://en.wikipedia.org/wiki/Small-C]</font></u>)<!-- /tagline --><!-- subtitle -->''
= CPC specific =''Small C implements int and char, no float, no double, no structure (handled as arrays of contiguous objects instead), no union, no long, no short, no unsigned (int's & char's are signed per K&R), no auto (as keyword; autos are implemented as stack objects), no external (as keyword; provisionally asm globals), no register, no typedef, no static (as keyword; static's are data grouped at the end of code), no goto, return yes, no sizeof, break yes, continue yes, if yes, else yes, no for(;;), no do, while yes, no switch (substituted as list of 'if's'), no case, no default, no entry, .. #include yes, #define yes, #asm..#endasm yes (a near imperative extention). No prototypes, not ansi-c syntaxed, K&R syntax yes.''
''main (argc, argv)&nbsp;; This syntax is accepted by small-c but its implementation is so system dependant that Cain wisely chose to ask the operator for parameter inputs thru 'console input' rather than command line parameters to sidestep this implementation detail until a later time.''
= Cross(From "The -Compiler fbin Project / Small-C / Link: <u><font color="#810081">[http://www.project-fbin.hostoi.com/Proj_SmC/CainC/AboutSmC.txt.html http://www.project-fbin.hostoi.com/Proj_SmC/CainC/AboutSmC.txt.html]</font></u>)
[http://www.cpcwiki.eu/index.php/Z88DK Z88DK]= Specific =
[httpCompiler&nbsp;versions or interpreter&nbsp;for 8080/Z80 in general (look at)://www.cpcwiki.eu/index.php/SDCC SDCC]
&nbsp;* <u><font color="#810081">[http://www.cpm.z80.de/small_c.html http://www.cpm.z80.de/small_c.html]</font></u> * <u><font color="#810081"><font color="#810081">[http://www.z80.eu/c-compiler.html http://www.z80.eu/c-compiler.html]</font></font></u> * <u><font color="#810081"><font color="#810081">[http://www.genesis8bit.com/frontend/programm/cpciolib.zip IO Library for Small-C to produce AMSDOS programs by Juergen Weber]</font></font></u> * [http://futureos.cpc-live.com/files/FIO.zip FutureOS library FIOLIB] = Cross-Compiler = [http://www.cpcwiki.eu/index.php/Z88DK Z88DK]
= Links =
[http[Category://www.cpm.z80.de/small_c.html httpC]] [[Category:CP//www.cpm.z80.de/small_c.htmlM]]
2,002
edits