Figure 3–1 The instruction stream with a push byte instruction (left) and a push word instruction (right)
A few instructions known collectively as push instructions move data from the instruction stream to the interpreter stack. These instructions are unique in taking their arguments from the instruction stream. All other TrueType instructions take any data needed from the stack at the time they are executed. Any results produced by a TrueType instruction are pushed onto the interpreter stack. An instruction that expects two arguments and pushes a third would expect the two arguments to be at the top of the stack. Any result pushed by that instruction appears at the top of the stack. The listing a b c denotes a stack consisting of three elements with a being at the top of the stack, b being in the middle, and c at the bottom as shown. To easily remember the order in which stack values are handled during arithmetic or logical operations, imagine writing the stack values from left to right, starting with the bottom value. Then insert the operator between the two furthest right elements. For example, subtract a,b would be interpreted as (b-a): c b - a GT a,b would be interpreted as (b>a): c b > a The statement push d, e means push d then push e adding two elements to the stack as shown. To indicate that the top two stack elements are to be removed the statement would be pop e, d. It has already been noted that the bracketed list of binary digits that follows the instruction name uniquely identifies an instruction variant. This is done by having the bits represent a list of Boolean flags that can be set to TRUE with a value of 1 or to FALSE with a value of 0. Binary digits that follow the name can also be grouped to form a larger binary number. In such cases, the documentation specifies the meaning associated with each possible numerical combination. An instruction specification consists of the instruction name followed by its bracketed Boolean flags. Additional information describing the flags and explaining the stack interaction and any Graphics State dependencies is provided in tabular form:Code Range | the range of hexadecimal codes identifying this instruction and its variants |
Flags | an explanation of the meaning of a bracketed binary number |
From IS | any arguments taken from the instruction stream by push instructions |
Pops | any arguments popped from the stack |
Pushes | any arguments pushed onto the stack |
Uses | any state variables whose value this instruction depends upon |
Sets | any state variables set by this instruction |