User guide
150 CHAPTER 8. THE DESIGN OF OCODE
Statement Meaning
GETBYTE S := S-1; P!(S-1) := P!(S-1) % P!S
MULT
S := S-1; P!(S-1) := P!(S-1) * P!S
FMULT
S := S-1; P!(S-1) := P!(S-1) #* P!S
DIV
S := S-1; P!(S-1) := P!(S-1) / P!S
FDIV
S := S-1; P!(S-1) := P!(S-1) #/ P!S
REM
S := S-1; P!(S-1) := P!(S-1) REM P!S
PLUS
S := S-1; P!(S-1) := P!(S-1) + P!S
FPLUS
S := S-1; P!(S-1) := P!(S-1) #+ P!S
MINUS
S := S-1; P!(S-1) := P!(S-1) - P!S
FMINUS
S := S-1; P!(S-1) := P!(S-1) #- P!S
EQ
S := S-1; P!(S-1) := P!(S-1) = P!S
FEQ
S := S-1; P!(S-1) := P!(S-1) #= P!S
NE
S := S-1; P!(S-1) := P!(S-1) ∼= P!S
FNE
S := S-1; P!(S-1) := P!(S-1) #∼= P!S
LS
S := S-1; P!(S-1) := P!(S-1) < P!S
FLS
S := S-1; P!(S-1) := P!(S-1) #< P!S
GR
S := S-1; P!(S-1) := P!(S-1) > P!S
FGR
S := S-1; P!(S-1) := P!(S-1) #> P!S
LE
S := S-1; P!(S-1) := P!(S-1) <= P!S
FLE
S := S-1; P!(S-1) := P!(S-1) #<= P!S
GE
S := S-1; P!(S-1) := P!(S-1) >= P!S
FGE
S := S-1; P!(S-1) := P!(S-1) #>= P!S
LSHIFT
S := S-1; P!(S-1) := P!(S-1) << P!S
RSHIFT
S := S-1; P!(S-1) := P!(S-1) >> P!S
LOGAND
S := S-1; P!(S-1) := P!(S-1) & P!S
LOGOR
S := S-1; P!(S-1) := P!(S-1) | P!S
EQV
S := S-1; P!(S-1) := P!(S-1) EQV P!S
NEQV
S := S-1; P!(S-1) := P!(S-1) NEQV P!S
Vector subscription (E
1
!E
2
is implemented using PLUS and RV.
8.6 Functio ns and Routines
The design of the OCOD E statements for t he implementation of function and routine
calls have been designed with care to allow code generators as much freedom as possible.
The mechanism allows some arguments to be passed in registers if this is worthwhile,
and the distribution of work between the code for a call and the code at the entry
point is up to the implementer. In a typical program there are about five calls for each
function or routine and so there is some incentive to keep the size of the call small by
transferring some of the work to the save sequence.
The compil ati on of a function or routine definition generates an OCODE sequence
of the following form: