DataMuseum.dk

Presents historical artifacts from the history of:

RC3500

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC3500

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦7470cf629⟧ TextFileVerbose

    Length: 102144 (0x18f00)
    Types: TextFileVerbose
    Names: »hjlaplst«

Derivation

└─⟦a41ae585a⟧ Bits:30001842 SW-save af projekt 1000, Alarm-system
    └─⟦72244f0ef⟧ 
        └─⟦this⟧ »hjlaplst« 

TextFileVerbose

\f

hjlaplst    81.05.19.   11.44.                                                    page     1

   10    1           
\f

hjlaplst    81.05.19.   11.44.                                                    page     2

 1010    2        PROCESS lam(
 1020    3          opsem: sempointer;
 1030    4          pu: integer;
 1040    5          level:integer;
 1050    6          VAR mainsem: !ts_pointer
 1060    7          );
 1070    8          
 1080    9            (*********************************************************
 1090   10            *                                                        *
 1100   11            *   lam-driver                                           *
 1110   12            *   programmed by oer                                    *
 1120   13            **********************************************************)
 1130   14          
 1140   15            (*-------------------------------------------------------
 1150   16            . terms
 1160   17            .
 1170   18            . port     refers to a port on the physical lam
 1180   19            . channel  refers to a channel in the lamdriver
 1190   20            .          where there are two channels for each port
 1200   21            .          i e one for output and one for input
 1210   22            .
 1220   23            .--------------------------------------------------------*)
 1230   24          
 1240   25        CONST
 1250   26          
 1260   27          version = "vers  4.01 /";
 1270   28          
 1280   29          max_port_no=15;
 1290   30          max_channel_no= 2*max_port_no+1;
 1300   31          
 1310   32            (*---  values used when creating high level lam-driver ---*)
 1320   33          mask = 0;
 1330   34          store = 200;
 1340   35            (*--- number of lambuffers, one is used as channelmessage ---*)
 1350   36          no_of_lambufs = 32;
 1360   37          
 1370   38          
 1380   39          long_time = 10;
 1390   40          normal_time = 7;
 1400   41          short_time = 4;
 1410   42          no_time = 1;
 1420   43          
 1430   44          forever = false;
 1440   45          
 1450   46          
 1460   47            (*       controlebits to lam *)
\f

hjlaplst    81.05.19.   11.44.                                                    page     3

 1470   48          requesttosend = 7*32;
 1480   49          readytoread = 5*32;
 1490   50          
 1500   51            (*       statuswords from lam *)
 1510   52          write_read_ok = 40;
 1520   53          overrun=41;
 1530   54          parity=44;
 1540   55          overrun_and_parity=45;
 1550   56          readytosend = 24;
 1560   57          
 1570   58            (* alc-functions *)
 1580   59          
 1590   60          alc_write = write_it;
 1600   61          alc_read = read_it;
 1610   62          write_alc_read = write_read_it;
 1620   63          create_alc_ch = create_it_ch;
 1630   64          op_codes = (. 5, 19, 20, 21, 28, 29 .);
 1640   65           
\f

hjlaplst    81.05.19.   11.44.                                                    page     4

 2010   66            (*---  channelkinds  ---*)
 2020   67          
 2030   68          not_created = 0;
 2040   69          at_write_channel = 1;
 2050   70          at_write_wait = 2;
 2060   71          at_read_channel = 3;
 2070   72          at_read_wait = 4;
 2080   73          alc_write_channel = 5;
 2090   74          alc_read_channel = 6;
 2100   75          tty_write_channel = 7;
 2110   76          tty_read_channel = 8;
 2120   77          echo_nl_on_channel = 9;
 2130   78          tty_wait_cr = 10;
 2140   79          tty_wait_nl = 11;
 2150   80          tty_wait_input = 12;
 2160   81          
 2170   82          
 2180   83            (*---  delays used on at-channels  ---*)
 2190   84          
 2200   85          rts_delay_u3 = 10;
 2210   86          rts_delay_u4 = 5;
 2220   87          
 2230   88          rtr_delay_u3 = 13;
 2240   89          rtr_delay_u4 = 5;
 2250   90          
 2260   91          
 2270   92            (*---  byte-compatible values for special characters  ---*)
 2280   93          
 2290   94          stx = 2;
 2300   95          etx = 3;
 2310   96          bs = 8;
 2320   97          nl = 10;
 2330   98          cr = 13;
 2340   99          cs = 19;       (*  crtl + small s   *)
 2350  100          esc = 27;
 2360  101          sp = 32;
 2370  102          del = 127;
 2380  103          
 2390  104          command = 28;
 2400  105           
\f

hjlaplst    81.05.19.   11.44.                                                    page     5

 3010  106          
 3020  107            (*  result codes  *)
 3030  108            (*  specified in u2 overwriting portno *)
 3040  109            (*  other resultcodes are given in alarmenv *)
 3050  110          
 3060  111          transient_error = transi_err;
 3070  112          persistent_error = persi_err;
 3080  113          illegal_function = ill_func;
 3090  114          write_error = 2*8 +  transient_error;
 3100  115          write_read_mixed = create_done;
 3110  116          buffer_too_small = illegal_function;
 3120  117          go_on_read = 6;
 3130  118            (*-------------------
 3140  119            results modified for
 3150  120            transient errors
 3160  121            
 3170  122            2*8 +2 = write-error
 3180  123            3*8 +2 = parity or overrun
 3190  124            4*8 +2 = checksum error
 3200  125            5*8 +2 = read bbl too big
 3210  126            6*8 +2 = etx missing
 3220  127            
 3230  128            ---------------------*)
 3240  129          
 3250  130            (****************************************
 3260  131            *
 3270  132            *  params that should be used in create channel
 3280  133            *
 3290  134            *  +0  odd parity
 3300  135            *      1 stop element
 3310  136            *      5 databits/char
 3320  137            *      110 bps
 3330  138            *  +1  no parity
 3340  139            *  +2  even parity
 3350  140            *  +3  no parity
 3360  141            *  +4  2 stop elements
 3370  142            *  +8  6 databits
 3380  143            *  +16 7 databits
 3390  144            *  +24 8 databits
 3400  145            *  +32 300 bps
 3410  146            *  +64 600 bps
 3420  147            *  +96 1200 bps
 3430  148            *
 3440  149            ****************************************)
 3450  150           
\f

hjlaplst    81.05.19.   11.44.                                                    page     6

 4010  151        TYPE
 4020  152            (*      no of input+output devices on one lam-driver *)
 4030  153          channelset   = 0..max_channel_no;
 4040  154          
 4050  155          portset = 0..max_port_no;
 4060  156          
 4070  157            (*      format of a buffer send to/from a vcit *)
 4080  158          drvbuffer
 4090  159          = RECORD
 4100  160            !  first, last, next : integer;
 4110  161            END;
 4120  162          
 4130  163            (*      format of a buffer send to/from a vcat or at *)
 4140  164          atbuffer
 4150  165          = ARRAY(0..1)   OF byte;
 4160  166          
 4170  167          
 4180  168            (*      one word to write in writeword *)
 4190  169          
 4200  170          lamword
 4210  171          = PACKED RECORD
 4220  172                   !  data : byte;
 4230  173                   !  std : 0..7;
 4240  174                   !  port_and_bit15 : channelset;
 4250  175                   END;
 4260  176          
 4270  177            (*      one description for each device *)
 4280  178          
 4290  179          channelrecord
 4300  180          = RECORD
 4310  181            !  request:reference;           (*  current message     *)
 4320  182            !  channel_kind : 0..15;
 4330  183            !  old_result : byte;
 4340  184            !  interruptable : boolean;
 4350  185            !  reading_tty : boolean;
 4360  186            !  checksum: integer;
 4370  187            !  timeout,
 4380  188            !  next,
 4390  189            !  top: integer;
 4400  190            !  status : integer;
 4410  191            END;
 4420  192           
\f

hjlaplst    81.05.19.   11.44.                                                    page     7

 5010  193        VAR
 5020  194            (*        ref for channelmsg *)
 5030  195          channelmessage,ref:   reference;
 5040  196            (*        shadow for lam at high level *)
 5050  197          driver:    shadow;
 5060  198          
 5070  199          lamsem : semaphore;
 5080  200            (*---  pools  ---*)
 5090  201          
 5100  202          delaypool : pool 16;
 5110  203          timerpool: pool 1;
 5120  204            (*        buffers for handling interrupts *)
 5130  205          lampool:   pool no_of_lambufs;
 5140  206          
 5150  207            (*        devicenumber *)
 5160  208          channel_no:     integer;
 5170  209            (*        zone used by testopen and testout *)
 5180  210          z:    zone;
 5190  211            (*        all devicedescriptors in one array *)
 5200  212          
 5210  213          channel_descriptor:  ARRAY(channelset) OF channelrecord;
 5220  214          
 5230  215          queue : ARRAY(channelset) OF semaphore;
 5240  216          
 5250  217            (*        timeoutperiode and controlword for each device *)
 5260  218          time,controle_byte: ARRAY(portset)OF byte;
 5270  219          
 5280  220          i,j,k : integer;
 5290  221          test_b : boolean;
 5300  222          tst : integer := 0;
 5310  223           
\f

hjlaplst    81.05.19.   11.44.                                                    page     8

 6010  224            (***************   externals   ***********************************)
 6020  225          
 6030  226          FUNCTION  copychm(VAR x,y: reference): integer; EXTERNAL;
 6040  227            (* makes a copy of a channelmessage *)
 6050  228          
 6060  229          PROCEDURE testopen(VAR x:zone; y:alfa; z:^semaphore); EXTERNAL;
 6070  230            (* opens testmode *)
 6080  231          
 6090  232          PROCEDURE testout(VAR x:zone; y:alfa; z:integer); EXTERNAL;
 6100  233            (* writes text for test *)
 6110  234          
 6120  235          PROCEDURE control( x: integer; VAR y: reference); EXTERNAL;
 6130  236            (* writes one controlword *)
 6140  237          
 6150  238          PROCEDURE outword( x: lamword; VAR y: reference); EXTERNAL;
 6160  239            (* writes one word *)
 6170  240          
 6180  241          
 6190  242          PROCEDURE sense(VAR x:integer; y:integer; VAR z:reference); EXTERNAL;
 6200  243          
 6210  244          
 6220  245            (***************   procedures  ***********************************)
 6230  246          
 6240  247          PROCEDURE stop_actual_request
 6250  248            ( result: byte;  channel_no: channelset );
 6260  249          FORWARD;
 6270  250          
 6280  251          
 6290  252           
\f

hjlaplst    81.05.19.   11.44.                                                    page     9

 7010  253          PROCEDURE start_rts_delay(channel_no : integer);
 7020  254              (*********************************************
 7030  255              *   rts-delay                                *
 7040  256              **********************************************)
 7050  257            
 7060  258          VAR ref:reference;
 7070  259          BEGIN
 7080  260    1     ! alloc(ref, delaypool, mainsem.s^);
 7090  261    2     ! ref^.u3 := rts_delay_u3;
 7100  262    3     ! ref^.u4 := rts_delay_u4;
 7110  263    4     ! ref^.u1 := channel_no*2;
 7120  264    5     !   (*q if test_b then
 7130  265    6     !   testout( z, "rts-delay   ", ref^.u1); q*)
 7140  266    7     ! sendtimer(ref);
 7150  267    8     END;
 7160  268          
 7170  269          
 7180  270          
 7190  271          
 7200  272          
 7210  273          PROCEDURE start_rtr_delay(channel_no : integer);
 7220  274              (*********************************************
 7230  275              *   rtr-delay                                *
 7240  276              **********************************************)
 7250  277            
 7260  278          VAR ref:reference;
 7270  279          BEGIN
 7280  280    1     ! alloc(ref, delaypool, mainsem.s^);
 7290  281    2     ! ref^.u3:=rtr_delay_u3;
 7300  282    3     ! ref^.u4:=rtr_delay_u4;
 7310  283    4     ! ref^.u1 :=channel_no*2+1;
 7320  284    5     !   (*q if test_b then
 7330  285    6     !   testout( z, "rtr-delay   ", ref^.u1); q*)
 7340  286    7     ! sendtimer(ref);
 7350  287    8     END;
 7360  288          
 7370  289           
\f

