Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_SRC_3_19910112 - mit/exec/execde.mac
There are 47 other files named execde.mac in the archive. Click here to see a list.
;726 PRARG fork handling system
;725 last login TTY support
;724 IDDT support
;723 zero terminal interrupt word for background forks
;722 change user group size for EE
;721 change autologout parameters
;720 use seperate command tables for not logged in, remove NOLG
;717 add VTS switch and support
;716 add command-edit features
;715 add CMU PCL 5(100) features
;714 add MIC features
;713 move configuration switches here [eliminate F0]
;   define useful macros and values 
;   define new configuration switches
;   rename XX macro to prevent site switch conflict	
;   cosmetic changes
;712 DEC release version
; UPD ID= 117, SNARK:<5.EXEC>EXECDE.MAC.12,  28-Dec-81 11:13:15 by CHALL
;TCO 5.1644 - UPDATE COPYRIGHT NOTICE
; UPD ID= 76, SNARK:<5.EXEC>EXECDE.MAC.10,  30-Sep-81 09:50:25 by CHALL
;TCO 5.1541 TURN OFF EMCSSW, MICSW; CREATE EXECD1.MAC TO ASSM W/EXECDE ON 2102
;TCO 5.1540 DEFINE EMCSSW SWITCH FOR EMACS CODE IN EXECED; NORMALLY OFF
; UPD ID= 25, SNARK:<5.EXEC>EXECDE.MAC.8,  14-Aug-81 18:34:04 by CHALL
;TCO 5.1454 CHANGE NAME FROM XDEF TO EXECDE
; UPD ID= 17, SNARK:<5.EXEC>EXECDE.MAC.7,  17-Jul-81 15:43:31 by CHALL
;CHANGE SIZE OF ALERT TABLE (NALTS) TO 50.
;<HELLIWELL.EXEC.5>EXECDE.MAC.1, 13-May-81 14:48:26, EDIT BY HELLIWELL
;REMOVE SHIPSW, SHIP, NOSHIP DEFINITIONS
; UPD ID= 2064, SNARK:<5.EXEC>EXECDE.MAC.4,  22-May-81 11:51:12 by GROUT
;TCO 5.1343 - Make IPCF code only flush buffers when necessary
; UPD ID= 1951, SNARK:<5.EXEC>EXECDE.MAC.3,   6-May-81 14:53:55 by MURPHY
;SEARCH GALAXY UNIVERSALS IN MODULES THAT NEED THEM ONLY
; UPD ID= 1897, SNARK:<5.EXEC>EXECDE.MAC.2,  28-Apr-81 17:23:20 by MURPHY
;DESCRIPTION OF FUNCTIONS IN SUBRS CALLED VIA UUOS
;MOVE PCL AND MFRK ASSEMBLY SWITCHES OUT OF THIS FILE
;ASSEMBLY SWITCH FOR PCL FEATURES
;<4.EXEC>EXECDE.MAC.1, 21-Oct-80 19:35:23, Edit by DK32
;Programmable Command Language
; UPD ID= 1552, SNARK:<5.EXEC>EXECDE.MAC.27,  11-Feb-81 09:10:32 by OSMAN
;Remember DDT start address for fork in DDTSA
; UPD ID= 1404, SNARK:<5.EXEC>EXECDE.MAC.26,   6-Jan-81 13:29:00 by OSMAN
;Up the number of alerts allowed to 300 decimal
; UPD ID= 1396, SNARK:<5.EXEC>EXECDE.MAC.22,   6-Jan-81 10:26:43 by OSMAN
;tco 5.1225 - Implement jsys trapping and file-opening trapping!
; UPD ID= 1383, SNARK:<5.EXEC>EXECDE.MAC.21,  24-Dec-80 15:07:13 by OSMAN
;tco 5.1214 - Add SBLKLN
; UPD ID= 1239, SNARK:<5.EXEC>EXECDE.MAC.20,   6-Nov-80 15:20:48 by OSMAN
;tco 5.1189 - Add HIGHPN
; UPD ID= 1138, SNARK:<5.EXEC>EXECDE.MAC.19,   7-Oct-80 15:29:25 by OSMAN
;Increase PDL for PCL
; UPD ID= 1128, SNARK:<5.EXEC>EXECDE.MAC.18,   6-Oct-80 10:16:35 by OSMAN
;tco 5.1167 - Remove FDB autokeep feature
; UPD ID= 1026, SNARK:<5.EXEC>EXECDE.MAC.17,  22-Sep-80 10:37:57 by OSMAN
;tco 5.1150 - Add SET PROGRAM
; UPD ID= 1018, SNARK:<5.EXEC>EXECDE.MAC.16,  16-Sep-80 15:20:51 by MURPHY
;TURN MIC SWITCH ON
; UPD ID= 914, SNARK:<5.EXEC>EXECDE.MAC.15,  19-Aug-80 13:55:07 by HESS
; Fix Examine/Deposit commands for multi-forking
; UPD ID= 854, SNARK:<5.EXEC>EXECDE.MAC.14,  10-Aug-80 15:20:09 by OSMAN
;tco 5.1129 - Add symbolic address and expression support
; UPD ID= 844, SNARK:<5.EXEC>EXECDE.MAC.13,   6-Aug-80 12:06:38 by MURPHY
;Make assembly switches global to detect conflicts
;<5.EXEC>EXECDE.MAC.12, 30-May-80 17:01:06, EDIT BY MURPHY
;PUT NEW MAIL WATCH AND ALERTS UNDER NEWF
;<5.EXEC>EXECDE.MAC.11, 21-May-80 12:12:23, EDIT BY MURPHY
;SET XTND to 0
; UPD ID= 530, SNARK:<5.EXEC>EXECDE.MAC.10,  20-May-80 14:54:56 by MURPHY
;ADD NEWF CONDITIONAL FOR VARIOUS "NEW" FEATURES UNDER TEST
; UPD ID= 529, SNARK:<5.EXEC>EXECDE.MAC.9,  20-May-80 14:02:15 by MURPHY
;ADD MFRK CONDITIONAL FOR MULTI-FORK FEATURES ONLY
; UPD ID= 521, SNARK:<5.EXEC>EXECDE.MAC.8,  14-May-80 13:21:09 by OSMAN
;Add DATBIT
;<5.EXEC>EXECDE.MAC.6,  8-May-80 14:04:46, EDIT BY OSMAN
;tco 5.1034 - Turn on extended archiving features
;<5.EXEC>EXECDE.MAC.5,  8-May-80 13:58:57, EDIT BY OSMAN
;Remove R.L.5 and R.GE.5 conditionals.
;<5.EXEC>EXECDE.MAC.4, 30-Apr-80 10:06:36, EDIT BY OSMAN
;Set release 5
;<4.1.EXEC>EXECDE.MAC.9, 29-Apr-80 13:27:31, EDIT BY OSMAN
;Turn XTND to 1!!
; UPD ID= 414, SNARK:<4.1.EXEC>EXECDE.MAC.8,   4-Apr-80 17:43:09 by LYONS
;MAKE R5SW USE THE SUPPLIED VALUE, IF THERE IS ONE
; UPD ID= 343, SNARK:<4.1.EXEC>EXECDE.MAC.7,  19-Mar-80 15:10:49 by TOMCZAK
;<4.1.EXEC>EXECDE.MAC.5, 17-Mar-80 10:50:25, EDIT BY OSMAN
;ADD R.GE.5 AND R.L.5 MACROS
;<4.1.EXEC>EXECDE.MAC.4, 29-Feb-80 14:01:57, EDIT BY OSMAN
;tco 4.1.1097 - Don't say "string space exhausted" after many DELETE commands
;<4.1.EXEC>EXECDE.MAC.2, 20-Nov-79 11:25:22, EDIT BY OSMAN
;TCO 4.1.1023 - FIX TAKE STUFF
;<4.EXEC>EXECDE.MAC.83,  8-Oct-79 15:34:22, EDIT BY OSMAN
;tco 4.2518 - Remove LIST (Remove CP%LIS)
;<4.EXEC>EXECDE.MAC.82,  8-Oct-79 15:28:58, EDIT BY OSMAN
;ADD CM%FW IN TABLE MACROS
;<4.EXEC>EXECDE.MAC.81,  3-Oct-79 11:16:35, EDIT BY OSMAN
;SEARCH MACSYM FIRST TO GET LATEST VERSIONS OF MACROS IN EVENT THAT MACRO
;THAT GETS USED BY MONSYM HAS BEEN UPDATED IN MACSYM BUT MONSYM HASN'T BEEN
;REASSEMBLED YET
;<4.EXEC>EXECDE.MAC.80, 12-Sep-79 11:06:24, EDIT BY OSMAN
;REMOVE CLZF
;<4.EXEC>EXECDE.MAC.79,  6-Sep-79 18:09:24, EDIT BY HELLIWELL
;MOVE MALCHN AND IITCHN TO CHANNEL 32 (SEE MONUMENT)
;<HESS.E>EXECDE.MAC.19, 21-Aug-79 12:48:53, Edit by HESS
;  Add extended EXEC features and switch XTND
;<4.EXEC>EXECDE.MAC.76, 29-Jun-79 13:49:59, EDIT BY OSMAN
;RAISE IPCF INTERRUPT LEVEL TO SAME AS ^C
;<4.EXEC>EXECDE.MAC.75,  4-Jun-79 10:42:53, EDIT BY OSMAN
;tco 4.2270 - use CLZF to decide whether to do CLZFF on ^C
;<4.EXEC>EXECDE.MAC.74,  2-May-79 15:52:24, EDIT BY OSMAN
;CLEAN UP PAGE BUFFER DEFINITIONS
;<4.EXEC>EXECDE.MAC.73, 30-Apr-79 15:02:54, EDIT BY OSMAN
;FIX DEFINITION OF NECHOF
;<4.EXEC>EXECDE.MAC.72, 26-Apr-79 11:27:39, EDIT BY OSMAN
;ADD .FIJFN, .FILEN
;<4.EXEC>EXECDE.MAC.71, 18-Apr-79 15:28:39, EDIT BY OSMAN
;DON'T SEARCH COMSYM ANYMORE
;<4.EXEC>EXECDE.MAC.69, 18-Apr-79 14:05:35, EDIT BY OSMAN
;DEFINE MLEN ETC.
;<4.EXEC>EXECDE.MAC.68, 13-Apr-79 15:19:37, EDIT BY OSMAN
;DEFINE ETYPE WITH ^V INSTEAD OF @ SO @ CAN BE USED IN STRING
;<4.EXEC>EXECDE.MAC.67, 12-Apr-79 16:39:17, EDIT BY OSMAN
;ADD DDTFST
;<4.EXEC>EXECDE.MAC.66,  2-Apr-79 13:00:50, EDIT BY OSMAN
;REMOVE REF TO COMSYM
;<4.EXEC>EXECDE.MAC.65, 30-Mar-79 10:12:58, EDIT BY OSMAN
;ADD FBLLEN, REMOVE IPCF
;<4.EXEC>EXECDE.MAC.64, 15-Mar-79 16:27:47, EDIT BY OSMAN
;ADD FI%ERR ETC.
;<4.EXEC>EXECDE.MAC.63, 14-Mar-79 14:38:01, EDIT BY OSMAN
;ADD DTP
;<4.EXEC>EXECDE.MAC.62, 12-Mar-79 17:53:55, EDIT BY KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
;<4.EXEC>EXECDE.MAC.61, 29-Jan-79 09:14:55, EDIT BY OSMAN
;add CF%NS
;<4.EXEC>EXECDE.MAC.60, 26-Jan-79 15:44:18, EDIT BY OSMAN
;ADD CMNOD
;<4.EXEC>EXECDE.MAC.59, 26-Jan-79 14:17:53, EDIT BY OSMAN
;define FNODEX AND RNODEX
;<4.EXEC>EXECDE.MAC.58, 26-Jan-79 13:44:28, EDIT BY OSMAN
;ADD FILCRS
;<4.EXEC>EXECDE.MAC.57, 26-Jan-79 13:35:14, EDIT BY OSMAN
;FIX DEFINITION OF STAT
;<4.EXEC>EXECDE.MAC.53, 23-Jan-79 10:32:44, EDIT BY OSMAN
;SPIF UP SUBCOM
;<4.EXEC>EXECDE.MAC.51, 18-Jan-79 17:43:43, EDIT BY OSMAN
;add XARC
;<4.EXEC>EXECDE.MAC.50, 13-Jan-79 15:52:32, EDIT BY OSMAN
;ADD XFRESZ, XFREE
;<4.EXEC>EXECDE.MAC.48,  3-Jan-79 15:51:47, EDIT BY OSMAN
;REMOVE STRS, REDEFINE FREE, FRESIZ
;<4.EXEC>EXECDE.MAC.47, 26-Oct-78 16:06:58, EDIT BY OSMAN
;ADD = ON RTEXT DEF, ALSO ADD GSSLEN, SSSLEN
;<CALVIN>EXECDE.MAC.1,  9-Aug-78 12:58:14, EDIT BY CALVIN
; Add DTIV as a function
;<3-ARC-EXEC>EXECDE.MAC.1, 14-May-78 18:00:17, Edit by MTRAVERS
; Added IGINV flag
;<4.EXEC>EXECDE.MAC.42,  2-Oct-78 18:51:36, EDIT BY OSMAN
;ADD ADVCHN, IPCCHN, IPCBUF ETC.
;REMOVE Bn SYMBOL DEFS
;<4.EXEC>EXECDE.MAC.34, 21-Sep-78 15:12:23, EDIT BY OSMAN
;CHANGE WHLUO, OPRUO, ERRUO, ONEWD, NOLOG, EASUB, TO WHLU, OPRU, ERRU, ONEW,
;   NOLG, EASB 
;ALSO, DEFINE THEM AS FULL-WORD DEFS.  ALSO, CHANGE DEF OF T TO OR THE BITS IN
;<4.EXEC>EXECDE.MAC.31, 17-Sep-78 17:31:38, EDIT BY OSMAN
;REMOVE CSBUFL, ADD FRESIZ, STRSIZ
;<4.EXEC>EXECDE.MAC.30, 17-Se;ADD PRLEN
;<4.EXEC>EXECDE.MAC.29, 15-Sep-78 22:40:14, EDIT BY OSMAN
;ADD FILWDS
;<4.EXEC>EXECDE.MAC.28, 14-Sep-78 14:09:19, EDIT BY OSMAN
;ADD OURNAM
;<4.EXEC>EXECDE.MAC.25, 14-Sep-78 11:36:49, EDIT BY OSMAN
;PUT SEARCH WITHIN TTITLE
;<4.EXEC>EXECDE.MAC.24, 13-Sep-78 16:38:16, EDIT BY OSMAN
;ADD NMARGS
;<4.EXEC>EXECDE.MAC.23, 21-Aug-78 20:21:28, EDIT BY OSMAN
;DOUBLE NUMBER OF QUEUE-CLASS COMMAND ARGS ALLOWED
;<4.EXEC>EXECDE.MAC.22, 12-Aug-78 13:41:10, EDIT BY OSMAN
;MOVE BUF0 FROM 740000 TO 700000
;<4.EXEC>EXECDE.MAC.21, 12-Aug-78 13:06:06, EDIT BY OSMAN
;ADD BUF0PN
;<4.EXEC>EXEC0.MAC.57,  2-Aug-78 11:03:07, EDIT BY OSMAN
;CHANGE DEFINITION OF "TRAP" TO NOT USE AC FIELD
;<4.EXEC>EXECDE.MAC.19,  2-Aug-78 10:17:59, EDIT BY OSMAN
;ADD LV.POV
;<4.EXEC>EXECDE.MAC.18, 21-Jul-78 08:31:27, EDIT BY OSMAN
;REMOVE MACRO DEFS THAT ARE DEFINED IN MACSYM
;<4.EXEC>EXECDE.MAC.17, 20-Jul-78 17:29:59, EDIT BY OSMAN
;START REMOVING REDUNDANT MACROS
;<4.EXEC>EXECDE.MAC.16, 18-Jul-78 17:04:49, EDIT BY OSMAN
;ADD FLAVOR CODES FOR COPY-CLASS COMMANDS
;<4.EXEC>EXECDE.MAC.14, 11-Jul-78 13:29:58, EDIT BY OSMAN
;INCREASE PDL SIZE FOR LOCAL VARIABLES
;<4.EXEC>EXECDE.MAC.13, 27-Jun-78 14:41:00, EDIT BY OSMAN
;REMOVE PION/PIOFF MACROS (CODE SHOULD NOW DO CALL PION/PIOFF)
;<4.EXEC>EXECDE.MAC.12, 26-Jun-78 11:30:46, EDIT BY OSMAN
;REMOVE P6 SO 15 AVAILABLE FOR TRVAR
;<4.EXEC>EXECDE.MAC.10, 23-Jun-78 21:29:52, EDIT BY OSMAN
;REMOVE UNREFERENCED SYMBOLS: CX, RANLEN
;<4.EXEC>EXECDE.MAC.9, 22-Jun-78 15:49:10, EDIT BY OSMAN
;ADD MALCHN
;<4.EXEC>EXECDE.MAC.8, 22-Jun-78 15:03:01, EDIT BY OSMAN
;REMOVE MALTIM, ADD MWATCI
;<4.EXEC>EXECDE.MAC.7, 21-Jun-78 17:04:22, EDIT BY OSMAN
;ADD MALTIM
;<4.EXEC>EXECDE.MAC.6, 14-Jun-78 10:51:51, EDIT BY OSMAN
;ADD SWISIZ
;<4.EXEC>EXECDE.MAC.5, 11-Jun-78 20:11:23, EDIT BY OSMAN
;REMOVE EXTBSZ
;<4.EXEC>EXECDE.MAC.4,  9-Jun-78 18:34:11, EDIT BY OSMAN
;ADD PION AND PIOFF
;<4.EXEC>EXECDE.MAC.2,  9-Jun-78 16:58:59, EDIT BY OSMAN
;ADD EXTSIZ, NEXTS, EXTBSZ
;<4.EXEC>EXECDE.MAC.1,  9-Mar-78 09:22:34, Edit by ENGEL
;ADD MTOPR FUNCTIONS FOR SAVING AND RESTORING MASK
;TOPS20 'EXECUTIVE' COMMAND LANGUAGE - DEFINITIONS

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;   OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1980,1981,1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

	UNIVERSAL EXECDE

	SEARCH MACSYM,MONSYM

