=head1 NAME core.ops =head1 DESCRIPTION Parrot's core library of ops. =head2 Basic ops These are the fundamental operations. =over 4 =item B() Halts the interpreter. =item B() Does nothing other than waste an iota of time and 32 bits of bytecode space. =back =head2 System environment operations These operations allow interaction between the Parrot program and the system environment. =over 4 =item B(inout INT) Close file opened on file descriptor $1. =item B(out INT) Store the system error code in $1. =item B(out STR) Store the system error message in $1. =item B(out INT, in STR) Open file named $2 for reading and writing and save the file descriptor into $1. =item B(out INT, in STR, in STR) Open file named $2 with flags $3 and mode 0644 (rw-r--r--), and save the file descriptor into $1. =item B(out STR, in INT) Temporary hack op to read in a line from the file opened on the FILE * we've evilly put in the integer register $2. If $2 is 0, 1, or 2 we use stdin, stdout, or stderr respectively. BE AFRAID! THIS IS *EEEEEEEVIL* pure and simple. (From the 8th dimension, no less) If for some reason the line's longer than 64K you get only 64K =item B(out INT, in STR) Two-argument form returns the 0th character of string $2 in register $1. If $2 is empty, throws an exception. =item B(out INT, in STR, in INT) Three-argument form returns character $3 of string $2 in register 1. If $2 is empty, throws an exception. If $3 is greater than the length of string $2, throws an exception If $3 is less then zero but greater than the negative of the length, counts backwards through the string, such that -1 is the last character, -2 is the second-to-last character, and so on. If $3 is less than the negative of the length, throws an exception. =item B(in INT) =item B(in NUM) =item B(in PMC) =item B(in STR) Print $1 to standard output. =item B(in INT, in INT) =item B(in INT, in NUM) =item B(in INT, in PMC) =item B(out INT, in INT) Read an INTVAL from file descriptor $2 into $1. =item B(out NUM, in INT) Read a FLOATVAL from file descriptor $2 into $1. =item B(out STR, in INT, in INT) Read $3 bytes from file descriptor $2 into string $1. =item B