Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_1_19910112
-
6-exec/execpr.mac
There are 46 other files named execpr.mac in the archive. Click here to see a list.
;[SRI-NIC]PS:<HSS.EXEC>EXECPR.MAC.12, 17-Apr-85 12:28:50, Edit by HSS
; [NIC1017] Add HCNT, CNUM, and HPTR for history code
;[SRI-NIC]PS:<HSS.EXEC>EXECPR.MAC.11, 16-Apr-85 17:49:25, Edit by HSS
; [NIC1016] Add OPERF for MIT attach code
;[SRI-NIC]PS:<HSS.EXEC>EXECPR.MAC.10, 5-Apr-85 16:58:49, Edit by HSS
; [NIC1003] Add LSTCON for BACK command
;[SRI-NIC]PS:<HSS.EXEC>EXECPR.MAC.9, 5-Apr-85 13:36:36, Edit by HSS
; [NIC1002] Added IDNAME and UFORK for IDDT and NO IDDT commands
;<6-EXEC>EXECPR.MAC.7, 27-Aug-84 01:42:03, Edit by SATZ
; Added in PCCIPF, PCRNFK, and PCLNAM for the latest version of PCL
;<6-EXEC>EXECPR.MAC.6, 27-Aug-84 01:03:42, Edit by SATZ
; Add storage for "TAKE ATTACH.CMD"
;<6-EXEC>EXECPR.MAC.5, 25-Aug-84 01:20:01, Edit by SATZ
; Add storage for SET LEVEL-INDICATION
;<6-EXEC>EXECPR.MAC.4, 23-Aug-84 12:22:22, Edit by ALMQUIST
; Flush .AC15
;<6-EXEC>EXECPR.MAC.3, 9-Aug-84 00:34:36, Edit by LOUGHEED
; Flush SET EXTRA storage
; Make LGXINI and FLXINI apply everywhere
;SCORE:<MERGED-6-EXEC>EXECPR.MAC.2, 11-Jul-84 15:44:09, Edit by JPBION
;SUMEX changes:
; Add LGXINI, FLXINI.
;PUP changes:
; SYSTAT variables
;LOTS changes:
; Add storage for SET EXTRA commands
;Stanford changes:
; RNFORK for SET [NO] NEW-FORK (ON RESET)
; BINTYP for /BINARY-OUTPUT switch on TYPE command.
; Add .AC15 as save of TRVAR pointer
; Move CINITF to page 0
; TRADIX holds typeout radix (SET TYPEOUT RADIX nn)
; LGOFLG tells us we are in LOGOUT.CMD in case of LOGOUT within LOGOUT.CMD
; Support MRP -- user may only run LOGIN.CMD or programs, not EXEC commands
;
; UPD ID= 358, SNARK:<6.EXEC>EXECPR.MAC.20, 16-Dec-83 11:48:55 by TSANG
;MORE FOR TCO 6.1731.
; UPD ID= 340, SNARK:<6.EXEC>EXECPR.MAC.19, 20-Nov-83 19:45:11 by PRATT
;TCO 6.1870 - Get rid of code which is under NONEWF. Remove NEWF's.
; UPD ID= 319, SNARK:<6.EXEC>EXECPR.MAC.18, 8-Nov-83 13:48:56 by PRATT
;TCO 6.1847 - FSTLGN
; UPD ID= 247, SNARK:<6.EXEC>EXECPR.MAC.17, 15-Jan-83 19:26:45 by CHALL
;TCO 6.1464 - UPDATE COPYRIGHT NOTICE
; UPD ID= 231, SNARK:<6.EXEC>EXECPR.MAC.16, 14-Jan-83 14:55:35 by TSANG
;TCO 6.1459 - Save AC .FP during subcommand processing for use in error
; recovery.
; UPD ID= 229, SNARK:<6.EXEC>EXECPR.MAC.15, 12-Jan-83 15:35:00 by WEETON
;TCO 6.1141 - Add INDQUS, used as a flag between .RUNST and %ETYPE routines.
; UPD ID= 195, SNARK:<6.EXEC>EXECPR.MAC.14, 11-Nov-82 21:50:20 by CHALL
;TCO 6.1369 ADD COPYRIGHT TO THE OBJECT CODE
; UPD ID= 185, SNARK:<6.EXEC>EXECPR.MAC.13, 21-Oct-82 00:17:28 by CHALL
;TCO 6.1323 - ADD EDTFIL FOR EDIT-CLASS COMMANDS
; UPD ID= 178, SNARK:<6.EXEC>EXECPR.MAC.12, 8-Oct-82 18:12:47 by CHALL
;TCO 6.1305 ADD EDTINF, EDTOUF, AND EDTCFM FOR EDIT-CLASS COMMANDS
; UPD ID= 141, SNARK:<6.EXEC>EXECPR.MAC.7, 4-Aug-82 17:27:37 by LEACHE
;TCO 6.1209 Fix JSYS trapping
;<6.EXEC>EXECPR.MAC.5, 9-May-82 03:09:41, Edit by ALMQUIST
;CM156 ORIFLG and PCFORK
; UPD ID= 120, SNARK:<6.EXEC>EXECPR.MAC.6, 20-Apr-82 07:54:59 by CHALL
;TCO 6.1092 MICFRK- MICPAG- MICFPG- PAGEMI- Remove MIC conditionals
; UPD ID= 98, SNARK:<6.EXEC>EXECPR.MAC.4, 8-Jan-82 15:58:29 by CHALL
;TCO 6.1052 - UPDATE COPYRIGHT NOTICE AND DELETE PRE-V4.1 EDIT HISTORY
; UPD ID= 31, SNARK:<6.EXEC>EXECPR.MAC.3, 17-Aug-81 11:25:19 by CHALL
;TCO 5.1454 CHANGE NAMES FROM PRIVS TO EXECPR AND XDEF TO EXECDE
; UPD ID= 2027, SNARK:<6.EXEC>EXECPR.MAC.2, 19-May-81 10:26:35 by PURRETTA
;<6.EXEC>EXECPR.MAC.2, 13-Apr-81 15:25:12, Edit by DK32
;Make some more things survive a Save/Exec, Add PCWAIT
;REMOVE MFRK CONDITIONALS
;<4.EXEC>EXECPR.MAC.1, 23-Dec-80 19:08:56, Edit by DK32
;Programmable Command Language
; UPD ID= 1436, SNARK:<5.EXEC>EXECPR.MAC.15, 15-Jan-81 10:51:26 by OSMAN
;Tco 5.1233 - Make FILE-OPENINGS and JSYS OPENF independent
; UPD ID= 1401, SNARK:<5.EXEC>EXECPR.MAC.14, 6-Jan-81 10:28:00 by OSMAN
;tco 5.1225 - Implement jsys trapping and file-opening trapping!
; UPD ID= 1387, SNARK:<5.EXEC>EXECPR.MAC.13, 29-Dec-80 16:13:17 by OSMAN
;More 1356 - Put SYMBF out of way of CMU's .DIF file context window
; UPD ID= 1382, SNARK:<5.EXEC>EXECPR.MAC.12, 24-Dec-80 15:07:10 by OSMAN
;tco 5.1214 - Make SBLOCK have symbolic size instead of "20"
; UPD ID= 1356, SNARK:<5.EXEC>EXECPR.MAC.11, 16-Dec-80 12:22:53 by OSMAN
;Move SYMBF to area not cleared at startup, so we can avoid trying to grab
;huge amount of freespace when starting a customized exec
; UPD ID= 1117, SNARK:<5.EXEC>EXECPR.MAC.10, 3-Oct-80 11:32:58 by OSMAN
;TCO 5.1162 - Add KEPNMS
; UPD ID= 1044, SNARK:<5.EXEC>EXECPR.MAC.9, 25-Sep-80 14:17:27 by OSMAN
;TCO 5.1156 - Add FRKDEF
; UPD ID= 915, SNARK:<5.EXEC>EXECPR.MAC.8, 19-Aug-80 14:00:46 by HESS
; Fix Examine/Deposit commands for multi-forking
; UPD ID= 858, SNARK:<5.EXEC>EXECPR.MAC.7, 10-Aug-80 15:20:21 by OSMAN
;tco 5.1129 - Add symbolic address and expression support
; UPD ID= 743, SNARK:<5.EXEC>EXECPR.MAC.6, 8-Jul-80 10:46:54 by OSMAN
;<5.EXEC>EXECPR.MAC.5, 8-Jul-80 08:54:01, EDIT BY OSMAN
;tco 5.1097 - Make "start" work to retry failing save after load
;<5.EXEC>EXECPR.MAC.4, 30-May-80 17:02:53, EDIT BY MURPHY
;PUT NEW ALERT AND MAIL WATCH UNDER NEWF
; UPD ID= 537, SNARK:<5.EXEC>EXECPR.MAC.3, 20-May-80 15:46:19 by MURPHY
;CHANGE SOME XTND TO NEWF OR MFRK
; UPD ID= 460, SNARK:<4.1.EXEC>EXECPR.MAC.6, 22-Apr-80 16:42:41 by OSMAN
;tco 4.1.1146 - Make CTRL/Q during advice work.
;Add SAVPGM
;<4.1.EXEC>EXECPR.MAC.2, 20-Nov-79 09:32:37, EDIT BY OSMAN
;tco 4.1.1023 - REMOVE ECHOF, PECHOF, OKERR. ADD TAKDEF, TAKBTS
;REMOVE SAVFLG AND SAVPTR
DEFINE CPYRYT,<
ASCIZ /
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.
/>
;TOPS20 'EXECUTIVE' COMMAND LANGUAGE - IMPURE STORAGE
SEARCH EXECDE,MONSYM,QSRMAC
TTITLE EXECPR
SALL
LOC 140
;NOTE: THIS MODULE SHOULD ONLY ASSIGN GLOBAL STORAGE. THAT IS, ALL STORAGE
;FOR INDIVIDUAL COMMANDS SHOULD BE ALLOCATED AS LOCAL STORAGE WITHIN THE
;COMMAND'S CODE ITSELF, SUCH AS WITH TRVAR OR STKVAR
;ASSEMBLE THE COPYRIGHT NOTICE SO THAT IT WILL BE SEEN IF
;ANYONE DUMPS THE EXE FILE OR MEMORY
;THE COPYRIGHT MUST BE THE FIRST CODE LOADED
CPYRYT
;COMMAND BLOCKS FOR INPUT, CREATE, OUTPUT, AND CONFIRMATION, FOR EXECED
;(A SWITCH BLOCK MAY BE ADDED TO THE END OF EACH ONE)
;IF THESE BLOCKS ARE MODIFIED, CODE MUST BE CHANGED IN EXECED.MAC
EDTINF::FLDDB. .CMCFM,,,,,EDINF1
EDINF1: FLDDB. .CMIFI
EDTOUF::FLDDB. .CMCFM,,,,,EDOUF1
EDOUF1: FLDDB. .CMOFI
EDTFIL::FLDDB. .CMCFM,,,,,EDFIL1
EDFIL1: FLDDB. .CMFIL
EDTCFM::FLDDB. .CMCFM
;STORAGE FOR EXEC COMMAND INTERPRETER
IFN STANSW,<
CINITF::Z ;NON-ZERO AFTER STARTUP INITIALIZATION COMPLETE
>;IFN STANSW
SBLOCK::BLOCK SBLKLN ;COMND JSYS STATE BLOCK
FBLOCK::BLOCK FBLLEN ;COMND JSYS FUNCTION BLOCK
CBUF:: BLOCK CBUFL ;BUFFER FOR ENTIRE COMMAND TEXT,
;INCLUDING STUFF ECHOED BY ALT MODE.
CBUFE:: Z ;END OF CBUF
ATMBUF::BLOCK ATMLEN ;BUFFER FOR STORING LAST FIELD
CBLOCK::BLOCK 3 ;USED TO SAVE AND RESTORE ATOM-RELATED
;POINTERS IN SBLOCK
TAKCUR::Z ;CURRENT SETTINGS
TAKLEN::Z ;NUMBER OF INPUT JFNS IN PROGRESS
TAKDEF::Z ;DEFAULTS FOR TAKE
TAKBTS::BLOCK TAKLNX ;CONTROL BITS FOR THIS LEVEL OF TAKE
TAKJFN::BLOCK TAKLNX ;INPUT,,OUTPUT
CIJFN:: Z ;COMMAND (PRIMARY) INPUT JFN
COJFN:: Z ;PRIMARY OUTPUT JFN
JBUFP:: Z ;PUSHDOWN-TYPE POINTER INTO JFN LIST
JBUF:: BLOCK JBUFL ;BUFFER (STACK) FOR JFN'S. JFN'S OF ALL FILES
;MENTIONED IN A COMMAND MUST BE HERE SO ERROR ROUTINES
;CAN CLOSE AND RELEASE THEM.
IFN PUPSW,<
;PUP VARIABLES FOR SYSTAT
PUPFLG::BLOCK 1 ;NON-ZERO MEANS PUP PRESENT
PUPLOW::BLOCK 1 ;LOWEST PUP NVT #
PUPHGH::BLOCK 1 ;HIGHEST PUP NVT #
PUPBUF::BLOCK 1 ;ADDRESS OF PUP FREE STORAGE
$NVTPUP::BLOCK 1 ;NVTPUP TABLE INDEX
$PUPFPT::BLOCK 1 ;PUPFPT TABLE INDEX
$PUPBUF::BLOCK 1 ;PUPBUF TABLE INDEX
>;IFN PUPSW
;PCL PROGRAMMABLE COMMAND LANGUAGE PERMANENT VARIABLES
PCFLDB::BLOCK 4 ;FIELD DESCRIPTOR BLOCK FOR MERGED COMMANDS
PCFLDP::BLOCK 4 ;FIELD DESCRIPTOR BLOCK FOR PRESERVED COMMANDS
IFN STANSW,<
PCLNAM::Z ;CM156 Address of name of top-level PCL command
; in progress
PCCIPF::Z ;CM156 -1 if PCL command in progress, 1 if
; PCL command will be in progress once it is
; confirmed, 0 otherwise
>;IFN STANSW
PCTXFR::Z ;ADDRESS OF FIRST FREE TEXT BLOCK
PCVVAL::Z ;SYSTEM VARIABLE VALUE
PCVATM::Z ;SYSTEM VARIABLE ATOM
PCLGST::Z ;INDEX OF LAST ALLOCATED ENTRY IN GST
PCLPMT::BLOCK 6 ;SELECTABLE PROMPT STRINGS (STRINGVALUES)
XDICT:: Z ;USED BY PERMANENT FREE SPACE MANAGER
CSVC:: Z ;0 OR POINTER TO SAVED COMMAND STRING
EDSVB:: Z ;PLACE TO SAVE POINTER TO EDIT ARGS
SYMBF:: Z ;ADDRESS OF SYMBOL TABLE WINDOW
DPLPT:: Z ;POINTER TO PLOT DEFAULTS
DPLSTK::BLOCK QSLEN ;PLOT DEFAULTS
DCPT:: Z ;POINTER TO CPUNCH DEFAULTS
DCSTK:: BLOCK QSLEN ;CPUNCH DEFAULTS
DPPT:: Z ;POINTER TO DEFAULTS FOR PRINT COMMAND
DPSTK:: BLOCK QSLEN ;DEFAULTS FOR PRINT COMMAND
DSPT:: Z ;POINTER TO SUBMIT DEFAULTS
DSSTK:: BLOCK QSLEN ;SUBMIT DEFAULTS
DTPT:: Z ;POINTER TO TPUNCH DEFAULTS
DTSTK:: BLOCK QSLEN ;TPUNCH DEFAULTS
;STORAGE FOR SET DEFAULT COMPILE-SWITCHES
EXTBUF::BLOCK NEXTS*EXTSIZ ;ROOM FOR EXTENSION STRINGS
DEXTBL::0 ;TABLE HEADER WORD
BLOCK NEXTS ;ROOM FOR MAXIMUM SIZE TABLE
DCSSTG::BLOCK NEXTS*DCSSIZ ;ROOM FOR DEFAULTS
CSZ1==:. ;CSZ1 TO CSZ2 IS ZEROED EVERY COMMAND
SAVSP::Z ;INDIVIDUAL COMMANDS MAY STORE THEIR STACK
;POINTER HERE
CLZFFF::Z ;POSITIVE IF CLZFF NEEDED AFTER ERROR OR ^C
COMAND::Z ;TABLE ADDRESS OF OR POINTER TO NAME OF COMMAND BEING EXECUTED
COMSIX::Z ;SIXBIT OF COMMAND NAME
PRGCEL::Z ;HOLDS FAKE KEYWORD TABLE ENTRY FOR PROGRAM NAME
CLF:: Z ;-1 WHILE AT COMMAND LEVEL
CIPF:: Z ;-1 WHEN COMMAND IN PROGRESS
BEGINP::Z ;MARKS BEGINNING OF COMMAND INPUT
SVPRMT::Z ;SAVES POINTER TO PROMPT STRING FOR "TAKE, ECHO"
REPARA::Z ;HOLDS REPARSE ADDRESS
CMDACS::BLOCK 20 ;SAVED AC'S TO RESTORE THEM ON COMMAND REPARSE
.P:: Z ;SAVED P DURING SUBCOMMANDS
.PP:: Z ;SAVED .FP DURING SUBCOMMANDS
.J:: Z ;JFN STACK POINTER, USED FOR COMMAND INPUT
.JBUFP::Z ;JFN STACK POINTER, SAVED DURING COMMAND EXECUTION
INIFH1::Z ;JBUFP VALUE FOR FIRST JFN IN INPUT FILE GROUP
INIFH2::Z ;SAME FOR LAST FILE. SAME AS INIFH1 UNLESS SEVERAL
;NAMES (SEPERATED BY COMMAS) WERE GIVEN.
EOFDSP::Z ;SPECIAL DISPATCH ADDRESS FOR EOF PSI, EG DURING "COPY"
DATDSP::Z ;SPECIAL DISPATCH FOR DATA ERROR, DURING CHECKSUM
ILIDSP::Z ;0 OR SPECIAL DISPATCH FOR ILLEG INSTRUCTION TRAP
QTADSP::Z ;0 OR SPECIAL DISPATCH FOR QUOTA EXCEEDED TRAP
;POINTER TO DATA TO RSCAN FOR PROGRAMS
RSPTR:: 0
ERRMF:: Z ;NON-ZERO WHILE PROCESSING ERROR
;CURTAILS PROCESSING OF NESTED ERRORS TO AVOID
;INFINITE LOOPS IN ERROR CODE.
PCLDCO::Z ;PCL +1/-1 to do Exec command in Original mode
ORIFLG::Z ;CM156 Temporary Original flag used during
; parsing.
CSZ2==:.-1 ;END OF AREA ZEROED EVERY COMMAND
STAT,<
STPTR:: Z
>;STAT
;SYSTEM CONSTANTS INITIALIZED ONCE AT STARTUP
QTIMES::Z
SNAMES::Z
SYSVER::Z
JOBRT:: Z
TTYJOB::Z
;THIS ONE NOT SET UP AT START UP BECAUSE IT MAY NOT EXIST
NETRDY::Z
IFE STANSW,<
CINITF::Z ;NON-ZERO AFTER STARTUP INITIALIZATION COMPLETED
>;IFE STANSW
CUSTMF::Z ;PCL Set to indicate run of customized Exec
UNIQUE::Z ;DO "AOS A,UNIQUE" TO GET UNIQUE NUMBER IN A
SAVT20::Z ;REMEMBERED EXEC/USER MODE AT STARTUP
SAVNAM::Z ;REMEMBERED PROG NAME WHEN EXEC STARTS
SYSMF:: Z ;SET TO -1 IF SYSTEM MESSAGES NEED PRINTING
LOGDAT::Z ;HOLDS DATE OF LOGIN
LOGINI::Z ;SET TO FLAG "TAKE INITIAL-LOGIN-TYPIN.TXT" AT NEXT OPPERTUNITY
FILINI::Z ;SET TO FLAG "TAKE EXEC-INITIALIZATION.TXT" COMPLETED.
IFN NICSW,< ;[NIC1017]
HCNT::Z ;[NIC1017] NUMBER OF COMMANDS TO REMEMBER
CNUM::Z ;[NIC1017] CURRENT COMMAND NUMBER
HPTR::Z ;[NIC1017] ADDRESS OF PTRS TO COMMANDS
>;IFN NICSW
IFN STANSW,<
ATTINI::Z ;SET TO FLAG "TAKE ATTACH.CMD"
LGXINI::Z ;-1 TO TAKE SYSTEM:LOGIN.CMD
FLXINI::Z ; 0 TO TAKE SYSTEM:COMAND.CMD
>;IFN STANSW
CIDLYF::Z ;0:CLEAR INPUT AFTER ?, BUT BEFORE MESSAGE
;-1:CLEAR INPUT AFTER ENTIRE ERROR MESSAGE
ACTRCF::Z ;-1 WHEN ^C ALLOWED
IINTDF::Z ;NUMBER OF NESTED IPCON'S
INTDF:: Z ;NUMBER OF NESTED PIOFF'S
IPCALF::Z ;-1 WHEN IPCF INTERRUPTS ALLOWED
IPCRCF::Z ;SET TO -1 WHEN AN IPCF MESSAGE HAS BEEN RECEIVED
IPCCTL::Z ;0 OR SPECIAL ADDRESS TO GO TO AFTER IPCF INTERRUPT
IPCWTF::Z ;SET TO -1 WHEN AN IPCF INTERRUPT HAS BEEN DEFERRED
OLDIDX::Z ;SET TO INDEX OF THE MESSAGE TO BE FLUSHED IF NECESSARY
IPCAGE::BLOCK IPCMAX ;BIRTHDAY OF MESSAGE, LARGER NUMBERS ARE MORE RECENTLY RECEIVED
IPCTBL::BLOCK IPCMAX ;0 OR PID THAT SEND NTH MESSAGE (SEE IPCBUF)
IPCFGS::BLOCK IPCMAX ;FLAGS FROM NTH IPCF MESSAGE IN BUFFER
NOWPTR::Z ;0 OR POINTER TO FIRST QUEUED MOUNT BLOCK
MPENDF::Z ;-1 IF WAITING FOR MOUNT ANSWER
SYMF:: Z ;-1 IF "SET TYPEOUT MODE SYMBOLIC"
IFN STANSW,<
TRADIX::Z ;TYPEOUT RADIX
>;IFN STANSW
PAXLFL::Z ;0:PA1050 ALLOWED
;-1:PA1050 NOT ALLOWED
CCFLAG::Z ;0:XMIT ^C CAP TO PROGRAMS
;-1:DON'T XMIT ^C CAP TO PROGRAMS
PRVENF::Z ;NON-0 IF PRIVILEGED COMMANDS "ENABLE"D
MESMSF::Z ;MESSAGE MESSAGE FLAG: NON-0 SAYS TO LOOP TO TYPE
;"YOU HAVE A MESSAGE" IF APPROPRIATE
FSTLGN::Z ;-1: LOGIN FAST MODE
BATCHF::Z ;-1: BATCH MODE, 0:NON BATCH MODE
IFN NICSW,< ;[NIC1003]
LSTCON::Z ;[NIC1003] LAST CONNECTED DIRECTORY
OPERF:: Z ;[NIC1016] 0 if not OPERATOR, else OPERATOR's
;[NIC1016] user #
AUTO::Z ;[NIC1033]
>;IFN NICSW
CUSRNO::Z ;USER # IF LOGGED IN, 0 IF NOT
IFN STANSW,<
LGOFLG:: Z ;-1 IF INSIDE LOGOUT.CMD
MRPFLG:: Z ;-1 IF END OF LOGIN.CMD TERMINATES JOB
>;IFN STANSW
LIDNO:: Z ;LOGGED-IN DIRECTORY NUMBER (SET ONLY AFTER LOGIN)
JOBNO:: Z ;JOB NUMBER
FORK:: Z ;-1 OR HANDLE OF INFERIOR FORK EXEC CURRENTLY KNOWS OF.
;SET BY GET, RUN, FORK N, ETC.
;USED BY START, /, \, GOTO, ETC.
RUNFK:: Z ;CURRENT RUNNING FORK
IDFORK::Z ;IDDT FORK
IFN NICSW,<
IDNAME::BLOCK 2 ;[NIC1002] NAME OF DEBUGGER
UFORK:: Z ;[NIC1002] FORK UNDER DEBUGGER
>;IFN NICSW
EDFORK::Z ;EDITOR FORK (AUTO KEEP)
CCKEEP::Z ;-1 := TREAT INTERRUPTED FORKS AS KEPT
FRKTAB::BLOCK NFRKS ;FORK TABLE FLAGS,,FRKTBL PNTR
SLFTAB=:FRKTAB+400000
FRKNMS::BLOCK NFRKS+1 ;TBLUK STYLE TABLE FOR FORK NAMES
KEPNMS::BLOCK NFRKS+1 ;TABLE OF KEPT FORK NAMES
FRKDEF::Z ;ADDRESS OF BLOCK OF FORK DEFAULTS (SEE "FORK BLOCK" IN EXECDE)
JSBDEF::BLOCK BITMLN ;DEFAULT JSYSES TO TRAP ON
TRAPU::Z ;COUNT OF TRAPPED UNDEFINED JSYS'S
TRAPD::Z ;COUNT OF TRAPPED DEFINED JSYS'S
TRPOKF::Z ;-1 IF TRAPS OK (TFORK ALREADY DONE)
TSTOPF::Z ;-1 IF STOPPING AFTER EACH TRAP
TFILEF::Z ;-1 IF "SET TRAP FILE-OPENINGS"
TOPENF::Z ;-1 IF "SET TRAP JSYS OPENF" OR "SET TRAP JSYS /ALL"
STAYF:: Z ;-1 TO STAY AT COMMAND LEVEL WHILE PROGRAM RUNNING
ADVFLG::Z ;FLAG TO INDICATE ADVISE CODE ACTIVE
ADVTNM::Z ;TERMINAL WE'RE ADVISING
SAVPGM::Z ;SAVED TT%PGM DURING ADVISE
NPAGE:: Z ;-1 OR XWD FORK HANDLE, ADDR FOR PAGE MAPPED AT "PAGEN"
EFORK:: Z ;FORK HANDLE FOR SPECIAL INFERIOR EXEC FORK
; OR EPHEMERALS
HELPSN::Z ;SIGNAL FOR HELP COMMAND
INDQUS::Z ;tell ETYPE not to print ? in first column or
; ephemerals
;STORAGE FOR MIC
MICFRK::Z ;FORK HANDLE OF MIC.EXE
MICPAG::Z ;AC BLOCK FOR INFERIOR (MIC.EXE)
BLOCK 17
MICFPG::Z ;POINTER TO FIRST PAGE FREE
;PCL PROGRAMMABLE COMMAND LANGUAGE VARIABLES
PCCURC::Z ;ADDRESS OF INNERMOST ACTIVE ECB
PCSFRE::Z ;ADDRESS OF FIRST FREE STRING BLOCK
PCLSTF::Z ;WHILE IN EXEC, FIRST UNUSED WORD OF RUN STACK
PCPOTP::Z ;ADDRESS OF BLOCK OF USER PROGRAM TYPEOUT
PCPEOP::Z ;ADDRESS OF BLOCK OF EXEC TYPEOUT
PCPRGR::Z ;-1 WHILE RUNNING CONTROLLED PROGRAM
PCRPAS::Z ;SAVED P WHILE IN PARSE
PCFLAG::Z ;SEVERAL FLAGS
PCFORK::Z ;PCL Place to save contents of FORK
PCWAIT::Z ;PCL Execution waiting for fork to stop
IFN STANSW,<
PCRNFK::Z ;CM156 SAVED VALUE FOR RUNFK
>;IFN STANSW
;MAIL WATCH VALUES
MWATCF::Z ;0 FOR MAIL WATCH OFF, -1 FOR ON
TYPING::Z ;-1 IF TYPEOUT IS IN PROGRESS
MWATAT::Z ;TIME FOR AUTO MAIL WATCH
MWATCT::Z ;TIME FOR NEXT MAIL CHECK
MWATDR::BLOCK NMWAT ;USER NUMBERS FOR MAIL WATCH
MWATWR::BLOCK NMWAT ;LAST WRITE D/T OF MAIL.TXT.1
MWATN:: BLOCK NMWAT ;COUNT OF TIMES CHECKED
MWATN0::BLOCK NMWAT ;RESET COUNT FOR MWATN
MALBUF::BLOCK 20 ;TEMP STORAGE FOR GFUST OF MAIL WRITER
;VARIABLES FOR TIME ALERTS
IITSET::Z ;-1 IF TIMER INTS ON
AUTOF:: Z ;-1 IF AUTO MAIL/ALERTS ON
ALRTIM::Z ;TIME OF NEXT ALERT
ALRTMS::BLOCK NALTS ;ADDITIONAL ALERT TIMES
REASON::BLOCK NALTS+1 ;POINTERS TO ALERT MESSAGE
;CRJOB/PRARG STORAGE
CRPRA:: BLOCK 20 ;STORE PRARG DATA HERE (FROM CRJOB THAT
;CREATED US)
;AUTOLOGOUT CRAP
STRTIM::Z ;DATE AND TIME EXEC WAS STARTED, IN "GTAD" FORMAT
TTYACF::Z ;TTY ACTIVITY FLAG: AOS'D FOR EACH CHARACTER IN OR OUT
PTTYAC::Z ;PREVIOUS TTY ACTIVITY FLAG (SAVE
;OVER TIMER TIMEOUT)
ALOST:: Z ;0=> TIMER STUFF NOT STARTED; -1=> HAS BEEN
CJPTIM::Z ;NOT 0=> TIME LIMIT SET AT CRJOB STARTUP
;THIS MEANS LGOUT AS WELL AS PRINTING
;"? TIME LIMIT EXCEEDED"
;-1 IF ALREADY KILLED.
;3 BLOCKS CONTAINING TTY MODE WORD, TAB STOPS (3 WORDS),
; CONTROL CHARACTER OUTPUT CONTROL INFO (CCOC) (2 WORDS).
;ALL THREE ARE CHANGED BY EXEC COMMANDS "HALFDUPLEX" ETC.
; INITIAL VALUES: SAVED AT EXEC STARTUP fOR USE AT PROG STARTUP.
ITTYMD::BLOCK NTTYMD
;EXEC'S VALUES: USED DURING COMMAND INPUT.
ETTYMD::BLOCK NTTYMD
CERET:: Z ;WHERE TO GO AFTER ERROR MESSAGE. NORMALLY "RERET"
;WHICH GOES BACK TO CMDIN, BUT IS CHANGED DURING
;SUBCOMMAND INPUT AS FOR "DIRECTORY"
CTUUO:: Z ;TEMPORARY FOR UUO DISPATCHER
%EDAYT::Z ;DATE & TIME SAVED FROM %D TO
ERCOD:: Z ;ERROR CODE FROM JSYS ERROR RETURN OR FAKE ITRAP
;STORAGE LOCATIONS USED BY "DIRECTORY" AND OTHER COMMANDS FOR
;INFORMATION ABOUT ARGUMENTS
MCOJFN::Z ;MULTI COPY OUTPUT JFN
OUTDSG::Z ;DESIGNATOR OF FILE TO PRINT ON
;FLAG CONTROLLING JFN NAME PRINTING BY TYPIF ROUTINE
TYPGRP::Z ;0:PRINT ONLY IF PROCESSING GROUP
;-1:PRINT ALWAYS
IFN STANSW,<
;FLAG CONTROLLING /BINARY-OUTPUT ON "TYPE" COMMAND
BINTYP::Z ;0: BINARY TYPING NOT IN EFFECT
;<>0: HOLDS OLD TERMINAL MODE IF BINARY
;TYPING IN EFFECT
;FLAG CONTROLLING AUTO-FORK-SELECT ON "RESET" COMMAND
RNFORK::0 ;0: NORMAL RESET, NO AUTO-SELECT
;-1: SELECT NEW FORK ON RESET OF CURRENT
>;IFN STANSW
;PSEUDO-INTERRUPT PC STORAGE WORDS
PCTAB=:.-1
LEV1PC::Z
LEV2PC::Z
LEV3PC::Z
;BUFFERS
PD:: BLOCK PDL ;PUSHDOWN
;WHILE A PUSHDOWN OVERFLOW ERROR MESSAGE IS BEING
; TYPED PD OVERFLOWS INTO CBUF, WHICH IS OK.
CJFNBK::BLOCK JBLEN ;ARGUMENT BLOCK FOR "GTJFN" JSYS
;ALWAYS ALL 0 EXCEPT WORDS 0, 1, 3, 4, 5.
;EXTENDED ARGS FOR GTJFN
LOC CJFNBK+.GJF2
XTNCNT::Z ;FLAGS AND COUNT GO HERE
ECHPTR::Z ;ECHO POINTER FOR GTJFN GOES HERE
ECHCNT::Z ;ECHO COUNT GOES HERE
CTRPTR::Z ;POINT TO SPACE IN FRONT OF COMMAND BUFFER
Z ;TOP OF BUFFER POINTER
DICT:: Z ;WORD NEEDED BY FREE SPACE MANAGER
CSBUFP::Z ;POINTER TO STRING STORAGE
CSVCC:: BLOCK 1 ;SAVE COMMAND INFO
;STORAGE FOR SYMBOL TABLE DATABASE
IFN STANSW,<
SETLVL::Z ;SET LEVEL INDICATION FLAG
>
SYMOKF::Z ;-1 IF SYMBOL DATABASE OK
SOFF:: Z ;WILL CONTAIN A,,OFFSET FOR INDEXING
SYMBA:: Z ;BEGINNING ADDRESS MAPPED
SYMEA:: Z ;ENDING ADDRESS MAPPED
SYMBEG::Z ;FIRST ADDRESS OF PROG'S SYMBOL TABLE
SYMEND::Z ;LAST ADDRESS OF PROG'S SYMBOL TABLE
LASTP:: Z ;ADDRESS OF MOST RECENT PROGRAM NAME IN WHICH LAST SYMBOL WAS FOUND
NSYMS:: Z ;NUMBER OF PROGRAM SYMBOLS
;STORAGE FOR IPCF VARIABLES
MYPID:: Z ;EXEC PID
INFPID::Z ;INFO'S PID
QSRPID::Z ;PID OF QUASAR (QUEUE REQUESTS GET SENT TO QUASAR)
MDAPID::Z ;MOBY DEVICE ANIMAL'S PID
SNDPDB::BLOCK PDBSIZ ;PDB FOR SENDING MESSAGES
ABKCNT::Z ;ADDRESS BREAK COUNTER
FTDBLK::BLOCK .RSFET+1 ;SPACE FOR SET FILE ON/OFF/EXP
ARCBLK::BLOCK .ARPSZ+1 ;BLOCK FOR ARCHIVE TAPE INFO
LRFSTS::BLOCK .RFSFL+1 ;BLOCK FOR DOING LONG FORM RFSTS CALL
CSZ4==:.-1 ;END OF AREA TO ZERO AT STARTUP (BEGINS AT CSZ1)
XPGD==.-1 ;END OF NON-PAGE DATA
;BUFFERS FOR MAPPING PAGES
LOC <.+777>&777000 ;SET LOCATION TO NEXT PAGE BOUNDARY
BPGD==. ;BEGINNING OF PAGE DATA
PAGEMI::BLOCK ^D512 ;PAGE FOR USE BY MIC
PAGEN:: BLOCK ^D512 ;POSSIBLE PAGE MAPPED FOR EXAMINE, DEPOSIT, ETC.
;OR LOOKING AT JOBDAT.
;IF A PAGE IS MAPPED HERE "NPAGE" IDENTIFIES IT.
XDEND==:. ;FIRST LOC OF PURE SEGMENT
SUBTTL ONCE-ONLY MODULE FOR EXEC CREATION
;USEFUL MACROS
DEFINE TMSG(TXT) <
HRROI 1,[ASCIZ \TXT\]
PSOUT ;;DUMP STRING ON TERMINAL
>
DEFINE TNOUT <
MOVEI 1,.PRIOU ;;USE PRIMARY JFN
MOVEI 3,^D10 ;;DECIMAL NUMBER
NOUT ;;DUMP IT
ERJMP .+1 ;;IGNORE ERRORS
>
DEFINE EMSG(TXT) <
TMSG <
?TXT
>
HALTF ;;PRINT ?MESSAGE AND HALT
JRST XSAVE ;;RETRY SAVE IF CONTINUED
>
;REGISTER USAGE
;C(10) := STARTING PAGE #
;C(11) := # OF PAGES WITHOUT SYMBOLS
;C(12) := HIGHEST PAGE # + 1
;C(13) := # OF PAGES IN SYMBOL TABLE
;C(14) := JFN TO FOR .EXE FILE
LOC PAGEMI
COMMENT \
The JSYS table has the following format:
[ flags
ASCIZ/NAME/],,nm
where:
flags = TBLUK flags
name = JSYS name
n = JSYS number
m = correct table offset to JSYS name for this numeric (JSYS) table
offset
As the table is in TBLUK format, it can be accessed by JSYS name
(to get the corresponding JSYS number). It can also be accessed by
JSYS number (to get the corresponding JSYS name).
Since offset zero contains the TBLUK table length, care must be
taken to special-case the attempt to index the table numerically
with an index of zero.
\
JSORT: MOVE A,[-JLEN,,JTAB+1] ;GET AOBJN POINTER
SETZM B
JTBO3: HLRZ Q3,(A) ;GET PRIMARY POINTER - ANY ?
; JUMPE Q3, JTBO7 ;NO - SKIP THIS ITERATION
MOVE Z,A ;YES - SAVE AOBJN POINTER
HRRZI D,1(Q3) ;YES - GET STRING POINTER
JRST JTBO5 ;SET UP THE FIRST STRING
JTBO4: HLRZ Q3,(A) ;GET PRIMARY POINTER- ANY?
JUMPE Q3,JTBO6 ;NO, SKIP IT
HRRZI D,1(Q3) ;YES - GET STRING POINTER
CAMG B,(D) ;IS THIS STRING SMALLER?
JRST JTBO6 ;NO - SKIP IT
JTBO5: MOVE B,(D) ;YES - SET UP STRING
MOVE C,A ;GET ITS INDEX, TOO
JTBO6: AOBJN A,JTBO4 ;LOOP THROUGH ALL STRINGS
MOVEM Z,A ;RETRIEVE POINTER
HLRZ B,(A) ;GET SOURCE POINTER
HLRZ D,(C) ;GET DESTINATION POINTER
HRLM B,(C) ;SWAP
HRLM D,(A) ;...
LDB B,[POINT 9,(A),26] ;GET SOURCE JSYS NUMBER
LDB D,[POINT 9,(C),26] ;GET DESTINATION JSYS NUMBER
DPB B,[POINT 9,(C),26] ;SWAP
DPB D,[POINT 9,(A),26] ;...
JTBO7: AOBJN A,JTBO3 ;DO THE OUTER LOOP
;NOW SORT OFFSETS IN RIGHT 9 BITS OF TABLE, SUCH THAT EACH
;OFFSET POINTS TO THE TXT FOR THAT NUMERIC JSYS
MOVE Q1,[-<JLEN-1>,,1] ;MUST SEARCH WHOLE TABLE
LP1: MOVE A,[-<JLEN-1>,,1] ;SEARCH WHOLE TABLE ON EACH PASS
LP2: LDB C,[POINT 9,JTAB(A),26];YES, GET JSYS NUMBER FROM THIS SLOT
CAIN C,(Q1) ;IS IT THE SAME ONE Q1 IS POINTING TO?
JRST GOTIT ;YES
AOBJN A,LP2 ;NO, TRY AGAIN
SETZM A ;JSYS NOT DEFINED
GOTIT: DPB A,[POINT 9,JTAB(Q1),35];STORE THE OFFSET
NXT: AOBJN Q1,LP1 ;ENTER OUTER LOOP
RET
LOC PAGEN ;USE THIS PAGE
XSAVE::! ;ENTRY POINT
XCT INISTK ;JSERR NEEDS STACK POINTER
CALL JSORT ;SORT THE JSYS TABLE
MOVE 0,.JBSYM## ;GET SYM TABLE PNTR
MOVEM 0,.JOBSY ;PLACE IN CORRECT LOC
TMSG <
Data seg: >
MOVEI 10,EXEC ;START ADDRS OF EXEC
TRNE 10,777 ;CHECK PAGE BOUNDARY
JRST [EMSG <EXEC doesn't start on page boundary>]
LSH 10,-11 ;STARTING PAGE #
MOVE 2,10 ;GET DATA SEGMENT SIZE
TNOUT
TMSG <. Pages
>
MOVEI 2,BPGD ;BEGINNING OF PAGE DATA
SUBI 2,XPGD ;CALC REMAINDER
TNOUT
TMSG <. Words free
Pure seg: >
HRRZ 2,.JOBSY ;GET LAST LOC OF EXEC
ADDI 2,777 ;ROUND TO NEXT HIGHEST PAGE
LSH 2,-11 ;PAGE #
MOVEM 2,12 ;SAVE INFO
SUB 2,10 ;SIZE OF EXEC W/O SYMS
MOVEM 2,11 ;SAVE IN 11
TNOUT ;TELL US ABOUT IT
TMSG <.+>
HLRE 0,.JOBSY ;NEG. LEN OF S.T.
HRRZ 2,.JOBSY ;START ADDRS
SUB 2,0 ;LAST LOC OF ENTIRE EXEC
ADDI 2,777 ;ROUND TO NEXT HIGHEST PAGE
LSH 2,-11 ;...
SUB 2,12 ;SIZE OF S.T.
MOVEM 2,13 ;SAVE FOR LATER
TNOUT ;TELL US SIZE
TMSG <. Pages + symbols
>
MOVE 2,12 ;GET PAGE # +1 OF HIGHEST PAGE
LSH 2,11 ;CONVERT TO ADDRS
HRRZ 0,.JOBSY
SUB 2,0 ;# OF WORDS REMAINING
TNOUT ;TILL NEXT PAGE
TMSG <. Words to next page boundary
Save symbols? >
XSV1:! PBIN ;GET ANSWER
ANDI 1,137 ;ROUND TO UPPER CASE
CAIN 1,"N" ;NO?
JRST [SETZM 13 ;CLEAR SIZE OF S.T.
SETZM .JOBSY ; AND S.T. PNTR
JRST XSV2] ;SKIP TO EOL
CAIE 1,"Y" ;YES?
JRST [TMSG <
?Type "Y" or "N"
>
MOVEI 1,.PRIIN
CFIBF ;CLEAR TYPEAHEAD
JRST XSV1] ;TRY AGAIN
XSV2:! PBIN
CAIE 1,12 ;SKIP TILL LINE-FEED SEEN
JRST XSV2
MOVEI 1,.FHSLF ;SET UP ENTRY VECTOR
MOVE 2,[EVLEN,,EXEC]
SEVEC ;...
MOVSI 1,(GJ%FOU!GJ%SHT)
HRROI 2,[ASCIZ "EXEC.EXE"]
GTJFN ;GET JFN FOR .EXE FILE
ERJMP XSVE
MOVEM 1,14 ;SAVE JFN
TMSG <
Saving EXEC on file: >
MOVEI 1,.PRIOU ;WHERE TO SAY
MOVE 2,14 ;JFN
MOVEI 3,0 ;DEFAULT MSG
JFNS
MOVSI 1,.FHSLF ;MUMBLE UP SAVE FILE INFO
HRR 1,14 ;SELF,,JFN
MOVE 2,11 ;LEN OF EXEC
ADD 2,13 ;PLUS S.T. SIZE
MOVEM 2,.NPAGS ;SAVE SIZE OF EXEC
MOVNS 2 ;NEGATE LENGTH
HRLZS 2 ; TO LHS
HRR 2,10 ;STARTING PAGE #
TRO 2,SS%RD!SS%EXE ;READ & EXECUTE
MOVEM 2,11 ;STORE THIS TABLE ENTRY
MOVEI 10,.JBSYM## ;GET ADDRESS OF SYMBOL TABLE POINTER
LSH 10,-9 ;CHANGE TO PAGE NUMBER (THIS IS ALL FOR
HRLI 10,-1 ;DDTS THAT USE "116" AS SYMBOL TABLE POINTER)
IORI 10,SS%CPY+SS%RD+SS%EXE ;ALLOW ALL ACCESS TO SYMBOL POINTER
MOVEI 12,0 ;TERMINATE TABLE WITH A ZER0
MOVEI 2,10 ;POINT AT THE TABLE
CAIN 13,0 ;SYMBOLS SAVED?
MOVEI 2,11 ;NO, SO DON'T SAVE SYMBOL TABLE
MOVEI 3,0 ;ZERO FLAGS
SSAVE ;DO IT
ERJMP XSVE
TMSG < [OK]
>
HALTF ;DONE!
XSVE:! JSERR ;SAY WHY SAVE FAILED
DMOVE A,[EXP .FHSLF,XWD 1,XSAVE] ;RESTORE ENTRY VECTOR IN CASE RETRY
SEVEC
EMSG <Failure during attempt to save EXEC.EXE>
LIT ;DUMP LITS
RELOC XDEND-140 ;SO THAT NEXT MODULE LOADS CORRECTLY
END XSAVE