!{APM C Compiler -- Version 2/Frank Cringle} APM C Compiler (Version 2) Frank Cringle The Bell Labs portable C compiler, with M68000 code generator added at MIT, is available on the APM. This compiler conforms to "The C Programming Language" by Kernighan & Ritchie, with the addition of structure assignment, the enumerated type and in-line assembly. A large proportion of the UNIX(tm) run-time library exists, and porting of programs from UNIX to the APM and vice versa is possible for programs which do not rely on multiple processes. ! ! file open file as stdout >> file open file as stdout in append mode Any of the above may be preceded by a digit (0-9), in which case the file descriptor corresponding to the digit is used instead of 0 (stdin) or 1 (stdout) - e.g. 2> errors redirects the error stream stderr to file errors. !> ! ! ! ! !> ! ! ! ! ! will be encountered on loading. Common references result from external declarations of the form int a; /* better to declare static or initialise */ or struct { ... complicated ... } array[9999]; /* leave as is and clink */ These values may be declared and initialised in another module, in which case the reference is resolved in the normal way, either by clink or dynamically on loading if clink is not used. But if there is no initialising declaration, the reference must be resolved statically using clink. The code required to access the variable is more efficient if it is declared with storage class static or, if it is really referenced in other modules, given an initial value. However, this means the value is allocated space in the initialised data image, so large structures or arrays are best left to be allocated by clink. !> ! !> ! !> !> ! ! ! ! ! !> ! !>