1
2
3
4 apl_push_stack_:
5 procedure (P_n_words) returns (ptr);
6
7
8
9
10
11
12
13
14
15
16 declare P_n_words fixed bin (19) parameter;
17
18
19
20 declare block_ptr ptr,
21 num_words fixed bin (19);
22
23
24
25 declare (addrel, binary, rel, substr, unspec)
26 builtin;
27
28
29
30 declare apl_get_value_stack_
31 entry (fixed bin (19));
32
33
34
35 num_words = P_n_words;
36
37 if substr (unspec (num_words), 36, 1) = "1"b
38 then num_words = num_words + 1;
39
40 if binary (rel (ws_info.value_stack_ptr), 18) + num_words > ws_info.maximum_value_stack_size
41 then call apl_get_value_stack_ (num_words);
42
43 block_ptr = ws_info.value_stack_ptr;
44 ws_info.value_stack_ptr = addrel (ws_info.value_stack_ptr, num_words);
45 return (block_ptr);
46
47 end apl_push_stack_;
48
49