TOPS-10: Files and directories

In this post we'll look at how TOPS-10 handles files and directories, along with the commands to manipulate them.

Files

Files are named file.ext where file is 1-6 characters long and ext 0-3. The extension is used to identify the type of file, eg HELLO.FOR would be a Fortran source code file.

The * and ? wildcards operate like we are used to now, ? matching one character and * matching any number of characters. An example using the DIR command:

.dir hworld.*

HWORLD	FOR     1  <057>   12-Jan-79	DSKB:	[100,100]
HWORLD	REL     1  <057>   12-Jan-79
  Total of 2 blocks in 2 files on DSKB: [100,100]

Manipulating files

COPY, RENAME and DELETE do what you'd expect, but note that for the first two you put the new name first followed by an =. For example, to copy HWORLD.FOR to H2.FOR and then rename it to H#.FOR you'd do:

.copy h2.for=hworld.for

.rename h3.for=h2.for
Files renamed:
H2.FOR 

.dir h*.for

HWORLD	FOR     1  <057>   12-Jan-79	DSKB:	[100,100]
H3	FOR     1  <057>   15-Jan-79
  Total of 2 blocks in 2 files on DSKB: [100,100]

Many of these commands are implemented using the PIP utility, which I'll look at in a later post.

Users and directories

Users are identified by a project number and a programmer number. These are both octal values (ie they consist of the digits 0-7), and values for both lower than 7 are reserved by the operating system. If you followed the quick start you logged in as project 100, programmer 100.

This is tied together with the concept of the directory. There is a Master File Directory and below that a User File Directory for each valid project/programmer pair. These are enclosed in square brackets when referencing files, for example:

.dir [100,100]hworld.for

HWORLD	FOR     1  <057>   12-Jan-79	DSKB:	[100,100]

Project/programmer numbers can also be wirldcarded.

[1,1] is also the Master File Directory, so you can see a list of all User File Directories by:

.dir [1,1]

     1,1	1  <555>   21-Apr-78	DSKB:	[1,1]
     1,4	4  <775>   21-Apr-78
     3,3	0  <777>   21-Apr-78
...

You can create sub-directories using the CREDIR command. For example, to create a sub-directory test under my user directory I would run CREDIR and at the prompt give the response [,,test]. I could have typed [100,100,test] but as this is my current log on it allows me to omit it. Running this looks like the below:

.r credir

Create directory: [,,test]
  Created DSKB1:[100,100,TEST].SFD/PROTECTION:775
Create directory: ^C

I can then use this in commands.

.dir [,,test]

%WLDDEM Directory DSK:[100,100,TEST] is empty

It is possible to change your current directory, but it is a little more involved then typing cd on modern systems. Use the SETSRC program and give it the CP command followed by the desired directory at the * prompt. The TP command will list your current directory. Type Control-C to exit.

.r setsrc

*tp
[100,100]/NOSCAN
*cp [,,test]

*tp
[100,100,TEST]/NOSCAN
*^C

To delete a sub-directory, ensure it is empty and then use DELETE on the SFD file representing the directory. So for our example here, test, you would do DELETE TEST.SFD.

Devices

Physical devices, such as tape drives, disks and the terminal, are referred to by device names which are 1-3 characters long, an optional digit followed by a colon. Some examples:

Device Meaning
CDP: Card punch
CDR: Card reader
DTA000: DECTape unit #0
DTA001: DECTape unit #1
LPT: Line printer
SYS: System library
TTY: Your terminal

You can see a list of physical devices on the system by typing RESOURCES.

These can be referred to in commands. To type the contents of HWORLD.FOR to your terminal you'd normally do TYPE HWORLD.FOR but you could also do COPY TTY:=HWORLD.FOR.

There are also device names pointing to directories. An example is SYS:, the location on disk where system executable files are stored. We can see from the DIR command below that SYS~ points to user [1,4].

.dir sys:pip.exe

PIP	EXE    44  <155>    8-Nov-76	33B(260)	DSKB:	[1,4]

You can create logical device names. Say your program was reading from a DECTape where the unit may change depending on what is in use. Rather than hard-coding the physical name, you can set up a logical name with ASSIGN - for example ASSIGN DTA000: ABC: - and then use ABC: to refer to the tape. DEASSIGN will remove the logical name.

Protection

A file has a protection code which is 3 octal digits enclosed in angle brackets like <O57>. Each digit applies to a different class of user..

Digit Applies to
First You
Second Users with the same project number
Third All users

The values for each digit and their meaning:

Digit Meaning
7 No access
6 Execute
5 Read and execute
4 Append and everything in 5
3 Update and everything in 4
2 Write and everything in 3
1 Rename and everything in 2
0 Change protection and everything in 1

So a code of <057>, which is the default, means you can do anything, people in your project can read/execute, and all other users have no access.

