DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

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

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦70bd73c14⟧ TextFile

    Length: 26112 (0x6600)
    Types: TextFile
    Names: »tsdtejob«

Derivation

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

TextFile

job oer 6 200 time 11 0 area 10 size 100000
(
source = copy 25.1
tsdtelst = set 1 disc1
tsdteerr = set 1 disc1
tsdtelst = indent source mark lc
listc = cross tsdtelst
o tsdteerr
message ts dte sim
pascal80  codesize.1024 alarmenv paxenv source
o c
lookup pass6code
if ok.yes
( tsdtebin = set 1 disc1
tsdtebin = move pass6code
scope user tsdtebin
)
tsdtelst = copy listc tsdteerr
scope user tsdtelst
scope user tsdteerr
finis output.no
)

process  dtesimulator(
op_sem   : sempointer;  (* operator semaphore *)
var
pax_pool_sem,
dte_sem : !ts_pointer;
var
netc_sem,
rut_trm_sem,
(*              equal to utrm at local receiver *)
rut_rec_sem  : !sempointer;   
(*              equal to urec at local transmitter *)
dte_adr : int_pax_addr
);

const
version = "vers  1.15 /";
(*----------------------*)

(*===================================================================
"                                                                   "
"  FUNCTION : DTE establishes a connection between PAXCON and       "
"             ROUTER in the prototype of the alarmsystem.           "
"                                                                   "
"  STRATEGI : DTE converts one DTE-function to one ore more         "
"             ROUTER-functions.                                     "
"                                                                   "
=====================================================================*)

\f


(*   INTRODUCTION TO DTE   

Abbreviation list :
-----------------

mes               message

op                operator

ptr               pointer

sem               semaphore

ts                terminal station


Pseudo code version 80.12.19 :
----------------------------
*)
\f


(*-----------------------------------------------------------
-   constants                                               -
-------------------------------------------------------------*)
const

max_calls = max_stream_no-min_stream_no+1;
\f


(*--------------------------------------------------------------
.  string constants
----------------------------------------------------------------*)

t_01 = "dummy return";
t_02 = "stream table";
t_03 = "car_ref nil ";
t_04 = "car ref used";
t_05 = "l-rec-q     ";
t_06 = "dst-stream  ";
t_07 = "dst-adr     ";
t_08 = "diag-code   ";
t_09 = "entry used  ";
t_10 = "entry not us";

t_11 = "call index  ";
t_12 = "calls moved ";
t_13 = "get-trm-buf ";
t_14 = "** no paxbuf";
t_15 = "get-rec-buf ";
t_16 = "dst node no ";
t_17 = "ext addr no ";
t_18 = "connect rout";
t_19 = "dte connectd";
t_20 = "** conn err ";

t_21 = "no resources";
t_22 = "extensionerr";
t_23 = "sense ready ";
t_24 = "discon ext  ";
t_25 = "rut-reset   ";
t_26 = "transresult ";
t_27 = "rut_receive ";
t_28 = "rut pac stat";
t_29 = "rut pac from";
t_30 = "rec userfld ";

t_31 = "rec streamno";
t_32 = "rec-dte-car-";
t_33 = "** no callix";
t_34 = "** no ricbuf";
t_35 = "rec-dte-clr-";
t_36 = "rec-dte-aic-";
t_37 = "rec-dte-rej-";
t_38 = "rec-dtesdata";
t_39 = "** no rdata ";

t_40 = "** bad usfld";
t_41 = "rut status  ";
t_42 = "** bad rutfk";
t_43 = "** rut error";
t_44 = "** u2-------";
t_45 = "** status---";
t_46 = "netc-dte-car";
t_47 = "send-to-node";
t_48 = "netc-dte-clr";
t_49 = "netc-dte-aic";

t_50 = "netc-dte-rda";
t_51 = "rut transmit";
t_52 = "netc-dte-aic";
t_53 = "netc-dte-rej";
t_54 = "netc-dte-res";
t_55 = "netc-dtestat";
t_56 = "** bad dtefk";
t_57 = "** ill buffr";
\f


