Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-08 - 43,50512/netcom.bli
There are no other files named netcom.bli in the archive.
!Common definitions for NETSPL
!Conditionalized for NETSPL-10 and NETSPL-11
!
!	SWITCHES LIST(NOSOURCE,NOSOURCE);

!
! COPYRIGHT (C) 1977
! DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS, 01754
!
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY  ON  A
! SINGLE  COMPUTER  SYSTEM  AND  MAY  BE  COPIED  ONLY  WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.   THIS  SOFTWARE,  OR
! ANY  OTHER  COPIES  THEREOF,  MAY NOT BE PROVIDED OR OTHERWISE
! MADE AVAILABLE TO ANY OTHER PERSON  EXCEPT  FOR  USE  ON  SUCH
! SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS.  TITLE TO
! AND OWNERSHIP OF THE SOFTWARE SHALL AT  ALL  TIMES  REMAIN  IN
! DIGITAL.
!
! THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT
! NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
! EQUIPMENT CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY
! OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.
!
!Conditionals:
!Default for BLISS16 is RSTS,
!Default for BLISS36 is TOPS-10
%IF NOT %DECLARED(FTDAP50) %THEN COMPILETIME FTDAP50=-1; %FI
%BLISS16( %IF NOT %DECLARED(FTRSTS) %THEN LITERAL FTRSTS=-1; %FI )
%BLISS36( %IF NOT %DECLARED(FTTOPS10) %THEN LITERAL FTTOPS10=-1; %FI)
%IF NOT %DECLARED(FTRSTS) %THEN LITERAL FTRSTS=0; %FI
%IF NOT %DECLARED(FTTOPS10) %THEN LITERAL FTTOPS10=0; %FI
%IF NOT %DECLARED(RSX) %THEN LITERAL FTRSX=0; %FI
MACRO	RSTS[]=%EXPAND %IF FTRSTS %EXPAND %THEN %REMAINING %EXPAND %FI%,
	FCS[]=%EXPAND %IF (FTRSTS OR FTRSX)
		%EXPAND %THEN %REMAINING %EXPAND %FI%,
	TOPS10[]=%EXPAND %IF FTTOPS10 %EXPAND %THEN %REMAINING %EXPAND %FI%;

RSTS(
!
!	RECEIVER DATA BLOCK DEFINITIONS
!

MACRO
	RD$NAM(RDB)=(RDB)%,		! RECEIVER ID IN ASCII
	RD$OBJ(RDB)=(RDB+6)<0,8>%,	! OBJECT TYPE
	RD$ACF(RDB)=(RDB+7)<0,8>%,	! ACCESS CONTROL FIELD
	RD$BMX(RDB)=(RDB+8)%,		! BUFFER MAXIMUM
	RD$LRM(RDB)=(RDB+10)%,	
	RD$MMX(RDB)=(RDB+12)<0,8>%,	! MESSAGE MAXIMUM
	RD$LMX(RDB)=(RDB+13)<0,8>%,	! LINK MAXIMUM
	RD$CIA(RDB)=(RDB+14)%;		! CONNECT INIT AST


!	BIT DEFINITIONS FOR RD$ACF 

LITERAL
	RD$LCL=%O'000001',		! LOCAL SENDERS ALLOWED
	RD$LCP=%O'000002',		! LOCAL SENDERS PRIVILEGED
	RD$NLR=%O'000004',		! NETWORK MAY SEND CONNECT INIT
	RD$NSM=%O'000010';		! NETWORK MAY SEND SINGLE MESSAGES
)!End RSTS
%BLISS16(
!
!	LOGICAL LINK DATA BLOCK - LDB
!

MACRO
	LD$LNK(LDB)=(LDB)%,		! LINK TO NEXT LDB FOR JOB
	LD$CAD(LDB)=(LDB+2)%,		! PTR TO CONNECT PARAM BLOCK
	LD$ODA(LDB)=(LDB+4)%,		! PTR TO OPTIONAL DATA
	LD$ODL(LDB)=(LDB+6)<0,8>%,	! LENGTH OF OPTIONAL DATA
	LD$ULA(LDB)=(LDB+7)<0,8>%,	! USER LINK ADDRESS
	LD$LLA(LDB)=(LDB+8)%,		! LOCAL LINK ADDRESS
	LD$XBF(LDB)=(LDB+10)%,		! TRANSMIT BUFFER QUEUE
	LD$RBF(LDB)=(LDB+12)%,		! RECEIVE BUFFER QUEUE
	LD$XMX(LDB)=(LDB+14)%,		! TRANSMIT DATA LENGTH MAX
	LD$RMX(LDB)=(LDB+16)%,		! RECEIVE BUFFER LENGTH
	LD$INA(LDB)=(LDB+18)%,		! INTERRUPT AST ADDRESS
	LD$DIA(LDB)=(LDB+20)%,		! DISCONNECT AST
	LD$CCA(LDB)=(LDB+22)%,		! CONNECT CONFIRM
	LD$CRA(LDB)=(LDB+24)%,		! CONNECT REJECT
	LD$LSA(LDB)=(LDB+26)%,		! AST FOR LINK STATUS MSG
	LD$TMA(LDB)=(LDB+28)%,		! TIMER EXPIRED AST
	LD$TIM(LDB)=(LDB+30)%,		! TIMER VALUE
	LD$FLG(LDB)=(LDB+40)<0,8>%,	! FLOW HUNG FLAG
	LD$LID(LDB)=(LDB+41)<0,8>%;	! LOCAL ID FOR MESSAGE RECEIVES

LITERAL
	LDB$SIZ=42;			! SIZE OF NFAR LDB AREA


!	END OF NFAR DEFINED LDB AREA

!	FOLLOWING DEFINITIONS USED BY NETSPL FOR THE /AFTER
!	LDB (FAKE) FOR TIMER SERVICE

MACRO
	LDB$ADT(LDB)=(LDB+LDB$SIZ)%,		! DATE FOR TIMER TOGO
	LDB$ATM(LDB)=(LDB+LDB$SIZ+2)%;		! TIME TO GO

!	FOLLOWING DEFINITIONS ARE USED BY NETSPL FOR
!	LINK DEPENDENT DATA

MACRO
	LDB$FDB(LDB)=(LDB+LDB$SIZ)%,	! FDB FOR THIS LINK
	LDB$RMC(LDB)=(LDB+LDB$SIZ+%O'140')%,	!RMCOPY PARAM BLOCK FOR TRANSFER
	LDB$CPB(LDB)=(LDB+LDB$SIZ+%O'1140')%,  ! CONNECT PARAM BLOCK
	LDB$UNT(LDB)=(LDB+LDB$SIZ+728)%,	! UNIT NUMBER OF REMOTE NODE
	LDB$BLK(LDB)=(LDB+LDB$SIZ+730)%,	! BLOCK NUMBER OF TRANSFER REQUEST
	LDB$NOD(LDB)=(LDB+LDB$SIZ+732)%,	! NODE ENTRY POINTER
	LDB$EOF(LDB)=(LDB+LDB$SIZ+734)%,	! END OF FILE FLAG
	LDB$EJB(LDB)=(LDB+LDB$SIZ+736)%,	! ENDJOB DONE FLAG
	LDB$FHC(LDB)=(LDB+LDB$SIZ+740)%,	! FILE HEADER CHARACTERISTICS
	LDB$CFG(LDB)=(LDB+LDB$SIZ+754)%,	! REMOTE CONFIG MESSAGE
	LDB$CPR(LDB)=(LDB+LDB$SIZ+774)%,	! AVERAGE RECORD SIZE
	LDB$RCT(LDB)=(LDB+LDB$SIZ+776)%,	! RECORD COUNT
	LDB$CFM(LDB)=(LDB+LDB$SIZ+778)%,	! LINK CONFIRMED FLAG
	LDB$TIM(LDB)=(LDB+LDB$SIZ+780)%,	! TIME CURRENT TRANSFER STARTED
	LDB$RUN(LDB)=(LDB+LDB$SIZ+782)%,	! RUN TIME SYSTEM NAME
	LDB$TRN(LDB)=(LDB+LDB$SIZ+786)%,	! BYTES TRANSFERED OVER LINK
	LDB$PRT(LDB)=(LDB+LDB$SIZ+790)%,	! DESIRED PROTECTION CODE

	LDB$AVL(LDB)=(LDB+LDB$SIZ+792)%;	! AVAIL SPACE
)	!End BLISS16
FCS(
!
!	BUFFER HEADER DESCRIPTER - BFB
!

MACRO
	BF$LNK(BUF)=(BUF)%,		! LINK TO NEXT BUFFER
	BF$LDB(BUF)=(BUF+2)%,		! POINTER TO LDB
	BF$SAS(BUF)=(BUF+4)%,		! NSP USER AST ADDRESS
	BF$RAS(BUF)=(BUF+6)%,		! AST FOR RECEIVE COMPLETE
	BF$USR(BUF)=(BUF+8)%,		! DAP USER AST ADDRESS
	BF$EOM(BUF)=(BUF+10)<0,8>%,	! END OF MSG FLAG
	BF$LNS(BUF)=(BUF+11)<0,8>%,	! LOCAL SENDER FLAG
	BF$LNA(BUF)=(BUF+12)%,		! LOCAL SENDER ADDRSSS
	BF$SIZ(BUF)=(BUF+14)%,		! SIZE OF BUFFER
	BF$LEN(BUF)=(BUF+16)%,		! LENGTH OF DATA
	BF$OFF(BUF)=(BUF+18)%,		! OFFSET OF DATA INTO BUF
	BF$DAT(BUF)=(BUF+20)%;		! START OF DATA IN BUFFER

MACRO
	BUFTX1=(BF$DAT(.BUF))<0,8>%,
	BUFTX2=(BF$DAT(.BUF)+1)<0,8>%,
	BUFTX3=(BF$DAT(.BUF)+2)<0,8>%,
	BDATA(I)=(BF$DAT(.BUF)+2*I)%;
)!End FCS
!
!	DAP MESSAGE TYPES DEFINED
!