Protection can be applied using the PROTECT command:

protect hworld.for<025>

Or directly at file creation time, eg via copy

copy world.for<000>=hworld.for

The default protection can be changed with SET DEFAULT PROTECTION.

Disk quota

Each regular user has an allowance of how much data they can store on disk. A higher quota is given for when you are logged in compared to logged out, to allow for creation of temporary files. The QUOLST command allows you to see this: the units are 128-word blocks, so 576 bytes per block.

.r quolst

User:	100,100
Str	used   left:(in) (out)	(sys)
DSKB:	  135	99865	99865	132307

On an emulated system today this is not a concern. On a real system with small disks and many users, the quota could be set quite low (I read that some undergraduates were limited to 5 blocks).

An alternate way to log out of the system is KJOB. This will give options for you to manage your files to get them under quota.

The quotas are set via the user administration utility REACT, which we'll look at later.

Further information

See the Operating Systems Command Manual on Bitsavers for full documentation of TOPS-10 commands.

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 and I will add it here and update the main text.


TOPS-10: A quick tour using simh

In this post I will show how to get TOPS-10 version 6.03 running using the simh emulator.

/images/pdp-10/tops-10-startup.png Starting up TOPS-10, with the console on top and the user login below. Source: Rupert Lane. License: CC0.

The quick start repo

I have put together a repo on Github that uses Richard Cornwell's KA PDP-10 KA simh emulator along with a ready-to-use disk image or TOPS-10 6.03 produced by the PiDP-10 project, which contains a tested install of the operating system along with many additional programs such as compilers.

To use this, you will need a Unix-like environment capable of running a shell, git, make, a C compiler, wget and unzip.

You will also need the telnet command line program or a GUI telnet client.

First, clone the repo and cd into it

git clone https://github.com/timereshared/dec-tops-10-simh-quickstart.git
cd dec-tops-10-simh-quickstart

Then type ./build.sh. This will

  • Download opensimh using git and compile the pdp10-ka emulator binary.
  • Download a copy of the TOPS-10 disk images.

This will take around 2-3 minutes and will only need to be done once. The virtual disks are stored in disks/ and take up about 310MB of space.

Start TOPS-10

Type ./run.sh. The system will boot up and the date/time will be set automatically using today's day/month but with the year set to 1979. as this version of TOPS-10 is not Y2K compliant.

Sometimes the system hangs after printing %DPA7 IS OFF-LINE. In this case, press Control-E, type q and then ./run.sh again.

If all goes well, you will see it print KA603 (time) CTY system 50.

Using a telnet client, connect to port 10603 (eg via telnet 0 10603.)

You can then login as user 100,100 and password demo1. Type login 100,100 and then enter the password at the prompt. Your screen will look something like the image at the top of this post.

Using the TOPS-10 CLI

The command line interface has a . as its prompt. When you type commands you can use backspace to correct mistakes, but as the system was used on teletypes it will not rub out characters, instead printing what has been deleted between backslashes. For example, if I typed abcdef, realised the last three letters were wrong, deleted them and typed xyz the screen would look like.

.ABCDEF\FED\XYZ

If you make several mistakes you can request the whole line to be retyped by pressing Control-R. Control-U can be used to delete the entire line.

Control-T will print a line of system statistics, including the current job you are running.

You can enter a command of more than a single line by typing - as the last character on a line, pressing Enter, and continuing the command text on the next line.

Commands can generally be abbreviated: for example instead of typing DIRECTORY to see a list of your files, you can just type DIR.

There is an online help facility accessed by typing HELP. You can view details of a single command by giving its full name as a parameter, eg HELP DIRECTORY.

Creating a simple program

Let's create a simple hello world program using Fortran. We will use the SOS editor to create the source file then compile it and run it.

Type SOS HWORLD.FOR to create a new file and put us in the editor. As this is a new file, the editor will allow you enter text immediately. It will precede each line with a line number (which is not a Fortran label) automatically. So the screen will look something like this after you start SOS.

.sos hworld.for
Input: HWORLD.FOR
00100

Type the following program. Where you see below you should press the Tab key rather than typing spaces.

	DO 1 J=1,5
1 	WRITE(5, 2)
2 	FORMAT(' HELLO, WORLD')
	END

Now to exit inserting press Alt-mode - which is Escape on your keyboard - and SOS will respond with $ and then * to show you are back at its prompt. If you have made a mistake, you can replace a line by typing Rnnn where nnn is the line number.