(*--------------------------------------------------------------
-  types                                                       -
----------------------------------------------------------------*)
type

stream_e
= record
car_ref : reference;
l_rec_q : integer;
receive_queue : semaphore;
dst_stream : byte;
dst : int_pax_addr;
facility : integer;
state : state_type;
priority : byte;
diag_code : byte
end;

calls_e
= record
dst : int_pax_addr;
dst_stream : byte;
used : boolean ;
facility : integer;
end;
\f


(*-----------------------------------------------------------
.   variables section                                       .
-------------------------------------------------------------*)
var
i : integer;

ref,
rut_buf_ref,
in_ref   :  reference;

z : zone;

ric_pool : semaphore;

calls : array (1..max_calls) of calls_e;

streams : array ( min_stream_no..max_stream_no) of stream_e;

act_stream_no : integer;
act_dst : int_pax_addr;
act_user_field : integer;
act_call_no : integer;
act_result : byte;
act_diag_code : byte;
act_pac_state : byte:=0;

no_trm_bufs : integer := 0;

no_rec_bufs : integer := 0;


cur_facility : integer := 0;

tst : byte := 255;

(*
 8 - write actions on streams
16 - write results from router
32 - write table entryes
64 - write testsections
128 - write procedure calls
*)
\f


(*==============================================================
=   procedures section                                         =
================================================================*)

procedure ts_wait(
var
mes_ref  : reference;
sem_ptr  : sempointer
);

(*-----------------------------------------------------------
. wait with return of dummy messages                        -
-------------------------------------------------------------*)

begin

wait( mes_ref, sem_ptr^);

while mes_ref^.u3 = dummy_route do
begin
if tst>4 then
testout(z,t_01,mes_ref^.u1);
signal( mes_ref, pax_pool_sem.s^);
wait( mes_ref, sem_ptr^);
end;

end (* ts_wait *);

\f


function address( adr:int_pax_addr):integer;
begin
address :=
adr.net_addr*1000 +
adr.reg_addr*100  +
adr.node_addr*10  +
adr.ext_addr;
end;
\f


procedure write_stream (
i : byte );
(*-------------------------------------------------------
.   writes the content of stream table entry i
---------------------------------------------------------*)
begin
with streams(i) do
begin
testout(z,t_02,i);
if nil(car_ref) then
testout(z,t_03,i)
else
testout(z,t_04,i);
testout(z,t_05, l_rec_q);
testout(z,t_06, dst_stream);
testout(z,t_07,address(dst));
testout(z,t_08, diag_code);
end;
end;
\f


procedure write_call (
i : byte );
(*----------------------------------------------------
.  writes the content of calls table entry i
------------------------------------------------------*)
begin
with calls(i) do
begin
if used then
testout(z,t_09,i)
else
testout(z,t_10,i);
testout(z,t_07,address(dst));
testout(z,t_06, dst_stream);
end;
end;
\f


function call_resources (
var act_call_no : integer ): boolean;
(*-------------------------------------------------------------
.  looks for call-resources in dte
---------------------------------------------------------------*)

var i : integer := 1;
found : boolean := false;
begin
call_resources := true;

(*---- look if call exists ----*)

while (not found) and (i<=max_calls) do
if calls(i).used then
if ( calls(i).dst=act_dst) and (calls(i).dst_stream=act_stream_no) then
found := true
else
i:= i+1
else
i:= i+1;

if not found then
begin
(*---- find a free call entry ---*)

i:=1;

while (not found) and (i<=max_calls) do
if calls(i).used then
i := i+1
else
found := true;

if found then
begin
calls(i).used := true;
calls(i).dst_stream := act_stream_no;
calls(i).dst := act_dst;
end
else
call_resources := false;
end;
act_call_no := i;

if tst>32 then
testout(z,t_11,i);
end;
\f


