7

I currently have Apple Pascal (and Fortran, and PILOT) running on an Apple IIgs emulator on Windows. As near as I can tell, it's UCSD p-System II.something. I also have a DOS-hosted UCSD p-System, IV.something, running in DOSBox. I have tools to extract and inject files from both systems' emulated disk volumes.

Will CODE (pcode 'executables') files from the II. p-System run correctly on the IV. p-System? I understand that there may be IV. capabilities that programs written with the II. compilers may not be able to access.

1 Answer 1

7

Will CODE (pcode 'executables') files from the II. p-System run correctly on the IV. p-System?

Quick answer: No


The roman numeral (I..IV) of the p-code system denotes the underlying p-code engine. They are incompatible with each other. Even though they are quite similar, the binary representation changed with each version.

Making them not (upward) compatible is eventually the real reason why the UCSD system vanished. After all, the major benefit of a virtual machine is binary portability across generations and machines.

I understand that there may be IV. capabilities that programs written with the II. compilers may not be able to access.

No, they really rearranged opcodes. Programs are (mostly) upward portable on source level, but not the binary produced.

From the POV of an academic project, this incompatibility may be a minor issue, as it was always about the features, but for a commercially viable standard environment, it'll be like a death sentence.

9
  • 1
    @supercat it was never a issue of money, as compatibility wasn't a goal.
    – Raffzahn
    Commented Nov 28, 2018 at 23:00
  • 3
    @supercat As said, compatibility was never a project goal. The versions where basicly seperate projects of the same university course in seperate years. As usual, there is no gain in beating around 'What-If' questions.
    – Raffzahn
    Commented Nov 28, 2018 at 23:05
  • 1
    The cost was overall complexity to the system, which it could ill afford. It was big and slow enough as it was, and didn't need any more complexity to make it worse. 64K of RAM wasn't a lot of room, and you have to appreciate how slow the CPUs were back in the day. Also even across the same versions, P-System programs could have issues with floating point representation as well across architectures. Commented Nov 29, 2018 at 0:38
  • 1
    And to put things in perspective wrt. compatibility costs, Apple II users needed additional hardware (the "language card", RAM shadowing the BASIC ROM) to even run UCDS Pascal with a single p-code interpreter version. There definitely wasn't enough RAM to fit interpreters for multiple versions in there. A IIgs would have enough RAM.
    – dirkt
    Commented Nov 29, 2018 at 6:42
  • 1
    So then the only hope I'd have of "porting" apps from II. to IV. if I don't have source would be to disassemble the CODE file on II., and re-assemble it on IV. - and even that won't work for the compilers, because they generate code for their original machines. Damn. Commented Nov 29, 2018 at 16:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .