1 /* BEGIN INCLUDE FILE gtss_primitives_.incl.pl1 */
 2 /*
 3   Created:  Kepner  04/12/78
 4  Modified:  Ron Barstad  82-08-11  to change size of primitives array for 4js3
 5  Modified:  Ron Barstad  83-05-19  change size of primitives for update 7
 6 */
 7 
 8 /* This array contains the command language lists and
 9    primitive sequences. */
10 
11 dcl  gtss_prgdes_ext_$primitives (0:1070) bit (36) aligned ext;
12 
13 /* This variable stores the current primitive */
14 
15 dcl  primitive bit (36);
16 
17 /* This overlay structure is used for the interpretation of most primitives.
18 
19    prim_address is the offset in gtss_prgdes_ext_$primitives of a
20    primitive that may possibly be transferred to.
21 */
22 dcl 1 primitive_overlay aligned based (addr (primitive)),
23     2 prim_address fixed bin (17) unal,
24     2 switchword_bit fixed bin (11) unal,
25     2 prim_op fixed bin (5) unal;
26 
27 
28 /* This overlay structure is used for the interpretation of
29    the CALLP primitive.
30 
31    callp_desc is the index in gtss_prgdes_ext_$prgdes of the program
32    descriptor being called.
33 */
34 dcl 1 callp_overlay aligned based (addr (primitive)),
35     2 callp_desc fixed bin (17) unal,
36     2 fill bit (5) unal,
37     2 switchword_flag bit (1) unal,
38     2 switch_ov_bit bit (6) unal,
39     2 prim_ov_op fixed bin (5) unal;
40 ^L
41 
42 /*
43    " The    following     two     structures,     command_list     and
44    " cmd_primitive_list,  are used in scanning for command language of
45    " the current subsystem.  command_list gives  the command name  and
46    " number of valid characters (up to 4) in the command name for each
47    " command.   Once  a  particular command name has been matched, the
48    " corresponding entry in cmd_primitive_list  gives  the  offset  in
49    " gtss_prgdes_ext_$primitives  of  the  start  of  the  primitive  list to
50    " interpret this command.  The  last  entry  in  cmd_primitive_list
51    " gives   the   offset  in  gtss_prgdes_ext_$primitives  of  the  start-up
52    " primitive sequence for the current subsystem.  In  order  to  use
53    " these structures for the subsystem represented by the Ith program
54    " descriptor the following calculations are needed:
55    "
56    "           cmd_list_len = gtss_prgdes_ext_$prgdes(I).cmd_lang_len;
57    "           cmd_list_ptr = addr(gtss_prgdes_ext_$primitives
58    "                (gtss_prgdes_ext_$prgdes(I).cmd_lang_offset));
59    "           cmd_prim_list_ptr = addrel(cmd_list_ptr,2*cmd_list_len);
60    "
61    " Subsystems  which   have the common command list or BASIC command
62    " list bit set in their program descriptor make  use  of  a  common
63    " command  list  near  the  beginning  of  gtss_prgdes_ext_$primitives  in
64    " addition to their private command lists  (if  any).   The  common
65    " command  list  starts  in the third word of gtss_prgdes_ext_$primitives.
66    " The   number   of   commands   in   the   list   is   given    by
67    " gtss_prgdes_ext_$common_cmd_num.    Subsystems   which  have  the  BASIC
68    " command list bit set use only the  first  gtss_prgdes_ext_$basic_cmd_num
69    " commands of the common command list.
70 */
71 dcl 1 command_list (cmd_list_len) aligned based (cmd_list_ptr),
72     2 cmd_word char (4),
73     2 cmd_len fixed bin (17);
74 
75 dcl 1 cmd_primitive_list (cmd_list_len+1) aligned based (cmd_prim_list_ptr),
76     2 primitive_ptr fixed bin (17) unal,
77     2 filler fixed bin (17) unal;
78 
79 dcl  cmd_list_ptr ptr init(null());
80 dcl  cmd_prim_list_ptr ptr init(null());
81 dcl  cmd_list_len fixed bin (17);
82 
83 /* Number of commands of the common command list used for
84    BASIC and various other subsystems which specify the BASIC
85    parameter bit in their program descriptor.
86 */
87 dcl  gtss_prgdes_ext_$basic_cmd_num fixed bin (17, 0) ext;
88 
89 /* Number of commands in the common command list.
90 */
91 dcl  gtss_prgdes_ext_$common_cmd_num fixed bin (17, 0) ext;
92 
93 /*   END INCLUDE FILE gtss_primitives_.incl.pl1 */