procedure call_to_stream (
call_index ,
stream_index : byte );
(*-----------------------------------------------------
-   moves all call-values from calls to streams       -
-------------------------------------------------------*)
begin
with streams( stream_index) do
begin
dst_stream := calls( call_index).dst_stream;
dst := calls( call_index).dst;
facility := calls( call_index).facility;

if tst>32 then
begin
testout(z,t_12, call_index);
end;

end;

calls( call_index).used := false;
end;
\f


procedure clear_stream_table (
indx : byte );
(*-----------------------------------------------------------
.  clears the streamtable index stream-no
-------------------------------------------------------------*)
begin
if tst>32 then
write_stream(indx);

with streams( indx) do
begin
if not nil( car_ref) then
begin
car_ref^.u2 := dte_user_clear;
signal( car_ref, netc_sem^);
end;

dst_stream := 0;
dst := int_pax_addr(0,0,0,0);
facility := 0;
diag_code := 0;
state := clearing;
end;
end;
\f


procedure get_transmit_buf (
var ref : reference );
(*------------------------------------------------------
-   allocates a transmitbuffer and makes it ready for use
--------------------------------------------------------*)
begin
sensesem( ref, pax_pool_sem.w^);

if not nil( ref) then
begin
no_trm_bufs := no_trm_bufs +1;

if tst>128 then
testout(z,t_13, no_trm_bufs);

ref^.u1 := rut_trp;
ref^.u2 := rut_default;
ref^.u3 := rut_default;
ref^.u4 := from_link;

lock ref as buf : rut_trp_pdata do
begin
with buf.rut_prefix do
begin
first := l_rut_prefix;
last := l_rut_prefix + l_phead1 + l_control  -1;
ext_no := dte_adr.ext_addr;
end;

with buf.phead do
begin
format := rut_format_1;
priority := rut_prio_0;
packet_type := rut_pack_type;
state := 0;
org := dte_adr;
top_of_data := l_rut_prefix + l_phead1 + l_control ;
end;
end;
end
else
if tst>128 then
testout(z,t_14, 0);
end;
\f


procedure send_rpacket_bufs (
no_of_bufs : byte );
(*---------------------------------------------------------
-   sends receive packet buffers to router                -
-----------------------------------------------------------*)
var
i : integer;
ref : reference;
begin
for i := 1 to no_of_bufs do
begin
sensesem( ref, pax_pool_sem.w^);

if not nil( ref) then
begin
no_rec_bufs := no_rec_bufs +1;

if tst>128 then
testout(z,t_15, no_rec_bufs);

ref^.u1 := rut_rec;
ref^.u2 := rut_default;
ref^.u3 := rut_default;
ref^.u4 := from_link;

lock ref as rec : rut_trp_pdata do
with rec do
begin
with rec.rut_prefix do
begin
first := l_rut_prefix ;
last := first + max_l_data+ l_phead1-1;
ext_no := dte_adr.ext_addr;
end;

with rec.phead do
begin
format := rut_format_1;
priority:=0;
packet_type := rut_pack_type;
dst := int_pax_addr(0,0,0,0);
state := 0;
org := dte_adr;
facility := cur_facility;
top_of_data := rut_prefix.first + max_l_data +1;
user_field := rut_rec;
end;
end;

signal( ref, rut_rec_sem^);
end
else
if tst>128 then
testout(z,t_14,1);
end;
end;
\f


procedure act_destination;
(*--------------------------------------------------------------
-   converts an external paxnetaddress to an internal          -
-   paxnetaddress                                              -
----------------------------------------------------------------*)

var
i : integer := 0;
begin

lock in_ref as dte_buf : car_buf_type do
while (dte_buf.call_buf.dte_adr <> paxnet_config(i))
and (i<15) do i := i+1;

act_dst.net_addr := 0;
act_dst.reg_addr := 0;
act_dst.node_addr := i;
act_dst.ext_addr := 3;

if tst>64 then
testout(z,t_16,i);
end;
\f