;THIS FILE DEFINES VARIOUS PARAMETERS, SOME OF THESE ARE USED INTERNALLY AND
;   SOME AFFECT THE LANGUAGE. 

;713 macros to define conditional assembly macros with certain default values

;713 SW0 - defines a switch with default value of zero
DEFINE SW0 (FOO) 
  <IRP FOO,<IFNDEF FOO'SW,<FOO'SW==0>
	DEFINE FOO,<IFN FOO'SW>
	DEFINE NO'FOO,<IFE FOO'SW>>>

;713 SW1 - defines a switch with default value of one
DEFINE SW1 (BAR) 
  <IRP BAR,<IFNDEF BAR'SW,<BAR'SW==1>
	DEFINE BAR <IFN BAR'SW>
	DEFINE NO'BAR <IFE BAR'SW>>>

;713 eg: SW0 <switch1,switch2>
;713	 SW1 <switch3>	

;713 One On - assembles code if at least one of switches is non-zero
DEFINE ONEON (BLETCH)
  <DEFINE ..ONE <REPEAT 0,>
   IRP BLETCH,<IFN BLETCH'SW,<DEFINE ..ONE <REPEAT 1,>
			      STOPI>>
   ..ONE>

;713 One Off - assembles code if at least one of switches is zero
DEFINE ONEOFF (BLETCH)
  <DEFINE ..ONE <REPEAT 0,>
   IRP BLETCH,<IFN BLETCH'SW,<DEFINE ..ONE <REPEAT 1,>
			      STOPI>>
   ..ONE>

