The UCSD p-System, Apple Pascal, and a dream of cross-platform compatibility

https://news.ycombinator.com/rss Hits: 6
Summary

The UCSD p-System, Apple Pascal, and a dream of cross-platform compatibility never quite realized I’ve been thinking about the UCSD P-System a lot lately, and I thought I’d write about it a bit, and about bytecode systems more-generally. And along the way, I hope to write some interesting code. What’s the p-System? Way back in 1974-1978, computer scientists at the University of California, San Diego campus developed a new portable operating system, compiler, and tools to run on both the PDP-11 minicomputers and the increasingly-common microcomputers. They called this UCSD Pascal, and it was available for a wide variety of systems, in just a few years. The secret to its wide portability was that the system sat “on top of” a very small kernel of machine-dependent code, which implemented a “virtual machine” called the “p-machine”, a kind of imaginary CPU specifically designed to be a good target for a Pascal Compiler. Because this was a relatively-small amount of code, it was possible to port the entire operating environment, including the operating system, the compiler, editor, filesystem and other tools, just by implementing the p-machine emulator for a new machine. You could get a version of the p-System for a huge variety of computers. Besides DEC’s PDP-11 and Rainbow, there were versions for the Apple II, the IBM PC (one of 3 OS options for it at the start), for HP’s series 80 and series 9000 workstations, Texas Instruments’ TI-99/4a home computer, CPM machines, various mainframes, and on, and on. Western Digital even created a microprocessor that ran p-machine code as its native machine language. The p-System was not the first portable byte-code interpreter and compiler system – that idea goes very far back, at least to the origins of the Pascal language itself. But it was arguably one of the most-successful early versions of the idea, and served as an inspiration for future portable software systems (including Java’s bytecode, and Infocom’s Z-machine). Where did...

First seen: 2025-04-16 17:19

Last seen: 2025-04-16 22:20