Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
Programming Operating Systems Apple

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

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.

  • It seems like BASIC outlived Pascal. I haven't seen it in use in forever.
    • It seems like BASIC outlived Pascal. I haven't seen it in use in forever.

      "Delphi is a general-purpose programming language and a software product that uses the Delphi dialect of the Object Pascal programming language and provides an integrated development environment (IDE) for rapid application development of desktop, mobile, web, and console software,[3] currently developed and maintained by Embarcadero Technologies.
      Delphi's compilers generate native code for Microsoft Windows, macOS, iOS, Android and Linux (x64).[4][5][6]
      ...
      Delphi was originally developed by Borland as a ra

  • As I was taking Pascal in HS at the time, I got Apple Pascal for my Apple IIGS back in the day. I could never figure out why it had to have its own OS, instead of just running under ProDOS OR Apple DOS. Why? I ended up bailing on it and just kept using Pascal on the Trash-80s the school had.

  • People don't appreciate the limitations of the hardware we were targeting back in the day. Every bit counted. Every clock tick was important. Every register choice was meaningful. Every memory access mattered.

    Now, get off my lawn.

  • This is the first really interesting post on /. in a long time. I've still got my copy of Bowle's "Beginners Guide for the UCSD Pascal System" which included a short appendix on how to get going on an Apple II (once you buy a Language Board add-on). I foresee learning some Rust in my future!

If you fail to plan, plan to fail.

Working...