hjlaplst    81.05.19.   11.44.                                                    page    10

 8010  290          PROCEDURE createchannel( w_kind, r_kind: 0..15 );
 8020  291              (***********************************************
 8030  292              *   createchannel                              *
 8040  293              ************************************************)
 8050  294            
 8060  295          VAR i: integer;
 8070  296          BEGIN
 8080  297    1     ! i:=ref^.u2;
 8090  298    2     ! channel_descriptor(i*2).channel_kind:=w_kind;
 8100  299    3     ! channel_descriptor(i*2+1).channel_kind:=r_kind;
 8110  300    4     ! 
 8120  301    5     ! channel_descriptor(i*2).status := write_read_ok;
 8130  302    6     ! channel_descriptor(i*2+1).status := write_read_ok;
 8140  303    7     ! 
 8150  304    8     ! LOCK ref AS buf:atbuffer DO
 8160  305    9     !   BEGIN
 8170  306   10     !   ! controle_byte(i):=buf(0) MOD 128;
 8180  307   11     !   ! time(i):=buf(1);
 8190  308   12     !   END;
 8200  309   13     ! 
 8210  310   14     ! ref^.u2:=ok_result;
 8220  311   15     ! return(ref);
 8230  312   16     ! 
 8240  313   17     !   (*q if test_b then
 8250  314   18     !   begin
 8260  315   19     !   testout( z, "chn created ", i);
 8270  316   20     !   testout( z, "controlebyte", controle_byte(i));
 8280  317   21     !   end; q*)
 8290  318   22     END;
 8300  319           
\f

hjlaplst    81.05.19.   11.44.                                                    page    11

 9010  320          
 9020  321            (*******************************************************
 9030  322            *   start_next_request                                        *
 9040  323            
 9050  324            *   initializes   next,  top,  and  timeout  in        *
 9060  325            *                 channeldescriptor(channel_no)             *
 9070  326            *           and   channel if it is used for output     *
 9080  327            *                                                      *
 9090  328            *   called when - not finished with write/read         *
 9100  329            *               - more requests after stop_actual_request
 9110  330            *               - timeout on write                     *
 9120  331            *               - no requests when a new userbuffer    *
 9130  332            *                 is comming                           *
 9140  333            ********************************************************)
 9150  334          
 9160  335          
 9170  336          PROCEDURE start_next_request( channel_no:channelset);
 9180  337          VAR c : integer;
 9190  338          BEGIN
 9200  339    1     ! WITH channel_descriptor(channel_no) DO
 9210  340    2     !   BEGIN
 9220  341    3     !   ! 
 9230  342    4     !   ! timeout:= time(channel_no DIV 2);
 9240  343    5     !   ! 
 9250  344    6     !   !   (*q if test_b then
 9260  345    7     !   !   begin
 9270  346    8     !   !   testout( z,"sta-nxt-req ", channel_no);
 9280  347    9     !   !   testout( z,"chn-kind    ",channel_kind);
 9290  348   10     !   !   end; q*)
 9300  349   11     !   ! 
 9310  350   12     !   ! IF channel_kind = at_write_channel THEN
 9320  351   13     !   !   BEGIN
 9330  352   14     !   !   !   (*                set up for output  *)
 9340  353   15     !   !   ! c:=controle_byte(channel_no DIV 2)*256+requesttosend+channel_no;
 9350  354   16     !   !   ! control(c,channelmessage);
 9360  355   17     !   !   !   (*q if test_b then
 9370  356   18     !   !   !   testout(z,"rts-init    ",c); q*)
 9380  357   19     !   !   ! start_rts_delay(channel_no);
 9390  358   20     !   !   ! channel_kind := at_write_wait;
 9400  359   21     !   !   END
 9410  360   22     !   !    
\f

hjlaplst    81.05.19.   11.44.                                                    page    12

10010  361   23     !   ! ELSE
10020  362   24     !   !   BEGIN
10030  363   25     !   !   ! IF channel_kind = tty_read_channel THEN
10040  364   26     !   !   !   channel_descriptor(channel_no-1).reading_tty:=true;
10050  365   27     !   !   ! interruptable:=true;
10060  366   28     !   !   END;
10070  367   29     !   ! 
10080  368   30     !   ! IF request^.u1 > write_alc_read THEN
10090  369   31     !   !   BEGIN
10100  370   32     !   !   ! LOCK request AS buf: drvbuffer DO
10110  371   33     !   !   !   BEGIN
10120  372   34     !   !   !   ! next:= buf.next;
10130  373   35     !   !   !   ! top:= buf.last+1;
10140  374   36     !   !   !   END;
10150  375   37     !   !   END
10160  376   38     !   !   
10170  377   39     !   ! ELSE
10180  378   40     !   !   IF request^.u1 <= write_read_at THEN
10190  379   41     !   !     BEGIN
10200  380   42     !   !     ! next := 0;
10210  381   43     !   !     ! top := 2;
10220  382   44     !   !     END
10230  383   45     !   !   ELSE
10240  384   46     !   !     BEGIN            (*  alc mode     *)
10250  385   47     !   !     ! IF request^.u3 >= command THEN
10260  386   48     !   !     !   LOCK request AS buf : drvbuffer DO
10270  387   49     !   !     !     BEGIN
10280  388   50     !   !     !     ! buf.next := buf.first;
10290  389   51     !   !     !     END;
10300  390   52     !   !     ! top := 1;
10310  391   53     !   !     ! IF channel_kind = alc_read_channel THEN
10320  392   54     !   !     !   timeout := timeout * 10;
10330  393   55     !   !     END;
10340  394   56     !   END;
10350  395   57     END;
10360  396           
\f

hjlaplst    81.05.19.   11.44.                                                    page    13

11010  397            (*******************************************************
11020  398            *   stop_actual_request
11030  399            *
11040  400            *   sends answer back to user
11050  401            *   if we shall go on read the request is send to      *
11060  402            *   queue at channel_no+1                                  *
11070  403            ********************************************************)
11080  404          
11090  405          PROCEDURE stop_actual_request
11100  406            ( result:byte; channel_no:channelset);
11110  407            
11120  408          VAR c : integer;
11130  409            
11140  410            
11150  411          BEGIN
11160  412    1     ! 
11170  413    2     ! WITH channel_descriptor(channel_no) DO
11180  414    3     !   
11190  415    4     !   CASE channel_kind OF
11200  416    5     !   ! 
11210  417    6     !   ! at_write_channel:
11220  418    7     !   !   BEGIN
11230  419    8     !   !   ! start_rtr_delay(channel_no);
11240  420    9     !   !   ! channel_kind := at_read_wait;
11250  421   10     !   !   ! old_result := result;
11260  422   11     !   !   END;
11270  423   12     !   ! 
11280  424   13     !   ! at_read_wait:
11290  425   14     !   !   BEGIN
11300  426   15     !   !   ! c:=controle_byte(channel_no DIV 2)*256+readytoread+channel_no;
11310  427   16     !   !   ! control(c,channelmessage);
11320  428   17     !   !   ! channel_kind := at_write_channel;
11330  429   18     !   !   ! result:= old_result;
11340  430   19     !   !   !   (*q if test_b then
11350  431   20     !   !   !   testout( z,"rtr-answer  ", c); q*)
11360  432   21     !   !   END
11370  433   22     !   !   OTHERWISE;
11380  434   23     !   END;
11390  435   24     !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    14

12010  436   25     ! IF channel_descriptor(channel_no).channel_kind <> at_read_wait THEN
12020  437   26     !   BEGIN
12030  438   27     !   ! 
12040  439   28     !   ! IF result = go_on_read THEN
12050  440   29     !   !   BEGIN
12060  441   30     !   !   ! 
12070  442   31     !   !   !   (*q if test_b then
12080  443   32     !   !   !   testout( z,"go on read  ", channel_no); q*)
12090  444   33     !   !   ! 
12100  445   34     !   !   ! WHILE NOT nil( channel_descriptor(channel_no+1).request) DO
12110  446   35     !   !   !   WITH channel_descriptor(channel_no+1) DO
12120  447   36     !   !   !     BEGIN
12130  448   37     !   !   !     ! request^.u2:=write_read_mixed;
12140  449   38     !   !   !     ! return(request);
12150  450   39     !   !   !     ! sensesem( request, queue(channel_no+1));
12160  451   40     !   !   !     END;
12170  452   41     !   !   ! channel_descriptor(channel_no+1).request:=:channel_descriptor(channel_no).request;
12180  453   42     !   !   ! start_next_request(channel_no+1);
12190  454   43     !   !   END
12200  455   44     !   ! ELSE
12210  456   45     !   !   BEGIN
12220  457   46     !   !   ! WITH channel_descriptor( channel_no) DO
12230  458   47     !   !   !   IF (( channel_kind=alc_read_channel) OR (channel_kind=alc_write_channel)) THEN
12240  459   48     !   !   !     BEGIN
12250  460   49     !   !   !     !   <*t
12260  461   50     !   !   !     !   IF result <> 0 THEN
12270  462   51     !   !   !     !   BEGIN
12280  463   52     !   !   !     !   IF channel_kind=alc_read_channel THEN
12290  464   53     !   !   !     !   testout(z,"ui-r        ", result)
12300  465   54     !   !   !     !   ELSE
12310  466   55     !   !   !     !   testout(z,"uo-r        ", result);
12320  467   56     !   !   !     !   testout(z,"opc         ", request^.u3);
12330  468   57     !   !   !     !   END;
12340  469   58     !   !   !     !   t*>
12350  470   59     !   !   !     ! 
12360  471   60     !   !   !     ! request^.u4 := status MOD 256;
12370  472   61     !   !   !     END;
12380  473   62     !   !   ! channel_descriptor(channel_no).request^.u2:=result;
12390  474   63     !   !   ! 
12400  475   64     !   !   !   (*q if test_b then
12410  476   65     !   !   !   testout( z, "returning   ", channel_no); q*)
12420  477   66     !   !   ! return(channel_descriptor(channel_no).request);
12430  478   67     !   !   END;
12440  479   68     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    15

13010  480   69     !   ! WITH channel_descriptor(channel_no) DO
13020  481   70     !   !   BEGIN
13030  482   71     !   !   ! timeout:=0;
13040  483   72     !   !   ! sensesem(request,queue(channel_no));
13050  484   73     !   !   ! IF channel_kind = tty_read_channel THEN
13060  485   74     !   !   !   BEGIN
13070  486   75     !   !   !   ! IF nil(channel_descriptor(channel_no-1).request) THEN
13080  487   76     !   !   !   !   BEGIN      (*   no writes are waiting  *)
13090  488   77     !   !   !   !   ! IF nil(request) THEN
13100  489   78     !   !   !   !   !   channel_descriptor(channel_no-1).reading_tty := false
13110  490   79     !   !   !   !   ! ELSE
13120  491   80     !   !   !   !   !   start_next_request( channel_no)
13130  492   81     !   !   !   !   END
13140  493   82     !   !   !   ! ELSE
13150  494   83     !   !   !   !   BEGIN      (*   writes are waiting   *)
13160  495   84     !   !   !   !   ! channel_descriptor(channel_no-1).reading_tty:=false;
13170  496   85     !   !   !   !   ! start_next_request(channel_no-1);
13180  497   86     !   !   !   !   END
13190  498   87     !   !   !   END
13200  499   88     !   !   ! ELSE
13210  500   89     !   !   !   IF channel_kind = tty_write_channel THEN
13220  501   90     !   !   !     BEGIN
13230  502   91     !   !   !     ! IF nil( request) THEN
13240  503   92     !   !   !     !   BEGIN      (*   no more writes look for reads  *)
13250  504   93     !   !   !     !   ! IF NOT nil(channel_descriptor(channel_no+1).request) THEN
13260  505   94     !   !   !     !   !   start_next_request(channel_no+1)
13270  506   95     !   !   !     !   END
13280  507   96     !   !   !     ! ELSE
13290  508   97     !   !   !     !   start_next_request(channel_no);
13300  509   98     !   !   !     END
13310  510   99     !   !   !   ELSE
13320  511  100     !   !   !     IF nil(request) THEN interruptable:=false
13330  512  101     !   !   !     ELSE start_next_request(channel_no);
13340  513  102     !   !   END;
13350  514  103     !   END;
13360  515  104     END;
13370  516           
\f

hjlaplst    81.05.19.   11.44.                                                    page    16

14010  517          
14020  518          FUNCTION packed_word ( databits: byte; channel_no: channelset): lamword;
14030  519              (********************************************************
14040  520              *   makes a word ready for outword                      *
14050  521              *********************************************************)
14060  522          VAR   w: lamword;
14070  523          BEGIN
14080  524    1     ! w.data:= databits;
14090  525    2     ! w.std := 0;
14100  526    3     ! w.port_and_bit15:=channel_no;
14110  527    4     ! packed_word:= w
14120  528    5     END;
14130  529           
\f

hjlaplst    81.05.19.   11.44.                                                    page    17

