Trailing-Edge
-
PDP-10 Archives
-
BB-D348F-SM
-
exec/execde.mac
There are 47 other files named execde.mac in the archive. Click here to see a list.
;<4.EXEC>EXECDE.MAC.84, 3-Jan-80 16:06:57, EDIT BY R.ACE
;UPDATE COPYRIGHT DATE
;<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) 1976,1977,1978,1979,1980 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
UNIVERSAL XDEF
SEARCH 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,QSRMAC,GLXMAC,ORNMAC
SALL
GGLOBS>
;MACRO TO CONTROL WHETHER "EXTENDED ARCHIVING" FEATURES SHOULD BE
;INCLUDED
IFNDEF XARCSW,<XARCSW==0> ;GAIL AND PETER SAY NO FANCY ARCHIVE FEATURES FOR R4
DEFINE XARC<IFN XARCSW,>
;Assembly switch for extended EXEC features.
IFNDEF XTNDSW,<XTNDSW==0>
DEFINE XTND<IFN XTNDSW>
DEFINE NOXTND<IFE XTNDSW>
;Assembly seitch for MIC feature
IFNDEF MICSW,<MICSW==0>
DEFINE MIC<IFN MICSW>
DEFINE NOMIC<IFE MICSW>
;HERE IS AN ASSEMBLY SWITCH FOR SHIP/NON-SHIP FEATURES
IFNDEF SHIPSW,<SHIPSW==-1>
DEFINE SHIP<IFN SHIPSW>
DEFINE NOSHIP<IFE SHIPSW>
;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\>
;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
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
;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 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
.FILEN==2 ;NUMBER OF WORDS NEEDED NOT INCLUDING TEXT
;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
NOXTND,<
;COMPUTE AMOUNT BETWEEN MAIL CHECKS
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!!!!!!
XTND,<
IITCHN==32 ; CHANNEL FOR MAIL-WATCH & ALERTS
>
ADVCHN==30 ;^E INTERRUPT DURING ADVISE
IPCCHN==31 ;COMMUNICATION CHANNEL, CATCHES ALL IPCF MESSAGES
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.
AUTOL1==^D600
AUTOL2==^D300
AUTOL3==^D15
;****************** 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
;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)
;DON'T USE 16, STKVAR CLOBBERS IT
P=17 ;STACK
;STANDARD DEFINITIONS
OPDEF CALL [PUSHJ P,]
OPDEF RET [POPJ P,]
OPDEF CALLRET [JRST]
;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<
saveac <a,b,c,d>>
;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 XMAIN.MAC.
; UUO ROUTINES ARE IN EXECSU.MAC.
;OTHER UUO'S ARE DEFINED WITH "FIELDS" MACRO, DEFINED SOMEWHERE ELSE
;IN THIS FILE
OPDEF UERR[20B12] ;ERROR MESSAGE
OPDEF UTYPE[21B12] ;TYPE MESSAGE
OPDEF KEYWD[22B12] ;KEYWORD INPUT AND LOOKUP
OPDEF UNOI[23B12] ;NOISE WORD INPUT/OUTPUT
OPDEF UPROMPT[24B12] ;PROMPT FOR NEW LINE
OPDEF ULERRO[25B12] ;TYPE ERROR MESSAGE, BUT RETURN TO CALLER
;26 available! e.o. 7/6/77
; AC "TRM" CONTAINS ALT MODE
OPDEF U$ERR[27B12] ;ERROR MESSAGE WITHOUT CR FIRST
OPDEF UETYPE[30B12] ;TYPE MESSAGE AND INTERPRET % CODES
OPDEF GTB[31B12] ;CONVENIENT INTERFACE TO THE GETAB JSYS
OPDEF PRINT[32B12] ;PRINT ASCII CHARACTER FROM EFF ADDR
OPDEF UTRAP[33B12] ;ERROR PSI MESSAGE
OPDEF U.$ERR[34B12] ;ERROR THAT DOESN'T CLEAR BUFFERS (^X)
OPDEF USUBCO[35B12] ;INPUT AND DISPATCH ON SUBCOMMANDS
%%NUUO==36 ;FIRST UUO VALUE TO BE 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.
>
ULIST
; THE FOLLOWING SIMULATE UNIMPLEMENTED JSYS'S
;HYPOTHETICAL FUTURE JSYS TO STOP NON-INTERACTIVE JOB
DEFINE BTCHER <>
;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==500 ;PUSHDOWN
GTDLN==1+.CDDFE ;LEAVE ROOM FOR GTDIR INFO
UGBUFL==^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
; FOO : < DIR > NAME . EXT . 1 (40 FOR RANDOM ATTRIBUTES)
FILWDS==FILCRS/5+1 ;WORDS TO HOLD FILESPEC
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"
IOLEN==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.
XTND,<
NALTS==^D20 ; MAX NUMBER OF ALERTS ALOWED
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
XTND,<
;FORK STATE BLOCK DEFINITIONS
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%4==1B4 ; UNKNOWN
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
;OFFSETS IN FRKTBL
.FKOWN==0 ; OWNER HANDLE,,
.FKPTM==2 ; PROGRAM/TTY MODES
.FKNAM==.FKPTM+NTTYMD+1 ; NAME (4 WDS)
.FKSZE==.FKNAM+4 ; 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)
.FBKEP==3 ; KEEP THIS PROGRAM
.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.
;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
FBLLEN==10 ;MAXIMUM SIZE NEEDED FOR COMND FUNCTION 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 ;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
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
XFREPZ==10 ;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