;713 eg: ONEOFF <site,dev3>,< assemble if one of SITESW or DEV3SW is zero >

;713 All On - assembles code if all of switches are non-zero
DEFINE ALLON (BAZ)
  <DEFINE ..ALL <REPEAT 1,>
   IRP BAZ,<IFE BAZ'SW,<DEFINE ..ALL <REPEAT 0,>
			STOPI>>
   ..ALL>

;713 All Off - assembles code if all of switches are zero
DEFINE ALLOFF (BAZ)
  <DEFINE ..ALL <REPEAT 1,>
   IRP BAZ,<IFN BAZ'SW,<DEFINE ..ALL <REPEAT 0,>
			STOPI>>
   ..ALL>

;713 eg: ALLON <site,sw1>,< assemble if all of SITESW and SW1SW are non-zero >

;713 Delete - delete this code
DEFINE DELETE
  <REPEAT 0>

;713 Insert - insert this code
DEFINE INSERT
  <REPEAT 1>

;713 eg: DELETE,< don't assemble this >
;713	 INSERT,< do assemble this >
;713 define site
	SW0 <EE,OZ,SP,XX,NM>
				;713 only one site allowed
IFN EESW+SPSW+OZSW+XXSW+NMSW-1,<
    IF1,<PRINTX Error, wrong number of sites specified>
	END
>
				;713 print out which site
EE,<IF1,<PRINTX Building EECS EXEC>>
OZ,<IF1,<PRINTX Building OZ EXEC>>
SP,<IF1,<PRINTX Building SPEECH EXEC>>
XX,<IF1,<PRINTX Building XX EXEC>>
NM,<IF1,<PRINTX Building non MIT EXEC>>


;713 default settings for configuration switches

;713 features:
	SW1 <EMCS>		;713 DEC features: Emacs Code for edit: ON
	SW1 <MIC>		;714	Macro-Interpreted Commands: ON
	SW1 <MFRK>		;713	Multi-Forking: ON
	SW1 <NEWF>		;713	New Features: ON
	SW1 <PCLF>		;715	PCL support: ON
	SW0 <STAT>		;713	Statistics collection: OFF
	SW1 <XARC>		;713	Extended Archiving: ON
	SW1 <XTND>		;713	Extended Features: ON
	SW1 <CEF>		;716 Command Edit: ON
	SW0 <OLDF>		;713 Old Features

;713 ENVIRONMENT
	SW0 <MIT>		;713 MIT environment: OFF
	SW0 <MMON>		;713 MIT monitor: OFF
NOMMON,<SW0 <VTS>>		;717 MIT Virtual Terminal System: default same
MMON,<	SW1 <VTS>>		;717    value as MMON

;713 DEVICE CONFIGURATION:
	SW0 <CDPD>		;713 card punch: OFF
	SW0 <CDRD>		;713 card reader: OFF
	SW1 <LPTD>		;713 line printer: ON
	SW0 <PTPD>		;713 paper tape punch: OFF
	SW0 <PTRD>		;713 paper tape reader: OFF
	SW0 <PLTD>		;713 plotter: OFF

;713 NETWORK CONFIGURATION:
	SW1 <ARPA>		;713 ARPANET: ON
NOARPA,<SW0 <TCP>>		;713 TCP: default same value as ARPA
ARPA,<	SW1 <TCP>>		;713 
	SW0 <CHA>		;713 CHAOSNET: OFF
	SW0 <DECN>		;713 DECNET: OFF
	OURNAM==SIXBIT/EXEC/	;OUR PROGRAM NAME WHILE WAITING FOR A COMMAND

;MACRO TO DO STANDARD STUFF AT BEGINNING OF EACH ASSEMBLY
DEFINE TTITLE (TT)
  <	TITLE TT
	SEARCH MACSYM,MONSYM
	SALL
	GGLOBS>

;UNIVERSALS TO SEARCH FOR GALAXY STUFF
DEFINE GLXSCH 
  <	SEARCH QSRMAC,GLXMAC,ORNMAC>

;FORM OF OPDEF TO DO INTERNAL
DEFINE GOPDEF (NAM,VAL)
  <	OPDEF NAM [<VAL>]
	INTERN NAM>

;FORM OF OPDEF TO DO .NODDT'D INTERNAL
DEFINE GSOPDEF (NAM,VAL)
  <	OPDEF NAM [VAL]
	INTERN NAM
	.NODDT NAM>

;USUAL OPDEF'S
	GOPDEF ABSKP,<TRNA 0,0>	;713 fastest absolute skip for KL10
	GOPDEF CALL,<PUSHJ P,0>
	GSOPDEF CALLRET,<JRST>
	GOPDEF NOP,<TRN 0,0>	;713 fastest nop for KL10
	GOPDEF RET,<POPJ P,0>
	GOPDEF RETSKP,<JRST RSKP> ;713 make it an OPDEF for debugging purposes

DEFINE ERNOP			;713 ignore error return
  <	ERJMP .+1>		;713

DEFINE ERSKP			;713 skip on error
  <	ERJMP .+2>		;713

	GOPDEF ASCPTR,<POINT 7>	;713 ASCIZ byte pointer for debugging purposes

DEFINE TXTPTR (TEXT)		;713 make an ASCIZ pointer to text arg
  <	ASCPTR [ASCIZ TEXT]> ;713

DEFINE FIRCHR (ADDR)		;713 byte pointer to extract first character 
  <	POINT 7,ADDR,6>		;713

DEFINE SECCHR (ADDR)		;713 ...and the second character
  <	POINT 7,ADDR,13>	;713

DEFINE PAGENO (ADDR)		;713 byte pointer to extract page number from
  <	POINT 9,ADDR,26>	;713    an address

DEFINE GTFLDT (AC)		;713 get parse field type and load into AC
  <	LDB AC,[POINTR .CMFNP(C),CM%FNC]> ;713

;CONSTANTS
	.INFIN==:377777,,777777	;713 plus infinity	
	.MINFI==:1B0		;713 minus infinity

;HERE IS A MACRO TO GENERATE ALL "GET"ABLE FILESPECS
DEFINE GETSAVE(STRING)
  <ASCIZ 'STRING'EXE>

;CONTROL BITS IN TAKBTS TABLE AND TAKCUR.
	TKALEF==1B0		;ON MEANS ALLOW ERRORS IN TAKE FILE
	TKECOF==1B1		;ON MEANS ECHO TAKE FILE
	TKTERF==1B2		;ON MEANS CURRENT TAKE FILE IS A TERMINAL

;HERE ARE THE INTERUPT CHANNEL LEVEL ASSIGNMENTS FOR CHANNELS WHICH REFERENCE
;   THE PC IN PCTAB 
CEF,<	LV.CE==1>		;716 command edit PSI char 
	LV.DAT==1		;DATA ERROR IS HIGH (PANIC)
	LV.ILI==1		;ILLEGAL INSTRUCTION IS HIGH (PANIC)
	LV.POV==1		;PUSHDOWN OVERFLOW IS HIGH
	LV.QTA==1		;QUOTA EXCEEDED IS HIGH (PANIC)
	LV.ESC==2		;ADVISE ESCAPE CHAR IS MEDIUM
	LV.IPC==2		;IPCF INTERRUPT IS SAME AS ^C
	LV.TRP==LV.IPC		;JSYS/UUO TRAP (SAME AS ^C LEVEL SO THAT TRPPSI
				;   ROUTINE DOESN'T CONTINUE FORK AFTER CCPSI
				;   STOPS IT!!)  
	LV.EOF==3		;END OF FILE IS LOW
	LV.PCL==3		;PCL PTY I/O IS LOW

	CTRLC==3		;SUPER-PANIC PSI CHARACTER AND "TERMINAL CODE"
				;   FOR SAME 
	CTRLE==5		;CHARACTER THAT PREFIXES PRIVILEGED COMMANDS
	ADVESC==.TICCE		;^E IS ESCAPE FOR ADVICE
	BELL==7			;CHARACTER TO RING WHEN ILLEGAL ^A OR ^W INPUT,
				;   OR WHEN RECOGNITION AMBIGUITY REQUIRES MORE
				;   INPUT  
	CTRLO==^D15		;TERMINAL CODE FOR ^O TO FLUSH OUTPUT
	CTCODE==^D20		;"TERMINAL CODE" FOR CHARACTER ASSIGNED TO PSI
				;   THAT PRINT RUNTIME (^T) 
	CTRLZ==32		;EOF CHARACTER FOR "COPY" COMMAND WHEN TTY IS
				;   SOURCE 

