Jump to content

Parrot intermediate representation

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ahy1 (talk | contribs) at 09:27, 22 April 2006 (Initial text). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Future software The Parrot intermediate representation or PIR is one of the two assembly languages for the Parrot virtual machine. The other is Parrot assembly language or PASM. Compared to PASM, PIR provides temporary registers and named registers, simplifying code genaration.

The hello world program in PIR is

.sub hello
  print "Hello world!\n"
.end

If the program is saved as hello.pir, it can be compiled and executed with this command: parrot hello.pir

External sources