/ CCLX.PA - Command Control Language
/ Version 01.69  (Aerospace version number for this file.)

//////  Who To Blame
/
/ Copyright (c) 1974 by Digital Equipment Corporation
/
/ Copyright (c) 1977 by University of Minnesota Hearing
/                       Research Lab.
/
/ Created from DEC CCL by       John Van Essen
/                               Hearing Research Lab
/                               2630 University Ave SE
/                               Minneapolis, MI 55414
/
/ Revised for DECUS by          Jim Van Zee
/                               Lab Data Systems
/                               10320 Ravenna Ave NE
/                               Seattle, WA 98125
/
/               and by          Louis Tribble
/                               Aerospace Corporation
/                               P.O. Box 92957
/                               Los Angeles, CA 90009
/
////
//////  Introduction
/
/ The OS/8 operating system proper provides only seven
/ commands--ASSIGN, GET, ODT, R, RUN, SAVE, and START.
/ CCLX, and the programs it calls, implement all others.
/ When the Keyboard Monitor (part of OS/8) inputs a command
/ that is not one of the above seven, it gives it to CCLX.
/ To call CCLX, it loads, from the first block of CCLX.SV,
/ a table listing the commands that CCLX recognizes.  From
/ block 67 of the system area, it loads and executes an
/ overlay that searches for the inputted command in the
/ table.  If the overlay recognizes a command, it loads the
/ body of CCLX to execute it.
/
/ CCLX is a much modified descendant of the CCL program
/ supplied by DEC.  Nearly all of the user-discernible
/ modifications can be enabled or disabled at assembly time,
/ by removing or replacing a comment symbol in front of the
/ the associated symbol definition (near the end of this
/ subfile).  Remembrance area sizes and assignments can be
/ separately customized.  After making the desired changes,
/ CCLX must be reassembled and reinstalled.  A batch job
/ (CCLX.BI) has been provided for this purpose, and is
/ reprinted below.
/
/ Some commands in CCLX call programs not provided as part
/ of OS/8.  Because most will sooner or later be available
/ from DECUS, the commands have been left in, subject to
/ conditional assembly.  A list of these programs and where
/ to get them appears later in this file.
/
/ Note: To do the EG command from TECO, CCLX.SV must be
/ renamed CCL.SV.  Since CCLX performs a lookup on itself,
/ the internal name must also be changed: see CM67 in the
/ symbol definitions near the end of this file.  Or, the
/ the filename in TECO may be changed from CCL to CCLX.
////

//////  CCLX Assembly
/
/ $JOB CCLX.BI
/ / Assemble, load, save, and install new CCLX.  Assume all
/ / files on DSK: (watch out, the listing file is 600 and
/ / some blocks long).  If using CCL or old CCLX, drop the
/ / -R from the PAL and LOAD commands.
/ .PAL CCLX,CCLX1,CCLX2,CCLX3,CCLX4,CCLX5,CCLX6(WELP9)-LS-R
/ .LOAD CCLX-R
/ .SA DSK:CCLX
/ $MSG  Install new CCLX?  If no, type a control C.
/ .CCLX
/ .GE DSK:CCLX
/ / Save in same place as old CCLX.SV.  (Change "CCLX" to
/ / "CCL" if CM67 is defined.)
/ .SA SYS:CCLX
/ .SA SYS:CCLX
/ .R CCLX
/ $END
////
//////  Nonstandard OS/8 Programs Used by CCLX
/
/ Numbers in parentheses refer to the notes below.  "CMnn"
/ means the program is used only if "CMnn" is defined.
/
/ ACID.SV (.FORMAT)     Format a document (2,CM53).
/ DUMP.SV (.DUMP)	Dumps a file (7,CM72)
/ FLIST.SV (.FLIST)     Number lines of Fortran program
/                       (1,6,CM52).
/ HELP.SV               Smaller, smarter HELP.SV (1).
/ HELP.HL               Revised help file for CCLX (1).
/ KERMIT.SV (.KERMIT)	KERMIT file transfr program. (7,CM73)
/ LDF.SV (.LDF)         Lab Data Focal (3,CM38).
/ LPTSPL.SV (.PRINT)    Print files (1)
/ PLOT.SV (.PLOT)       Plot file from TKPLOT (4,CM43).
/ PRINT.SV              Print files.  Called in place of
/                       LPTSPL.SV (4,CM41).
/ RENUM.SV (.RENUM)     Renumber Fortran programs (1,CM70).
/ RTPIP.SV (.RTPIP)     Read/write RT11 disks (3,CM37).
/ RUNOFF.SV (.FORMAT)   Format a document (2,CM53).
/ SPOOLR.SV (.SPOOL)    Install/remove symbiont (.PRINT and
/                       .PLOT background spooling) (4,CM44).
/ TERMIN.SV (.TERMIN)   Emulate a dumb terminal (3,CM36).
/ VERSN3.SV (.VER/E)    Find CUSP version numbers (1).
/ VISTA.SV              Screen editor.  Called in place of
/                       EDIT.SV (2,CM40).
/
/ Notes.
/ (1)   Included in this package.
/ (2)   DECUS.
/ (3)   Lab Data Systems (Jim van Zee).
/ (4)   Under development at Aerospace (soon DECUS).
/ (5)   Dewar Information Systems (soon DECUS).
/ (6)   Revised to recognize that CCL is chaining to it and
/       to print error messages instead of halting!
/ (7)	By Johnny Billquist (soon in DECUS).
////

