Object Code Accelerator Manual

Preparing Programs for Acceleration
Object Code Accelerator Manual528144-003
3-5
Passing Parameters in Registers
CODE (LOAD L+3); ! Loads value on stack from data segment
CODE (STRP 7); ! Set RP=7, imply no value returned
CODE (EXIT);
When the PCAL instruction in the following fragment calls procedure Q, it uses the
value left on the register stack.
CODE (PCAL Q);
CODE (STRP 0); ! Set RP=0, use value on stack
CODE (STOR L+4); ! Stores value on stack to data segment
OCA discards the LOAD L+3 instruction, unless you specify ReturnsR0 Q to tell the
OCA to preserve that value.