I'm writing a C compiler for the fictional DCPU-16 CPU (which will be used in the 0x10C game). In this game world any original software written for the system has been developed before (or during) 1988: so I'm trying to write my compiler like it was coded between 1985-1988. I've got a copy of the C89 standard, but would like to know how common compilers preceding this differed from the standard and the common coding styles of the period.
So far this is what I'm assuming:
- I need to use preprocessor support to define both old and new style function definitions/prototypes.
- Coding style generally uses "something_with_an_underscore" for types, functions and variables (is this true? how prevelant was Hungarian notation during the period? what about camel case?)
Other things I would like to know:
- How did common c compilers/stdlibs differ from the later C89 standard?
- What common code patterns were in vogue?
- How were common variables named at the time (i, n, foo, bar?)
- Do you have any example code from the time?
- Etc...