home *** CD-ROM | disk | FTP | other *** search
- /* k 0001 05/07/90 */
- /* k 0009 05/07/90 */
- /* k 0024 16/07/90 */
- /* k 1005 14/09/90 */
- /* k 1007 24/09/90 */
- /* k 1008 27/09/90 */
- /* k 1015 13/11/90 */
- /* k 0087 03/12/90 */
- /* k 0207 06/09/91 *//* delete naus */
- /* k 0221 17/09/91 *//* pmsgop instead cmsgop */
- /* k 0224 23/09/91 *//* ebss */
- /* k 0238 19/10/91 *//* act/deact */
- /* k 0307 24/02/92 */
- /* k 1079 04/03/92 */ /* ptr to dlctb in rqb for dlc-prog */
- #include <ebss.h> /* @0224 */
- #include <stdio.h> /* actdlc.c */
- /* @0207 */
- #if (RESIDENT==1) /* @0238 */
- extern struct segprf *preqseg(); /* @0087 */
- extern struct rqb *preqrq(); /* 0009 */
- #else
- extern struct segprf *Res_preqseg(); /* @0087 */
- extern struct rqb *Res_preqrq(); /* 0009 */
- #endif
- /* @0221 */
- short actdlc(struct dlctb *wd)
- {
- struct rqb *rp;
- struct segprf *wseg; /* 1015 */
- short wcnt,i; /* @0024 */
- /* char rtnlan[5]= LAN ; name routine LAN */
- /* char namefl[9]='A0000001'; name file for load LAN */
- /* 0009 */
- char *w,*w1; /* work pointer */
- if (wd->type==DLCLAN) /* if LAN */
- goto LAN1; /* @0307 */
- if (wd->type==DLC7920) /* if 7920 */
- goto A7920;
- if (wd->type==DLCTRN) /* if TRN */ /* 1007 */
- goto TRN; /* 1007 */
- if (wd->type==DLCTRN39) /* if 8439 */ /* 1007 */
- goto TRN39; /* 1007 */
- if (wd->type==DLCASY) /* if async */ /* 1051 */
- goto ASYNC; /* 1051 */
- { pmsgop(18); /* @0221 */
- return -1; } /* unsupported dlc type */ /* 0009 */
- LAN1: /* @0307 */
- /* initiate DLCCB */
- wd->count=wd->count+1; /* count of use */
- /* building RQB for LAN-LOAD process */
- if ((rp=
- #if (RESIDENT==0)
- Res_preqrq
- #else
- preqrq
- #endif
- (1))==0) { /* 0009 */
- pmsgop(22); /* No rqb to activate DLC */ /* 0009 *//* @0221 */
- return 0; /* 1008 */
- } /* 0009 */
- rp->th.ra.code &= 0xfc; /* @0157 */
- rp->th.ra.code |=ATTACH; /* @0157 */
- rp->th.ra.stcb=LAN_CODE;
- rp->th.ra.rparm.parm.parm1=ACTIVATE;
- rp->th.ra.rparm.parm.parm2=wd->dlccbi; /* index lan-station */
- rp->link=0;
- w=rp->th.ra.wa.area; /* 0009 */
- w1=wd->name; /* 0009 */
- for (i=0;i<8;i++) /* @0024 */
- w[i]=w1[i]; /* name loading file */ /* @0024 */
- #if (RESIDENT==0)
- Res_pattach(rp);
- #else
- pattach(rp);
- #endif
- return 0; /* 1008 */
- /* * * * * * * * * * * * * * * * * * * * * * * */ /* 1005 */
- A7920:
- /* initiate DLCCB for 7920 */
- wd->count=wd->count+1; /* count of use */
- /* building RQB for dlc7920 activate-process */
- if ((wseg=
- #if (RESIDENT==1)
- preqseg
- #else
- Res_preqseg
- #endif
- (16))==0) /* 1015 */ /* @0087 */
- { pmsgop(22); /* No rqb to activate DLC *//* @0221 */
- return 0; } /* 1008 */
- rp=(struct rqb *)((char *)wseg+12); /* 1015 */ /* @0087 */
- rp->th.ra.code &= 0xfc; /* @0157 */
- rp->th.ra.code |=ATTACH; /* @0157 */
- rp->th.ra.stcb=DLC7920_CODE;
- rp->th.ra.rparm.parm.parm1=ACTIVATE;
- rp->th.ra.rparm.parm.parm2=wd->dlccbi; /* index 7920-station */
- wd->flg1 = ACTIV; /* flag activate */
- wseg->un.nau=wd; /* ptr to dlctb 1015 */
- rp->link=0;
- #if (RESIDENT==0)
- Res_pattach(rp);
- #else
- pattach(rp);
- #endif
- return 0; /* 1008 */
- /* * * * * * * * * * * * * * * * * * * * * * * * */ /* 1007 */
- TRN:
- /* initiate DLCCB for TRN */
- wd->count=wd->count+1; /* count of use */
- /* building RQB for DLCTRN activate-process */
- if ((wseg=
- #if (RESIDENT==1)
- preqseg
- #else
- Res_preqseg
- #endif
- (16))==0) /* 1015 */ /* @0087 */
- { pmsgop(22); /* No rqb to activate DLC *//* @0221 */
- return 0; } /* 1008 */
- rp=(struct rqb *)((char *)wseg+12); /* 1015 */ /* @0087 */
- rp->th.ra.code &= 0xfc; /* @0157 */
- rp->th.ra.code |=ATTACH; /* @0157 */
- rp->th.ra.stcb=DLCTRN_CODE;
- rp->th.ra.rparm.parm.parm1=ACTIVATE;
- rp->th.ra.rparm.parm.parm2=wd->dlccbi; /* index TRN */
- wd->flg1 = ACTIV; /* flag activate */
- /* rp->th.ra.wa.hh.hscb=wd; */ /* 1079 */
- wseg->un.nau=wd; /* ptr to dlctb 1079 */
- rp->link=0;
- #if (RESIDENT==0)
- Res_pattach(rp);
- #else
- pattach(rp);
- #endif
- return 0; /* 1008 */
- /* * * * * * * * * * * * * * * * * * * * * * * * */ /* 1007 */
- TRN39:
- /* initiate DLCCB for 8439 */
- wd->count=wd->count+1; /* count of use */
- /* building RQB for DLCTRN activate-process */
- if ((wseg=
- #if (RESIDENT==1)
- preqseg
- #else
- Res_preqseg
- #endif
- (16))==0) /* 1015 */ /* @0087 */
- { pmsgop(22); /* No rqb to activate DLC *//* @0221 */
- return 0; } /* 1008 */
- rp=(struct rqb *)((char *)wseg+12); /* 1015 */ /* @0087 */
- rp->th.ra.code &= 0xfc; /* @0157 */
- rp->th.ra.code |=ATTACH; /* @0157 */
- rp->th.ra.stcb=DLCTRN39_CODE;
- rp->th.ra.rparm.parm.parm1=ACTIVATE;
- rp->th.ra.rparm.parm.parm2=wd->dlccbi; /* index TRN */
- wd->flg1 = ACTIV; /* flag activate */
- /* rp->th.ra.wa.hh.hscb=wd; */ /* 1079 */
- wseg->un.nau=wd; /* ptr to dlctb 1079 */
- rp->link=0;
- #if (RESIDENT==0)
- Res_pattach(rp);
- #else
- pattach(rp);
- #endif
- return 0; /* 1008 */
- /* * * * * * * * * * * * * * * * * * * * * * * */ /* 1051 */
- ASYNC:
- /* initiate DLCCB for async port */
- wd->count=wd->count+1; /* count of use */
- /* building RQB for async-routine activate-process */
- if ((wseg=
- #if (RESIDENT==1)
- preqseg
- #else
- Res_preqseg
- #endif
- (16))==0)
- { pmsgop(22); /* No rqb to activate DLC *//* @0221 */
- return 0; }
- rp=(struct rqb *)((char *)wseg+12);
- rp->th.ra.code &= 0xfc;
- rp->th.ra.code |=ATTACH;
- rp->th.ra.stcb=DLCASY_CODE;
- rp->th.ra.rparm.parm.parm1=ACTIVATE;
- rp->th.ra.rparm.parm.parm2=wd->dlccbi; /* index async-port */
- wd->flg1 = ACTIV; /* flag activate */
- wseg->un.nau=wd; /* ptr to dlctb */
- rp->link=0;
- #if (RESIDENT==0)
- Res_pattach(rp);
- #else
- pattach(rp);
- #endif
- return 0;
- }
-