home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / language / bcpl4ami.lzh / bcpl / README < prev   
Encoding:
Text File  |  1991-10-09  |  2.0 KB  |  44 lines

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