1
2
3
4
5
6
7
8
9
10 create_node: proc(type,length) returns(fixed bin (18));
11
12 dcl length fixed bin;
13 dcl offset fixed bin(18);
14 dcl type fixed bin(4);
15 dcl storage(length) fixed bin aligned based;
16 dcl x(0:operand_max_len-1) fixed bin(35) aligned based(operand_base);
17 dcl (addr,char,ltrim,unspec) builtin;
18
19
20 if (length + next_free_operand) < operand_max_len
21 then do;
22 offset = next_free_operand;
23 next_free_operand = next_free_operand + length;
24 unspec(addr(x(offset)) -> storage) = "0"b;
25 addr(x(offset)) -> node.node_type = type;
26 return(offset);
27 end;
28 else do;
29 call print_message(407, "operand region", ltrim(char(operand_max_len)));
30 end;
31
32 end create_node;
33
34