;SPECIAL BITS THAT GET PASSED IN AC2 WITH GTJFN BITS TO SPECFN ROUTINE
	CF%ERR==1B14		;713 special error handling
	CF%GRP==1B15		;713 input groups of files
	CF%EOL==1B16		;713 input until end of line
	CF%NS==1B17		;NO SUBCOMMANDS FOLLOW LIST

;WHEN CFN1 IS COERCED INTO QUIETLY STACKING BOGUS FILESPECS, JFNSTK GETS
;   BLESSED WITH AN ENTRY LOOKING HAVING AN ADDRESS IN THE LEFT HALF, AND
;   FI%ERR IN THE RIGHT HALF. THE ADDRESS POINTS TO A BLOCK WHICH HAS THE
;   ERROR CODE IN WORD .FIERR, AND THE FILESPEC STRING POINTER IN WORD .FISTR 
	FI%ERR==0,,-2		;VALUE FOR RIGHT HALF OF STACK WORD
	.FIERR==0		;ERROR CODE
	.FIJFN==1		;FLAGS AND PARSE-ONLY JFN
	.FISTR==2		;STRING POINTER
.FILEN==3			;NUMBER OF WORDS NEEDED FOR BLOCK

;CODES TO IDENTIFY COPY-CLASS COMMANDS
	CP%COP==0		;COPY
	CP%SPE==1		;^ESPEAK
	CP%HEL==2		;HELP
	CP%TYP==3		;TYPE
	CP%APP==4		;APPEND

				;COMPUTE AMOUNT BETWEEN MAIL CHECKS
NONEWF,<MWATCI==5*^D60		;NUMBER OF SECONDS BETWEEN CHECKS
	MWATCI==<MWATCI>B17	;SECONDS WITH BINARY POINT SHIFTED
	MWATCI==MWATCI/<^D24*^D60*^D60>	;DIVIDED BY SECONDS IN A DAY

	MALCHN==32		;CHANNEL FOR MAIL-INTERRUPTS
       >

;NOTE!!! DO NOT USE CHANNEL 0 IN THE EXEC EVER!!!
;   IF YOU DO, YOU WILL GET SPURIOUS INTERRUPTS!!!
	ADVCHN==30		;^E INTERRUPT DURING ADVISE
	IPCCHN==31		;COMMUNICATION CHANNEL, CATCHES ALL IPCF
				;   MESSAGES 
NEWF,<	IITCHN==32>		;CHANNEL FOR MAIL-WATCH & ALERTS
	PCLCHI==:33		;PCL Input channel for PCL PTY
	PCLCHO==:34		;PCL Output channel for PCL PTY
	TRPCHN==35		;JSYS/UUO TRAP CHANNEL
CEF,<	CECHN==^D31>		;716 use for command edit PSI char

	PDBSIZ==7		;SIZE OF PACKET

;AUTOMATIC LOGOUT PARAMETERS:
;   AUTOLOGOUT OCCURS IN TOP-LEVEL EXEC WHEN JOB IS NOT LOGGED IN AND:
;   1) EXEC RETURNS TO COMMAND INPUT AND AT LEAST AUTOLO1 SECONDS HAVE ELAPSED
;	SINCE EXEC WAS STARTED, OR 
;   2) AUTOL2 SECONDS HAVE ELAPSED SINCE STARTUP AND THERE HAS BEEN NO TELETYPE
;	ACTIVITY FOR AUTOL3 SECONDS. 
;721 change parameters (used to be 600 300 15)
	AUTOL1==^D3600
	AUTOL2==^D180
	AUTOL3==^D120
;****************** SYSTEM DEPENDENT THINGS ********************

;ASCII CHARACTERS - IF ANY ARE CHANGED, MUST ALSO CHANGE "CHRTBL"!
	TAB==11			;TAB (^I ON MODEL 33 TTY)
	LF==12			;LINE FEED
	FORMF==14		;FORM FEED
	CR==15			;CARRIAGE RETURN
	ALTM==33		;ALT MODE, ESC, ETC KEY

;CALCULATE MAX VALUE FOR RFTAD/SFTAD BLOCK

	TADLEN==.RSWRT+1	;START WITH THIS
IFG .RSCRV+1-TADLEN,<TADLEN==.RSCRV+1>	;BUT USE THIS IF LARGER

;WHERE DDT (UDDT) RESIDES
	DDTFST==764000		;FIRST LOCATION NEEDED BY DDT
	DDTORG==770000		;STARTING LOCATION OF DDT
	DDTSYM==DDTORG+1	;LOCATION IN DDT THAT POINTS TO LOC WHERE
				;SYMBOL TABLE POINTER IS STORED ($I-1)

;VALUE TO USE FOR MAX JFN NUMBER (NOT SUPPLIED BY MONSYM AS YET)
	MAXJFN==1000		;GOOD ENOUGH FOR TIME BEING

;HIGHEST PAGE NUMBER
	HIGHPN==37777

;MNEMONIC AC'S
;   CHANGED TO TOPS20 CONVENTIONS 6/10/74 - OLD MNEMONICS SHOWN IN PARENS
	Z=:0			;FLAGS
	A=:1			;ARGS AND GENERAL PURPOSE
	B=:2
	C=:3
	D=:4
	Q1=:5
	Q2=:6
	Q3=:7			;(CBT) DESCRIPTIVE BITS FROM "CHRTBL" FOR LAST
				;   CHARACTER 
	P1=:10			;(CHR) INPUT CHARACTER
	P2=:11			;(TRM) LAST INPUT FIELD TERMINATOR
	P3=:12			;(KWV) VALUE WORD RETURNED BY LAST KEYWORD
				;   TABLE LOOKUP 
	P4=:13			;(KWV1) KWV SAVED AFTER FIRST KEYWORD IN
				;   COMMAND 
	P5=:14			;(.BFP) COMMAND BUFFER PTR SAVED AT BEGINNING
				;   OF LAST FIELD 
;DON'T USE AC15. TRVAR NEEDS IT.;(CNT) NUMBER OF CHARACTERS IN FIELD (REQUIRED
				;   BY EDITING STUFF)
	CX=:16			;DON'T USE 16, STKVAR CLOBBERS IT
	P=:17			;STACK

;FIELDS FOR PARTS OF INSTRUCTIONS
	OPFLD==777B8		;OPCODE
	ACFLD==17B12		;AC
	INDFLD==1B13		;INDIRECT BIT
	XFLD==17B17		;INDEX REGISTER
	YFLD==777777B35		;Y FIELD
;MACROS TO TEST FOR BATCH MODE

DEFINE IFNBATCH(ADDR)
  <	SKIPE BATCHF
	JRST ADDR>

DEFINE IFEBATCH(ADDR)
  <	SKIPN BATCHF
	JRST ADDR>

;MACRO TO INVOKE SAVING OF TEMP AC'S (A-D) AND AUTO RESTORE ON RETURN

DEFINE ATSAVE
  <	JSP CX,.SAVT>

;LOAD FLAG MACRO - LOADS FLAGS (OR ANY QUANTITY) INTO AC,
;   GENERATING MOVSI, MOVEI, OR MOVE AS APPROPRIATE

DEFINE LDF (AC,FLAG)
  <	MOVX AC,FLAG>
;*********** DEFINITIONS THAT ARE INTERNAL TO EXEC ***********

;UUO'S USED IN EXEC. MOST HAVE CALLING MACROS.
;NOTE: UUO DISPATCH TABLE AND DISPATCHER ARE AT BEGINNING OF EXECSU.MAC.
;      UUO ROUTINES ARE IN EXECSU.MAC.
;OTHER UUO'S ARE DEFINED WITH "FIELDS" MACRO, DEFINED ELSEWHERE IN THIS FILE
        OPDEF UERR[20B12]	;%ERR   ERROR MESSAGE
        OPDEF UTYPE[21B12]	;%ETYPE TYPE MESSAGE
	OPDEF KEYWD[22B12]	;%KEYW  KEYWORD INPUT AND LOOKUP
        OPDEF UNOI[23B12]	;%NOI   NOISE WORD INPUT/OUTPUT
	OPDEF UPROMPT[24B12]	;%$TYPE PROMPT FOR NEW LINE
	OPDEF ULERRO[25B12]	;%LERRO TYPE ERROR MESSAGE, BUT RETURN TO
				;   CALLER 
;26 available! e.o. 7/6/77
	OPDEF U$ERR[27B12]      ;%$ERR  ERROR MESSAGE WITHOUT CR FIRST
	OPDEF UETYPE[30B12]	;%ETYPE TYPE MESSAGE AND INTERPRET % CODES
	OPDEF GTB[31B12]	;%GTB   CONVENIENT INTERFACE TO THE GETAB JSYS
	OPDEF PRINT[32B12]	;%PRINT PRINT ASCII CHARACTER FROM EFF ADDR
	OPDEF UTRAP[33B12]	;%TRAP  ERROR PSI MESSAGE
	OPDEF U.$ERR[34B12]	;%.$ERR ERROR THAT DOESN'T CLEAR BUFFERS (^X)
	OPDEF USUBCO[35B12]	;%SBCOM INPUT AND DISPATCH ON SUBCOMMANDS
%%NUUO==36			;    FIRST UUO VALUE USED BY "FIELDS" MACRO

;MACROS TO CALL UUO'S AND SUBROUTINES

;*** NEED CALL SEQ FOR EACH MACRO ***

;ERROR MACROS
;USE ^V AS QUOTING CHARACTER SINCE ANY OTHER MAY BE IN STRING!

DEFINE $ERROR (TEXT)
  <	U$ERR [ASCIZ TEXT]>

DEFINE .$ERROR (TEXT)
  <	U.$ERR [ASCIZ TEXT]>

DEFINE ERROR (TEXT)
  <	UERR [ASCIZ TEXT]>

