Site Update

That concludes the series of articles on Dartmouth DTSS. If you'd like to learn more about how it evolved, this book at bitsavers is a useful guide. There's also a list of what user programs were available on the system in 1972.

A book by Joy Lisi Rankin, A People’s History of Computing in the United States, explores at the development of DTSS and BASIC, and its impact on non-specialist users.

Next update to this blog will be in August, where I want to quantify exactly how many time-sharing systems are runnable via emulation today, and after that look at the Master Control Program running on the Burroughs B5500.


Dartmouth Time-sharing System: Algol 60

The Algol family of languages and Algol 60

Algol was originally designed by a committee of European and American computer scientists in the 1950s-60s. The first version to be widely implemented was Algol 60, which is what we will look at here.

Dartmouth had experience of implementing subsets of Algol on its smaller computers before DTSS, and this was the second language to be introduced on DTSS after BASIC in 1964.

/images/dtss/ge225-system.png

An illustration of a GE-225 system from "GE 200 Series Operation Manual", GE, 1966. Source: bitsavers.

Algol 60 on Dartmouth DTSS

One important point when dealing with Algol is different levels or representations of the language: there is one for the spec, one for printed programs and one for the machine implementation. As an example, to raise a to the power b:

  • Spec: a ↑ b
  • Printed: ab
  • Machine - Dartmouth: a ^ b
  • Machine - IBM: a ** b

We'll use the printed form in this article and the Dartmouth machine form for code examples.

Keywords are in bold lower case in the printed form (eg integer). Dartmouth uses upper case (eg INTEGER). (IBM used quotes, eg 'INTEGER', which must have been a pain to type).

Here's an example program that will print Hello World 5 times

10 BEGIN
20 INTEGER I;
30 FOR I := 1 STEP 1 UNTIL 5 DO
40     PRINT("HELLO, WORLD")
50 END PROGRAM

The line numbers are not part of Algol but are needed for the Dartmouth program editor.

Statements are grouped into blocks, separated by semicolons; the last statement in a block does not need a semicolon.

Variables are typed (real, integer, boolean); strings are allowed only as constants.

Algol has no standard I/O - reflecting how different each computer was at that time, it was up to the implementation to add this. Dartmouth Algol uses print much like BASIC for output.

Let's exercise Algol further by implementing the TPK algorithm.

TPK in Algol 60

100 BEGIN
110     COMMENT TPK ALGORITHM IN ALGOL 60;
120 
130     REAL PROCEDURE FN(X);
140     VALUE X;
150     REAL X;
160     BEGIN
170         FN := SQRT(ABS(X)) + 5*X^3
180     END PROCEDURE;
190 
200     COMMENT MAIN PROGRAM;
210     INTEGER N, J;
220     REAL ARRAY A[1:11];
230     N := 11;
240     COMMENT READ NUMBERS FROM DATA;
250     FOR J := 1 STEP 1 UNTIL N DO
260         READATA(SAMPLE, A[J]);
270     PRINT("RESULTS ARE");
280     FOR J := N STEP -1 UNTIL 1 DO
290     BEGIN
300         REAL RESULT;
310         RESULT := FN(A[J]);
320         IF RESULT > 400.0 THEN
330             PRINT("TOO LARGE")
340         ELSE
350             PRINT(RESULT);
360     END LOOP;
370     DATA SAMPLE := 10, -1, 1, 2, 3, 4, 4.3, 4.305, 4.303, 4.302, 4.301;
380 END PROGRAM

The indentation is for readability only and is not required by the language. Contemporary users would probably pack more statements per line so as to use less vertical space on the typewriter output. It's not shown here, but you can also spread out statements over several lines and even include spaces in variable names.

In the procedure definition, note that we declare the input parameter X as having real type and also value class, so it is passed by value; the other option is name which is similar to pass-by-reference.

The main program starts on line 200. Note that variables need to be declared before they are assigned to, and arrays can have arbitrary indices.

The program uses the readata procedure, which is a Dartmouth extension to read items from the matching data statement, similar to BASIC READ and DATA. print is also a Dartmouth extension.

At line 300, note that RESULT is declared in the for block so its scope lasts until the end of the block only; this was an innovation of Algol.

Executing this on the emulator

  • See the quick tour on how to get the emulator running.
  • Download the source file from Github.
  • If you are not on Windows, ensure the file has CR/LF line endings. A simple way to do this:
awk 'sub("$", "\r")' < input_file > output_file
  • Store the file as TPKA (no extension) in the same directory as DTSS.EXE.
  • Start DTSS.
  • Type SYSTEM ALGOL to switch from BASIC to Algol.
  • Type OLD TPKA.
  • Type LIST to confirm the source has been loaded.
  • Type RUN.

Further information

The DTSS zip file contains An Algol Outline.pdf.

The Revised Report on the Algorithmic Language Algol can be considered as the standard definition of the language.

