bcall routine[,numwords,stackbump]
bcall length,1 bcall .write
This is a standard method of calling a B function. At the time of the call, the first argument should be in the A register and the second in the Q register. The third and subsequent arguments should be in the stack at offsets "ARG.3,,sp", "ARG.4,,sp", etc. Stack offsets ARG.3, ARG.4, and ARG.5 are defined for this purpose. ARG.1 and ARG.2 are also available as offsets in which to store the A and Q registers, if needed.
The stack frame size is calculated by the BCALL macro to allow space for all the variables defined by use of the ARGDEF and AUTO macros plus room for the linkage area. At rare times this is not the desired value, in which case the "stackbump" parameter can be used to state the desired value explicitly.
* bcall printf,4 symref printf tsx1 printf zero .lcl,4
Copyright © 1996, Thinkage Ltd.