;PUT THIS MACRO AFTER JSYS'S THAT SHOULDN'T FAIL, IN ORDER TO ISSUE A WARNING
;   IF THEY DO, BUT TO OTHERWISE TRANSPARENTLY CONTINUE EXECUTION

DEFINE JWARN
  <	ERCAL RJWARN>

DEFINE LERROR (TEXT)
  <	ULERRO [ASCIZ TEXT]> ;LIKE "ERROR", BUT RETURN TO CALLER


;TYPEOUT MACROS

DEFINE ALTYPE (TEXT)
  <	UALTYP [ASCIZ TEXT]>

DEFINE ETYPE (TEXT)
  <	UETYPE [ASCIZ TEXT]>	

DEFINE TYPE (TEXT)
  <	UTYPE [ASCIZ TEXT]>


;COMMAND INPUT MACROS

DEFINE CONFIRM
  <	CALL CONF>

DEFINE NOISE (TEXT)
  <	UNOI [ASCIZ TEXT]>

DEFINE PROMPT (TEXT)
  <	UPROMPT [ASCIZ TEXT]>

;MACRO TO INVOKE SUBCOMMANDS.  "INITIALIZATIONROUTINE" IS USED TO INVOKE A
;   ROUTINE WHICH DOES INITIALIZATION THAT WANTS TO HAPPEN BEFORE EACH
;   SUBCOMMAND.  FOR INSTANCE, THE "BUILD" COMMAND WANTS TO CLEAR A FLAG
;   SAYING "NOT" HAS BEEN TYPED.  THEN WHEN "NOT" IS TYPED, THE FLAG IS SET FOR
;   THAT SUBCOMMAND, BUT WANTS TO BE CLEARED FOR THE NEXT SUBCOMMAND.
DEFINE SUBCOM (TABLENAME,INITIALIZATIONROUTINE)
   <IFB <INITIALIZATIONROUTINE>,<
	USUBCO  [TABLENAME
		 0]>
    IFNB <INITIALIZATIONROUTINE>,<
	USUBCO  [TABLENAME
		 INITIALIZATIONROUTINE]>>

;MISCELLANEOUS

DEFINE TRAP (LEVEL,TEXT)
  <	UTRAP  [LEVEL
		ASCIZ TEXT]>

;BITS RETURNED IN AC1 BY TIME-AND-DATE PARSES.  THESE BITS DENOTE WHAT THE USER
;   REALLY TYPED.  FOR INSTANCE, ON MAY 5, THE INPUT "5-MAY-80 2:3" AND "2:3"
;   WILL YIELD IDENTICAL INTERNAL FORMAT RESULTS IN AC2.  ONLY BY EXAMINING THE
;   BITS IN AC1 WILL THE CALLER BE ABLE TO TELL THE DIFFERENCE. 
	DATBIT==1B0		;USER TYPED A DATE

; THE FOLLOWING SIMULATE UNIMPLEMENTED JSYS'S