LITERAL
	DAP_CFG=1,		! CONFIGURATION 
	DAP_ATT=2,		! ATTRIBUTES
	DAP_ACC=3,		! ACCESS
	DAP_CTL=4,		! CONTROL
	DAP_CON=5,		! CONTINUE
	DAP_ACK=6,		! ACKNOWLEDGE
	DAP_ACM=7,		! ACCESS COMPLETE
	DAP_DAT=8,		! DATA
	DAP_STS=9,		! STATUS
	DAP_KEY=10,		! KEY DEFINITION
	DAP_ALC=11,		! ALLOCATION
	DAP_SUM=12,		! SUMMARY ATTRIBUTES MESSAGE
	DAP_DTM=13,		! DATE & TIME ATTRIBUTES MESSAGE
	DAP_PRO=14,		! PROTECTION
	DAP_NAM=15,		! NAME MESSAGE
	DAP_FHC=16,		! FILE HEADER CHARACTERISTICS
	DAP_ACL=17;		! ACCESS CONTROL LIST
!
!Bits within FLAGS byte
!
!
LITERAL
	MFLAGS_STREAMID=0,	! STREAMID present
	MFLAGS_LENGTH=1,	! LENGTH field present
	MFLAGS_LEN256=2,	!2-byte length field present
	MFLGS_BITCNT=3;		!BIT COUNT in DATA message only!!
!
!	FIELDS WITHIN CONFIGURATION MESSAGES
!
!
!NOTE - SINCE THESE MESSAGES ARE FIXED FORMAT, THEY ARE
!  STORED AS-IS, AND INDIVIDUAL FIELDS ARE ACCESSED VIA
!  THE FOLLOWING MACROS INSTEAD OF THE USUAL DAP FIELD
!  ACCESS ROUTINES.
!

%BLISS16(
MACRO
	CFG_BUF(X)=(X)%,		! MAX BUFFER SIZE
	CFG_OST(X)=(X+2)<0,8>%,		! OPERATING SYSTEM TYPE
	CFG_FIL(X)=(X+3)<0,8>%,		! FILE SYSTEM TYPE
	CFG_VER(X)=(X+4)<0,8>%,		! DAP VERSION NUMBER
	CFG_ECO(X)=(X+5)<0,8>%,		! DAP ECO NUMBER
	CFG_USR(X)=(X+6)<0,8>%,		! USER MOD OF DAP LEVEL
	CFG_SFT(X)=(X+7)<0,8>%,		! DAP SOFTWARE VERSION
	CFG_USS(X)=(X+8)<0,8>%,		! USER SOFTWARE VERSION
	CFG_CAP(X)=(X+9)%;		! SYSTEM CAPABILITIES
					!  START OF EXTENSIBLE FIELD
)!End %BLISS16
!
!	DAP ATTRIBUTE MESSAGE FIELD DEFINITIONS
!

![5.0]	SYSCAP BITS
LITERAL
	SYS_PREALLOCATE=0,	!PREALLOCATION
	SYS_SEQ_ORG=1,	!Sequential file organization
	SYS_REL_ORG=2,	!Relative...
	SYS_DIR_ORG=3,	!Direct... (reserved)
	SYS_1KEY_ORG=4,	!Single keyed indexed... (reserved)
	SYS_SEQ_ACC=5,	!Sequential file access
	SYS_REC_ACC=6,	!Access by record #
	SYS_VBN_ACC=8,	!Access by VBN
	SYS_KEY_ACC=9,	!Random access by Key
	SYS_HSH_ACC=10,	!User generated hash code access (reserved)
	SYS_RFA_ACC=11,	!Access by RFA
	SYS_NKEY_ORG=12,!Multi-key indexed organization
	SYS_SWITCH_ACC=13,	!Switching access mode
	SYS_APPEND=14,	!Append
	SYS_SUBMIT_ACC=16, !SUBMIT access message
	SYS_COMPRESS=17, !File compression (reserved)
	SYS_STREAMS=18,	!Multiple data streams
	SYS_STSRET=19,	!Status return
	SYS_BLOCKING=20,!DAP message blocking
	SYS_SBLOCKING=21, !Blocking across responses
	SYS_LEN256=22,	!2-byte length field supported
	SYS_CHECKSUM=24,!File checksum
	SYS_KDF=25,	!KEY definition XAM
	SYS_ALLOC=26,	!ALLOCATION XAM
	SYS_SUM=27,	!Summary attributes XAM
	SYS_FHC=28,	!File header characteristics XAM
	SYS_DTM=29,	!Date & time XAM
	SYS_PRO=30,	!Protection XAM
	SYS_ACL=32,		!Access control list XAM
	SYS_SPOOL_FOP=33,	!Spool via FOP field
	SYS_SUBMIT_FOP=34,	!Submit via FOP field
	SYS_ERASE_FOP=35,	!Delete via FOP field
	SYS_DEFAULT_FSP=36,	!Default filespec
	SYS_RELATED_FSP=37,	!Related filespec
	SYS_RECOVERY=38,	!Recovery option (reserved)
	SYS_BITCNT=40;		!BITCOUNT field

!	MENU OF FIELDS IN MESSAGE

LITERAL
	ATT_DAT=0,		! DATA TYPE
	ATT_ORG=1,
	ATT_RFM=2,
	ATT_RAT=3,
	ATT_BLS=4,
	ATT_MRS=5,
	ATT_ALQ=6,
	ATT_BKS=8,
	ATT_FSZ=9,
	ATT_MRN=10,
	ATT_RUN=11,
	ATT_DEQ=12,
	ATT_FOP=13,	!FOP was moved to ATTRIBUTES message
	ATT_BSZ=14,	!Reserved as of DAP 4.2
	ATT_DEV=16,	! " "
	ATT_SDC=17;	! " "

!	DATATYPE FIELD DEFINITIONS

LITERAL
	DAT$ASC=0,		! ASCII DATA
	DAT$IMA=1,		! IMAGE MODE (DEFAULT)
	DAT$EBC=2,		! EBCDIC
	DAT$CPR=3,		! COMPRESSED
	DAT$EXE=4,		! EXECUTABLE
	DAT$PRV=5,		! PRIVILEGED
	DAT$MAT=6,		! Reserved for match attributes
	DAT$ZOD=8,		! Zero on delete [5.0]
	DAT$M11=9;		! MACY11 (BIN16) format

!	ORG FIELD

LITERAL
	FB$SEQ=0,		! SEQUENTIAL (DEFAULT)
	FB$REL=%O'20',		! RELATIVE
	FB$IDX=%O'40',		! INDEXED
	FB$DIR=%O'60';		! DIRECT

! RECORD FORMAT (RFM) FIELD

LITERAL
	FB$UDF=0,		! UNDEFINED RECORD FORMAT
	FB$FIX=1,		! FIXED LENGTH (DEFAULT)
	FB$VAR=2,		! VARIABLE LENGTH
	FB$VFC=3,		! VARIABLE WITH FIXED CONTROL
	FB$STM=4,		! ASCII STREAM
	FB$LSA=5;		! LINE SEQUENCED ASCII

!	RAT FIELD - RECORD ATTRIBUTES

LITERAL
	FB$FTN=0,		! FORTRAN CARRIAGE CONTROL
	FB$CR=1,		! LF/CR ENVELOPE
	FB$CBL=2,		! COBOL CARRIAGE CTL
	FB$BLK=3;		! RECORDS DO NOT SPAN BLOCKS

!	DEV FIELD - GENERIC DEVICE CHARACTERISTICS

LITERAL
	FB$REC=0,		! RECORD ORIENTED
	FB$CCL=1,		! CARRAIGE CONTROL DEVICE
	FB$TRM=2,		! TERMINAL
	FB$MDI=3,		! DIRECTORY STRUCTURED
	FB$SDI=4,		! SINGLE DIRECTORY
	FB$SQD=5,		! INHERENTLY SEQUENTIAL
	FB$FOD=8,		! FILES ORIENTED DEVICE
	FB$SHR=9,		! SHARABLE DEVICE
	FB$SPL=10,		! DEVICE IS BEING SPOOLED
	FB$MNT=11,		! DEVICE IS CURRENTLY MOUNTED
	FB$DMT=12,		! DEV MARKED FOR DISMOUNT
	FB$ALL=13,		! DEV ALLOCATED
	FB$IDV=14,		! DEVICE CAPABLE OF INPUT
	FB$ODV=16,		! DEVICE CAPABLE OF OUTPUT
	FB$SWL=17,		! SOFTWARE WRITE=LOCKED
	FB$AVL=18,		! DEVICE AVAILABLE
	FB$ELG=19,		! ERROR LOGGING ENABLED
	FB$MBX=20,		! DEVICE IS A MAILBOX
	FB$RTM=21,		! DEVICE IS REAL-TIME IN NATURE
	FB$RAD=22;		! DEVICE IS RANDOM ACCESS

![5.0]	MENU BITS FOR DATE & TIME MESSAGE

LITERAL
	DTM_CDT=0,		! CREATION DATE PRESENT
	DTM_RDT=1,		! ACCESS DATE PRESENT
	DTM_EDT=2;		! SCRATCH DATE PRESENT

![5.0]	MENU BITS FOR PROTECTION MESSAGE

LITERAL
	PRO_OWNER=0,		! OWNER FIELD PRESENT
	PRO_PROTSYS=1,		! SYSTEM PROTECTION FIELD PRESENT
	PRO_PROTOWN=2,		! OWNER PROTECTION FIELD PRESENT
	PRO_PROTGRP=3,		! GROUP PROTECTION FIELD PRESENT
	PRO_PROTWLD=4;		! WORLD PROTECTION FIELD PRESENT

!	BIT DEFINITIONS IN PROTECTION FIELDS

LITERAL
	XB$RDV=0,		! DENY READ ACCESS
	XB$WRV=1,		! DENY WRITE ACCESS
	XB$EXE=2,		! DENY EXECUTE ACCESS
	XB$DLE=3,		! DENY DELETE ACCESS
	XB$APP=4,		! DENY APPEND ACCESS
	XB$LST=5,		! DENY LIST (directory) ACCESS
	XB$UPD=6,		! DENY UPDATE ACCESS
	XB$CNG=8,		! DENY CHANGE PROTECTION ACCESS
	XB$EXT=9;		! DENY EXTEND ACCESS
!
!	ACCESS MESSAGE FIELD DEFINITIONS
!

!	ACCESS FUNCTION FIELD

LITERAL
	ACC$OPEN=1,		! OPEN EXISTING FILE
	ACC$CREATE=2,		! CREATE NEW FILE
	ACC$RENAME=3,		! RENAME FILE
	ACC$ERASE=4,		! ERASE A FILE
	ACC$LIST=6,		! DIRECTORY LIST
	ACC$CMD=7,		! SUBMIT AS A BATCH JOB
	ACC$EXE=8;		! EXECUTE A BATCH JOB

!	FAC FIELD - FILE ACCESS OPERATIONS REQUIRED

LITERAL
	FB$PUT=0,		! PUT ACCESS
	FB$GET=1,		! GET ACCESS
	FB$DEL=2,		! DELETE ACCESS
	FB$UPD=3,		! UPDATE ACCESS
	FB$TRN=4,		! TRUNCATE ACCESS
	FB$BIO=5;		! BLOCK I/O ACCESS

!	FOP - FILE ACCESS OPTIONS REQUIRED

LITERAL
	FB$RWO=0,		! REWIND ON OPEN
	FB$RWC=1,		! REWIND ON CLOSE
	FB$POS=3,		! MAG TAPE POSITIONED PAST LAST FILE
	FB$DLK=4,		! DO NOT LOCK IF CLOSE OK
	FB$ACK=6,		! VERIFY ATTRIBUTES
	FB$CTG=8,		! CONTIGUOUS ALLOCATION
	FB$SUP=9,		! SUPERSCEDE EXISTING FILE
	FB$NEF=10,		! FORTRAN TAPE OPEN UPDATE
	FB$TMP=11,		! CREATE TEMP FILE
	FB$MKD=12,		! MARK FOR DELETION
	FB$FID=13,		! OPEN BY FILE ID
	FB$DMP=14,		! DISMOUNT ON CLOSE
	FB$WCK=16,		! WRITE CHECKING
	FB$RCK=17,		! READ CHECKING
	FB$CIF=18,		! NEW FILE ONLY
	FB$LKO=19,		! OVERRIDE FILE LOCK ON OPEN
	FB$SQO=20,		! SEQUENTIAL ACCESS ONLY
	FB$MVN=21,		! Maximum version number
	FB$LPT=22,		! Spool to printer
	FB$BAT=24,		! Submit to BATCH on close
	FB$DLC=25,		! Delete on close
	FB$CBT=26,		! Contiguous best try
	FB$WAT=27;		! Wait if locked by another user
!
!	CONTROL MESSAGE FIELD DEFINITIONS
!

!	CONTROL FUNCTION CODES

LITERAL
	C$GET=1,		! GET RECORD
	C$CONNECT=2,		! INITIATE A DATA STREAM
	C$UPDATE=3,		! UPDATE CURRENT RECORD
	C$PUT=4,		! PUT FOLLOWING RECORDS
	C$DELETE=5,		! DELETE CURRENT RECORD
	C$REWIND=6,		! REWIND FILE
	C$TRUNCATE=7,		! TRUNCATE FILE
	C$RELEASE=9,		! UNLOCK RECORD
	C$FREE=10,		! UNLOCK ALL RECORDS
	C$SPACE=11,		! FORWARD/BACKWARD SPACE
	C$FLUSH=12,		! WRITE OUT ALL MODIFIED I/O BUFS
	C$NXTVOL=13,		! START NEXT VOLUME
	C$FIND=14,		! FIND RECORD
	C$EXTEND=15,		! EXTEND FILE BY ALC MSG
	C$DISPLAY=16;		! RETRIEVE ATTRIBUTES MESSAGE

!	CONTROL MESSAGE MENU FIELD

LITERAL
	CTL_RAC=0,		! RAC FIELD PRESENT
	CTL_KEY=1,
	CTL_KRF=2,
	CTL_ROP=3,
	CTL_HSH=4,
	CTL_DPY=5;

!	RAC FIELD DEFINITIONS

LITERAL
	RB$SEQ=0,		! SEQUENTIAL RECORD ACCESS
	RB$KEY=1,		! KEYED ACCESS
	RB$RFA=2,		! ACCESS BY RECORD FILE ADDRESS
	RAC$SEQ=3,		! SEQUENTIAL FILE ACCESS
	RAC$BLK=4,		! ACCESS BY VIRTUAL BLOCK NUMBER
	RAC$BFT=5;		! BLOCK MODE FILE TRANSFER

!	ROP FIELD - RECORD PROCESSING FEATURES

LITERAL
	RB$EOF=0,		! POSITION TO EOF
	RB$HSH=3,		! USE HASH CODE IN HSH FIELD
	RB$LOA=4,		! FOLLOW FILL QUANTITIES
	RB$ULK=5,		! MANUAL LOCKING/UNLOCKING
	RB$RAH=8,		! READ AHEAD
	RB$WBH=9,		! WRITE BEHIND
	RB$KGE=10,		! KEY IS >=
	RB$KGT=11;		! KEY IS >

!	DISPLAY FIELD DEFINITIONS

LITERAL
	DPY$ATT=0,		! MAIN ATTRIBUTES MESSAGE
	DPY$KEY=1,		! KEY DEF ATTRIBUTES
	DPY$ARE=2,		! AREA DEFINITION ATTRIBUTES
	DPY$ACL=3,		! ACCESS CONTROL LIST
	DPY$FHC=4;		! FILE HEADER CHARACTERISTICS
!
!	CONTINUE TRANSFER MESSAGE FIELDS
!

!	RECOVERY ACTION DEFINITIONS

LITERAL
	CON_TRY=1,		! TRY AGAIN
	CON_SKP=2,		! SKIP RECORD
	CON_ABO=3;		! ABORT TRANSFER
!
!	ACCESS COMPLETE FIELD DEFINITIONS
!

!	FUNCTION DEFINITIONS

LITERAL
	ACM_CMD=1,		! COMMAND - CLOSE THE FILE
	ACM_RSP=2,		! RESPONSE
	ACM_PRG=3,		! PURGE FILE
	ACM_EOS=4;		! END STREAM (DISCONNECT)
!
!	MACCODE FIELD VALUES
!

LITERAL
	MAC$PEND=%O'00000',		! OPERATION IN PROGRESS
	MAC$SUCC=%O'10000',		! SUCCESS
	MAC$UNSUPPORT=%O'20000',		! UNSUPPORTED
	MAC$OPEN=%O'40000',		! ERROR IN OPEN
	MAC$TRANS=%O'50000',		! ERROR IN TRANSFER
	MAC$TERM=%O'70000',		! ERROR IN TERMINATION
	MAC$FORM=%O'100000',		! BAD FORMAT MESSAGE
	MAC$INVALID=%O'110000',		! FIELD OF MESSAGE INVALID
	MAC$SYNC=%O'120000';		! DAP OUT OF SYNCHRONIZATION

!
!	MICCODE VALUES FOR MACCODE 2,8,9
!

LITERAL

!	FIRST 6 BITS FOR DAP MESSAGE TYPE NUMBER
	
	MIC$MISC=0,		! UNSPECIFIED DAP MSG ERROR
	MIC$CFG=%O'0100',		! IN CONFIGURATION
	MIC$ATT=%O'0200',		! IN ATTRIBUTES
	MIC$ACC=%O'0300',		! IN ACCESS
	MIC$CTL=%O'0400',		! IN CONTROL
	MIC$CON=%O'0500',		! IN CONTINUE
	MIC$ACK=%O'0600',		! IN ACKNOWLEDGE
	MIC$ACM=%O'0700',		! IN ACCOMP
	MIC$DAT=%O'1000',		! IN DATA
	MIC$STS=%O'1100',		! IN STATUS
	MIC$ACL=%O'1200',		! IN ACCESS CONTROL LIST
	MIC$KEY=%O'1300',		! IN KEY DEF MSG
	MIC$ALC=%O'1400',		! IN ALLOCATION MSG
	MIC$FHC=%O'1500',		! IN FILE HEADER CHARACTERISTICS

!	LAST 6 BITS FOR FIELD DESIGNATION

	MIC$F0=0,			! UNKNOWN FIELD

	MIC$F10=%O'10',		! DAP MESSAGE FLAG FIELDS
	MIC$F11=%O'11',		! STREAMID VALUE
	MIC$F12=%O'12',		! LENGTH FIELD

	MIC$F20=%O'20',		! FIELD IN MESSAGE
	MIC$F21=%O'21',
	MIC$F22=%O'22',
	MIC$F23=%O'23',
	MIC$F24=%O'24',
	MIC$F25=%O'25',
	MIC$F26=%O'26',
	MIC$F27=%O'27',
	MIC$F30=%O'30',
	MIC$F31=%O'31',
	MIC$F32=%O'32',
	MIC$F33=%O'33',
	MIC$F34=%O'34',
	MIC$F35=%O'35',
	MIC$F36=%O'36',
	MIC$F37=%O'37',
	MIC$F40=%O'40',
	MIC$F41=%O'41',
	MIC$F42=%O'42',
	MIC$F43=%O'43',
	MIC$F44=%O'44',
	MIC$F45=%O'45',
	MIC$F46=%O'46',
	MIC$F47=%O'47',
	MIC$F50=%O'50',
	MIC$F51=%O'51',
	MIC$F52=%O'52',
	MIC$F53=%O'53',
	MIC$F54=%O'54',
	MIC$F55=%O'55',
	MIC$F56=%O'56',
	MIC$F57=%O'57';