15010  530          PROCEDURE set_lam_control( channel_no : channelset);
15020  531          VAR c : integer;
15030  532          BEGIN
15040  533    1     ! channel_no := channel_no - channel_no MOD 2;
15050  534    2     ! c := controle_byte( channel_no DIV 2) *256 + channel_no;
15060  535    3     ! IF channel_descriptor(channel_no).channel_kind = at_write_channel THEN
15070  536    4     !   c := c+readytoread
15080  537    5     ! ELSE
15090  538    6     !   c:= c+ requesttosend;
15100  539    7     ! 
15110  540    8     ! control( c, channelmessage);
15120  541    9     END;
15130  542           
\f

hjlaplst    81.05.19.   11.44.                                                    page    18

16010  543          PROCEDURE start_new_channel(channel_no: channelset);
16020  544              (********************************************************
16030  545              *   start_new_channel                                               *
16040  546              *   called when - channel is created                    *
16050  547              *               - persistent status error               *
16060  548              *               - timeout on write or write/read        *
16070  549              *********************************************************)
16080  550            
16090  551          BEGIN
16100  552    1     ! set_lam_control( channel_no);
16110  553    2     ! channel_descriptor(channel_no).status:= write_read_ok;
16120  554    3     ! 
16130  555    4     ! WITH channel_descriptor(channel_no) DO
16140  556    5     !   WHILE NOT nil(request) DO
16150  557    6     !     stop_actual_request
16160  558    7     !     (create_done, channel_no);
16170  559    8     ! 
16180  560    9     ! channel_no:= channel_no+1;
16190  561   10     ! WITH channel_descriptor(channel_no) DO
16200  562   11     !   WHILE NOT nil(request) DO
16210  563   12     !     stop_actual_request
16220  564   13     !     (create_done, channel_no);
16230  565   14     END;
16240  566           
\f

hjlaplst    81.05.19.   11.44.                                                    page    19

17010  567          FUNCTION ready_to_send( channel_no:channelset):boolean;
17020  568              (********************************************************
17030  569              *   ready-to-send                                         *
17040  570              *********************************************************)
17050  571            
17060  572          BEGIN
17070  573    1     ! WITH channel_descriptor(channel_no) DO
17080  574    2     !   BEGIN
17090  575    3     !   ! sense( status, channel_no, channelmessage);
17100  576    4     !   ! 
17110  577    5     !   ! IF status MOD 32 DIV 8 = 3 THEN
17120  578    6     !   !   ready_to_send := true
17130  579    7     !   ! ELSE
17140  580    8     !   !   ready_to_send:=false
17150  581    9     !   END;
17160  582   10     END;
17170  583           
\f

hjlaplst    81.05.19.   11.44.                                                    page    20

18010  584          PROCEDURE handle_ok_lam_int(data_byte: byte; channel_no: channelset);
18020  585              (********************************************************
18030  586              *   handle_ok_lam_int                                             *
18040  587              *   handles the buffer pointed to by request                *
18050  588              *                                                       *
18060  589              *   if it is a writebuffer the byte pointed to by next  *
18070  590              *   is output                                           *
18080  591              *                                                       *
18090  592              *   if it is a readbuffer the data_byte is put into       *
18100  593              *   the buffer at the byte pointed to by next           *
18110  594              *                                                       *
18120  595              *********************************************************)
18130  596            
18140  597            
18150  598          BEGIN
18160  599    1     !   (*q if test_b then
18170  600    2     !   testout(z, "hndl-o-l-int", channel_no); q*)
18180  601    3     ! 
18190  602    4     ! WITH channel_descriptor(channel_no) DO
18200  603    5     !   
18210  604    6     !   CASE channel_kind OF
18220  605    7     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    21

19010  606    8     !   ! at_write_channel :
19020  607    9     !   !   
19030  608   10     !   !   IF next >= top THEN
19040  609   11     !   !     BEGIN
19050  610   12     !   !     !   (*q if test_b then
19060  611   13     !   !     !   testout( z, "next = top  ", 0); q*)
19070  612   14     !   !     ! IF request^.u1 = write_read_at THEN
19080  613   15     !   !     !   stop_actual_request
19090  614   16     !   !     !   ( go_on_read, channel_no)
19100  615   17     !   !     ! ELSE stop_actual_request
19110  616   18     !   !     !   ( ok_result, channel_no);
19120  617   19     !   !     END
19130  618   20     !   !   ELSE
19140  619   21     !   !     BEGIN
19150  620   22     !   !     !   <*rif ready_to_send(channel_no) THEN
19160  621   23     !   !     !   r*>
19170  622   24     !   !     ! LOCK request AS buf:atbuffer DO
19180  623   25     !   !     !   BEGIN
19190  624   26     !   !     !   ! 
19200  625   27     !   !     !   !   (*q if test_b then
19210  626   28     !   !     !   !   begin
19220  627   29     !   !     !   !   testout( z, "at-w-next   ", next);
19230  628   30     !   !     !   !   testout( z, "at-w-ch     ", buf(next));
19240  629   31     !   !     !   !   end; q*)
19250  630   32     !   !     !   ! 
19260  631   33     !   !     !   ! outword( packed_word( buf(next), channel_no), channelmessage);
19270  632   34     !   !     !   ! next:=next+1;
19280  633   35     !   !     !   END
19290  634   36     !   !     !     <*r
19300  635   37     !   !     !     ELSE
19310  636   38     !   !     !     stop_actual_request
19320  637   39     !   !     !     ( write_error, channel_no)
19330  638   40     !   !     !     r*>
19340  639   41     !   !     END;
19350  640   42     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    22

20010  641   43     !   ! at_read_channel :
20020  642   44     !   !   
20030  643   45     !   !   BEGIN
20040  644   46     !   !   ! LOCK request AS buf:atbuffer DO
20050  645   47     !   !   !   buf(next):=data_byte;
20060  646   48     !   !   !   (*q if test_b then
20070  647   49     !   !   !   begin
20080  648   50     !   !   !   testout( z, "at-r-next   ", next);
20090  649   51     !   !   !   testout( z,"at-r-ch     ", data_byte);
20100  650   52     !   !   !   end; q*)
20110  651   53     !   !   ! next:=next+1;
20120  652   54     !   !   ! IF next >= top THEN
20130  653   55     !   !   !   stop_actual_request
20140  654   56     !   !   !   ( ok_result, channel_no);
20150  655   57     !   !   END;
20160  656   58     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    23

21010  657   59     !   ! alc_read_channel :
21020  658   60     !   !   
21030  659   61     !   !   BEGIN
21040  660   62     !   !   !   (*  top controls position i format     *)
21050  661   63     !   !   ! CASE top OF
21060  662   64     !   !   ! ! 
21070  663   65     !   !   ! ! 1 : (* stx should be read *)
21080  664   66     !   !   ! !   
21090  665   67     !   !   ! !   IF data_byte = stx THEN top:= 2;
21100  666   68     !   !   ! ! 
21110  667   69     !   !   ! ! 2 : (* opcode should be read *)
21120  668   70     !   !   ! !   BEGIN
21130  669   71     !   !   ! !   ! old_result := data_byte;
21140  670   72     !   !   ! !   ! checksum := 0;
21150  671   73     !   !   ! !   ! IF  (data_byte IN op_codes) THEN
21160  672   74     !   !   ! !   !   IF data_byte < command THEN top:= 5  ELSE top:= 3
21170  673   75     !   !   ! !   !   ELSE top:= 1;  (*  illegal opk  *)
21180  674   76     !   !   ! !   END;
21190  675   77     !   !   ! ! 
21200  676   78     !   !   ! ! 3 : (* bbl  should be read *)
21210  677   79     !   !   ! !   BEGIN
21220  678   80     !   !   ! !   ! 
21230  679   81     !   !   ! !   ! next:= data_byte;      (*  points to etx   *)
21240  680   82     !   !   ! !   ! top:= 4;
21250  681   83     !   !   ! !   ! 
21260  682   84     !   !   ! !   !   (*qtestout(z,"reci-bbl    ", data_byte);q*)
21270  683   85     !   !   ! !   END;
21280  684   86     !   !   ! ! 
21290  685   87     !   !   ! ! 4:
21300  686   88     !   !   ! !   BEGIN  (* info is read *)
21310  687   89     !   !   ! !   ! 
21320  688   90     !   !   ! !   ! i := request^.size;
21330  689   91     !   !   ! !   ! LOCK request AS buf : RECORD
21340  690   92     !   !   ! !   !                         !  first, last, next : integer;
21350  691   93     !   !   ! !   !                         !  info : ARRAY (6..i-1+i) OF byte;
21360  692   94     !   !   ! !   !   END DO
21370  693   95     !   !   ! !   !   BEGIN
21380  694   96     !   !   ! !   !   ! buf.info(buf.next) := data_byte;
21390  695   97     !   !   ! !   !   ! buf.next := buf.next +1;
21400  696   98     !   !   ! !   !   ! next:= next-1;
21410  697   99     !   !   ! !   !   ! IF next < 0 THEN top:= 5  ELSE
21420  698  100     !   !   ! !   !   !   IF buf.next > buf.last THEN    (* buffer too small  *)
21430  699  101     !   !   ! !   !   !     top:= 1
21440  700  102     !   !   ! !   !   END;
21450  701  103     !   !   ! !   ! IF top = 1 THEN
21460  702  104     !   !   ! !   !   stop_actual_request ( 5*8+transient_error, channel_no);
\f

hjlaplst    81.05.19.   11.44.                                                    page    24

21470  703  105     !   !   ! !   END;
21480  704  106     !   !   ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    25

22010  705  107     !   !   ! ! 5:       (*---  etx should be read *)
22020  706  108     !   !   ! !   BEGIN
22030  707  109     !   !   ! !   ! 
22040  708  110     !   !   ! !   ! IF data_byte <> etx THEN
22050  709  111     !   !   ! !   !   BEGIN (* start again *)
22060  710  112     !   !   ! !   !   ! IF request^.u3 >= command THEN
22070  711  113     !   !   ! !   !   !   LOCK request AS buf : drvbuffer DO
22080  712  114     !   !   ! !   !   !     BEGIN
22090  713  115     !   !   ! !   !   !     ! buf.next := buf.first;
22100  714  116     !   !   ! !   !   !     END;
22110  715  117     !   !   ! !   !   ! top := 1;
22120  716  118     !   !   ! !   !   END  ELSE
22130  717  119     !   !   ! !   !   top:= 6;
22140  718  120     !   !   ! !   ! 
22150  719  121     !   !   ! !   END;
22160  720  122     !   !   ! ! 
22170  721  123     !   !   ! ! 6:
22180  722  124     !   !   ! !     (* chs should be read *)
22190  723  125     !   !   ! !   
22200  724  126     !   !   ! !   IF data_byte <> checksum THEN
22210  725  127     !   !   ! !     BEGIN
22220  726  128     !   !   ! !     ! stop_actual_request
22230  727  129     !   !   ! !     ! ( 4*8 + transient_error, channel_no);
22240  728  130     !   !   ! !     END  ELSE
22250  729  131     !   !   ! !     BEGIN
22260  730  132     !   !   ! !     ! 
22270  731  133     !   !   ! !     ! request^.u3 := old_result;
22280  732  134     !   !   ! !     ! 
22290  733  135     !   !   ! !     ! stop_actual_request
22300  734  136     !   !   ! !     ! ( ok_result, channel_no);
22310  735  137     !   !   ! !     ! 
22320  736  138     !   !   ! !     !   (*qtestout(z,"release-ui  ", 0);q*)
22330  737  139     !   !   ! !     END;
22340  738  140     !   !   ! END;  (* case  *)
22350  739  141     !   !   ! 
22360  740  142     !   !   ! checksum := (checksum + data_byte) MOD 256;
22370  741  143     !   !   ! 
22380  742  144     !   !   END;
22390  743  145     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    26

