- Parrot - Branches
- Parrot - Operations
- Parrot - Registers
- Parrot - Datatypes
- Parrot - Garbage Collection
- Parrot - Instructions
- Parrot - Installation
- Parrot - Overview
- Parrot - Home
Parrot Examples
Parrot Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Parrot - Instructions Format
Parrot can currently accept instructions to execute in four forms. PIR (Parrot Intermediate Representation) is designed to be written by people and generated by compilers. It hides away some low-level details, such as the way parameters are passed to functions.
PASM (Parrot Assembly) is a level below PIR - it is still human readable/writable and can be generated by a compiler, but the author has to take care of details such as calpng conventions and register allocation. PAST (Parrot Abstract Syntax Tree) enables Parrot to accept an abstract syntax tree style input - useful for those writing compilers.
All of the above forms of input are automatically converted inside Parrot to PBC (Parrot Bytecode). This is much pke machine code, but understood by the Parrot interpreter.
It is not intended to be human-readable or human-writable, but unpke the other forms execution can start immediately without the need for an assembly phase. Parrot bytecode is platform independent.
Instruction set
The Parrot instruction set includes arithmetic and logical operators, compare and branch/jump (for implementing loops, if...then constructs, etc.), finding and storing global and lexical variables, working with classes and objects, calpng subroutines and methods along with their parameters, I/O, threads and more.
Advertisements