Hardware manual

CallFrame(f, a, b) Sends control to frame f and links it back to this one (i.e., when f
returns, the CallFrame call returns). a and b are optional
arguments.
GotoFrame(f, a, b) Like CallFrame, but does not plant a return link.
CoCall(a, b) CallFrame(CallersFrame(), a, b)
CoReturn(a, b) Like CoCall, but does not plant return link.
ReturnTo(label) Returns to a given label in the frame of the caller.
GotoLabel(f, label, v) Sends control to the specified label in the specified frame, and
passes v in AC0.
RetryCall(a, b) Repeats the call which appears to have given control to the caller
with a and b as the first 2 arguments, and the other arguments
unchanged. There are certain ways of calling functions which
cannot be retried properly. In particular, the address of the
procedure must be the value of a static or local variable; it
cannot be computed. Thus "a>>proc(s, b)" cannot be retried,
but "let pr=a>>proc; pr(s, b)" can be retried.
ReturnFrom(fnOrFrame, v) Looks for a frame f which is either equal to fnOrFrame, or has
FramesCaller(f) equal to fnOrFrame. It then cuts back the stack
to f and simulates a return from f with v as the value. If error, it
returns 0.
3.11. Subsystems and user programs
All subsystems and user programs are stored as "Run files", which normally have extension ".Run". Such
a file is generated by Bldr and is given the name of the first binary file, unless some other name is specified
for it. The format of an Alto run file is discussed in section 4.8 and in the Bcpl manual.
CallSubsys(S, pause [false], doReturn [false], userParams [0]) will read in a run file and send control to its
starting address, where S is an open disk stream for the file, positioned at the beginning of the file. If pause
is true, then CallSwat("Pause to Swat"); Ctrl-P starts the program. (doReturn will never be implemented,
but would have allowed a return to the caller after the called subsystem "finished.") userParams is a
pointer to a vector (length up to lUserParams) of parameters which will be passed to the called subystem.
The parameters are formatted according to conventions given in SysDefs.D (structure UPE): each
parameter is preceded by a word that specifies its type and the length of the block of parameters; a zero
word terminates this list. When the Alto Executive invokes a program with CallSubsys, it passes in
userParams an entry with type globalSwitches which contains a list of ASCII values of global switches
supplied after the program name.
The open stream is used to load the program into Alto memory according to placement information
included in the file. The stream is then closed; no other open streams are affected.
The program is started by a call to its starting address, which will normally be the first procedure of the
first file given to Bldr. This procedure is passed three arguments. The first is the 32 word
layout vector for
the program, described in the Bcpl manual. The second is a pointer to a vector of parameters provided by
the caller (the userParams argument to CallSubsys). The third is the "complete file address" (CFA) for a
particular point in the file that was used to load the program. If no overlays are recorded in the Run file,
this point is the end of file. If overlays are contained in the file, the CFA points to the first word of the first
overlay section (this can be used as a hint in a call to OpenFile when loading overlays contained in the
same file).
Subsystems conventionally take their arguments from a file called Com.Cm, which contains a string which
Alto Operating System May 5, 1980 16
For Xerox Internal Use Only -- December 15, 1980