23010  744  146     !   ! alc_write_channel :
23020  745  147     !   !   BEGIN
23030  746  148     !   !   !   <*r
23040  747  149     !   !   !   IF ready_to_send ( channel_no) THEN
23050  748  150     !   !   !   r*>
23060  749  151     !   !   ! BEGIN
23070  750  152     !   !   ! ! 
23080  751  153     !   !   ! ! CASE top OF
23090  752  154     !   !   ! ! ! 
23100  753  155     !   !   ! ! ! 1 : (* stx is send *)
23110  754  156     !   !   ! ! !   BEGIN
23120  755  157     !   !   ! ! !   ! 
23130  756  158     !   !   ! ! !   ! data_byte := stx;
23140  757  159     !   !   ! ! !   ! top:= 2;
23150  758  160     !   !   ! ! !   END;
23160  759  161     !   !   ! ! ! 
23170  760  162     !   !   ! ! ! 2 : (* opcode is send *)
23180  761  163     !   !   ! ! !   BEGIN
23190  762  164     !   !   ! ! !   ! data_byte := request^.u3;
23200  763  165     !   !   ! ! !   ! checksum:= 0;
23210  764  166     !   !   ! ! !   ! IF data_byte < command THEN top:= 5 ELSE top:= 3
23220  765  167     !   !   ! ! !   END;
23230  766  168     !   !   ! ! ! 
23240  767  169     !   !   ! ! ! 3 : (* bbl  is send *)
23250  768  170     !   !   ! ! !   LOCK request AS buf : drvbuffer DO
23260  769  171     !   !   ! ! !     BEGIN  (* bbl *)
23270  770  172     !   !   ! ! !     ! data_byte := buf.last - buf.first;
23280  771  173     !   !   ! ! !     ! top:= 4;
23290  772  174     !   !   ! ! !     !   (*qtestout(z,"send-bbl    ", data_byte);q*)
23300  773  175     !   !   ! ! !     END;
23310  774  176     !   !   ! ! ! 
23320  775  177     !   !   ! ! ! 4:   (*  send info   *)
23330  776  178     !   !   ! ! !   BEGIN
23340  777  179     !   !   ! ! !   ! i:= request^.size;
23350  778  180     !   !   ! ! !   ! LOCK request AS buf : RECORD
23360  779  181     !   !   ! ! !   !                         !  first, last, next : integer;
23370  780  182     !   !   ! ! !   !                         !  info : ARRAY (6..i-1+i) OF byte;
23380  781  183     !   !   ! ! !   !   END DO
23390  782  184     !   !   ! ! !   !   BEGIN
23400  783  185     !   !   ! ! !   !   ! data_byte := buf.info( buf.next);
23410  784  186     !   !   ! ! !   !   ! buf.next := buf.next +1;
23420  785  187     !   !   ! ! !   !   ! IF buf.next > buf.last THEN top:= 5;
23430  786  188     !   !   ! ! !   !   !   (*qtestout(z,"send-info   ", buf.info(buf.next));q*)
23440  787  189     !   !   ! ! !   !   END;
23450  788  190     !   !   ! ! !   END;
23460  789  191     !   !   ! ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    27

24010  790  192     !   !   ! ! ! 5:   (*  send etx   *)
24020  791  193     !   !   ! ! !   BEGIN
24030  792  194     !   !   ! ! !   ! data_byte := etx;
24040  793  195     !   !   ! ! !   ! top:= 6;
24050  794  196     !   !   ! ! !   !   (*qtestout(z,"send-etx    ", checksum);q*)
24060  795  197     !   !   ! ! !   END;
24070  796  198     !   !   ! ! ! 
24080  797  199     !   !   ! ! ! 
24090  798  200     !   !   ! ! ! 6:
24100  799  201     !   !   ! ! !     (* chs is send *)
24110  800  202     !   !   ! ! !   BEGIN
24120  801  203     !   !   ! ! !   ! data_byte := checksum;
24130  802  204     !   !   ! ! !   ! top:= 7;
24140  803  205     !   !   ! ! !   !   (*qtestout(z,"send-chs    ", etx);q*)
24150  804  206     !   !   ! ! !   ! 
24160  805  207     !   !   ! ! !   END;
24170  806  208     !   !   ! ! ! 
24180  807  209     !   !   ! ! ! 7:     (*  user buffer is released *)
24190  808  210     !   !   ! ! !   BEGIN
24200  809  211     !   !   ! ! !   ! stop_actual_request
24210  810  212     !   !   ! ! !   ! ( ok_result, channel_no);
24220  811  213     !   !   ! ! !   ! 
24230  812  214     !   !   ! ! !   !   (*qtestout(z,"release uo  ",next);q*)
24240  813  215     !   !   ! ! !   END;
24250  814  216     !   !   ! ! ! 
24260  815  217     !   !   ! ! END;   (*  case  *)
24270  816  218     !   !   ! !   <*r
24280  817  219     !   !   ! !   ELSE
24290  818  220     !   !   ! !   stop_actual_request
24300  819  221     !   !   ! !   (write_error, channel_no);
24310  820  222     !   !   ! !   r*>
24320  821  223     !   !   ! ! 
24330  822  224     !   !   ! ! outword( packed_word( data_byte, channel_no), channelmessage);
24340  823  225     !   !   ! ! checksum := (checksum + data_byte) MOD 256;
24350  824  226     !   !   ! ! 
24360  825  227     !   !   ! END;
24370  826  228     !   !   END;
24380  827  229     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    28

25010  828  230     !   ! tty_read_channel :
25020  829  231     !   !   
25030  830  232     !   !   BEGIN
25040  831  233     !   !   ! 
25050  832  234     !   !   !   (*q if test_b then
25060  833  235     !   !   !   begin
25070  834  236     !   !   !   testout( z,"tty-r-next  ", next);
25080  835  237     !   !   !   testout( z,"tty-r-ch    ", data_byte);
25090  836  238     !   !   !   end; q*)
25100  837  239     !   !   ! 
25110  838  240     !   !   ! 
25120  839  241     !   !   ! CASE data_byte OF
25130  840  242     !   !   ! ! 
25140  841  243     !   !   ! ! esc :
25150  842  244     !   !   ! !   BEGIN
25160  843  245     !   !   ! !   ! WITH channel_descriptor( channel_no-1) DO
25170  844  246     !   !   ! !   !   IF NOT reading_tty THEN
25180  845  247     !   !   ! !   !     BEGIN
25190  846  248     !   !   ! !   !     ! timeout:=0;
25200  847  249     !   !   ! !   !     ! channel_kind:=tty_wait_cr;
25210  848  250     !   !   ! !   !     ! LOCK request AS buf:drvbuffer DO
25220  849  251     !   !   ! !   !     !   IF next > 1 THEN
25230  850  252     !   !   ! !   !     !     buf.next:=next-1
25240  851  253     !   !   ! !   !     !   ELSE
25250  852  254     !   !   ! !   !     !     buf.next:=next;
25260  853  255     !   !   ! !   !     END
25270  854  256     !   !   ! !   !   ELSE
25280  855  257     !   !   ! !   !     channel_kind := tty_wait_nl;
25290  856  258     !   !   ! !   ! outword( packed_word( cr, channel_no), channelmessage);
25300  857  259     !   !   ! !   ! start_next_request( channel_no);
25310  858  260     !   !   ! !   !   (*ttestout(z,"esc         ",timeout);t*)
25320  859  261     !   !   ! !   END;
25330  860  262     !   !   ! ! 
25340  861  263     !   !   ! ! cs :
25350  862  264     !   !   ! !   WITH channel_descriptor(channel_no-1) DO
25360  863  265     !   !   ! !     IF NOT reading_tty THEN
25370  864  266     !   !   ! !       BEGIN
25380  865  267     !   !   ! !       ! WHILE NOT nil(request) DO
25390  866  268     !   !   ! !       !   BEGIN
25400  867  269     !   !   ! !       !   ! request^.u2:=create_done;
25410  868  270     !   !   ! !       !   ! return(request);
25420  869  271     !   !   ! !       !   ! sensesem(request,queue(channel_no-1))
25430  870  272     !   !   ! !       !   END;
25440  871  273     !   !   ! !       ! timeout:=0;
25450  872  274     !   !   ! !       ! IF NOT nil(channel_descriptor(channel_no).request) THEN
25460  873  275     !   !   ! !       !   start_next_request(channel_no);
\f

hjlaplst    81.05.19.   11.44.                                                    page    29

25470  874  276     !   !   ! !       END
25480  875  277     !   !   ! !     ELSE  (*  reading tty  *)
25490  876  278     !   !   ! !       BEGIN
25500  877  279     !   !   ! !       ! WITH channel_descriptor( channel_no) DO
25510  878  280     !   !   ! !       !   BEGIN
25520  879  281     !   !   ! !       !   ! i:= request^.size;
25530  880  282     !   !   ! !       !   ! 
25540  881  283     !   !   ! !       !   ! LOCK request AS buf : RECORD
25550  882  284     !   !   ! !       !   !                         !  first, last, next : integer;
25560  883  285     !   !   ! !       !   !                         !  text : ARRAY (1..i-6+i) OF byte;
25570  884  286     !   !   ! !       !   !   END DO
25580  885  287     !   !   ! !       !   !   BEGIN
25590  886  288     !   !   ! !       !   !   ! IF next > (i-6+i) THEN next := (i-6+i);
25600  887  289     !   !   ! !       !   !   ! buf.text(next):=cs;
25610  888  290     !   !   ! !       !   !   ! next:=next+1;
25620  889  291     !   !   ! !       !   !   ! IF next>=top THEN
25630  890  292     !   !   ! !       !   !   !   buf.next:=next;
25640  891  293     !   !   ! !       !   !   END;
25650  892  294     !   !   ! !       !   ! IF next>=top THEN
25660  893  295     !   !   ! !       !   !   stop_actual_request
25670  894  296     !   !   ! !       !   !   ( ok_result, channel_no);
25680  895  297     !   !   ! !       !   END;
25690  896  298     !   !   ! !       ! outword(packed_word(cr,channel_no), channelmessage);
25700  897  299     !   !   ! !       !   (*ttestout(z,"cs          ",timeout);t*)
25710  898  300     !   !   ! !       ! channel_kind:=echo_nl_on_channel;
25720  899  301     !   !   ! !       END;
25730  900  302     !   !   ! ! 
25740  901  303     !   !   ! ! del,bs :
25750  902  304     !   !   ! !   IF channel_descriptor(channel_no-1).reading_tty THEN
25760  903  305     !   !   ! !     LOCK request AS buf:drvbuffer DO
25770  904  306     !   !   ! !       IF next > buf.first THEN       (*  erase  *)
25780  905  307     !   !   ! !         BEGIN
25790  906  308     !   !   ! !         ! next:=next-1;
25800  907  309     !   !   ! !         ! outword( packed_word( bs, channel_no), channelmessage);
25810  908  310     !   !   ! !         END;
25820  909  311     !   !   ! ! cr:          (*  return   works as line-end    *)
25830  910  312     !   !   ! !   IF channel_descriptor(channel_no-1).reading_tty THEN
25840  911  313     !   !   ! !     BEGIN
25850  912  314     !   !   ! !     ! i := request^.size;
25860  913  315     !   !   ! !     ! 
25870  914  316     !   !   ! !     ! LOCK request AS buf : RECORD
25880  915  317     !   !   ! !     !                         !  first, last, next : integer;
25890  916  318     !   !   ! !     !                         !  text : ARRAY (1..i-6+i) OF byte;
25900  917  319     !   !   ! !     !   END DO
25910  918  320     !   !   ! !     !   BEGIN
25920  919  321     !   !   ! !     !   ! channel_descriptor(channel_no-1).channel_kind:=echo_nl_on_channel;
\f

hjlaplst    81.05.19.   11.44.                                                    page    30

25930  920  322     !   !   ! !     !   ! buf.text(next):=data_byte;
25940  921  323     !   !   ! !     !   ! IF next<top-1 THEN
25950  922  324     !   !   ! !     !   !   BEGIN
25960  923  325     !   !   ! !     !   !   ! buf.text(next+1):=nl;
25970  924  326     !   !   ! !     !   !   ! buf.next:=next+2
25980  925  327     !   !   ! !     !   !   END
25990  926  328     !   !   ! !     !   ! ELSE
26000  927  329     !   !   ! !     !   !   buf.next:=next+1;
26010  928  330     !   !   ! !     !   ! outword( packed_word( cr, channel_no), channelmessage);
26020  929  331     !   !   ! !     !   !   (*ttestout(z,"cr          ",timeout);t*)
26030  930  332     !   !   ! !     !   END
26040  931  333     !   !   ! !     END
26050  932  334     !   !   ! !      
\f

hjlaplst    81.05.19.   11.44.                                                    page    31

