P4 Compiler


Relevant articles about the portable Pascal Px compilers (see also the Articles page for Pascal Reports etc)

Book by Martin Daniels and Steven Pemberton Pascal implementation: The P4 Compiler, online version, local copy
A line by line description of the source.

ETH Pascal Programming Language Technical information:

Portable Compiler project New Edition H.H. Naegeli, 16.02.77
Portable Compiler project Pascal P4 Urs Ammann, Kesav Nori, Christian Jacoby May 76
Pascal P4 interpreter
Lists binary codes P-codes
Cross referencer
P4 Pascal Compiler P-Code listing
Procedural Cross Referencer

Downloads

Pascal P4 adapted to more standard Pascal
The files in this archive are:

  • int.p – P4 code interpreter
  • comp0.p – original compiler as distributed
  • comp1.p – same compiler with bugs fixed up to Pascal Newsletter #12
  • comp2.p – as above but with experimental changes to eliminate the last of the machine dependent code
  • comp.p – lower case, entabbed and stripped version of comp2.p some typos in comp?.p have been fixed
  • compvax.p – essentially the same as comp.p but with changes to allow it to compile under ‘pc’
  • compdiffs – differences between compvax.p and comp.p
  • compvax.errs – warning messages
  • compvax.map – line numbers of procedures and functions

Note that the characters for ^ and ‘ are ‘ and # in the compiler sources.

Pascal P4 adapted to ISO7185 Pascal by Scott Moore

Pascal P4 adapted to more standard Pascal, with examples