5

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.

5

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.

  • How much would the cost of a p-code interpreter have been increased by making things compatible? Each different set of opcodes would likely require a separate opcode-dispatch table, but that's not a huge part of the overall cost. Are there more substantial changes that would make compatibility impossible? – supercat Nov 28 '18 at 22:56
  • 1
    @supercat it was never a issue of money, as compatibility wasn't a goal. – Raffzahn Nov 28 '18 at 23:00
  • 1
    @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 Nov 28 '18 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. – Will Hartung Nov 29 '18 at 0:38
  • 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. – Jeff Zeitlin Nov 29 '18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.