27010  933  335     !   !   ! !     OTHERWISE      (*  packed_word character   *)
27020  934  336     !   !   ! !     
27030  935  337     !   !   ! !     IF channel_descriptor(channel_no-1).reading_tty THEN
27040  936  338     !   !   ! !       BEGIN
27050  937  339     !   !   ! !       ! i := request^.size;
27060  938  340     !   !   ! !       ! 
27070  939  341     !   !   ! !       ! LOCK request AS buf : RECORD
27080  940  342     !   !   ! !       !                         !  first, last, next : integer;
27090  941  343     !   !   ! !       !                         !  text : ARRAY (1..i-6+i) OF byte;
27100  942  344     !   !   ! !       !   END DO
27110  943  345     !   !   ! !       !   BEGIN
27120  944  346     !   !   ! !       !   !   (*  index error has been seen here,  next=81    *)
27130  945  347     !   !   ! !       !   ! IF next > (i-6+i) THEN next := (i-6+i);
27140  946  348     !   !   ! !       !   ! buf.text(next):=data_byte;
27150  947  349     !   !   ! !       !   ! next:=next+1;
27160  948  350     !   !   ! !       !   ! IF next >= top THEN
27170  949  351     !   !   ! !       !   !   buf.next:=next;
27180  950  352     !   !   ! !       !   END;
27190  951  353     !   !   ! !       ! IF next>=top THEN
27200  952  354     !   !   ! !       !   stop_actual_request
27210  953  355     !   !   ! !       !   ( ok_result, channel_no);
27220  954  356     !   !   ! !       ! outword( packed_word( data_byte, channel_no), channelmessage);
27230  955  357     !   !   ! !       END
27240  956  358     !   !   ! END;
27250  957  359     !   !   ! IF channel_descriptor(channel_no-1).reading_tty THEN
27260  958  360     !   !   !   IF timeout<normal_time THEN
27270  959  361     !   !   !     timeout:=normal_time;
27280  960  362     !   !   END;    (*  case read_tty  *)
27290  961  363     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    32

28010  962  364     !   ! tty_write_channel :
28020  963  365     !   !   
28030  964  366     !   !   IF NOT reading_tty THEN
28040  965  367     !   !       <*r
28050  966  368     !   !       IF ready_to_send(channel_no) THEN
28060  967  369     !   !       r*>
28070  968  370     !   !     BEGIN
28080  969  371     !   !     ! i:= request^.size;
28090  970  372     !   !     ! 
28100  971  373     !   !     ! LOCK request AS buf : RECORD
28110  972  374     !   !     !                         !  first, last, next : integer;
28120  973  375     !   !     !                         !  text : ARRAY (1..i-6+i) OF byte;
28130  974  376     !   !     !   END DO
28140  975  377     !   !     !   BEGIN
28150  976  378     !   !     !   ! 
28160  977  379     !   !     !   !   (*q if test_b then
28170  978  380     !   !     !   !   begin
28180  979  381     !   !     !   !   testout( z, "tty-w-next  ", next);
28190  980  382     !   !     !   !   testout( z, "tty-w-ch    ", buf.text(next));
28200  981  383     !   !     !   !   end; q*)
28210  982  384     !   !     !   ! 
28220  983  385     !   !     !   ! outword ( packed_word( buf.text(next), channel_no), channelmessage);
28230  984  386     !   !     !   ! next:= next+1;
28240  985  387     !   !     !   ! IF next>= top THEN    (*  terminate  *)
28250  986  388     !   !     !   !   buf.next:= next;
28260  987  389     !   !     !   END;
28270  988  390     !   !     ! IF next>=top THEN
28280  989  391     !   !     !   IF request^.u1 = write_read_tty THEN
28290  990  392     !   !     !     stop_actual_request
28300  991  393     !   !     !     ( go_on_read, channel_no)
28310  992  394     !   !     !   ELSE
28320  993  395     !   !     !     stop_actual_request
28330  994  396     !   !     !     ( ok_result, channel_no)
28340  995  397     !   !     END;
28350  996  398     !   !   <*r
28360  997  399     !   !   ELSE
28370  998  400     !   !   stop_actual_request
28380  999  401     !   !   ( write_error, channel_no);
28390 1000  402     !   !   r*>
28400 1001  403     !   ! 
28410 1002  404     !   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    33

29010 1003  405     !   ! echo_nl_on_channel :
29020 1004  406     !   !   BEGIN
29030 1005  407     !   !   !   (*ttestout(z,"nl          ",timeout);t*)
29040 1006  408     !   !   ! outword( packed_word( nl, channel_no), channelmessage);
29050 1007  409     !   !   ! IF reading_tty THEN
29060 1008  410     !   !   !   stop_actual_request( ok_result, channel_no+1);
29070 1009  411     !   !   ! channel_kind:=tty_write_channel;
29080 1010  412     !   !   END;
29090 1011  413     !   ! 
29100 1012  414     !   ! tty_wait_cr :
29110 1013  415     !   !   BEGIN
29120 1014  416     !   !   ! outword(packed_word(cr,channel_no),channelmessage);
29130 1015  417     !   !   ! channel_kind:=tty_wait_nl;
29140 1016  418     !   !   !   (*ttestout(z,"esc cr      ",timeout);t*)
29150 1017  419     !   !   END;
29160 1018  420     !   ! 
29170 1019  421     !   ! tty_wait_nl :
29180 1020  422     !   !   BEGIN
29190 1021  423     !   !   ! outword(packed_word(nl,channel_no),channelmessage);
29200 1022  424     !   !   ! channel_kind:=tty_wait_input;
29210 1023  425     !   !   !   (*ttestout(z,"esc nl      ",timeout);t*)
29220 1024  426     !   !   END;
29230 1025  427     !   ! 
29240 1026  428     !   ! tty_wait_input :
29250 1027  429     !   !   BEGIN
29260 1028  430     !   !   END;
29270 1029  431     !   ! OTHERWISE
29280 1030  432     !   ! BEGIN
29290 1031  433     !   ! END
29300 1032  434     !   END;
29310 1033  435     END;
29320 1034           
\f

hjlaplst    81.05.19.   11.44.                                                    page    34

30010 1035            (***********************************************************
30020 1036            *                                                          *
30030 1037            *   high level lam-driver                                  *
30040 1038            *                                                          *
30050 1039            *  converts an interrupt to a signal to the level-0-driver *
30060 1040            *                                                          *
30070 1041            *   handles input only                                     *
30080 1042            ************************************************************)
30090 1043          
30100 1044        PROCESS highlevellamdriver( VAR lamsem: semaphore);
30110 1045          
30120 1046        CONST
30130 1047          readytosend= 24;
30140 1048          startscanner = -1;
30150 1049          interrupt_ok=40;
30160 1050          no_input=255;
30170 1051          
30180 1052        TYPE
30190 1053          dataword
30200 1054          = PACKED RECORD
30210 1055                   !  data:byte;
30220 1056                   !  unused:0..3;
30230 1057                   !  error:boolean;
30240 1058                   !  port_and_bit15: 0..31;
30250 1059                   END;
30260 1060          
30270 1061        VAR
30280 1062          channelmessage,ref:  reference;
30290 1063          indata:   dataword;
30300 1064          status:   integer;
30310 1065          
30320 1066          PROCEDURE controlclr(x:integer; VAR y:reference); EXTERNAL;
30330 1067            (*        writes controle and clears interrupt *)
30340 1068          
30350 1069          PROCEDURE inword( VAR x: dataword; VAR y: reference); EXTERNAL;
30360 1070            (*         reads one word *)
30370 1071          
30380 1072          PROCEDURE sense( VAR x:integer; y:integer; VAR z:reference); EXTERNAL;
30390 1073            (*         gets status *)
30400 1074           
\f

hjlaplst    81.05.19.   11.44.                                                    page    35

31010 1075        BEGIN
31020 1076    1   ! 
31030 1077    2   ! wait(channelmessage,lamsem);
31040 1078    3   !   (*            wait for a channelmessage to arrive *)
31050 1079    4   ! 
31060 1080    5   ! CHANNEL channelmessage DO
31070 1081    6   !   WHILE true DO
31080 1082    7   !     BEGIN
31090 1083    8   !     ! controlclr(startscanner,channelmessage);
31100 1084    9   !     !   (*            write control and clear interrupt *)
31110 1085   10   !     ! inword(indata,channelmessage);
31120 1086   11   !     !   (*            read one word of input *)
31130 1087   12   !     ! wait(ref,lamsem);
31140 1088   13   !     !   (*            wait for inputbuffer at lamsem *)
31150 1089   14   !     ! WITH indata,ref^ DO
31160 1090   15   !     !   BEGIN
31170 1091   16   !     !   ! u2:=interrupt_ok;
31180 1092   17   !     !   ! IF (port_and_bit15 MOD 2) = 0 THEN
31190 1093   18   !     !   !     (*          it is an outputinterrupt *)
31200 1094   19   !     !   !   u3:=no_input
31210 1095   20   !     !   ! ELSE
31220 1096   21   !     !   !   IF error THEN
31230 1097   22   !     !   !     BEGIN
31240 1098   23   !     !   !     ! sense(status, port_and_bit15, channelmessage);
31250 1099   24   !     !   !     ! u2 := status MOD 64;
31260 1100   25   !     !   !     END
31270 1101   26   !     !   !   ELSE
31280 1102   27   !     !   !     u3:=data;
31290 1103   28   !     !   ! u4:=port_and_bit15;
31300 1104   29   !     !   ! 
31310 1105   30   !     !   !   (*******************************
31320 1106   31   !     !   !   *                      +1 overrun
31330 1107   32   !     !   !   *                      +2 framing error
31340 1108   33   !     !   !   *  status = 0          +4 parity error
31350 1109   34   !     !   !   *                      +8 data set ready
31360 1110   35   !     !   !   *                     +16 ready for sending
31370 1111   36   !     !   !   *                     +32 data carrier detector
31380 1112   37   !     !   !   ********************************)
31390 1113   38   !     !   ! 
31400 1114   39   !     !   END;
31410 1115   40   !     ! return(ref);
31420 1116   41   !     END
31430 1117   42   END;
31440 1118         
\f

hjlaplst    81.05.19.   11.44.                                                    page    36

32010 1119          (********************************************************
32020 1120          *   initialization                                      *
32030 1121          *********************************************************)
32040 1122        
32050 1123        BEGIN
32060 1124    1   ! 
32070 1125    2   ! testopen(z, own.incname, opsem);
32080 1126    3   ! 
32090 1127    4   ! testout( z, version, al_env_version);
32100 1128    5   ! 
32110 1129    6   !   (*             create and start high level lamdriver *)
32120 1130    7   ! IF create( "highlevellam", highlevellamdriver(lamsem), driver, store ) = 0
32130 1131    8   !   THEN start(driver,hl_lam_pri)
32140 1132    9   !     (*q else
32150 1133   10   !     if test_b then
32160 1134   11   !     testout(z,"create error",0) q*) ;
32170 1135   12   ! 
32180 1136   13   !   (*             first buffer from lampool is used as a copy of channelmess *)
32190 1137   14   !   (*q if test_b then
32200 1138   15   !   testout(z, "lam-h start ", 0); q*)
32210 1139   16   ! 
32220 1140   17   ! alloc(ref,lampool,mainsem.s^);
32230 1141   18   ! 
32240 1142   19   ! IF (reservech(channelmessage, level,mask) + copychm(ref,channelmessage) <> 1) AND test_b THEN
32250 1143   20   !     (*q      testout(z,"res.ch error",reservech(channelmessage, level,mask)) q*) ;
32260 1144   21   !   (*             if reservation of channel went well, send copy of channelmess to lamdriver *)
32270 1145   22   ! signal(ref,lamsem);
32280 1146   23   ! 
32290 1147   24   !   (*             get one timeoutbuffer *)
32300 1148   25   ! alloc(ref,timerpool,mainsem.s^);
32310 1149   26   !   (*             delay is set to u3*2**u4 = 1 sec   *)
32320 1150   27   ! ref^.u1 := 6;
32330 1151   28   ! ref^.u3:=250; ref^.u4:=2;
32340 1152   29   !   (*             send to systemtimer *)
32350 1153   30   ! sendtimer(ref);
32360 1154   31   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    37

33010 1155   32   !   (*             get rest of inputbuffers and send them to lamdriver *)
33020 1156   33   ! 
33030 1157   34   ! FOR channel_no:=2 TO no_of_lambufs DO
33040 1158   35   !   BEGIN
33050 1159   36   !   ! alloc(ref, lampool, mainsem.s^);
33060 1160   37   !   ! ref^.u1 := 6;
33070 1161   38   !   ! signal(ref,lamsem);
33080 1162   39   !   END;
33090 1163   40   ! 
33100 1164   41   !   (*             all devicedescriptors are initialized *)
33110 1165   42   ! 
33120 1166   43   ! FOR channel_no:=0 TO max_channel_no DO
33130 1167   44   !   WITH channel_descriptor( channel_no) DO
33140 1168   45   !     BEGIN
33150 1169   46   !     ! timeout := 0;
33160 1170   47   !     ! channel_kind := not_created;
33170 1171   48   !     ! interruptable := false;
33180 1172   49   !     ! reading_tty := false;
33190 1173   50   !     END;
33200 1174   51   !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    38

