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 17:51, 11 June 2006 (+ IMC). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Template:Future software The Parrot intermediate representation or PIR, also called Intermediate code (IMC), 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