There are some contemporary books on the Internet Archive: Dijkstra's A Primer of Algol 60 Programming is terse but readable; McCracken's A Guide to ALGOL Programming is a more traditional text book.

I wrote an overview of Algol 60 on the IBM S/360 under MTS here, which goes into more detail on the language and how IBM implemented it.

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.


Dartmouth Time-sharing System: BASIC

According to their 1985 book Back to BASIC, Kemeny and Kurtz had eight goals in mind when designing the language.

  1. It should be easy to learn for the beginner.
  2. It should be a general-purpose language, allowing the writing of any program.
  3. Advanced features had to be added so that, if there was a price, it would be paid by the expert, not the novice.
  4. It should take full advantage of the fact that the user could interact with the computer.
  5. It should give error messages that were clear and friendly to the user.
  6. It should give fast response for small programs.
  7. No understanding of the hardware should be necessary.
  8. It should shield the user from the operating system.

Let's take a look at the language in its first implementation on DTSS in 1964.

/images/dtss/basic-manual.png Detail from the cover of the original BASIC manual. Source: Bitsavers.

Dartmouth BASIC

There are only 15 keywords.

    LET       GOTO      RETURN 
    PRINT     IF        DEF    
    END       FOR       DIM    
    READ      NEXT      REM    
    DATA      GOSUB     STOP

All variables are floating point numbers, and variables names must be a single character or a single character followed by a single digit. You have to use the LET keyword to assign to variables.

PRINT can print numbers or strings enclosed in double quotes.

This early version could only write data back to the user running the program and was unable to take input from the the user. This was implemented two years later by adding the INPUT keyword and OS support. The emulator does support INPUT, but we'll be historically accurate by using the READ statement to take data from a DATA statement in the program.

GOTO allows jumps to any line number, GOSUB also jumps to the given line number, but when RETURN is reached it will transfer execution back to the line after the GOSUB.

Up to 26 functions, containing a single expression only like Fortran, can be defined with DEF.

The result of an IF statement can only be a line number which is jumped to if the expression is true.

Let's exercise BASIC by implementing the TPK algorithm.

TPK in BASIC

100 REM TPK ALGORITHM IN BASIC
110 
120 DEF FNT(X) = SQR(ABS(X)) + 5*X^3
130 
140 REM MAIN PROGRAM
150 DIM A(11)
160 LET N=11
170 REM READ NUMBERS FROM DATA
180 FOR I = 1 TO N
190 READ A(I)
200 NEXT I
210 PRINT "RESULTS ARE"
220 FOR J = 1 TO N
230 LET K = N - J + 1
240 LET R = FNT(A(K))
250 IF R > 400 THEN 280
260 PRINT R
270 GOTO 290
280 PRINT "TOO LARGE"
290 NEXT J
300 DATA 10, -1, 1, 2, 3, 4, 4.3, 4.305, 4.303, 4.302, 4.301
310 END

In line 120, we use ^ to raise X to the power of 3.

Arrays are zero indexed, but we use 1-11 for the array defined on line 150.

The READ on line 190 takes values in order from the DATA on line 300. You could substitute INPUT A(I) here to take input from the user.

Executing this on the emulator

  • See the quick tour on how to get the emulator running.
  • Download the source file from Github.
  • If you are not on Windows, ensure the file has CR/LF line endings. A simple way to do this:
awk 'sub("$", "\r")' < input_file > output_file
  • Store the file as TPK (no extension) in the same directory as DTSS.EXE.
  • Start DTSS.
  • Type OLD TPK.
  • Type LIST to confirm the source has been loaded.
  • Type RUN.

The results will look like this:

OLD TPK
RUN

TPK     18:55      JUN 23, 2025

RESULTS ARE
 399.886
TOO LARGE
TOO LARGE
TOO LARGE
  399.609
  322
  136.732
  41.4142
  6
-4
TOO LARGE


TIME 0. SECS

Further information

The DTSS emulator zip file contains A BASIC Outline.pdf. A 1964 introduction to the system and BASIC can be found on bitsavers.

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.


Dartmouth Time-sharing System: Architecture

As mentioned in the introduction, DTSS comprised of two computers, a GE-235 to run user programs and a DATANET-30 to talk to terminals and schedule tasks, both sharing a disk drive. Let's look at how this worked in more detail. This describes the system at around its launch in 1964; it was considerably expanded later.

/images/dtss/dtss-architecture-diagram.png

Architecture diagram from "DTSS: A Brief Description", Computation Center, Dartmouth College, 1964. Source: bitsavers.

User interface

The user interface was much like we saw in the emulator quick tourm with the addition of a HELLO command for the user to identify themselves via a numeric ID; there were no passwords.

The user can either be editing their program - indicated by a typing a number at the start of a line - or submitting commands such as LIST or RUN. The commands are not tied to BASIC, so you could use them if programming in ALGOL, for example.