34010 1175   52   !   (********************************************************
34020 1176   53   !   *   level-0-lam                                         *
34030 1177   54   !   *                                                       *
34040 1178   55   !   *    sends output directly to the channel               *
34050 1179   56   !   *    handles inputbuffers from highlevel lamdriver      *
34060 1180   57   !   *                                                       *
34070 1181   58   !   *********************************************************)
34080 1182   59   ! 
34090 1183   60   ! REPEAT     (*  main loop  *)
34100 1184   61   ! !   (*                  wait for buffer on inputsemaphore *)
34110 1185   62   ! ! 
34120 1186   63   ! ! wait(ref,mainsem.w^);
34130 1187   64   ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    39

35010 1188   65   ! ! IF ownertest(lampool,ref) THEN
35020 1189   66   ! !   BEGIN
35030 1190   67   ! !   !   (*q if test_b then
35040 1191   68   ! !   !   testout( z, "interrupt on", ref^.u4); q*)
35050 1192   69   ! !   ! 
35060 1193   70   ! !   ! WITH channel_descriptor(ref^.u4) DO
35070 1194   71   ! !   !   
35080 1195   72   ! !   !   IF interruptable THEN
35090 1196   73   ! !   !     IF (NOT nil(request)) OR (channel_kind>=echo_nl_on_channel) THEN
35100 1197   74   ! !   !       BEGIN
35110 1198   75   ! !   !       ! status := ref^.u2;
35120 1199   76   ! !   !       ! IF status = write_read_ok THEN
35130 1200   77   ! !   !       !   handle_ok_lam_int(ref^.u3, ref^.u4)
35140 1201   78   ! !   !       ! ELSE
35150 1202   79   ! !   !       !   BEGIN
35160 1203   80   ! !   !       !   ! stop_actual_request
35170 1204   81   ! !   !       !   ! (3*8 + transient_error,ref^.u4);
35180 1205   82   ! !   !       !   ! set_lam_control( ref^.u4);
35190 1206   83   ! !   !       !   !   <*
35200 1207   84   ! !   !       !   !   END
35210 1208   85   ! !   !       !   !   OTHERWISE
35220 1209   86   ! !   !       !   !   BEGIN
35230 1210   87   ! !   !       !   !   stop_actual_request
35240 1211   88   ! !   !       !   !   (persistent_error, ref^.u4);
35250 1212   89   ! !   !       !   !   status := ref^.u2;
35260 1213   90   ! !   !       !   !   start_new_channel(ref^.u4);
35270 1214   91   ! !   !       !   !   (*q if test_b then
35280 1215   92   ! !   !       !   !   testout(z,"hwstatus= 8.",((ref^.u2 div 8)*10+(ref^.u2 mod 8))*100+ref^.u4); q*)
35290 1216   93   ! !   !       !   !   *>
35300 1217   94   ! !   !       !   END;
35310 1218   95   ! !   !       END;
35320 1219   96   ! !   ! 
35330 1220   97   ! !   ! signal(ref,lamsem);
35340 1221   98   ! !   END
35350 1222   99   ! !    
\f

hjlaplst    81.05.19.   11.44.                                                    page    40

36010 1223  100   ! ! ELSE
36020 1224  101   ! !     (*          it is a timeoutbuffer from systemtimer *)
36030 1225  102   ! !   IF ownertest(timerpool,ref) THEN
36040 1226  103   ! !     BEGIN
36050 1227  104   ! !     ! ref^.u3:=250; ref^.u4:=2;
36060 1228  105   ! !     ! sendtimer(ref);
36070 1229  106   ! !     ! FOR channel_no:=0 TO 31 DO WITH channel_descriptor(channel_no) DO
36080 1230  107   ! !     !     IF timeout>0 THEN
36090 1231  108   ! !     !       BEGIN
36100 1232  109   ! !     !       ! timeout:=timeout-1;
36110 1233  110   ! !     !       ! IF timeout=0 THEN
36120 1234  111   ! !     !       !   IF channel_kind = tty_read_channel THEN
36130 1235  112   ! !     !       !     IF NOT nil(channel_descriptor(channel_no-1).request) THEN
36140 1236  113   ! !     !       !       BEGIN
36150 1237  114   ! !     !       !       ! channel_descriptor(channel_no-1).reading_tty := false;
36160 1238  115   ! !     !       !       ! start_next_request(channel_no-1);
36170 1239  116   ! !     !       !       ! 
36180 1240  117   ! !     !       !       ! LOCK request AS buf:drvbuffer DO
36190 1241  118   ! !     !       !       !   BEGIN
36200 1242  119   ! !     !       !       !   ! IF channel_descriptor(channel_no).next>buf.first THEN
36210 1243  120   ! !     !       !       !   !   outword( packed_word( 60, channel_no), channelmessage)
36220 1244  121   ! !     !       !       !   ! ELSE
36230 1245  122   ! !     !       !       !   !   outword( packed_word(del, channel_no), channelmessage);
36240 1246  123   ! !     !       !       !   END
36250 1247  124   ! !     !       !       END
36260 1248  125   ! !     !       !     ELSE
36270 1249  126   ! !     !       !       stop_actual_request
36280 1250  127   ! !     !       !       ( timeout_err, channel_no)
36290 1251  128   ! !     !       !     ELSE
36300 1252  129   ! !     !       !       BEGIN
36310 1253  130   ! !     !       !       ! stop_actual_request
36320 1254  131   ! !     !       !       ! ( timeout_err, channel_no);
36330 1255  132   ! !     !       !       ! IF channel_no MOD 2 = 0 THEN start_new_channel ( channel_no)
36340 1256  133   ! !     !       !       END;
36350 1257  134   ! !     !       END;
36360 1258  135   ! !     END
36370 1259  136   ! !      
\f

hjlaplst    81.05.19.   11.44.                                                    page    41

37010 1260  137   ! !   ELSE
37020 1261  138   ! !       (*                   it is a delaybuffer from systemtimer *)
37030 1262  139   ! !     IF ownertest( delaypool, ref) THEN
37040 1263  140   ! !       BEGIN
37050 1264  141   ! !       ! channel_no:=ref^.u1 DIV 2;
37060 1265  142   ! !       ! WITH channel_descriptor(channel_no) DO
37070 1266  143   ! !       !   BEGIN
37080 1267  144   ! !       !   ! 
37090 1268  145   ! !       !   ! CASE (ref^.u1 MOD 2) OF
37100 1269  146   ! !       !   ! ! 0:
37110 1270  147   ! !       !   ! !   BEGIN
37120 1271  148   ! !       !   ! !   !   (*q if test_b then
37130 1272  149   ! !       !   ! !   !   testout( z, "end-rts-dlay", channel_no); q*)
37140 1273  150   ! !       !   ! !   ! channel_kind:=at_write_channel;
37150 1274  151   ! !       !   ! !   ! interruptable := true;
37160 1275  152   ! !       !   ! !   ! handle_ok_lam_int( 0,channel_no);
37170 1276  153   ! !       !   ! !   END;
37180 1277  154   ! !       !   ! ! 1:
37190 1278  155   ! !       !   ! !   BEGIN
37200 1279  156   ! !       !   ! !   !   (*q if test_b then
37210 1280  157   ! !       !   ! !   !   testout( z, "end-rtr-dlay", channel_no); q*)
37220 1281  158   ! !       !   ! !   ! IF request^.u1 = write_at THEN stop_actual_request
37230 1282  159   ! !       !   ! !   !   ( ok_result, channel_no)
37240 1283  160   ! !       !   ! !   ! ELSE stop_actual_request
37250 1284  161   ! !       !   ! !   !   ( go_on_read, channel_no);
37260 1285  162   ! !       !   ! !   END;
37270 1286  163   ! !       !   ! ! OTHERWISE (*q testout( z, "timer fault ", channel_no) q*);
37280 1287  164   ! !       !   ! END;
37290 1288  165   ! !       !   ! 
37300 1289  166   ! !       !   ! release(ref);
37310 1290  167   ! !       !   END
37320 1291  168   ! !       END
37330 1292  169   ! !       
37340 1293  170   ! !     ELSE
37350 1294  171   ! !       IF ref^.u3 = dummy_route THEN  return ( ref)
37360 1295  172   ! !          
\f

hjlaplst    81.05.19.   11.44.                                                    page    42

38010 1296  173   ! !       ELSE
38020 1297  174   ! !           (*       it is a userbuffer *)
38030 1298  175   ! !         
38040 1299  176   ! !         BEGIN
38050 1300  177   ! !         !   (*       devicenumber is equal to portno *2  *)
38060 1301  178   ! !         ! channel_no:=ref^.u2 * 2;
38070 1302  179   ! !         ! 
38080 1303  180   ! !         !   (*       if command is pure read the devicenumber is uneven *)
38090 1304  181   ! !         ! IF ref^.u1 MOD 4 = 1 THEN channel_no:=channel_no+1;
38100 1305  182   ! !         ! 
38110 1306  183   ! !         ! CASE ref^.u1 OF
38120 1307  184   ! !         ! ! 
38130 1308  185   ! !         ! ! create_at_ch:
38140 1309  186   ! !         ! !   BEGIN
38150 1310  187   ! !         ! !   ! createchannel(at_write_channel, at_read_channel);
38160 1311  188   ! !         ! !   ! start_new_channel(channel_no);
38170 1312  189   ! !         ! !   END;
38180 1313  190   ! !         ! ! 
38190 1314  191   ! !         ! ! create_alc_ch:
38200 1315  192   ! !         ! !   BEGIN
38210 1316  193   ! !         ! !   ! createchannel(alc_write_channel, alc_read_channel);
38220 1317  194   ! !         ! !   ! start_new_channel(channel_no);
38230 1318  195   ! !         ! !   END;
38240 1319  196   ! !         ! ! 
38250 1320  197   ! !         ! ! create_tty_ch:
38260 1321  198   ! !         ! !   BEGIN
38270 1322  199   ! !         ! !   ! createchannel(tty_write_channel, tty_read_channel);
38280 1323  200   ! !         ! !   ! channel_descriptor(channel_no).interruptable:=true;
38290 1324  201   ! !         ! !   ! channel_descriptor(channel_no+1).interruptable:=true;
38300 1325  202   ! !         ! !   ! start_new_channel(channel_no);
38310 1326  203   ! !         ! !   END;
38320 1327  204   ! !         ! ! 
38330 1328  205   ! !         ! ! 
38340 1329  206   ! !         ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    43

39010 1330  207   ! !         ! ! read_at, write_at, write_read_at :
39020 1331  208   ! !         ! !   
39030 1332  209   ! !         ! !   WITH channel_descriptor(channel_no) DO
39040 1333  210   ! !         ! !     IF (channel_kind<at_write_channel) OR (channel_kind > at_read_wait) THEN
39050 1334  211   ! !         ! !       BEGIN
39060 1335  212   ! !         ! !       ! ref^.u2 := illegal_function;
39070 1336  213   ! !         ! !       ! return( ref)
39080 1337  214   ! !         ! !       END
39090 1338  215   ! !         ! !     ELSE
39100 1339  216   ! !         ! !       IF NOT nil(request) THEN signal(ref,queue(channel_no))
39110 1340  217   ! !         ! !       ELSE
39120 1341  218   ! !         ! !         BEGIN
39130 1342  219   ! !         ! !         ! request:=:ref;
39140 1343  220   ! !         ! !         ! start_next_request(channel_no);
39150 1344  221   ! !         ! !         END;
39160 1345  222   ! !         ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    44

