1
2
3
4
5
6
7
8 dcl 1 TEMPLATE_HASP_BLOCK_HEADER_BITS aligned static options (constant),
9 2 dle bit (9) unaligned initial ("020"b3),
10 2 stx bit (9) unaligned initial ("002"b3),
11 2 bcb bit (9) unaligned initial ("000"b3),
12 2 fcs bit (18) unaligned initial ("000000"b3);
13
14 dcl 1 TEMPLATE_HASP_BLOCK_HEADER aligned based (addr (TEMPLATE_HASP_BLOCK_HEADER_BITS)),
15 2 text1 character (2) unaligned,
16 2 bcb character (1) unaligned,
17 2 fcs character (2) unaligned;
18
19
20
21
22 dcl 1 TEMPLATE_HASP_BLOCK_TRAILER_BITS aligned static options (constant),
23 2 non_crc unaligned,
24 3 eob_rcb bit (9) unaligned initial ("000"b3),
25 3 dle bit (9) unaligned initial ("020"b3),
26 3 etb bit (9) unaligned initial ("046"b3),
27 2 crc bit (18) unaligned initial ("000000"b3);
28
29 dcl 1 TEMPLATE_HASP_BLOCK_TRAILER aligned based (addr (TEMPLATE_HASP_BLOCK_TRAILER_BITS)),
30 2 non_crc character (3) unaligned,
31 2 crc character (2) unaligned;
32
33
34
35
36 dcl 1 TEMPLATE_HASP_SIGNON_BLOCK_BITS aligned static options (constant),
37 2 start_dle bit (9) unaligned initial ("020"b3),
38 2 stx bit (9) unaligned initial ("002"b3),
39 2 bcb bit (9) unaligned initial ("240"b3),
40 2 fcs bit (18) unaligned initial ("217317"b3),
41 2 rcb bit (9) unaligned initial ("360"b3),
42 2 srcb bit (9) unaligned initial ("301"b3),
43 2 record_bits bit (720) unaligned initial (""b),
44 2 eob_scb bit (9) unaligned initial ("000"b3),
45 2 eob_rcb bit (9) unaligned initial ("000"b3),
46 2 end_dle bit (9) unaligned initial ("020"b3),
47 2 etb bit (9) unaligned initial ("046"b3);
48
49 dcl 1 TEMPLATE_HASP_SIGNON_BLOCK aligned based (addr (TEMPLATE_HASP_SIGNON_BLOCK_BITS)),
50 2 non_trailer,
51 3 header character (7) unaligned,
52 3 record character (80) unaligned,
53 3 text1 character (1) unaligned,
54 2 trailer character (3) unaligned;
55
56
57
58
59 dcl 1 TEMPLATE_HASP_BAD_BCB_BLOCK_BITS aligned static options (constant),
60 2 start_dle bit (9) unaligned initial ("020"b3),
61 2 stx bit (9) unaligned initial ("002"b3),
62 2 bcb bit (9) unaligned initial ("220"b3),
63 2 fcs bit (18) unaligned initial ("217317"b3),
64 2 rcb bit (9) unaligned initial ("340"b3),
65 2 srcb bit (9) unaligned initial ("200"b3),
66 2 eor_scb bit (9) unaligned initial ("000"b3),
67 2 eob_rcb bit (9) unaligned initial ("000"b3),
68 2 end_dle bit (9) unaligned initial ("020"b3),
69 2 etb bit (9) unaligned initial ("046"b3);
70
71 dcl 1 TEMPLATE_HASP_BAD_BCB_BLOCK aligned based (addr (TEMPLATE_HASP_BAD_BCB_BLOCK_BITS)),
72 2 text1 character (2) unaligned,
73 2 bcb character (1) unaligned,
74 2 text2 character (3) unaligned,
75 2 srcb character (1) unaligned,
76 2 text3 character (4) unaligned;
77
78
79
80
81 dcl 1 TEMPLATE_HASP_SYNC_BLOCK_BITS aligned static options (constant),
82 2 start_dle bit (9) unaligned initial ("020"b3),
83 2 stx bit (9) unaligned initial ("002"b3),
84 2 bcb bit (9) unaligned initial ("000"b3),
85 2 fcs bit (18) unaligned initial ("237377"b3),
86 2 eob_rcb bit (9) unaligned initial ("000"b3),
87 2 end_dle bit (9) unaligned initial ("020"b3),
88 2 etb bit (9) unaligned initial ("046"b3);
89
90 dcl 1 TEMPLATE_HASP_SYNC_BLOCK aligned based (addr (TEMPLATE_HASP_SYNC_BLOCK_BITS)),
91 2 text1 character (8) unaligned;
92
93
94
95
96 dcl (HASP_EOB_RECORD initial (1),
97 HASP_EOF_RECORD initial (2),
98 HASP_SIGNON_RECORD initial (3),
99 HASP_RTS_RECORD initial (4),
100 HASP_RTS_ACK_RECORD initial (5),
101 HASP_BAD_BCB_RECORD initial (6),
102 HASP_DATA_RECORD initial (7))
103 fixed binary static options (constant);
104
105
106
107
108 dcl (HASP_EOB_RCB_BITS initial ("000"b3),
109 HASP_GENERAL_CONTROL_RCB_BITS initial ("360"b3),
110 HASP_CONSOLE_INPUT_RCB_BITS initial ("222"b3),
111 HASP_CONSOLE_OUTPUT_RCB_BITS initial ("221"b3),
112 HASP_SIGNON_SRCB_BITS initial ("301"b3),
113 HASP_EOF_SRCB_BITS initial ("200"b3),
114 HASP_EOF_FIRST_SCB_BITS initial ("000"b3))
115 bit (9) aligned static options (constant);
116
117 dcl (HASP_EOB_RCB based (addr (HASP_EOB_RCB_BITS)),
118 HASP_GENERAL_CONTROL_RCB based (addr (HASP_GENERAL_CONTROL_RCB_BITS)),
119 HASP_CONSOLE_INPUT_RCB based (addr (HASP_CONSOLE_INPUT_RCB_BITS)),
120 HASP_CONSOLE_OUTPUT_RCB based (addr (HASP_CONSOLE_OUTPUT_RCB_BITS)),
121 HASP_SIGNON_SRCB based (addr (HASP_SIGNON_SRCB_BITS)),
122 HASP_EOF_SRCB based (addr (HASP_EOF_SRCB_BITS)),
123 HASP_EOF_FIRST_SCB based (addr (HASP_EOF_FIRST_SCB_BITS)))
124 character (1) aligned;
125
126
127
128
129 dcl 1 TEMPLATE_HASP_BAD_BCB_RECORD_BITS aligned static options (constant),
130 2 rcb bit (9) unaligned initial ("340"b3),
131 2 srcb bit (9) unaligned initial ("200"b3),
132 2 eor_scb bit (9) unaligned initial ("000"b3);
133
134 dcl 1 TEMPLATE_HASP_BAD_BCB_RECORD aligned based (addr (TEMPLATE_HASP_BAD_BCB_RECORD_BITS)),
135 2 rcb character (1) unaligned,
136 2 srcb character (1) unaligned,
137 2 eor_scb character (1) unaligned;
138
139
140
141
142 dcl 1 TEMPLATE_HASP_RTS_RECORD_BITS aligned static options (constant),
143 2 rcb bit (9) unaligned initial ("220"b3),
144 2 srcb bit (9) unaligned initial ("000"b3),
145 2 eor_scb bit (9) unaligned initial ("000"b3);
146
147 dcl 1 TEMPLATE_HASP_RTS_RECORD aligned based (addr (TEMPLATE_HASP_RTS_RECORD_BITS)),
148 2 rcb character (1) unaligned,
149 2 srcb character (1) unaligned,
150 2 eor_scb character (1) unaligned;
151
152
153
154
155 dcl 1 TEMPLATE_HASP_RTS_ACK_RECORD_BITS aligned static options (constant),
156 2 rcb bit (9) unaligned initial ("240"b3),
157 2 srcb bit (9) unaligned initial ("000"b3),
158 2 eor_scb bit (9) unaligned initial ("000"b3);
159
160 dcl 1 TEMPLATE_HASP_RTS_ACK_RECORD aligned based (addr (TEMPLATE_HASP_RTS_ACK_RECORD_BITS)),
161 2 rcb character (1) unaligned,
162 2 srcb character (1) unaligned,
163 2 eor_scb character (1) unaligned;
164
165
166
167
168 dcl 1 hasp_bcb_byte unaligned based (hasp_bcb_byte_ptr),
169 2 pad1 bit (1) unaligned,
170 2 mbo1 bit (1) unaligned,
171 2 type fixed binary (3) unaligned unsigned,
172 2 count fixed binary (4) unaligned unsigned;
173
174 dcl hasp_bcb_byte_ptr pointer;
175
176 dcl (HASP_BCB_NORMAL initial (0),
177 HASP_BCB_IGNORE initial (1),
178
179 HASP_BCB_RESET initial (2))
180 fixed binary (3) unsigned static options (constant);
181
182
183
184
185 dcl 1 hasp_fcs_bytes unaligned based (hasp_fcs_bytes_ptr),
186 2 pad1 bit (1) unaligned,
187 2 mbo1 bit (1) unaligned,
188 2 system_wab bit (1) unaligned,
189 2 mcs1 unaligned,
190 3 device_not_ready bit (1) unaligned,
191 3 returned_data bit (1) unaligned,
192 2 wab_bits1 (4) bit (1) unaligned,
193 2 pad2 bit (1) unaligned,
194 2 mbo2 bit (1) unaligned,
195 2 console_wab bit (1) unaligned,
196 2 mcs2 unaligned,
197 3 block_type fixed binary (2) unaligned unsigned,
198 2 wab_bits2 (4) bit (1) unaligned;
199
200 dcl hasp_fcs_bytes_ptr pointer;
201
202 dcl (HASP_FCS_NORMAL_BLOCK initial (0),
203 HASP_FCS_ACKNOWLEDGE_BLOCK initial (1),
204 HASP_FCS_SYNC_BLOCK initial (3))
205 fixed binary (2) unsigned static options (constant);
206
207