|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 60672 (0xed00) Types: TextFile Names: »tsconlst«
└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system └─⟦72244f0ef⟧ └─⟦this⟧ »tsconlst«
\f tsconlst 80.10.08. 11.40. page 1 10 1 PROCESS tsconnector( 20 2 tsconname: alfa; 30 3 semvector: system_vector; 40 4 VAR inputsem, tsssem, dcsem, lamsem, timeoutsem, 50 5 commandsem, listensem, outsem, dcoutsem, lamoutsem, timeoutanswer 60 6 : semaphore); 70 7 80 8 (******************************************************** 90 9 * 100 10 * function: this module establishes a connection between 110 11 * two RC3502 machines in the demonstration 120 12 * model 130 13 * 140 14 * externals: process dc_module 150 15 * 160 16 * var params: none 170 17 * 180 18 * semaphores: the module receives messages on inputsem, 190 19 * and sends messages aimed at: 200 20 * timeoutmodule on timeoutsem, 210 21 * lamdriver on lamsem, 220 22 * dcmodule on dcsem 230 23 * 240 24 * programmed june 1980 by stb and wib 250 25 * 260 26 *********************************************************) 270 27 280 28 CONST 290 29 version = "vers 1.17 /"; 300 30 310 31 320 32 (*-------------------------- configuration ----------------------------*) 330 33 340 34 CONST 350 35 360 36 ts1name = "tsconnector " ; 370 37 ts2name = "ts2connector" ; 380 38 ts1port = 0; 390 39 ts2port = 0; 400 40 410 41 ownname = ts1name; (* or ts2name *) 420 42 tsc_port = ts1port; (* or ts2port *) 430 43 440 44 \f tsconlst 80.10.08. 11.40. page 2 1010 45 1020 46 1030 47 CONST 1040 48 tsdatasize=16 (* no of bytes in data part of buffer from tss *); 1050 49 tsbufsize= 32 (* no of bytes in buffer from tss *); 1060 50 logsize= 64; (* no of bytes in log-message *) 1070 51 lambufsize= 80 (* no of bytes in buffer to lamdriver *); 1080 52 con_lam_time= 2; 1090 53 no_of_lamlis= 3; 1100 54 no_of_dcbuf= 3; (* 3 of each type *) 1110 55 idle= -5; 1120 56 wd = -4; 1130 57 wrtr= -3; 1140 58 wt = -2; 1150 59 wack= -1; 1160 60 1170 61 1180 62 TYPE 1190 63 statetype= idle..wack; 1200 64 inputtype= (enq, data, out, here, rnr, nak, ack, rtr, lto, tto, nons); 1210 65 1220 66 alloctype= ARRAY (1..64) OF byte; 1230 67 1240 68 messagetype= (* message to/from tss *) 1250 69 RECORD 1260 70 ! allabel: alarmlabel; 1270 71 ! data: ARRAY (1..tsdatasize) OF byte; 1280 72 END; 1290 73 1300 74 tsbuftype= (* message to/from tss *) 1310 75 RECORD 1320 76 ! bll: integer; 1330 77 ! data: ARRAY (1..tsbufsize-2) OF byte; 1340 78 END; 1350 79 1360 80 logtype= 1370 81 RECORD 1380 82 ! bll: integer; 1390 83 ! data: ARRAY (1..logsize-2) OF byte; 1400 84 END; 1410 85 1420 86 lambuftype= (* message to/from lamdriver *) 1430 87 PACKED RECORD 1440 88 ! stxt, 1450 89 ! bll: byte; 1460 90 ! data: ARRAY (0..lambufsize-3) OF byte; \f tsconlst 80.10.08. 11.40. page 3 1470 91 END; 1480 92 1490 93 createchtype= (* message format in createchannel operation *) 1500 94 RECORD 1510 95 ! controlinfo, timeout: byte; 1520 96 END; 1530 97 1540 98 addresstype= (* format of 11.0-message *) 1550 99 RECORD 1560 100 ! allabel: alarmlabel; 1570 101 ! address: ARRAY (1..3) OF macroaddr; 1580 102 END; 1590 103 1600 104 staterow= ARRAY (inputtype) OF statetype; 1610 105 statetabletype= ARRAY (statetype) OF staterow; 1620 106 1630 107 actionrow= ARRAY (inputtype) OF integer; 1640 108 actiontabletype= ARRAY (statetype) OF actionrow; 1650 109 1660 110 CONST 1670 111 statetable= 1680 112 statetabletype( 1690 113 (* enq data out here rnr nak ack rtr lto tto nons *) 1700 114 (*idle*)staterow(wd ,idle,wrtr,idle,idle,idle,idle,idle,idle,idle,idle), 1710 115 (*wd *)staterow(wd ,idle,wd ,wd ,wd ,wd ,wd ,wd ,wd ,wd ,wd ), 1720 116 (*wrtr*)staterow(wt ,wrtr,wrtr,wrtr,wt ,wrtr,wrtr,wack,wrtr,wrtr,wrtr), 1730 117 (*wt *)staterow(wd ,wt ,wt ,wt ,wt ,wt ,wt ,wt ,wt ,wrtr,wt ), 1740 118 (*wack*)staterow(wack,wack,wack,wack,wack,wack,idle,wack,wack,wack,wack)); 1750 119 1760 120 actiontable= 1770 121 actiontabletype( 1780 122 (* enq data out here rnr nak ack rtr lto tto nons *) 1790 123 (*idle*)actionrow( 1, 10, 2, 14, 11, 11, 11, 11, 0, 15, 11), 1800 124 (*wd *)actionrow( 1, 3, 4, 14, 11, 11, 11, 11, 11, 15, 9), 1810 125 (*wrtr*)actionrow( 7, 12, 4, 14, 5, 12, 12, 6, 12, 15, 12), 1820 126 (*wt *)actionrow( 1, 11, 4, 14, 0, 11, 11, 11, 0, 16, 11), 1830 127 (*wack*)actionrow( 13, 13, 4, 14, 13, 13, 8, 13, 13, 15, 13)); 1840 128 1850 129 tick1= 1; (* timeoutinterval for ts1 i.e. dcts *) 1860 130 tick2= 5; (* timeoutinterval for ts2 *) 1870 131 1880 132 (* operation codes in protocol between tsconnectors *) 1890 133 enqop= 0; 1900 134 dataop= 1; 1910 135 rtrop= 2; 1920 136 rnrop= 3; \f tsconlst 80.10.08. 11.40. page 4 1930 137 ackop= 4; 1940 138 nakop= 5; 1950 139 1960 140 1970 141 VAR 1980 142 (*pools*) 1990 143 dcpool: pool (2*no_of_dcbuf) OF alloctype (* messagetype *); 2000 144 lampool: pool (2+no_of_lamlis) OF lambuftype; 2010 145 updatepool: pool 1 OF alloctype (* updates *); 2020 146 timerpool: pool 1 OF timers (* messbuftype cf. testmodule*); 2030 147 2040 148 (*references*) 2050 149 commandref, 2060 150 crref, 2070 151 dataref, 2080 152 dcref, 2090 153 lamref, 2100 154 listenref, 2110 155 msg, 2120 156 tim: reference; 2130 157 2140 158 (*shadow variables*) 2150 159 dcshadow: shadow; 2160 160 2170 161 (*zones*) 2180 162 z: zone; 2190 163 2200 164 (*integers*) 2210 165 action, 2220 166 checklamlisten, (* how many listenbuffers to be checked after 2230 167 recreation of lamchannel caused by output or input status error *) 2240 168 dccreatevalue, (* result of createcall *) 2250 169 i, 2260 170 outputtec, (* transmission error count for lam output *) 2270 171 tec (* transmission error count *): integer; 2280 172 2290 173 (*booleans*) 2300 174 testboo, 2310 175 todc: boolean; 2320 176 2330 177 (*other variables*) 2340 178 state: statetype; 2350 179 input: inputtype; 2360 180 2370 181 owntsmacro, 2380 182 dcts_macro: macroaddr:= macroaddr(0,0,0); \f tsconlst 80.10.08. 11.40. page 5 2390 183 2400 184 (*external*) 2410 185 PROCESS dc_module 2420 186 ( 2430 187 dc_name: alfa; 2440 188 semvector: system_vector; 2450 189 VAR dcoutsem: semaphore 2460 190 ); 2470 191 EXTERNAL; 2480 192 2490 193 (*forward*) 2500 194 PROCEDURE getinputbuf; 2510 195 FORWARD; 2520 196 2530 197 PROCEDURE testwrite (a:alfa; i:integer); 2540 198 FORWARD; 2550 199 \f tsconlst 80.10.08. 11.40. page 6 3010 200 PROCEDURE createchn (timeoutper: integer); 3020 201 (* creates lamchannel *) 3030 202 BEGIN 3040 203 1 ! REPEAT 3050 204 2 ! ! crref^.u1:= create_it_ch; 3060 205 3 ! ! crref^.u2:= tsc_port; 3070 206 4 ! ! LOCK crref as crbuf: createchtype DO 3080 207 5 ! ! BEGIN 3090 208 6 ! ! ! crbuf.controlinfo:= ts_control; 3100 209 7 ! ! ! crbuf.timeout:= timeoutper; 3110 210 8 ! ! END; 3120 211 9 ! ! 3130 212 10 ! ! signal (crref, lamsem); 3140 213 11 ! ! wait (crref, lamoutsem); 3150 214 12 ! ! IF crref^.u2 <> 0 3160 215 13 ! ! THEN (* error *) 3170 216 14 ! ! testwrite ("createch u2:", crref^.u2); 3180 217 15 ! ! 3190 218 16 ! UNTIL crref^.u2= 0; 3200 219 17 ! 3210 220 18 END; (* createchn *) 3220 221 \f tsconlst 80.10.08. 11.40. page 7 4010 222 FUNCTION decodeinput (VAR ref: reference): inputtype; 4020 223 (* decodes the inputtype of the buffer pointed to by "ref" *) 4030 224 BEGIN 4040 225 1 ! CASE ref^.u3 OF 4050 226 2 ! ! 4060 227 3 ! ! tim_route: (* buffer from timeout *) 4070 228 4 ! ! decodeinput:= tto; 4080 229 5 ! ! 4090 230 6 ! ! lam_route: (* buffer from lam_driver *) 4100 231 7 ! ! CASE ref^.u2 OF 4110 232 8 ! ! ! 4120 233 9 ! ! ! 0: LOCK ref as lambuf: lambuftype DO 4130 234 10 ! ! ! CASE lambuf.data(0) (*opc*) OF 4140 235 11 ! ! ! ! enqop : decodeinput:= enq; 4150 236 12 ! ! ! ! dataop: decodeinput:= data; 4160 237 13 ! ! ! ! rtrop : decodeinput:= rtr; 4170 238 14 ! ! ! ! rnrop : decodeinput:= rnr; 4180 239 15 ! ! ! ! ackop : decodeinput:= ack; 4190 240 16 ! ! ! ! nakop : decodeinput:= nak; 4200 241 17 ! ! ! ! OTHERWISE decodeinput:= nons 4210 242 18 ! ! ! END (* case lambuf.opc *); 4220 243 19 ! ! ! 4230 244 20 ! ! ! 5: (* input timeout *) 4240 245 21 ! ! ! decodeinput:= lto; 4250 246 22 ! ! ! 4260 247 23 ! ! ! OTHERWISE 4270 248 24 ! ! ! BEGIN 4280 249 25 ! ! ! ! (*error*) 4290 250 26 ! ! ! ! testwrite ("lamresultu2:", ref^.u2); 4300 251 27 ! ! ! ! decodeinput:= nons; 4310 252 28 ! ! ! END 4320 253 29 ! ! END (* case ref^.u2 *); 4330 254 30 ! ! 4340 255 31 ! ! dc_route: (*buffer from dc_module*) 4350 256 32 ! ! BEGIN 4360 257 33 ! ! ! IF ref^.u4= 176 (* 11.0 *) THEN 4370 258 34 ! ! ! 4380 259 35 ! ! ! LOCK ref as addr: addresstype DO 4390 260 36 ! ! ! WITH addr DO 4400 261 37 ! ! ! IF address(1)= address(3) THEN 4410 262 38 ! ! ! BEGIN (* addr for this dcts *) 4420 263 39 ! ! ! ! owntsmacro:= address(1); 4430 264 40 ! ! ! ! dcts_macro:= address(1); 4440 265 41 ! ! ! ! decodeinput:= here; 4450 266 42 ! ! ! END 4460 267 43 ! ! ! ELSE (* addr to other ts *) \f tsconlst 80.10.08. 11.40. page 8 4470 268 44 ! ! ! decodeinput:= out 4480 269 45 ! ! ! 4490 270 46 ! ! ! ELSE (* u4 <> 11.0 *) 4500 271 47 ! ! ! 4510 272 48 ! ! ! LOCK ref as mess: messagetype DO 4520 273 49 ! ! ! BEGIN 4530 274 50 ! ! ! ! IF (mess.allabel.rec.macro=owntsmacro) 4540 275 51 ! ! ! ! THEN decodeinput:= here (*to own tss*) 4550 276 52 ! ! ! ! ELSE 4560 277 53 ! ! ! ! BEGIN 4570 278 54 ! ! ! ! ! decodeinput:= out; 4580 279 55 ! ! ! ! ! ref^.u4:= mess.allabel.op_code; 4590 280 56 ! ! ! ! END; 4600 281 57 ! ! ! END 4610 282 58 ! ! END; 4620 283 59 ! ! 4630 284 60 ! ! OTHERWISE (* buffer from tssupervisor*) 4640 285 61 ! ! IF owntsmacro <> dcts_macro 4650 286 62 ! ! THEN decodeinput:= out 4660 287 63 ! ! ELSE 4670 288 64 ! ! LOCK ref as mess: messagetype DO 4680 289 65 ! ! IF (mess.allabel.rec.macro.nc_addr= 0) 4690 290 66 ! ! OR (mess.allabel.rec.macro=owntsmacro) 4700 291 67 ! ! THEN decodeinput:= here (*to own dc_module*) 4710 292 68 ! ! ELSE decodeinput:= out; 4720 293 69 ! ! 4730 294 70 ! END (* case ref^.u3 *) 4740 295 71 END; 4750 296 \f tsconlst 80.10.08. 11.40. page 9 5010 297 PROCEDURE getcommand; 5020 298 (* gets the next commandbuffer. Listen buffers arriving in the 5030 299 meantime are sent to listensem *) 5040 300 (* equivalent to getlisten *) 5050 301 BEGIN 5060 302 1 ! 5070 303 2 ! 5080 304 3 ! WHILE NOT open (commandsem) DO 5090 305 4 ! getinputbuf; 5100 306 5 ! wait (commandref, commandsem) 5110 307 6 END; 5120 308 5130 309 \f tsconlst 80.10.08. 11.40. page 10 6010 310 FUNCTION getinput: inputtype; 6020 311 (* gets the next buffer to handle. The buffer is taken from either 6030 312 commandsem or outsem depending on the state and the semaphores *) 6040 313 VAR statuserror: boolean; 6050 314 6060 315 BEGIN 6070 316 1 ! 6080 317 2 ! 6090 318 3 ! REPEAT 6100 319 4 ! ! statuserror:= false; 6110 320 5 ! ! 6120 321 6 ! ! IF (state= idle) AND open (outsem) THEN 6130 322 7 ! ! BEGIN 6140 323 8 ! ! ! wait (commandref, outsem); 6150 324 9 ! ! ! getinput:= out 6160 325 10 ! ! END 6170 326 11 ! ! ELSE 6180 327 12 ! ! BEGIN 6190 328 13 ! ! ! getcommand; 6200 329 14 ! ! ! getinput:= decodeinput (commandref) 6210 330 15 ! ! END; 6220 331 16 ! ! 6230 332 17 ! ! IF commandref^.u3= lam_route THEN 6240 333 18 ! ! BEGIN (* listenbuffer from lam_driver *) 6250 334 19 ! ! ! 6260 335 20 ! ! ! IF (checklamlisten>0) THEN 6270 336 21 ! ! ! (* lamchannel recreated caused by outputbuffer or listenbuffer - 6280 337 22 ! ! ! listenbuffers are to be checked while outputbuffer has been 6290 338 23 ! ! ! checked already *) 6300 339 24 ! ! ! BEGIN 6310 340 25 ! ! ! ! checklamlisten:= checklamlisten-1; 6320 341 26 ! ! ! ! IF (commandref^.u2=1) OR (commandref^.u2=3) THEN 6330 342 27 ! ! ! ! BEGIN (* listenbuffer returned by createchannel *) 6340 343 28 ! ! ! ! ! statuserror:= true; 6350 344 29 ! ! ! ! ! commandref^.u2:= tsc_port; 6360 345 30 ! ! ! ! ! signal (commandref, lamsem); 6370 346 31 ! ! ! ! END 6380 347 32 ! ! ! END (* checklamlisten *) 6390 348 33 ! ! ! 6400 349 34 ! ! ! ELSE 6410 350 35 ! ! ! IF NOT (commandref^.u2 IN (.0,5.)) THEN 6420 351 36 ! ! ! (* status error in lamlistenbuffer *) 6430 352 37 ! ! ! BEGIN 6440 353 38 ! ! ! ! 6450 354 39 ! ! ! ! testwrite("lam status: ",commandref^.u2); 6460 355 40 ! ! ! ! \f tsconlst 80.10.08. 11.40. page 11 6470 356 41 ! ! ! ! statuserror:= true; 6480 357 42 ! ! ! ! IF (commandref^.u2=1) OR (commandref^.u2=3) THEN 6490 358 43 ! ! ! ! (* lamchannel recreated caused by listenbuffer - 6500 359 44 ! ! ! ! outputbuffer and other listenbuffers are to be checked *) 6510 360 45 ! ! ! ! BEGIN 6520 361 46 ! ! ! ! ! wait (lamref, lamoutsem); 6530 362 47 ! ! ! ! ! IF (lamref^.u2=1) OR (lamref^.u2=3) 6540 363 48 ! ! ! ! ! THEN (* outputbuffer returned *) 6550 364 49 ! ! ! ! ! BEGIN 6560 365 50 ! ! ! ! ! ! lamref^.u2:= tsc_port; 6570 366 51 ! ! ! ! ! ! signal (lamref, lamsem) 6580 367 52 ! ! ! ! ! END 6590 368 53 ! ! ! ! ! ELSE return (lamref); 6600 369 54 ! ! ! ! ! checklamlisten:= no_of_lamlis-1; 6610 370 55 ! ! ! ! END; 6620 371 56 ! ! ! ! 6630 372 57 ! ! ! ! (* try again: *) 6640 373 58 ! ! ! ! commandref^.u2:= tsc_port; 6650 374 59 ! ! ! ! signal (commandref, lamsem) 6660 375 60 ! ! ! END (* status error in lamlistenbuffer *) 6670 376 61 ! ! ! 6680 377 62 ! ! END (* listenbuffer from lamdriver *) 6690 378 63 ! ! 6700 379 64 ! UNTIL NOT statuserror; 6710 380 65 ! 6720 381 66 END (* getinput *); 6730 382 \f tsconlst 80.10.08. 11.40. page 12 9010 383 PROCEDURE getinputbuf; 9020 384 (* gets a buffer from the inputsem and sends it to either 9030 385 commandsem or listensem *) 9040 386 VAR inputref: reference; 9050 387 BEGIN 9060 388 1 ! 9070 389 2 ! 9080 390 3 ! wait (inputref, inputsem); 9090 391 4 ! IF (inputref^.u3= netc_route1) AND 9100 392 5 ! (inputref^.u4= 197 (*listenbuffer*)) 9110 393 6 ! THEN signal (inputref, listensem) 9120 394 7 ! ELSE signal (inputref, commandsem) 9130 395 8 END; 9140 396 \f tsconlst 80.10.08. 11.40. page 13 10010 397 PROCEDURE getlisten; 10020 398 (* waits until a listenbuffer arrives. Other buffertypes arriving 10030 399 in the meantime are sent to the commandsem *) 10040 400 BEGIN 10050 401 1 ! WHILE NOT open (listensem) DO 10060 402 2 ! getinputbuf; 10070 403 3 ! wait (listenref, listensem) 10080 404 4 END; 10090 405 \f tsconlst 80.10.08. 11.40. page 14 11010 406 PROCEDURE sendop (opcode: byte); 11020 407 (* gets and fills in lamoutputbuffer, sends it to lamdriver *) 11030 408 11040 409 BEGIN 11050 410 1 ! 11060 411 2 ! 11070 412 3 ! wait (lamref, lamoutsem); 11080 413 4 ! 11090 414 5 ! WHILE lamref^.u2> 0 (* status error *) DO 11100 415 6 ! BEGIN 11110 416 7 ! ! CASE lamref^.u2 OF 11120 417 8 ! ! ! 1,3: (* channel recreated by driver *) 11130 418 9 ! ! ! BEGIN 11140 419 10 ! ! ! ! testwrite ("lamch create", lamref^.u2); 11150 420 11 ! ! ! ! checklamlisten:= no_of_lamlis; 11160 421 12 ! ! ! ! (* listenbuffers might have been returned upon recreation *) 11170 422 13 ! ! ! END; 11180 423 14 ! ! ! 11190 424 15 ! ! ! 4,5: testwrite ("lamresult: ",lamref^.u2) 11200 425 16 ! ! ! 11210 426 17 ! ! ! OTHERWISE 11220 427 18 ! ! ! BEGIN 11230 428 19 ! ! ! ! outputtec:= outputtec + 1; 11240 429 20 ! ! ! ! IF outputtec MOD 10 = 0 THEN 11250 430 21 ! ! ! ! testwrite ("lamerrorout:", outputtec); 11260 431 22 ! ! ! ! IF outputtec>10000 THEN outputtec:= 0; 11270 432 23 ! ! ! END; 11280 433 24 ! ! END (* case lamref^.u2 *); 11290 434 25 ! ! 11300 435 26 ! ! (* try last output again: *) 11310 436 27 ! ! lamref^.u2:= tsc_port; 11320 437 28 ! ! signal (lamref, lamsem); 11330 438 29 ! ! wait (lamref, lamoutsem) 11340 439 30 ! END (* while status error *); 11350 440 31 ! 11360 441 32 ! (* now construct lambuffer *) 11370 442 33 ! IF opcode= dataop 11380 443 34 ! THEN 11390 444 35 ! (* copy commandbuffer onto lambuffer *) 11400 445 36 ! LOCK lamref as lambuf: lambuftype DO 11410 446 37 ! 11420 447 38 ! IF (dataref^.u4=0) AND (dataref^.u3<>dc_route) THEN 11430 448 39 ! (* logmessage to dc *) 11440 449 40 ! LOCK dataref as mess: logtype DO 11450 450 41 ! WITH lambuf DO 11460 451 42 ! BEGIN \f tsconlst 80.10.08. 11.40. page 15 11470 452 43 ! ! IF (mess.bll<=0) OR (mess.bll>logsize-2) THEN 11480 453 44 ! ! BEGIN 11490 454 45 ! ! ! testout(z,"no_of_bytes:",mess.bll); 11500 455 46 ! ! ! testout(z,"u1: ",dataref^.u1); 11510 456 47 ! ! ! testout(z,"u2: ",dataref^.u2); 11520 457 48 ! ! ! testout(z,"u3: ",dataref^.u3); 11530 458 49 ! ! ! testout(z,"u4: ",dataref^.u4); 11540 459 50 ! ! ! FOR i:= 1 TO 10 DO 11550 460 51 ! ! ! testout(z," ",data(i)); 11560 461 52 ! ! END; 11570 462 53 ! ! 11580 463 54 ! ! IF (mess.bll<0) OR (mess.bll>(logsize-2)) 11590 464 55 ! ! THEN bll:= logsize 11600 465 56 ! ! ELSE bll:= mess.bll+2; 11610 466 57 ! ! data(0) (*opc*) := dataop; 11620 467 58 ! ! FOR i:= 1 TO (bll-2) DO 11630 468 59 ! ! data(i):= mess.data(i); 11640 469 60 ! ! data(9):= dataref^.u4; (* op_code *) 11650 470 61 ! ! data(bll-1):= ord(etx); 11660 471 62 ! END (* logmessage to dc *) 11670 472 63 ! 11680 473 64 ! ELSE (* message to dc *) 11690 474 65 ! LOCK dataref as mess: tsbuftype DO 11700 475 66 ! WITH lambuf DO 11710 476 67 ! BEGIN 11720 477 68 ! ! IF (mess.bll<=0) OR (mess.bll>(tsbufsize-2)) THEN 11730 478 69 ! ! BEGIN 11740 479 70 ! ! ! testout(z,"no_of_bytes:",mess.bll); 11750 480 71 ! ! ! testout(z,"u3: ",dataref^.u3); 11760 481 72 ! ! ! FOR i:= 1 TO 10 DO 11770 482 73 ! ! ! testout(z," ",data(i)); 11780 483 74 ! ! END; 11790 484 75 ! ! 11800 485 76 ! ! IF (mess.bll<0) OR (mess.bll>(tsbufsize-2)) 11810 486 77 ! ! THEN bll:= tsbufsize 11820 487 78 ! ! ELSE bll:= mess.bll+2; 11830 488 79 ! ! data(0) (*opc*):= dataop; 11840 489 80 ! ! FOR i:= 1 TO (bll-2) DO 11850 490 81 ! ! data(i):= mess.data(i); 11860 491 82 ! ! data(9):= dataref^.u4; (* op_code *) 11870 492 83 ! ! data(bll-1):= ord(etx); 11880 493 84 ! END (* opcode=dataop *) 11890 494 85 ! 11900 495 86 ! ELSE 11910 496 87 ! LOCK lamref as lambuf: lambuftype DO 11920 497 88 ! WITH lambuf DO \f tsconlst 80.10.08. 11.40. page 16 11930 498 89 ! BEGIN 11940 499 90 ! ! bll:= 2; 11950 500 91 ! ! data(0):= opcode; 11960 501 92 ! ! data(1):= ord (etx); 11970 502 93 ! END; 11980 503 94 ! 11990 504 95 ! (* now send lambuffer *) 12000 505 96 ! lamref^.u2:= tsc_port; 12010 506 97 ! signal (lamref, lamsem); 12020 507 98 ! 12030 508 99 ! IF NOT NIL (commandref) THEN 12040 509 100 ! CASE commandref^.u3 OF 12050 510 101 ! ! tim_route: ; 12060 511 102 ! ! lam_route: 12070 512 103 ! ! BEGIN 12080 513 104 ! ! ! commandref^.u2:= tsc_port; 12090 514 105 ! ! ! signal (commandref, lamsem); 12100 515 106 ! ! END; 12110 516 107 ! ! dc_route: 12120 517 108 ! ! BEGIN 12130 518 109 ! ! ! commandref^.u4:=0; 12140 519 110 ! ! ! signal (commandref, dcsem); 12150 520 111 ! ! END; 12160 521 112 ! ! OTHERWISE return (commandref); 12170 522 113 ! END; 12180 523 114 END; 12190 524 \f tsconlst 80.10.08. 11.40. page 17 13010 525 PROCEDURE sendtotss; 13020 526 (* copies listenbuffer from lamdriver onto listenbuffer from tss 13030 527 and returns tss listenbuffer *) 13040 528 13050 529 BEGIN 13060 530 1 ! getlisten; 13070 531 2 ! 13080 532 3 ! (* copy lambuffer onto listenbuffer from tss *) 13090 533 4 ! LOCK listenref as mess: tsbuftype DO 13100 534 5 ! LOCK commandref as lambuf: lambuftype DO 13110 535 6 ! WITH lambuf DO 13120 536 7 ! BEGIN 13130 537 8 ! ! mess.bll:= bll - 2; 13140 538 9 ! ! IF mess.bll>tsbufsize-2 13150 539 10 ! ! THEN mess.bll:= tsbufsize-2; 13160 540 11 ! ! IF mess.bll< 0 13170 541 12 ! ! THEN mess.bll:= 0; 13180 542 13 ! ! FOR i:= 1 TO mess.bll DO 13190 543 14 ! ! mess.data(i):= data(i); 13200 544 15 ! ! listenref^.u2:= 1; 13210 545 16 ! ! listenref^.u4:= data(9) (* op_code*); 13220 546 17 ! END; 13230 547 18 ! 13240 548 19 ! IF listenref^.u4= 176 (* 11.0 *) THEN 13250 549 20 ! BEGIN 13260 550 21 ! ! (* initialise ts macroaddresses *) 13270 551 22 ! ! LOCK listenref as addr: addresstype DO 13280 552 23 ! ! WITH addr DO 13290 553 24 ! ! BEGIN 13300 554 25 ! ! ! owntsmacro:= address(1); 13310 555 26 ! ! ! dcts_macro:= address(3); 13320 556 27 ! ! ! allabel.rec:= alarmnetaddr (macroaddr (0,0,0), 0); 13330 557 28 ! ! ! (* zero_address demanded from tss *) 13340 558 29 ! ! END; 13350 559 30 ! ! 13360 560 31 ! ! (* change lamtimeout period *) 13370 561 32 ! ! wait (lamref, lamoutsem); 13380 562 33 ! ! createchn (con_lam_time+1); 13390 563 34 ! ! signal (lamref,lamoutsem); 13400 564 35 ! ! checklamlisten:= no_of_lamlis; 13410 565 36 ! ! 13420 566 37 ! END; 13430 567 38 ! 13440 568 39 ! signal (listenref, tsssem); 13450 569 40 ! commandref^.u2:= tsc_port; 13460 570 41 ! signal (commandref, lamsem) (* listenbuffer to lam *) \f tsconlst 80.10.08. 11.40. page 18 13470 571 42 END; 13480 572 \f tsconlst 80.10.08. 11.40. page 19 14010 573 PROCEDURE sendtodc; 14020 574 (* copies listenbuffer from lamdriver onto dcoutputbuffer 14030 575 and signals it to dc *) 14040 576 14050 577 BEGIN 14060 578 1 ! wait (dcref, dcoutsem); 14070 579 2 ! 14080 580 3 ! (* copy lambuffer onto dcoutputbuffer *) 14090 581 4 ! LOCK commandref as lambuf: lambuftype DO 14100 582 5 ! 14110 583 6 ! IF lambuf.data(9)= 0 (* log-message *) 14120 584 7 ! THEN 14130 585 8 ! LOCK dcref as mess: logtype DO 14140 586 9 ! WITH lambuf DO 14150 587 10 ! BEGIN 14160 588 11 ! ! mess.bll:= bll-2; 14170 589 12 ! ! IF mess.bll>logsize-2 14180 590 13 ! ! THEN mess.bll:= logsize-2; 14190 591 14 ! ! IF mess.bll<0 14200 592 15 ! ! THEN mess.bll:= 0; 14210 593 16 ! ! FOR i:= 1 TO mess.bll DO 14220 594 17 ! ! mess.data(i):= data(i); 14230 595 18 ! ! dcref^.u2:= 1; 14240 596 19 ! ! dcref^.u4:= data(9) (* op_code *); 14250 597 20 ! END 14260 598 21 ! ELSE 14270 599 22 ! LOCK dcref as mess: tsbuftype DO 14280 600 23 ! WITH lambuf DO 14290 601 24 ! BEGIN 14300 602 25 ! ! mess.bll:= bll - 2; 14310 603 26 ! ! IF mess.bll>tsbufsize-2 14320 604 27 ! ! THEN mess.bll:= tsbufsize-2; 14330 605 28 ! ! IF mess.bll<0 14340 606 29 ! ! THEN mess.bll:= 0; 14350 607 30 ! ! FOR i:= 1 TO mess.bll DO 14360 608 31 ! ! mess.data(i):= data(i); 14370 609 32 ! ! dcref^.u2:= 1; 14380 610 33 ! ! dcref^.u4:= data(9) (*op_code*); 14390 611 34 ! END; 14400 612 35 ! 14410 613 36 ! signal (dcref, dcsem); 14420 614 37 ! commandref^.u2:= tsc_port; 14430 615 38 ! signal (commandref, lamsem) (*listenbuffer to lam*) 14440 616 39 END; 14450 617 \f tsconlst 80.10.08. 11.40. page 20 15010 618 PROCEDURE testwrite (a:alfa; i:integer); 15020 619 BEGIN 15030 620 1 ! IF testboo THEN 15040 621 2 ! testout (z,a,i) 15050 622 3 END (* testwrite *); 15060 623 \f tsconlst 80.10.08. 11.40. page 21 16010 624 PROCEDURE to_tss_or_dc; 16020 625 BEGIN 16030 626 1 ! IF commandref^.u4= 176 (* 11.0 *) 16040 627 2 ! THEN (* initialise macroaddresses *) 16050 628 3 ! sendtotss 16060 629 4 ! ELSE 16070 630 5 ! 16080 631 6 ! IF owntsmacro<> dcts_macro 16090 632 7 ! THEN sendtotss 16100 633 8 ! ELSE 16110 634 9 ! BEGIN 16120 635 10 ! ! LOCK commandref as lambuf: lambuftype DO 16130 636 11 ! ! WITH lambuf DO 16140 637 12 ! ! IF (data(1) = (dcts_macro.dc_addr * 16)) 16150 638 13 ! ! AND (data(2) = 0) 16160 639 14 ! ! (* i.e. if receiver = dc_module *) 16170 640 15 ! ! THEN todc:= true 16180 641 16 ! ! ELSE todc:= false; 16190 642 17 ! ! IF todc 16200 643 18 ! ! THEN sendtodc 16210 644 19 ! ! ELSE sendtotss 16220 645 20 ! END; 16230 646 21 END; 16240 647 \f tsconlst 80.10.08. 11.40. page 22 17010 648 PROCEDURE sendlocal; 17020 649 BEGIN 17030 650 1 ! 17040 651 2 ! IF (commandref^.u4=0) AND (commandref^.u3<>dc_route) 17050 652 3 ! (* log-message to dc *) 17060 653 4 ! THEN 17070 654 5 ! LOCK commandref as mess: logtype DO 17080 655 6 ! BEGIN 17090 656 7 ! ! wait (dcref, dcoutsem); 17100 657 8 ! ! LOCK dcref as dcmess: logtype DO 17110 658 9 ! ! dcmess:= mess; 17120 659 10 ! ! dcref^.u2:= 1; 17130 660 11 ! ! dcref^.u4:= commandref^.u4; 17140 661 12 ! ! signal (dcref, dcsem); 17150 662 13 ! END 17160 663 14 ! 17170 664 15 ! ELSE 17180 665 16 ! 17190 666 17 ! LOCK commandref as mess: messagetype DO 17200 667 18 ! IF mess.allabel.rec.macro.nc_addr = 0 17210 668 19 ! THEN (* send buffer to dc *) 17220 669 20 ! BEGIN 17230 670 21 ! ! wait (dcref, dcoutsem); 17240 671 22 ! ! LOCK dcref as dcmess: messagetype DO 17250 672 23 ! ! dcmess:= mess; 17260 673 24 ! ! dcref^.u2:= 1; 17270 674 25 ! ! dcref^.u4:= commandref^.u4; 17280 675 26 ! ! signal (dcref, dcsem); 17290 676 27 ! END 17300 677 28 ! 17310 678 29 ! ELSE 17320 679 30 ! BEGIN (*send buffer to tss*) 17330 680 31 ! ! IF NIL (listenref) THEN getlisten; 17340 681 32 ! ! LOCK listenref as tsmess: messagetype DO 17350 682 33 ! ! tsmess:= mess; 17360 683 34 ! ! 17370 684 35 ! ! IF commandref^.u4= 176 (* 11.0 *) 17380 685 36 ! ! THEN (* receiver:= 0 *) 17390 686 37 ! ! LOCK listenref as addr: addresstype DO 17400 687 38 ! ! addr.allabel.rec:= alarmnetaddr (macroaddr (0,0,0), 0); 17410 688 39 ! ! 17420 689 40 ! ! listenref^.u2:= 1; 17430 690 41 ! ! listenref^.u4:= mess.allabel.op_code; 17440 691 42 ! ! signal (listenref, tsssem); 17450 692 43 ! END; 17460 693 44 ! \f tsconlst 80.10.08. 11.40. page 23 17470 694 45 ! IF commandref^.u3=dc_route 17480 695 46 ! THEN (* listenbuffer to dc *) 17490 696 47 ! BEGIN 17500 697 48 ! ! commandref^.u4:= 0; 17510 698 49 ! ! signal (commandref, dcsem) 17520 699 50 ! END 17530 700 51 ! ELSE (* buffer from tss *) 17540 701 52 ! return (commandref); 17550 702 53 END (*sendlocal*); 17560 703 \f tsconlst 80.10.08. 11.40. page 24 18010 704 (**************************** 18020 705 * * 18030 706 * main program * 18040 707 * * 18050 708 ****************************) 18060 709 18070 710 18080 711 BEGIN 18090 712 1 ! testboo:= false; 18100 713 2 ! state:= idle; 18110 714 3 ! tec:= 0; 18120 715 4 ! outputtec:= 0; 18130 716 5 ! testopen (z, ownname, semvector(operatorsem)); 18140 717 6 ! testout(z,version,al_env_version); 18150 718 7 ! 18160 719 8 ! 18170 720 9 ! (* create channel *) 18180 721 10 ! alloc (crref, lampool, lamoutsem); 18190 722 11 ! createchn (con_lam_time); 18200 723 12 ! 18210 724 13 ! checklamlisten:= 0; 18220 725 14 ! 18230 726 15 ! (* initialise lamlistenbuffers *) 18240 727 16 ! FOR i:= 1 TO no_of_lamlis DO 18250 728 17 ! BEGIN 18260 729 18 ! ! alloc (lamref, lampool, inputsem); 18270 730 19 ! ! lamref^.u1:= read_it; (* input *) 18280 731 20 ! ! lamref^.u2:= tsc_port; 18290 732 21 ! ! lamref^.u3:= lam_route; 18300 733 22 ! ! signal (lamref, lamsem); 18310 734 23 ! END; 18320 735 24 ! 18330 736 25 ! (* initialise lamoutputbuffer *) 18340 737 26 ! alloc (lamref, lampool, lamoutsem); 18350 738 27 ! lamref^.u1:= write_it; (* output *) 18360 739 28 ! lamref^.u2:= 0; 18370 740 29 ! lamref^.u3:= lam_route; 18380 741 30 ! LOCK lamref as lambuf: lambuftype DO 18390 742 31 ! lambuf.stxt:= ord(stx); 18400 743 32 ! return (lamref); 18410 744 33 ! 18420 745 34 ! (* initialise timeout *) 18430 746 35 ! alloc (tim, timerpool, inputsem); 18440 747 36 ! alloc (msg, updatepool, timeoutanswer); 18450 748 37 ! msg^.u3:= tim_route; 18460 749 38 ! timerbook (msg, tim, -1, netc_mic_addr, timeoutsem, timeoutanswer); \f tsconlst 80.10.08. 11.40. page 25 18470 750 39 ! 18480 751 40 ! FOR i:= 1 TO no_of_dcbuf DO 18490 752 41 ! BEGIN 18500 753 42 ! ! (* initialise dclistenbuffer *) 18510 754 43 ! ! alloc (dcref, dcpool, inputsem); 18520 755 44 ! ! dcref^.u1:= 1 (* read from dc *); 18530 756 45 ! ! dcref^.u3:= dc_route; 18540 757 46 ! ! dcref^.u4:= 0; 18550 758 47 ! ! LOCK dcref as mess: messagetype DO 18560 759 48 ! ! mess.allabel.no_of_by:= 0; 18570 760 49 ! ! signal (dcref, dcsem); 18580 761 50 ! ! 18590 762 51 ! ! (* initialise dcoutputbuffer *) 18600 763 52 ! ! alloc (dcref, dcpool, dcoutsem); 18610 764 53 ! ! dcref^.u1:= 2 (* write *); 18620 765 54 ! ! dcref^.u3:= dc_route; 18630 766 55 ! ! return (dcref); 18640 767 56 ! END; 18650 768 57 ! 18660 769 58 ! 18670 770 59 ! 18680 771 60 ! 18690 772 61 ! (*--------------------- main loop -----------------------------------*) 18700 773 62 ! 18710 774 63 ! 18720 775 64 ! REPEAT 18730 776 65 ! ! 18740 777 66 ! ! (*////////////////////////////////////////////////////////// 18750 778 67 ! ! case state of 18760 779 68 ! ! idle: testwrite("idle ",1); 18770 780 69 ! ! wd: testwrite("wd ",1); 18780 781 70 ! ! wrtr: testwrite("wrtr ",1); 18790 782 71 ! ! wt: testwrite("wt ",1); 18800 783 72 ! ! wack: testwrite("wack ",1) 18810 784 73 ! ! end; 18820 785 74 ! ! //////////////////////////////////////////////////////////*) 18830 786 75 ! ! 18840 787 76 ! ! input:= getinput; 18850 788 77 ! ! 18860 789 78 ! ! CASE input OF 18870 790 79 ! ! ! enq : testwrite("enq ",state); 18880 791 80 ! ! ! data: testwrite("data ",state); 18890 792 81 ! ! ! out : testwrite("out ",state); 18900 793 82 ! ! ! here: testwrite("here ",state); 18910 794 83 ! ! ! rnr : testwrite("rnr ",state); 18920 795 84 ! ! ! nak : testwrite("nak ",state); \f tsconlst 80.10.08. 11.40. page 26 18930 796 85 ! ! ! ack : testwrite("ack ",state); 18940 797 86 ! ! ! rtr : testwrite("rtr ",state); 18950 798 87 ! ! ! lto : testwrite("lto ",state); 18960 799 88 ! ! ! tto : testwrite("tto ",state); 18970 800 89 ! ! ! nons: testwrite("nons ",state) 18980 801 90 ! ! END; 18990 802 91 ! ! 19000 803 92 ! ! action:= actiontable(state, input); 19010 804 93 ! ! 19020 805 94 ! ! CASE action OF 19030 806 95 ! ! ! 19040 807 96 ! ! ! 0: (*no action *) 19050 808 97 ! ! ! BEGIN 19060 809 98 ! ! ! ! commandref^.u2:= tsc_port; 19070 810 99 ! ! ! ! signal (commandref, lamsem); 19080 811 100 ! ! ! END; 19090 812 101 ! ! ! 19100 813 102 ! ! ! 1: (*send rtr*) 19110 814 103 ! ! ! BEGIN 19120 815 104 ! ! ! ! sendop (rtrop); 19130 816 105 ! ! ! END; 19140 817 106 ! ! ! 19150 818 107 ! ! ! 2: (*send enq*) 19160 819 108 ! ! ! BEGIN 19170 820 109 ! ! ! ! dataref:=: commandref; 19180 821 110 ! ! ! ! sendop (enqop); 19190 822 111 ! ! ! END; 19200 823 112 ! ! ! 19210 824 113 ! ! ! 3: (*send ack to lam and data to tss or dc*) 19220 825 114 ! ! ! BEGIN 19230 826 115 ! ! ! ! to_tss_or_dc; 19240 827 116 ! ! ! ! sendop (ackop); 19250 828 117 ! ! ! END; 19260 829 118 ! ! ! 19270 830 119 ! ! ! 4: (*output to outsem*) 19280 831 120 ! ! ! signal (commandref, outsem); 19290 832 121 ! ! ! 19300 833 122 ! ! ! 5: (*send update to timer*) 19310 834 123 ! ! ! BEGIN 19320 835 124 ! ! ! ! IF owntsmacro= dcts_macro 19330 836 125 ! ! ! ! THEN timerupdate (msg, tick1, timeoutsem, timeoutanswer) 19340 837 126 ! ! ! ! ELSE timerupdate (msg, tick2, timeoutsem, timeoutanswer); 19350 838 127 ! ! ! ! commandref^.u2:= tsc_port; 19360 839 128 ! ! ! ! signal (commandref, lamsem); 19370 840 129 ! ! ! END; 19380 841 130 ! ! ! \f tsconlst 80.10.08. 11.40. page 27 19390 842 131 ! ! ! 6: (*send data*) 19400 843 132 ! ! ! BEGIN 19410 844 133 ! ! ! ! sendop (dataop); 19420 845 134 ! ! ! END; 19430 846 135 ! ! ! 19440 847 136 ! ! ! 7: (*send rnr and update timer*) 19450 848 137 ! ! ! BEGIN 19460 849 138 ! ! ! ! sendop (rnrop); 19470 850 139 ! ! ! ! IF owntsmacro= dcts_macro 19480 851 140 ! ! ! ! THEN timerupdate (msg, tick1, timeoutsem, timeoutanswer) 19490 852 141 ! ! ! ! ELSE timerupdate (msg, tick2, timeoutsem, timeoutanswer) 19500 853 142 ! ! ! END; 19510 854 143 ! ! ! 19520 855 144 ! ! ! 8: (*no action*) 19530 856 145 ! ! ! BEGIN 19540 857 146 ! ! ! ! commandref^.u2:= tsc_port; 19550 858 147 ! ! ! ! signal (commandref, lamsem); 19560 859 148 ! ! ! ! 19570 860 149 ! ! ! ! IF dataref^.u3= dc_route 19580 861 150 ! ! ! ! THEN (* listenbuffer from dc_module *) 19590 862 151 ! ! ! ! BEGIN 19600 863 152 ! ! ! ! ! dataref^.u4:= 0; 19610 864 153 ! ! ! ! ! signal (dataref, dcsem) 19620 865 154 ! ! ! ! END 19630 866 155 ! ! ! ! ELSE (* outputbuffer from tss *) 19640 867 156 ! ! ! ! return (dataref); 19650 868 157 ! ! ! END; 19660 869 158 ! ! ! 19670 870 159 ! ! ! 9: (*send nak*) 19680 871 160 ! ! ! BEGIN 19690 872 161 ! ! ! ! tec:= tec + 1; 19700 873 162 ! ! ! ! sendop (nakop); 19710 874 163 ! ! ! END; 19720 875 164 ! ! ! 19730 876 165 ! ! ! 10: (*send ack*) 19740 877 166 ! ! ! BEGIN 19750 878 167 ! ! ! ! tec:= tec + 1; 19760 879 168 ! ! ! ! sendop (ackop); 19770 880 169 ! ! ! END; 19780 881 170 ! ! ! 19790 882 171 ! ! ! 11: (*transmission error*) 19800 883 172 ! ! ! BEGIN 19810 884 173 ! ! ! ! tec:= tec + 1; 19820 885 174 ! ! ! ! commandref^.u2:= tsc_port; 19830 886 175 ! ! ! ! signal (commandref, lamsem); 19840 887 176 ! ! ! END; \f tsconlst 80.10.08. 11.40. page 28 19850 888 177 ! ! ! 19860 889 178 ! ! ! 12: (* transm. error - send enq *) 19870 890 179 ! ! ! BEGIN 19880 891 180 ! ! ! ! tec:= tec + 1; 19890 892 181 ! ! ! ! sendop (enqop); 19900 893 182 ! ! ! END; 19910 894 183 ! ! ! 19920 895 184 ! ! ! 13: (*transm. error - send data*) 19930 896 185 ! ! ! BEGIN 19940 897 186 ! ! ! ! tec:= tec + 1; 19950 898 187 ! ! ! ! sendop (dataop); 19960 899 188 ! ! ! END; 19970 900 189 ! ! ! 19980 901 190 ! ! ! 14: (*send data to local module*) 19990 902 191 ! ! ! sendlocal; 20000 903 192 ! ! ! 20010 904 193 ! ! ! 15: 20020 905 194 ! ! ! BEGIN 20030 906 195 ! ! ! ! tim:=: commandref; 20040 907 196 ! ! ! ! timerbook (msg, tim, -1, netc_mic_addr, timeoutsem, timeoutanswer); 20050 908 197 ! ! ! END; 20060 909 198 ! ! ! 20070 910 199 ! ! ! 16: (*timerbook and send enq*) 20080 911 200 ! ! ! BEGIN 20090 912 201 ! ! ! ! tim:=: commandref; 20100 913 202 ! ! ! ! timerbook (msg, tim, -1, netc_mic_addr, timeoutsem, timeoutanswer); 20110 914 203 ! ! ! ! sendop (enqop); 20120 915 204 ! ! ! END; 20130 916 205 ! ! ! 20140 917 206 ! ! END (* case *); 20150 918 207 ! ! 20160 919 208 ! ! state:= statetable (state, input); 20170 920 209 ! ! 20180 921 210 ! ! IF outputtec>=10000 THEN outputtec:= 0; 20190 922 211 ! ! IF tec>= 100 THEN 20200 923 212 ! ! BEGIN 20210 924 213 ! ! ! testwrite ("transm error",tec); 20220 925 214 ! ! ! tec:= 0; 20230 926 215 ! ! END; 20240 927 216 ! ! 20250 928 217 ! UNTIL false; 20260 929 218 ! 20270 930 219 END. \f tsconlst 80.10.08. 11.40. page 29 0 38* 39* 90* 123* 126* 126* 133* 182* 182* 182* 214 218 233: 234 289 335 350 414 429 431 447 452 463 466 477 485 488 500 518 540 541 556 556 556 556 583 591 592 605 606 638 651 667 687 687 687 687 697 714 715 724 739 757 759 807: 863 921 925 1 59* 66* 71* 77* 83* 101* 123* 124* 126* 129* 134* 145* 146* 261 263 264 340 341 357 362 369 417: 428 459 467 470 481 489 492 501 542 544 554 562 593 595 607 609 637 659 673 689 727 749 751 755 813: 872 878 884 891 897 907 913 2 52* 58* 77* 83* 123* 135* 143* 144* 452 463 465 467 477 485 487 489 499 537 538 539 588 589 590 602 603 604 638 764 818: 3 53* 54* 57* 90* 101* 124* 136* 261 341 357 362 417: 555 824: 4 56* 124* 125* 126* 127* 137* 424: 830: 5 55* 125* 130* 138* 244: 350 424: 833: 6 125* 842: 7 125* 847: 8 127* 855: 9 124* 469 491 545 583 596 610 870: 10 123* 429 459 481 876: 11 123* 123* 123* 123* 123* 124* 124* 124* 124* 124* 126* 126* 126* 126* 126* 882: 12 125* 125* 125* 125* 125* 889: 13 127* 127* 127* 127* 127* 127* 127* 895: 14 123* 124* 125* 126* 127* 901: 15 123* 124* 125* 127* 904: 16 48* 126* 637 910: 32 49* 64 50* 66* 80 51* 100 922 176 257 548 626 684 197 392 10000 431 921 a 197* 618* 621 ack 64* 239 796: ackop 137* 239: 827 879 action 165* 803= 805 actionrow 107* 108* 123* 124* 125* 126* 127* actiontable 120* 803 actiontabletype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 108* 121* addr 259: 260 551: 552 686: 687 address 101* 261 261 263 264 554 555 addresstype 98* 259 551 686 alarmlabel 70* 100* \f tsconlst 80.10.08. 11.40. page 30 alarmnetaddr 556 687 alfa 2* 187* 197* 618* allabel 70* 100* 274 279 289 290 556 667 687 690 759 alloc 721 729 737 746 747 754 763 alloctype 66* 143* 145* al_env_version <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 717 as 206: 233: 259: 272: 288: 445: 449: 474: 496: 533: 534: 551: 581: 585: 599: 635: 654: 657: 666: 671: 681: 686: 741: 758: bll 76* 82* 89* 452 452 454 463 463 464= 465= 465 467 470 477 477 479 485 485 486= 487= 487 489 492 499= 537= 537 538 539= 540 541= 542 588= 588 589 590= 591 592= 593 602= 602 603 604= 605 606= 607 boolean 175* 313* byte 66* 71* 77* 83* 89* 90* 95* 406* checklamlisten <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 166* 335 340= 340 369= 420= 564= 724= commandref 149* 306 323 329 332 341 341 344 345 350 354 357 357 373 374 508 509 513 514 518 519 521 534: 569 570 581: 614 615 626 635: 651 651 654: 660 666: 674 684 694 697 698 701 809 810 820 831 838 839 857 858 885 886 906 912 commandsem 5* 304 306 394 controlinfo 95* 208= con_lam_time 52* 562 722 crbuf 206: 208 209 createchn 200* 562 722 createchtype 93* 206 create_it_ch 204 crref 150* 204 205 206: 212 213 214 216 218 721 data 64* 71* 77* 83* 90* 234 236 460 466= 468= 468 469= 470= 482 488= 490= 490 491= 492= 500= 501= 543= 543 545 583 594= 594 596 608= 608 610 637 638 791: dataop 134* 236: 442 466 488 844 898 dataref 151* 447 447 449: 455 456 457 458 469 474: 480 491 820= 860 863 864 867 dccreatevalue <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 168* dcmess 657: 658= 671: 672= dcoutsem 5* 189* 578 656 670 763 dcpool 143* 754 763 dcref 152* 578 585: 595 596 599: 609 610 613 656 657: 659 660 661 670 671: 673 674 675 754 755 756 757 758: 760 763 764 765 766 dcsem 4* 519 613 661 675 698 760 864 dcshadow 159* dcts_macro 182* 264= 285 555= 631 637 835 850 \f tsconlst 80.10.08. 11.40. page 31 dc_addr 637 dc_module 185* dc_name 187* dc_route 255: 447 516: 651 694 756 765 860 decodeinput 222* 228= 235= 236= 237= 238= 239= 240= 241= 245= 251= 265= 268= 275= 278= 286= 291= 292= 329 enq 64* 235 790: enqop 133* 235: 821 892 914 etx 470 492 501 external 191* false 319 641 712 928 getcommand 297* 328 getinput 310* 324= 329= 787 getinputbuf 194* 305 383* 402 getlisten 397* 530 680 here 64* 265 275 291 793: i 169* 197* 459= 460 467= 468 468 481= 482 489= 490 490 542= 543 543 593= 594 594 607= 608 608 618* 621 727= 751= idle 55* 63* 114* 114* 114* 114* 114* 114* 114* 114* 114* 115* 118* 321 713 input 179* 787= 789 803 919 inputref 386* 390 391 392 393 394 inputsem 4* 390 729 746 754 inputtype 64* 104* 107* 179* 222* 310* integer 76* 82* 107* 171* 197* 200* 618* lambuf 233: 234 445: 450 475 496: 497 534: 535 581: 583 586 600 635: 636 741: 742 lambufsize 51* 90* lambuftype 86* 144* 233 445 496 534 581 635 741 lamoutsem 5* 213 361 412 438 561 563 721 737 lampool 144* 721 729 737 lamref 153* 361 362 362 365 366 368 412 414 416 419 424 436 437 438 445: 496: 505 506 561 563 729 730 731 732 733 737 738 739 740 741: 743 lamsem 4* 212 345 366 374 437 506 514 570 615 733 810 839 858 886 lam_route 230: 332 511: 732 740 listenref 154* 403 533: 544 545 548 551: 568 680 681: 686: 689 690 691 listensem 5* 393 401 403 lock 206: 233: 259: 272: 288: 445: 449: 474: 496: 533: 534: 551: 581: 585: 599: 635: 654: 657: 666: 671: 681: 686: 741: 758: logsize 50* 83* 452 463 464 589 590 logtype 80* 449 585 654 657 lto 64* 245 798: macro 274 289 290 667 macroaddr 101* 182* 182* 556 687 \f tsconlst 80.10.08. 11.40. page 32 mess 272: 274 279 288: 289 290 449: 452 452 454 463 463 465 468 474: 477 477 479 485 485 487 490 533: 537 538 539 540 541 542 543 585: 588 589 590 591 592 593 594 599: 602 603 604 605 606 607 608 654: 658 666: 667 672 682 690 758: 759 messagetype 68* 272 288 666 671 681 758 msg 155* 747 748 749 836 837 851 852 907 913 nak 64* 240 795: nakop 138* 240: 873 nc_addr 289 667 netc_mic_addr <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 749 907 913 netc_route1 391 nons 64* 241 251 800: no_of_by 759= no_of_dcbuf 54* 143* 751 no_of_lamlis 53* 144* 369 420 564 727 opcode 406* 442 500 open 304 321 401 operatorsem 716 op_code 279 690 ord 470 492 501 742 out 64* 268 278 286 292 324 792: outputtec 170* 428= 428 429 430 431 431= 715= 921 921= outsem 5* 321 323 831 ownname 41* 716 owntsmacro 181* 263= 274 285 290 554= 631 835 850 pool 143* 144* 145* 146* process 1* 185* read_it 730 rec 274 289 290 556= 667 687= ref 222* 225 231 233: 250 257 259: 272: 279 288: reference 156* 222* 386* return 368 521 701 743 766 867 rnr 64* 238 794: rnrop 136* 238: 849 rtr 64* 237 797: rtrop 135* 237: 815 semaphore 6* 189* semvector 3* 188* 716 sendlocal 648* 902 sendop 406* 815 821 827 844 849 873 879 892 898 914 sendtodc 573* 643 sendtotss 525* 628 632 644 shadow 159* \f tsconlst 80.10.08. 11.40. page 33 signal 212 345 366 374 393 394 437 506 514 519 563 568 570 613 615 661 675 691 698 733 760 810 831 839 858 864 886 state 178* 321 713= 790 791 792 793 794 795 796 797 798 799 800 803 919= 919 staterow 104* 105* 114* 115* 116* 117* 118* statetable 111* 919 statetabletype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 105* 112* statetype 63* 104* 105* 108* 178* statuserror 313* 319= 343= 356= 379 stx 742 stxt 88* 742= system_vector <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 3* 188* tec 171* 714= 872= 872 878= 878 884= 884 891= 891 897= 897 922 924 925= testboo 174* 620 712= testopen 716 testout 454 455 456 457 458 460 479 480 482 621 717 testwrite 197* 216 250 354 419 424 430 618* 790 791 792 793 794 795 796 797 798 799 800 924 tick1 129* 836 851 tick2 130* 837 852 tim 156* 746 749 906= 907 912= 913 timeout 95* 209= timeoutanswer <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 5* 747 749 836 837 851 852 907 913 timeoutper 200* 209 timeoutsem 4* 749 836 837 851 852 907 913 timerbook 749 907 913 timerpool 146* 746 timers 146* timerupdate 836 837 851 852 tim_route 227: 510: 748 todc 175* 640= 641= 642 to_tss_or_dc 624* 826 true 343 356 640 ts1name 36* 41* ts1port 38* 42* ts2name 37* ts2port 39* tsbufsize 49* 77* 477 485 486 538 539 603 604 tsbuftype 74* 474 533 599 tsconname 2* tsconnector 1* \f tsconlst 80.10.08. 11.40. page 34 tsc_port 42* 205 344 365 373 436 505 513 569 614 731 809 838 857 885 tsdatasize 48* 71* tsmess 681: 682= tsssem 4* 568 691 ts_control 208 tto 64* 228 799: u1 204= 455 730= 738= 755= 764= u2 205= 214 216 218 231 250 341 341 344= 350 354 357 357 362 362 365= 373= 414 416 419 424 436= 456 505= 513= 544= 569= 595= 609= 614= 659= 673= 689= 731= 739= 809= 838= 857= 885= u3 225 332 391 447 457 480 509 651 694 732= 740= 748= 756= 765= 860 u4 257 279= 392 447 458 469 491 518= 545= 548 596= 610= 626 651 660= 660 674= 674 684 690= 697= 757= 863= updatepool 145* 747 version 29* 717 wack 59* 63* 116* 118* 118* 118* 118* 118* 118* 118* 118* 118* 118* wait 213 306 323 361 390 403 412 438 561 578 656 670 wd 56* 114* 115* 115* 115* 115* 115* 115* 115* 115* 115* 115* 117* write_it 738 wrtr 57* 114* 116* 116* 116* 116* 116* 116* 116* 116* 117* wt 58* 116* 116* 117* 117* 117* 117* 117* 117* 117* 117* 117* z 162* 454 455 456 457 458 460 479 480 482 621 716 717 zone 162* \f tsconlst 80.10.08. 11.40. page 35 AND 5 ARRAY 10 BEGIN 66 CASE 7 CONST 4 DO 45 ELSE 24 END 79 FOR 9 FORWARD 2 FUNCTION 2 IF 46 IN 1 MOD 1 NIL 2 NOT 5 OF 21 OR 8 OTHERWISE 5 PACKED 1 PROCEDURE 12 RECORD 6 REPEAT 3 THEN 46 TO 9 TYPE 1 UNTIL 3 VAR 6 WHILE 3 WITH 9 pascal atscon 80.10.08. 11.41. pascal80 version 1980.08.05 summary from pass. 5 : name startline appetite createchn 202 : 18 decodeinput 224 : 18 getcommand 301 : 9 getinput 313 : 18 getinputbuf 386 : 9 getlisten 400 : 9 sendop 409 : 32 sendtotss 529 : 18 sendtodc 577 : 18 testwrite 619 : 17 to_tss_or_dc 625 : 10 sendlocal 649 : 14 tsconnector 143 : 226 code: 1 . 1270 = 9270 bytes end of PASCAL80 compilation end blocksread = 54 ▶EOF◀