Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Programming Operating Systems Apple

Developer Tries Resurrecting 47-Year-Old 'Apple Pascal' (and its p-System) in Rust (markbessey.blog) 15

Long-time Slashdot reader mbessey (a Mac/iOS developer) writes: As we're coming up on the 50th anniversary of the first release of UCSD Pascal, I thought it would be interesting to poke around in it a bit, and work on some tools to bring this "portable operating system" back to life on modern hardware, in a modern language (Rust).
Wikipedia describes UCSD Pascal as "a version that ran on a custom operating system that could be ported to different platforms. A key platform was the Apple II, where it saw widespread use as Apple Pascal. This led to Pascal becoming the primary high-level language used for development in the Apple Lisa, and later, the Macintosh. Parts of the original Macintosh operating system were hand-translated into Motorola 68000 assembly language from the Pascal source code."

mbessey is chronicling their new project in a series of blog posts which begins here: 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).
And they've already gotten UCSD Pascal running in an emulator and built some tools (in Rust) to transfer files to disk images. Now they're working towards writing a p-machine emulator in Rust, which they can they port to "something other than the Mac. Ideally, something small â" like an Arduino or Raspberry Pi Pico."

Developer Tries Resurrecting 47-Year-Old 'Apple Pascal' (and its p-System) in Rust

Comments Filter:
  • I have a complete set of Inside Macintosh still lying around somewhere.

  • by ctilsie242 ( 4841247 ) on Saturday May 10, 2025 @06:42PM (#65367487)

    If the p-system can be ported to Rust, I wonder if games that use it, like the OG Wizardry series, can be ported as well.

  • by Anonymous Coward
    They're using a non-portable language so their new interpreter can't even run on the original hardware. They should have just used fucking C as God intended. Except ... Mario Klebsch did this 25 years ago and the main interpreter file is only about 2500 lines of code. If this bozo had already built the interpreter that would be an ok-ish slow newsday Slashdot post but he hasn't even made the interpreter!
    • by mbessey ( 304651 )

      Why in the world would you want a new interpreter for the Apple II? The one that exists is fine. And yes - people *have* done this before, mostly rather a long time ago. Building another version of the same thing isn't a bad thing, especially if it comes along with better documentation of the internals, in a way that's accessible to a modern audience.

      Unsurprisingly, the 25-year-old project you refer to doesn't build on my system. And neither does the version Peter Miller updated way back in 2010. It's proba

      • Why in the world would you want a new interpreter for the Apple II? The one that exists is fine.

        Why in the world would Linus Torvalds want a new kernel to run GNU on a PC? The commercial UNIX kernels that existed were fine.

      • It is not for Apple II, it is a general purpose "reimplementation", at least that is what I understand.
        To adapt the byte code to modern CPUs you basically only need to switch to 32bit or bigger pointers, and think about branch and jump instructions.
        Having a base implementation in a modern language might be a good thing anyway.
        The p-Code implementations I saw so far were all either 6502 or Z80 ... not really the "most portable" format to get it quickly running on a Pi or something.

The only possible interpretation of any research whatever in the `social sciences' is: some do, some don't. -- Ernest Rutherford

Working...