function external_addr (
internal_addr : int_pax_addr
): ext_pax_addr;
(*--------------------------------------------------------------
-   converts an internal paxnetaddress to an external paxnetaddress
----------------------------------------------------------------*)
begin

if internal_addr.node_addr < 15 then
external_addr := paxnet_config( internal_addr.node_addr)
else
external_addr := paxnet_config(15);

if tst>64 then
testout(z,t_17, internal_addr.node_addr);
end;
\f


(*------------------------------------------------------------
.     MAIN PROGRAM                                           .
--------------------------------------------------------------*)
begin

testopen( z, own.incname, op_sem);
testout(  z, version    , al_env_version);

(* initialize streams-array  *)

for i := min_stream_no to max_stream_no do
with streams(i) do
begin
l_rec_q := 0;
dst_stream := 0;
dst := int_pax_addr(0,0,0,0);
facility := 0;
diag_code := 0;
state := free;
priority := rut_prio_0;
end;

(*  initialize call-array  *)

for i:= 1 to max_calls do
begin
calls(i).used := false;
calls(i).facility := 0;
end;
\f


(*---   connect extension in router   ---*)
(*-------------------------------------*)

sensesem( in_ref, pax_pool_sem.w^);

if not nil( in_ref) then
begin
in_ref^.u1 := rut_con;
in_ref^.u2 := rut_default;
in_ref^.u3 := rut_default;
in_ref^.u4 := from_link;

lock in_ref as buf : rut_prefix_type do
buf.ext_no := dte_adr.ext_addr;

signal( in_ref, rut_rec_sem^);

if tst>128 then
testout(z,t_18,1);
end;

send_rpacket_bufs(2);
\f


repeat

ts_wait( in_ref, dte_sem.w);


if in_ref^.u4 = from_link then
(*---------------------------------------------------
.   buffer from ROUTER
-----------------------------------------------------*)

if in_ref^.u2 = rut_ok then

begin
case in_ref^.u1 of

rut_con :
(*----------   connect extension   ----------*)
begin
if tst>16 then
case in_ref^.u2 of
rut_ok :
begin
testout( z, "dte connectd",0);
end;
rut_no_res :
begin
testout(z,t_20, rut_no_res);
testout( z, t_21, 0);
end;
rut_ext_err :
begin
testout(z,t_20, rut_ext_err);
testout( z, t_22, 0);
end
otherwise
testout(z,t_20,in_ref^.u2);
end;

signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_srdy :
(*----------   sense ready   ----------*)
begin
if tst>16 then
testout( z, t_23, in_ref^.u2);
signal( in_ref, pax_pool_sem.s^);
end;

rut_dis :
(*----------   disconnect extension   ----------*)
begin
if tst>16 then
testout( z, t_24, in_ref^.u2);
signal( in_ref, pax_pool_sem.s^);
end;


rut_res :
(*----------   reset   ----------*)
begin
if tst>16 then
testout(z,t_25,0);
signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_trp , rut_dir :
(*----------   transmit packet   ----------*)
begin
if tst>8 then
testout(z,t_26,in_ref^.u2);
<*
act_result := in_ref^.u2;
lock in_ref as buf : rut_trp_pdata do
begin
act_user_field := buf.phead.user_field div 256;
act_stream_no := buf.phead.user_field mod 256;
if tst>8 then
testout(z,"act-streamno", act_stream_no);

if ( act_user_field = dte_car)
and ( act_stream_no > 0) then
begin
ref :=: streams( act_stream_no).car_ref;
ref^.u2 := dte_ok_result;
signal( ref, netc_sem^);
end;
end;
*>
signal( in_ref, pax_pool_sem.s^);
end;
\f


rut_rec :
(*----------   receive packet   ----------*)
begin
if tst>8 then
testout(z,t_27,0);

lock in_ref as buf : rut_trp_pdata do
begin

