This is an overview of different p-System versions.
The underlying basis for the p-System is the hypothetical machine called the p-machine (for “pseudo-machine”). In most implementations, the p-machine is emulated by an interpreter written in the native instruction set of the hardware on which the system is running (for example, Macro-11 for the Terak, 8086 for the IBM Personal Computer, 6502 for Apple, 8080, Z80). The rest of the p-system is p-code, running on this interpreter, which it regards as a machine in its own right.
During the development of the p-System, the p-machine has, on occasion, been changed, meaning that the instruction set was modified. Every time this happens, the ROMAN NUMERAL section of the version number is changed. This is the ONLY time that the Roman numeral is changed. Bug fixes or architecture changes, no matter how extensive, do not change the Roman number.
Note, therefore, that the correct way of spelling the most recent version, is “IV.1”, not “4.1”.
Brief p-System history
This is a listing of p-System version numbers, when they appeared, why, and from whom (not always UCSD). Only more major versions are listed, since there have been too many minor changes to list conveniently. Major events in the development, such as the release of Apple and Western Digital MicroEngine versions, are given breaks in the sequence.
– I.2: released in-house at UCSD
– I.3: released at UCSD, also released to a few other UC campuses. All parts of the system still contained in SYSTEM.PASCAL.
– I.4: general release. System divided into separate filer, editor, compiler.
– I.5: UNITs developed, compiler now able to compile them. Editor now able to copy from other files. Filer how has wildcarding.
– II.0: Second p-machine version. Division of single Remote I/O channel into separate input and output.
– II.1: INTRINSIC units appear: linked directly from library at run-time, rather than being copied into the code file. System now has 32 segments rather than 16, UNITS can be declared as resident or non-resident.
– II.1x7b More swapping capabilities added: screen handlers and others can be made to stay on disc, loaded only when needed.
About this time, the p-System was transferred from the jurisdiction of the University of California to that of Softech Microsystems, a division of Softech Inc., specifically established to maintain the p-System. This was a long process, and the point at which the system was no longer maintained by the University is not clear.
– Apple Pascal 1.0 Close to II.0
– Apple Pascal 1.1 Essentially the same as UCSD II.1; minor modification to editor.
– Apple Pascal 1.2 Support for 64K and 128K systems
– Apple Pascal 1.3 1985
– Apple III Pascal version 2.0 1985
WESTERN DIGITAL CORPORATION
When Western Digital undertook the Pascal MicroEngine project, it designed a new version of the p-machine to implement. This new version was labelled III (since I and II already existed). Version III is therefore dedicated to MicroEngine-based machines.
Volition Systems is a company formed by Randy Bush and Roger Sumner. First version of the Advanced System Editor. Among the changes introduced in version III is the first appearance of parallel processes, and the routines and types needed to control them.
– III.E1 Third p-machine version, by Western Digital Inc. Developed for the Western Digital MicroEngine, (thus far) the only hardware p-machine. Some architectural and philosophical changes from previous versions.
– III.F Some debugging, minor improvements in I/O. Single character typeahead only. Subversions are F0 and F1.
– III.G0 More debugging. NO typeahead whatever.
– III.H0 More debugging. Typeahead restored, but not reliable.
Versions from Western Digital, from Volition Systems and for PDQ.
– III.H1 By Volition Systems for the PDQ-3. Much more reliable than other versions of III.
– III.H1 IME, III.h4 More debugging. System reliability improved, at cost of increased system size and reduced available memory.
SofTech MicroSystem’s development efforts started with I.5, II.0, andII.1; intervening efforts by Apple, Western Digital, and Volition Systems were not involved.
Major architectural changes were made:
– expansion of the 16-segment system to 256 segments;
– all segments (units, assembly segments, segment routines, etc.) can be dropped from memory;
– all currently loaded segments are kept in memory until demand forces them to be dropped.
– programs can create and start parallel tasks (the program itself is the main task).
The running of the tasks is done differently from the way version III does it.
– IV.0 Most recent p-machine change.
Extensive changes in both p-machine instruction set and Pascal system architecture.
SofTech MicroSystems licensed various companies (such as the IBM PC, DEC Rainbow and Xerox and Texas Instruments TI -99/4) to bring up IV.0 implementations on their machines.
– IV.1 Under license from SofTech MicroSystems, several companies(such as Sage Technology in Nevada, and Network Consulting Incorporated in British Columbia) bring up IV.1 for various machines:
– NCI releases a version for the IBM PC more powerful, faster, and more reliable than that released by IBM.
– Ticom Inc. releases a version for the DEC Rainbow 100.
– Advanced Systems Editor now available under IV.
– Scheduling of parallel processes debugged.
NCI eventually took over from SofTech Microsystems and then later Pecan took over from NCI.
Pecan continued the work under the name Pecan Software Systems Inc. In 1986 they sold the Power System, a host based version of the p-System for MS-DOS, Macintosh Finder, AtariTOS, AmigaDos, Apple II under Prodos, CP/M, RT-11, RSX, RSTS, VMS, Unix. The Pascal compiler then allowed native code generation (8086,68000,9900, PDP-11, Z80 and 8080) besides p-code and 16 MB of addressable memory for code. Besides Pascal also Modula-2, Basic and Fortran-77 compilers were available,
Cabot Software in the UK embedded software was the last known commercial company to use the UCSD p-System technology, mainly in embedded systems. It seems they continued that until around 1999. No more commercial company seems to have a license from UCSD for the p-System now.
The term p-code was introduced by the group of Niklaus Wirth, for example for the intermediate code produced by the Pascal-P compiler. P-code is the Assembly language for a hypothetical stack machine, the P-machine, said to have been an imitation of the instruction set for the Burroughs Large System. The term was used in the classic book Algorithms + Data Structures = Programs, N. Wirth, P-H 1976. Byte articles on writing a Pascal Compiler in Northstar BASIC (ca Aug 1978) also used the term. Later used as the intermediate language in the UCSD P-system. Variants: P2 P-code, P4 P-code, UCSD P-code, LASL P-code. See here for an introduction to p-code.
There are different interpreters for I.3, I.5, II.0, II.1, III, IV.0, and IV.1 at least. In general you can not expect code compiled with the compiler on one release to work with an interpreter from a different release. The differences between the dot releases were minor but could still cause problems.
I.5 and II.0 are actually pretty similar. The biggest differences seem to have occurred between II and III. Version IV added opcodes and changed memory handling to allow more than 64K to be used.
III completely changed the opcodes around. III was only for the Western Digital Pascal Microengine.
IV.0 was derived from II.1 and III. The p-code opcodes are almost the same as III, there are other significant differences such as the memory handling.
Opcodes didn’t change within version numbers. So, the I.x opcodes remained the same (eg the North Star UCSD p-System. The Apple Pascal system used the same op-codes in its different incarnations. But the interpreter code changed to make it faster with some opcodes.
The difference between I.5 and II.0 was the extension of some of the LDC instructions, and a couple of new instructions (). All the rest were the same. The primary reason for the change to II.0 was to speed up the system, and enhanced stability.
Relevant documents on the p-machine and p-code. In documents like Internals, Operating System, Technical Reference, quite a lot internals are disclosed how the p-machine, p-code and -system are constructed.
Apple Pascal p-machine description
Apple II Pascal 1.1 interpreter disassembly
Apple II Pascal 1.1 interpreter disassembly
Apple ][ Pascal 1.3 P-Machine source isting
Pascal p-code program disassembler I.5 Pascal source
PDP_11 I.5 interpreter source
p-code interpreter I.5
The p-System Stack and Heap
p-code list with descriptions version IV
Detailed p-machine description Apple 1.3
Pascal II: Operand Formats
p-code list with descriptions version IV
Appendix p-code mnemonics
|$01||SLDC 1||SLDC 1||SLDC 1||SLDC 1|
|$7F||SLDC 7F||SLDC 7F||SLDC 7F||SLDC 7F|
Table by L.Boshell 1983-1996
History mostly based on a text by Alastair Milne written in 1982, various places on the web and the messages in the UCSD Yahoo group.