Got an old Pascal S compiler to compile and run under RISC OS. Then I read about Pascal S on the web (the compiler helpfully includes no documentation) and discover that Pascal S is a toy subset of Pascal. No pointers, no file IO, or function parameters...

No wonder nobody bothered recompiling it for 32bit RISC OS....

But that's OK because I learned a little about the history of Pascal. And about the .... unique architecture of the CDC6600.

@goosey ``no function parameters'' --- that's cruel🙂

From what I understand, the point of Pascal S isn't really to use, it's a convenient language to write a compiler for in a compiler writing class. In Pascal.

See also PL/0. (And XPL/0 which is what happens when early Apple II hackers decide they really want a compiled HLL.)

Thats why the compiler doesn't have any docs, it's all described in copyrighted textbooks.

Interested to hear what the connection is from S to the architecture!

@goosey @yrabbit

Turns out Pascal S has a machine dependant bug in the (built in) bytecode interpreter, that works right on the CDC but fails elsewhere. look up "Pascal S" "opcode 36"

opcode 36 seems to be 'negate' - a wild guess, does the cdc6600 have a positive and a negative zero? (Hmm, maybe it's something about normalisation?)

@goosey @yrabbit

@EdS @yrabbit
apologies, that page is basically impossible to find from google?

yikes! (And thanks!)
"The uses 60 bit words for both integers and floats. In fact, a float is essentially the mantissa, as a 60 bit signed integer, with the exponent stuck into the MSBs. The exponent may be flipped so that it remains valid if the entire number is complemented (the CDC 6600 used 1's complement numbers).

The result is that a negate instruction works equally well on both real and integer formats, on the CDC 6600 series computers."

@goosey @yrabbit

@goosey Hang on, where did CDC6600 come into this? (They used to use that as an architecture in our 3rd year architecture coruse ~25 years ago - although I'd have to admit to not remembering any of it).

There's a bug in the Pascal S bytecode interpreter. Works on the CDC but fails on anything else. Look up Pascal S opcode 36 and be amused.

@goosey Thanks, yes, it got VERY odd search results 🙂

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko