mirror of
https://github.com/PDP-10/its.git
synced 2026-01-25 19:56:53 +00:00
C compiler files from SAIL [C,SYS].
This commit is contained in:
BIN
doc/c/amops.txt
Normal file
BIN
doc/c/amops.txt
Normal file
Binary file not shown.
27
doc/c/cc.pat
Normal file
27
doc/c/cc.pat
Normal file
@@ -0,0 +1,27 @@
|
||||
CC patches to be made to export version:
|
||||
|
||||
c22.c: add an external decl of "int *top()"
|
||||
|
||||
c31.c: in main, change the argument to atoi from argv[8] to argv[7]
|
||||
|
||||
c32.c: in txpr2, in the statement handling n_colon:
|
||||
add "else type = p1->otype"
|
||||
change chktyp to chktype
|
||||
in chktype, add an initial test for null pointer
|
||||
change free to e_free
|
||||
|
||||
c33.c: change cg_floag to cg_float
|
||||
|
||||
c34.c: change alloc to e_alloc and free to e_free
|
||||
|
||||
c94.c: change ATOI so that it works given a string containing more
|
||||
than one minus sign and does "the right thing" with the
|
||||
smallest negative number
|
||||
|
||||
FILES WHICH WERE NOT SENT:
|
||||
|
||||
manfst.insert
|
||||
nodeln.insert
|
||||
nodeop.insert
|
||||
gmnfst.insert
|
||||
|
||||
BIN
doc/c/ccdoc.txt
Normal file
BIN
doc/c/ccdoc.txt
Normal file
Binary file not shown.
BIN
doc/c/ccmake.hel
Normal file
BIN
doc/c/ccmake.hel
Normal file
Binary file not shown.
BIN
doc/c/cdiffs.txt
Normal file
BIN
doc/c/cdiffs.txt
Normal file
Binary file not shown.
BIN
doc/c/cmac.txt
Normal file
BIN
doc/c/cmac.txt
Normal file
Binary file not shown.
BIN
doc/c/keymac.txt
Normal file
BIN
doc/c/keymac.txt
Normal file
Binary file not shown.
BIN
doc/c/phase.arg
Normal file
BIN
doc/c/phase.arg
Normal file
Binary file not shown.
97
doc/c/recipe.cma
Normal file
97
doc/c/recipe.cma
Normal file
@@ -0,0 +1,97 @@
|
||||
.fo 0 25vg
|
||||
.fo 2 25vgi
|
||||
.sr list_left_margin 0
|
||||
.sr list_right_margin 0
|
||||
.so r/r.macros
|
||||
.tr @
|
||||
Instructions for transport to PDP10 via CMAC macros.
|
||||
.sp 2
|
||||
.fi
|
||||
The following files are provided:
|
||||
.ilist 4 0
|
||||
1. The source of two versions of the C compiler, one that produces
|
||||
CMAC code and one that produces MIDAS PDP10 code.
|
||||
.next
|
||||
2. The source of GT, the program that processes machine
|
||||
descriptions and produces compiler tables.
|
||||
.next
|
||||
3. Two test programs.
|
||||
.next
|
||||
4. The compiled CMAC code for the CMAC version of the compiler
|
||||
and the test program TESTC.
|
||||
.next
|
||||
5. A set of MIDAS macro definitions that implement the CMAC
|
||||
macros on the PDP-10 and a small support package that allows the
|
||||
TESTC program to run on the ITS operating system.
|
||||
.next
|
||||
6. The source of a simple control routine that calls the
|
||||
compiler phases. This program is provided primarily to show the algorithm.
|
||||
.next
|
||||
7. Some of the basic support routines for the ITS PDP-10 implementation.
|
||||
.next
|
||||
8. Some documentation. All recipients should first obtain MAC
|
||||
TR-149 (A Portable Compiler for the Language C -- the major documentation
|
||||
of the compiler, although slightly obsolete) and Bell Laboratories
|
||||
Computing Science Technical Report No. 31 (The C Programming Language
|
||||
-- defines C and a "standard" portable I/O library, which is somewhat
|
||||
different than the one I use).
|
||||
.end_list
|
||||
.ne 10
|
||||
The following procedure is used to construct a compiler on a PDP10:
|
||||
.ilist 4 0
|
||||
1. Modify the provided macro definitions (cmac.insert) and the
|
||||
support routines (cmac.supprt) for your assembler and operating system.
|
||||
.next
|
||||
2. Test the macro definitions and the support routines by
|
||||
assembling and running the test program TESTC.
|
||||
.next
|
||||
3. Implement the small set of I/O routines used by the compiler
|
||||
(described in ccdoc.text). It is best to keep these as simple as
|
||||
possible (i.e. don't buffer), as the run-time implementation given for
|
||||
the CMAC macros is much different than the PDP10 implementation,
|
||||
so you will have to rewrite them for the PDP10 implementation
|
||||
eventually.
|
||||
.next
|
||||
4. Assemble the CMAC code of the CMAC version of the compiler.
|
||||
Load the phases together with the I/O routines. Devise some way
|
||||
of calling the compiler phases in the right sequence and with the
|
||||
right parameters (use cc.c as guidance). It is not necessary
|
||||
that this be done by a program.
|
||||
.next
|
||||
5. You now have (hopefully) a running C compiler that produces
|
||||
CMAC object code. Try it out on the test program TESTC and compare
|
||||
the output with the CMAC file provided.
|
||||
.next
|
||||
6. The next step is to construct a compiler that produces PDP-10
|
||||
code directly. You may wish to bring up the provided PDP-10 version
|
||||
to see what the output looks like. Assuming that this output is
|
||||
not satisfactory, decide how it must be changed and make the
|
||||
appropriate changes to the machine description (pdp10.gt) and the
|
||||
macro file (c42-10.c). Note that I separate the output into
|
||||
4 object segments. This kludgery can be ignored; it is necessary only
|
||||
to support optional things like "compiling" UUOs into PUSHJs and
|
||||
stack tracing.
|
||||
.next
|
||||
7. Compile the GT program using your CMAC compiler.
|
||||
Assemble and load the GT program and use it to process your new
|
||||
machine description. Break up the output file into new compiler
|
||||
source files (use install.teco or the existing files for guidance).
|
||||
Using your CMAC compiler, compile these new files and assemble them.
|
||||
Then, load up the new compiler.
|
||||
.next
|
||||
8. Test this new compiler on the test program, to see if it
|
||||
produces reasonable output.
|
||||
.next
|
||||
9. Now you must re-implement the I/O stuff for the PDP-10
|
||||
implementation. You should use the provided support stuff as
|
||||
guidance, but note that it is far, far more fancy than necessary
|
||||
and you don't have to even understand all of it. It is best to
|
||||
start simple (still no buffering); wait until it works before you
|
||||
try to speed things up and add extra features. You will need
|
||||
the UUO handler, however (in uuoh.midas).
|
||||
.next
|
||||
10. After implementing the I/O stuff for the PDP-10 implementation,
|
||||
try out the TESTC program. If that works, compile and test the
|
||||
compiler, itself.
|
||||
.end_list
|
||||
|
||||
BIN
doc/c/recipe.txt
Normal file
BIN
doc/c/recipe.txt
Normal file
Binary file not shown.
Reference in New Issue
Block a user