;HYPOTHETICAL FUTURE JSYS TO STOP NON-INTERACTIVE JOB
DEFINE BTCHER <>
;MACROS FOR INPUTTING FIELDS.  CALL IT LIKE THIS:
;
;	FOO'X <BAR>
;	ERROR RETURN (FIELD TYPED WASN'T KIND REQUESTED (TRY ANOTHER!)
;	SUCCESS RETURN, FIELD FLAVOR CORRECT
;
;   WHERE "FOO" IS THE TYPE OF FIELD, AND "BAR" IS THE HELP MESSAGE.
;   FOR INSTANCE:
;
;	DECX <NUMBER OF GENERATIONS TO KEEP>
;
;   INPUTS A DECIMAL NUMBER, TYPING "NUMBER OF GENERATIONS TO KEEP" IN RESPONSE
;   TO A "?". 

;713 rename XX macro to PARFLD to prevent site switch conflict
;713 must be same name as macro definition in SU before ULIST
DEFINE PARFLD (NAME)
  <OPDEF U'NAME [<%%NUUO>B12]
   %%NUUO==%%NUUO+1
   DEFINE NAME'X(HELP)
       <IFNB <HELP>,< U'NAME [ASCIZ HELP] >
	IFB <HELP>,< U'NAME [0]	>>> ;USE DEFAULT

DEFINE ULIST
  <PARFLD SLASH			;;SLASH
   PARFLD BSLSH			;;BACKSLASH
   PARFLD DASH			;;HYPHEN
   PARFLD FILE			;;FILESPEC
   PARFLD CTRLE			;;CONTROL-E
   PARFLD DEC			;;DECIMAL NUMBER
   PARFLD CRR			;;END OF LINE
   PARFLD STAR			;;ASTERISK
   PARFLD WORD			;;WORD
   PARFLD DT			;;DATE AND/OR TIME
   PARFLD HELP			;;SET UP HELP STRING
   PARFLD OCT			;;OCTAL NUMBER
   PARFLD STR			;;STRUCTURE NAME
   PARFLD DEV			;;DEVICE
   PARFLD CMERR			;;COMMAND ERROR
   PARFLD DEF			;;SET DEFAULT STRING
   PARFLD USER			;;USER NAME
   PARFLD USERS			;;USER NAMES ALLOWING STARS
   PARFLD DIR			;;DIRECTORY NAME
   PARFLD DIRS			;;DIRECTORY NAMES ALLOWING STARS
   PARFLD COMMA			;;READ A COMMA
   PARFLD LINE			;;INPUT ENTIRE REST OF LINE
   PARFLD DOT			;;DOT, PERIOD, "." YOU GOT IT
   PARFLD TIME			;;TIME OF DAY (OR AMOUNT OF TIME)
   PARFLD COLON			;;COLON
   PARFLD DEXT 			;;SET UP JFN BLOCK WITH DEFAULT EXTENSION
   PARFLD CHAR			;;PARSE ARBITRARY CHARACTER, PASSED IN AC1
   PARFLD QUOTE			;;QUOTED STRING
   PARFLD ACCT			;;ACCOUNT
   PARFLD DTIV			;;DATE AND TIME OR TIME OR DATE OR INTERVAL IN
				;;   DAYS 
   PARFLD FNODE			;;FAKE NODE, I.E. SYNTACTICALLY CORRECT ONLY
   PARFLD RNODE			;;REAL NODE, I.E. ONE THAT'S CURRENTLY KNOWN BY
				;;   SYSTEM 
   PARFLD DTP			;;DATE AND TIME IN THE PAST, LIKE "DIR SINCE
				;;   MONDAY" 
   PARFLD DTR			;;DATE AND TIME RELATIVE TO NOW.
   PARFLD ADDR   		;;SYMBOLIC ADDRESS
   >

ULIST				;;SPIT IT OUT HERE
;***************************************************************************
;Here for convenience is a description of the various functions which can be
;   invoked via the UUOs above.  This was all lifted directly out of EXECSU.
;****************************************************************************

; ETYPE
;%ETYPE (ETYPE MACRO, UETYPE UUO)
;HANDLER FOR UUO THAT TYPES MESSAGE, INTERPRETING % CODES.
;   SPECIAL CODES ARE OF FORM %NL%
;	WHERE N IS AN OPTIONAL OCTAL NUMBER SPECIFYING AN AC
;	      L IS A LETTER:
;
;DISPATCH TABLE FOR LETTERS AFTER %
;   KEEP THIS TABLE IN ASCII ASCENDING ORDER SO IT REMAINS EASY TO SEE IF A
;   CHARACTER IS IMPLEMENTED OR NOT
;   (NOTE THAT EXEC DOESN'T ASSUME TABLE IS ORDERED THOUGH)
;	"_",,%EOL		;7 TYPE A CRLF, out of order for speed
;	"#",,%NUMS		;OCTAL NUMBER AS N OR N,,N AS APPROPRIATE
;	"$",,%VSTR		;7 verbatim string
;	"%",,%PER		;%% JUST PRINTS A PERCENT
;	"'",,%SIX		;PRINT CONTENTS OF AC IN SIXBIT
;	"/",,%EXPR		;EXPRESSION IN AC
;	"=",,%FLT		;SIX-COLUMN FLOATING POINT NUMBER, NN.MM
;	"?",,%SYSMS		;ERROR MESSAGE (CONTENTS OF AC OR LATEST)
;	"@",,%LM		;GET TO LEFT MARGIN
;	"A",,%A			;CURRENT TIME
;	"B",,%B			;CPU TIME AS HH:MM:SS, OR SPECIFIC TIME IN
				;   MILLISECONDS 
;	"C",,%C			;CONNECT TIME
;	"D",,%D			;CURRENT DATE(OR SPECIFIC DATE)
;	"E",,%E			;SAME TIME AS LAST %D(OR SPECIFIC TIME)
;	"F",,%F			;"FORK N " IF >1 INFERIOR
;	"G",,%G			;CONNECTED DIR NAME
;	"H",,%H			;DEVICE NAME FOR DESIGNATOR IN INDICATED AC
;	"I",,%I			;PRINT # OF USER JOBS + # OF OPR JOBS
;	"J",,%J			;TSS JOB #
;	"K",,%K			;UPTIME
;	"L",,%L			;"LINE N" OR "DETACHED"
;	"M",,%M			;NUMBER OR STRING (5B0+N OR BYTE POINTER)
;	"N",,%N			;NAME UNDER WHICH USER IS LOGGED IN (OR
				;   SPECIFIC USER NAME) 
;	"O",,%O			;CONTENTS OF SPECIFIED AC IN OCTAL
;	"P",,%P			;CONTENTS OF RIGHT HALF OF SPECIFIED AC IN
				;   OCTAL 
;	"Q",,%Q			;CONTENTS OF AC IN DECIMAL OR FLOATING!
;	"R",,%R			;DIRECTORY NAME FOR DIR # OR STRING POINTER IN
				;   AC 
;	"S",,%S			;FILE NAME FOR JFN IN AC
;	"T",,%T			;CONTENTS OF AC AS PERCENTAGE OF UP TIME
;	"U",,%U			;DECIMAL BIT NUMBERS, separatED BY COMMAS
;	"V",,%V			;CPU TIME WITH TENTHS OF SECONDS (FORK HANDLE
				;   IN AC IF NOT 0) 
;	"W",,%W			;STD FORMAT DATE AND TIME IN AC
;	"X",,%X			;TYPE ILLEG INST ERROR MSG
;	"Y",,%Y			;MEMORY ADDRESS
;	"[",,%GTHST		;7 host name (or number if unknown)
;	"\",,%STRNG		;TYPE STRING OR CHAR IN AC
;	"]",,%CHANM		;7 CHAOSnet host name (or number if unknown)
; GTB
;%GTB
;UUO TO DO A "GETAB" JSYS WITH A REASONABLE CALLING SEQUENCE.
;TABLE # IN C(Q1), INDEX IN RH OF D, ONE RETURN WITH WORD IN A.
;TYPICAL USAGE: LH D CONTAINS AOBJN COUNTER, B AND C ARE FREE
;	FOR USE IN OTHER JSYS CALLS INSIDE LOOP.

; KEYW
;TO DO TABLE LOOKUP OF NEXT FIELD OF COMMAND, DO:
;
;	HELPX <THIS IS WHAT "?" TYPES OUT>
;	KEYWD TABLE		;"TABLE" IS ADDRESS OF TABLE
;	T FOO...		;APPROPRIATE "T" MACRO FORM OF DEFAULT VALUE
;	 ERROR RETURN
;	SUCCESS RETURN		;P3 HAS VALUE FROM TABLE
;				;B HAS TABLE ENTRY ADDRESS

; LERROR
;ERROR UUO HANDLER. MESSAGE TEXT AT EFFECTIVE ADDRESS.
;SERVICES UUO'S UERR, U$ERR, U.$ERR (MACROS ERROR, $ERROR AND .$ERROR)
;   USE "LERROR <TEXT>" TO PRINT ERROR MESSAGE AND RETURN.  SAME AS
;   "ERROR <TEXT>" EXCEPT LATTER DOESN'T RETURN TO CALLER.

; PRINT
;UUO TO OUTPUT SINGLE ASCII CHARACTER FROM EFFECTIVE ADDRESS

; SUBCOM
;USUBCO UUO, INVOKED BY SUBCOM MACRO
;INPUT AND DISPATCH ON SUBCOMMANDS, USING TABLE EFFECTIVE ADDR POINTS TO
;   TERMINATES ON NULL SUBCOMMAND OR ONE WITH 0 DISPATCH ADDRESS 
;   USES INCLUDE DIRECTORY, COPY, PRINT, CREATE, TYPE/LIST

; TYPE
;ROUTINE INVOKED BY "$TYPE <FOO>" MACRO.  
;IT STARTS A NEW LINE PART OF THE COMMAND, WITH THE PROMPT BEING "FOO".
;COMMAND TABLE MACROS

;AN ENTRY
;ALSO USED FOR DEFAULT INFORMATION AFTER "KEYWD" MACRO
DEFINE T (TEXT,BITS,ADDR,CONBTS<0>)
  <..BITS==0
   IFNB <BITS>,<..BITS==BITS>
   IFB <ADDR>,<$FOO==.'TEXT>
   IFNB <ADDR>,<$FOO==ADDR>
   IFE CONBTS,<[ASCIZ TEXT],,[..BITS!$FOO]>
   IFN CONBTS,<[CONBTS!CM%FW
	ASCIZ TEXT],,[..BITS!$FOO]>>

;SWITCH WITH COLON AFTER IT
DEFINE TV (TEXT,BITS,ADDR,CONBTS)
  <IFB <ADDR>,	T <TEXT':>,BITS,.'TEXT,CONBTS
   IFNB <ADDR>,	T <TEXT':>,BITS,ADDR,CONBTS>

;INVISIBLE TABLE ENTRIES.
;HEY, DON'T CHANGE THIS NAME BECAUSE MACRO IN EXECQU.MAC ASSUMES THIS MACRO'S
;   NAME BEGINS WITH "I".  E.O. 3/30/77 
DEFINE IT (TEXT,BITS,ADDR,CONBTS<0>)
  <T <TEXT>,BITS,ADDR,CONBTS!CM%INV>

DEFINE ITV (TEXT,BITS,ADDR,CONBTS<0>)
  <TV <TEXT>,BITS,ADDR,CONBTS!CM%INV>

;MACRO FOR DEFINING ABBREVIATIONS IN TABLES
DEFINE TA (TEXT,ADDR)
  <IFNB <ADDR>,<%%X==ADDR>
   IFB <ADDR>,<%%X==.'TEXT>
	[CM%INV!CM%ABR!CM%FW
	 ASCIZ TEXT],,%%X>

;BEGIN TABLE. - FIRST WORD MUST BE NUMBER OF ENTRIES
DEFINE TABLE
  <	Z			;;FILLED IN BY NEXT TEND
	..T==.>			;USED BY NEXT TEND

;END A TABLE
DEFINE TEND
  <	..U==.
        RELOC ..T-1
	..U-..T,,..U-..T	;;FILL IN FIRST WORD OF TABLE
        RELOC ..U>
;AREA SIZES
	PDL==1000		;PUSHDOWN
	GTDLN==1+.CDDFE		;LEAVE ROOM FOR GTDIR INFO
EE,<	UGBUFL==1+^D50>		;722 some people love user groups
NOEE,<	UGBUFL==1+^D20>		;ALLOW UP TO 20 USER GROUP ENTRIES
	DGBUFL==UGBUFL		;SAME FOR DIRECTORY GROUPS
	SGBUFL==UGBUFL		;SAME FOR ALLOWABLE SUBDIRECTORY USER GROUPS
	SYSTAL==^D40		;SYSTAT ARG STORAGE, ENOUGH FOR 20 JOBS
				;   STORAGE FOR TELL COMMAND ALSO

	SWISIZ==8		;WORDS NEEDED TO HOLD LONGEST SWITCH
	DCSSIZ==<SWISIZ*8>/5	;ALLOW 8 SWITCHES PER EXTENSION
	NEXTS==20		;NUMBER OF EXTENSIONS TO ALLOW DEFAULTS FOR
	FFSIZ==2*^D39		;MAXIMUM CHARACTERS ALLOWED IN FILESPEC FIELD
				;   (*2 FOR QUOTING OF FUNNY CHARACTERS) 
	EXTSIZ==<FFSIZ+1>/5+1	;WORDS TO HOLD LONGEST FILESPEC FIELD PLUS NULL
				;   (*2 BECAUSE OF ^V'S) 
	FILCRS==FFSIZ+1+1+FFSIZ+1+FFSIZ+1+FFSIZ+1+6+40+1 ;NUMBER OF CHARACTERS
				;   IN LONGEST FILESPEC (40 FOR ATTRIBUTES)  
				;   FOO : < DIR > NAME . EXT . 1 
	FILWDS==FILCRS/5+1	;WORDS TO HOLD FILESPEC

	BITMLN==1000/44 + 1	;WORDS NEEDED FOR 1000-BIT BIT MASK

	QSLEN==200		;ARG STACK SIZE FOR QUEUE-CLASS COMMANDS
	PRLEN==100		;MAXIMUM LENGTH PRARG EXPECTED FROM PROGS
	NMARGS==100		;NUMBER OF MOUNT ARGS TO ALLOW
	SSSLEN==3		;BLOCK SIZE FOR "SET STRUCTURE STATUS"
	GSSLEN==6		;LENGTH OF DATA RETURNED BY MONITOR FOR "INFO
				;   STRUCTURE" 
	TAKLNX==8		;NUMBER OF NESTED COMMAND STREAMS WE CAN HANDLE
	CBUFL==^D200		;COMMAND BUFFER LENGTH. DETERMINES LENGTH OF
				;   COMMAND. 
	ATMLEN==^D200		;MAXIMUM SIZE FOR ONE FIELD
	JBLEN==16		;JFN BLOCK SIZE
	LCWBUF==^D8		;KEY WORD BUFFER
	JBUFL==100		;JFN BUFFER LENGTH: ONE MORE THAN # JFNS IN A
				;   CMD. 
CEF,<	CESAVL==^D250		;716 command-edit saved command buffer
	CETSVL==^D50		;716 command-edit working buffer
       >			;716
	DSPRSZ==P4		;713 size of DSPREG area

NEWF,<	NALTS==^D50		;MAX NUMBER OF ALERTS ALOWED (IF WE FIND THAT
				;   WE WANT TO UP THIS NUMBER A WHOLE LOT, WE
				;   SHOULD PROBABLY RECODE THE EXEC TO USE FREE
				;   SPACE TO HOLD THE ALERT TABLE RATHER THAN
				;   STATIC SPACE.)
	NMWAT==^D5		;MAX NUMBER OF USERS FOR MAIL WATCH
       >

;713 this block starts at .FKPTM in FRKTBL 
;STRUCTURE OF PROGRAM STATE BLOCK
	TTWMOD==0		;TERMINAL MODE WORD
	TTWCOC==1		;CONTROL CHAR MODES (2 WORDS)
	TTWJTI==3		;JOB TERMINAL INTERRUPT WORD
	TTWSNM==4		;SUBSYSTEM NAME
	TTWPNM==5		;PROGRAM NAME
	TTWMSK==6		;BREAK MASK SAVE (5 WORDS)
	TTWFWT==13		;FIELD WIDTH SAVE
	TTWPTI==14		;723 process terminal interrupt word
	TTDMOD==15		;717 display mode word
NTTYMD==16			;NUMBER OF WORDS
;713 format of FRKTAB in PR
;713	table organized in order of fork handles
;713	each entry:
;713	    fork state flags,,FRKTBL block address
;713    FRKTAB may be addressed via SLFTAB indexed by fork handle
;713	    ie- entry for fork handle 400002 is at SLFTAB+400002

	FRKDES==400000		;713 base of fork handle

;FORK STATE BLOCK DEFINITIONS (DIFFERENT BLOCK THAN NAME FORK BLOCK ABOVE)
	NFRKS==^D24		;MAYBE ENUF FOR NOW

	FK%KPT==1B0		;KEPT FORK
	FK%DBG==1B1		;DEBUGGER FORK
	FK%RUN==1B2		;FORK HAS BEEN RUN
	FK%DDT==1B3		;DDT PRESENT IN THIS FORK
	FK%EDF==1B4		;EXAMINE/DEPOSIT FLAG
	FK%NAM==1B5		;FORK HAS NAME
	FK%BKG==1B6		;BACKGROUND FORK
	FK%TTY==1B7		;BACKGROUND FORK BLOCKED FOR TTY
	FK%INT==1B8		;INTERRUPTED (INVOLUNTARY TERMINATION)
	FK%PRI==1B9		;PRIMARY INPUT RE-ASSIGNED
	FK%PRO==1B10		;PRIMARY OUTPUT RE-ASSIGNED
	FK%INV==1B11		;715 fork invoked by PCL
	FK%UND==1B12		;724 under debugger
				;713 don't use indirect bit (bit 13)

;OFFSETS IN FRKTBL
	.FKOWN==0		;OWNER HANDLE,,INFERIOR HANDLE
	.FKEDL==1		;EXAMINE/DEPOSIT LAST LOC
	.FKPTM==2		;PROGRAM/TTY MODES
				;713 program state block goes here
	.FKNAM==.FKPTM+NTTYMD+1	;NAME POINTER TO FREE SPACE
	DDTSA==.FKNAM+1		;DDT START ADDRESS
	CODSEC==DDTSA+1		;SECTION CODE LOADED INTO
.FKSZE==CODSEC+1		;ENTRY SIZE

;FRKNMS is a TBLUK table, with each entry looking like this:
;
;		saddr,,faddr
;
;Saddr is an address in free space holding a fork name:
;
;		saddr/	ASCIZ -name-
;
;Faddr is the address of the fork block for that name, also in free space,
;with the following offsets defined:

DEFSTR (FKFLAG,0,35,36)		;FULL WORD OF FLAGS. THE FOLLOWING ARE DEFINED:

	FN%NAT==1B0		;THIS NAME HAS ATTRIBUTES (SO DON'T FLUSH NAME)
	FN%KEP==1B1		;KEEP FORK HAVING THIS NAME
	FN%EPH==1B2		;FORK BY THIS NAME IS EPHEMERAL
	FN%NEF==1B3		;DON'T ACKNOWLEDGE "SET FILE EPHEMERAL"
	FN%FOP==1B4		;TRAP FILE-OPENINGS

DEFSTR (FKHAN,1,35,36)		;0 OR FORK HANDLE OF REAL FORK HAVING THIS NAME
DEFSTR (FKRADD,2,35,36)		;WHERE TO GO TO RESTART KEPT FORK OF THIS NAME
DEFSTR (FKRMES,3,35,36)		;POINTER TO MESSAGE TO TYPE WHEN RESTARTING
DEFSTR (FKRESP,4,35,36)		;POINTER TO TEXT SAYING HOW TO RESTART

FKTLEN==5			;NUMBER OF DEFINED WORDS IN FORK BLOCK

;SPECIAL RFSTS CODE (UNDEFINED IN MONSYM)
	.RFTTY==10		;FORK BLOCKED FOR TTY I/O

;SPECIAL FDB CODES IN FB%FCF (NOT YET DEFINED IN MONSYM)
	.FBEPH==4		;EPHEMERAL

;713 special input/output designators
	.SIGIO==677777		;713 signal JFN
;BITS...

;BITS IN LEFT HALF OF VALUE WORD IN KEYWORD TABLES

;PRIVLEDGES
	WHLU==1B13		;DON'T RECOGNIZE KEYWORD IF USER LACKS WHEEL
	OPRU==1B12		; " " " " " " " OPERATOR PRIVILEGE
	ERRU==1B11		; " " " " " " " CONFIDENTIAL INFORMATION ACCESS

;THE REST OF THE BITS ARE NOT TESTED BY %KEYW.
;THIS NEXT GROUP ARE USED IN THE MAIN COMMAND TABLES, AND ARE MOVED TO AC
;   "KWV1" AFTER FIRST KEYWORD IS INPUT, AND STAY IN KWV1 THROUGHOUT COMMAND
;   DECODING. 
;SEVERAL ALSO USED IN SUBCOMMAND TABLES
;SUBROUTINE "CONF" LOOKS AT SEVERAL OF THESE.
	ONEWRD==1B0		;ONE WORD COMMAND: CONFIRM BEFORE DISPATCH,
				;   "EOLOK" BIT IMPLIED
;720	NOLG==1B4		;THIS COMMAND LEGAL EVEN IF NOT LOGGED IN
				;   ALSO B5 USED IN "CREATE" SUBCOMMAND TABLE
	EASB==1B6		;THIS COMMAND EXAMINES, ALTERS, OR EXECUTES
				;   SUBSIDIARY FORK, AND IS THUS ILLEGAL IF A
				;   PROPRIETARY PROGRAM IS IN THAT FORK.

;THE FOLLOWING ARE SOME OF THE OTHER BITS USED IN VARIOUS OTHER TABLES.
;DO NOT REDEFINE THESE BITS OR THOSE IN GROUP INTERPRETED BY
;   "%KEYW" IN SUCH A WAY AS TO PRODUCE A CONFLICT!
;B5 ALSO USED IN "CREATE" SUBCOMMAND TABLE (5/14/70).

;FLAG BITS IN AC Z LEFT HALF
;THESE FLAGS ARE CLEARED BEFORE EACH COMMAND IS DECODED
	F6==400000		;USED BY DIRNAM, MEANS "RETURN IF AMBIGUOUS"
	F1==200000		;FLAG AVAILABLE FOR LOCAL USE IN SUBRS AND
				;   UUO'S 
	F2==100000		;ANOTHER FLAG AVAILABLE FOR USE IN COMMANDS
	F3==40000		;ANOTHER FLAG AVAILABLE FOR USE IN COMMANDS
	F4==20000		;FLAG AVAILABLE FOR USE IN COMMANDS,
				;   NOT CLOBBERED BY UUO'S OR SUBROUTINES.
	GROUPF==10000		;ON IF INFG ETC INPUT A GROUP OF INPUT FILE
				;   NAMES (A NAME WITH AN *, OR MORE THAN ONE
				;   NAME)  
	F5==4000		;USED BY DIRNAM/USRNAM ROUTINES TO ALLOW STARS
	DTACHF==2000		;INDICATES "DETACH" COMMAND.
				;   DISTINGUISHES IT FROM "REDIRECT" AND OTHER
				;   COMMANDS DURING EXECUTION.
	LOGOFF==1000		;SET DURING LOGOUT MESSAGE AND LOGGING OUT
				;   PROCESS, TELLS ERRORS AND ^C TO SAY "NOT
				;   LOGGED OUT" 
	CTLCF2==400		;SET BY 2ND ^C TO SAY CLEAR BUFFER AFTER
				;   DEBREAK 
	CTLCF1==200		;SET BY ^C TO SAY CLEAR BUFFER ON ANOTHER ^C
	RUNF==100		;PROG RUNNING (OR AT LEAST ITS TTY MODES IN
				;   EFFECT) 
				;   ALSO TELLS ^C TO FREEZE THE WORLD (5/20/70)
	NECHOF==40,,0		;ECHOING OFF (PASSWORD INPUT). TESTED IN %NOI.

;FLAG BITS IN AC Z RIGHT HALF ARE ALSO AVAILABLE TO COMMAND ROUTINES.
	IGINV==1		;ALLOW GTJFN TO FIND INVISIBLE FILES

;PCL Bits in PCL flag word
	PCFTRC==1B0		;TRACE GENERATED COMMANDS
	PCFQDC==1B1		;DON'T CONFIRM DECLARATIONS AS A GENERAL POLICY
	PCFCFM==1B2		;CONFIRM THE CURRENT DECLARATIONS
;DEFINITIONS FOR NEW COMMAND SCANNER
	LFSPC==^D26		;LENGTH OF FILE SPEC BLOCK
	TBLKSZ==CBUFL		;SIZE OF COMMAND BLOCK

;COMND - FUNCTION CODES
	CMKEY==<.CMKEY>B8	;KEYWORD
	CMNUM==<.CMNUM>B8	;NUMBER
	CMNOI==<.CMNOI>B8	;NOISE WORD
	CMSWI==<.CMSWI>B8	;SWITCH
	CMIFI==<.CMIFI>B8	;INPUT FILE
	CMOFI==<.CMOFI>B8	;OUTPUT FILE
	CMFIL==<.CMFIL>B8	;GENERAL FILESPEC
	CMFLD==<.CMFLD>B8	;ARBITRARY FIELD
	CMCFM==<.CMCFM>B8	;CONFIRM
	CMDIR==<.CMDIR>B8	;DIRECTORY NAME
	CMUSR==<.CMUSR>B8	;USER NAME
	CMCMA==<.CMCMA>B8	;COMMA
	CMINI==<.CMINI>B8	;INIT LINE
	CMFLT==<.CMFLT>B8	;FLOATING POINT NUMBER
	CMDEV==<.CMDEV>B8	;DEVICE NAME
	CMTXT==<.CMTXT>B8	;TEXT TO ACTION CHAR
	CMTAD==<.CMTAD>B8	;TIME AND DATE
	CMQST==<.CMQST>B8	;QUOTED STRING
	CMUQS==<.CMUQS>B8	;UNQUOTED STRING
	CMTOK==<.CMTOK>B8	;TOKEN
	CMNUX==<.CMNUX>B8	;NUMBER DELIMITED BY NON-DIGIT
	CMACT==<.CMACT>B8	;ACCOUNT
	CMNOD==<.CMNOD>B8	;NODE

;COMND JSYS OFFSETS INTO FUNCTION BLOCK AND STATE BLOCK

DEFINE CMFLG <.CMFLG+SBLOCK>	;USER FLAGS,,REPARSE DISPATCH ADDRESS
DEFINE CMIOJ <.CMIOJ+SBLOCK>	;INJFN,,OUTJFN
DEFINE CMRTY <.CMRTY+SBLOCK>	;^R BUFFER POINTER
DEFINE CMBFP <.CMBFP+SBLOCK>	;PTR TO TOP OF BUFFER
DEFINE CMPTR <.CMPTR+SBLOCK>	;PTR TO NEXT INPUT TO BE PARSED
DEFINE CMCNT <.CMCNT+SBLOCK>	;COUNT OF SPACE LEFT IN BUFFER AFTER PTR
DEFINE CMINC <.CMINC+SBLOCK>	;COUNT OF CHARACTERS FOLLOWING PTR
DEFINE CMABP <.CMABP+SBLOCK>	;ATOM BUFFER POINTER
DEFINE CMABC <.CMABC+SBLOCK>	;ATOM BUFFER SIZE
DEFINE CMGJB <.CMGJB+SBLOCK>	;ADR OF GTJFN ARG BLOCK
DEFINE CMFNP <.CMFNP+FBLOCK>	;FUNCTION AND POINTER
DEFINE CMDAT <.CMDAT+FBLOCK>	;DATA FOR FUNCTION
DEFINE CMHLP <.CMHLP+FBLOCK>	;HELP TEXT POINTER
DEFINE CMDEF <.CMDEF+FBLOCK>	;DEFAULT STRING POINTER
DEFINE CMBRK <.CMBRK+FBLOCK>	;BREAK MASK

	FBLLEN==10		;MAXIMUM SIZE NEEDED FOR COMND FUNCTION BLOCK

	SBLKLN==20		;SIZE OF COMMAND STATE BLOCK

	GSSLEN==6		;SIZE OF BLOCK FOR RECEIVING STRUCTURE STATUS
	SSSLEN==3		;SIZE OF BLOCK FOR SETTING STRUCTURE STATUS

;ORGANIZATION OF QUEUED MOUNT BLOCK
	MLNK==0			;POINTER TO NEXT BLOCK OR 0 IF THIS IS LAST
				;   BLOCK 
	MQID==1			;QUASAR ID FOR THIS REQUEST
	MLOG==2			;POINTER TO LOGICAL NAME (IN PERMANENT FREE
				;   SPACE) 
	MLEN==3			;SIZE OF BLOCK

	STRSIZ==CBUFL		;STRING STORAGE SPACE (MUST BE AS LONG AS
				;   COMMAND BUFFER BECAUSE USER TYPEIN IS
				;   BUFFERED WITHOUT LENGTH CHECK)  
;PAGE BUFFERS
;
;EXAMPLE:	DEFPAG (FOO,FOOPN,8)
;		ADRNAM==FOO	CALL THE ADDRESS FOO, EG. FOO==600000
;		PNNAM==FOOPN	CALL THE PAGE NUMBER FOOPN, EG. FOOPN==600
;		NPAGES==8	ALLOCATE 8 PAGES, EG. BLOCK 8000

DEFINE DEFPAG (ADRNAM,PNNAM,NPAGES)
  <	ADRNAM==:PPTR		;;PCL ALLOCATE THIS PAGE AT CURRENT PAGE PTR
	PNNAM==PPTR_-9		;;DEFINE PAGE NUMBER
	PPTR==PPTR+NPAGES*1000	;;STEP TO NEXT PAGE SLOT
	IFG PPTR-DDTFST,<PRINTX ?Exec page buffers overlapping DDT
>>

	PPTR==400000		;FIRST ADDRESS TO USE FOR PAGE BUFFERS
;713 recompile everything that uses page buffers after changing this

;PCL Programmable Command Language areas
	PCTXLN==:40		;TEXT AREA LENGTH
DEFPAG (PCTEXT,PCTXTP,PCTXLN)	;TEXT AREA
	PCGBLN==:10		;GLOBAL SYMBOL TABLE LENGTH
DEFPAG (PCGBST,PCGBSP,PCGBLN)	;GLOBAL SYMBOL TABLE
	PCSTKL==:10		;EXECUTION STACK LENGTH
DEFPAG (PCSTAK,PCSTKP,PCSTKL)	;EXECUTION STACK
	PCSTRL==:40		;STRING SPACE
DEFPAG (PCSTRS,PCSTRP,PCSTRL)

	IPCMAX==4		;NUMBER OF IPCF MESSAGES TO BUFFER
DEFPAG (IPCBUF,IPCBPN,IPCMAX)	;IPCF BUFFERS

STAT,<DEFPAG (STBUF,STBPN,1)>	;STATISTICS BUFFER

	NSMPGS==10		;NUMBER OF PAGES FOR SYMBOL WINDOW
	XFREPZ==10+NSMPGS	;NUMBER OF PAGES FOR PERMANENT FREE SPACE
	XFRESZ==XFREPZ_9	;WORDS OF PERMANENT FREE SPACE
DEFPAG (XFREE,XFREPN,XFREPZ)	;PERMANENT FREE SPACE
	FREPZ==70		;NUMBER OF PAGES OF FREE SPACE (RELEASED AFTER
				;   EACH COMMAND) 
	FRESIZ==FREPZ_9		;SIZE OF FREE SPACE
DEFPAG (FREE,FREEPN,FREPZ)	;COMMAND USAGE FREE SPACE

DEFPAG (BUF0,BUF0PN,1)		;ASSUMED TO FOLLOW FREE, SEE UNMAP
	IPCFP==BUF0		;PAGE FOR IPCF SEND/RCV
	IPCPN==BUF0PN		;713 define this too
	RLIST==BUF0		;USE BUFFER PAGE TO STORE LIST OF NUMBERS

DEFPAG (BUF1,BUF1PN,1)		;"COPY" COMMAND SOURCE PAGE
;ALSO BUF1 AND FOLLOWING PAGES ARE USED BY "DIRECTORY"

DEFPAG (BUF2,BUF2PN,1)		;"COPY" COMMAND DESTINATION PAGE
;PAGES USED BY "COPY" COMMAND FOR PREFAULTING IN DISK PAGES.
;THESE ARE ONLY FOR COPYING DISK TO NON-DISK
	NPRE==8			;NUMBER OF PAGES TO PREFAULT DURING "COPY"
				;   COMMAND 
DEFPAG (BUFPRE,BUFPPN,NPRE)	;PREFAULT BUFFER
	BUF3==BUFPRE

;END OF BUFFERS USED FOR DIR, ETC.

DEFPAG (SCRATC,SCRPAG,2)	;725 scratch pages used for:
				;725  last login tty (CERBERUS.PMAP/LOGOUT.BIN)
				;725	page

	BUFL=<DDTFST-1000>&777000 ;PAGE BEFORE DDT
	BUFLPN==BUFL_-9		;713 BUFL's page number 
	BUFEND==BUFL+777	;LAST WORD OF BUFFER SPACE
;CRJOB/PRARG BLOCK DEFINITION:
	.CJPLN==0		;LENGTH OF PRARG BLOCK
	.CJPHD==1		;HEADER WORD (SEE BELOW)
	.CJPLP==2		;POINTER TO FLAG WORD
	.CJPKP==3		;POINTER TO FORK HANDLE,,SFRKV OFFSET
	
;CURRENT CRJOB/PRARG BLOCK IS AS FOLLOWS:
;	.CJPLN/ 3		;3 ARGUMENTS
;	.CJPHD/ 1B0!3B6!2B12!CR%PRA ;IDENT FOR EXEC (PRARG IS FROM CRJOB)
;	.CJPLP/ 1B0!4		;POINTER TO FLAGS
;	.CJPKP/ 1B0!5		;POINTER TO FORK HANDLE,,SFRKV OFFSET
;	4/	Flags
;	    B0 - Suppress the EXEC herald
;	    B1 - There is a fork handle pointed at by arg ptr 3
;	    B2 - Use the SFRKV offset to start fork
;	    B3 - Type out the normal LOGIN messages; i.e. system message of the
;		day, Job X on TTYn..., You have new mail, etc. 

;726 PRARG to EXEC on fork termination
	.PRCCL==0		;726 redo last CCL command
	.PRKEP==1		;726 keep fork, and halt it
	.PRKIL==2		;726 kill fork
	.PRBKG==3		;726 continue fork in background

;XGLOBS FOLLOWS THIS