I recently wrote My First Atari ST and reader Mark Miller chimed in with his own Atari story in a comment to that article, which was both long and interesting.
I thought p-code was used exclusively in UCSD Pascal systems. I get the sell in highly structured, portable code that you don't want to rewrite because you spent a lot of money on architecture.
But that's different that the reason someone chooses C. It seems like a weird combination and the performance, as you pointed out, is heavily sacrificed. Did anyone actually use this in practice? Was it common at all?
I'm pretty sure the "p-code" among 8-bit C compilers was different than the p-code in UCSD Pascal. As I said, what was called "p-code" in the C compilers was really Intel 8080 machine code. It was called "p-code," because most, if not all 8-bit C compilers used this same instruction set. As in the Pascal world, "p-code" stood for "portable code." And among the 8-bit C compilers, it was supposed to be portable. Whether it was, I can't say, since I didn't test that.
As for how much it was used, that's hard to say. I remember in the last ten years reading about someone who'd written a dealer demo for the Apple IIGS, saying it was written in C, but my memory is the author said he used a cross-compiler, which produced native code, maybe CC65. BITD, I don't remember seeing anyone else use a C compiler on an 8-bit. I only heard mentions of them, like Lattice C on the Apple II. I got intensely curious what that was like, once I learned the language.
I think a good reason for why they probably weren't popular is most of them weren't that powerful. That's what I saw, even when I looked at commercial compilers on the Atari. One example is they didn't allow multidimensional arrays. Another was they didn't implement much of the preprocessor. I had to hunt for a while to find CC8. Ironically, it was the most powerful 8-bit C compiler I found. It was public domain!
Thanks for the detailed explanation. And the specifics on multi-dimensional arrays. I can see how these could be acceptable limitations to get things up and running. And then maybe if the lifespan of the platform was longer, commercial houses would have worked out the more powerful features.
Great stories.
I thought p-code was used exclusively in UCSD Pascal systems. I get the sell in highly structured, portable code that you don't want to rewrite because you spent a lot of money on architecture.
But that's different that the reason someone chooses C. It seems like a weird combination and the performance, as you pointed out, is heavily sacrificed. Did anyone actually use this in practice? Was it common at all?
Way to squeeze all that life out of your 8-bit!
I'm pretty sure the "p-code" among 8-bit C compilers was different than the p-code in UCSD Pascal. As I said, what was called "p-code" in the C compilers was really Intel 8080 machine code. It was called "p-code," because most, if not all 8-bit C compilers used this same instruction set. As in the Pascal world, "p-code" stood for "portable code." And among the 8-bit C compilers, it was supposed to be portable. Whether it was, I can't say, since I didn't test that.
As for how much it was used, that's hard to say. I remember in the last ten years reading about someone who'd written a dealer demo for the Apple IIGS, saying it was written in C, but my memory is the author said he used a cross-compiler, which produced native code, maybe CC65. BITD, I don't remember seeing anyone else use a C compiler on an 8-bit. I only heard mentions of them, like Lattice C on the Apple II. I got intensely curious what that was like, once I learned the language.
I think a good reason for why they probably weren't popular is most of them weren't that powerful. That's what I saw, even when I looked at commercial compilers on the Atari. One example is they didn't allow multidimensional arrays. Another was they didn't implement much of the preprocessor. I had to hunt for a while to find CC8. Ironically, it was the most powerful 8-bit C compiler I found. It was public domain!
Thanks for the detailed explanation. And the specifics on multi-dimensional arrays. I can see how these could be acceptable limitations to get things up and running. And then maybe if the lifespan of the platform was longer, commercial houses would have worked out the more powerful features.
Hey I had one of those back in the day