act_pac_state := buf.phead.state;
if tst>4 then
testout(z,t_28, act_pac_state);
act_user_field := buf.phead.user_field div 256 ;
act_stream_no := buf.phead.user_field mod 256;
act_dst := buf.phead.org;

if tst>32 then
begin
testout(z,t_29,address(act_dst));

testout(z,t_30, act_user_field);
testout(z,t_31, act_stream_no);
end;

case act_user_field of
\f


dte_car :
begin  (*-------  it is an incomming call  --------*)

sensesem( ref, ric_pool);

if not nil( ref) then
begin

if call_resources(act_call_no) then
begin

if tst>64 then
begin
testout(z,t_32,dte_car);
end;

ref^.u2 := dte_ok_result;

lock ref as ric : ric_buf_type do
with ric do
begin
first := ric_first_val;
last := ric_first_val + l_listen+l_control-1;
call_id := act_call_no;
call_buf.dte_adr_l := l_dte_adr;
call_buf.dte_adr := external_addr( act_dst);
call_buf.facility_l := l_facilities;
call_buf.facility := buf.phead.facility;
call_buf.control := buf.control;
call_buf.alarm_mess := buf.alarm_mess;
end;

signal( ref, netc_sem^);
end
else
begin
signal( ref, ric_pool);
testout(z,t_33, 0);
end
end
else
testout(z,t_34, 0);
end;
\f


dte_clr :
(*    call clear from remote user  *)
begin
if tst>64 then
begin
testout(z,t_35, dte_clr);
end;

(*  send diag-code to local user  *)

sensesem( ref, streams( act_stream_no).receive_queue);

while not nil( ref) do
begin
ref^.u2 := dte_remo_clear;

lock ref as dte_buf : dte_sdata_data do
dte_buf.control := buf.control;

signal( ref, netc_sem^);
streams(act_stream_no).l_rec_q := streams(act_stream_no).l_rec_q -1;
sensesem( ref, streams(act_stream_no).receive_queue);
end;


if streams( act_stream_no).state = clearing then
streams( act_stream_no).state := free
else
begin
get_transmit_buf( rut_buf_ref);

if not nil( rut_buf_ref) then
begin
lock rut_buf_ref as rut_buf : rut_trp_pdata do
with rut_buf do
begin
with phead do
begin
dst := streams(act_stream_no).dst;
facility := streams(act_stream_no).facility;
user_field := dte_clr * 256 + streams(act_stream_no).dst_stream;
end;
control.op_code := dte_user_clear;
control.data := 0;
end;
signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,2);

clear_stream_table( act_stream_no);
end;

end;
\f


dte_aic :
(*  call accept from remote user  *)
begin
if tst>64 then
begin
testout(z,t_36, dte_aic);
end;

streams( act_stream_no).dst_stream := buf.control.data;
end;


dte_rejic :
(*  call reject from remote user  *)
begin
if tst>64 then
begin
testout(z,t_37,dte_rejic);
end;

streams( act_stream_no).diag_code := buf.control.data;
sensesem( ref, streams( act_stream_no).receive_queue);

if not nil( ref) then
begin
lock ref as dte_buf : dte_sdata_data do
begin
ref^.u2 := dte_remo_clear;
dte_buf.control := buf.control;
end;
signal( ref, netc_sem^);
streams(act_stream_no).l_rec_q := streams(act_stream_no).l_rec_q -1;
sensesem( ref, streams( act_stream_no).receive_queue);
end;

while not nil( ref) do
begin
ref^.u2 := dte_remo_clear;
signal( ref, netc_sem^);
streams(act_stream_no).l_rec_q := streams(act_stream_no).l_rec_q -1;
sensesem( ref, streams( act_stream_no).receive_queue);
end;
end;

\f


dte_sdata :
(*  data from remote user *)
begin
if tst>64 then
begin
testout(z,t_38, dte_sdata);
end;
sensesem( ref, streams( act_stream_no).receive_queue);

