I finally .ZIP'd up a DOS version of P5 Pascal for FreeDOS! (Not
FDNPKG friendly, but if there is demand, I will make one.)

This has been uploaded to iBiblio under /devel/pascal/p5 as
P5PAS11.ZIP. (Note that there are intentionally not all SFN files in
the archive, but they should all resolve to 8.3 without clashes.) Most
of the big size is due to documentation (PDF, HTML). I omitted other
files for other OSes which are available elsewhere.

http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/pascal/p5/

p5pas11.zip    2013-Mar-26  19:07:32    4.8M    application/zip

Author:
=====
  This was original Pascal-P4 from ETH Zurich in the '70s, a subset
Pascal bytecode compiler and interpreter widely distributed as help in
porting Pascal to other architectures. There were various ETH Zurich
people involved (as listed in sources). Later, Steven Pemberton wrote
a book documenting it, which is also online nowadays. In recent years
(circa 2008-10), it was brought up to full "classic" (ISO 7185) Pascal
by Scott Moore (of IP Pascal).

Version:
=====
  This is version 1.1 (as per Scott's numbering) circa late 2010 due
to various changes (documentation, et al.) although the code itself is
1.0. You can also see 1.2-pre in an online SVN account on Assembla,
but it has not been finalized.

License:
=====
  According to Steven Pemberton, Niklaus Wirth told him way back when
that it was "public domain". Scott Moore has also put his improvements
into the public domain. Scott is also pretty diligent about getting
permission for docs (and has tons more of it on his website).

Dialect:
=====
  This is not Turbo/Borland/Delphi compatible at all. All of the
(biased) complaints from Kernighan (BWK) still apply, more or less:
no dynamic arrays (or strings), no default (else) in case statements,
no getting or writing to raw addresses or untyped pointer variables,
no units or modules or include files, no named files, etc. This is 99%
the exact same language as originally defined by Wirth (and later
slightly clarified in the ISO 7185 standard circa 1982). It is
probably most accurate to say this language was designed for efficient
compilation, strong typing, structured programming, and especially
teaching algorithms and dynamic data structures (as per the book of
similar name by Wirth). However, there is an additional implementation
limitation here of only reading from a "prd" and writing to "prr"
external files (in order to self compile). This is somewhat annoying
but may be lifted if P6 is ever begun. You can work around it (barely)
if direly needed by inserting the input after the bytecode (see
pintm). There were intentionally no language extensions added to this
compiler.

Compiling:
=======
  GNU Pascal has not been very active lately, but they had a good run
(circa 1988-2007). Although I've not seen any problems with the GCC
4.1.2 build (claimed to be slightly buggier due to different backend),
here I've just played it safe and used the GCC 3.4.4 build for DJGPP
(although IIRC both are using GPC 2.1 frontend, aka 20070904, inside).
For building, Scott Moore had a lot of separate .BAT files and shell
scripts, which were somewhat messy, so this week I quickly wrote up a
GNUmakefile for him that seems to work (mostly) better. Since P5
itself is written in ISO 7185 Pascal, you need a compatible compiler
to build it!

Running:
======
  You do not need to run Scott's regression suite, but it is included
anyways. I've cheekily named it "fast, medium, slow" depending on how
you test it. I've also included "fulltest-dos.txt" in there to prove
it works correctly. Normally, you wouldn't want to spend five (or
more) hours running tests. The bytecode compiler (pcom) takes stdin as
input and outputs a bytecode file to be later interpreted (pint).
Hence all you really need are those two .EXEs.

Legacy:
=====
  There are not a lot of truly conforming ISO 7185 compilers left in
the world. Pascal is over 40 years old by now, but what is left of it
in popular use is usually some heavily-modified derivative (e.g.
FreePascal). Even Wirth himself would probably suggest instead using
one of his later languages (e.g. Oberon-07). The newsgroup
news://comp.lang.pascal.ansi-iso is a ghost town, but if really
curious, feel free to read up on stuff there. Personally, I'd suggest
just reading Scott Moore's website, Wirth's A+D=P book, Doug Cooper's
books, Pemberton's book, or similar. So this is probably most
interesting to those with a deep historical bent or those who are
curious to see how it all began.

------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to