The DATANET-30

The DATANET-30 was intended by GE to be a smart communication controller, capable of handling several terminal lines, buffering data and sending messages. It had 18-bit words and was relatively fast. It was interrupt driven and had a stored program facility which Dartmouth used to create an operating system. This was divided into real-time and spare-time tasks.

The real-time part was driven by an interrupt running 110 times per second. It would scan the lines for activity and store them in buffers. For commands, it would set up a job entry and store it in the spare-time queue.

The spare-time part ran every second and would examine its queue. Programs being developed would be sent to the disk. Command such as RUN would cause the DN-30 to send a message to the GE-235 to do the actual work of compiling and running the program.

The disk drive stored up to 16 million words of data and was connected to both the DN-30 and the GE-235.

The GE-235

The GE-235 was more powerful than the DN-30 for integer and floating point arithmetic. It had up to 16,000 words of core memory, each word having 20 data and 1 check bit.

During time-sharing, its operation was controlled by the DN-30. It held the compilers and execution services in memory. When it receives a message from the DN-30, it read the user program from the disk and starts compiling and executing it - so user programs were compiled every time they were run rather than saving object files. At run-time user programs had access to 6,000 words of memory.

As far as I can tell from the documentation, only one user program could be in memory at any time: the DN-30 could tell the GE-235 to write the contents of memory to disk in order to process another user program. The 1964 documentation states that the system was good at running a number of short jobs this way, but there could be waits of 5-10s for jobs to be executed. However, longer running jobs were not really suitable for this system.

Peripherals such as tapes and card readers were not used during time-sharing, but were used for system development purposes, presumably in a batch execution mode.

Further information

From bitsavers:

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.


Dartmouth Time-sharing System: A quick tour using DTSS.EXE

In this post we'll look at how to get the Dartmouth Time-sharing System emulator DTSS up and running. As mentioned in the previous post, this is fairly limited in what it can do, but gives a flavour of what a user of the system in around 1964 would see.

/images/dtss/dtss-exe-simple-program.png

Running DTSS.EXE. Source: Rupert Lane. License: CC0.

Set up

Download the Windows zip file from the dtss.dartmouth.edu site and unpack it to a directory. Then just run the DTSS.EXE program to start; on non-Windows devices with Wine installed, run wine DTSS.EXE instead.

There are no user configurable options to adjust the simulator or interface.

Input should all be in upper case. Note that copy/paste does not work, usually bringing up an error message that ends the emulator. But there is a way to get programs in and out of the system - see below.

Entering a simple BASIC program

Type NEW HELLO to start a new program called HELLO. Then type the program lines including the starting line number.

10 FOR I = 1 TO 5
20 PRINT "HELLO, WORLD"
30 NEXT I
40 END

You can edit the program by retyping any lines. To delete a line, just type the line number and press Enter.

Type RUN to start the program and LIST to get a listing.

To save the program to disk, type SAVE.

You can then exit the emulator by typing BYE or just closing the window. When you come back, load your old program by typing OLD HELLO.

Program libraries

There are two libraries, a personal one and a system one. Type CAT to see your library: you will see your HELLO program along with a number of other demo programs.

To see what is in the system library, type OLD LIBCAT*** then LIST. To load one of these programs, for example FTBALL, type OLD FTBALL*** (note the *** at the end to denote a system program.

100 BASIC PROGRAMS
110 
120 AVELOG***   AVERAGE OF 100 LOGARITHMS
130 FTBALL***   DARTMOUTH FOOTBALL
140 GUESS***    GUESS A NUMBER FROM 1 TO 100
150 GCD***      GREATEST COMMON DIVISOR (GCD)
160 GCD3NO***   GCD OF THREE NUMBERS
170 MORT***     CALCULATES LIFE OF A MORTGAGE
180 NORMAL***   PLOT OF THE NORMAL CURVE
190 QUAD***     SOLVE A QUADRATIC EQUATION
200 PIE***      APPROXIMATE PIE

Getting data in and out

Programs are stored on the host file system as plain text files, with your library in the same dierctory as the executable, and the system library under LIB/. So to see the text of your HELLO program, look for the file named HELLO without an extension.

You can view, edit and create new files outside of the emulator using this method. Remember to save files in DOS format, ie with CR/LF at the end of each line.

Other features

The SPEED command will adjust the speed of the emulator: SPEED 10 is approximately the speed of the original system.

You can switch from BASIC to ALGOL with SYSTEM ALGOL.

There is a computer aided learning system called TEACH available also.

Further information

The DTSS emulator zip file contains three useful documents.

  • Commands.pdf
  • A BASIC Outline.pdf
  • An Algol Outline.pdf

A 1964 introduction to the system and BASIC can be found on bitsavers.

We'll look at BASIC and ALGOL in more detail in upcoming posts.

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.


← Previous  Next →