if not nil( ref) then
begin
ref^.u2 := dte_ok_result;

lock ref as dte_buf : dte_sdata_data do
begin
dte_buf.control := buf.control;
dte_buf.alarm_mess := buf.alarm_mess;

dte_buf.first := sdata_first_val;
dte_buf.last := dte_buf.first + l_control+l_listen-1;

end;

streams(act_stream_no).l_rec_q := streams(act_stream_no).l_rec_q -1;
signal( ref, netc_sem^);
end
else
if tst>64 then
testout( z, t_39, act_stream_no);
end
otherwise
begin
if tst>64 then
testout(z,t_40, act_user_field);
end;


end (* case *);

end (* lock in_ref *);

in_ref^.u2 := rut_default;
signal( in_ref, rut_rec_sem^);

end;
\f


rut_stat :
(*----------   status   ----------*)
begin
if tst>64 then
testout(z,t_41,0);
end;

otherwise
(*----------   unknown router-function   ----------*)
begin
if tst>64 then
testout(z,t_42,0);
end
end;  (*  case router-functions  *)
end
else
begin
if tst>16 then
begin
testout(z,t_43,in_ref^.u1);
testout(z,t_44, in_ref^.u2);
testout(z,t_45,in_ref^.u3);
end;

signal( in_ref, pax_pool_sem.s^);
end

\f


else
if in_ref^.u4 = to_link then
(*---------------------------------------------------
.   buffer from NETCON
-----------------------------------------------------*)
begin
if ((in_ref^.u3 < min_stream_no) or (in_ref^.u3 > max_stream_no))
and (in_ref^.u1 <> dte_ric) and (in_ref^.u1 <> dte_rejic) then
begin
in_ref^.u2 := dte_stream_err;
signal( in_ref, netc_sem^);
end
else
case in_ref^.u1 of

dte_car :
(*   call from local user  *)
begin
if tst>64 then
begin
testout(z,t_46,1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

act_destination;
if tst>64 then
begin
testout(z,t_47,address(act_dst));
end;

if not nil( rut_buf_ref) then
begin

lock in_ref as dte_buf : car_buf_type do

lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
with rut_buf.phead do
begin
dst := act_dst;
facility := dte_buf.call_buf.facility;
streams( act_stream_no).facility := facility;
user_field := dte_car * 256 + act_stream_no;
top_of_data := top_of_data + dte_buf.call_buf.alarm_mess.al.no_of_by+2;
end;

rut_buf.control := dte_buf.call_buf.control;
rut_buf.alarm_mess := dte_buf.call_buf.alarm_mess;
rut_buf.rut_prefix.last := rut_buf.rut_prefix.last
+ dte_buf.call_buf.alarm_mess.al.no_of_by+2;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,3);

if nil( streams( act_stream_no).car_ref) then
streams( act_stream_no).car_ref :=: in_ref
else
begin
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
streams( act_stream_no).dst := act_dst;

if tst>32 then
write_stream( act_stream_no);
end;
\f


dte_clr :
(*   clear call from local user *)
begin
if tst>64 then
begin
testout(z,t_48, 1);
end;

lock in_ref as dte_buf : clear_buf_type do
act_diag_code := dte_buf.diag_code;

(*  send diag-code to remote dte  *)

get_transmit_buf( rut_buf_ref);

if not nil( rut_buf_ref) then
begin
lock rut_buf_ref as rut_buf : rut_trp_pdata do
with rut_buf do
begin
with phead do
begin
dst := streams( in_ref^.u3).dst;
facility := streams( in_ref^.u3).facility;
user_field := dte_clr *256 + streams( in_ref^.u3).dst_stream;
end;
control.op_code := dte_clr;
control.data := act_diag_code;
end;
signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,4);

(*  clear stream table *)

clear_stream_table( in_ref^.u3);


(* return clear call buffer *)
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
\f


dte_ric :
(* local user ready for receive call *)
begin
if tst>64 then
begin
testout(z,t_49,1);
end;
signal( in_ref, ric_pool);
end;


