endcal FUNC,MOD
Suppose function A calls B and that the last action B performs is to call another function C. B can use "endcal" to call C. "endcal" sets things up so that C returns to A instead of B. "endcal" can only be used when routine C does not need the NARGS value from B. (If C tries to get a NARGS value, it will get the NARGS that A used when calling B.)
The code generated by "endcal" is
inhib: .inhibit 1 #inhib is local to "endcal"
backup #unbump stack
FUNC: .symref #if necessary
eppr p.entr,FUNC,MOD
callop #perform call operation
.inhibit inhib #restore inhibit status
The "backup" and "callop" macros are described in separate explain files.
Copyright © 1996, Thinkage Ltd.