home *** CD-ROM | disk | FTP | other *** search
- This is a kit for bringing up a BCPL compiler on any machine that has a
- C compiler. It is the INTCODE compiler kit written by Martin Richards,
- the inventor of BCPL.
-
- Briefly the steps are:
-
- 1. Write an interpreter for INTCODE. This has been done for you in C.
- As far as I know it runs on Unix (BSD flavour), MSDOS (using the Cware
- compiler) and CP/M (using the C80) compiler. There are also tuned
- assembly code versions of the interpreter for MSDOS and CP/M.
- Executables for MSDOS and CP/M are also provided.
-
- 2. Ensure that it runs properly by running it on some INTCODE programs
- like fact.int (factorial) or cgtest.int (code generator tester).
-
- 3. The bootstrap: This step is optional because you can keep on using
- the INTCODE versions of the compiler, but if you want to make any
- compiler modifications you have to pass this step. Using the INTCODE
- versions of the BCPL compiler passes: s.int (SYN), and c.int (CG, OCODE
- to INTCODE backend), recompile the BCPL source (syn.bpl, trn.bpl and
- cg.bpl) of the compiler passes. Yes, bootstrapping is a
- self-referential process. Note that the compiler will expect filenames
- in uppercase, hence the uppercase name links to the header files
- (*hdr.bpl). The file OPTIONS contains flags that control the behaviour
- of the passes. The option L7500 is required for the compiler to
- compiler itself. Then you will have to concatenate the INTCODE library
- stubs (icint.int) and utility routines (blib.int) to make an INTCODE
- "executable". The sources of the utility routines are in blib.bpl.
- The shell script "bcpl" automates these steps for making an INTCODE
- executable from BCPL source file.
-
- 4. You now can compile BCPL programs to your heart's content. If
- you're really ambitious, you can write a code generator from OCODE to
- assembly code.
-
- The program icint has some option flags. In brief:
-
- -pn sets the max program area size to n
- -gn sets the max global area size to n
- -s store a compact version of intcode in second file arg
- -l load a compact version of intcode from first file arg
- -u complain about unset globals
- -v verbose, more messages
-