40010 1346  223   ! !         ! ! alc_read, alc_write, write_alc_read :
40020 1347  224   ! !         ! !   
40030 1348  225   ! !         ! !   BEGIN
40040 1349  226   ! !         ! !   ! IF ref^.u3 >= command THEN
40050 1350  227   ! !         ! !   !   BEGIN
40060 1351  228   ! !         ! !   !   ! LOCK ref AS buf : drvbuffer DO
40070 1352  229   ! !         ! !   !   !   BEGIN
40080 1353  230   ! !         ! !   !   !   ! i := buf.first;
40090 1354  231   ! !         ! !   !   !   ! j := buf.last;
40100 1355  232   ! !         ! !   !   !   END;
40110 1356  233   ! !         ! !   !   ! k:= ref^.size;
40120 1357  234   ! !         ! !   !   ! 
40130 1358  235   ! !         ! !   !   ! IF (i<6) OR (j<i) OR (j > (k-1+k)) THEN
40140 1359  236   ! !         ! !   !   !   BEGIN
40150 1360  237   ! !         ! !   !   !   !   (*q if test_b then
40160 1361  238   ! !         ! !   !   !   !   testout( z,"buffer small", ref^.size); q*)
40170 1362  239   ! !         ! !   !   !   ! ref^.u2:=buffer_too_small;
40180 1363  240   ! !         ! !   !   !   ! return( ref);
40190 1364  241   ! !         ! !   !   !   END;
40200 1365  242   ! !         ! !   !   END;
40210 1366  243   ! !         ! !   ! 
40220 1367  244   ! !         ! !   ! 
40230 1368  245   ! !         ! !   ! IF NOT nil( ref) THEN
40240 1369  246   ! !         ! !   !   WITH channel_descriptor(channel_no) DO
40250 1370  247   ! !         ! !   !     IF (channel_kind<alc_write_channel) OR (channel_kind>alc_read_channel) THEN
40260 1371  248   ! !         ! !   !       BEGIN
40270 1372  249   ! !         ! !   !       ! ref^.u2:=illegal_function;
40280 1373  250   ! !         ! !   !       ! return( ref);
40290 1374  251   ! !         ! !   !       END
40300 1375  252   ! !         ! !   !     ELSE
40310 1376  253   ! !         ! !   !       BEGIN
40320 1377  254   ! !         ! !   !       ! 
40330 1378  255   ! !         ! !   !       ! IF NOT nil(request) THEN signal( ref, queue(channel_no))
40340 1379  256   ! !         ! !   !       ! ELSE
40350 1380  257   ! !         ! !   !       !   BEGIN
40360 1381  258   ! !         ! !   !       !   ! request :=: ref;
40370 1382  259   ! !         ! !   !       !   ! start_next_request(channel_no);
40380 1383  260   ! !         ! !   !       !   ! IF channel_kind=alc_write_channel THEN handle_ok_lam_int(0,channel_no);
40390 1384  261   ! !         ! !   !       !   END;
40400 1385  262   ! !         ! !   !       END
40410 1386  263   ! !         ! !   END;
40420 1387  264   ! !         ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    45

41010 1388  265   ! !         ! ! read_tty:
41020 1389  266   ! !         ! !   
41030 1390  267   ! !         ! !   WITH channel_descriptor(channel_no) DO
41040 1391  268   ! !         ! !     IF channel_kind < tty_write_channel THEN
41050 1392  269   ! !         ! !       BEGIN
41060 1393  270   ! !         ! !       ! ref^.u2:=illegal_function;
41070 1394  271   ! !         ! !       ! return(ref);
41080 1395  272   ! !         ! !       END
41090 1396  273   ! !         ! !     ELSE
41100 1397  274   ! !         ! !       BEGIN
41110 1398  275   ! !         ! !       ! LOCK ref AS buf : drvbuffer DO
41120 1399  276   ! !         ! !       !   BEGIN
41130 1400  277   ! !         ! !       !   ! i:= buf.first;
41140 1401  278   ! !         ! !       !   ! j:= buf.last;
41150 1402  279   ! !         ! !       !   END;
41160 1403  280   ! !         ! !       ! IF (j<i)
41170 1404  281   ! !         ! !       !   OR (i<1)
41180 1405  282   ! !         ! !       !   OR (j-i >= 2*ref^.size-6) THEN
41190 1406  283   ! !         ! !       !   BEGIN
41200 1407  284   ! !         ! !       !   ! ref^.u2 := illegal_function;
41210 1408  285   ! !         ! !       !   ! return( ref);
41220 1409  286   ! !         ! !       !   END;
41230 1410  287   ! !         ! !       ! 
41240 1411  288   ! !         ! !       ! IF NOT nil( ref) THEN
41250 1412  289   ! !         ! !       !   IF NOT nil ( request) THEN signal ( ref, queue(channel_no))
41260 1413  290   ! !         ! !       !   ELSE
41270 1414  291   ! !         ! !       !     BEGIN   (*  start now  *)
41280 1415  292   ! !         ! !       !     ! request :=: ref;
41290 1416  293   ! !         ! !       !     !   (*   look if write_tty is going on  *)
41300 1417  294   ! !         ! !       !     ! IF nil(channel_descriptor(channel_no-1).request) THEN
41310 1418  295   ! !         ! !       !     !   start_next_request(channel_no)
41320 1419  296   ! !         ! !       !     END;
41330 1420  297   ! !         ! !       END;
41340 1421  298   ! !         ! !  
\f

hjlaplst    81.05.19.   11.44.                                                    page    46

42010 1422  299   ! !         ! ! write_tty,write_read_tty :
42020 1423  300   ! !         ! !   
42030 1424  301   ! !         ! !   WITH channel_descriptor(channel_no) DO
42040 1425  302   ! !         ! !     IF channel_kind<tty_write_channel THEN
42050 1426  303   ! !         ! !       BEGIN
42060 1427  304   ! !         ! !       ! ref^.u2:=illegal_function;
42070 1428  305   ! !         ! !       ! return(ref);
42080 1429  306   ! !         ! !       END
42090 1430  307   ! !         ! !     ELSE
42100 1431  308   ! !         ! !       BEGIN
42110 1432  309   ! !         ! !       ! LOCK ref AS buf : drvbuffer DO
42120 1433  310   ! !         ! !       !   BEGIN
42130 1434  311   ! !         ! !       !   ! i := buf.first;
42140 1435  312   ! !         ! !       !   ! j := buf.last;
42150 1436  313   ! !         ! !       !   ! buf.next:=buf.first;
42160 1437  314   ! !         ! !       !   END;
42170 1438  315   ! !         ! !       ! IF (j<i)
42180 1439  316   ! !         ! !       !   OR (i<1)
42190 1440  317   ! !         ! !       !   OR (j-i >= 2*ref^.size-6) THEN
42200 1441  318   ! !         ! !       !   BEGIN
42210 1442  319   ! !         ! !       !   ! ref^.u2 := illegal_function;
42220 1443  320   ! !         ! !       !   ! return( ref);
42230 1444  321   ! !         ! !       !   END;
42240 1445  322   ! !         ! !       ! IF NOT nil( ref) THEN
42250 1446  323   ! !         ! !       !   IF NOT nil (request) THEN
42260 1447  324   ! !         ! !       !     signal ( ref, queue(channel_no))
42270 1448  325   ! !         ! !       !   ELSE
42280 1449  326   ! !         ! !       !     BEGIN
42290 1450  327   ! !         ! !       !     ! request :=: ref;
42300 1451  328   ! !         ! !       !     !   (*   look if read_tty is going on   *)
42310 1452  329   ! !         ! !       !     ! 
42320 1453  330   ! !         ! !       !     ! IF channel_kind <> tty_wait_input THEN
42330 1454  331   ! !         ! !       !     !   IF reading_tty THEN
42340 1455  332   ! !         ! !       !     !     WITH channel_descriptor(channel_no+1) DO
42350 1456  333   ! !         ! !       !     !       LOCK request AS buf:drvbuffer DO
42360 1457  334   ! !         ! !       !     !         BEGIN
42370 1458  335   ! !         ! !       !     !         ! IF next>buf.first THEN
42380 1459  336   ! !         ! !       !     !         !   timeout:=normal_time
42390 1460  337   ! !         ! !       !     !         ! ELSE
42400 1461  338   ! !         ! !       !     !         !   timeout:=no_time
42410 1462  339   ! !         ! !       !     !         END
42420 1463  340   ! !         ! !       !     !       ELSE
42430 1464  341   ! !         ! !       !     !         BEGIN
42440 1465  342   ! !         ! !       !     !         ! start_next_request(channel_no);
42450 1466  343   ! !         ! !       !     !         ! IF NOT nil( request) THEN
42460 1467  344   ! !         ! !       !     !         !   handle_ok_lam_int ( 0, channel_no);
\f

hjlaplst    81.05.19.   11.44.                                                    page    47

42470 1468  345   ! !         ! !       !     !         END;
42480 1469  346   ! !         ! !       !     END;
42490 1470  347   ! !         ! !       END
42500 1471  348   ! !         ! !        
\f

hjlaplst    81.05.19.   11.44.                                                    page    48

43010 1472  349   ! !         ! !       OTHERWISE
43020 1473  350   ! !         ! !       BEGIN
43030 1474  351   ! !         ! !       !   (*q if test_b then
43040 1475  352   ! !         ! !       !   testout ( z, "unknown     ", ref^.u1); q*)
43050 1476  353   ! !         ! !       ! ref^.u2:=illegal_function;
43060 1477  354   ! !         ! !       ! return(ref);
43070 1478  355   ! !         ! !       END
43080 1479  356   ! !         ! END;
43090 1480  357   ! !         ! 
43100 1481  358   ! !         END   (*  user request  *)
43110 1482  359   ! !         
43120 1483  360   ! UNTIL  forever
43130 1484  361   ! 
43140 1485  362   END.     (*  lam driver   *)
43150 1486      
\f

hjlaplst    81.05.19.   11.44.                                                    page    49

           0   33*   68*  153*  155*  165*  173*  182*  222*  290*  306   380   482   525   670   697 
              763   846   871  1056* 1058* 1092  1130  1166  1169  1229  1230  1233  1255  1269: 1275 
             1383  1467 
           1   30*   42*   69*  165*  203*  283   299   302   307   364   373   390   445   446   450 
              452   453   486   489   495   496   504   505   560   632   651   663:  673   691   695 
              696   699   701   715   753:  780   784   843   849   850   862   869   883   888   902 
              906   910   916   919   921   923   927   935   941   947   957   973   984  1008  1048*
             1142  1232  1235  1237  1238  1277: 1304  1304  1324  1358  1404  1417  1439  1455 
           2   30*   70*   94*  114*  263   283   298   299   301   302   342   353   381   426   533 
              534   665   667:  757   760:  924  1092  1151  1157  1227  1255  1264  1268  1301  1405 
             1440 
           3   71*   95*  577   672   676:  764   767: 1056* 1204 
           4   41*   72*  680   685:  727   771   775: 1304 
           5   49*   64*   73*   86*   89*  672   697   702   705:  764   785   790:
           6   74*  117*  691   717   721:  780   793   798:  883   886   886   916   941   945   945 
              973  1150  1160  1358  1405  1440 
           7   40*   48*   75*  173*  802   807:
           8   76*   96*  114*  577   702   727  1204 
           9   77*
          10   39*   78*   85*   97*  392 
          11   79*
          12   80*
          13   88*   98*
          15   29*  182*  290*
          16  202*
          19   64*   99*
          20   64*
          21   64*
          24   56* 1047*
          27  100*
          28   64*  104*
          29   64*
          31 1058* 1229 
          32   36*   48*   49*  101*  577 
          40   52* 1049*
          41   53*
          44   54*
          45   55*
          60 1243 
          64 1099 
         127  102*
         128  306 
         200   34*
         250 1151  1227 
\f

hjlaplst    81.05.19.   11.44.                                                    page    50

         255 1050*
         256  353   426   471   534   740   823 
alc_read       61* 1346:
alc_read_channel                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               74*  391   458   657: 1316  1370 
alc_write      60* 1346:
alc_write_channel                                                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               73*  458   744: 1316  1370  1383 
alfa          229*  232*
alloc         260   280  1140  1148  1159 
al_env_version                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
             1127 
as            304:  370:  386:  622:  644:  689:  711:  768:  778:  848:  881:  903:  914:  939:  971:
             1240: 1351: 1398: 1432: 1456:
atbuffer      164*  304   622   644 
at_read_channel                                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               71*  641: 1310 
at_read_wait   72*  420   424:  436  1333 
at_write_channel                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               69*  350   417:  428   535   606: 1273  1310  1333 
at_write_wait                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               70*  358 
boolean       184*  185*  221*  567* 1057*
bs             96*  901:  907 
buf           304:  306   307   370:  372   373   386:  388   388   622:  631   644:  645=  689:  694 
              694   695   695   698   698   711:  713   713   768:  770   770   778:  783   783   784 
              784   785   785   848:  850   852   881:  887   890   903:  904   914:  920   923   924 
              927   939:  946   949   971:  983   986  1240: 1242  1351: 1353  1354  1398: 1400  1401 
             1432: 1434  1435  1436  1436  1456: 1458 
buffer_too_small                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              116* 1362 
byte          165*  172*  183*  218*  248*  406*  518*  584*  691   780   883   916   941   973  1055*
c             337*  353=  354   408*  426=  427   531*  534=  536=  536   538=  538   540 
channel      1080 
channelmessage                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              195*  354   427   540   575   631   822   856   896   907   928   954   983  1006  1014 
             1021  1062* 1077  1080  1083  1085  1098  1142  1142  1243  1245 
channelrecord                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              179*  213*
channelset    153*  174*  213*  215*  248*  336*  406*  518*  530*  543*  567*  584*
channel_descriptor                                               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              213*  298   299   301   302   339   364   413   436   445   446   452   452   457   473 
              477   480   486   489   495   504   535   553   555   561   573   602   843   862   872 
              877   902   910   919   935   957  1167  1193  1229  1235  1237  1242  1265  1323  1324 
             1332  1369  1390  1417  1424  1455 
\f

hjlaplst    81.05.19.   11.44.                                                    page    51

