Talk:p-code machine

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Computing (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.


Am I missing the reason the term "machine language", which seems to be correct, is aliased to "assembly language", which seems to be incorrect, in the first paragraph? Wjl2 (talk) 15:22, 13 January 2012 (UTC)

There seems to be a lot of vagueness here as to whether p-code is a generic term or a specific encoding. Which is it? Nentuaby 07:14, 10 June 2006 (UTC)

P-code was, once, the specific code (and its design) distributed for the P-Pascal from ETH, Zürich, and was later transferred to mean a similar, but further developed code, used by the UCSD Pascal. It also became one of several words to express the idea of either virtual machines as a kind of intermediate representation for compiler code generators, or of (virtual) hardware designed for the support of a programming language (or a closely related group of them). There was, at the time, the MxN problem of programming language implementation: M programming languages for N hardware architectures meant a lot of work (effort MxN). With a universal intermediate language (as some people hoped to find) it would become a M+N problem. That universal intermediate language never materialized, although for a group of languages related to Algol, something fairly close to it was achieved. If I remember, the Amsterdam Compiler Kit was based on the EM-1 virtual engine -- and that was an engine which shared (shares?) many design elements with p-code, although it necessarily is 'wider' in application. Athulin (talk) 09:18, 10 January 2011 (UTC)

"In computer programming, a virtual machine executing p-code." That sentence doesn't even make sense! I'm going to change it to something better MichaelBillington 00:52, 2 April 2006 (UTC)

Infact, the whole opening paragraph is filled with senseless jargon MichaelBillington 00:53, 2 April 2006 (UTC)

1. Changed "P-code was the target of early compilers" to "P-code was the target of some Pascal implementations". Not all early Pascals were interpreted. The first CDC 6000 implementation was not, nor the IBM 360 implementation and several others. In fact, UCSD was the only one until a few UCSD imitators showed up. I changed the "compilers" part because it wasn't a true compiler.-- 29 June 2005 22:59 (UTC)

More importantly, the UCSD Pascal implementation was a subset, roughly based on the subset of one of the bootstrapping stages (P4) of real PASCAL. It was very prolific though, which is why it went into history. (talk) 18:16, 23 May 2014 (UTC)

"In computer programming, a P-code machine or pseudo-code machine is a specification of a cpu whose instructions are expected to be executed in software rather than in hardwar. " - "There seems to be a lot of vagueness here as to whether p-code is a generic term or a specific encoding." I cannot agree more. From the first sentence, it seems there can be many types of P-code machines. But then later it seems that there is only one. For example, "The p-Code machine is stack-oriented." _The_ p-Code machine? Only one? So, a machine that is not stack-oriented cannot be _a_ p-code machine? [User:M K Lai] 6 Jan 2007

IP Issues?[edit]

The popular implementations i'd heard about were commercial I've read about USCD licencing P-System to Pecan etc. What I've never understood is exactly what was being licensed. Was it specific implementations or did P-Code instelf have some sort of intellectual property protection Were there ever any unencumbered (public domain, etc) implementations? What affect did this have on it's popularity? —The preceding unsigned comment was added by (talk) 14:34, 29 January 2007 (UTC).

Pascal implementation[edit]

Is it intentional that the "instruction" type definition is missing from the Pascal implementation of p-code included on the page? Espertus 13:57, 13 March 2007 (UTC)

The definition of the code[] array also seems to be missing.
This appears to be an excerpt from one of the programs[1] in "Algorithms + Data Structures = Programs".
Would some other p-code interpreter[2][3] be easier for our readers to understand? -- (talk) 16:06, 21 January 2009 (UTC)

Cleanup: inconsistent capitalization[edit]

The capitalization of "p-code"/"P-code"/"p-Code" is inconsistent, perhaps because people are referring to specific implementations that used different capitalization. Espertus 14:02, 13 March 2007 (UTC)

The link "p code of the compiler" is broken. —Preceding unsigned comment added by (talk) 15:34, 24 March 2011 (UTC)

Example machine[edit]

Originally posted in the article:

I see this code read variable a many times, but where does it write to a ? I see this code read f once (case f of), but where does it write to f ? --

a and f are not variables! They are fields of the variable i. Normally they would be referenced as i.a and i.f, but the with i in the code makes them directly visable. -- RTC (talk) 00:54, 11 December 2007 (UTC)
I see l (lowercase L) read in lod and sto, but never defined or written to. Is it another field of the variable i ? -- (talk) 14:14, 21 January 2009 (UTC)

Merge with bytecode[edit]

Should this article be merged with bytecode? They appear to be describing the same thing by two different names. They even mention some of the same examples. --Rob (talk) 23:45, 22 January 2009 (UTC)

I agree, p-code and bytecode are more or less the same thing. But the value of this article is the examples from Wirth and the UCSD p-System, which really don't belong under bytecode. Also it's nominally about the machine and not p-code itself (which should be clearer now), so I think it's OK to keep it as a separate article. --Margin1522 (talk) 10:48, 31 January 2009 (UTC)

I would strip this article, removing all general bytecode stuff, and leave it as an article describing the first mass-deployment of a bytecode system (UCSD p-code) (talk) 19:26, 28 February 2015 (UTC)

Does JVM has more than one stack?[edit]

This article mentions that p-code machine has only one stack shared by procedure frames and local variables and it is different from JVM and Forth. But opposite to Forth that has two stacks, JVM has one stack though it may not be contiguous. I think JVM must be removed from the sentence. Dynaxis (talk) 14:34, 20 December 2010 (UTC)