TAL Programmer's Guide

Parameter Masks
Using Procedures
096254 Tandem Computers Incorporated 11–43
EXTENSIBLE Word Parameter Mask
If an EXTENSIBLE procedure has 16 or fewer parameter words, the compiler generates
a one-word mask. The compiler associates each word in each formal parameter with a
bit in the parameter mask, left justifying the layout so the first parameter word
corresponds to bit <0>.
In the following example, PROC_C has seven formal parameters of varying lengths.
Procedure C_CALLER calls PROC_C and passes four actual parameters, totaling seven
parameter words:
PROC proc_c (a,b,c,d,e,f,g) EXTENSIBLE;
INT a,d,f,g;
INT(32) b,e;
FIXED c;
BEGIN
!Code for processing
END;
PROC c_caller;
BEGIN
INT aa, ff, gg;
FIXED cc;
!Code for processing
CALL proc_c (aa,,cc,,,ff,gg);
END;
Figure 11-6 shows the parameter mask for the preceding example. In this case, bits
<12:15> are not used and contain zeros. Bits corresponding to passed parameters each
show a 1, while bits corresponding to omitted parameters each show a 0.
Figure 11-6. EXTENSIBLE Word Parameter Mask
L [-4]:
Actual parameters:
Formal parameters:
341
1 001111000110000
AA
AB
CC
CDE
FF
F
GG
G
0123456789101112131415
The compiler stores the number of parameter words passed (in its negative form) at
location L[–3]. For the preceding example, the value stored is –7.