channel_kind  182*  298=  299=  350   358=  363   391   415   420=  428=  436   458   458   484   500 
              535   604   847=  855=  898=  919= 1009= 1015= 1022= 1170= 1196  1234  1273= 1333  1333 
             1370  1370  1383  1391  1425  1453 
channel_no    208*  248*  253*  263   273*  283   336*  339   342   353   353   357   364   406*  413 
              419   426   426   436   445   446   450   452   452   453   457   473   477   480   483 
              486   489   491   495   496   504   505   508   512   518*  526   530*  533=  533   533 
              534   534   535   543*  552   553   555   558   560=  560   561   564   567*  573   575 
              584*  602   614   616   631   654   702   727   734   810   822   843   856   857   862 
              869   872   873   877   894   896   902   907   910   919   928   935   953   954   957 
              983   991   994  1006  1008  1014  1021  1157= 1166= 1167  1229= 1229  1235  1237  1238 
             1242  1243  1245  1250  1254  1255  1255  1264= 1265  1275  1282  1284  1301= 1304= 1304 
             1311  1317  1323  1324  1325  1332  1339  1343  1369  1378  1382  1383  1390  1412  1417 
             1418  1424  1447  1455  1465  1467 
checksum      186*  670=  724   740=  740   763=  801   823=  823 
command       104*  385   672   710   764  1349 
control       235*  354   427   540 
controlclr   1066* 1083 
controle_byte                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              218*  306=  353   426   534 
copychm       226* 1142 
cr             98*  856   896   909:  928  1014 
create       1130 
createchannel                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              290* 1310  1316  1322 
create_alc_ch                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               63* 1314:
create_at_ch 1308:
create_done   115*  558   564   867 
create_it_ch   63*
create_tty_ch                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
             1320:
cs             99*  861:  887 
data          172*  524= 1055* 1102 
databits      518*  524 
dataword     1053* 1063* 1069*
data_byte     584*  645   665   669   671   672   679   694   708   724   740   756=  762=  764   770=
              783=  792=  801=  822   823   839   920   946   954 
del           102*  901: 1245 
delaypool     202*  260   280  1262 
driver        197* 1130  1131 
drvbuffer     158*  370   386   711   768   848   903  1240  1351  1398  1432  1456 
dummy_route  1294 
echo_nl_on_channel                                               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               77*  898   919  1003: 1196 
\f

hjlaplst    81.05.19.   11.44.                                                    page    52

error        1057* 1096 
esc           100*  841:
etx            95*  708   792 
external      226*  229*  232*  235*  238*  242* 1066* 1069* 1072*
false          44*  489   495   511   580  1171  1172  1237 
first         160*  388   690:  713   770   779:  882:  904   915:  940:  972: 1242  1353  1400  1434 
             1436  1458 
forever        44* 1483 
go_on_read    117*  439   614   991  1284 
handle_ok_lam_int                                                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              584* 1200  1275  1383  1467 
highlevellamdriver                                               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
             1044* 1130 
hl_lam_pri   1131 
i             220*  295*  297=  298   299   301   302   306   307   688=  691   691   777=  780   780 
              879=  883   883   886   886   886   886   912=  916   916   937=  941   941   945   945 
              945   945   969=  973   973  1353= 1358  1358  1400= 1403  1404  1405  1434= 1438  1439 
             1440 
illegal_function                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              113*  116* 1335  1372  1393  1407  1427  1442  1476 
ill_func      113*
incname      1125 
indata       1063* 1085  1089 
info          691:  694=  780:  783 
integer         4*    5*  160*  186*  189*  190*  208*  220*  222*  226*  232*  235*  242*  242*  253*
              273*  295*  337*  408*  531*  690   779   882   915   940   972  1064* 1066* 1072* 1072*
interruptable                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              184*  365=  511= 1171= 1195  1274= 1323= 1324=
interrupt_ok 1049* 1091 
inword       1069* 1085 
j             220* 1354= 1358  1358  1401= 1403  1405  1435= 1438  1440 
k             220* 1356= 1358  1358 
lam             2*
lampool       205* 1140  1159  1188 
lamsem        199* 1044* 1077  1087  1130  1145  1161  1220 
lamword       170*  238*  518*  522*
last          160*  373   690:  698   770   779:  785   882:  915:  940:  972: 1354  1401  1435 
level           5* 1142 
lock          304:  370:  386:  622:  644:  689:  711:  768:  778:  848:  881:  903:  914:  939:  971:
             1240: 1351: 1398: 1432: 1456:
long_time      39*
mainsem         6*  260   280  1140  1148  1159  1186 
mask           33* 1142 
max_channel_no                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               30*  153* 1166 
\f

hjlaplst    81.05.19.   11.44.                                                    page    53

max_port_no    29*   30*  155*
next          160*  188*  372=  372   380=  388=  608   631   632=  632   645   651=  651   652   679=
              690:  694   695=  695   696=  696   697   698   713=  779:  783   784=  784   785   849 
              850=  850   852=  852   882:  886   886=  887   888=  888   889   890=  890   892   904 
              906=  906   915:  920   921   923   924=  924   927=  927   940:  945   945=  946   947=
              947   948   949=  949   951   972:  983   984=  984   985   986=  986   988  1242  1436=
             1458 
nl             97*  923  1006  1021 
normal_time    40*  958   959  1459 
not_created    68* 1170 
no_input     1050* 1094 
no_of_lambufs                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               36*  205* 1157 
no_time        42* 1461 
ok_result     310   616   654   734   810   894   953   994  1008  1282 
old_result    183*  421=  429   669=  731 
opsem           3* 1125 
op_codes       64*  671 
outword       238*  631   822   856   896   907   928   954   983  1006  1014  1021  1243  1245 
overrun        53*
overrun_and_parity                                               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               55*
own          1125 
ownertest    1188  1225  1262 
packed_word   518*  527=  631   822   856   896   907   928   954   983  1006  1014  1021  1243  1245 
parity         54*
persistent_error                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              112*
persi_err     112*
pool          202*  203*  205*
portset       155*  218*
port_and_bit15                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              174*  526= 1058* 1092  1098  1103 
process         2* 1044*
pu              4*
queue         215*  450   483   869  1339  1378  1412  1447 
reading_tty   185*  364=  489=  495=  844   863   902   910   935   957   964  1007  1172= 1237= 1454 
readytoread    49*  426   536 
readytosend    56* 1047*
ready_to_send                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              567*  578=  580=
read_at      1330:
read_it        61*
read_tty     1388:
\f

hjlaplst    81.05.19.   11.44.                                                    page    54

ref           195*  258*  260   261   262   263   266   278*  280   281   282   283   286   297   304:
              310   311  1062* 1087  1089  1115  1140  1142  1145  1148  1150  1151  1151  1153  1159 
             1160  1161  1186  1188  1193  1198  1200  1200  1204  1205  1220  1225  1227  1227  1228 
             1262  1264  1268  1289  1294  1294  1301  1304  1306  1335  1336  1339  1342  1349  1351:
             1356  1362  1363  1368  1372  1373  1378  1381  1393  1394  1398: 1405  1407  1408  1411 
             1412  1415  1427  1428  1432: 1440  1442  1443  1445  1447  1450  1476  1477 
reference     181*  195*  226*  235*  238*  242*  258*  278* 1062* 1066* 1069* 1072*
release      1289 
request       181*  368   370:  378   385   386:  445   448   449   450   452=  452   471   473   477 
              483   486   488   502   504   511   556   562   612   622:  644:  688   689:  710   711:
              731   762   768:  777   778:  848:  865   867   868   869   872   879   881:  903:  912 
              914:  937   939:  969   971:  989  1196  1235  1240: 1281  1339  1342= 1378  1381= 1412 
             1415= 1417  1446  1450= 1456: 1466 
requesttosend                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               48*  353   538 
reservech    1142 
result        248*  406*  421   429=  439   473 
return        311   449   477   868  1115  1294  1336  1363  1373  1394  1408  1428  1443  1477 
rtr_delay_u3   88*  281 
rtr_delay_u4   89*  282 
rts_delay_u3   85*  261 
rts_delay_u4   86*  262 
r_kind        290*  299 
s             260   280  1140  1148  1159 
semaphore     199*  215*  229* 1044*
sempointer      3*
sendtimer     266   286  1153  1228 
sense         242*  575  1072* 1098 
sensesem      450   483   869 
set_lam_control                                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              530*  552  1205 
shadow        197*
short_time     41*
signal       1145  1161  1220  1339  1378  1412  1447 
size          688   777   879   912   937   969  1356  1405  1440 
sp            101*
start        1131 
startscanner 1048* 1083 
start_new_channel                                                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              543* 1255  1311  1317  1325 
start_next_request                                               <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              336*  453   491   496   505   508   512   857   873  1238  1343  1382  1418  1465 
start_rtr_delay                                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              273*  419 
\f

hjlaplst    81.05.19.   11.44.                                                    page    55

start_rts_delay                                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              253*  357 
status        190*  301=  302=  471   553=  575   577  1064* 1098  1099  1198= 1199 
std           173*  525=
stop_actual_request                                              <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              247*  405*  557   563   613   615   653   702   726   733   809   893   952   990   993 
             1008  1203  1249  1253  1281  1283 
store          34* 1130 
stx            94*  665   756 
testopen      229* 1125 
testout       232* 1127 
test_b        221* 1142 
text          883:  887=  916:  920=  923=  941:  946=  973:  983 
time          218*  307=  342 
timeout       187*  342=  392=  392   482=  846=  871=  958   959= 1169= 1230  1232= 1232  1233  1459=
             1461=
timeout_err  1250  1254 
timerpool     203* 1148  1225 
top           189*  373=  381=  390=  608   652   661   665=  672=  672=  673=  680=  697=  699=  701 
              715=  717=  751   757=  764=  764=  771=  785=  793=  802=  889   892   921   948   951 
              985   988 
transient_error                                                  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              111*  114*  702   727  1204 
transi_err    111*
true          364   365   578  1081  1274  1323  1324 
tst           222*
ts_pointer      6*
tty_read_channel                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               76*  363   484   828: 1234  1322 
tty_wait_cr    78*  847  1012:
tty_wait_input                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               80* 1022  1026: 1453 
tty_wait_nl    79*  855  1015  1019:
tty_write_channel                                                <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               75*  500   962: 1009  1322  1391  1425 
u1            263=  283=  368   378   612   989  1150= 1160= 1264  1268  1281  1304  1306 
u2            297   310=  448=  473=  867= 1091= 1099= 1198  1301  1335= 1362= 1372= 1393= 1407= 1427=
             1442= 1476=
u3            261=  281=  385   710   731=  762  1094= 1102= 1151= 1200  1227= 1294  1349 
u4            262=  282=  471= 1103= 1151= 1193  1200  1204  1205  1227=
unused       1056*
version        27* 1127 
w             522*  524   525   526   527  1186 
wait         1077  1087  1186 
\f

hjlaplst    81.05.19.   11.44.                                                    page    56

write_alc_read                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               62*  368  1346:
write_at     1281  1330:
write_error   114*
write_it       60*
write_read_at                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              378   612  1330:
write_read_it                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               62*
write_read_mixed                                                 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              115*  448 
write_read_ok                                                    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
               52*  301   302   553  1199 
write_read_tty                                                   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
              989  1422:
write_tty    1422:
w_kind        290*  298 
x             226*  229*  232*  235*  238*  242* 1066* 1069* 1072*
y             226*  229*  232*  235*  238*  242* 1066* 1069* 1072*
z             210*  229*  232*  242* 1072* 1125  1127 
zone          210*  229*  232*
\f

hjlaplst    81.05.19.   11.44.                                                    page    57

AND                1
ARRAY             10
BEGIN            123
CASE               7
CONST              2
DIV                6
DO                51
ELSE              46
END              140
FOR                3
FORWARD            1
FUNCTION           3
IF                94
IN                 1
MOD               11
NIL               21
NOT               19
OF                17
OR                10
OTHERWISE          5
PACKED             2
PROCEDURE         17
RECORD            10
REPEAT             1
THEN              94
TO                 3
TYPE               2
UNTIL              1
VAR               23
WHILE              5
WITH              22
81.05.19.      11.44.                         pascal80     version 1981.04.01

\f


81.05.19.      11.46.            platon, pass3, version 81.04.03
*** pass 3 line  989.3, error  1
*** pass 3 line 1131.4, error  1
*** pass 3 line 1422.2, error  1
*** pass 3 line 1422.2, error 30

error   description
   1 =  undeclared,            (* identifier not declared *)
  30 =  case_incompatible,     (* case-expression/caselabels not of compatible types *)
*** compilation terminated after pass3

end
blocksread = 186
«eof»