The first step before you start playing with PASM code is to get a copy of the source code and compile it. There is some information on this in Section 2.2.2.1 in Chapter 2. For more information and updates, see http://www.parrotcode.org and the documentation in the distributed code. The basic steps are: [2] [2] Not all operating systems have make . Check the documentation for instructions for systems that aren't Unix-based. $ perl Configure.pl $ make $ make test Once you've compiled Parrot, create a small test file in the main parrot directory. We'll call it fjord.pasm . print "He's pining for the fjords.\n" end .pasm is the standard extension for Parrot assembly language source files. Now you can run this file with: $ ./parrot fjord.pasm And watch the result of the program execution. Instead of executing the program immediately, you could also compile it to bytecode: $ ./parrot --output fjord.pbc fjord.pasm You specify the name of the output bytecode file with the --output (or -o ) switch. .pbc is the standard extension for Parrot bytecode. To execute the compiled bytecode, run it through the parrot interpreter: $ ./parrot fjord.pbc That's all there is to it. |