Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-07 - 43,50450/fcsmac.req
There are no other files named fcsmac.req in the archive.
00100	% FCSMAC.REQ VERSION 3.0 % SWITCHES NOLIST;
00200	REQUIRE 'B11MAC.REQ' SOURCE;
00300	%
00400		RSX-11M FILE CONTROL SERVICES MACRO LIBRARY FOR BLISS-11
00500	
00600	AUTHOR:
00700		K. E. GORLEN
00800		RM. 2017, BG. 12A
00900		DIVISION OF COMPUTER RESEARCH AND TECHNOLOGY
01000		NATIONAL INSTITUTES OF HEALTH
01100		BETHESDA, MD. 20014
01200		PHONE: (301) 496-5361
01300		MAY 19, 1975
01400	
01500	SEE RSXMAC.DOC FOR DOCUMENTATION.
01600	
01700	%
01800	    LINKAGE ?FCS.0=BLISS(REGISTER=0);
01900	    LINKAGE ?FCS.01=BLISS(REGISTER=0,REGISTER=1);
02000	    LINKAGE ?FCS.012=BLISS(REGISTER=0,REGISTER=1,REGISTER=2);
02100	    LINKAGE ?FCS.0123=BLISS(REGISTER=0,REGISTER=1,REGISTER=2,REGISTER=3);
02200	    LINKAGE ?FCS.1=BLISS(REGISTER=1);
02300	    LINKAGE ?FCS.12=BLISS(REGISTER=1,REGISTER=2);
02400	    LINKAGE ?FCS.23=BLISS(REGISTER=2,REGISTER=3);
02500	    LINKAGE ?FCS.234=BLISS(REGISTER=2,REGISTER=3,REGISTER=4);
02600	!
02700	! ?FDOFF$ -- FILE DESCRIPTOR BLOCK DEFINITIONS
02800	!
02900	    MACRO ?FDOFF$=MACRO
03000		?F.RTYP(FDB)=((FDB)+00)<0,8> $QUOTE $,
03100		    ?R.FIX =1 $QUOTE $,
03200		    ?R.VAR =2 $QUOTE $,
03300		    ?R.SEQ =3 $QUOTE $,
03400		?F.RATT(FDB)=((FDB)+01)<0,8> $QUOTE $,
03500		    ?FD.FTN=0,1 $QUOTE $,
03600		    ?FD.CR =1,1 $QUOTE $,
03700		    ?FD.BLK=3,1 $QUOTE $,
03800		?F.RSIZ(FDB)=((FDB)+02) $QUOTE $,
03900		?F.HIBK(FDB)=((FDB)+04) $QUOTE $,
04000		?F.EFBK(FDB)=((FDB)+08) $QUOTE $,
04100		?F.FFBY(FDB)=((FDB)+12) $QUOTE $,
04200		?F.RACC(FDB)=((FDB)+14)<0,8> $QUOTE $,
04300		    ?FD.RWM=0,1 $QUOTE $,
04400		    ?FD.RAN=1,1 $QUOTE $,
04500		    ?FD.PLC=2,1 $QUOTE $,
04600		    ?FD.INS=3,1 $QUOTE $,
04700		?F.RCTL(FDB)=((FDB)+15)<0,8> $QUOTE $,
04800		    ?FD.REC=0,1 $QUOTE $,
04900		    ?FD.CCL=1,1 $QUOTE $,
05000		    ?FD.TTY=2,1 $QUOTE $,
05100		    ?FD.DIR=3,1 $QUOTE $,
05200		    ?FD.SDI=4,1 $QUOTE $,
05300		    ?FD.SQD=5,1 $QUOTE $,
05400		?F.BKDS(FDB)=((FDB)+16) $QUOTE $,
05500		?F.URBD(FDB)=((FDB)+16) $QUOTE $,
05600		?F.NRBD(FDB)=((FDB)+20) $QUOTE $,
05700		?F.BKST(FDB)=((FDB)+20) $QUOTE $,
05800		?F.BKDN(FDB)=((FDB)+22) $QUOTE $,
05900		?F.OVBS(FDB)=((FDB)+24) $QUOTE $,
06000		?F.NREC(FDB)=((FDB)+24) $QUOTE $,
06100		?F.EOBB(FDB)=((FDB)+26) $QUOTE $,
06200		?F.RCNM(FDB)=((FDB)+28) $QUOTE $,
06300		?F.CNTG(FDB)=((FDB)+28) $QUOTE $,
06400		?F.STBK(FDB)=((FDB)+30) $QUOTE $,
06500		?F.ALOC(FDB)=((FDB)+32) $QUOTE $,
06600		?F.LUN (FDB)=((FDB)+34)<0,8> $QUOTE $,
06700		?F.FACC(FDB)=((FDB)+35)<0,8> $QUOTE $,
06800		    ?FA.RD =0,1 $QUOTE $,
06900		    ?FA.WRT=1,1 $QUOTE $,
07000		    ?FA.EXT=2,1 $QUOTE $,
07100		    ?FA.CRE=3,1 $QUOTE $,
07200		    ?FA.TMP=4,1 $QUOTE $,
07300		    ?FA.SHR=5,1 $QUOTE $,
07400		    ?FA.APD=6,1 $QUOTE $,
07500		    ?FA.NSP=6,1 $QUOTE $,
07600		?F.DSPT(FDB)=((FDB)+36) $QUOTE $,
07700		?F.DFNB(FDB)=((FDB)+38) $QUOTE $,
07800		?F.BKEF(FDB)=((FDB)+40)<0,8> $QUOTE $,
07900		?F.EFN (FDB)=((FDB)+40)<0,8> $QUOTE $,
08000		?F.BKP1(FDB)=((FDB)+41)<0,8> $QUOTE $,
08100		?F.ERR (FDB)=((FDB)+42) $QUOTE $,
08200		    ?F.ERR0(FDB)=?F.ERR(FDB)<0,8>$QUOTE $,
08300		    ?F.ERR1(FDB)=?F.ERR(FDB)<8,8>$QUOTE $,
08400		?F.MBCT(FDB)=((FDB)+44)<0,8> $QUOTE $,
08500		?F.MBC1(FDB)=((FDB)+45)<0,8> $QUOTE $,
08600		?F.MBFG(FDB)=((FDB)+46)<0,8> $QUOTE $,
08700		    ?FD.RAH=0,1 $QUOTE $,
08800		    ?FD.WBH=1,1 $QUOTE $,
08900		?F.BGBC(FDB)=((FDB)+47)<0,8> $QUOTE $,
09000		?F.VBSZ(FDB)=((FDB)+48) $QUOTE $,
09100		?F.BBFS(FDB)=((FDB)+50) $QUOTE $,
09200		?F.BKVB(FDB)=((FDB)+52) $QUOTE $,
09300		?F.VBN (FDB)=((FDB)+52) $QUOTE $,
09400		?F.BDB (FDB)=((FDB)+56) $QUOTE $,
09500		?F.SPDV(FDB)=((FDB)+58) $QUOTE $,
09600		?F.SPUN(FDB)=((FDB)+60)<0,8> $QUOTE $,
09700		?F.CHR (FDB)=((FDB)+60)<8,8> $QUOTE $,
09800		?F.ACTL(FDB)=((FDB)+62) $QUOTE $,
09900		    ?FA.DLK=9,1 $QUOTE $,
10000		    ?FA.EXC=10,1 $QUOTE $,
10100		    ?FA.RWD=11,1 $QUOTE $,
10200		    ?FA.POS=12,1 $QUOTE $,
10300		    ?FA.WCK=13,1 $QUOTE $,
10400		    ?FA.SEQ=14,1 $QUOTE $,
10500		    ?FA.ENB=15,1 $QUOTE $,
10600		?F.SEQN(FDB)=((FDB)+64) $QUOTE $,
10700		?F.FNB (FDB)=((FDB)+66) $QUOTE $,
10800		?F.FNAM(FDB)=?N.FNAM(?F.FNB(FDB)) $QUOTE $,
10900		?F.FTYP(FDB)=?N.FTYP(?F.FNB(FDB)) $QUOTE $,
11000		?F.FVER(FDB)=?N.FVER(?F.FNB(FDB)) $QUOTE $,
11100		?F.DVNM(FDB)=?N.DVNM(?F.FNB(FDB)) $QUOTE $,
11200		?F.UNIT(FDB)=?N.UNIT(?F.FNB(FDB)) $QUOTE $;
11300		BIND
11400		    ?S.FDB=96,
11500		    ?S.FAT=14;
11600		STRUCTURE ?FDB$[I]=[?S.FDB](.?FDB$+2*.I);
11700		?NBOFF$;
11800		UNDECLARE $QUOTE $QUOTE ?FDOFF$;
11900		MACRO ?FDOFF$=UNDECLARE ?.......... $QUOTE $ $;
12000	!
12100	! ?FCSBT$ AND ?FDOF$L MACROS
12200	!
12300	    MACRO
12400		?FCSBT$=?FDOFF$ $,	! DEFINE FDB BIT VALUES
12500		?FDOF$L=?FDOFF$ $;	! DEFINE FDB OFFSETS
12600	!
12700	! ?NBOFF$ -- FILENAME BLOCK DEFINITIONS
12800	!
12900	    MACRO ?NBOFF$=MACRO
13000		?N.FID (FNB)=((FNB)+00) $QUOTE $,
13100		?N.FNAM(FNB)=((FNB)+06) $QUOTE $,
13200		?N.FTYP(FNB)=((FNB)+12) $QUOTE $,
13300		?N.FVER(FNB)=((FNB)+14) $QUOTE $,
13400		?N.STAT(FNB)=((FNB)+16) $QUOTE $,
13500		    ?NB.VER=0,1 $QUOTE $,
13600		    ?NB.TYP=1,1 $QUOTE $,
13700		    ?NB.NAM=2,1 $QUOTE $,
13800		    ?NB.SVR=3,1 $QUOTE $,
13900		    ?NB.STP=4,1 $QUOTE $,
14000		    ?NB.SNM=5,1 $QUOTE $,
14100		    ?NB.DIR=6,1 $QUOTE $,
14200		    ?NB.DEV=7,1 $QUOTE $,
14300		    ?NB.SD1=8,1 $QUOTE $,
14400		    ?NB.SD2=9,1 $QUOTE $,
14500		?N.NEXT(FNB)=((FNB)+18) $QUOTE $,
14600		?N.DID (FNB)=((FNB)+20) $QUOTE $,
14700		?N.DVNM(FNB)=((FNB)+26) $QUOTE $,
14800		?N.UNIT(FNB)=((FNB)+28) $QUOTE $;
14900		BIND
15000		    ?S.FNB=30,
15100		    ?S.FNAM=6,
15200		    ?S.FTYP=2,
15300		    ?S.FNTY=(?S.FNAM+?S.FTYP)/2,
15400		    ?S.NFEN=16,
15500		    ?S.FNBW=?S.FNB/2;
15600		STRUCTURE ?FNB$[I]=[?S.FNB](.?FNB$+2*.I);
15700		UNDECLARE $QUOTE $QUOTE ?NBOFF$;
15800		MACRO ?NBOFF$=UNDECLARE ?.......... $QUOTE $ $;
15900	!
16000	! ?NBOF$L -- DEFINE FILENAME BLOCK OFFSETS
16100	!
16200	    MACRO ?NBOF$L=?NBOFF$ $;
16300	!
16400	! ?FDBDF$ -- FDB DEFINITION MACRO
16500	!
16600	    MACRO ?FDBDF$(FDB)[]=
16700		?.FDBZERO(?.FDBSYM);
16800		$REMAINING;
16900		OWN ?FDB$ FDB=(?.FDBSYM,24:0);
17000		UNDECLARE ?.FDBSYM $;
17100	
17200	    MACRO ?.FDBSYM=
17300		?WD.00,?WD.01,?WD.02,?WD.03,?WD.04,?WD.05,?WD.06,?WD.07,
17400		?WD.08,?WD.09,?WD.10,?WD.11,?WD.12,?WD.13,?WD.14,?WD.15,
17500		?WD.16,?WD.17,?WD.18,?WD.19,?WD.20,?WD.21,?WD.22,?WD.23 $;
17600	
17700	    MACRO ?.FDBZERO[WD]=BIND WD=0 $;
17800	
17900	    MACRO			! FILE ATTRIBUTE SECTION
18000		?AT$FIX=?.SET(?WD.00,(?WD.00 AND #377^8) OR ?R.FIX)$,
18100		?AT$VAR=?.SET(?WD.00,(?WD.00 AND #377^8) OR ?R.VAR)$,
18200		?AT$SEQ=?.SET(?WD.00,(?WD.00 AND #377^8) OR ?R.SEQ)$,
18300		?AT$FTN=?.SET(?WD.00,?WD.00 OR (?.MASK(?FD.FTN))^8)$,
18400		?AT$CR =?.SET(?WD.00,?WD.00 OR (?.MASK(?FD.CR))^8)$,
18500		?AT$BLK=?.SET(?WD.00,?WD.00 OR (?.MASK(?FD.BLK))^8)$,
18600		?AT$RSIZ(RSIZ)=?.SET(?WD.01,RSIZ)$,
18700		?AT$CNTG(CNTG)=?.SET(?WD.14,CNTG)$,
18800		?AT$ALOC(ALOC)=?.SET(?WD.16,ALOC)$;
18900	
19000	    MACRO			! RECORD ACCESS SECTION
19100		?RC$RWM=?.SET(?WD.07,?WD.07 OR ?.MASK(?FD.RWM))$,
19200		?RC$RAN=?.SET(?WD.07,?WD.07 OR ?.MASK(?FD.RAN))$,
19300		?RC$PLC=?.SET(?WD.07,?WD.07 OR ?.MASK(?FD.PLC))$,
19400		?RC$INS=?.SET(?WD.07,?WD.07 OR ?.MASK(?FD.INS))$,
19500		?RC$URBA(URBA)=?.SET(?WD.09,URBA)$,
19600		?RC$URBS(URBS)=?.SET(?WD.08,URBS)$;
19700	
19800	    MACRO			! BLOCK ACCESS SECTION
19900		?BK$DA(BKDA)=?.SET(?WD.09,BKDA)$,
20000		?BK$DS(BKDS)=?.SET(?WD.08,BKDS)$,
20100		?BK$EF(BKEF)=?.SET(?WD.20,(?WD.20 AND #377^8) OR ((BKEF) AND #377))$,
20200		?BK$ST(BKST)=?.SET(?WD.10,BKST)$,
20300		?BK$DN(BKDN)=?.SET(?WD.11,BKDN)$;
20400	
20500	    MACRO			! FILE OPEN SECTION
20600		?OP$LUN(LUN)=?.SET(?WD.17,(?WD.17 AND #377^8) OR ((LUN) AND #377))$,
20700		?OP$DSPT(DSPT)=?.SET(?WD.18,DSPT)$,
20800		?OP$DFNB(DFNB)=?.SET(?WD.19,DFNB)$,
20900		?OP$RD =?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.RD))^8)$,
21000		?OP$WRT=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.WRT))^8)$,
21100		?OP$EXT=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.EXT))^8)$,
21200		?OP$CRE=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.CRE))^8)$,
21300		?OP$TMP=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.TMP))^8)$,
21400		?OP$SHR=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.SHR))^8)$,
21500		?OP$APD=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.APD))^8)$,
21600		?OP$NSP=?.SET(?WD.17,?WD.17 OR (?.MASK(?FA.NSP))^8)$;
21700	
21800	    MACRO			! BLOCK BUFFER SECTION
21900		?BF$EFN(EFN)=?.SET(?WD.20,(?WD.20 AND #377^8) OR ((EFN) AND #377))$,
22000		?BF$OVBS(OVBS)=?.SET(?WD.12,OVBS)$,
22100		?BF$MBCT(MBCT)=?.SET(?WD.22,(?WD.22 AND #377^8) OR ((MBCT) AND #377))$,
22200		?BF$RAH=?.SET(?WD.23,?WD.23 OR ?.MASK(?FD.RAH))$,
22300		?BF$WBH=?.SET(?WD.23,?WD.23 OR ?.MASK(?FD.WBH))$;
22400	!
22500	! ?NMBLK$ -- DEFAULT FILENAME BLOCK MACRO
22600	!
22700	    MACRO ?NMBLK$(FNAM,FTYP,FVER,DVNM,UNIT)=
22800		3:0,RAD50 ?.DEFAULT(FNAM,'         '),RAD50 ?.DEFAULT(FTYP,'   '),
22900		FVER+0,0,0,3:0,DVNM+0,UNIT+0$;
23000	!
23100	! ?FDXX$R MACROS
23200	!
23300	    MACRO ?FDAT$R(FDB,RTYP,RATT,RSIZ,CNTG,ALOC)=BEGIN
23400		?FDOFF$;
23500		?.ASGNC(?F.RTYP(FDB),RTYP);
23600		?.ASGNC(?F.RATT(FDB),?.MASK(?.SUBLIST(RATT)));
23700		?.ASGNC(?F.RSIZ(FDB),RSIZ);
23800		?.ASGNC(?F.CNTG(FDB),CNTG);
23900		?.ASGNC(?F.ALOC(FDB),ALOC) END$;
24000	
24100	    MACRO ?FDRC$R(FDB,RACC,URBA,URBS)=BEGIN
24200		?FDOFF$;
24300		?.ASGNC(?F.RACC(FDB),?.MASK(?.SUBLIST(RACC)));
24400		?.ASGNC(?F.URBD(FDB)[1],URBA);
24500		?.ASGNC(?F.URBD(FDB)[0],URBS) END$;
24600	
24700	    MACRO ?FDOP$R(FDB,LUN,DSPT,DFNB,FACC,FACTRL)=BEGIN
24800		?FDOFF$;
24900		?.ASGNC(?F.LUN(FDB),LUN);
25000		?.ASGNC(?F.DSPT(FDB),DSPT);
25100		?.ASGNC(?F.DFNB(FDB),DFNB);
25200		?.ASGNC(?F.FACC(FDB),?.MASK(?.SUBLIST(FACC))) END$;
25300	
25400	    MACRO ?FDBF$R(FDB,EFN,OVBS,MBCT,MBFG)=BEGIN
25500		?FDOFF$;
25600		?.ASGNC(?F.EFN(FDB),EFN);
25700		?.ASGNC(?F.OVBS(FDB),OVBS);
25800		?.ASGNC(?F.MBCT(FDB),MBCT);
25900		?.ASGNC(?F.MBFG(FDB),?.MASK(?.SUBLIST(MBFG))) END$;
26000	
26100	    MACRO ?FDBK$R(FDB,BKAD,BKSZ,BKVB,BKEF,BKST,BKDN)=BEGIN
26200		?FDOFF$;
26300		?.ASGNC(?F.BKDS(FDB)[1],BKAD);
26400		?.ASGNC(?F.BKDS(FDB)[0],BKSZ);
26500		?.ASGNC(?F.BKVB(FDB),BKVB);
26600		?.ASGNC(?F.BKEF(FDB),BKEF);
26700		?.ASGNC(?F.BKST(FDB),BKST);
26800		?.ASGNC(?F.BKDN(FDB),BKDN) END$;
26900	!
27000	! ?.FCSERR -- FCS ROUTINE ERROR PROCESSING MACRO
27100	!
27200	    MACRO ?FCSERRDF$=$;		! DEFAULT FCS ERROR PROCESSING
27300	
27400	    MACRO ?.FCSERR(EXP,ERR)=BEGIN
27500		SWITCHES UNAMES;
27600		OPCODE ?.BCC=BCC;
27700		OPLABEL ?.NOERR;
27800		EXP;
27900		?.SELECT(ERR,
28000		    <?.BCC(?.NOERR); DO (ERR) WHILE 0; ?.NOERR:>,
28100		    <?.SELECT(?FCSERRDF$,
28200			<?.BCC(?.NOERR); DO (?FCSERRDF$) WHILE 0; ?.NOERR:>)>) END$;
28300	!
28400	! ?FINIT$ -- INITIALIZE FSR AT RUN-TIME
28500	!
28600	    MACRO ?FINIT$=BEGIN
28700		EXTERNAL ?.FINIT;
28800		?.FINIT() END$;
28900	!
29000	! ?OPEN$X MACROS
29100	!
29200	    MACRO ?OPEN$(FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR)=BEGIN
29300		EXTERNAL ?FCS.0 ?.OPEN;
29400		?FDOP$R(FDB,LUN,DSPT,DFNB,FACC);
29500		?FDRC$R(FDB,RACC,URBA,URBS);
29600		?.FCSERR(?.OPEN(FDB),ERR) END$;
29700	
29800	    MACRO ?OPEN$R(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
29900		?OPEN$(FDB,<?FA.RD>,
30000		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
30100	    MACRO ?OPEN$W(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
30200		?OPEN$(FDB,<?FA.WRT,?FA.EXT,?FA.CRE>,
30300		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
30400	    MACRO ?OPEN$M(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
30500		?OPEN$(FDB,<?FA.WRT>,
30600		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
30700	    MACRO ?OPEN$U(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
30800		?OPEN$(FDB,<?FA.WRT,?FA.EXT>,
30900		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
31000	    MACRO ?OPEN$A(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
31100		?OPEN$(FDB,<?FA.WRT,?FA.EXT,?FA.APD>,
31200		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
31300	!
31400	! ?OPNS$X MACROS
31500	!
31600	    MACRO ?OPNS$R(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
31700		?OPEN$(FDB,<?FA.SHR,?FA.RD>,
31800		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
31900	    MACRO ?OPNS$W(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
32000		?OPEN$(FDB,<?FA.SHR,?FA.WRT,?FA.EXT,?FA.CRE>,
32100		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
32200	    MACRO ?OPNS$M(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
32300		?OPEN$(FDB,<?FA.SHR,?FA.WRT>,
32400		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
32500	    MACRO ?OPNS$U(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
32600		?OPEN$(FDB,<?FA.SHR,?FA.WRT,?FA.EXT>,
32700		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
32800	    MACRO ?OPNS$A(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
32900		?OPEN$(FDB,<?FA.SHR,?FA.WRT,?FA.EXT,?FA.APD>,
33000		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
33100	!
33200	! ?OFID$X MACROS
33300	!
33400	    MACRO ?OFID$(FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR)=BEGIN
33500		EXTERNAL ?FCS.0 ?.OPFID;
33600		?FDOP$R(FDB,LUN,DSPT,DFNB,FACC);
33700		?FDRC$R(FDB,RACC,URBA,URBS);
33800		?.FCSERR(?.OPFID(FDB),ERR) END$;
33900	
34000	    MACRO ?OFID$R(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
34100		?OFID$(FDB,<?FA.RD>,
34200		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
34300	    MACRO ?OFID$W(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
34400		?OFID$(FDB,<?FA.WRT,?FA.EXT,?FA.CRE>,
34500		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
34600	    MACRO ?OFID$M(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
34700		?OFID$(FDB,<?FA.WRT>,
34800		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
34900	    MACRO ?OFID$U(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
35000		?OFID$(FDB,<?FA.WRT,?FA.EXT>,
35100		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
35200	    MACRO ?OFID$A(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
35300		?OFID$(FDB,<?FA.WRT,?FA.EXT,?FA.APD>,
35400		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
35500	!
35600	! ?OFNB$X MACROS
35700	!
35800	    MACRO ?OFNB$(FDB,FACC,LUN,DSPT,DFNB,RACC,URBA,URBS,ERR)=BEGIN
35900		EXTERNAL ?FCS.0 ?.OPFNB;
36000		?FDOP$R(FDB,LUN,DSPT,DFNB,FACC);
36100		?FDRC$R(FDB,RACC,URBA,URBS);
36200		?.FCSERR(?.OPFNB(FDB),ERR) END$;
36300	
36400	    MACRO ?OFNB$R(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
36500		?OFNB$(FDB,<?FA.RD>,
36600		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
36700	    MACRO ?OFNB$W(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
36800		?OFNB$(FDB,<?FA.WRT,?FA.EXT,?FA.CRE>,
36900		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
37000	    MACRO ?OFNB$M(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
37100		?OFNB$(FDB,<?FA.WRT>,
37200		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
37300	    MACRO ?OFNB$U(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
37400		?OFNB$(FDB,<?FA.WRT,?FA.EXT>,
37500		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
37600	    MACRO ?OFNB$A(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
37700		?OFNB$(FDB,<?FA.WRT,?FA.EXT,?FA.APD>,
37800		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
37900	!
38000	! ?OPNT$X MACROS
38100	!
38200	    MACRO ?OPNT$W(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=
38300		?OPEN$(FDB,<?FA.TMP,?FA.WRT,?FA.EXT,?FA.CRE>,
38400		    LUN,DSPT,,RACC,URBA,URBS,ERR)$;
38500	    MACRO ?OPNT$D(FDB,LUN,DSPT,RACC,URBA,URBS,ERR)=BEGIN
38600		SWITCHES UNAMES;
38700		LABEL ?.OPNTDBLK;
38800		?.OPNTDBLK:BEGIN
38900		    ?OPNT$W(FDB,LUN,DSPT,RACC,URBA,URBS,
39000			(?.SELECT(ERR,<ERR>,<?FCSERRDF$>);LEAVE ?.OPNTDBLK));
39100		    ?MRKDL$(FDB,ERR) END;
39200		END$;
39300	!
39400	! ?CLOSE$ -- CLOSE SPECIFIED FILE
39500	!
39600	    MACRO ?CLOSE$(FDB,ERR)=BEGIN
39700		EXTERNAL ?FCS.0 ?.CLOSE;
39800		?.FCSERR(?.CLOSE(FDB),ERR) END$;
39900	!
40000	! ?GET$ -- READ LOGICAL RECORD
40100	!
40200	    MACRO ?GET$(FDB,URBA,URBS,ERR)=BEGIN
40300		EXTERNAL ?FCS.0 ?.GET;
40400		?FDRC$R(FDB,,URBA,URBS);
40500		?.FCSERR(?.GET(FDB),ERR) END$;
40600	!
40700	! ?GET$R -- READ LOGICAL RECORD IN RANDOM MODE
40800	!
40900	    MACRO ?GET$R(FDB,URBA,URBS,LRCNM,HRCNM,ERR)=BEGIN
41000		?FDOFF$;
41100		?.ASGNC(?F.RCNM(FDB)[1],LRCNM);
41200		?.ASGNC(?F.RCNM(FDB)[0],HRCNM);
41300		?GET$(FDB,URBA,URBS,ERR) END$;
41400	!
41500	! ?GET$S -- READ LOGICAL RECORD IN SEQUENTIAL MODE
41600	!
41700	    MACRO ?GET$S(FDB,URBA,URBS,ERR)=BEGIN
41800		EXTERNAL ?FCS.0 ?.GETSQ;
41900		?FDRC$R(FDB,,URBA,URBS);
42000		?.FCSERR(?.GETSQ(FDB),ERR) END$;
42100	!
42200	! ?PUT$ -- WRITE LOGICAL RECORD
42300	!
42400	    MACRO ?PUT$(FDB,NRBA,NRBS,ERR)=BEGIN
42500		EXTERNAL ?FCS.0 ?.PUT;
42600		?FDOFF$;
42700		?.ASGNC(?F.NRBD(FDB)[1],NRBA);
42800		?.ASGNC(?F.NRBD(FDB)[0],NRBS);
42900		?.FCSERR(?.PUT(FDB),ERR) END$;
43000	!
43100	! ?PUT$R -- WRITE LOGICAL RECORD IN RANDOM MODE
43200	!
43300	    MACRO ?PUT$R(FDB,NRBA,NRBS,LRCNM,HRCNM,ERR)=BEGIN
43400		?FDOFF$;
43500		?.ASGNC(?F.RCNM(FDB)[1],LRCNM);
43600		?.ASGNC(?F.RCNM(FDB)[0],HRCNM);
43700		?PUT$(FDB,NRBA,NRBS,ERR) END$;
43800	!
43900	! ?PUT$S -- WRITE LOGICAL RECORD IN SEQUENTIAL MODE
44000	!
44100	    MACRO ?PUT$S(FDB,NRBA,NRBS,ERR)=BEGIN
44200		EXTERNAL ?FCS.0 ?.PUTSQ;
44300		?FDOFF$;
44400		?.ASGNC(?F.NRBD(FDB)[1],NRBA);
44500		?.ASGNC(?F.NRBD(FDB)[0],NRBS);
44600		?.FCSERR(?.PUTSQ(FDB),ERR) END$;
44700	!
44800	! ?READ$ -- READ VIRTUAL BLOCK
44900	!
45000	    MACRO ?READ$(FDB,BKDA,BKDS,BKVB,BKEF,BKST,BKDN,ERR)=BEGIN
45100		EXTERNAL ?FCS.0 ?.READ;
45200		?FDBK$R(FDB,BKDA,BKDS,BKVB,BKEF,BKST,BKDN);
45300		?.FCSERR(?.READ(FDB),ERR) END$;
45400	!
45500	! ?WRITE$ -- WRITE VIRTUAL BLOCK
45600	!
45700	    MACRO ?WRITE$(FDB,BKDA,BKDS,BKVB,BKEF,BKST,BKDN,ERR)=BEGIN
45800		EXTERNAL ?FCS.0 ?.WRITE;
45900		?FDBK$R(FDB,BKDA,BKDS,BKVB,BKEF,BKST,BKDN);
46000		?.FCSERR(?.WRITE(FDB),ERR) END$;
46100	!
46200	! ?DELET$ -- DELETE SPECIFIED FILE
46300	!
46400	    MACRO ?DELET$(FDB,ERR)=BEGIN
46500		EXTERNAL ?FCS.0 ?.DELETE;
46600		?.FCSERR(?.DELETE(FDB),ERR) END$;
46700	!
46800	! ?WAIT$ -- WAIT FOR BLOCK I/O COMPLETION
46900	!
47000	    MACRO ?WAIT$(FDB,BKEF,BKST,ERR)=BEGIN
47100		EXTERNAL ?FCS.0 ?.WAIT;
47200		?FDBK$R(FDB,,,,BKEF,BKST);
47300		?.FCSERR(?.WAIT(FDB),ERR) END$;
47400	!
47500	! ?RDFDR$ -- READ $$FSR2 DEFAULT DIRECTORY STRING DESCRIPTOR
47600	!
47700	    MACRO ?RDFDR$(SIZE,ADDR)=BEGIN
47800		EXTERNAL ?.RDFDR;
47900		?.SAVEREG(R1,R2);
48000		?.RDFDR();
48100		SIZE=.R1;
48200		ADDR=.R2 END$;
48300	!
48400	! ?WDFDR$ -- WRITE NEW $$FSR2 DEFAULT DIRECTORY STRING DESCRIPTOR
48500	!
48600	    MACRO ?WDFDR$(SIZE,ADDR)=BEGIN
48700		EXTERNAL ?FCS.12 ?.WDFDR;
48800		?.WDFDR(SIZE,ADDR) END$;
48900	!
49000	! ?RDFFP$ -- READ $$FSR2 DEFAULT FILE PROTECTION WORD
49100	!
49200	    MACRO ?RDFFP$=BEGIN
49300		EXTERNAL ?.RDFFP;
49400		?.SAVEREG(R1);
49500		?.RDFFP();
49600		.R1 END$;
49700	!
49800	! ?WDFFP$ -- WRITE NEW $$FSR2 DEFAULT FILE PROTECTION WORD
49900	!
50000	    MACRO ?WDFFP$(PROT)=BEGIN
50100		EXTERNAL ?FCS.1 ?.WDFFP;
50200		?.WDFFP(PROT) END$;
50300	!
50400	! ?RFOWN$ -- READ $$FSR2 FILE OWNER WORD
50500	!
50600	    MACRO ?RFOWN$=BEGIN
50700		EXTERNAL ?.RFOWN;
50800		?.SAVEREG(R1);
50900		?.RFOWN();
51000		.R1 END$;
51100	!
51200	! ?WFOWN$ -- WRITE NEW $$FSR2 FILE OWNER WORD
51300	!
51400	    MACRO ?WFOWN$(PP)=BEGIN
51500		EXTERNAL ?FCS.1 ?.WFOWN;
51600		?.WFOWN(PP) END$;
51700	!
51800	! ?ASCPP$ -- CONVERT UIC TO BINARY VALUE
51900	!
52000	    MACRO ?ASCPP$(ASCPP,BINPP,ERR)=BEGIN
52100		EXTERNAL ?FCS.23 ?.ASCPP;
52200		?.FCSERR(?.ASCPP(ASCPP,BINPP),ERR) END$;
52300	!
52400	! ?PPASC$ -- CONVERT UIC TO ASCII VALUE
52500	!
52600	    MACRO ?PPASC$(ASCPP,BINPP,ZERO,SEP)=BEGIN
52700		EXTERNAL ?FCS.234 ?.PPASC;
52800		?.PPASC(ASCPP,BINPP,((SEP)^1 OR ((ZERO) AND 1)) AND #3);
52900		.R2 END$;
53000	!
53100	! ?PARSE$ -- FILL IN ALL FILENAME INFORMATION
53200	!
53300	    MACRO ?PARSE$(FDB,FNB,DSPT,DFNB,ERR)=BEGIN
53400		EXTERNAL ?FCS.0123 ?.PARSE;
53500		?FDOFF$;
53600		?.FCSERR(?.PARSE(FDB,
53700		    ?.DEFAULT(FNB,?F.FNB(FDB)),
53800		    ?.DEFAULT(DSPT,.?F.DSPT(FDB)),
53900		    ?.DEFAULT(DFNB,.?F.DFNB(FDB))),
54000		    ERR) END$;
54100	!
54200	! ?PRSDV$ -- FILL IN DEVICE AND UNIT INFORMATION ONLY
54300	!
54400	    MACRO ?PRSDV$(FDB,FNB,DSPT,DFNB,ERR)=BEGIN
54500		EXTERNAL ?FCS.0123 ?.PRSDV;
54600		?FDOFF$;
54700		?.FCSERR(?.PRSDV(FDB,
54800		    ?.DEFAULT(FNB,?F.FNB(FDB)),
54900		    ?.DEFAULT(DSPT,.?F.DSPT(FDB)),
55000		    ?.DEFAULT(DFNB,.?F.DFNB(FDB))),
55100		    ERR) END$;
55200	!
55300	! ?ASLUN$ -- ASSIGN LOGICAL UNIT NUMBER
55400	!
55500	    MACRO ?ASLUN$(FDB,FNB,ERR)=BEGIN
55600		EXTERNAL ?FCS.01 ?.ASLUN;
55700		?FDOFF$;
55800		?.FCSERR(?.ASLUN(FDB,?.DEFAULT(FNB,?F.FNB(FDB))),ERR) END$;
55900	!
56000	! ?FIND$ -- LOCATE DIRECTORY ENTRY
56100	!
56200	    MACRO ?FIND$(FDB,FNB,ERR)=BEGIN
56300		EXTERNAL ?FCS.01 ?.FIND;
56400		?FDOFF$;
56500		?.FCSERR(?.FIND(FDB,?.DEFAULT(FNB,?F.FNB(FDB))),ERR) END$;
56600	!
56700	! ?ENTER$ -- INSERT DIRECTORY ENTRY
56800	!
56900	    MACRO ?ENTER$(FDB,FNB,ERR)=BEGIN
57000		EXTERNAL ?FCS.01 ?.ENTER;
57100		?FDOFF$;
57200		?.FCSERR(?.ENTER(FDB,?.DEFAULT(FNB,?F.FNB(FDB))),ERR) END$;
57300	!
57400	! ?REMOV$ -- DELETE DIRECTORY ENTRY
57500	!
57600	    MACRO ?REMOV$(FDB,FNB,ERR)=BEGIN
57700		EXTERNAL ?FCS.01 ?.REMOV;
57800		?FDOFF$;
57900		?.FCSERR(?.REMOV(FDB,?.DEFAULT(FNB,?F.FNB(FDB))),ERR) END$;
58000	!
58100	! ?GTDIR$ -- INSERT DIRECTORY INFORMATION IN FILENAME BLOCK
58200	!
58300	    MACRO ?GTDIR$(FDB,FNB,DSPT,ERR)=BEGIN
58400		EXTERNAL ?FCS.012 ?.GTDIR;
58500		?FDOFF$;
58600		?.FCSERR(?.GTDIR(FDB,
58700		    ?.DEFAULT(FNB,?F.FNB(FDB)),
58800		    ?.DEFAULT(DSPT,.?F.DSPT(FDB))),
58900		    ERR) END$;
59000	!
59100	! ?GTDID$ -- INSERT DEFAULT DIRECTORY INFORMATION IN FILNAME BLOCK
59200	!
59300	    MACRO ?GTDID$(FDB,FNB,ERR)=BEGIN
59400		EXTERNAL ?FCS.01 ?.GTDID;
59500		?FDOFF$;
59600		?.FCSERR(?.GTDID(FDB,?.DEFAULT(FNB,?F.FNB(FDB))),ERR) END$;
59700	!
59800	! ?POINT$ -- POSITION FILE TO SPECIFIED BYTE
59900	!
60000	    MACRO ?POINT$(FDB,LBKVB,HBKVB,BYTENUM,ERR)=BEGIN
60100		EXTERNAL ?FCS.0123 ?.POINT;
60200		?.FCSERR(?.POINT(FDB,HBKVB,LBKVB,BYTENUM),ERR) END$;
60300	!
60400	! ?POSRC$ -- POSITION FILE TO SPECIFIED RECORD
60500	!
60600	    MACRO ?POSRC$(FDB,LRCNM,HRCNM,ERR)=BEGIN
60700		EXTERNAL ?FCS.0 ?.POSRC;
60800		?.ASGNC(?F.RCNM(FDB)[1],LRCNM);
60900		?.ASGNC(?F.RCNM(FDB)[0],HRCNM);
61000		?.FCSERR(?.POSRC(FDB),ERR) END$;
61100	!
61200	! ?MARK$ -- SAVE POSITIONAL CONTEXT OF FILE
61300	!
61400	    MACRO ?MARK$(FDB,LBKVB,HBKVB,BYTENUM)=BEGIN
61500		EXTERNAL ?FCS.0 ?.MARK;
61600		?.SAVEREG(R1,R2,R3);
61700		?.MARK(FDB);
61800		?.SELECT(HBKVB,<HBKVB=.R1>,<.R1>);
61900		?.SELECT(LBKVB,<LBKVB=.R2>,<.R2>);
62000		?.SELECT(BYTENUM,<BYTENUM=.R3>,<.R3>) END$;
62100	!
62200	! ?POSIT$ -- RETURN POSITIONAL INFORMATION FOR SPECIFIED RECORD
62300	!
62400	    MACRO ?POSIT$(FDB,LRCNM,HRCNM,LBKVB,HBKVB,BYTENUM,ERR)=BEGIN
62500		EXTERNAL ?FCS.0 ?.POSIT;
62600		?.ASGNC(?F.RCNM(FDB)[1],LRCNM);
62700		?.ASGNC(?F.RCNM(FDB)[0],HRCNM);
62800		?.FCSERR(?.POSIT(FDB),ERR);
62900		?.SELECT(HBKVB,<HBKVB=.R1>,<.R1>);
63000		?.SELECT(LBKVB,<LBKVB=.R2>,<.R2>);
63100		?.SELECT(BYTENUM,<BYTENUM=.R3>,<.R3>) END$;
63200	!
63300	! ?XQIO$ -- QUEUE I/O FUNCTION ROUTINE
63400	!
63500	    MACRO ?XQIO$(FDB,FCN,PNUM,PADR,ERR)=BEGIN
63600		EXTERNAL ?FCS.0123 ?.XQIO;
63700		?.FCSERR(?.XQIO(FDB,FCN,PNUM,PADR),ERR) END$;
63800	!
63900	! ?RENAM$ -- RENAME FILE ROUTINE
64000	!
64100	    MACRO ?RENAM$(OLDFDB,NEWFDB,ERR)=BEGIN
64200		EXTERNAL ?FCS.01 ?.RENAM;
64300		?.FCSERR(?.RENAM(OLDFDB,NEWFDB),ERR) END$;
64400	!
64500	! ?EXTND$ -- FILE EXTENSION ROUTINE
64600	!
64700	    MACRO ?EXTND$(FDB,LNBLKS,HNBLKS,EXT,ERR)=BEGIN
64800		EXTERNAL ?FCS.012 ?.EXTND;
64900		MACRO ?EX.AC1=0,1 $QUOTE $;
65000		MACRO ?EX.AC2=1,1 $QUOTE $;
65100		MACRO ?EX.FCO=2,1 $QUOTE $;
65200		MACRO ?EX.ADF=3,1 $QUOTE $;
65300		MACRO ?EX.ENA=7,1 $QUOTE $;
65400		?.FCSERR(?.EXTND(FDB,LNBLKS, 
65500		    (HNBLKS)^8 OR ((?.MASK(?.SUBLIST(EXT))) AND #377)),ERR) END$;
65600	!
65700	! ?TRUNC$ -- TRUNCATE SPECIFIED FILE
65800	!
65900	    MACRO ?TRUNC$(FDB,ERR)=BEGIN
66000		EXTERNAL ?FCS.0 ?.TRUNC;
66100		?.FCSERR(?.TRUNC(FDB),ERR) END$;
66200	!
66300	! ?MRKDL$ -- MARK TEMPORARY FILE FOR DELETION
66400	!
66500	    MACRO ?MRKDL$(FDB,ERR)=BEGIN
66600		EXTERNAL ?FCS.0 ?.MRKDL;
66700		?.FCSERR(?.MRKDL(FDB),ERR) END$;
66800	!
66900	! ?DLFNB$ -- DELETE FILE BY FILENAME BLOCK
67000	!
67100	    MACRO ?DLFNB$(FDB,ERR)=BEGIN
67200		EXTERNAL ?FCS.0 ?.DLFNB;
67300		?.FCSERR(?.DLFNB(FDB),ERR) END$;
67400	!
67500	! ?GCMLB$ -- ALLOCATE AND INITIALIZE GCML CONTROL BLOCK
67600	!
67700	    MACRO ?GCMLB$(FDB,MAXD,PRMPT,UBUF,LUN,PDL)=
67800		?FDOFF$;
67900		?GCMLD$;
68000		SWITCHES UNAMES;
68100		?.SELECT(UBUF,
68200		    <BIND ?.GCMLUBUF=UBUF>,
68300		    <OWN ?.GCMLUBUF[41]>);
68400		?.SELECT(PDL,
68500		    <BIND ?.GCMLPDL=PDL>,
68600		    <OWN ?.GCMLPDL[(MAXD+1)*8]>);
68700		?.FDBZERO(?.FDBSYM);
68800		?AT$VAR;
68900		?OP$LUN(?.DEFAULT(LUN,1));
69000		?.SET(?WD.07,?WD.07 OR (?.MASK(?FD.REC,?FD.CCL,?FD.TTY))^8);
69100		UNDECLARE ?WD.19;
69200		MACRO ?WD.19=FDB+?S.FDB+2*11 $QUOTE $;
69300		?BF$MBCT(1);
69400		OWN FDB[?S.FDB/2+11+?S.FNB/2]=
69500		    (?.FDBSYM,24:0,
69600		    (?.MASK(?GE.COM,?GE.IND,?GE.CLO))^8,
69700		    4:0,
69800		    (MAXD+0)^8 OR (-1 AND #377),
69900		    ?.GCMLPDL,
70000		    ?.GCMLUBUF,
70100		    $STRING('?M?J'%CR,LF%,?.DEFAULT(PRMPT,'   '),'>'),
70200		    ?NMBLK$('CMI      ','CMD'));
70300		SWITCHES NOUNAMES;
70400		UNDECLARE $QUOTE $QUOTE ?WD.19;
70500		UNDECLARE ?.FDBSYM,?.GCMLFNB,$GCMLPDL,?.GCMLUBUF $;
70600	!
70700	! ?GCMLD$ -- DEFINE GCML CONTROL BLOCK OFFSETS AND BIT VALUES
70800	!
70900	    MACRO ?GCMLD$=MACRO
71000		?G.ERR (FDB)=((FDB)+?S.FDB+0)<0,8> $QUOTE $,
71100		?G.MODE(FDB)=((FDB)+?S.FDB+1)<0,8> $QUOTE $,
71200		    ?GE.COM=0,1 $QUOTE $,
71300		    ?GE.IND=1,1 $QUOTE $,
71400		    ?GE.CLO=2,1 $QUOTE $,
71500		    ?GE.LC =3,1 $QUOTE $,
71600		?G.PSDS(FDB)=((FDB)+?S.FDB+2) $QUOTE $,
71700		?G.CMLD(FDB)=((FDB)+?S.FDB+6) $QUOTE $,
71800		?G.DPRM(FDB)=((FDB)+?S.FDB+?G.ISIZ) $QUOTE $;
71900		BIND
72000		    ?G.ISIZ=16,
72100		    ?GE.IOR=-1 AND #377,
72200		    ?GE.OPR=-2 AND #377,
72300		    ?GE.BIF=-3 AND #377,
72400		    ?GE.MDE=-4 AND #377,
72500		    ?GE.EOF=-10 AND #377;
72600		UNDECLARE $QUOTE $QUOTE ?GCMLD$;
72700		MACRO ?GCMLD$=UNDECLARE ?.......... $QUOTE $ $;
72800	!
72900	! ?GCML$ -- GET COMMAND LINE
73000	!
73100	    MACRO ?GCML$(GCLBLK,ADPR,LNPR,ERR)=BEGIN
73200		EXTERNAL ?FCS.0 ?.GCML1;
73300		?GCMLD$;
73400		?G.PSDS(GCLBLK)=?.DEFAULT(LNPR,0);
73500		?.ASGNC(?G.PSDS(GCLBLK)[1],ADPR);
73600		?.FCSERR(?.GCML1(GCLBLK),ERR) END$;
73700	!
73800	! ?RCML$ -- RESET INDIRECT COMMAND FILE SCAN
73900	!
74000	    MACRO ?RCML$(GCLBLK,ERR)=BEGIN
74100		EXTERNAL ?FCS.0 ?.GCML2;
74200		?.FCSERR(?.GCML2(GCLBLK),ERR) END$;
74300	!
74400	! ?CCML$ -- CLOSE CURRENT COMMAND FILE
74500	!
74600	    MACRO ?CCML$(GCLBLK,ERR)=BEGIN
74700		EXTERNAL ?FCS.0 ?.GCML3;
74800		?.FCSERR(?.GCML3(GCLBLK),ERR) END$;
74900	!
75000	! ?CSI$ -- DEFINE CSI CONTROL BLOCK OFFSET AND BIT VALUES
75100	!
75200	    MACRO ?CSI$=MACRO
75300		?C.TYPR(CSIBLK)=((CSIBLK)+00)<0,8> $QUOTE $,
75400		    ?CS.INP=0,1 $QUOTE $,
75500		    ?CS.OUT=1,1 $QUOTE $,
75600		?C.STAT(CSIBLK)=((CSIBLK)+01)<0,8> $QUOTE $,
75700		    ?CS.NMF=0,1 $QUOTE $,
75800		    ?CS.DIF=1,1 $QUOTE $,
75900		    ?CS.DVF=2,1 $QUOTE $,
76000		    ?CS.WLD=3,1 $QUOTE $,
76100		    ?CS.MOR=4,1 $QUOTE $,
76200		    ?CS.EQU=5,1 $QUOTE $,
76300		?C.CMLD(CSIBLK)=((CSIBLK)+02) $QUOTE $,
76400		?C.DSDS(CSIBLK)=((CSIBLK)+06) $QUOTE $,
76500		?C.DEVD(CSIBLK)=((CSIBLK)+06) $QUOTE $,
76600		?C.DIRD(CSIBLK)=((CSIBLK)+10) $QUOTE $,
76700		?C.FILD(CSIBLK)=((CSIBLK)+14) $QUOTE $,
76800		?C.SWAD(CSIBLK)=((CSIBLK)+18) $QUOTE $,
76900		?C.MKW1(CSIBLK)=((CSIBLK)+20) $QUOTE $,
77000		?C.MKW2(CSIBLK)=((CSIBLK)+22) $QUOTE $;
77100		BIND ?C.SIZE=44;
77200		STRUCTURE ?CSIBLK$[I]=[?C.SIZE](.?CSIBLK$+2*.I);
77300		UNDECLARE $QUOTE $QUOTE ?CSI$;
77400		MACRO ?CSI$=UNDECLARE ?.......... $QUOTE $ $;
77500	!
77600	! ?CSI$1 -- COMMAND SYNTAX ANALYZER
77700	!
77800	    MACRO ?CSI$1(CSIBLK,BUFF,LEN,ERR)=BEGIN
77900		EXTERNAL ?FCS.0 ?.CSI1;
78000		?CSI$;
78100		?.ASGNC(?C.CMLD(CSIBLK)[1],BUFF);
78200		?.ASGNC(?C.CMLD(CSIBLK)[0],LEN);
78300		?.FCSERR(?.CSI1(CSIBLK),ERR) END$;
78400	!
78500	! ?CSI$2 -- COMMAND SEMANTIC PARSER
78600	!
78700	    MACRO ?CSI$2(CSIBLK,IO,SWTAB,ERR)=BEGIN
78800		EXTERNAL ?FCS.0 ?.CSI2;
78900		?CSI$;
79000		?.ASGNC(?C.TYPR(CSIBLK),
79100		    ?.SELECT(IO,
79200			<(IF RAD50 ?.DEFAULT(IO,'   ') EQL RAD50 'INP'
79300			    THEN ?.MASK(?CS.INP)
79400			    ELSE IF RAD50 ?.DEFAULT(IO,'   ') EQL RAD50 'OUT'
79500				THEN ?.MASK(?CS.OUT)
79600				ELSE (REQUIRE 'INCORRECT REQUEST TO .CSI2' WARNING;))>));
79700		?.ASGNC(?C.SWAD(CSIBLK),SWTAB);
79800		?.FCSERR(?.CSI2(CSIBLK),ERR) END$;
79900	!
80000	! ?CSI$SW -- CREATE SWITCH DESCRIPTOR TABLE
80100	!
80200	    MACRO ?CSI$SW[]=?.CSISWTAB($REMAINING,,,,,0),0 $;
80300	    MACRO ?.CSISWTAB[SW,MK,MKW,CLR,NEG,VTAB]=
80400		SW,MK+0,
80500		MKW+(IF RAD50 'CLR' EQL RAD50 ?.DEFAULT(CLR,'SET')
80600		    THEN 1
80700		    ELSE IF RAD50 'SET' EQL RAD50 ?.DEFAULT(CLR,'SET')
80800			THEN 0
80900			ELSE (REQUIRE 'INVALID SET/CLEAR SPEC' WARNING;)),
81000		VTAB+?.SELECT(NEG,<(IF RAD50 'NEG' EQL RAD50 ?.DEFAULT(NEG,'   ')
81100		    THEN 1
81200		    ELSE (REQUIRE 'INVALID NEGATE SPEC' WARNING;))>,<0>) $;
81300	!
81400	! ?CSI$SV -- CREATE SWITCH VALUE DESCRIPTOR TABLE
81500	!
81600	    MACRO ?CSI$SV[]=?.CSISVTAB($REMAINING),0 $;
81700	    MACRO ?.CSISVTAB[TYPE,ADR,LEN]=
81800		(LEN)^8+(IF RAD50 TYPE EQL RAD50 'ASC' THEN 1
81900		    ELSE IF RAD50 TYPE EQL RAD50 'NUM'
82000			OR RAD50 TYPE EQL RAD50 'OCT' THEN 2
82100			ELSE IF RAD50 TYPE EQL RAD50 'DEC' THEN 3
82200			    ELSE (REQUIRE 'INVALID CONVERSION TYPE' WARNING;)),
82300		?.SELECT(ADR,<ADR>,<REQUIRE 'VALUE ADDRESS MISSING' WARNING>) $;
82400	!
82500	! ?PRINT$ -- SPOOL PRINT FILE
82600	!
82700	    MACRO ?PRINT$(FDB,ERR)=BEGIN
82800		EXTERNAL ?FCS.0 ?.PRINT;
82900		?.FCSERR(?.PRINT(FDB),ERR) END$;
83000	%
83100	    MACRO ?PRINT$(FDB,ERR)=BEGIN
83200		EXTERNAL $DSW;
83300		?FDOFF$;
83400		?DRERR$;
83500		MACRO ?.PRINTFCSERR=
83600		    (?.SELECT(ERR,<ERR>,<?FCSERRDF$>);LEAVE ?.PRINTBLK) $QUOTE $;
83700		MACRO ?.PRINTRSXERR=
83800		    (?.SELECT(ERR,<ERR>,<?RSXERRDF$>);LEAVE ?.PRINTBLK) $QUOTE $;
83900		LABEL ?.PRINTBLK;
84000		STACKLOCAL ?.PRTDAT[13];
84100		BIND ?PRT...=UPLIT RAD50 'PRT...';
84200		BIND FNB=?F.FNB(FDB);
84300		IF .?F.BDB(FDB) NEQ 0 THEN ?.PRINTBLK:BEGIN
84400		    REGISTER ?.R;
84500		    MACRO ?.MOV[P]=.?.R=P; ?.R=.?.R+2 $QUOTE $;
84600		    ?GLUN$S(.?F.LUN(FDB),?.PRTDAT[5]);
84700		    ?.R=?.PRTDAT[0];
84800		    ?.MOV(
84900			.?N.FNAM(FNB)[0],
85000			.?N.FNAM(FNB)[1],
85100			.?N.FNAM(FNB)[2],
85200			.?N.FTYP(FNB),
85300			.?N.FVER(FNB));
85400			?.R=.?.R+3;
85500			(.?.R)<0,8>=0; ?.R=.?.R+1;
85600		    ?.MOV(
85700			.?N.FID(FNB)[0],
85800			.?N.FID(FNB)[1],
85900			.?N.FID(FNB)[2],
86000			.?N.DID(FNB)[0],
86100			.?N.DID(FNB)[1],
86200			.?N.DID(FNB)[2]);
86300		    ?CLOSE$(FDB,?.PRINTFCSERR);
86400		    IF NOT .?F.RCTL(FDB)<?FD.REC> THEN BEGIN
86500			?SDAT$S(?PRT...,?.PRTDAT,,?.PRINTRSXERR);
86600			?RQST$S(?PRT...,,,,,(IF .$DSW NEQ ?IE.ACT THEN ?.PRINTRSXERR));
86700			END;
86800		    END;
86900		END$;
87000	%
87100	!
87200	! ?IOERR$ -- I/O STATUS CODES
87300	!
87400	    UNDECLARE $QUOTE ?IOERR$;
87500	    MACRO ?IOERR$=
87600		UNDECLARE ?IS.SUC,?IE.AST;
87700		BIND
87800		    ?IE.BAD=-01 AND #377,
87900		    ?IE.IFC=-02 AND #377,
88000		    ?IE.DNR=-03 AND #377,
88100		    ?IE.VER=-04 AND #377,
88200		    ?IE.ONP=-05 AND #377,
88300		    ?IE.SPC=-06 AND #377,
88400		    ?IE.DNA=-07 AND #377,
88500		    ?IE.DAA=-08 AND #377,
88600		    ?IE.DUN=-09 AND #377,
88700		    ?IE.EOF=-10 AND #377,
88800		    ?IE.EOV=-11 AND #377,
88900		    ?IE.WLK=-12 AND #377,
89000		    ?IE.DAO=-13 AND #377,
89100		    ?IE.SRE=-14 AND #377,
89200		    ?IE.ABO=-15 AND #377,
89300		    ?IE.PRI=-16 AND #377,
89400		    ?IE.RSU=-17 AND #377,
89500		    ?IE.OVR=-18 AND #377,
89600		    ?IE.BYT=-19 AND #377,
89700		    ?IE.BLK=-20 AND #377,
89800		    ?IE.MOD=-21 AND #377,
89900		    ?IE.CON=-22 AND #377,
90000		    ?IE.BBE=-56 AND #377,
90100		    ?IE.STK=-58 AND #377,
90200		    ?IE.FHE=-59 AND #377,
90300		    ?IE.EOT=-62 AND #377,
90400		    ?IE.OFL=-65 AND #377,
90500		    ?IE.BCC=-66 AND #377,
90600		    ?IE.NOD=-23 AND #377,
90700		    ?IE.DFU=-24 AND #377,
90800		    ?IE.IFU=-25 AND #377,
90900		    ?IE.NSF=-26 AND #377,
91000		    ?IE.LCK=-27 AND #377,
91100		    ?IE.HFU=-28 AND #377,
91200		    ?IE.WAC=-29 AND #377,
91300		    ?IE.CKS=-30 AND #377,
91400		    ?IE.WAT=-31 AND #377,
91500		    ?IE.RER=-32 AND #377,
91600		    ?IE.WER=-33 AND #377,
91700		    ?IE.ALN=-34 AND #377,
91800		    ?IE.SNC=-35 AND #377,
91900		    ?IE.SQC=-36 AND #377,
92000		    ?IE.NLN=-37 AND #377,
92100		    ?IE.CLO=-38 AND #377,
92200		    ?IE.DUP=-57 AND #377,
92300		    ?IE.BVR=-63 AND #377,
92400		    ?IE.BHD=-64 AND #377,
92500		    ?IE.EXP=-75 AND #377,
92600		    ?IE.BTF=-76 AND #377,
92700		    ?IE.ALC=-84 AND #377,
92800		    ?IE.ULK=-85 AND #377,
92900		    ?IE.NBF=-39 AND #377,
93000		    ?IE.RBG=-40 AND #377,
93100		    ?IE.NBK=-41 AND #377,
93200		    ?IE.ILL=-42 AND #377,
93300		    ?IE.BTP=-43 AND #377,
93400		    ?IE.RAC=-44 AND #377,
93500		    ?IE.RAT=-45 AND #377,
93600		    ?IE.RCN=-46 AND #377,
93700		    ?IE.2DV=-48 AND #377,
93800		    ?IE.FEX=-49 AND #377,
93900		    ?IE.BDR=-50 AND #377,
94000		    ?IE.RNM=-51 AND #377,
94100		    ?IE.BDI=-52 AND #377,
94200		    ?IE.FOP=-53 AND #377,
94300		    ?IE.BNM=-54 AND #377,
94400		    ?IE.BDV=-55 AND #377,
94500		    ?IE.NFI=-60 AND #377,
94600		    ?IE.ISQ=-61 AND #377,
94700		    ?IE.NNC=-77 AND #377,
94800		    ?IE.AST=-80 AND #377,
94900		    ?IE.NNN=-68 AND #377,
95000		    ?IE.NFW=-69 AND #377,
95100		    ?IE.BLB=-70 AND #377,
95200		    ?IE.TMM=-71 AND #377,
95300		    ?IE.NDR=-72 AND #377,
95400		    ?IE.CNR=-73 AND #377,
95500		    ?IE.TMO=-74 AND #377,
95600		    ?IE.NNL=-78 AND #377,
95700		    ?IE.NLK=-79 AND #377,
95800		    ?IE.NST=-80 AND #377,
95900		    ?IE.FLN=-81 AND #377,
96000		    ?IE.IES=-82 AND #377,
96100		    ?IE.PES=-83 AND #377,
96200		    ?IS.PND=+00,
96300		    ?IS.SUC=+01,
96400		    ?IS.RDD=+02,
96500		    ?IS.BV=+05,
96600		    ?IS.CR='?M'%CR%^8+1,
96700		    ?IS.ESC='?['%ESC%^8+1,
96800		    ?IS.CC='?C'%ETX%^8+1,
96900		    ?IS.ESQ=(#200+'?['%ESC%)^8+1,
97000		    ?IS.PES=#200^8+1,
97100		    ?IS.EOT='?D'%EOT%^8+1,
97200		    ?IS.TAB='?I'%TAB%^8+1,
97300		    ?IS.TMO=+2;
97400		UNDECLARE $QUOTE $QUOTE ?IOERR$;
97500		MACRO ?IOERR$=UNDECLARE ?.......... $QUOTE $ $;
97600	SWITCHES LIST;