On 1 October 2013 20:06, Bernd Oppolzer <bernd.oppol...@t-online.de> wrote:
> Stanford PASCAL also generates P-Code in the first step,
> which in the second step is translated to 370 machine code.

Interesting; I had thought that P-code was only interpreted.

> BTW: The P-Code of the 1982 variant of the Stanford compiler
> had been extended compared to the 1979 variant, and because
> I found only a description of the 1979 variant, it was a little bit
> complicated to find out what the "new" P-Code instructions do.
> There is not "one" P-Code, but many variants of P-Code.
>
> And: it turned out, that the P-Code is not so machine-independant
> as it should be. There will be some difficulties regarding character
> sets etc., when I try to port the compiler to an ASCII based platform,
> for example (which I would like to do in the future).

You could instead generate JVM bytecodes... It's almost machine-independent.

I haven't looked at P-code (is there an accessible overview?), but had
heard of it long ago. When Java came out I looked at the JVM reference
book, and thought - Oh, this isn't too complicated, I could write an
interpreter for it in a week or so and have my own JVM. But it turns
out that the hard part of a JVM isn't the bytecode interpreter at all;
it's all the class loading stuff.

I imagine the P-code system doesn't have such heavy baggage.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to