Oppolzer - Informatik / Stanford Pascal Compiler

Home       Lebenslauf       Schwerpunkte       Kenntnisse       Seminare       Kunden       Projekte       Produkte       Blog       Stanford Pascal       Kontakt

The Stanford Pascal Compiler

Last changes: 2017-02-15

I am currently the maintainer of an improved version of the Stanford Pascal compiler. It runs on VM/370 Rel. 6 on the Hercules emulator; this is a free (very old) version of IBMs VM operating system. AFAIK, this version of Stanford Pascal will run on todays zVM and on some or all flavors of z/OS aka MVS too, but I have no machines available to test this, at the moment.

This page tells the story, how I came into playing this role, what I did so far, and what I will do next (if I get the spare time to do it). And for interested persons, there are links to the needed resources to test the compiler (see "Resources" paragraph).

You can follow the development process more closely on this Facebook page:
Stanford Pascal on Facebook

Evolution steps so far (will be continued ...)

My own Pascal history (please forgive me, this is in German)
Porting the Stanford compiler from MUSIC/SP to VM on Hercules
First extensions to the compiler in 2011
New keywords BREAK, CONTINUE, RETURN - still in 2011
Extensions to the runtime system (PASMONN) in 2016
Making RESET and REWRITE optional and eliminating the implicit RESET on INPUT
Allow shorter string constants on const initializers and assignments
20 significant characters on variable names (not only 12)
Shorter string constants - continued
Dynamic Storage Management
Pointer arithmetic - new functions ADDR, PTRADD, PTRDIFF, SIZEOF, PTR2INT
Pascal library
Storage management - new functions ALLOC, FREE, ALLOCX, FREEX
Static definitions
New functions MEMSET and MEMCPY
Direct WRITE of scalar variables or expressions
Maximum length of string constants is now 254 (was 64)
Making CSP numbers consistent between PASCAL1, PASCAL2 and PASMONN
Call CMS commands from PASCAL programs
PASSNAP prints variables from more than one source file
PASSNAP prints heap variables allocated by NEW and ALLOC
Porting Stanford Pascal to Windows, OS/2 and Linux - first steps
Porting Stanford Pascal to Windows, OS/2 and Linux - other issues
Improving PASSNAP for the NODEBUG case
Porting Stanford Pascal to Windows, OS/2 and Linux - portable branch tables
Porting Stanford Pascal to Windows, OS/2 and Linux - success !!
Bit operations
Support undeclared procedures
Some Pascal/VS features added (DATETIME, HALT, CLOSE, TERMIN/TERMOUT)
Differences on floating point computations and rounding
Differences on floating point output

All on one page

Resources (Compiler Version 02.2017)

Warning: no warranty at all for the software contained here; I don't recommend that you use it for any production work. The AWS Tape file may contain an older version, which is not as current as the development stories from above. The source codes will be more current, but maybe you will not be able to compile them using the older versions on the AWS Tape, because it is sometimes necessary to apply incompatible extensions to the compiler. If I have time, I will put the new version to the AWS Tape, too (if the new version is stable enough).

If you have difficulties running or compiling the actual versions, contact me directly. I will help you as soon as I can, and I would like it if you test this compiler using some Pascal sources you maybe have.

The source code of the first pass: PASCAL1.PAS
The source code of the second pass: PASCAL2.PAS
To start Pascal programs using VM/CMS: XRUNPARM.ASS
The Pascal monitor and runtime: PASMONN.ASS
The source code of the LIBX library routines: PASLIBX.PAS

The source code of the Snapshot routine: PASSNAP.PAS

The source code of the XCOMP compare utility: XCOMP.PAS

AWSTape File to TAPE LOAD the Pascal system to CMS


The Programming Language Pascal (Niklaus Wirth, 1972)
Stanford Pascal/360 Implementation Guide (1974)
P-Code Description (1978)
The Stanford Pascal compiler (1979)
Pascal/VS Language Reference Manual (1981)
LE Stack and Heap Implementation (IBM 2005)
P-Code Description (2016) - work in progress

Back to main page