When ready, type ES at the prompt to exit with unsequenced lines (ie don't preserve the line numbers).

The complete editing session will look like this:

.sos hworld.for
Input: HWORLD.FOR
00100		DO 1 J=1,5
00200	1	WRITE(5, 2)
00300	2	FORMAT(' HELLO, WORLD')
00400		END
00500	$
*es

[DSKB:HWORLD.FOR]
.

You can use TYPE to see the contents of the file:

.type hworld.for
	DO 1 J=1,5
1	WRITE(5, 2)
2	FORMAT(' HELLO, WORLD')
	END

Now use EXECUTE to compile, load and run the program:

.execute hworld
FORTRAN: HWORLD
MAIN. 	
LINK:	Loading
[LNKXCT HWORLD Execution]

HELLO, WORLD
HELLO, WORLD
HELLO, WORLD
HELLO, WORLD
HELLO, WORLD

END OF EXECUTION
CPU TIME: 0.00	ELAPSED TIME: 0.00
EXIT

You can use DIR with a wildcard to show the files that have been created.

.DIR HWORLD.*

HWORLD	REL     1  <057>   12-Jan-79	DSKB:	[100,100]
HWORLD	FOR     1  <057>   12-Jan-79
  Total of 2 blocks in 2 files on DSKB: [100,100]

Logging off and shutting down the system

In the telnet window, type R LOGOUT to end your session.

.R LOGOUT

Job 4, User [100,100]  Logged off TTY0     1047  12-Jan-79
Saved all files (45 blocks)
Runtime 0.57 Sec

To shut down the system, switch to the simh window, press Control-E and type do shutdown.ini.

Simulation stopped, PC: 146766 (JRST 0,146772)
sim> do shutdown.ini
:kill all

 **
BOOTS
Goodbye
$

When you want to use the system again, type ./run.sh and log in as before.

Further information

In the TOPS-10 Software Notebooks on Bitsavers, Getting Started with Decsystem-10 covers similar material.

See Richard Cornwell's TOPS-10 kit page for other versions of the operating system. The kits also contain simh scripts to build the system froms scratch, which is useful if you want to customise it further.

The PiDP-10 project's software provides an integrated system that can run TOPS-10, ITS and TOPS-20, even without a physical PiDP-10.

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 and I will add it here and update the main text.


DEC TOPS-10

For background information on the PDP-10, see the previous article.

TOPS-10 (standing for either Time-sharing or Total Operating System-10) was DEC's first operating system for the PDP-10 family of computers. It grew out of the original Monitor for the PDP-6 released in 1964, with the TOPS-10 name coming around the time the PDP-10 was launched. It received many updates adding new functionality and support for newer hardware, with the final release coming in 1988.

TOPS-10 drew influences from CTSS, such as project/programmer numbers to identify users and the load/save model for program images. In turn it influenced many later operating systems, both from DEC and elsewhere - its use of three letter file extensions and the / to introduce command line switches will be familiar to MS-DOS users.

/images/pdp-10/pdp-10-time-sharing-handbook.png Detail from the cover of the PDP-10 Time-sharing Handbook 1970. Source: Bitsavers

Versions

Phil Budne's guide to TOPS-10 evolution provides an overview of release dates and features for each version. Richard Cornwell's list of software kits shows what's available.

In thus series of blog posts we're going to focus on version 6.03 from 1977, running on the PDP-10 KA processor. We'll use Richard Cornwell's pdp10-ka simh emulator to run this.

TOPS-10 features

TOPS-10 has a resident supervisor which has a dual role: firstly, providing access to machine resources and scheduling tasks, similar to a kernel on Unix based OSs. Its second role is to provide the main interface to user via the command control language - similar to a shell, but with code shared by users. Scheduling was done via priority queues, with support for real-time jobs.

The system can swap jobs in and out of disk and share code segments between programs. The particular version we are looking at did not support virtual memory and paging, however.

Users are identified by a project/programmer pair of numbers - eg [10, 11] - and access to the system is controlled by a password for each user.

The file system can span multiple disks. Each user gets their own directory to store files, and can share files by granting access to them. It's also possible for users to create sub-directories.

Peripheral devices such as printers, tapes or punched can either by shared by all users, with spoolers running to marshal access, or can be allocated to a specific user via a command.

The core system provides a set of utilities to manage files - both by individual commands such as RENAME and the powerful PIP (peripheral interchange program). Several editors were provided, from the simple SOS to the more complex TECO. Compilers and interpreters were available for BASIC, Fortran, COBOL and many other languages.

The system has a batch facility that allows jobs to be run at the same time as time-sharing users are logged in.

Topics

In this series of blog posts I plan to cover

  • A quick start guide to getting TOPS-10 running under emulation.
  • Files and directories
  • The SOS text editor
  • Jobs on TOPS-10
  • PIP
  • System users and creating new users
  • Getting data into and out of the system.
  • The TECO text editor
  • Runoff document preparation
  • The operator's console
  • Installing TOPS-10 from scratch
  • Programming under TOPS-10
  • A look at each programming language supported.
  • The DECUS software collections

Further information

Bitsavers has a wide collection of documentation: see the TOPS10 and TOPS10 Software Notebooks directories. Note that these cover different versions of the operating system, so not all features may work - check the date on each manual. A good place to start is 1974's Introduction to DECsystem-10 Software.

Questions, corrections, comments

January 2026: Lars Brinkhoff pointed out an error I made regarding the launch date of the PDP-10 and the name change of the OS to be TOPS-10. The first PDP-10 KAs were shipped in 1967. The name TOPS-10 started being used around that time, but I could not find an exact date.

I welcome any questions or comments, and also especially any corrections if I have got something wrong. Please email me at rupert@timereshared.com and I will add it here and update the main text.


DEC PDP-10

/images/pdp-10/pdp-10-reference-handbook-detail.jpg Detail from the cover of the PDP-10 Reference Handbook 1970. Source: Bitsavers

The PDP-10 family of computers (under different names) was manufactured by Digital Equipment Corporation between 1964 and 1983. Designed for time-sharing, batch and real-time systems, these computers were popular with universities, scientific companies and time-sharing bureaux. Several operating systems were available, some from DEC and some built by its users.

It had a large influence on operating system design, artificial intelligence (especially at MIT and Stanford), programming languages (LISP, ML), applications (TeX, Emacs), online communication (ARPANET, Compuserve), games (Advent, Zork) and even helped development of Microsoft's first version of BASIC.

Hardware

The first computer in the family was the PDP-6 which used germanium transistors. It had a 36 bit word, up to 256kW of core memory and ran at approximately 250kHz. It was large (500-700kg), expensive ($300k) and was not very reliable. Only 23 systems were sold, but the architecture was well received by its initial customers such as MIT.

A very similar architecture but advances in digital logic technology and a reliable manufacturing process was used for the PDP-10. Several CPU models were introduced, starting with the KA10 in 1968. This was replaced by the KI10 using TTL and in 1975 by the ECL based KL10. A cheaper variant called the KS10 arrived in 1978. DEC marketed the PDP-10 under the name DECsystem-10 and -20. Xerox PARC and several startups also experimented with clones of the hardware.

During its lifetime, advanced in memory, storage and peripherals were introduced, and there were also multiprocessor variants.

Operating systems

DEC's original operating system for the PDP-6 was called the Monitor and used just 6kwords of memory. This was enhanced and renamed as TOPS-10 (Time-sharing / Total Operating System-10) with the introduction of the KA processor.

Sites would often customise TOPS-10 systems, adding special hardware and facilities to support them in the OS. One notable version was Stanford's WAITS, which evolved to be a separate operating system. The time-sharing bureau Tymshare developed TYMCOM-X based on TOPS-10.

BBN took the KA and added paging hardware which was not compatible with TOPS-10; they built their own system called TENEX. Eventually, DEC brought this in-house and released it as a supported OS called TOPS-20.

MIT, as an early PDP-6 customer for their AI lab, went a completely different direction, developing their own unique operating system called ITS (Incompatible Time-sharing System, a play of words on CTSS.

Preservation status

There's a great collection of PDP-10 software and documentation in the Github PDP-10 organisation, created by Lars Brinkhoff and around 50 other volunteers.

Software kits are available for TOPS-10, TOPS-20, WAITS and ITS: see the above, the trailing-edge collection of tapes, and Richard Cornwell's page.

There is a large amount of documentation on Bitsavers.

Zane Healy's The DEC PDP-10 Emulation Webpage also has a good collection of links to other PDP-10 sites, some of which you may need to use the Wayback Machine to access.

Emulation status

Probably the most comprehensive suite of emulators is Richard Cornwell's simh-based emulators for the PDP-6 and the KA/KI/KL/KS model PDP-10s. This had been merged into opensimh.

Also of note is Ken Harrenstein's KLH10 for the KS10 and KL10, and Bob Supnik's original KS10 emulator for simh.

The PiDP-10 recreates in hardware the PDP-10's front panel connected to a Raspberry Pi running simh. A lot of MIT AI Lab hardware is also demonstratable using this project.

The Interim Computer Museum holds a collection of PDP-10s formerly exhibited at Seattle's Living Computer Museum. Many of these systems, along with some emulators, are available online at ssh menu@tty.sdf.org:.

Coverage on this site

I plan to cover each of the below available operating systems, though probably not all immediately. When a system is added, click the links below to find out more.

Further reading

Wikipedia's page for the PDP-10 is a good place to start.

Gordon Bell, who was an architect at DEC for the PDP-6 and other systems, wrote a paper The Evolution of the DECsystem 10 which gives a great overview of the system's hardware and software, along with its impact.

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 and I will add it here and update the main text.


Site Update

That brings us to the end of the series of posts about Burroughs MCP.

Next update to this blog will be in the new year, where I will look at our first operating system for the DEC PDP-10, TOPS-10.


Next →