1 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
  2 "
  3 "      This include file contains some common macros used in describing the characters
  4 " used by the Network Virtual Terminal and the TTY-33 compatible Terminal as
  5 " accessed via the ARPA Network.
  6 " can be referenced by that name:
  7 "
  8 
  9 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
 10 "
 11 "         begin_table
 12 "
 13 " Macro to define some things and start the table header.
 14 "
 15           &macro    begin_table
 16 
 17           define_fields
 18           use       TABLE_LC
 19 START:
 20           segdef    &0
 21           its       -1,1
 22           dec       1
 23           vfd       36/END-START
 24 
 25           its       -1,1                          " entry to convert output
 26           its       -1,1                          " ...
 27 
 28           &end
 29 
 30 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
 31 "
 32 "         end_table
 33 "
 34 " Macro used at end of table to close out the table and put things in proper order.
 35 "
 36           &macro    end_table
 37 
 38           use       TABLE_LC
 39           null
 40           use       LITERAL_LC
 41           null
 42           use       LAST_LC
 43 END:
 44           join      /text/TABLE_LC,LITERAL_LC,LAST_LC
 45           &end
 46 
 47 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
 48 "
 49 "         define_fields
 50 "
 51 " Macro used to define the fields of the various micro-operations.
 52 "
 53           &macro    define_fields
 54 
 55           bool      H_field,020000                " 760000 -- horizontal width field
 56           bool      V_field,000400                " 017400 -- vertical width field
 57           bool      S_field,000040                " 000340 -- descriptor field
 58           bool      F_field,000001                " 000037 -- function field
 59 
 60           equ       M_one,01                      " Generalized movement of plus one
 61           equ       M_bs,02                       " Generalized movement of minus one
 62           equ       M_cr,03                       " Generalized movement to zero
 63           equ       M_max,04                      " Generalized movement ot maximum value
 64           equ       M_tab,05                      " Generalized movement to next tabulation
 65           equ       M_two,06                      " Generalized movement of plus two
 66           equ       M_three,07                    " Generalized movement of plus three
 67 
 68           equ       H_one,M_one*H_field
 69           equ       H_bs,M_bs*H_field
 70           equ       H_cr,M_cr*H_field
 71           equ       H_tab,M_tab*H_field
 72           equ       H_two,M_two*H_field
 73           equ       H_three,M_three*H_field
 74 
 75 
 76           equ       V_one,M_one*V_field
 77           equ       V_tab,M_tab*V_field
 78           equ       V_ff,M_max*V_field
 79           equ       V_top,M_cr*V_field
 80 
 81 
 82           equ       S_visible,01*S_field
 83           equ       S_redshift,02*S_field
 84           equ       S_blackshift,03*S_field
 85           equ       S_audible,04*S_field
 86           equ       S_whitespace,05*S_field
 87 
 88 
 89           equ       F_onechar,01*F_field
 90           equ       F_twochar,02*F_field
 91           equ       F_exact_sequence,03*F_field
 92           equ       F_octal_escape,04*F_field
 93           equ       F_twochar_sequence,05*F_field
 94           equ       F_ascii_sequence,06*F_field
 95           equ       F_ignore,20*F_field
 96 
 97           &end
 98 
 99 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
100 "
101 "         input     match_char,output_char,escape_list,actions,flags
102 "
103 " Most basic macro used for input characters.
104 "
105           &macro    input
106           vfd       o9/&1,o9/&2,18/&3,18/&4,18/&5
107           &end
108 
109 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
110 "
111 "         output    actions,datafield
112 "
113 "Most basic macro used for output characters.
114 "
115           &macro    output
116           vfd       18/&1,&2
117           &end
118 
119 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
120 "
121 "         escape_in_octal     value
122 "
123 " Macro used to indicate that this entry is to be escaped in octal format.
124 "
125           &macro    escape_in_octal
126 &(1       output    F_octal_escape,(o9/&i,o9/000)
127 &)
128           &end
129 
130 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
131 "
132 "         ignore_output       input_value
133 "
134 " Macro used to indicate that this character is to be ignored on output.
135 "
136           &macro    ignore_output
137 &(1       output    0,18/0
138 &)
139           &end
140 
141 
142 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
143 "
144 "         printing_character  output_value
145 "
146 " Macro used to cause "output_value" to be put into output buffer for this value.
147 "
148           &macro    printing_character
149 &(1       output    H_one+S_visible+F_onechar,(o9/&i,o9/0)
150 &)
151           &end
152 
153 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
154 "
155 "         normal_input_character        input_value
156 "
157 " Macro used to cause "input_value" to be places into input buffer for this value.
158 "
159           &macro    normal_input_character
160 &(1       input     000,&i,0,H_one+S_visible,0
161 &)
162           &end
163 
164 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
165 "
166 "         ignored_input_character       input_value
167 "
168 " Macro used to cause this input character to be totally ignored.
169 "
170           &macro    ignored_input_character
171 &(1       input     000,&i,0,F_ignore,0
172 &)
173           &end
174 
175 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
176 "
177 "         whitespace          type
178 "
179 " Macro used to indicate that this output character is whitespace and need not be placed
180 " into the output buffer at this time.  However, the effective movement is the "type"
181 " movement, and the desired output position should be changed.
182 "
183           &macro    whitespace
184 &(1       output    S_whitespace+&i,o18/0
185 &)
186           &end
187 
188 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
189 "
190 "         chars_in_data_field           char1,char2
191 "
192 " Macro used to indicate that both characters in the description field are to be
193 " placed into the output buffer.
194 "
195           &macro    chars_in_data_field
196           output    F_twochar_sequence,(o9/&1,o9/&2)
197           &end
198 
199 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
200 "
201 "         escape_entry        input_char,output_char,-movement-
202 "
203 " Macro used to indicate the proper fields for the second (or subsequent) characters
204 " of an escape sequence.  If the movement is unspecified, a movement of two visible
205 " normal characters will be used.
206 "
207           &macro    escape_entry
208 
209           set       ESCAPE_COUNTER,ESCAPE_COUNTER+1
210           ife       &3,,X
211 "         input     &1,&2,0,H_two+S_visible,0
212           vfd       o9/&1,o9/&2,18/0,18/H_two+S_visible,18/0
213 ifend
214           ine       &3,,X
215 "         input     &1,&2,0,&3,0
216           vfd       o9/&1,o9/&2,18/0,18/&3,18/0
217 ifend
218           &end
219 
220 
221 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
222 "
223 "         begin_escape        char
224 "
225 " Macro used to indicate that this character is the start of an escape sequence.
226 " "char" is the character to be placed into the output buffer if no escape sequence
227 " is matched by subsequent characters.
228 "
229           &macro    begin_escape
230 
231           input     000,&1,&U-START,H_one+S_visible,0
232           use       LITERAL_LC
233           vfd       o36/&U
234           set       &U,0
235 &(2       set       &U,&U+1
236           escape_entry        &i
237 &)
238           use       TABLE_LC
239           &end
240 
241 " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " " "
242 "
243 " End of macro include file.