Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_3_19910112
-
mit/exec/execpr.mac
There are 46 other files named execpr.mac in the archive. Click here to see a list.
;1016 attach on login
;1003 make the saving routine continuable
;1002 revise fork control code
;770 lazy restart control
;763 DISPLAY and SET REGISTER command
;757 attach initialization file
;750 program name defaults revision
;747 simple command level
;746 nonsense flag
;745 inferior fork capabilities control
;744 sticky-file-defaulting
;743 wake-every-field control
;742 noisy fork control
;741 lazy feature control
;740 group login file
;737 logout file
;736 first login of user
;735 protect TRVAR stack pointer (SPR #:20-17409)
;734 correct reparse initialization
;733 subroutine and command flags
;732 command flags for passwords
;731 FDB fork control
;730 TTYLOK deamon support for OZ
;724 IDDT support
;716 add command-edit features
;715 add PCL features
;712 DEC release version
; UPD ID= 124, SNARK:<5.EXEC>EXECPR.MAC.7, 28-Dec-81 11:16:49 by CHALL
;TCO 5.1644 - UPDATE COPYRIGHT NOTICE
; UPD ID= 93, SNARK:<5.EXEC>EXECPR.MAC.6, 21-Oct-81 11:20:40 by GROUT
;TCO 5.1569 REMOVE EXTBUF AND DCSSTG
; UPD ID= 37, SNARK:<5.EXEC>EXECPR.MAC.5, 14-Aug-81 19:29:52 by CHALL
;TCO 5.1454 CHANGE NAMES FROM PRIVS TO EXECPR AND XDEF TO EXECDE
;<5.EXEC>EXECPR.MAC.4, 31-Jul-81 16:15:48, EDIT BY MURPHY
;PCWAIT
; UPD ID= 2234, SNARK:<5.EXEC>EXECPR.MAC.3, 22-Jun-81 11:30:16 by CHALL
; UPD ID= 2067, SNARK:<5.EXEC>EXECPR.MAC.2, 22-May-81 11:51:45 by GROUT
;Tco 5.1343 - Make IPCF code flush buffers only when necessary
;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
;<4.EXEC>EXECPR.MAC.117, 3-Oct-79 19:20:00, EDIT BY OSMAN
;REDUCE EDSVB TO ONE WORD
;<4.EXEC>EXECPR.MAC.116, 3-Oct-79 15:27:14, EDIT BY OSMAN
;REDUCE CSVC TO ONE WORD (POINTER TO STRING)
;<4.EXEC>EXECPR.MAC.115, 20-Sep-79 13:33:08, Edit by HESS
; Move FRKTBL to perm free space
;<4.EXEC>EXECPR.MAC.114, 12-Sep-79 15:00:44, EDIT BY OSMAN
;move CLZFFF to area 0'ed before every command
;<4.EXEC>EXECPR.MAC.113, 12-Sep-79 11:05:58, EDIT BY OSMAN
;ADD CLZFFF
;<HESS.E>EXECPR.MAC.15, 19-Aug-79 22:49:53, Edit by HESS
; Add variable storage for extended features
;<4.EXEC>EXECPR.MAC.110, 1-Aug-79 09:58:55, EDIT BY OSMAN
;REMOVE SETNOF (MAKE IT LOCAL LIKE IT'S SUPPOSED TO BE!)
;<4.EXEC>EXECPR.MAC.109, 18-Jun-79 10:36:37, EDIT BY OSMAN
;MOVE JBUF TO AREA NOT ZEROED PER COMMAND SO THAT RLJFNS WILL WORK
;THIS IS NOW NECESSARY SINCE RLJFNS IS CALLED LATER THAN IT USED TO, AFTER
;MWATCH.
;<4.EXEC>EXECPR.MAC.108, 2-May-79 10:25:14, EDIT BY OSMAN
;FLUSH CJFN2
;<4.EXEC>EXECPR.MAC.107, 2-May-79 10:18:19, EDIT BY OSMAN
;GET RID OF CJFN1
;<4.EXEC>EXECPR.MAC.106, 20-Apr-79 14:56:34, EDIT BY OSMAN
;REMOVE ..REL
;<4.EXEC>EXECPR.MAC.105, 20-Apr-79 14:36:43, EDIT BY OSMAN
;MOVE ARCBLK ETC. TO BEFORE PAGE BUFFERS, TO FREE UP A PAGE
;<4.EXEC>EXECPR.MAC.104, 18-Apr-79 16:44:03, EDIT BY OSMAN
;MOVE PIDS TO AREA ZEROED AT STARTUP, SO MYPID GETS INITIALIZED THE FIRST TIME
;THROUGH
;<4.EXEC>EXECPR.MAC.103, 18-Apr-79 16:32:20, EDIT BY OSMAN
;remove oprpid
;<4.EXEC>EXECPR.MAC.102, 18-Apr-79 14:06:44, EDIT BY OSMAN
;REMOVE NOWQ, ADD NOWPTR
;<4.EXEC>EXECPR.MAC.101, 2-Apr-79 12:58:42, EDIT BY OSMAN
;REMOVE OPRFLG
;<4.EXEC>EXECPR.MAC.100, 30-Mar-79 10:08:29, EDIT BY OSMAN
;CHANGE FBLOCK SIZE FROM 10 TO FBLLEN
;<4.EXEC>EXECPR.MAC.99, 28-Mar-79 15:13:40, EDIT BY OSMAN
;ADD MPENDF
;<4.EXEC>EXECPR.MAC.98, 12-Mar-79 18:03:01, EDIT BY KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
;<4.EXEC>EXECPR.MAC.97, 19-Feb-79 14:43:53, EDIT BY OSMAN
;ADD CLF
;<4.EXEC>EXECPR.MAC.96, 8-Feb-79 15:47:02, EDIT BY OSMAN
;ADD DPLPT, DPLSTK
;<4.EXEC>EXECPR.MAC.95, 1-Feb-79 17:21:14, EDIT BY OSMAN
;ADD IINTDF
;<4.EXEC>EXECPR.MAC.94, 18-Jan-79 11:36:59, EDIT BY OSMAN
;ADD INTDF
;<4.EXEC>EXECPR.MAC.93, 14-Jan-79 23:28:13, EDIT BY HEMPHILL
;ADD BLOCK FOR DOING LONG FORM RFSTS JSYSES
;MOVE JBUFP TO AREA NOT ZEROED EVERY COMMAND
;<4.EXEC>EXECPR.MAC.91, 13-Jan-79 15:53:16, EDIT BY OSMAN
;ADD XDICT
;<4.EXEC>EXECPR.MAC.90, 12-Jan-79 17:37:44, EDIT BY OSMAN
;REMOVE RUNFK
;<4.EXEC>EXECPR.MAC.89, 4-Jan-79 19:37:05, EDIT BY OSMAN
;REMOVE FREE
;<4.EXEC>EXECPR.MAC.88, 22-Dec-78 09:29:48, EDIT BY OSMAN
;move EDIT and COMPILE default strings to area zeroed at startup
;<4.EXEC>EXECPR.MAC.87, 6-Dec-89 10:44:47, EDIT BY OSMAN
;REMOVE BFP, ADD .P
;<4.EXEC>EXECPR.MAC.86, 1-Dec-78 10:33:58, EDIT BY KIRSCHEN
;ADD PECHOF
;<4.EXEC>EXECPR.MAC.85, 10-Nov-78 10:07:30, EDIT BY OSMAN
;tco 4.2087 - move defaults to area zeroed at initial startup
;<4.EXEC>EXECPR.MAC.84, 27-Oct-78 11:51:48, EDIT BY OSMAN
;REMOVE UGBUF, ACTBUF, DGBUF, SGBUF (MAKE THEM LOCAL STORAGE)
;<4.EXEC>EXECPR.MAC.82, 26-Oct-78 16:04:35, EDIT BY OSMAN
;REMOVE GSSBLK, SSSBLK
;<4.EXEC>EXECPR.MAC.81, 26-Oct-78 15:33:09, EDIT BY OSMAN
;REMOVE ALL "INTERN" STATEMENTS (PUT :: ON END OF ALL VARIABLES)
;<CALVIN>EXECPR.MAC.1, 9-Aug-78 14:39:12, EDIT BY CALVIN
; Insert variables for archive system
;<4.EXEC>EXECPR.MAC.78, 21-Oct-78 20:02:03, EDIT BY HEMPHILL
;TCO 4.2058
;MAKE XSAVE USE THE CONTENTS OF .JOBSY INSTEAD OF XEND AS THE LAST
;REQUIRED LOCATION WHEN SAVING THE EXEC WITHOUT SYMBOLS. THIS MAKES
;ALLOWANCE FOR MACREL AND PAT.., WHICH ARE LOADED AFTER XEND
;<4.EXEC>EXECPR.MAC.77, 20-Oct-78 19:34:24, EDIT BY OSMAN
;ADD IPCAGE
;<4.EXEC>EXECPR.MAC.76, 20-Oct-78 11:25:32, EDIT BY OSMAN
;ADD MDAPID
;<4.EXEC>EXECPR.MAC.75, 8-Oct-78 14:57:10, EDIT BY OSMAN
;FLUSH NERET, CHANGE REFS TO RERET, SINCE THAT'S ALL NERET EVER
;<4.EXEC>EXECPR.MAC.72, 3-Oct-78 12:47:29, EDIT BY OSMAN
;REMOVE MUTILB
;ADD IPC SYMBOLS
;<4.EXEC>EXECPR.MAC.69, 25-Sep-78 10:46:33, EDIT BY OSMAN
;REMOVE OQCF
;<4.EXEC>EXECPR.MAC.67, 17-Sep-78 17:28:37, EDIT BY OSMAN
;PUT IN CSBUFP, CHANGE CSBUF TO FREE, CHANGE CSBUFL TO FRESIZ
;<4.EXEC>EXECPR.MAC.66, 15-Sep-78 16:22:54, EDIT BY OSMAN
;ADD DICT, REMOVE CSBUFP, CSBUFE
;<4.EXEC>EXECPR.MAC.65, 21-Aug-78 16:49:29, EDIT BY HELLIWELL
;REMOVE "SET EDITOR" STORAGE
;<4.EXEC>EXECPR.MAC.64, 13-Aug-78 14:10:58, Edit by HELLIWELL
;ADD EDTYPE AND EDFILE BUFFER FOR "SET EDITOR"
;<4.EXEC>EXECPR.MAC.63, 10-Aug-78 09:08:31, EDIT BY OSMAN
;ADD PRGCEL
;<4.EXEC>EXECPR.MAC.61, 3-Aug-78 17:23:21, EDIT BY OSMAN
;ADD JOBNO
;<4.EXEC>EXECPR.MAC.60, 21-Jul-78 15:33:19, EDIT BY OSMAN
;ADD SAVNAM
;<4.EXEC>EXECPR.MAC.59, 21-Jul-78 10:08:37, Edit by PORCHER
;ADD SVPRMT
;<4.EXEC>EXECPR.MAC.58, 20-Jul-78 15:51:57, EDIT BY OSMAN
;ADD SAVT20
;<4.EXEC>EXECPR.MAC.57, 17-Jul-78 11:31:18, EDIT BY OSMAN
;REMOVE GTBUF
;<4.EXEC>EXECPR.MAC.56, 13-Jul-78 15:57:32, EDIT BY OSMAN
;REMOVE EDPTR AND EDCNT
;<4.EXEC>EXECPR.MAC.55, 13-Jul-78 15:47:39, EDIT BY OSMAN
;REMOVE FSPEC
;<4.EXEC>EXECPR.MAC.54, 13-Jul-78 15:43:37, EDIT BY OSMAN
;REMOVE CZBEG, LHED, CRFPNT, SAVPNT, CZEND
;<4.EXEC>EXECPR.MAC.53, 13-Jul-78 15:17:56, EDIT BY OSMAN
;REMOVE CWBUF
;<4.EXEC>EXECPR.MAC.52, 13-Jul-78 14:57:14, EDIT BY OSMAN
;REMOVE BEFDAT AND KEEPNM
;<4.EXEC>EXECPR.MAC.51, 13-Jul-78 14:37:59, EDIT BY OSMAN
;REMOVE SIZCN1, SIZCN2, PAGFL1, PAGFL2
;<4.EXEC>EXECPR.MAC.50, 13-Jul-78 14:25:52, EDIT BY OSMAN
;REMOVE POJFLG AND INDSG
;<4.EXEC>EXECPR.MAC.49, 13-Jul-78 14:23:05, EDIT BY OSMAN
;REMOVE "DEVICE"
;<4.EXEC>EXECPR.MAC.48, 13-Jul-78 14:17:08, EDIT BY OSMAN
;<4.EXEC>EXECPR.MAC.47, 13-Jul-78 13:42:31, EDIT BY OSMAN
;REMOVE DFBUF
;<4.EXEC>EXECPR.MAC.46, 13-Jul-78 13:32:56, EDIT BY OSMAN
;REMOVE FRAME
;<4.EXEC>EXECPR.MAC.45, 13-Jul-78 13:17:17, EDIT BY OSMAN
;<4.EXEC>EXECPR.MAC.44, 13-Jul-78 13:11:20, EDIT BY OSMAN
;REMOVE CSTRR
;<4.EXEC>EXECPR.MAC.42, 11-Jul-78 16:40:52, EDIT BY OSMAN
;REMOVE SYSDIR,SYSTNM,SYSJNM,SYSTAK
;<4.EXEC>EXECPR.MAC.41, 11-Jul-78 14:41:27, EDIT BY OSMAN
;REMOVE TADBLK
;<4.EXEC>EXECPR.MAC.39, 11-Jul-78 13:30:40, EDIT BY OSMAN
;REMOVE QUEUE-CLASS GLOBAL STORAGE
;<4.EXEC>EXECPR.MAC.38, 11-Jul-78 10:37:30, EDIT BY OSMAN
;REMOVE PREPAG
;<4.EXEC>EXECPR.MAC.37, 10-Jul-78 20:53:21, EDIT BY OSMAN
;REMOVE TEXTIB
;<4.EXEC>EXECPR.MAC.36, 10-Jul-78 20:40:44, EDIT BY OSMAN
;REMOVE SVCSBP
;<4.EXEC>EXECPR.MAC.34, 10-Jul-78 20:36:59, EDIT BY OSMAN
;REMOVE SVPRMT
;<4.EXEC>EXECPR.MAC.32, 29-Jun-78 16:03:38, EDIT BY OSMAN
;remove ertryf
;<4.EXEC>EXECPR.MAC.31, 29-Jun-78 15:00:10, EDIT BY OSMAN
;<4.EXEC>EXECPR.MAC.30, 28-Jun-78 16:29:24, EDIT BY OSMAN
;REMOVE LIST COMMAND STORAGE (DONE IN TRVAR)
;<4.EXEC>EXECPR.MAC.28, 28-Jun-78 15:48:00, EDIT BY OSMAN
;REMOVE DIRECTORY COMMAND STORAGE (ASSIGNED IN TRVAR INSTEAD)
;<4.EXEC>EXECPR.MAC.25, 27-Jun-78 16:22:51, EDIT BY OSMAN
;PUT BACK THE FEW GETAB CELLS REFERENCED FROM NON-GETABS
;<4.EXEC>EXECPR.MAC.24, 27-Jun-78 16:12:12, EDIT BY OSMAN
;REMOVE ALL THE GETAB CELLS (ROUTINES USE MONSYM SYMBOLS INSTEAD)
;<4.EXEC>EXECPR.MAC.22, 27-Jun-78 15:33:46, EDIT BY OSMAN
;REMOVE SRCSAV
;<4.EXEC>EXECPR.MAC.21, 27-Jun-78 15:16:03, EDIT BY OSMAN
;REMOVE COMPBP,LPROC,DEBAID,TMPJFN,INDJFN,INDBRK,LNGJFN,NXPROC,MAPPNT,
;CSJOB,CSPPN,STRP,STRC
;<4.EXEC>EXECPR.MAC.20, 27-Jun-78 14:35:42, EDIT BY OSMAN
;ADD ACTRCF
;<4.EXEC>EXECPR.MAC.19, 26-Jun-78 14:12:37, EDIT BY OSMAN
;ADD CIPF, COMSIX
;<4.EXEC>EXECPR.MAC.18, 23-Jun-78 21:17:35, EDIT BY OSMAN
;REMOVE UNREFERENCED SYMS: CBUFR, CMDBK, SBFP, TXTBRK
;<4.EXEC>EXECPR.MAC.16, 22-Jun-78 15:16:07, EDIT BY OSMAN
;ADD MAILF
;<4.EXEC>EXECPR.MAC.15, 22-Jun-78 14:51:21, EDIT BY OSMAN
;ADD MALWEN, SUBTRACT MWATCT
;<4.EXEC>EXECPR.MAC.14, 19-Jun-78 14:44:58, EDIT BY OSMAN
;ADD TINPF
;<4.EXEC>EXECPR.MAC.8, 9-Jun-78 16:35:58, EDIT BY OSMAN
;ADD SET COMPILER-SWITCHES VARIABLES (EXTRM, ETC.)
;<4.EXEC>EXECPR.MAC.7, 31-May-78 17:03:01, EDIT BY OSMAN
;REMOVE CHECK FOR DATA BOUNDARY BEING BEFORE PAGE 5
;<4.EXEC>EXECPR.MAC.6, 31-May-78 16:50:32, EDIT BY OSMAN
;<4.EXEC>EXECPR.MAC.5, 31-May-78 16:05:40, EDIT BY OSMAN
;ADD DCSTK, DCPT, DTSTK, DTPT
;<4.EXEC>EXECPR.MAC.4, 31-Jan-78 13:27:54, Edit by PORCHER
;<4.EXEC>EXECPR.MAC.3, 31-Jan-78 11:39:42, Edit by PORCHER
;<4.EXEC>EXECPR.MAC.2, 31-Jan-78 09:20:49, Edit by PORCHER
;Add stuff for execute-only
;Also ECHOF and SVPRMT for "TAKE,ECHO"
;<4.EXEC>EXECPR.MAC.1, 6-Jan-78 20:37:32, EDIT BY HELLIWELL
;ADD EDCNT FOR EDIT/CREATE
;TOPS20 'EXECUTIVE' COMMAND LANGUAGE
;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.
SEARCH EXECDE,MONSYM,QSRMAC
TTITLE EXECPR
SALL
LOC 140
;IMPURE STORAGE
;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
OZ,<
;730 IPCF stuff for TTYLOK, bad form but its here for now
;730 packet descriptor block for sending to INFO
TLTO:: IP%CPD ;730 .IPCFL= create PID for EXEC
Z ;730 .IPCFS= EXEC's returned PID
Z ;730 .IPCFR= to <SYSTEM>INFO
TLIMLN,,TLIMSG ;730 .IPCFP= the message length,,block addr
TLPLEN==:.-TLTO ;730 figure packet length
;730 INFO message block
TLIMSG::.IPCIW ;730 .IPCI0= request for name's PID
Z ;730 .IPCI1= returned PID
ASCIZ/TTYLOK/ ;730 .IPCI2= the name
TLIMLN==:.-TLIMSG ;730 figure message block length
;730 packet decriptor block for retrieving from INFO
TLFROM::Z ;730 .IPCFL= no flags
Z ;730 .IPCFS= returned sender PID,should be INFO
Z ;730 .IPCFR= PID of reciever, EXEC
TLIMLN,,TLIMSG ;730 .IPCFP= message length,,block addr
;730 packet descriptor block for sending to TTYLOK
TLTOTL::Z ;730 .IPCFL= no flags
Z ;730 .IPCFS= sender's PID, EXEC
Z ;730 .IPCFR= reciever's PID, TTYLOK
1,,ATTYNO ;730 .IPCFP= length is 1,,address with TTY NO
;730 argument block for MUTIL call to flush EXEC's PID
TLFLBK::.MUDES ;730 flush function
Z ;730 EXEC's PID
TLFLLN==:.-TLFLBK ;730 compute length
> ;730 end OZ
;STORAGE FOR EXEC COMMAND INTERPRETER
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
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.
;PCL PROGRAMMABLE COMMAND LANGUAGE PERMANENT VARIABLES
PCFLDB::BLOCK 4 ;FIELD DESCRIPTOR BLOCK FOR MERGED COMMANDS
PCFLDP::BLOCK 4 ;FIELD DESCRIPTOR BLOCK FOR PRESERVED COMMANDS
PCLNAM::Z ;715 address of name of top-level PCL command
; in progress
PCCIPF::Z ;715 -1:PCL command in progress
; 1:PCL command awaiting confirmation
; 0:otherwise
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
CSZ1==:. ;CSZ1 TO CSZ2 IS ZEROED EVERY COMMAND
;734 CSZ1 to CSZ1A zeroed on reparse
AUTKEP::Z ;731 0:normal #0:"autokeep" fork
HIDFRK::Z ;1002 0:normal #0:"hidden" fork
QCALLF::Z ;1002 0:normal #0:"quick" call to RSUBS4
AMBFRK::Z ;1002 0:non #0:ambiguous fork name
LAZCMD::Z ;741 0:normal #0:"lazy" commmand
PASCMD::Z ;732 0:normal #0:password command
CVAL0:: Z ;733 general values availible to commands, USE
CVAL1:: Z ;733 use only when TRVARs (or STKVARs) are not
CVAL2:: Z ;733 appropriate or when Z flags are
CVAL3:: Z ;733 unavailible
CVAL4:: Z ;733
CVAL5:: Z ;733
CVAL6:: Z ;733
CVAL7:: Z ;733
SVAL0:: Z ;733 likewise for SUBRs
SVAL1:: Z ;733
SVAL2:: Z ;733
SVAL3:: Z ;733
SVAL4:: Z ;733
SAVL5:: Z ;733
SVAL6:: Z ;733
SVAL7:: Z ;733
CSZ1A==:.-1 ;734 end of area zeroed on reparse
CLZFFF::Z ;POSITIVE IF CLZFF NEEDED AFTER ERROR OR ^C
COMAND::Z ;TBL ADDR OR PTR TO NAM OF CMD BEING EXECUTED
COMSIX::Z ;SIXBIT OF COMMAND NAME
PRGCEL::Z ;HOLDS FAKE KEYWORD TABLE ENTRY FOR PROG 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
.AC15:: Z ;735 SPR #:20-17409 saved AC15 during commands
.J:: Z ;JFN STACK POINTER, USED FOR COMMAND INPUT
.JBUFP::Z ;JFN STACK POINTER, SAVED DURING CMD 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 COPY
DATDSP::Z ;SPECIAL DISPATCH FOR DATA ERROR, FOR CHECKSUM
ILIDSP::Z ;0 OR SPECIAL DISPATCH FOR ILLEG INSTR TRAP
QTADSP::Z ;0 OR SPECIAL DISPATCH FOR QUOTA EXCEEDED TRAP
RSPTR:: Z ;POINTER TO DATA TO RSCAN FOR PROGRAMS
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 ;715 temporary ORIGINAL flag used during
; parsing.
CEF,< ;716
CEBPTR::Z> ;716 command pointer/flag for command edit
CSZ2==:.-1 ;END OF AREA ZEROED EVERY COMMAND
;SYSTEM CONSTANTS INITIALIZED ONCE AT STARTUP
STAT,<
STPTR:: Z> ;end STAT
QTIMES::Z
SNAMES::Z
SYSVER::Z
JOBRT:: Z
TTYJOB::Z
NETRDY::Z ;THIS ONE NOT SET UP AT START UP BECAUSE IT MAY
; NOT EXIST
CINITF::Z ;NON-ZERO AFTER STARTUP INIT COMPLETE
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
FIRLOG::Z ;736 0:normal #0:first login of account
GLGINI::Z ;740 #0:take GROUP-LOGIN.CMD at next
; opportunity
LOGINI::Z ;SET TO FLAG "TAKE LOGIN.CMD" AT NEXT
; OPPORTUNITY
FILINI::Z ;SET TO FLAG "TAKE COMAND.CMD" COMPLETED.
ATTINI::Z ;757 #0:take ATTACH.CMD at next opportunity
LGOCMD::Z ;737 0:not #0:in LOGOUT.CMD
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 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"
PAXLFL::Z ;0:PA1050 ALLOWED -1:PA1050 NOT ALLOWED
CCFLAG::Z ;0:XMIT ^C CAP TO PROGS -1:DON'T XMIT
LAZFEA::Z ;741 lazy features 0:off #0:on
LAZRES::Z ;770 lazy restart 0:only kept ones #0:all forks
NOISY:: Z ;742 noisy confirmation
FDBAK:: Z ;731 FDB autokeep fork control 0:off #0:on
FDBEPH::Z ;731 FDB ephemeral fork control 0:off #0:on
WAKFLD::Z ;743 0:don't wake #0:wake-every-field
STICKY::Z ;744 sticky file default -1:per cmd 0:none
; 1:per filespec
CAPMSK::Z ;745 mask for capabilities passed to inferior
FOOFLG::Z ;746 nonsense flag
PRVENF::Z ;NON-0 IF PRIVILEGED COMMANDS "ENABLE"D
SIMPLE::Z ;746 0:normal #0:simple command level
MESMSF::Z ;MESSAGE MESSAGE FLAG: NON-0 SAYS TO LOOP TO
;TYPE "YOU HAVE A MESSAGE" IF APPROPRIATE
BATCHF::Z ;-1: BATCH MODE, 0:NON BATCH MODE
OPERF:: Z ;1016 -1: OPERATOR job, 0: Non-OPERATOR
CUSRNO::Z ;USER # IF LOGGED IN, 0 IF NOT
LIDNO:: Z ;LOGGED-IN DIRECTORY NO.-SET ONLY AFTER LOGIN
JOBNO:: Z ;JOB NUMBER
OZ,< ;730
ATTYNO::Z> ;730 TTY NO from GJINF
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
;724 IDFORK::Z ;IDDT FORK
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
PRGNMS::BLOCK NFRKS+1 ;750 set program names (moved from FRKNMS)
FRKDEF::Z ;ADDRESS OF BLOCK OF FORK DEFAULTS
; (SEE "FORK BLOCK" IN EXECDE)
JSBDEF::BLOCK BITMLN ;DEFAULT JSYSES TO TRAP ON
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 PROG 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
MIC,< ;STORAGE FOR MIC
MICFRK::Z ;FORK HANDLE OF MIC.EXE
MICPAG::BLOCK 20 ;AC BLOCK FOR INFERIOR (MIC.EXE)
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
PCWAIT::Z ;PCL execution waiting for fork to stop
PCFORK::Z ;715 Saved value for FORK
PCRNFK::Z ;715 Saved value for RUNFK
;MAILWATCH VALUES
NONEWF,<
MAILF:: Z ;-1 IF MAIL WATCH INTERRUPT OCCURS
MALWEN::Z ;WHEN NEXT MAIL INTERRUPT WILL OCCUR
>
MWATCF::Z ;0 FOR MAILWATCH OFF, -1 FOR ON
TYPING::Z ;-1 IF TYPEOUT IS IN PROGRESS
NEWF,<
MWATAT::Z ;TIME FOR AUTO MAILWATCH
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
ERCOD:: Z ;ERROR CODE FROM JSYS ERROR RETURN OR FAKE
; ITRAP
;STORAGE LOCATIONS USED BY "DIRECTORY" AND OTHER COMMANDS FOR INFO ABOUT ARGS
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
;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 TO 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:: Z ;SAVE COMMAND INFO
SFDFIL::BLOCK .GJEXT+1 ;744 block for sticky per-file default
SFDCMD::BLOCK .GJEXT+1 ;744 block for sticky per-cmd default
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
DEXTBL::Z ;TABLE HEADER WORD
BLOCK NEXTS ;ROOM FOR MAXIMUM SIZE TABLE
;STORAGE FOR SYMBOL TABLE DATABASE
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
DSPREG::BLOCK DSPRSZ ;763 registers for DISPLAY command
CEF,<
;716 command editor variables
CERECD::Z ;716 0:not recording #0:recording
CESAVE::BLOCK CESAVL ;716 saved command line buffer
CEBFEN:: ;716 end of buffer
CETSAV::BLOCK CETSVL ;716 command edit working buffer
CEFLAG::Z ;716 0:EMACS mode #0:ALTER mode
CEMETA::Z ;716 0:no meta #0:meta-key in use
CEFFL:: Z ;716 first free location in CESAVE
CE1ST:: Z ;716 pointer to first saved command
CELAST::Z ;716 pointer to last saved command
CECNT:: Z ;716 count of commands in the buffer
CEPSIC::Z ;716 interrupt character to enter editor
PCLMID::Z ;716 PCL flag
>
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
MIC,<
PAGEMI::BLOCK ^D512 ;PAGE TO SHARE WITH MIC.EXE
>
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 A,[ASCIZ TXT]
PSOUT> ;;DUMP STRING ON TERMINAL
DEFINE TNOUT
< MOVX A,.PRIOU ;;USE PRIMARY JFN
MOVX C,FLD(^D10,NO%RDX) ;;DECIMAL NUMBER
NOUT ;;DUMP IT
ERNOP> ;;IGNORE ERRORS
DEFINE EMSG(TXT)
< TMSG <
?TXT
>
HALTF ;;PRINT ?MESSAGE AND HALT
JRST XSAVE> ;;RETRY SAVE IF CONTINUED
; ACS: P1/ STARTING PAGE #
; P2/ # OF PAGES WITHOUT SYMBOLS
; P3/ HIGHEST PAGE # + 1
; P4/ # OF PAGES IN SYMBOL TABLE
; P5/ JFN TO FOR .EXE FILE
LOC PAGEN ;USE THIS PAGE
XSAVE::! ;ENTRY POINT
XCT INISTK ;JSERR NEEDS STACK POINTER
MOVE Z,.JBSYM## ;GET SYM TABLE PNTR
MOVEM Z,.JOBSY ;PLACE IN CORRECT LOC
TMSG <
Data seg: >
MOVEI P1,EXEC ;START ADDRS OF EXEC
TRNE P1,777 ;CHECK PAGE BOUNDARY
JRST [EMSG <EXEC doesn't start on page boundary>]
LSH P1,-11 ;STARTING PAGE #
MOVE B,P1 ;GET DATA SEGMENT SIZE
TNOUT
TMSG <. Pages
>
MOVEI B,BPGD ;BEGINNING OF PAGE DATA
SUBI B,XPGD ;CALC REMAINDER
TNOUT
TMSG <. Words free
Pure seg: >
HRRZ B,.JOBSY ;GET LAST LOC OF EXEC
ADDI B,777 ;ROUND TO NEXT HIGHEST PAGE
LSH B,-11 ;PAGE #
MOVE P3,B ;SAVE INFO
SUB B,P1 ;SIZE OF EXEC W/O SYMS
MOVE P2,B ;SAVE IN P2
TNOUT ;TELL US ABOUT IT
TMSG <.+>
HLRE Z,.JOBSY ;NEG. LEN OF S.T.
HRRZ B,.JOBSY ;START ADDRS
SUB B,Z ;LAST LOC OF ENTIRE EXEC
ADDI B,777 ;ROUND TO NEXT HIGHEST PAGE
LSH B,-11 ;...
SUB B,P3 ;SIZE OF S.T.
MOVE P4,B ;SAVE FOR LATER
TNOUT ;TELL US SIZE
TMSG <. Pages + symbols
>
MOVE B,P3 ;GET PAGE # +1 OF HIGHEST PAGE
LSH B,11 ;CONVERT TO ADDRS
HRRZ Z,.JOBSY
SUB B,Z ;# OF WORDS REMAINING
TNOUT ;TILL NEXT PAGE
TMSG <. Words to next page boundary
Save symbols? >
XSV1:! PBIN ;GET ANSWER
ANDI A,137 ;ROUND TO UPPER CASE
CAIN A,"N" ;NO?
JRST [SETZ P4, ;CLEAR SIZE OF S.T.
SETZM .JOBSY ; AND S.T. PNTR
JRST XSV2] ;SKIP TO EOL
CAIE A,"Y" ;YES?
JRST [TMSG <
?Type "Y" or "N"
>
MOVX A,.PRIIN
CFIBF ;CLEAR TYPEAHEAD
JRST XSV1] ;TRY AGAIN
XSV2:! PBIN
CAIE A,.CHLFD ;SKIP TILL LINE-FEED SEEN
JRST XSV2
MOVX A,.FHSLF ;SET UP ENTRY VECTOR
MOVE B,[EVLEN,,EXEC]
SEVEC ;...
MOVX A,GJ%FOU!GJ%SHT
HRROI B,[ASCIZ/EXEC.EXE/]
GTJFN ;GET JFN FOR .EXE FILE
ERJMP XSVE
MOVE P5,A ;SAVE JFN
TMSG <
Saving EXEC on file: >
MOVX A,.PRIOU ;WHERE TO SAY
MOVE B,P5 ;JFN
SETZ C, ;DEFAULT MSG
JFNS
MOVSI A,.FHSLF ;MUMBLE UP SAVE FILE INFO
HRR A,P5 ;SELF,,JFN
MOVE B,P2 ;LEN OF EXEC
ADD B,P4 ;PLUS S.T. SIZE
MOVEM B,.NPAGS ;SAVE SIZE OF EXEC
MOVN B,B ;NEGATE LENGTH
HRLZ B,B ; TO LHS
HRR B,P1 ;STARTING PAGE #
TRO B,SS%RD!SS%EXE ;READ & EXECUTE
MOVE P2,B ;STORE THIS TABLE ENTRY
MOVEI P1,.JBSYM## ;GET ADDRESS OF SYMBOL TABLE POINTER
LSH P1,-9 ;CHANGE TO PAGE NUMBER (THIS IS ALL FOR
HRLI P1,-1 ;DDTS THAT USE "116" AS SYMBOL TABLE POINTER)
IORI P1,SS%CPY!SS%RD!SS%EXE ;ALLOW ALL ACCESS TO SYMBOL POINTER
SETZ P3, ;TERMINATE TABLE WITH A ZER0
MOVEI B,P1 ;POINT AT THE TABLE
CAIN P4,0 ;SYMBOLS SAVED?
MOVEI B,P2 ;NO, SO DON'T SAVE SYMBOL TABLE
SETZ 3, ;ZERO FLAGS
SSAVE ;DO IT
ERJMP XSVE
TMSG < [OK]
>
HALTF ;DONE!
JRST XSAVE ;1003 if continue go there
XSVE:! JSERR ;SAY WHY SAVE FAILED
DMOVE A,[.FHSLF
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