//////  Block 67 Overlay
/
/ Entry points are the same (00600 for KBM, 00602 for TECO).
/
/ CCLX reads the keyword table from the first code block on
/ CCLX.SV into locations 01400-01777.
////
//////  CCLX.SV File Structure
/
/ Consists of blocks in the following order:
/      -        Core Control Block
/ 12000-12377   Keywords.  Overlays load here.
/ 12400-14177   KBM entry point.  All text strings,
/               tables, and filenames are here.
/ 14200-17577   CCLX resident field 1 code.
/ 00000-00377   Overlays and CCLX run entry at 200.
/ 00400-00777   Block 67 code.
/ 01000-05377   More overlay blocks.
/ 05400-07400   Empty overlay space (ideas anyone?).
/               (Overlay entries in the 7000-7400 block
/               must lie below 7200 (CRITICAL).
////

//////  CCLX Core Layout
/
/    00200      .R CCL entry.  Initialize KBM and write
/               system CCL overlay block.
/    00201      Chain entry.  Execute command stored in
/               17600-17646 (8-bit ASCII, zero terminated).
/    00600      KBM overlay entry (jump to 12400).  Execute
/               KBM command.
/    00602      TECO EG overlay entry (jump to 12400).
/ 00400-00777   Block 67 code.
/ 01000-01377   Command line buffer.
/ 01400-01777   Keyword buffer.
/ 04000-04377   Remember area buffer (from block 65).
/ 04400-04777   Handler buffer.
/ 05000-05777   Buffer space.
/ 12000-12377   Initially keywords (becomes overlay buffer).
/
/ Infrequently executed code (e.g. @ processor, system date
/ enforcer) plus large blocks of command code (e.g. DATE,
/ RECALL, MUNG) are read in only when needed from the field
/ zero section of the CCLX.SV file (the KBM overlay still
/ reads in only field 1 code).
/
/ The command table and switch tables have routines to be
/ executed.  If the entry address is higher than "CRITICAL",
/ the routine resides in the last page of field 1, and can
/ be directly executed.  If the entry address is lower than
/ "CRITICAL", the routine is a field 0 address, and an over-
/ lay will be loaded and executed.
/
/ When a field 0 overlay is required, it is read in over
/ the keyword buffer (which was read into field 0 by the
/ KBM overlay, or moved into field 0 by chain preset).
////
//////  Format of CCL Table
/
/       Table width is 7 if CD, 3 if no CD.
/
/ 0     Flag Word
/
/       Bit     Meaning If On
/
/       0       Perform CD (if 0, omit entries 1-4).
/       1       Do not permit spooling.
/       2       Recall but do not remember.
/       3       Add _ to end of command string.
/               Do not recall if command line empty.
/       4       Copy first input spec to first output spec,
/               with file extension.  Allow -NO switch.
/       5-8     Remember byte.  0 means none.
/               1-15 are available.
/       9       Copy first input spec to first output spec,
/               without file extension.  Allow -NO switch.
/       10      Copy first input spec to first output spec,
/               without file extension.  Cause -L, etc., to
/               go to second output file.  Allow -LS, -MP,
/               -NB, and -NO switches.
/       11      Cause default altmode (compl if AMFLAG=1).
/
/ 1     Pointer to default extension list for input files.
/       0 means none.   5200 means CD will use special mode.
/
/ 2-4   Default switches to or with those explicitly typed.
/
/ 5     Address of subroutine to be called after CD is done.
/       0 if none.  May be overlay routine.
/
/ 6     Pointer to filename of program to chain to.  0 if
/       none.
////

//////  Command Table Processing
/
/ If a command accesses a remember area, the remember byte
/ must be non-zero.
/
/ If bit 3 is set, indicating that the command requires
/ output by default, no recalling is done, even if the rest
/ of the line is empty.   A backarrow is appended to the
/ input line if no backarrow exists.
/
/ If bit 3 (or bit 4 *CM17*) is set, the backarrow is
/ deleted, throwing away the input specs, before any
/ remembering is done.
/
/ If the remember byte is non-zero, the remembering is done
/ automatically after executing the subroutine and before
/ chaining to another program.
////
//////  Modification History at the University of Minnesota.
/
/ Disable features by commenting them out below.
/
/       Modsym  Author  Date    Description
/
/       CM1=0   /Removed.
        CM2=0   /JTE  03/21/76  .ZERO command controlled.
/       CM3=0   /JTE  03/21/76  -S switch goes to CRT:.
        CM4=0   /JTE  03/26/76  Enforce system date entry.
/       CM5=0   /Removed.
/       +++++   /     03/29/76  Ver C (Edit 39) mods added.
/       CM6=0   /Removed.
        CM7=0   /JTE  03/30/76  .RECALL added.
                /               Date checking disabled.
/       CM8=0   /Removed.
/       CM9=0   /Removed.
        CM10=0  /Removed.
/       +++++   /JVE  03/27/77  Major surgery on CCL.
/               /               Converted to CCLX.
        CM11=0  /JVE  03/31/77  .COMMANDS added.
/       CM12=0  /Removed.
        CM13=0  /Removed.
        CM14=0  /JVE  04/01/77  .EJECT added.
/       CM15=0  /Removed.
/       CM16=0  /Removed.
        CM17=0  /JVE  04/01/77  .EDIT remembers only up to
/               /               backarrow.
        CM18=0  /JVE  04/01/77  .TOMORROW, .YESTER added.
/       CM19=0  /JVE  04/01/77  .TIDY added.
/       CM20=0  /Removed.
        CM21=0  /JVE  04/21/77  .DEFINE added.
/       ++++++  /JVE  04/21/77  Process defined commands.
        CM22=0  /JVE  04/23/77  Removed.
        CM23=0  /JVE  04/23/77  .LGO (Load and GO) added.
/       CM24=0  /JVE  04/25/77  When defined command used,
/               /               filename could be wrong.
/       ++++++  /JVE  03/05/78  Most mods up to V1B Rev 68.
/       CM25=0  /JVE  04/01/78  .DESCRIBE added.
/       CM26=0  /JVE  04/09/78  .SUBMIT sets /T switch.
        CM27=0  /JVE  04/10/78  Fix space command problem.
////
//////  Modification History at the University of Washington
/       and the Aerospace Corporation.
/
/       Modsym  Author  Date    Description
/
/       CM28=0  /JVZ  11/13/83  Lower case dates, also ESD
/               /               uses DD-MMM-YY not MM/DD/YY.
/       CM29=0  /JVZ  11/13/84  PRINT responds to XON/XOFF.
/               /               .HELP doesn't set /T option.
        CM30=0  /JVZ  11/13/84  Backslash x (\x) unsets /x.
        CM31=0  /JVZ  11/13/84  .VER/E calls VERSN3.
        CM32=0  /Removed.
        CM33=0  /JVZ  11/13/84  .CREF->.XREF, .COMPA->.DIF,
                /               .CREA->.CR.
/       CM34=0  /JVZ  11/13/83  .VIEW added (output to TV:).
        CM35=0  /JVZ  11/13/84  .FUTIL added (no remem).
/       CM36=0  /JVZ  11/13/84  .TERMIN added.
/       CM37=0  /JVZ  11/13/84  .RTPIP added.
/       CM38=0  /JVZ  11/13/84  .LDF added.
/       CM39=0  /JVZ  11/15/84  Lower case text output.
        CM40=0  /LT   01/25/84  .EDIT calls VISTA.SV.
        CM41=0  /LT   01/25/84  .LIST, .PRINT call PRINT.SV.
/       CM42=0  /LT   01/25/84  If CM41, .PRINT calls FOTP.
/       CM43=0  /LT   01/25/84  .PLOT added.
/       CM44=0  /LT   01/25/84  .SPOOL added.  ".SAVE CCLX"
                /               works when symbiont on.
        CM45=0  /Removed.
        CM46=0  /Removed.
        CM47=0  /Removed.
        CM48=0  /LT   02/03/84  Enable one letter commands.
/       CM49=0  /LT   02/28/84  Remove mag tape commands.
        CM50=0  /LT   03/03/84  .SQUISH sets /O.
        CM51=0  /Removed.
        CM52=0  /LT   11/14/84  .FLIST added (new FLIST.SV).
        CM53=0  /LT   11/16/84  .FORMAT, -NO switch added.
/       ++++++  /LT   11/24/84  Major housecleaning (lower
/               /               case shows where!).
        CM54=0  /LT   11/24/84  Use rem area assignments of
                /               next page: ignore CCL and
                /               CM10, CM13, CM22, and CM46.
        CM55=0  /LT   11/24/84  Disable remember date check
                /               FOREVER.  Remember code and
                /               .RECALL work with up to 15
                /               variable length areas.
        CM56=0  /LT   11/30/84  Don't remember if -R.
        CM57=0  /LT   11/30/84  .PIP added.
        CM58=0  /LT   11/30/84  .PUNCH removed.
        CM59=0  /LT   12/26/84  .FIX added.
/       CM60=0  /LT   01/02/85  Insert slash for .BOOT.
/       CM61=0  /LT   01/03/85  .FILL added.
        CM62=0  /LT   01/03/85  No output to .DUP forces /R.
/       CM63=0  /LT   01/11/85  .DSK added (DIR without a
                /               rem area.
        CM64=0  /LT   01/25/85  FINDIT and linkage between
                /               field 0 and field 1 revised.
        CM65=0  /LT   03/29/85  .HELP accepts abbreviated
                /               command names.
        CM66=0  /LT   04/05/85  Convert lower to upper case.
        CM67=0  /LT   04/05/85  Make filename CCL, not CCLX.
        CM68=0  /LT   04/05/85  KBM commands added.
        CM69=0  /LT   06/18/85  Response to unknown command
                /               suggests HELP command.
        CM70=0  /LT   03/16/86  .RENUM added.
        CM71=0  /LT   05/28/86  .XREF calls KREF for MACREL
                /               files.
	CM72=0	/BQT  08/05/90	.DUMP added
	CM73=0	/BQT  08/05/90	.KERMIT added
/
        CMVERS=6763     /CM73   Change when more mods added.
////
//////  Further Tailoring

//////  Remember Area Definitions
/ Assign the remember area that the commands listed in the
/ accompanying comment will use.  0 through 15 are meaning-
/ ful (0 means do not assign a remember area).
/
        DECIMAL / Use decimal for this stuff.

        D=0     /DIRECT
        S=8     /SUBMIT
        E=1     /CREATE/EDIT
        E0=1    /MAKE/TECO
        C=2     /COMPILE/EXECUTE/FLIST/MACREL/PAL/RENUM
        UA=3    /UA
        UB=4    /UB
        UC=5    /UC
        L=6     /LINK/LOAD
        L0=9    /LGO
        P=7     /FORMAT/LIST/PRINT/TYPE
/
/ Assign remember area lengths.  The sum of the lengths
/ should equal 256(10) (if not, an IC error will be forced
/ at ADDERR).
/
        AREA1=16
        AREA2=32
        AREA3=32
        AREA4=32
        AREA5=32
        AREA6=38
        AREA7=32
        AREA8=10
        AREA9=32
        AREA10=0
        AREA11=0
        AREA12=0
        AREA13=0
        AREA14=0
        AREA15=0

        OCTAL   / Back to normal.
////
