I am writing a C compiler for a fictional DCPU-16 processor (which will be used in a 0x10C game). In this game world, some original software was written that was written for the system before (or during) 1988: so I try to write my compiler as if it were encoded between 1985-1988. I have a copy of the C89 standard, but I would like to know how common compilers precede this, differ from the standard and general coding styles of this period.
So far this is what I am assuming:
- I need to use preprocessor support to define definitions / prototypes of old and new style functions.
- The coding style usually uses "something_with_an_underscore" for types, functions, and variables (is that true? How was prevelant a Hungarian designation for a period?) What about the camel case?)
Other things I would like to know:
- How do generic c / stdlibs compilers differ from the later C89 standard?
- What common code templates were in fashion?
- What were the common variables called at that time (i, n, foo, bar?)
- Do you have an example code from the point in time?
- Etc ...
source
share