Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_1_19910112
-
6-exec/execde.mac
There are 47 other files named execde.mac in the archive. Click here to see a list.
;[SRI-NIC]SRC:<6-EXEC>EXECDE.MAC.13, 9-May-85 23:38:14, Edit by HSS
; [NIC1034] Add symbols for calculate command
;[SRI-NIC]SRC:<6-EXEC>EXECDE.MAC.12, 9-May-85 15:19:17, Edit by HSS
; [NIC1033] Add symbols for autokeep attribute
;[SRI-NIC]SRC:<6-EXEC>EXECDE.MAC.11, 18-Apr-85 16:07:03, Edit by HSS
; [NIC1021] Add symbol for rename across structures.
;[SRI-NIC]PS:<HSS.EXEC>EXECDE.MAC.10, 17-Apr-85 12:11:04, Edit by HSS
; [NIC1017] Add symbol for NYU history code
;[SRI-NIC]PS:<HSS.EXEC>EXECDE.MAC.9, 11-Apr-85 13:59:02, Edit by HSS
; [NIC1010] Increase auto-logout time to 15 minutes
;[SRI-NIC]PS:<HSS.EXEC>EXECDE.MAC.8, 4-Apr-85 18:36:50, Edit by HSS
; [NIC1002] Add symbol for IDDT fork-under-debugger detection
;[SRI-NIC]PS:<HSS.EXEC>EXECDE.MAC.7, 3-Apr-85 16:43:43, Edit by HSS
; [NIC1000] Add symbols for nic-query login idle check
;<6-EXEC>EXECDE.MAC.6, 6-Sep-84 16:21:25, Edit by SATZ
; Add symbol for PCL
;<6-EXEC>EXECDE.MAC.5, 15-Aug-84 21:59:06, Edit by WHP4
; Adjust value of MAXJFN to something more reasonable
;<6-EXEC>EXECDE.MAC.4, 15-Aug-84 20:18:29, Edit by LOUGHEED
; Flush SDDTFS symbol
;<6-EXEC>EXECDE.MAC.3, 9-Aug-84 00:30:00, Edit by LOUGHEED
; Flush SET EXTRA flags
;SCORE:<MERGED-6-EXEC>EXECDE.MAC.2, 11-Jul-84 10:38:13, Edit by JPBION
;LOTS changes:
; Extra CTRL/T information flags
;Stanford changes:
; Add SDDTFS for first location used by SDDT
; Expand UGBUFL
; Increase CBUFL, ATMLEN
; Define FN%KNC
;
; UPD ID= 396, SNARK:<6.EXEC>EXECDE.MAC.20, 20-Mar-84 15:26:45 by MCCOLLUM
;TCO 6.2004 - Add FN%ATT to fork name block. Fork has attributes, but don't
; preserve them when reset.
; UPD ID= 337, SNARK:<6.EXEC>EXECDE.MAC.19, 20-Nov-83 19:42:57 by PRATT
;TCO 6.1870 - Get rid of code which is under NONEWF. Remove NEWF's.
; UPD ID= 269, SNARK:<6.EXEC>EXECDE.MAC.18, 20-Apr-83 06:23:15 by FLEMMING
;TCO 6.1618 - Add support for TOPS10 PPNs
; UPD ID= 240, SNARK:<6.EXEC>EXECDE.MAC.17, 15-Jan-83 19:24:32 by CHALL
;TCO 6.1464 - UPDATE COPYRIGHT NOTICE
; UPD ID= 167, SNARK:<6.EXEC>EXECDE.MAC.15, 30-Sep-82 16:33:41 by MCINTEE
;TCO 6.1270 - Space for remote alias subcommand, node names in filespecs
; UPD ID= 158, SNARK:<6.EXEC>EXECDE.MAC.14, 15-Sep-82 13:41:27 by TSANG
;TCO 6.1254 FIX THE BUFFER SIZE
; UPD ID= 117, SNARK:<6.EXEC>EXECDE.MAC.13, 20-Apr-82 07:54:13 by CHALL
;TCO 6.1092 Move MICSW to EXECCA
; UPD ID= 91, SNARK:<6.EXEC>EXECDE.MAC.11, 8-Jan-82 15:51:05 by CHALL
;TCO 6.1052 - UPDATE COPYRIGHT NOTICE AND DELETE PRE-V4.1 EDIT HISTORY
; UPD ID= 82, SNARK:<6.EXEC>EXECDE.MAC.10, 20-Dec-81 18:48:42 by CHALL
;TCO 6.1050 DEFINE GTB MACRO (REPLACING GTB UUO)
; UPD ID= 60, SNARK:<6.EXEC>EXECDE.MAC.9, 30-Sep-81 09:55:17 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= 18, SNARK:<6.EXEC>EXECDE.MAC.8, 17-Aug-81 10:11:18 by CHALL
;TCO 5.1454 CHANGE NAME FROM XDEF TO EXECDE
; UPD ID= 13, SNARK:<6.EXEC>EXECDE.MAC.7, 20-Jul-81 11:19:19 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= 2097, SNARK:<6.EXEC>EXECDE.MAC.4, 28-May-81 09:49:49 by OSMAN
;Increase ATMLEN to 500
; UPD ID= 2031, SNARK:<6.EXEC>EXECDE.MAC.3, 19-May-81 10:46:22 by OSMAN
;Increase CBUFL to 1000
; UPD ID= 1997, SNARK:<6.EXEC>EXECDE.MAC.2, 14-May-81 15:23:34 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
;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,1983 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.
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 CALL,<PUSHJ P,0>
GOPDEF RET,<POPJ P,0>
DEFINE RETSKP <JRST RSKP>
GSOPDEF CALLRET,<JRST>
;HANDY GETAB CALL (TABLE IS PART OF CALL; INDEX IS IN RH OF AC D)
DEFINE GTB (TABLE),<
CALL [ MOVEI A,TABLE ;;SET UP THE TABLE INDEX
CALLRET %GTB] ;;DO THE GETAB AND RETURN (+1 ALWAYS)
>
;MACRO TO CONTROL WHETHER "EXTENDED ARCHIVING" FEATURES SHOULD BE
;INCLUDED
IFNDEF XARCSW,<XARCSW==1>
DEFINE XARC<IFN XARCSW,>
;ASSEMBLY SWITCH FOR EXTENDED EXEC FEATURES.
IFNDEF XTNDSW,<XTNDSW==:0>
DEFINE XTND<IFN XTNDSW>
DEFINE NOXTND<IFE XTNDSW>
;ASSEMBLY SWITCH FOR VARIOUS "NEW" FEATURES UNDER TEST
IFNDEF NEWFSW,<NEWFSW==:1>
DEFINE NEWF<IFN NEWFSW>
DEFINE NONEWF<IFE NEWFSW>
;ASSEMBLY SWITCH FOR SED CODE IN EXECED
IFNDEF SEDSW,<SEDSW==:1>
DEFINE SED<IFN SEDSW>
DEFINE NOSED<IFE SEDSW>
;ASSEMBLY SWITCH FOR EMACS CODE IN EXECED
IFNDEF EMCSSW,<EMCSSW==:0>
DEFINE EMCS<IFN EMCSSW>
DEFINE NOEMCS<IFE EMCSSW>
;TEMPORARY CONDITIONAL FOR STATISTICS GATHERING
IFNDEF STATSW,<STATSW==:0>
DEFINE STAT<IFN STATSW>
DEFINE NOSTAT<IFE STATSW>
;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
LV.ILI==1 ;ILL INST IS HIGH (PANIC)
LV.POV==1 ;PUSHDOWN OVERFLOW IS HIGH
LV.DAT==1 ;DATA ERROR IS HIGH (PANIC)
LV.EOF==3 ;END OF FILE IS LOW
LV.ESC==2 ;ADVISE ESCAPE CHAR IS MEDIUM
LV.QTA==1 ;QUOTA EXCEEDED IS HIGH (PANIC)
LV.IPC==2 ;IPCF INTERRUPT IS SAME AS ^C
LV.PCL==3 ;PCL PTY I/O IS LOW
LV.TRP==LV.IPC ;JSYS/UUO TRAP (SAME AS ^C LEVEL SO THAT
;TRPPSI ROUTINE DOESN'T CONTINUE FORK AFTER
;CCPSI STOPS IT!!)
IFN NICSW,< ;[NIC1034]
LV.OVF==2 ;[NIC1034] LEVEL FOR ARITHMETIC OVERFLOW
>;IFN NICSW
IFN CTLLSW,<
LV.CLR==3
>
CTRLC==3 ;SUPER-PANIC PSI CHARACTER
;AND "TERMINAL CODE" FOR SAME
CTRLO==^D15 ;TERMINAL CODE FOR ^O TO FLUSH OUTPUT
CTCODE==^D20 ;"TERMINAL CODE" FOR CHARACTER ASSIGNED TO PSI THAT
;PRINT RUNTIME (^T)
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
CTRLE==5 ;CHARACTER THAT PREFIXES PRIVILEGED COMMANDS
CTRLZ==32 ;EOF CHARACTER FOR "COPY" COMMAND WHEN TTY IS SOURCE
IFN CTLLSW,<
CTRLL=14
>
;SPECIAL BITS THAT GET PASSED IN AC2 WITH GTJFN BITS TO SPECFN ROUTINE
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
IFN NICSW,< ;[NIC1021]
CP%REN==5 ;[NIC1021] RENAME
>;IFN NICSW
;NOTE!!!!!!! DO NOT USE CHANNEL 0 IN THE EXEC EVER!!!!!!
;IF YOU DO, YOU WILL GET SPURIOUS INTERRUPTS!!!!!!
IITCHN==32 ;CHANNEL FOR MAIL-WATCH & ALERTS
ADVCHN==30 ;^E INTERRUPT DURING ADVISE
IPCCHN==31 ;COMMUNICATION CHANNEL, CATCHES ALL IPCF MESSAGES
PCLCHI==:33 ;PCL Input channel for PCL PTY
PCLCHO==:34 ;PCL Output channel for PCL PTY
TRPCHN==35 ;JSYS/UUO TRAP CHANNEL
IFN NICSW,< ;[NIC1000]
NICCHN==40 ;[NIC1000] NIC-QUERY LOGIN TIMER
.ICAOV==6 ;[NIC1034] ARITHMETIC OVERFLOW
.ICFOV==7 ;[NIC1034] FLOATING OVERFLOW CHANNEL
>;IFN NICSW
IFN CTLLSW,<
CLRCHN==36
>
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.
IFE NICSW,< ;[NIC1010] DON'T USE THESE PARAMETERS
AUTOL1==^D600
AUTOL2==^D300
>;IFE NICSW
IFN NICSW,< ;[NIC1010] USE THESE
AUTOL1==^D<30*60> ;[NIC1010]
AUTOL2==^D<25*60> ;[NIC1010]
>;IFN NICSW
AUTOL3==^D60
;****************** 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)
IFE STANSW,<
MAXJFN==1000 ;GOOD ENOUGH FOR TIME BEING
>;IFE STANSW
IFN STANSW,<
MAXJFN==150 ;BETTER YET
>;IFN STANSW
;HIGHEST PAGE NUMBER
HIGHPN==37777
;MNEMONIC AC'S
;CHANGED TO TOPS20 CONVENTIONS 6/10/74 - OLD MNEMONICS SHOWN AS COMMENTS
Z=:0
A=:1
B=:2
C=:3
D=:4
Q1=:5
Q2=:6
Q3=:7
;CBT=:7 ;DESCRIPTIVE BITS FROM "CHRTBL" FOR LAST CHARACTER
P1=:10
;CHR=:10 ;INPUT CHARACTER
P2=:11
;TRM=:11 ;LAST INPUT FIELD TERMINATOR
P3=:12
;KWV=:12 ;VALUE WORD RETURNED BY LAST KEYWORD TABLE LOOKUP
P4=:13
;KWV1=:13 ;KWV SAVED AFTER FIRST KEYWORD IN COMMAND
P5=:14
;.BFP=:14 ;COMMAND BUFFER PTR SAVED AT BEGINNING OF LAST FIELD
;DON'T USE AC15. TRVAR NEEDS IT.
;CNT=:15 ;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 is available
;0 AC "TRM" CONTAINS ALT MODE
OPDEF U$ERR[27B12] ;%$ERR ERROR MESSAGE WITHOUT CR FIRST
OPDEF UETYPE[30B12] ;%ETYPE TYPE MESSAGE AND INTERPRET % CODES
;31 is available
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 ***
DEFINE JWARN<
ERCAL RJWARN> ;PUT JWARN AFTER JSYS'S THAT SHOULDN'T
;FAIL, IN ORDER TO ISSUE A WARNING IF
;THEY DO, BUT TO OTHERWISE TRANSPARENTLY
;CONTINUE EXECUTION
;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]>
>
DEFINE ERROR (TEXT)<
UERR [ASCIZ @TEXT@]>
DEFINE LERROR (TEXT)<
ULERRO [ASCIZ @TEXT@]> ;;LIKE "ERROR", BUT RETURN TO CALLER
DEFINE $ERROR (TEXT)<
U$ERR [ASCIZ @TEXT@]>
DEFINE .$ERROR (TEXT)<
U.$ERR [ASCIZ @TEXT@]>
DEFINE TYPE (TEXT)<
UTYPE [ASCIZ TEXT]>
DEFINE PROMPT (TEXT)<
UPROMPT [ASCIZ @TEXT@]>
DEFINE ETYPE (TEXT)<
UETYPE [ASCIZ TEXT]> ;USE ^V AS QUOTING CHARACTER SINCE ANY OTHER MAY BE IN STRING!
DEFINE NOISE (TEXT)<
UNOI [ASCIZ @TEXT@]>
DEFINE CONFIRM<
CALL CONF>
DEFINE ALTYPE (TEXT)<
UALTYP [ASCIZ @TEXT@]>
DEFINE TRAP (LEVEL,TEXT)<
UTRAP [ LEVEL
ASCIZ @TEXT@]>
;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 "?".
DEFINE XX (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
<
XX SLASH ;;SLASH
XX BSLSH ;;BACKSLASH
XX DASH ;;HYPHEN
XX FILE ;;FILESPEC
XX CTRLE ;;CONTROL-E
XX DEC ;;DECIMAL NUMBER
XX CRR ;;END OF LINE
XX STAR ;;ASTERISK
XX WORD ;;WORD
XX DT ;;DATE AND/OR TIME
XX HELP ;;SET UP HELP STRING
XX OCT ;;OCTAL NUMBER
XX STR ;;STRUCTURE NAME
XX DEV ;;DEVICE
XX CMERR ;;COMMAND ERROR
XX DEF ;;SET DEFAULT STRING
XX USER ;;USER NAME
XX USERS ;;USER NAMES ALLOWING STARS
XX DIR ;;DIRECTORY NAME
XX DIRS ;;DIRECTORY NAMES ALLOWING STARS
XX COMMA ;;READ A COMMA
XX LINE ;;INPUT ENTIRE REST OF LINE
XX DOT ;;DOT, PERIOD, "." YOU GOT IT
XX TIME ;;TIME OF DAY (OR AMOUNT OF TIME)
XX COLON ;;COLON
XX DEXT ;;SET UP JFN BLOCK WITH DEFAULT EXTENSION
XX CHAR ;;PARSE ARBITRARY CHARACTER, PASSED IN AC1
XX QUOTE ;;QUOTED STRING
XX ACCT ;;ACCOUNT
XX DTIV ;;DATE AND TIME OR TIME OR DATE OR INTERVAL IN DAYS
XX FNODE ;;FAKE NODE, I.E. SYNTACTICALLY CORRECT ONLY
XX RNODE ;;REAL NODE, I.E. ONE THAT'S CURRENTLY KNOWN BY SYSTEM
XX DTP ;;DATE AND TIME IN THE PAST, LIKE "DIR SINCE MONDAY"
XX DTR ;;DATE AND TIME RELATIVE TO NOW.
XX ADDR ;;SYMBOLIC ADDRESS
>
ULIST
;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 <>
;***************************************************************************
;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 SUBRS (EXECSU).
;****************************************************************************
; 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
; 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".
; PRINT
;UUO TO OUTPUT SINGLE ASCII CHARACTER FROM EFFECTIVE ADDRESS
; 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.
; 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.
; 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:
; D: TYPE CURRENT DATE
; J: TYPE TSS JOB #
; O: TYPE CONTENTS OF INDICATED AC IN OCTAL
; SEE DISPATCH TABLE %LETS ON NEXT PAGE FOR FULL LIST.
;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)
; "#",,%NUMS ;OCTAL NUMBER AS N OR N,,N AS APPROPRIATE
; "%",,%PER ;%% JUST PRINTS A PERCENT
; "=",,%FLT ;SIX-COLUMN FLOATING POINT NUMBER, NN.MM
; "@",,%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
; "\",,%STRNG ;TYPE STRING OR CHAR IN AC
; "/",,%EXPR ;EXPRESSION IN AC
; "'",,%SIX ;PRINT CONTENTS OF AC IN SIXBIT
; "_",,%EOL ;TYPE A CRLF
; "?",,%SYSMS ;ERROR MESSAGE (CONTENTS OF AC OR LATEST)
;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,<XWD [ASCIZ @TEXT@],[..BITS!$FOO]>
IFN CONBTS,<XWD [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 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+.CDPPN ;LEAVE ROOM FOR GTDIR INFO
IFE STANSW,<
UGBUFL==^D41 ;ALLOW UP TO 41 USER GROUP ENTRIES
>;IFE STANSW
IFN STANSW,<
UGBUFL==^D50 ;ALLOW UP TO 50 USER GROUP ENTRIES
>;IFN STANSW
DGBUFL==UGBUFL ;SAME FOR DIRECTORY GROUPS
SGBUFL==UGBUFL ;SAME FOR ALLOWABLE SUBDIRECTORY USER GROUPS
RNAUFL==^D200 ;ROOM FOR REMOTE ALIASES
RNASIZ==6 ;SIZE OF REMOTE ALIAS SUBBLOCK
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
NODSIZ==6 ;NUMBER OF CHARACTERS IN NODE NAME
;MAXIMUM CHARS ALLOWED IN FILESPEC FIELD (*2 FOR QUOTING OF FUNNY CHARACTERS)
FFSIZ==2*^D39
;WORDS TO HOLD LONGEST FILESPEC FIELD PLUS NULL (*2 BECAUSE OF ^V'S)
EXTSIZ==<FFSIZ+1>/5+1
;NUMBER OF CHARACTERS IN LONGEST FILESPEC
FILCRS==NODSIZ+2+FFSIZ+1+1+FFSIZ+1+FFSIZ+1+FFSIZ+1+6+40+1
; BAR :: FOO : < DIR > NAME . EXT . 1 (40 FOR RANDOM ATTRIBUTES)
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==^D1000 ;COMMAND BUFFER LENGTH. DETERMINES LENGTH OF COMMAND.
;THIS SHOULD BE LARGE, SINCE IDIRECT FILES MAY
;(AND SHOULD!!!!) BE WELL-COMMENTED
IFN NICSW,< ;[NIC1017]
HSTMAX==^D25 ;[NIC1017] MAX. COMMAND MEMORY
>;IFN NICSW
IFE STANSW,<
ATMLEN==^D500 ;MAXIMUM SIZE FOR ONE FIELD
>;IFE STANSW
IFN STANSW,<
ATMLEN==^D1000 ;NEED BIGGER ONE AT STANFORD (MAIL COMMAND)
>;IFN STANSW
JBLEN==16 ;JFN BLOCK SIZE
LCWBUF==^D8 ;KEY WORD BUFFER
JBUFL==100 ;JFN BUFFER LENGTH: ONE MORE THAN # JFNS IN A CMD.
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
;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
NTTYMD==14 ;NUMBER OF WORDS
;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 ;NAME HAS ATTRIBUTES, BUT NEVER FLUSH THEM
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
FN%ATT==1B5 ;NAME HAS ATTRIBUTES, BUT CAN BE FLUSHED
IFN STANSW,<
FN%KNC==1B6 ;LIKE KEP BUT DON'T USE AS COMMAND
>;IFN STANSW
IFN NICSW,< ;[NIC1033]
FN%NKP==1B7 ;[NIC1033] DON'T DO KEEP FOR THIS FORK
>;IFN NICSW
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
;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
IFN STANSW,<
FK%INV==1B11 ;PCL Fork being INVOKE'd by PCL
>;IFN STANSW
IFN NICSW,<
FK%UND==1B12 ;[NIC1002] FORK IS UNDER DEBUGGER
>
;OFFSETS IN FRKTBL
.FKOWN==0 ;OWNER HANDLE,,
.FKEDL==1 ;EXAMINE/DEPOSIT LAST LOC
.FKPTM==2 ;PROGRAM/TTY MODES
.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
;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)
IFN NICSW,< ;[NIC1033]
.FBKEP==3 ;[NIC1033] AUTOKEEP
>;IFN NICSW
.FBEPH==4 ;EPHEMERAL
;BITS...
;BITS IN LEFT HALF OF VALUE WORD IN KEYWORD TABLES
WHLU==1B13 ;DON'T RECOGNIZE KEYWORD IF USER LACKS WHEEL PRIV
OPRU==1B12 ; " " " " " " " OPERATOR PRIVILEGE
ERRU==1B11 ; " " " " " " " CONFIDENTIAL INFORMATION ACCESS PRIV
;BITS IN LH VALUE WORD IN KEYWORD TABLES...
;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
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).
;BITS...
;FLAG BITS IN AC Z LEFT HALF
;THESE FLAGS ARE CLEARED BEFORE EACH COMMAND IS DECODED
IGINV==1 ;ALLOW GTJFN TO FIND INVISIBLE FILES
NECHOF==40,,0 ;ECHOING OFF (PASSWORD INPUT). TESTED IN %NOI.
RUNF==100 ;PROG RUNNING (OR AT LEAST ITS TTY MODES IN EFFECT)
;ALSO TELLS ^C TO FREEZE THE WORLD (5/20/70).
CTLCF1==200 ;SET BY ^C TO SAY CLEAR BUFFER ON ANOTHER ^C
CTLCF2==400 ;SET BY 2ND ^C TO SAY CLEAR BUFFER AFTER DEBREAK
LOGOFF==1000 ;SET DURING LOGOUT MESSAGE AND LOGGING OUT PROCESS.
;TELLS ERRORS AND ^C TO SAY "NOT LOGGED OUT".
DTACHF==2000 ;INDICATES "DETACH" COMMAND.
;DISTINGUISHES IT FROM "REDIRECT" AND OTHER COMMANDS
;DURING EXECUTION.
F5==4000 ;USED BY DIRNAM/USRNAM ROUTINES TO ALLOW STARS
GROUPF==10000 ;ON IF INFG ETC INPUT A GROUP OF INPUT FILE NAMES
;(A NAME WITH AN *, OR MORE THAN ONE NAME)
F4==20000 ;FLAG AVAILABLE FOR USE IN COMMANDS,
;NOT CLOBBERED BY UUO'S OR SUBROUTINES.
F3==40000 ;ANOTHER FLAG AVAILABLE FOR USE IN COMMANDS
F2==100000 ;ANOTHER FLAG AVAILABLE FOR USE IN COMMANDS
F1==200000 ;FLAG AVAILABLE FOR LOCAL USE IN SUBRS AND UUO'S
F6==400000 ;USED BY DIRNAM, MEANS "RETURN IF AMBIGUOUS"
;FLAG BITS IN AC Z RIGHT HALF ARE ALSO AVAILABLE TO COMMAND ROUTINES.
;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
DEFINE DEFPAG (ADRNAM,PNNAM,NPAGES)
; 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
< ADRNAM==:PPTR ;PCL ALLOCATE THIS PAGE AT CURRENT PAGE POINTER
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
;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==8 ;NUMBER OF IPCF MESSAGES TO BUFFER
DEFPAG (IPCBUF,IPCBPN,IPCMAX) ;IPCF BUFFERS
DEFPAG (IPCOVR,IPCOPN,1) ;OVERFLOW BUFFER FOR IPCF
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
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.
BUFL=<DDTFST-1000>&777000 ;PAGE BEFORE DDT
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.
;XGLOBS FOLLOWS THIS