dte_rdata :
(* local user ready for receive data *)
if streams(in_ref^.u3).l_rec_q <= windowsize then
begin
act_stream_no := in_ref^.u3;
with streams( in_ref^.u3) do
begin
count( l_rec_q);
if tst>64 then
testout(z,t_50, l_rec_q);
end;
signal( in_ref, streams( act_stream_no).receive_queue);
end
else
signal( in_ref, pax_pool_sem.s^);

\f


dte_sdata :
(*  local user sends data  *)
begin

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : dte_sdata_data do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
with rut_buf.phead do
begin
dst := streams( act_stream_no).dst;
facility := streams( act_stream_no).facility;
user_field := dte_sdata * 256 + streams( act_stream_no).dst_stream;
top_of_data := top_of_data + dte_buf.alarm_mess.al.no_of_by+2;
end;

rut_buf.control := dte_buf.control;
rut_buf.alarm_mess := dte_buf.alarm_mess;
rut_buf.rut_prefix.last := rut_buf.rut_prefix.last
+ dte_buf.alarm_mess.al.no_of_by+2;

if tst>64 then
testout(z,t_51,act_stream_no);


end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,5);

in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
\f


dte_aic :
(* local user accepts a call *)
begin
if tst>64 then
begin
testout(z,t_52,1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : aic_buf_type do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
call_to_stream( dte_buf.aic_id, act_stream_no);

with rut_buf.phead do
begin
dst := streams( act_stream_no).dst;
facility := streams( act_stream_no).facility;
user_field := dte_aic * 256 + streams( act_stream_no).dst_stream;
end;


rut_buf.control.data := act_stream_no;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,6);

in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);

end;
\f


dte_rejic :
(* local user rejects a call *)
begin
if tst>64 then
begin
testout(z,t_53,1);
end;

get_transmit_buf( rut_buf_ref);
act_stream_no := in_ref^.u3;

if not nil( rut_buf_ref) then
begin
lock in_ref as dte_buf : rejic_buf_type do
lock rut_buf_ref as rut_buf : rut_trp_pdata do
begin
calls( dte_buf.rejic_id).used := false;

with rut_buf.phead do
begin
dst := calls( dte_buf.rejic_id).dst;
facility := calls( dte_buf.rejic_id).facility;
user_field := dte_rejic * 256 + calls(dte_buf.rejic_id).dst_stream;
end;

rut_buf.control.op_code := dte_rejic;
rut_buf.control.data := dte_buf.rejic_diag;
end;

signal( rut_buf_ref, rut_trm_sem^);
end
else
testout(z,t_14,7);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);

end;
\f


dte_res :      (*  reset  *)
begin
if tst>8 then
testout(z,t_54, in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;

dte_stat :     (*  status  *)
begin
if tst>8 then
testout(z,t_55, in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
otherwise
begin
if tst>8 then
testout(z,t_56, in_ref^.u1);
in_ref^.u2 := dte_ok_result;
signal( in_ref, netc_sem^);
end;
end;
end
else
if in_ref^.u4 = dyn_test then
begin
tst := in_ref^.u3;
case in_ref^.u2 of
1 : lock in_ref as buf : record
l_r_q : integer;
d_s : byte;
d : int_pax_addr;
f : integer;
p,di : byte;
end do
with buf do
with streams(in_ref^.u1) do
begin
l_r_q := l_rec_q;
d_s := dst_stream;
d := dst;
f := facility;
p := priority;
di := diag_code;
end;
2 : lock in_ref as buf : calls_e do
with calls( in_ref^.u1) do
begin
buf.dst := dst;
buf.dst_stream := dst_stream;
buf.used := used;
buf.facility := facility;
end;
end;
signal( in_ref, pax_pool_sem.s^);
end
else
begin
if tst>8 then
testout(z,t_57, in_ref^.u4);
release( in_ref);
end;

until false;

end.
▶EOF◀