CTSS: Commands

In this post we'll run through what commands are available on CTSS. This is based on the The CTSS Programmer's Guide section AH, but is reordered here for simplicity. A page reference to the PDF is given for each command.

This does not cover programming languages, loading and debugging facilities; these will be covered in a later post.

In some cases a command is described in the guide but is not available on the emulated systems, which is shown using strike through. This is because the CTSS we have today was reconstructed from a listing tape which does not include every command that was present then.

/images/ctss/ctss-programmers-guide.png The CTSS Programmer's Guide with its "candy stripe" cover.

Logging in/out

Command Meaning Guide
LOGIN Login to the system p282
LOGOUT Log out p286
TTPEEK Show quotas p290
DIAL Attach a remote terminal p291
HELLO Print system message p292
SUBSYS Restrict interactive environment p532
OPTION Set subsystem options p538
WHO Prints who is online p544

LOGIN is the only command available when you first connect to CTSS. It is also treated as a user level command so you can use it to switch accounts when logged in.

TTPEEK will show how much CPU time and disk space you have used. A quota for this was established when a user ID was created.

DIAL allows a non logged in terminal to be associated with a logged in session. Once associated it can be used by programs on the logged in session to send and receive text, but cannot run commands directly. However none of the existing commands on CTSS use this facility.

HELLO gives a simple system summary similar to what you see at login.

SUBSYS and OPTION restrict what type of operations can be done. It seems to be intended as a way for a login to be used to run a specific interactive program rather than issue general commands. These are selected by the user and can be changed so it is not a security mechanism.

A sample of WHO output:

who
W 1815.0
        
MIT8C0 STARTED AT 1127.2 02/15.
                               
 2  USERS AT  1815.0 02/15.
                           
LINE   USER     NAME  GRP UNIT  TUSED TIMEON
 1 C0056 99995 FIBMON  0 (FIB)     .0 1127.2 02/15
 3 M1416    10  ELIZA  1 700000    .0 1815.0      
                                            
R .016+.016

File management

Command Meaning Guide
CHMODE Change the permissions on a file p406
DELETE Delete a file p406
LINK Make a link to a file p345
MOVE Copy a file within the same UFD p370
PERMIT Grant access to another user p345
RENAME Rename a file p406
REVOKE Remove link access to a file p345
UNLINK Remove a link to a file p345
CALL System call wrapper p415

These have been discussed in the post Files and directories.

The exception is CALL, which is a thin wrapper around several system calls. For example to delete a file A MAD you could use CALL DELFIL A MAD.

Show file contents

Command Meaning Guide
P Quickly print a file in an appropriate format p400
PRINT Type a text file to the console p393
PRBIN Dump a file in octal p395
PRBSS Print details of a BSS file to the console p397
SDUMP Print a summary of a SAVED file to teh console p398
PRINTA Print an ASCII file to the console p399
PRINTF Print a card image file to the console p392

P is a good choice to view any type of text file.

Editing

Command Meaning Guide
ED Older card image file editor p333
EDC Card image file editor p372
EDL Line marked file editor p351
EDB Binary file editor p352
EDA ASCII file editor p369
QED Programmable editor p353

These are all line-orientated editors. The ED family shares a very similar command set, documented on the ED page. QED is a more sophisticated editor allowing multiple buffers; it was created by Ken Thompson of Unix fame. These will be looked at in a lter post.

File transformation

Command Meaning Guide
SQUASH Convert card image to line-marked p379
XPAND Convert line-marked to card image p379
CRUNCH Compress/uncompress BCD files p377
SQZBSS Compress BSS files p381
PADBSS Uncompress BSS files p381
ARCHIV Archive several files into one p374
APENDA Append to an archive p383
AARCHV Version of ARCGIV for ASCII files p382
APND Append a file p370
APEND Append several files p420
COMBIN Combine several files p402
SPLIT Spliu a file into several p404

These exist to translate between text formats and to save space.

We looked at SQUASH and XPAND in the post Files and directories.

CRUNCH was used with the BEFAP assembler which is also not available.

SQZBSS and PADBSS works on BSS object files by removing card sequence numbers and compressing sequences of zero value words.

ARCHIV is reminiscent of Unix tar, bundling a number of files into a single file so it takes up less space (both in terms of disk and entries in the directory) and can be un-archived later. Its first argument is a command like C for create and X for extract, also implying that tar was modelled on this. The semantics were a bit different as it generally worked on files with the same name2. For example, if you wanted to archive files A MAD B MAD and C MAD into an archive ARC MAD you would type archiv arc mad a b c.

APND is used as follows:

APND sub mad main main

which will append a copy of SUB MAD to the end of MAIN mAD.

APEND is similar but takes multiple files as input and writes to the first file as output, so to get SUB1 MAD and SUB2 MAD appended to MAIN MAD you would do:

APEND main mad sub1 mad sub2 mad

COMBIN is useful for card image files as it can adjust the seqeunce numbers of the combined file to make them contiguous. It is also used to create a libary from several BSS files.

Directory management

Command Meaning Guide
LISTF Print files in a directory p384
ATTACH Change to another user's directory p419
COMFIL Change to a common file directory p408
COPY Copy a file from a common file directory p409
UPDATE Copy a file to a common file directory p409

We looked at these in the post Files and directories.

Command execution

Command Meaning Guide
RUNCOM Run a sequence of commands p526
SAVFIL Save a runcom file execution status p343
RERUN Restart from a SAVFIL file p343
FIB Submit a backgroud job p287
DELFIB Delete a background job p287
PRFIB Print pending background jobs p287
GENCOM Supply non printable args to a command p531
ECHO Prints command before running it p546
YES Like ECHO but prompts first p550
WAIT Like ECHO but sleeps first p551
TIME Like ECHO but prints time first p552
. Command interface p328
WRITE Send chat messages p328

RUNCOM will run a series of commands stored in a file.

The FIB commands allow you to queue a job to be run the next time you are logged out.

Both of these will be discussed in a later post.

ECHO is like the Unix shell set -x in that it prints its arguments and then executes them as a command.

Input/Output

Command Meaning Guide
RQUEST Request printing or punching p412
RQASCI Request offline ASCII printing p421
MOUNT Request a tape to be mounted p348
UMOUNT Request a tape to be unmounted p348
VERIFY Read the label on a tape p348
LABEL Set the label on a tape p348
TAPFIL Add a file to a tape p348

We'll look at these in the next post.

Text processing and email

Command Meaning Guide
TYPSET Create a formatted text file p504
RUNOFF Print a TYPSET file p504
ROFF Print an ASCII memo file p523
PINFO Print information files p525
MAIL Send a message to another user p521

PINFO appears to be like the Unix man command, showing text files about each command on the system. Both PINFO and its files are not available on the CTSS we have.

Miscellaneous

None of these commands are available on the CTSS we have today. Most deal with typewriter control.

Command Meaning Guide
PRINTER Print error diagnostics p542
PERROR Explains error codes p553
SPACE Insert blank lines p545
EJECT Eject a page p545
PON Turn typewriter printer on p548
POFF Turn typewriter printer off p548
RED Change printer ribbon colour p549
BLACK Change printer ribbon colour p549
OCT Octal to decimal conversion p547
DEC Decimal to octal conversion p547
REMARK Send remarks to operators p520

PRNTER appears to be used to debug issues communicating with a typewriter.

REMARK allows a user to send comments to the operators: these are appended to a public file and was then printed out once a day.

Questions, corrections, comments

I welcome any questions or comments, and also especially any corrections if I have got something wrong. Please email me at rupert@timereshared.com