!
!	MICCODE VALUES FOR MACCODE=4.   THESE ARE OPEN ERRORS
!
LITERAL
	ER$ABO=1,		! OPERATION ABORTED
	ER$ACC=2,		! COULD NOT ACCESS FILE
	ER$ACT=3,		! FILE ACTIVITY PRECLUDES OP
	ER$AID=4,		! BAD AREA ID
	ER$ALN=5,		! ALIGNMENT OPTIONS ERROR
	ER$ALQ=6,		! ALLOCATION QUANTITY TOO LARGE
	ER$ANI=7,		! NOT ANSI 'D' FORMAT
	ER$AOP=8,		! ALLOC OPTION ERROR
	ER$AST=9,		! INVALID OP AT AST LEVEL
	ER$ATR=10,		! ATTRIBUTE READ ERR
	ER$ATW=11,		! ATTRIBUTE WRITE ERROR
	ER$BKS=12,		! BUCKET SIZE TOO LARGE
	ER$BKZ=13,		! "
	ER$BLN=14,		! BLN LENGTH ERROR
	ER$BOF=15,		! BEGINNING OF FILE DETECTED
	ER$BPA=16,		! PRIVATE POOL ADT NOT MULT OF 4
	ER$BPS=17,		! PRIVATE POOL SIZE NOT MULT OF 4
	ER$BUG=18,		! Internal RMS Error
	ER$CCR=19,		! Can't connect RAB
	ER$CHG=20,		! $UPDATE changed a key w/o XB$CHG
	ER$CHK=21,		! Bucket format Check-byte error
	ER$CLS=22,		! RSTS/E close function failed *
	ER$COD=23,		! Invalid or unsupported COD field (STV=XAB)
	ER$CRE=24,		! F11ACP could not create file *
	ER$CUR=25,		! No current record (no GET/FIND)
	ER$DAC=26,		! F11ACP deaccess error in CLOSE *
	ER$DAN=27,		! Data "AREA" number invalid (STV=XAB)
	ER$DEL=28,		! RFA-Accessed record was deleted
	ER$DEV=29,		! Bad device or inappropriate device type
	ER$DIR=30,		! Error in directory name
	ER$DME=31,		! Dynamic memory exhausted
	ER$DNF=32,		! Directory not found
	ER$DNR=33,		! Device not ready
	ER$DPE=34,		! Device has positioning error *
	ER$DTP=35,		! "DTP" field invalid (STV=XAB)
	ER$DUP=36,		! Duplicate key detected, XB$DUP not set
	ER$ENT=37,		! RSX-F11ACP enter failed *
	ER$ENV=38,		! Operation not selected in ORG$ macro
	ER$EOF=39,		! end of file
	ER$ESS=40,		! Expanded string area too short
	ER$EXP=41,		! File hasn't expired yet
	ER$EXT=42,		! Extend failure *
	ER$FAB=43,		! Not valid FAB ("BID" not FB$BID)
	ER$FAC=44,		! Illegal FAC for REC-OP 0 or no FB$PUB (create)
	ER$FEX=45,		! File already exists
	ER$FID=46,		! Invalid File-ID
	ER$FLG=47,		! Invalid Flag-bits combination (STV=XAB)
	ER$FLK=48,		! File is locked
	ER$FND=49,		! RSX-F11ACP FIND function failed
	ER$FNF=50,		! file not found
	ER$FNM=51,		! Error in File name
	ER$FOP=52,		! Invalid "FOP" Options
	ER$FUL=53,		! Device or file full
	ER$IAN=54,		! Index "AREA" number invalid #
	ER$IFI=55,		! Invalid IFI value or unopened file
	ER$IMX=56,		! Maximum number of areas/key XABs exceeded #
	ER$INI=57,		! INIT$ never issued
	ER$IOP=58,		! Operation illegal or invalid for file org
	ER$IRC=59,		! Illegal record encountered in sequential file
	ER$ISI=60,		! Invalid ISI value, on unconnected RAB
	ER$KBF=61,		! Bad KEY buffer address
	ER$KEY=62,		! Invalid key field
	ER$KRF=63,		! Invalid key-of-reference
	ER$KSZ=64,		! Key size too large
	ER$LAN=65,		! Lowest-level-index "AREA" number invalid #
	ER$LBL=66,		! Not ANSI labeled tape
	ER$LBY=67,		! Logical channel busy
	ER$LCH=68,		! Logical channel number too large
	ER$LEX=69,		! Logical extend error, prior extend still valid #
	ER$LOC=70,		! "LOC" field invalid #
	ER$MAP=71,		! Buffer mapping error
	ER$MKD=72,		! F11ACP could not mark file for deletion #
	ER$MRN=73,		! MRN value negative or relative key>MRN
	ER$MRS=74,		! MRS value=0 for fix len record or rel file
	ER$NAM=75,		! "NAM" block address invalid
	ER$NEF=76,		! Not positioned at EOF
	ER$NID=77,		! Can't allocate internal file descriptor
	ER$NPK=78,		! Indexed file--no primary key defined
	ER$OPN=79,		! RSTS/E OPEN failure *
	ER$ORD=80,		! XAB's not in correct order #
	ER$ORG=81,		! Invalid file organization value
	ER$PLG=82,		! Error in file's prologue (reconstruct file)
	ER$POS=83,		! "POS" field invalid (>MRS) #
	ER$PRM=84,		! Bad file date field retrived #
	ER$PRV=85,		! Protection violation
	ER$RAB=86,		! Not a valid RAB ("BID" not = RB$BID)
	ER$RAC=87,		! Illegal RAC value
	ER$RAT=88,		! Illegal record attributes
	ER$RBF=89,		! Invalid record buffer addr
	ER$RER=90,		! File Read Error *
	ER$REX=91,		! Record already exists
	ER$RFA=92,		! Bad RFA value (RFA=0)
	ER$RFM=93,		! Invalid record format
	ER$RLK=94,		! Target bucket locked by another stream
	ER$RMV=95,		! RSX-F11ACP REMOVE function failed *
	ER$RNF=96,		! Record not found (STV=0)
	ER$RNL=97,		! Record not locked
	ER$ROP=98,		! Invalid record options
	ER$RPL=99,		! Error while reading prologue *
	ER$RRV=100,		! Invalid RRV record encountered
	ER$RSA=101,		! RAB stream currently active
	ER$RSZ=102,		! Bad record size (>MRS or <>MRS for fixed len)
	ER$RTB=103,		! Record too big for user buffer (STV=actual size)
	ER$SEQ=104,		! Primary key out of sequence
	ER$SHR=105,		! }"SHR" field invalid (can't share sequential)
	ER$SIZ=106,		! "SIZ" field invalid #
	ER$STK=107,		! Stack too big for save area
	ER$SYS=108,		! System directive error *
	ER$TRE=109,		! Index tree error
	ER$TYP=110,		! Error in file type, extension on FNS too big
	ER$UBF=111,		! Invalid user buffer address
	ER$USZ=112,		! Invalid user buffer size
	ER$VER=113,		! Error in version number
	ER$VOL=114,		! Invalid volume number
	ER$WER=115,		! File write error *
	ER$WLK=116,		! Device is write-locked
	ER$WPL=117,		! Error while writing prologue
	ER$XAB=118,		! Invalid XAB
	ER$BUGDDI=119,		! Default directory invalid
	ER$CCA=120,		! Can't access argument list
	ER$CCF=121,		! Can't close file *
	ER$CDA=122,		! Can't deliver AST
	ER$CHN=123,		! Channel assignment failure *
	ER$CNTRLO=124,		! Terminal output ignored due to ^O
	ER$CNTRLY=125,		! Terminal input aborted due to ^Y
	ER$DNA=126,		! Default filename string address error
	ER$DVI=127,		! Invalid device ID field
	ER$ESA=128,		! Expanded string address error
	ER$FNA=129,		! Filename string address error
	ER$FSZ=130,		! FSZ field invalid
	ER$IAL=131,		! Invalid argument list
	ER$KFF=132,		! Known file found
	ER$LNE=133,		! Logical name error
	ER$NOD=134,		! Node name error
	ER$NORMAL=135,		! Operation successful
	ER$OK_DUP=136,		! Record inserted had duplicate key
	ER$OK_IDX=137,		! Index update occurred, record inserted
	ER$OK_RLK=138,		! Record locked, but read anyway
	ER$OK_RRV=139,		! Record inserted in primary, maybe not secondary or RFA
	ER$OPENED=140,		! Existing file opened
	ER$PBF=141,		! Bad prompt buffer address
	ER$PNDING=142,		! Asyncronous operation pending
	ER$QUO=143,		! Quoted string error
	ER$RHB=144,		! Record header buffer invalid
	ER$RLF=145,		! Invalid related file
	ER$RSS=146,		! Invalid resultant string size
	ER$RST=147,		! Invalid resultant string address
	ER$SQO=148,		! Operation not sequential
	ER$SUC=149,		! Operation successful
	ER$SPRSED=150,		! Superceding existing file
	ER$SYN=151,		! Filename syntax error
	ER$TMO=152,		! Timeout period expired
	ER$BLK=153,		! FB$BLK record attribute not supported
	ER$BSZ=154,		! Bad byte size
	ER$CDR=155,		! Can't disconnect RAB
	ER$CGJ=156,		! Can't get JFN for file
	ER$COF=157,		! Can't open file
	ER$JFN=158,		! Bad JFN value
	ER$PEF=159,		! Can't position to EOF
	ER$TRU=160,		! Can't truncate file
	ER$UDF=161,		! File is in an undefined state, access denied
	ER$XCL=162,		! File must be opened for exclusive access
	ER$DFL=163,		! Directory full
	ER$RDD=183,		! Rename-- 2 different devices
	ER$RFE=184,		! Rename-- file already exists
	ER$ALC=193,		! File exceeds allocated space
	ER$NLN=196,		! No file accessed on LUN
	ER$NMF=199;		! No more files
%IF FTDAP50 %THEN
LITERAL
	ER$DCK=200,		!DAP checksum error
	ER$QEX=201;		!Quota Exceeded

!FTS private error codes:

LITERAL
	ER$TELLOPR=%O'7777',	!/OPERATOR was requested
	ER$MJE=%O'7775',	!Exceeded maximum number of simultaneous jobs
	ER$LIM=%O'7773',	!File size limit for node exceeded
	ER$UNN=%O'7772';	!Node not in node table

%ELSE
LITERAL ER$QEX=ER$DFL;	!THERE IS NO QUOTA-EXCEEDED CODE
			!I am using  "Directory Full"
%FI

!The following are defined so as to not break the old version
!They should not be used for new software
LITERAL
	ET$ABO=ER$ABO,		! Aborted
	ET$CRR=ER$CCR,		! Can't connect RAB
	ET$CHG=ER$CHG,		! Update changed a key
	ET$CHK=ER$CHK,		! Bucket format check-byte
	ET$CUR=ER$CUR,		! Not current record
	ET$DEL=ER$DEL,		! deleted
	ET$DME=ER$DME,		! dynamic memory exhausted
	ET$DUP=ER$DUP,		! duplicate key
	ET$EXT=ER$EXT,		! file extend failure
	ET$IFI=ER$IFI,		! bad IFI value
	ET$IOP=ER$IOP,		! Operation illegal
	ET$IRC=ER$IRC,		! Illegal record
	ET$KBF=ER$KBF,		! Bad key buffer addr
	ET$KEY=ER$KEY,		! Bad key field
	ET$KPG=ER$KRF,		! Bad key-of-reference
	ET$KSZ=ER$KSZ,		! key size
	ET$MRN=ER$MRN,		! bad MRN value
	ET$NEF=ER$NEF,		! Not EOF
	ET$NLN=ER$NLN,		! No file on LUN (made-up name)
	ET$PEF=ER$PEF,		! Can't position to EOF
	ET$RAB=ER$RAB,		! bad RAB
	ET$RAC=ER$RAC,		! bad RAC
	ET$RBF=ER$RBF,		! bad buffer addr
	ET$RER=ER$RER,		! read error
	ET$REX=ER$REX,		! record already exists
	ET$RFA=ER$RFA,		! bad RFA value
	ET$RFM=ER$RFM,		! Invalid record format
	ET$RLK=ER$RLK,		! target locked
	ET$RNF=ER$RNF,		! Record not found
	ET$RNL=ER$RNL,		! record not locked
	ET$ROP=ER$ROP,		! invalid options
	ET$RRV=ER$RRV,		! Invalid RRV
	ET$RSA=ER$RSA,		! Stream active
	ET$RSZ=ER$RSZ,		! recordsize
	ET$ETB=ER$RTB,		! record too big
	ET$SEQ=ER$SEQ,		! out of sequence
	ET$SNC=0,		! Fileid/File number check
	ET$SQC=0,		! Fileid/Sequence number check
	ET$STK=ER$STK,		! Stack
	ET$TRE=ER$TRE,		! Index tree
	ET$UBF=ER$UBF,		! User buffer addr
	ET$USZ=ER$USZ,		! User buffer size
	ET$WER=ER$WER,		! Write error
	ET$WLK=ER$WLK,		! Write lock
	ET$EOF=ER$EOF;		! EOF


!
!NAME message:
!

!NAME MESSAGE TYPE BITS

LITERAL
	NT$FSP=0,		! File specification
	NT$NAM=1,		! File name only
	NT$DIR=2,		! Directory name only
	NT$STR=3,		! Volume or structure name
	NT$DEF=4,		! Default file specifation
	NT$REL=5;		! Related file specifation

FCS(	!FCS dependant code follows....
!
!	FILE DATA BLOCK OFFSET DEFINITIONS
!		USED BY FCS PACKAGE
!

MACRO

!	FILE ATTRIBUTE SECTION

	F_RTYP(FDB)=(FDB)<0,8>%,	! RECORD TYPE
	F_RATT(FDB)=(FDB+1)<0,8>%,	! RECORD ATTRIBUTES
	F_RSIZ(FDB)=(FDB+2)%,		! RECORD SIZE
	F_HIBK(FDB)=(FDB+4)%,		! HIGHEST VIRTUAL BLOCK
	F_EFBK(FDB)=(FDB+8)%,		! END OF FILE BLOCK
	F_EFBY(FDB)=(FDB+12)%,		! FIRST FRE BYTE IN LAST BLOCK

!	RECORD ACCESS SECTION

	F_RACC(FDB)=(FDB+14)<0,8>%,	! RECORD ACCESS
	F_RCTL(FDB)=(FDB+15)<0,8>%,	! RECORD CONTROL
	F_BKDS(FDB)=(FDB+16)%,		! BLOCK I/O BUFFER DESC
	F_URBD(FDB)=(FDB+16)%,		! USER RECORD BUFFER DESC
	F_BKST(FDB)=(FDB+20)%,		! BLOCK I/O STATUS BLOCK
	F_NRBD(FDB)=(FDB+20)%,		! NEXT RECORD BUFFER ADR
	F_BKDN(FDB)=(FDB+22)%,		! BLOCK I/O DONE AST
	F_OVBS(FDB)=(FDB+24)%,		! OVERRIDE BUFFER SIZE
	F_NREC(FDB)=(FDB+24)%,		! NEXT RECORD ADDRESS
	F_EOBB(FDB)=(FDB+26)%,		! END OF BLOCK BUFFER
	F_CNTG(FDB)=(FDB+28)%,		! SIZE OF CONTIG FILE
	F_RCNM(FDB)=(FDB+28)%,		! RECORD NUMBER FOR RANDOM
	F_STBK(FDB)=(FDB+30)%,		! ADR TO READ STAT BLOCK
	F_ALOC(FDB)=(FDB+32)%,		! ALLOC AMT WHEN EXTEND

!	FILE OPEN SECTION

	F_LUN(FDB)=(FDB+34)<0,8>%,	! LOGICAL UNIT NUMBER
	F_FACC(FDB)=(FDB+35)<0,8>%,	! FILE ACCESS
	F_DSPT(FDB)=(FDB+36)%,		! FILE DESCRIPTOR POINTER
	F_DFNB(FDB)=(FDB+38)%,		! DEFAULT FILE NAME BLOCK

!	BLOCK BUFFER SECTION

	F_BKEF(FDB)=(FDB+40)<0,8>%,	! BLOCK I/O EVENT FLAG NO.
	F_EFN(FDB)=(FDB+41)<0,8>%,	! EVENT FLAG USED IN QIO
	F_BKP1(FDB)=(FDB+42)<0,8>%,	! BOOKKEEPING BITS
	F_ERR(FDB)=(FDB+42)%,		! ERROR CODE
	F_ERR1(FDB)=(FDB+42)<0,8>%,	! ERROR RETURN CODE
	F_ERR2(FDB)=(FDB+43)<0,8>%,	! QIO RETURN CODE
	F_MBCT(FDB)=(FDB+44)<0,8>%,	! NUMBER OF BUFS TO USE
	F_MBC1(FDB)=(FDB+45)<0,8>%,	! NUMBER OF BUFS IN USE
	F_MBFG(FDB)=(FDB+46)<0,8>%,	! MULT BUF FLAGS
	F_BGBC(FDB)=(FDB+47)<0,8>%,	! BIG BUFFER BLOCK COUNT
	F_VBSZ(FDB)=(FDB+48)%,		! VIRTUAL BLOCK SIZE
	F_BBFS(FDB)=(FDB+50)%,		! BLOCK BUFFER SIZE
	F_BKVB(FDB)=(FDB+52)%,		! BLOCK I/O BLOCK NUMBER
	F_VBN(FDB)=(FDB+52)%,		! VIRTUAL BLOCK NUMBER
	F_BDB(FDB)=(FDB+56)%,		! BLOCK BUFFER DESC ADR
	F_SPDV(FDB)=(FDB+58)%,		! SPOOL DEV INDICATOR
	F_SPUN(FDB)=(FDB+60)<0,8>%,	! SPOOL UNIT NUMBER
	F_CHR(FDB)=(FDB+61)<0,8>%,	! ACP VOL CHARACT. SUMMARY
	F_ACTL(FDB)=(FDB+62)%,		! ACCESS CONTROL WORD
	F_SEQN(FDB)=(FDB+64)%,		! SEQUENCE NUMBER
	F_FNB(FDB)=(FDB+66)%,		! FILE NAME BLOCK

!	DEFS WITHIN FILENAME BLOCK

	F_FNAM(FDB)=(N_FNAM(F_FNB(FDB)))%,	! FILE NAME
	F_FTYP(FDB)=(N_FTYP(F_FNB(FDB)))%,	! FILE EXTENSION
	F_FVER(FDB)=(N_FVER(F_FNB(FDB)))%,	! VERSION
	F_DVNM(FDB)=(N_DVNM(F_FNB(FDB)))%,	! DEVICE NAME
	F_UNIT(FDB)=(N_UNIT(F_FNB(FDB)))%;	! UNIT NUMBER
!
!	FORMAT OF FCS FILE NAME BLOCK (FNB)
!

MACRO
	N_FID(FNB)=(FNB+0)%,		! FILE ID
	N_FNAM(FNB)=(FNB+6)%,		! FILE NAME, 3 WORDS RAD50
	N_FTYP(FNB)=(FNB+12)%,		! FILE TYPE(EXTENSION) RAD50
	N_FVER(FNB)=(FNB+14)%,		! FILE VERSION NUMBER
	N_STAT(FNB)=(FNB+16)%,		! STATUS
	N_NEXT(FNB)=(FNB+18)%,		! TEMP CELL FOR FIND
	N_DID(FNB)=(FNB+20)%,		! DIRECTORY ID
	N_DVNM(FNB)=(FNB+26)%,		! DEVICE NAME ASCII
	N_UNIT(FNB)=(FNB+28)%;		! UNIT NUMBER
!
!	DEFINITION OF FIELDS WITHIN FDB AND FNB
!

LITERAL

!	F.RATT BITS - RECORD ATTRIBUTE BYTE
	FD_FTN=1,		! FORTRAN CARRIAGE CTL
	FD_CR=2,		! INSERT CR BETWEEN RECORDS
	FD_BLK=%O'10',		! CANNOT CROSS BLOCKS

!	F.RACC BITS - RECORD ACCESS BYTE
	FD_RWM=1,		! READ/WRITE MODE
	FD_RAN=2,		! RANDOM MODE
	FD_PLC=4,		! LOCATE MODE
	FD_INS=8,		! PUT SEQUENTIAL INSERT MODE

!	F.RCTL BITS - RECORD CONTROL BYTE/DEVICE CHARACTERISTICS
	FD_REC=1,		! RECORD ORIENTED
	FD_CCL=2,		! CARRIAGE CONTROL OUTPUT DEV
	FD_TTY=4,		! DEVICE IS TERMINAL
	FD_DIR=8,		! DIRECTORY DEVICE
	FD_SDI=16,		! SINGLE DIRECTORY DEVICE
	FD_SQD=32,		! SEQUENTIAL DEVICE
	FD_ISP=%O'2000',		! INPUT SPOOLING
	FD_OSP=%O'4000',		! OUTPUT SPOOLING

!	F_RTYP VALUES (NOTE - NOT BITS)
	R_FIX=1,		! FIXED LENGTH
	R_VAR=2,		! VARIABLE
	R_SEQ=3,		! SEQUENCED
	R_STRM=4,		! STREAM ASCII

!	F_FACC BITS - FILE ACCESS BYTE
	FA_RD=1,		! READ ONLY
	FA_WRT=2,		! ACCESSED FOR WRITE
	FA_EXT=4,		! FOR EXTEND
	FA_CRE=8,		! CREATING NEW FILE
	FA_TMP=16,		! CREATING TEMP FILE
	FA_SHR=32,		! SHARED ACCESS
	FA_APD=64,		! APPENDING (FA_CRE=0)
	FA_NSP=64,		! NO SUPERSCEDE (FA_CRE=1)
	FA_TSK=128,		! CREATE TASK IMAGE

	FO_RD=FA_RD,		! OPEN FOR READ
	FO_WRT=FA_WRT+FA_EXT+FA_CRE,	! FOR WRITE (CREATE)
	FO_APD=FA_APD+FA_WRT+FA_EXT,	! FOR APPEND
	FO_MFY=FA_WRT,		! FOR MODIFY
	FO_UPD=FA_WRT+FA_EXT;	! FOR UPDATE
!
!	FCS ERROR CODES


LITERAL
	IE_NSF=-26;		! NO SUCH FILE, ONLY ONE USED
)			!End of FCS dependant code
%BLISS16(		!Dependant on RMCOPY-11
			!PDP-10/20 version uses QUASAR
!
!	RMCOPY PARAMETER BLOCK DEFINITIONS
!
!		THIS DATA IS PASSED AS A SINGLE BLOCK FILE
!		CREATED BY THE RMCOPY PROGRAM AND QUEUED
!		TO THE NETWORK SPOOLER
!
!
!  NOTE - PARAMETER TO THESE MACROS IS "LDB".
!	THEREFORE, THEY ARE REFERENCED VIA THE LDB BASE
!	AND NOT THE START OF THE DATA AREA
!

MACRO
	RMC$DSTL(LDB)=(LDB$RMC(LDB))<0,8>%,	! LENGTH - DEST FILE NAME
	RMC$DST(LDB)=(LDB$RMC(LDB)+1)%,		! DESTINATION FILE
	RMC$SRCL(LDB)=(LDB$RMC(LDB)+129)<0,8>%,	! SOURCE FILE LENGTH
	RMC$SRC(LDB)=(LDB$RMC(LDB)+130)%,	! SOURCE FILE
	RMC$CCFL(LDB)=(LDB$RMC(LDB)+258)<0,8>%,	! COMP CODE LENGTH
	RMC$CCF(LDB)=(LDB$RMC(LDB)+259)%,	! COMP CODE FILE
	RMC$NOD(LDB)=(LDB$RMC(LDB)+324)%,	! NODE NAME
	RMC$JOB(LDB)=(LDB$RMC(LDB)+330)%,	! JOB NUMBER
	RMC$OPT(LDB)=(LDB$RMC(LDB)+332)%,	! OPTIONS SPECIFIED
	RMC$FUN(LDB)=(LDB$RMC(LDB)+334)%,	! FUNCTION CODE
	RMC$RTS(LDB)=(LDB$RMC(LDB)+336)%,	! RTS NAME
	RMC$COP(LDB)=(LDB$RMC(LDB)+342)%,	! COPIES TO PRINT
	RMC$FRM(LDB)=(LDB$RMC(LDB)+344)%,	! FORM NAME
	RMC$ACC(LDB)=(LDB$RMC(LDB)+350)%,	! ACCOUNTING INFO
	RMC$PPN(LDB)=(LDB$RMC(LDB)+366)%,	! PPN OF JOB
	RMC$LNK(LDB)=(LDB$RMC(LDB)+368)%,	! LINK TO NEXT IN QUEUE
	RMC$UNT(LDB)=(LDB$RMC(LDB)+372)%,	! LOGICAL UNIT NUMBER
	RMC$ADT(LDB)=(LDB$RMC(LDB)+374)%,	! /AFTER DATE
	RMC$ATM(LDB)=(LDB$RMC(LDB)+376)%,	! /AFTER TIME
	RMC$QDT(LDB)=(LDB$RMC(LDB)+378)%,	! QUEUED DATE
	RMC$QTM(LDB)=(LDB$RMC(LDB)+380)%,	! QUEUED TIME
	RMC$PRI(LDB)=(LDB$RMC(LDB)+382)%,	! QUEUED PRIORITY
	RMC$STS(LDB)=(LDB$RMC(LDB)+384)%,	! CURRENT JOB STATUS
	RMC$RTY(LDB)=(LDB$RMC(LDB)+386)%,	! NUMBER OF RETRIES DONE
	RMC$SEQ(LDB)=(LDB$RMC(LDB)+388)%,	! TRANSFER SEQUENCE NUMBER

	RMC$AVL(LDB)=(LDB$RMC(LDB)+390)%;	! AVAIL SPACE

!	BIT DEFINITIONS FOR OPTIONS SPECIFIED

LITERAL
	RMC$O_CODE=1,		! /CODE SPECIFIED
	RMC$O_WAIT=2,		! /WAIT
	RMC$O_BIN=4,		! /BINARY
	RMC$O_ASC=8,		! /ASCII
	RMC$O_GO=16,		! /GO (EXECUTE AS BATCH)
	RMC$O_RTS=32,		! /RTS
	RMC$O_DE=64;		! /DE - DELETE INPUT AFTER TRANSFER

!	FUNCTION CODE VALUES

LITERAL
	RMC$F_SEND=1,		! SEND FILE TO REMOTE
	RMC$F_GET=2,		! RETRIEVE FILE
	RMC$F_REN=3,		! RENAME
	RMC$F_DEL=4;		! DELETE FILE

!	STATUS CODE VALUES

LITERAL
	RMC$S_PEND=0,			! JOB PENDING
	RMC$S_ACT=1,			! CURRENTLY BEING PROCESSED
	RMC$S_HOLD=2,			! CURRENTLY IN HOLD STATE
	RMC$S_AFTR=3;			! WAITING IN /AFTER

!	RMCOPY REQUEST CODES

LITERAL
	RMC_REQ=1,		! GET AN AVAILABLE BLOCK
	RMC_QUE=2;		! QUEUE AN ENTRY
)			!End of RMCOPY-11 dependant code
%BLISS16(		!PDP-11 dependant
!
!	FORMAT OF CONNECT PARAMETER BLOCK
!
!
! NOTE - AGAIN, SYMBOLS ARE REFERENCED VIA LDB ADDRESS
!

MACRO
	CP$NAM(LDB)=(LDB$CPB(LDB))%,	! DEST NAME IN ASCII
	CP$RPN(LDB)=(LDB$CPB(LDB)+6)%,	! REMOTE PROCESS NAME FIELD
	CP$RFM(LDB)=(LDB$CPB(LDB)+6)<0,8>%,	! FORMAT OF RPN FIELD
	CP$ROB(LDB)=(LDB$CPB(LDB)+7)<0,8>%,	! REMOTE OBJECT TYPE
	CP$RDL(LDB)=(LDB$CPB(LDB)+9)<0,8>%,	! DESCRIPTOR LENGTH
			! DESC LENGTH=0 FOR FORMAT 0
			! DESC LEN<=16 FORMAT 1, <=12 FORMAT 2
	CP$RPD(LDB)=(LDB$CPB(LDB)+10)%,		! REMOTE PROCESS DESCRIPTOR
	CP$RGC(LDB)=(LDB$CPB(LDB)+22)%,	! FORM=2  REMOTE GROUP CODE
	CP$RUC(LDB)=(LDB$CPB(LDB)+24)%,	! FORM=2  REMOTE USER CODE

	CP$LPN(LDB)=(LDB$CPB(LDB)+26)%,		! LOCAL PROCESS NAME FIELD
	CP$LFM(LDB)=(LDB$CPB(LDB)+26)<0,8>%,	! FORMAT OF LPN
	CP$LOB(LDB)=(LDB$CPB(LDB)+27)<0,8>%,	! LOCAL OBJECT TYPE
	CP$LDL(LDB)=(LDB$CPB(LDB)+29)<0,8>%,	! DESCRIPTOR LENGTH
	CP$LPD(LDB)=(LDB$CPB(LDB)+30)%,	! LOCAL PROCESS DESCRIPTOR
	CP$LGC(LDB)=(LDB$CPB(LDB)+42)%,	! FORM=2  LOCAL GROUP CODE
	CP$LUC(LDB)=(LDB$CPB(LDB)+44)%,	! FORM=2  LOCAL USER CODE

	CP$UIL(LDB)=(LDB$CPB(LDB)+47)<0,8>%,	! LENGTH OF FOLL.
	CP$UID(LDB)=(LDB$CPB(LDB)+48)%,		! USER IDENTIFICATION
	CP$PWL(LDB)=(LDB$CPB(LDB)+65)<0,8>%,	! PASSQORD LENGTH
	CP$PWD(LDB)=(LDB$CPB(LDB)+66)%,		! PASSWORD <16
	CP$AIL(LDB)=(LDB$CPB(LDB)+81)<0,8>%,		! LEN ACCT INFO
	CP$AIN(LDB)=(LDB$CPB(LDB)+82)%;		! ACCT INFO
	)	!end %BLISS16
%BLISS16(			!RMCOPY-11 Dependant
!
!	FORMAT OF NODES.SYS FILE ENTRY
!

MACRO
	NFL$NAM(ADR)=(ADR)%,			! NODE NAME
	NFL$UNT(ADR)=(ADR+6)%,			! UNIT NUMBER FOR QUEUE
	NFL$TIM(ADR)=(ADR+8)%,			! SCHEDULED UP-TIME
	NFL$PHN(ADR)=(ADR+16)%,			! PHONE NUMBER FOR DIAL
	NFL$SON(ADR)=(ADR+34)%,			! RJ2780 SIGNON FILE
	NFL$SOF(ADR)=(ADR+60)%,			! RJ2780 SIGNOFF FILE
	NFL$FLG(ADR)=(ADR+86)%,			! FLAG WORD , IDENTICAL TO NOD$FLG
	NFL$PWD(ADR)=(ADR+88)%,			! NODE PASSWORD
	NFL$DLT(ADR)=(ADR+94)%;			! DIAL INTERVAL
)				!End RMCOPY-11 dependant
%BLISS16(		!RMCOPY-11 dependant
!
!	FORMAT OF CORE TABLE OF NODE STATUS
!

MACRO
	NOD$NAM(ADR)=(ADR)%,		! NODE NAME
	NOD$PWD(ADR)=(ADR+6)%,			! NODE PASSWORD
	NOD$FLG(ADR)=(ADR+12)%,			! NODE FLAGS FROM FILE
	NOD$STS(ADR)=(ADR+14)%;			! NODE STATUS

!	FLAG BITS IN NOD$FLG

LITERAL
	NOD$F_SEND=1,			! SENDS DISABLED IF SET
	NOD$F_GET=2,			! RETRIEVES DISABLED IF SET
	NOD$F_RDEL=4,			! NO REMOTE DELETES IF SET
	NOD$F_RBAT=8,			! NO REMOTE BATCH SUBMISSION
	NOD$F_RGET=16,			! NO REMOTE RETRIEVES IF SET
	NOD$F_RSND=32,			! NO REMOTE SENDS IF SET
	NOD$F_ALL=3,			! ALL ACCESSES VIA NETSPL
	NOD$F_NONE=64,			! NO LOGICAL CONNECTS ALLOWED
	NOD$F_DIAL=128,			! NODE IS REACHED VIA DIALUP
	NOD$F_2780=256;			! NODE IS ON RJ: NETWORK

!	STATUS BITS

LITERAL
	NOD$S_SEND=1,			! SENDS PENDING IN Q
	NOD$S_GET=2,			! RETRIEVES PENDING
	NOD$S_MISC=4,			! DELETES/RENAMES PENDING
	NOD$S_ALL=7,			! ALL ACCESSES VIA NETSPL
	NOD$S_ON=8,			! NODE IS ON-LINE NOW
	NOD$S_OFF=16,			! NODE IS OFF-LINE
					! (NEITHER BIT = DON'T KNOW)
	NOD$S_ACT=32,			! LINK ACTIVE WITH NODE
	NOD$S_DIAL=64,			! DIAL TO HIM REQUESTED
	NOD$S_DLAC=128;			! DIAL TO HIM IN PROGRESS
)			!End RMCOPY-11 dependant
%BLISS16(		!RMCOPY-11 dependant
!
!	FORMAT OF QUEUE HEADER BLOCKS
!

MACRO
	QUE$AFT=(QUEHDR)%,		! /AFTER QUEUE HEADER
	QUE$FRE=(QUEHDR+2)%,		! FREE SPACE CHAIN
	QUE$NXT=(QUEHDR+4)%,		! NEXT BLOCK AT END OF FILE
	QUE$SEQ=(QUEHDR+6)%,		! NEXT SEQUENCE NUMBER

!		NOW FOLLOW INDIVIDUAL QUEUE HEADERS,
!		EACH OF WHICH IS 4 WORDS LONG.

	QUE$FIR(PTR)=(PTR)%,		! FIRST BLOCK NUMER
	QUE$FPR(PTR)=(PTR+2)%,		! PRIORITY OF FIRST ENTRY
	QUE$LST(PTR)=(PTR+4)%,		! LAST BLOCK NUMBER
	QUE$LPR(PTR)=(PTR+6)%;		! PRIORITY OF LAST ENTRY

)			!End RMCOPY-11 dependant
%BLISS16(		!RSTS Monitor dependant
!
!	RSTS/E LOWCORE COMMON CONTROL BLOCK DEFINITIONS
!

MACRO
	FIRQB=(%O'402')%,		! BASE FOR FIRQB
	XRB=(%O'442')%;			! BASE FOR XRB

MACRO
	FQJOB=(FIRQB+2)<0,8>%,		! JOB NUMBER*2
	FQFUN=(FIRQB+3)<0,8>%,		! FUNCTION REQUESTED
	FQERNO=(FIRQB+4)<0,8>%,		! ERROR NUMBER
	FQFIL=(FIRQB+4)%,		! CHANNEL *2
	FQPPN=(FIRQB+6)%,		! P,PN
	FQNAM1=(FIRQB+8)%,		! FILENAME IN RAD50
	FQEXT=(FIRQB+12)%,		! EXTENSION IN RAD50
	FQSIZ=(FIRQB+14)%,		! FILE SIZE IN BLOCKS
	FQNAM2=(FIRQB+16)%,		! NEW FILE NAME FOR RENAME
	FQBUFL=(FIRQB+16)%,		! DEFAULT BUFFER LENGTH
	FQMODE=(FIRQB+18)%,		! MODE INDICATOR
	FQFLAG=(FIRQB+20)%,		! FILE'S FLAG WORD RETURNED
	FQPROT=(FIRQB+23)<0,8>%,	! NEW PROTECTION CODE
	FQDEV=(FIRQB+24)%,		! 2 BYTE ASCII DEVICE NAME
	FQDEVN=(FIRQB+26)<0,8>%,	! 1 BYTE UNIT NUMBER
	FQCLUS=(FIRQB+28)%,		! FILE CLUSTER SIZE
	FQNENT=(FIRQB+30)%,		! NUMBER OF ENTRIES FOR LOOKUP

!	SPECIAL NETWORK DEFINITIONS

	FQNFUN=(FIRQB+4)<0,8>%,		! NETWORK FUNCTION CODE
	FQRMOD=(FIRQB+5)<0,8>%,		! MOD BYTE FOR RECEIVE
	FQULA=(FIRQB+5)<0,8>%,		! USER LINK ADDRESS
	FQLLA=(FIRQB+6)%,		! LOGICAL LINK ADR
	FQRCNT=(FIRQB+10)%,		! RESIDUAL COUNT FOR RECEIVE
	FQSEGC=(FIRQB+12)<0,8>%,	! SEGMENT COUNT BYTE
	FQMFLG=(FIRQB+12)<0,8>%,	! MESSAGE FLAGS (EOM) FOR DATA
	FQLTYP=(FIRQB+12)<0,8>%,	! LINK TYPE
	FQMSGC=(FIRQB+13)<0,8>%,	! MESSAGE COUNT BYTE
	FQNMOD=(FIRQB+14)<0,8>%,	! FLOW CONTROL IN CONNECTS
	FQRESN=(FIRQB+14)%,		! REASON CODE FOR DISCONNECT
	FQRMAX=(FIRQB+16)%,		! RECEIVE MAXIMUM
	FQTIMR=(FIRQB+18)%,		! SLEEP TIME FOR RECEIVES
	FQXMAX=(FIRQB+18)%,		! TRANSMIT MAXIMUM

	FQTEXT=(FIRQB+12)<0,8>%,	! FIRST BYTE OF TEXT (LCL MSG)
	FQTXT1=(FIRQB+13)<0,8>%,	! ACTUAL TEXT OF MSG
	FQTXTW=(FIRQB+12)%,		! FIRST WORD OF TEXT
	FQTXW2=(FIRQB+14)%;		! SECOND WORD OF TEXT

EXTERNAL
	IOSTS;			! I/O STATUS WORD RETURNED
!		REALLY---
!BIND	IOSTS=%O'402' : VOLATILE;

MACRO
	XRLEN=(XRB)%,		! LENGTH OF TRANSFER
	XRBC=(XRB+2)%,		! BYTES TRANSFERRED
	XRLOC=(XRB+4)%,		! BUFFER LOCATION
	XRCI=(XRB+6)<0,8>%,	! CHANNEL NUMBER*2
	XRBLK=(XRB+8)%,		! BLOCK NUMBER
	XRTIME=(XRB+10)%,	! WAIT TIME 
	XRMOD=(XRB+12)%;	! MODIFIERS
!	RSTS Monitor dependant
!
!	RSTS/E MONITOR EMTS DEFINED
!

LITERAL
	EMT_FIP=0,		! CALFIP
	EMT_READ=2,		! READ
	EMT_WRITE=4,		! WRITE
	EMT_CORE=6,		! CHANGE USER MEMORY SIZE
	EMT_SLEEP=8,		! SLEEP JOB FOR N SECONDS
	EMT_PEEK=10,		! PEEK AT MEMORY
	EMT_SPEC=12,		! SPECIAL FUNCTION
	EMT_TTAPE=14,		! ENTER TAPE MODE
	EMT_TTECH=16,		! ENABLE ECHO
	EMT_TTNCH=18,		! DISABLE ECHO
	EMT_TTDDT=20,		! DDT SUBMODE
	EMT_TTRST=22,		! CANCEL ^O
	EMT_TIME=24,		! GET TIMEING INFO
	EMT_POSTN=26,		! GET DEVICE HORIZONTAL POSITION
	EMT_DATE=28,		! GET CURRENT DATE AND TIME
	EMT_SET=30,		! SET KEYWORD BITS
	EMT_STAT=32,		! GET MY STATISTICS
	EMT_RUN=34,		! RUN A NEW PROGRAM
	EMT_NAME=36,		! INSTALL A NEW PROGRAM NAME
	EMT_EXIT=38,		! EXIT TO DEFAULT RTS
	EMT_RTS=40,		! CHANGE TO NEW RTS
	EMT_ERLOG=42,		! LOG AN ERROR FROM RTS
	EMT_LOGS=44,		! CHECK FOR LOGICAL DEVICES
	EMT_CLEAR=46,		! CLEAR KEYWORD BITS
	EMT_MESAG=48,		! MESSAGE SEND/RECEIVE
	EMT_CCL=50,		! CCL CHECKER
	EMT_FSS=52,		! FILE STRING SCANNER
	EMT_UUO=54,		! UUO HOOK
	EMT_CHAIN=56;		! CHAIN TO NEW PROGRAM
!	RSTS Monitor Dependant
!
!	FIP CALL FUNCTION CODES
!
!
!	FUNCTION CODE IN FQFUN FOR EMT 0
!

LITERAL
	CLSFQ=0,		! CLOSE A CHANNEL
	OPNFQ=2,		! OPEN A CHANNEL
	CREFQ=4,		! CREATE/EXTEND/OPEN A CHANNEL
	DLNFQ=6,		! DELETE A FILE BY NAME
	RENFQ=8,		! RENAME A FILE
	DIRFQ=10,		! DIRECTORY INFO
	UUOFQ=12,		! PROCESS UUO
	ERRFQ=14,		! GET ERROR MSG TEXT
	RSTFQ=16,		! RESET CHANNEL
	LOKFQ=18,		! LOOKUP A FILE
	ASSFQ=20,		! ASSIGN A DEVICE
	DEAFQ=22,		! DEASSIGN A DEVICE
	DALFQ=24,		! DEASSIGN ALL
	CRTFQ=26,		! CREATE A UNIQUE .TMP FILE
	CRBFQ=28;		! CREATE COMPILED IMAGE FILE

!	MISC OTHER RSTS DEFINITIONS

LITERAL
	TTYHND=2,		! TTY HANDLER INDEX
	DSKHND=0;		! DISK HANDLER INDEX

!	SOME RSTS ERROR CODES

EXTERNAL
	NOSUCH,
	NOBUFS,
	INTLCK,
	NOROOM;

!	UUO FUNCTION CODES

LITERAL
	UU_ATR=-25,		! READ/WRITE FILE ATTRIBUTES
	UU_NAM=-17;		! NAME FILE TO RUN-TIME-SYSTEM

)			!End RSTS Monitor Dependant
!
!	MISCELLANEOUS OTHER DEFINITIONS
!


!	STRUCTURES
%BLISS16(		!PDP-11 dependant
STRUCTURE
	PWVECT[I]=[2](.PWVECT+2*I),
	PBVECT[I]=[2](.PBVECT+I)<0,8>;
	)

!	LINKAGES
%BLISS16(		!PDP-11 dependant
LINKAGE
	REG0=JSR(REGISTER=0),
	REG1=JSR(REGISTER=0,REGISTER=1),
	REG2=JSR(REGISTER=0,REGISTER=1,REGISTER=2),
	DOEMT=EMT;
	)

!	MACROS

MACRO
%(	!BLKMOV should use transportable CH$ functions
	BLKMOV(DEST,SOURCE,BYTLEN)=
		BEGIN
		LOCAL PTR1,PTR2;
		PTR1=DEST;
		PTR2=SOURCE;
		DECR L_LEN_XX FROM BYTLEN TO 1 DO
			BEGIN
			(.PTR1)<0,8>=.(.PTR2)<0,8>;
			PTR1=.PTR1+1;
			PTR2=.PTR2+1;
			END;
		END%,
)%
	BLKMOV(DEST,SOURCE,BYTLEN)=
		CH$MOVE(BYTLEN,CH$PTR(SOURCE),CH$PTR(DEST)) %,

%BLISS16(		!PDP-11 dependant
	SETMENU(MENUPTR,BITNUM)=
		((.MENUPTR+BITNUM/8)<BITNUM MOD 8,1>=1)%,

	INMENU(MENUPTR,BITNUM)=
		(.(MENUPTR+BITNUM/16)<BITNUM MOD 16,1> NEQ 0)%,

	EXBIT(EXTPTR,BITNUM)= INMENU(EXTPTR,BITNUM)%,

	SETEXBIT(EXFLD,BITNUM)=
		((EXFLD+BITNUM/16)<BITNUM MOD 16,1>=1)%,
)!End PDP-11 dependant

	CLRBIT(XWRD,FLGBIT)=(XWRD=.XWRD AND NOT FLGBIT)%,
	CLRFLG(XWRD,FLGBIT)=(XWRD=.XWRD AND NOT FLGBIT)%,

	SETBIT(XWRD,FLGBIT)=(XWRD=.XWRD OR FLGBIT)%,
	SETFLG(XWRD,FLGBIT)=(XWRD=.XWRD OR FLGBIT)%,

	CALFIP(CODE)=(FQFUN=CODE; DOEMT(0))%,

%BLISS16(		!PDP11 style
	CLRCOR(ADR,WORDS)=
		BEGIN
		LOCAL PTR;
		PTR=ADR;
		DECR CT FROM WORDS TO 1 DO
			BEGIN
			.PTR=0;
			PTR=.PTR+2;
			END;
		END%,

	CLRFQB=CLRCOR(FIRQB,24)%;
)		!End PDP11
%BLISS36(		!Uses ZERO which uses BLT
	CLRCOR(ADR,WORDS)=ZERO(ADR,ADR+WORDS-1)%;


)!End BLISS36
	SWITCHES LIST(SOURCE,SOURCE);