Trailing-Edge
-
PDP-10 Archives
-
decuslib10-08
-
43,50512/tbl.bli
There are 21 other files named tbl.bli in the archive. Click here to see a list.
!TBL library file for NETSPL & friends
!VERSION [3] EDIT [7] DATE [8,AUG,79]
COMPILETIME FTNET=1;
COMPILETIME FTQUASAR=1;
COMPILETIME FTLOG=(%VARIANT AND 2) NEQ 0; !On for logging support
COMPILETIME FTDET=FTLOG; !Support detached mode (output via TRMOP)
COMPILETIME FTSIG=%VARIANT AND 1; !On for signalling stuff
%IF (%VARIANT AND 2) NEQ 0 %THEN %ASSIGN(FTSIG,1) %FI;
!Always on for NETSPL
MACRO DEFAULT_VALUE(N,V)=%IF NOT %DECLARED(N) %THEN LITERAL N=V %FI %;
MACRO IF700=IFMON_NEWER(700) %; !See if monitor is 7.00 or later
MACRO IFMON_NEWER(VRS)=
IF (%IF NOT %DECLARED(MONVER) %THEN EXTERNAL MONVER; %FI
.MONVER GEQ %O %STRING(VRS,'00')) %;
DEFAULT_VALUE(SFDMAX,5);
%(
FILE BLOCK format
There will be file blocks for all non-TTY I/O. These will be set up
for use by the FILOP. UUO.
A NETSPL file block will consist of:
[1] a FILOP. block
[2] an extended LOOKUP block
[3] a PATH. block
There will be routines callable from BLISS-36 to use these.
In detail, the file block format is:
)%
PHASE(0);
!OFFSET FIELD COMMENTS
SWITCHES LIST(NOSOURCE);
FIELD FILE_FIELDS=SET
DFF[FILE$START,FIRSTWORD,WRD], !Beginning of all this
DFF[FILE$GODLY,FIRSTWORD,35,1,0], !Ignore protection codes if true
DFF[FILE$CHANNEL,THISWORD,18,17,0], !Channel number
DFF[FILE$FUNCTION,THISWORD,RH], !Function Code for FILOP. UUO.
DFF[FILE$MODE,NEXTWORD,WRD], !Mode and open bits
DFF[FILE$CHARCOUNT,THISWORD,28,7,0], !Character count for foreign filespec
DFF[FILE$DEVICE,NEXTWORD,WRD], !Device (SIXBIT)
DFF[FILE$O_BRH,NEXTWORD,LH], !Output B.R.H. addr
DFF[FILE$I_BRH,THISWORD,RH], !Input B.R.H. addr
DFF[FILE$O_NBUFF,NEXTWORD,18,18,1], !# of output buffers
DFF[FILE$I_NBUFF,THISWORD,0,18,1], !# of input buffers
DFF[FILE$RENAME,NEXTWORD,LH], !RENAME lookup block
DFF[FILE$LOOKUP,THISWORD,RH], !Address of LOOKUP block
DFF[FILE$PATH_LEN,NEXTWORD,LH], !Length of PATH. block
DFF[FILE$PATH_BLOCK,THISWORD,RH], !Address of PATH. block
DFF[FILE$ALIAS,NEXTWORD,WRD], !Enforce protection as if we were he
!An extended LOOKUP block follows:
DFF[FILE$ELK,NEXTWORD,WRD], !Extended lookup block
DFF[FILE$COUNT,THISWORD,0,17,0], !# of args (should contain 9)
DFF[FILE$LPPN,NEXTWORD,WRD], !PPN
DFF[FILE$LPATH,THISWORD,RH], ! Address of PATH block
DFF[FILE$NAME,NEXTWORD,WRD], !FILE NAME (SIXBIT)
DFF[FILE$EXTENSION,NEXTWORD,LH], !Extension (SIXBIT)
DFF[FILE$CDATE75,THISWORD,15,3,0], !High-order 3bits of Creation Date
DFF[FILE$ADATE,THISWORD,0,15,0], !Access Date
DFF[FILE$PROTECTION,NEXTWORD,27,9,0], !Protection code
DFF[FILE$PROTOWN,THISWORD,33,3,0], !Owner protection
DFF[FILE$PROTGRP,THISWORD,30,3,0], !Group
DFF[FILE$PROTWLD,THISWORD,27,3,0], !World
DFF[FILE$WMODE,THISWORD,23,4,0], !Mode file was written in
DFF[FILE$CTIME,THISWORD,12,11,0], !Creation time (minutes since midnight)
DFF[FILE$CDATE,THISWORD,0,12,0], !Creation date (except for top 3 bits)
DFF[FILE$SIZE,NEXTWORD,WRD], !File size in WORDS
DFF[FILE$WORDS,THISWORD,WRD], !synonym
DFF[FILE$VERSION,NEXTWORD,WRD], !Version number
DFF[FILE$VWHO,THISWORD,33,3,0], ! the number that follows the dash
DFF[FILE$VMAJOR,THISWORD,24,9,0], ! number that gets printed first
DFF[FILE$VMINOR,THISWORD,18,6,0], ! letter that follows version number
DFF[FILE$VEDIT,THISWORD,RH], ! number in parentheses
DFF[FILE$SPOOL,NEXTWORD,WRD], !Spooled name (also printed by DIRECT)
DFF[FILE$EST,NEXTWORD,WRD], !Estimated length (blocks)
DFF[FILE$ALLOC,NEXTWORD,WRD], !Allocated length (contiguous or cause error)
!A PATH. block follows:
DFF[FILE$PATH_FUN,NEXTWORD,WRD], !Function or channel
DFF[FILE$PATH_FLAGS,NEXTWORD,WRD], !Bits and flags
DFF[FILE$DIR,NEXTWORD,WRD], !PPN
DFF[FILE$PPN,THISWORD,WRD], !UFD
DFF[FILE$PROJECT,THISWORD,LH],
DFF[FILE$PROGRAMMER,THISWORD,RH],
DFF[FILE$SFD,MWORDS(SFDMAX),WRD], !Start of SFDs
DFF[FILE$PATH_END,NEXTWORD,WRD], !should be 0 to mark end of PATH. block
!Input buffer ring header
DFF[FILE$I_CBUFF,NEXTWORD,WRD], !First word of input buffer ring header
DFF[FILE$I_USE,THISWORD,35,1,0], ! use bit
DFF[FILE$I_PTR,NEXTWORD,WRD], !2nd word = Input Pointer
DFF[FILE$I_BYTESIZE,THISWORD,24,6,0], !Byte size
DFF[FILE$I_COUNT,NEXTWORD,WRD], !3rd word = byte count
DFF[FILE$I_IOLIST,THISWORD,WRD], !If dump mode, address of I/O list
DFF[FILE$I_UDX,NEXTWORD,WRD], !4th word = UDX
!Output buffer ring header
DFF[FILE$O_CBUFF,NEXTWORD,WRD], !First word of output buffer ring header
DFF[FILE$O_USE,THISWORD,35,1,0], ! use bit
DFF[FILE$O_NOCLEAR,THISWORD,34,1,0], ! don't clear output buffers
DFF[FILE$O_PTR,NEXTWORD,WRD], !2nd word = Output pointer
DFF[FILE$O_BYTESIZE,THISWORD,24,6,0], !Byte size
DFF[FILE$O_COUNT,NEXTWORD,WRD], !3rd word = byte count
DFF[FILE$O_IOLIST,THISWORD,WRD], !If dump mode, address of I/O list
DFF[FILE$O_UDX,NEXTWORD,WRD], !4th word = UDX
DFF[FILE$PF,NEXTWORD,LH], !Filespec parser flags (as follows)
DFF[FILE$PF_NORESET,THISWORD,35,1,0], !Don't reset default flags
DFF[FILE$PF_NODE_D,THISWORD,34,1,0], !Nodeid defaulted (not specified by user)
DFF[FILE$PF_DEV_D,THISWORD,33,1,0], !Device defaulted
DFF[FILE$PF_NAME_D,THISWORD,32,1,0], !File name defaulted
DFF[FILE$PF_EXT_D,THISWORD,31,1,0], !Extension defaulted
DFF[FILE$PF_DIR_D,THISWORD,30,1,0], !Directory defaulted
DFF[FILE$PF_ALL_D,THISWORD,30,5,0], !Everything defaulted
!There are some unused bits here
DFF[FILE$FB$DLC,THISWORD,29,1,0], !Delete file on CLOSE
DFF[FILE$NOWAIT,THISWORD,22,1,0], !Do not call WAIT
DFF[FILE$PF_WILDN_A,THISWORD,21,1,0], !The NODEID may be wildcarded also
DFF[FILE$PF_WILD_A,THISWORD,20,1,0], !Wildcards allowed in this fileblock
DFF[FILE$PF_NODE_A,THISWORD,19,1,0], !Nodeid permitted (otherwise illegal)
DFF[FILE$PF_NOSIG,THISWORD,18,1,0], !Return code instead of signal
DFF[FILE$NOSIGNAL,%FIELDEXPAND(FILE$PF_NOSIG)],
DFF[FILE$IB,THISWORD,RH], !Interrupt block for this device[20]
DFF[FILE$WRITES,NEXTWORD,LH], !Writes to this device for billing
DFF[FILE$READS,THISWORD,RH] !Reads for billing
TES;
DLIT <FILE_LEN,NEXTWORD>;
LITERAL FB_LEN=FILE_LEN; !Already in use this way
!NODE BLOCK (NDB) Format
%(
The first nn words of the NCB will be the file block for the TSK
device. Following that is that information about a node that is either
specific to this transmission or so frequently needed that we do not want
to get the NODTBL segment every time we need it.
These items are as follows:
)%
!OFFSET FIELD COMMENTS
FIELD NDB_FIELDS=SET
DFF[NDB$NODEID,THISWORD,WRD], !NODEID Copied from NODTBL
DFF[NDB$CONTO,NEXTWORD,LH], !CONNECT INITIATE TIMEOUT
DFF[NDB$REPTO,THISWORD,RH], !CONNECT REPLY TIMEOUT
DFF[NDB$INACTO,NEXTWORD,LH], !INACTIVITY TIMEOUT
DFF[NDB$REQUE,THISWORD,RH], !REQUE /AFTER:+nnn IF UNSUCCESSFUL (NBS DTM)
DFF[NDB$FLG,NEXTWORD,WRD], !FLAGS Copied from NODTBL
DFF[NDB$RENAME_FB,NEXTWORD,LH], !File block for rename (remote request only)
DFF[NDB$LOG_FB,%FIELDEXPAND(NDB$RENAME_FB)], !Log file (local request only)
DFF[NDB$FB,THISWORD,RH], !File block for local file
DFF[NDB$OPTIONS,NEXTWORD,RH], !Options from RMCOPY
DFF[NDB$RMC$O_CODE,THISWORD,0,1,0], !/LOG switch
DFF[NDB$RMC$O_LOG,%FIELDEXPAND(NDB$RMC$O_CODE)],
DFF[NDB$RMC$O_WAIT,THISWORD,1,1,0], !/WAIT switch
DFF[NDB$RMC$O_B36,THISWORD,2,1,0], !/36BIN switch (10-10 image mode)
DFF[NDB$RMC$O_B11I,THISWORD,3,1,0], !/16BINIMAGE
DFF[NDB$RMC$O_B16I,%FIELDEXPAND(NDB$RMC$O_B11I)],
DFF[NDB$RMC$O_B11P,THISWORD,4,1,0], !/16BINPACKED
DFF[NDB$RMC$O_B16P,%FIELDEXPAND(NDB$RMC$O_B11P)],
DFF[NDB$RMC$O_ASC,THISWORD,5,1,0], !Ascii stream mode
DFF[NDB$RMC$O_GO,THISWORD,6,1,0], !/SUBMIT
DFF[NDB$RMC$O_SUB,%FIELDEXPAND(NDB$RMC$O_GO)],
DFF[NDB$RMC$O_RTS,THISWORD,7,1,0], !/RTS
DFF[NDB$RMC$O_DE,THISWORD,8,1,0], !/DELETE (local file)
DFF[NDB$RMC$O_CRP,THISWORD,9,1,0], !/ENCRYPT
DFF[NDB$RMC$O_OPR,THISWORD,10,1,0], !/OPERATOR
DFF[NDB$RMC$O_SU,THISWORD,11,1,0], !/SUPERCEDE
DFF[NDB$RMC$O_APPD,THISWORD,12,1,0], !/APPEND
DFF[NDB$RMC$O_SBIT,THISWORD,13,1,0], !/SIXBIT
DFF[NDB$RMC$O_CKSM,THISWORD,14,1,0], !/CHECKSUM
DFF[NDB$RMC$O_ASCB,THISWORD,15,1,0], !/AB (ASCII BLOCK)
DFF[NDB$OSTYPE,NEXTWORD,27,8,0], !Type of remote operating system
DFF[NDB$FILESYS,THISWORD,18,8,0], !Type of file system (remote)
DFF[NDB$VERNUM,THISWORD,9,8,0], !DAP version #
DFF[NDB$ECONUM,THISWORD,0,8,0], !DAP ECO #
DFF[NDB$USRNUM,NEXTWORD,27,8,0], !User Version of DAP
DFF[NDB$SOFTVER,THISWORD,18,8,0], !Software version #
DFF[NDB$USRSOFT,THISWORD,9,8,0], !User software version #
DFF[NDB$GOT,THISWORD,0,9,0], !Bits for what messages we got so far
DFF[NDB$GOT_CFG,THISWORD,8,1,0], !Config
DFF[NDB$GOT_ATT,THISWORD,7,1,0], !Attributes
DFF[NDB$GOT_ACC,THISWORD,6,1,0], !Access
DFF[NDB$GOT_CTL,THISWORD,5,1,0], !Some sort of Control message
DFF[NDB$GOT_STREAM,THISWORD,4,1,0], !Stream has been set up
DFF[NDB$SYSCAP,MWORDS(3),WRD], !SYSCAP field of CONFIG (EX-12)
DFF[NDB$BUFSIZ,NEXTWORD,LH], !Remote's maximum bufferable message
DFF[NDB$DATATYPE,NEXTWORD,WRD], ![14](word) from ATTRIBUTES (EX-2)
DFF[NDB$MAXNSP,NEXTWORD,LH], ![14] maximum NSP message size
DFF[NDB$ORG,THISWORD,9,8,0], !ORG field of ATTRIBUTES
DFF[NDB$RFM,THISWORD,0,8,0], !RFM
DFF[NDB$RAT,NEXTWORD,WRD], ![14](full word) RAT (EX-3)
DFF[NDB$BSZ,THISWORD,0,8,0], !BSZ (byte size)
DFF[NDB$BLS,NEXTWORD,LH], !Block size
DFF[NDB$MRS,THISWORD,RH], !Record size
DFF[NDB$DEV,MWORDS(2),WRD], !Device characteristics
DFF[NDB$ACCFUNC,THISWORD,9,8,0], !Access function
DFF[NDB$FOP,MWORDS(2),WRD], !FOP field of Attributes
DFF[NDB$ACCOPT,MWORDS(2),WRD], !Access options EX-5
DFF[NDB$CTLFUNC,THISWORD,9,8,0], !Control function code
DFF[NDB$MLENGTH,THISWORD,0,9,0], ![17] DAP message length
DFF[NDB$FAC,NEXTWORD,WRD], ![14](full word) Access operations EX-3
DFF[NDB$SHR,NEXTWORD,WRD], ![14](full word) Shared operations EX-3
DFF[NDB$MASTER,NEXTWORD,35,1,0], ![15] Did we request this transfer?
DFF[NDB$TIMEDOUT,THISWORD,34,1,0], !We already timed out!!
DFF[NDB$CONNECTED,THISWORD,33,1,0], ![7.] We got a connect through
DFF[NDB$MFLAGS,THISWORD,18,9,0], !MFLAGS for most recent msg received
DFF[NDB$MFLAG_STM,THISWORD,18,1,0], !STREAMID field was present
DFF[NDB$MFLAG_LEN,THISWORD,19,1,0], !Length field was present
DFF[NDB$EQ,THISWORD,RH], !"NEXTJOB" message that initiated this
DFF[NDB$REQUESTOR,MWORDS(8),WRD], !Initiator of this request (ASCIZ)
DFF[NDB$REMOTEFILE,MWORDS(26),WRD], !Remote filespec (ASCIZ)
DFF[NDB$REMRENAME,MWORDS(26),WRD], !Remote RENAME filespec (ASCIZ)
DFF[NDB$NSPMLENGTH,%FIELDEXPAND(FILE$I_COUNT)] ![17]Byte count of message
TES;
DLIT <NDB_LEN,NEXTWORD>;
MACRO INOEOR(FB)=(.FB[FILE$I_CBUFF])<34,1>%,
ONOEOR(FB)=(.FB[FILE$O_CBUFF])<34,1>%;
MACRO CALLI(A,Y)=(BUILTIN MACHSKIP;MACHSKIP(%O'047',A,Y)) %;
MACRO HALTF=CALLI(1,%O'12') %;
MACRO CRLF=%CHAR(%O'15',%O'12') %;
MACRO OUTC(C)= BEGIN !Type character at addr C
BUILTIN MACHOP;
%IF FTLOG %THEN
EXTERNAL ROUTINE LOGC;
LOGC(.(C)); !Write to LOG file
%FI
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPCHR;
TYPCHR(.(C)) !C is address of char
END
%ELSE MACHOP(%O'051',1,C) !OUTCHR UUO
%FI
END%;
MACRO OUTC_NOLOG(C)=
BEGIN !Type character at addr C
BUILTIN MACHOP;
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPCHR;
TYPCHR(.(C)) !C is address of char
END
%ELSE MACHOP(%O'051',1,C) !OUTCHR UUO
%FI
END%;
MACRO TCHR(C)= !Type character passed as argument (OUTC immediate)
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPCHR;
%IF FTLOG
%THEN BEGIN
EXTERNAL LOGC;
LOGC((C))
END;
%FI;
TYPCHR((C)) !C is char
END
%ELSE BEGIN
LOCAL CH;
CH=C;
OUTC(CH)
END
%FI %;
MACRO TCHR_NOLOG(C)= !Type character passed as argument (OUTC immediate)
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPCHR;
TYPCHR((C)) !C is char
END
%ELSE BEGIN
LOCAL CH;
CH=C;
OUTC_NOLOG(CH)
END
%FI %;
MACRO TSTR(S)= BEGIN !Type string at address S
BUILTIN MACHOP;
%IF FTLOG %THEN
EXTERNAL ROUTINE LOGS;
LOGS(S); !Write to LOG file
%FI
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPSTR;
TYPSTR(S); !S is address of string
END
%ELSE MACHOP(%O'051',3,S) !OUTSTR UUO
%FI
END%;
MACRO TYPE[]=TSTR(UPLIT(%ASCIZ %STRING(%REMAINING))) %;
MACRO TSTR_NOLOG(S)= BEGIN !Type string at address S
BUILTIN MACHOP;
%IF FTDET
%THEN BEGIN
EXTERNAL ROUTINE TYPSTR;
TYPSTR(S); !S is address of string
END
%ELSE MACHOP(%O'051',3,S) !OUTSTR UUO
%FI
END%;
MACRO TYPE_NOLOG[]=TSTR_NOLOG(UPLIT(%ASCIZ %STRING(%REMAINING))) %;
MACRO CRASH(STR)=
BEGIN
EXTD(%NAME('.CRASH'));
TYPE(STR,%REMAINING);
%NAME('.CRASH')();
END
%;
FIELD INSTR_FIELDS=SET
INSTR$OPCODE=[0,27,9,0], !Opcode for instruction on PDP-10/20
INSTR$AC=[0,23,4,0], !AC Field
INSTR$IND=[0,22,1,0], !Indirect bit
INSTR$INDEX=[0,18,4,0], !Index register field
INSTR$ADDRESS=[0,0,18,0] !Direct address field
TES;
MACRO FILE_BLOCK=BLOCK[FB_LEN] FIELD(FILE_FIELDS) %,
NDB=BLOCK[NDB_LEN] FIELD(FILE_FIELDS,NDB_FIELDS) %,
INSTRUCTION=BLOCK[1] FIELD(INSTR_FIELDS) %,
XWD(A,B)=(((A)^18) OR (B)) %;
LITERAL TTYDESIG=%O'200000'; !Start of TTY UDX's
!MODE and OPEN bit definitions
LITERAL
_IOASC=0, !ASCII
_IOASL=1, !ASCII line
_IOBYT=3, !BYTE mode
_IOIMG=%O'10', !IMAGE
_IODMP=%O'17'; !DUMP mode
LITERAL
UU_DMR=%O'100000000000',!Disable message re-assembly
UU_AIO=%O'40000000000', !Non-blocking I/O
UU_NBE=%O'1000000'; !Non-blocking enter
!PSISER NON-IO INTERRUPT CODES
LITERAL
_PCDAT=-%O'21', !ATTACH/DETACH
_PCDAT_DETACH=-1; !It was a detach
!PATH UUO FUNCTION CODES
LITERAL
_PTFRD=-1, !Read default path
_PTFSD=-2, !Set default path
_PTFSL=-3, !Set LIB:
_PTFRL=-4; !Read LIB:
!
! FILOP FUNCTION CODES
!
LITERAL
_FORED=1, !Read
_FOCRE=2, !Non-superceding create
_FOWRT=3, !Create new file
_FOSAU=4, !Single-access update
_FOMAU=5, !Multiple-access update
_FOAPP=6, !Append
_FOCLS=7, !Close
_FOURB=%O'10', !Update RIB (checkpoint the file)
_FOUSI=%O'11', !USETI
_FOUSO=%O'12', !USETO
_FORNM=%O'13', !Rename
_FODLT=%O'14', !Delete
_FOPRE=%O'15'; !Preallocate
MACRO OPEN(FB,FUN)= BEGIN
EXTD(OPENFILE);
BIND FILB=FB: FILE_BLOCK;
FILB[FILE$FUNCTION]=FUN;
OPENFILE(FILB)
END%,
FILOPFUN(FB,FUN)=
BEGIN
EXTD(FILOP);
BIND FILB=FB: FILE_BLOCK;
FILB[FILE$FUNCTION]=FUN;
FILOP(FILB)
END%,
FILOPFUN_NOBUFF(FB,FUN)=
BEGIN
EXTD(FILOP);
BIND FILB=FB: FILE_BLOCK;
FILB[FILE$FUNCTION]=FUN; !Set up function
FILB[FILE$I_NBUFF]=(FILB[FILE$O_NBUFF]=0); !No buffers needed
FILOP(FILB)
END%,
OPEN_R(FB)=OPEN(FB,_FORED)%,
OPEN_W(FB)=OPEN(FB,_FOWRT)%,
OPEN_C(FB)=OPEN(FB,_FOCRE)%,
OPEN_CRE(FB)=OPEN(FB,_FOCRE)%,
OPEN_U(FB)=OPEN(FB,_FOSAU)%,
OPEN_RW(FB)=OPEN(FB,_FOSAU)%,
OPEN_A(FB)=OPEN(FB,_FOAPP)%,
OPEN_WNS(FB)=OPEN(FB,_FOCRE)%,
CLOSE(FB)=FILOPFUN(FB,_FOCLS)%,
CHECKPOINT(FB)=FILOPFUN(FB,_FOURB)%,
RENAME(FB)=FILOPFUN_NOBUFF(FB,_FORNM)%,
DELETE(FB)=FILOPFUN_NOBUFF(FB,_FODLT)%,
PREALLOCATE(FB)=OPEN(FB,_FOPRE)%;
LITERAL MAX_NXFERS=6; !Maximum # of simultaneous file transfers
MACRO !Macros to define fields in completion codes & condition codes
SEVERITY=0,3,0%, !Severity of condition
STSCODE=3,22,0%, !Status code
FACCODE=25,11,0%; !Facility code
!These are macros so they can be used without mapping a structure
!onto whatever is being used
!i.e. B<SEVERITY>
MACRO ERROR(X)=BEGIN
%IF FTSIG
%THEN
SIGNAL((((X)^3)+SS$_ERROR),%REMAINING)
%FI
RETURN(((X)^3)+SS$_ERROR)
END%;
MACRO SIGNALW(X)=(SIGNAL((((X)^3)+SS$_WARN),%REMAINING)) %;
MACRO SIGNALE(X)=(SIGNAL((((X)^3)+SS$_ERROR),%REMAINING)) %;
MACRO WARNING(X)=BEGIN
%IF FTSIG
%THEN
SIGNAL((((X)^3)+SS$_WARN),%REMAINING)
%FI
RETURN(((X)^3)+SS$_WARN)
END%;
MACRO INFORM(X)=BEGIN
%IF FTSIG
%THEN
SIGNAL((((X)^3)+SS$_NORMAL),%REMAINING)
%FI
RETURN(((X)^3)+SS$_NORMAL)
END%;
!ERROR CODES
LITERAL
WIN=1, !Non-error code
SS$_NORMAL=1, !Same as WIN
SS$_WARN=0, !Warning
SS$_ERROR=2, !Error
SS$_SEVEREERROR=4; !Bad error
MACRO ERGROUP(SYM,NUM,TEXT)=
LITERAL SYM=NUM;%;
MACRO ALL_ERGROUPS=
ERGROUP(FPAERR,%O'700000', 'Filespec parsing error')
ERGROUP(PATERR,%O'711000' ,'PATH. UUO error')
ERGROUP(PISERR,%O'713600', 'PISYS error')
ERGROUP(IPCERR,%O'714200', 'Send/Receive (IPCF) errors')
ERGROUP(CMDERR,%O'700020', 'Error in command')
ERGROUP(FILERR,%O'715500', 'FILOP. LOOKUP or ENTER error')
ERGROUP(DAPERR,%O'300000' ,'DAP error')
ERGROUP(RMTERR,%O'7000000', 'Remote system detected error')
ERGROUP(LNKERR,%O'7700000', 'Data link error')
ERGROUP(QSRERR,%O'712000', 'QUASAR error')
ERGROUP(NODERR,%O'713000', 'NODTBL error')
%;
ALL_ERGROUPS;
MACRO ALL_ERRS=
ER(ILLFSP,FPAERR+%O'00' ,'Illegal filespec')
ER(ILLDIR,FPAERR+%O'01' ,'Illegal directory specification')
ER(DUPNAM,FPAERR+%O'02' ,'Duplicate file name')
ER(DUPEXT,FPAERR+%O'03' ,'Duplicate extension')
ER(DUPDEV,FPAERR+%O'04' ,'Duplicate device')
ER(DUPDIR,FPAERR+%O'05' ,'Duplicate Directory specification')
ER(ILCFSP,FPAERR+%O'07' ,'Illegal character in filespec')
ER(NODNAL,FPAERR+%O'10' ,'NODEID specified when none permitted')
ER(DUPNOD,FPAERR+%O'11' ,'Duplicate node id')
ER(WLDNAL,FPAERR+%O'12', 'Wildcard filespec not allowed')
ER(WLNNAL,FPAERR+%O'13', 'Wildcard NODEID not permitted')
ER(OPRABO,%O'777777', 'Aborted by Operator')
ER(OPRDEF,%O'777776' ,'Deferred by Operator')
ER(TIMOUT,%O'777750', 'Time-out period exhausted')
ER(USRABO,%O'777740', 'Aborted by user')
ER(USRDEF,%O'777741', 'Deferred by user')
ER(ILLSWI,%O'700020', 'Undefined switch')
ER(AMBSWI,%O'700021', 'Ambiguous switch')
ER(ILLCMD,%O'700030', 'Undefined command')
ER(AMBCMD,%O'700031', 'Ambiguous command')
ER(CONCMD,%O'700032', 'Contradictory sequence of commands or switches')
ER(RNGCMD,%O'700033', 'Argument to command out of range')
ER(ARGCMD,%O'700034', 'Unrecognized argument to command')
ER(FRKNEX,%O'710000', 'Process specified is not START''ed')
ER(FRKAEX,%O'710001', 'Process specified has already been START''ed')
ER(NOINTC,%O'700075', 'No free interrupt channels')
ER(NOIOCH,%O'700076', 'No free I/O channels')
ER(ALLOCF,%O'700077' ,'Memory allocation failed')
ER(PATNSF,PATERR+%O'77' ,'SFD not found')
ER(PATDND,PATERR+1, 'Device not DISK')
ER(PISTMA,PISERR, 'Argument block given when none was wanted')
ER(PISNFS,PISERR+1, 'No function code bits set')
ER(PISUKF,PISERR+2, 'Unknown function bits set')
ER(PISOOF,PISERR+3, 'You tried to turn PSI both on and off')
ER(PISUKC,PISERR+4, 'Bad argument block address')
ER(PISDNO,PISERR+5, 'Device not OPENed')
ER(PISPRV,PISERR+6, 'Priveleged (or illegal) operation')
ER(PISIVO,PISERR+7, 'Vector offset too large or not multiple of 4')
ER(PISUKR,PISERR+8, '3rd word of argument block is not 0')
ER(PISNRW,PISERR+10, 'RH of 3rd word is not 0')
ER(PISPND,PISERR+11, 'No PIINI. was executed')
ER(PISARF,PISERR+12, 'You tried to both add & remove a device')
ER(IPCACK,IPCERR+1, 'Send/Receive address check')
ER(IPCBNL,IPCERR+2, 'Block not long enough')
ER(IPCNMR,IPCERR+3, 'No messages in receive queue')
ER(IPCDTL,IPCERR+5, 'Message too long')
ER(IPCDUN,IPCERR+6, 'Destination for message unknown')
ER(IPCDDS,IPCERR+7, 'Destination for message disabled')
ER(IPCSQE,IPCERR+%O'10','Send quota exceeded')
ER(IPCRQE,IPCERR+%O'11','Receive quota exceeded')
ER(IPCNSS,IPCERR+%O'12','No room in system storage')
ER(IPCCRP,IPCERR+%O'13','Can''t receive to this page')
ER(IPCISP,IPCERR+%O'14','Invalid sender''s PID')
ER(IPCIPE,IPCERR+%O'15','No IPCF priveleges enabled')
ER(IPCUKF,IPCERR+%O'16','Unknown function requested from system process')
ER(IPCNXJ,IPCERR+%O'17','Non-existant job number')
ER(IPCPTF,IPCERR+%O'20','System PID table full')
ER(IPCPMN,IPCERR+%O'21','Page mode bit in receive did not match message')
ER(IPCPIE,IPCERR+%O'22','Paging I/O error')
ER(IPCBIP,IPCERR+%O'23','Bad index specified for system PID table')
ER(IPCUID,IPCERR+%O'24','Undefined ID in system PID table')
!The following are errors from [SYSTEM]INFO
ER(IPCIIE,IPCERR+%O'70','Internal error in [SYSTEM]INFO')
ER(IPCIRF,IPCERR+%O'71','Request from [SYSTEM]INFO to [SYSTEM]IPCC failed')
ER(IPCIAF,IPCERR+%O'72','[SYSTEM]INFO failed to assign a PID or name')
ER(IPCPQE,IPCERR+%O'73','PID quota exceeded')
ER(IPCUPS,IPCERR+%O'74','Unknown PID specified')
ER(IPCDNS,IPCERR+%O'75','Duplicate receiver name specified')
ER(IPCUNS,IPCERR+%O'76','Unknown receiver name specified')
ER(IPCNIC,IPCERR+%O'77','Name contains illegal characters')
ER(FILFNF,FILERR, 'File not Found')
ER(FILIPP,FILERR+1, 'Bad PPN')
ER(FILPRT,FILERR+2, 'Protection failure')
ER(FILFBM,FILERR+3, 'File being modified')
ER(FILAEF,FILERR+4, 'File already exists')
ER(FILISU,FILERR+5, 'Illegal sequence of UUO''s')
ER(FILTRN,FILERR+6, 'Transmission error')
ER(FILNSF,FILERR+7, 'Not a .SAVE file')
ER(FILNEC,FILERR+%O'10' ,'Not enough core')
ER(FILDNA,FILERR+%O'11' ,'Device not avaliable')
ER(FILNSD,FILERR+%O'12' ,'No such device')
ER(FILILU,FILERR+%O'13' ,'Illegal UUO')
ER(FILNRM,FILERR+%O'14' ,'No room')
ER(FILWLK,FILERR+%O'15' ,'Write-locked')
ER(FILNET,FILERR+%O'16' ,'Not enough table space')
ER(FILPOA,FILERR+%O'17' ,'Partial allocation')
ER(FILBNF,FILERR+%O'20' ,'Block not free')
ER(FILCSD,FILERR+%O'21' ,'Can''t supercede a directory')
ER(FILDNE,FILERR+%O'22' ,'Can''t delete non-empty directory')
ER(FILSNF,FILERR+%O'23' ,'SFD not found')
ER(FILSLE,FILERR+%O'24' ,'Search list empty')
ER(FILLVL,FILERR+%O'25' ,'SFDs nested too deeply')
ER(FILNCE,FILERR+%O'26' ,'No-Create for whole search list')
ER(FILSNS,FILERR+%O'27' ,'Segment not on swap space')
ER(FILFCU,FILERR+%O'30' ,'Can''t update file')
ER(FILLOH,FILERR+%O'31' ,'Loseg overlaps Hiseg')
ER(FILNLI,FILERR+%O'32' ,'Login please')
ER(FILENQ,FILERR+%O'33' ,'File still has outstanding locks set')
ER(FILBED,FILERR+%O'34' ,'Bad .EXE directory')
ER(FILBEF,FILERR+%O'35' ,'.EXE file must have extension .EXE')
ER(FILDTB,FILERR+%O'36' ,'.EXE directory too big')
ER(FILENC,FILERR+%O'37' ,'Exceeded network capability')
ER(FILTNA,FILERR+%O'40' ,'Task not avaliable')
ER(FILUNN,FILERR+%O'41' ,'Undefined network node')
ER(FILOPN,FILERR+%O'77' ,'Open failure')
%(
ER(IOERR,%O'1000000' ,'IO error (status error bits are added to this)')
ER(IOIMP,%O'1400000' ,'Improper mode')
ER(IODER,%O'1200000' ,'Device error')
ER(IODTE,%O'1100000' ,'Data error')
ER(IOBKT,%O'1040000' ,'Block or block number too large')
)%
ER(ENDFILE,%O'20000' ,'End of File')
!ER(ENDFILE,%O'50047', 'End of File')
ER(IOERROR,%O'20001', 'IO error')
ER(INERROR,%O'50132', 'Read error')
ER(OUTERROR,%O'50163', 'Write error')
ER(DEVFULL,%O'50065', 'Device full')
ER(EXQUOTA,%O'27775', 'Quota Exceeded')
ER(IOINT,%O'27777', 'IO interrupt')
ER(REATTA,%O'27776', 'ATTACH or DETACH was done')
%IF FTQUASAR %THEN
ER(QSRNRN,QSRERR, 'QUASAR not running')
ER(QSRSTC,QSRERR+10, 'Status change request')
%FI
%IF FTNET %THEN
ER(CNXFER,%O'770501', 'Number of transfer slots changed')
%FI
ER(CLKFUL,%O'770101', 'Clock request table full')
%IF FTNET %THEN
ER(DAPFTL,%O'300001' ,'Field too long')
ER(DAPEOM,%O'300002' ,'End of Message')
ER(RERDEV,RMTERR+%O'40035','Bad or inappropriate device specified')
ER(RERFNM,RMTERR+%O'40063','File name syntax error')
ER(RERDNF,RMTERR+%O'40040','Directory not found')
ER(REREOF,RMTERR+%O'50047','End of File')
ER(RERFEX,RMTERR+%O'40055','File already exists')
ER(RERFLK,RMTERR+%O'40060','File locked or being modified')
ER(RERFNF,RMTERR+%O'40062','File not found')
ER(RERPRV,RMTERR+%O'40125','Access refused')
ER(RERTMO,RMTERR+%O'40230','Timeout period exhausted in setup phase')
ER(RETDFL,RMTERR+%O'50243','Directory full or quota exceeded during transfer')
ER(RERDFL,RMTERR+%O'40243', 'Directory full or quota exceeded')
ER(RERQEX,RMTERR+%O'40311', 'Quota Exceeded')
ER(RETQEX,RMTERR+%O'50311', 'Quota Exceeded during transfer')
ER(RERFUL,RMTERR+%O'50065','Device full')
ER(RETTMO,RMTERR+%O'50230','Timeout period exhausted during transfer')
ER(RERTEL,RMTERR+%O'47777', '/OPERATOR')
ER(RERMJE,RMTERR+%O'47775', 'MJOB exceeded')
ER(RERLIM,RMTERR+%O'47773', 'File size limit for node exceeded')
ER(RERUNN,RMTERR+%O'47772', 'Node not in node table')
ER(LNKCON,LNKERR+%O'1000', 'Local system established connection')
ER(LNKDIS,LNKERR+%O'1001', 'Local system terminated connection')
ER(RMTREJ,LNKERR+%O'77774', 'Remote system Rejected connection')
ER(LNKNAV,LNKERR+%O'77770', 'Network link not available')
ER(RMTDIS,LNKERR+%O'77777', 'Remote system terminated connection')
ER(RMTABO,LNKERR+%O'77776', 'Remote system aborted transfer')
ER(RMTOFF,LNKERR+%O'77775', 'Network Connection Lost')
ER(NODUNN,NODERR, 'Node not in node table')
ER(NODTOD,NODERR+1, 'Node not avaliable at this time of day')
ER(NODDIS,NODERR+2, 'Requested function disabled for this node')
ER(NODLIM,NODERR+3, 'File size limit for node exceeded')
%FI
ER(INFQIT,%O'4000000' ,'Inferior process has terminated') !for better or worse
ER(FRKEND,%O'4200000', 'This process is terminating')
ER(ERRXXX,%O'777700' ,'Random error')
%;
MACRO ER(SYM,NUM)=LITERAL SYM=NUM;%;
ALL_ERRS;
LITERAL UNNCMD=NODUNN; !Undefined network node
MACRO TNUM(NUM,RAD)=
BEGIN
EXTD(WRNUM);
LOCAL STR: VECTOR[CH$ALLOCATION(80)];
WRNUM(NUM,%IF %NULL(RAD) %THEN 8 %ELSE RAD %FI,CH$PTR(STR));
TSTR(STR);
END%;