AID - the JOSS language for TOPS-10
AID, or the Algebraic Interpretive Dialogue, was DEC's first public version of the JOSS interpreter for the PDP-6/10.
JOSS - the JOHNNIAC Open Shop System - was an early time-shared language created at the RAND corporation in 1963. This ran on JOHNNIAC, a computer they had built in house, and offered 20-30 users who were not expert programmers the ability to write short mathematical programs.
By 1964 the JOHNNIAC was not powerful enough to support demand so RAND and DEC worked together on a successor, JOSS-II, to run on the new PDP-6. This was a complete operating system allowing multiple users to run JOSS from their own teletype.
AID is a standalone version of JOSS that runs as a normal program on TOPS-10. I'm not sure on how much of the code of JOSS-II is in AID, but DEC's manual says:
Digital Equipment Corporation is grateful to The RAND Corporation for permission to adapt the language processors of JOSS for the PDP-l0.
Installing AID
By default, AID does not come with the 6.03 version of TOPS-10 we are using, so we will need to restore it first from a tape of customer supported programs from pdp-10.trailing-edge.com.
- Get a copy of this tape file and decompress it using
bunzipor similar. - Copy it to your simh installation directory.
- With TOPS-10 running, press Control-E on the simh console and attach the tape file to MTA0
sim> at mta0 bb-x130a-sb.tap %SIM-INFO: MTA0: Tape Image 'bb-x130a-sb.tap' scanned as SIMH format sim> continue
- Log in to TOPS-10 as user [1,2], password FAILSA. Run
BACKUPand restore the executable file toSYS:
.r backup /tape mta0: /rewind /restore dskb:[1,4]=aid.exe ! "Done /exit
- Finally, still as [1,2], set permissions:
.protect sys:aid.exe <155>
AID can now be run via R AID by any user.
Using AID
After you start AID, you can enter simple expressions at the *
prompt.
.r aid AID 20A(32) AT YOUR SERVICE ... *type 22/7 22/7 = 3.14285714 *a = 12 *b = 30 *type a+b a+b = 42
or you can enter programs, using decimal line numbers:
*1.0 Do part 5 for i=1(1)5 *5.0 Type "Hello, world" *do part 1 Hello, world Hello, world Hello, world Hello, world Hello, world
Note that loops can be added at the end of any expression: here we
call part 5 (the hello world print) via for i=1(1)5 with the numbers
being the initial, step and final value.
Just like the original JOSS, any errors you make will be reported with the single message "Eh?"
It's possible to save your code (and variables defined in the environment) to a disk file. First you specify a file number to work with:
*use file 123 Roger.
and then save your code to a item number under that file:
*file all parts as item 5 Done.
If you quit out of AID with a Control-C and do a DIR you can see
the file that has been created - in this case QQ0123.J05. This is in
binary format and so cannot be easily manipulated by editors such as
SOS
To load in the code from disk:
*use file 123 Roger. *recall item 5 Done. *list all parts 1.0 Do part 5 for i=1(1)5 ...
Running TPK
Let's use AID to run the TPK algorithm. The source code can be found here but will need to be typed in to the interpreter directly.
.r aid
AID 20A(32) AT YOUR SERVICE ...
*1.000 Let t(x) = sqrt(!x!) + 5 * x ^ 3.
*1.010 Type "Please enter 11 numbers".
*1.020 Do part 2 for j=1(1)11.
*1.030 Type "Results are".
*1.040 Do part 3 for j=11(-1)1.
*1.050 Stop.
*
*2.000 Demand a(j).
*
*3.000 Let r = t(a(j)).
*3.010 Type "Too large" if r > 400.
*3.020 Type r if r <= 400.
*
*do part 1
Please enter 11 numbers
a(1) = *10
a(2) = *-1
a(3) = *1
a(4) = *2
a(5) = *3
a(6) = *4
a(7) = *4.3
a(8) = *4.305
a(9) = *4.303
a(10) = *4.302
a(11) = *4.301
Results are
r = 399.8863
Too large
Too large
Too large
r = 399.608644
r = 322
r = 136.732051
r = 41.4142136
r = 6
r = -4
Too large
Stopped by step 1.05.
This exposed a number of differences from the original JOSS:
- Variables and functions are single characters, but are case sensitive.
- The character set is different: use
*for multiplication.^for exponentiation and!x!to find the absolute value ofx. - There is no support for comments (which JOSS defines as lines
starting with or ending with
*.
Further information
On Bitsavers, DEC's documentation of the AID system can be found in the PDP-10 Timesharing Handbook from 1970: see the section "Conversational Programming With AID" starting on page 123.
RAND's documentation for JOSS, such as The JOSS Primer, can be used for AID with small modifications.
There's a reconstruction effort for the original JOSS-II on github.
This includes source code, and also many other JOSS documents in the
doc/ directory.
Later on, DEC created FOCAL which made more extensive changes to the
JOSS language. This is available on the 6.03 distribution we are using
(via R FOCAL) but I will look at this later on when I cover TOPS-20.
I've written about other JOSS dialects before: WIPL for MCP on the Burroughs B5500 and PIL for the Michigan Terminal System on the IBM System/360.
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.