Around 2005 I downloaded the CTSS listings tape from Paul Pierce's website and began looking through the various listings. I'd been in conversations with Bob Supnik and Rich Cornwell thinking that it would be cool to get CTSS running on our simulators. Bob also worked on documenting the CTSS hardware changes.
The first thing was to extend the cross support software, ASM7090 and LNK7090, and the simulator, s709, to support the CTSS environment. This required the addition of new CTSS mode instructions, in ASM7090 and S709, and changes for linking, LNK7090, to build the images in a way CTSS could load them. Changes to the cross support and simulator software continued during the reconstruction process as bugs were found and corrected.
At this point I started with some diagnostics and DSETUP program in the s.util.out file and extracted them into a separate files. I then removed all the listing page breaks and cut off the first 30 characters, columns, to remove the FAP assembler generated code. Any MACRO expansions were then removed and copied to an include directory with the same name as the MACRO. In some cases the macro had to be discovered in an other source module if they were UNLISTed. Blank lines or free standing comment required insertion of the REM, remark, pseudo op. Then several assembly passes to cleanup any residual assembly errors.
Here's an example of listing before and after "cleaning":
Before:
1 PAGE 1
NCLIB --- SUBROUTINE ENTRIES TO AVOID LOADING LIBRARY
PCC ON
PMC ON
00002 ENTRY CHNCOM EXIT TO CTSS
00031 ENTRY COMARG GET PARAMETER FROM COMMAND LIST
00007 ENTRY SETBCD SET CONSOLE IN 6-BIT MODE
00010 ENTRY SETFUL SET CONSOLE IN 12-BIT MODE
00011 ENTRY SETBRK SET CONSOLE INTERRUPT PROCEDURE
00012 ENTRY WHOAMI DETERMINE THE USER
00013 ENTRY RED CHANGE CONSOLE TO RED
00022 ENTRY BLACK CHANGE CONSOLE TO BLACK
TSSX MACRO A CALL CORE A
AXC *+1,4 .
TIA =H'A ..
TSSX END ..
LINKAGE DIRECTOR
00000 000000000000
00001 233045234644
00002 -0500 60 4 00001 EXIT CAL* 1,4 EXIT TO CTSS
00003 0621 00 0 00006 STA CHNARG
00004 -0774 00 4 00005 AXC *+1,4 EXIT TO NEXT COMMAND
00005 0101 00 0 00045 TIA =HCHNCOM .. OR GO DEAD OR DORMANT
00006 0 00000 0 00000 CHNARG PZE ** ..
00002 CHNCOM SYN EXIT CHNCOM SAME AS EXIT
00007 0101 00 0 00047 SETBCD TIA =HSETBCD SET CONSOLE IN 6-BIT MODE
00010 0101 00 0 00051 SETFUL TIA =HSETFUL SET CONSOLE IN 12-BIT MODE
00011 0101 00 0 00050 SETBRK TIA =HSETBRK SET CONSOLE INTERRUPT PROCEDURE
00012 0101 00 0 00052 WHOAMI TIA =HWHOAMI DETERMINE THE USER
00013 0634 00 4 00041 RED SXA X4,4 COLOR SHIFT TO RED
00014 0074 00 4 00010 TSX SETFUL,4 SET CONSOLE IN 12-BIT MODE
00015 TSSX WRFLXA GIVE RED COLOR SHIFT
00015 -0774 00 4 00016 AXC *+1,4 .001
00016 0101 00 0 00053 TIA =HWRFLXA .. .001
00017 0 00001 0 00043 REDS,,1 ..
00020 0074 00 4 00007 TSX SETBCD,4 RETURN CONSOLE TO 6-BIT MODE
00021 0020 00 0 00041 TRA X4 RETURN
00022 0634 00 4 00041 BLACK SXA X4,4 COLOR SHIFT TO BLACK
00023 0074 00 4 00010 TSX SETFUL,4 SET CONSOLE IN 12-BIT MODE
00024 TSSX WRFLXA GIVE BLACK COLOR SHIFT
00024 -0774 00 4 00025 AXC *+1,4 .001
00025 0101 00 0 00053 TIA =HWRFLXA .. .001
00026 0 00001 0 00044 BLACKS,,1 ..
After:
TTL NCLIB --- SUBROUTINE ENTRIES TO AVOID LOADING LIBRARY
PCC ON
PMC ON
REM
ENTRY CHNCOM EXIT TO CTSS
ENTRY COMARG GET PARAMETER FROM COMMAND LIST
ENTRY SETBCD SET CONSOLE IN 6-BIT MODE
ENTRY SETFUL SET CONSOLE IN 12-BIT MODE
ENTRY SETBRK SET CONSOLE INTERRUPT PROCEDURE
ENTRY WHOAMI DETERMINE THE USER
ENTRY RED CHANGE CONSOLE TO RED
ENTRY BLACK CHANGE CONSOLE TO BLACK
REM
TSSX MACRO A CALL CORE A
AXC *+1,4 .
TIA =H'A ..
TSSX END ..
REM
EXIT CAL* 1,4 EXIT TO CTSS
STA CHNARG
AXC *+1,4 EXIT TO NEXT COMMAND
TIA =HCHNCOM .. OR GO DEAD OR DORMANT
CHNARG PZE ** ..
REM
CHNCOM SYN EXIT CHNCOM SAME AS EXIT
REM
SETBCD TIA =HSETBCD SET CONSOLE IN 6-BIT MODE
REM
SETFUL TIA =HSETFUL SET CONSOLE IN 12-BIT MODE
REM
SETBRK TIA =HSETBRK SET CONSOLE INTERRUPT PROCEDURE
REM
WHOAMI TIA =HWHOAMI DETERMINE THE USER
REM
RED SXA X4,4 COLOR SHIFT TO RED
TSX SETFUL,4 SET CONSOLE IN 12-BIT MODE
TSSX WRFLXA GIVE RED COLOR SHIFT
REDS,,1 ..
TSX SETBCD,4 RETURN CONSOLE TO 6-BIT MODE
TRA X4 RETURN
REM
BLACK SXA X4,4 COLOR SHIFT TO BLACK
TSX SETFUL,4 SET CONSOLE IN 12-BIT MODE
TSSX WRFLXA GIVE BLACK COLOR SHIFT
BLACKS,,1 ..
The above editing, assembly and checking process was required on every file that was extracted from the source listing files. Also, I would take random files and compare the generated object to the object in the listing files to check for accuracy. The current count of extracted FAP files is 549 and 109 include, INSERT, files.
The extraction the the MAD source files underwent a different but similar process as the FAP assembler sources. The current count of extracted MAD files is 109.
The diagnostics allowed for the debugging of the simulator support of the CTSS hardware changes and the cross support development. With the DSETUP program built I could then work on getting it to run to format the disks, drums and MFD records. Many of the utilities are tape boot images.
At this point I could attempt to boot a "bare" CTSS kernel from a tape image. The tape load sequence is the same as any other program when loaded from tape. START is the entry point is in the MAIN8C module.
Once I got the kernel to perform a clean boot I needed to start loading the program images onto the CTSS disks. This required that I build a program to setup the program images, user file directories (UFD), file links, quotas and text files. I took the kernel main, stripped out the unneeded functions (comm. support for instance) and called a routine that I wrote to read the input tape and processes the images using the CTSS kernel's file routines. This also required that I write a utility, obj2img, to generate the tape images to be processed.
After starting with the LOGIN, LOGOUT and other support programs I could attempt to login as a user. Once I could login and logout I started adding programs written in FAP and libraries. The largest of these programs was the native FAP assembler as I would need it build a native kernel image and the MAD compiler. Up to this point I was booting the cross built kernel from a tape image. On May 28, 2010 I was able to login to CTSS:
$ telnet localhost 2023 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. s709 2.2.6 COMM tty0 from 127.0.0.1 CTSS 0 USERS AT 05/28/10 1352.2, MAX = 30 READY. LOGIN M1416 PITTS W 1352.3 PASSWORD M1416000001 LOGGED IN 05/28/10 1352.3 FROM 100000 HOME FILE DIRECTORY IS M1416 PITTS CTSS BEING USED IS CTSS PROGRAM STOP AT 01566 R .016+.000 LOGOUT W 1352.4 M1416000001 LOGGED OUT 05/28/10 1352.5 FROM 100000 TOTAL TIME USED = .0 MIN. Connection closed by foreign host.
It still needed some work. But, CTSS was alive!
The test of the current state of the system was to upload the CTSS kernel modules and attempt a native build. This required that I build and install the CTSS loader, LOADTS, using the dsetup program prior to attempting a native kernel boot. To build this I needed to upload the LOADTS program, the PUSAV program and extract the resulting absolute format image to make into a tape that could then be installed using the dsetup program. So, now I had to write a program that could be used to extract the images. As with the setup program I started with the stripped CTSS kernel main and wrote a routine to read an extraction control record and write requested file to tape.
After getting the LOADTS program installed I could now attempt the native CTSS kernel build. When I achieved a clean build I copied the BSS files and loader control file into CMFL01 directory. Now I could attempt to boot the CTSS system from disk.
After working out any bugs found in the disk booting procedure and getting a working system I extracted the generated BSS files to be used to load a new CTSS system at a later time without have to rebuild. These files would later be used in building the CTSS binary distribution kits.
I continued adding programs and getting the MAD compiler to run. Once the MAD compiler was built I starting compiling, building and testing the programs written in MAD. As each program was completed I extracted the MAD compiled BSS files and processed through a utility, BSS2OBJ that converted the BSS format into the format used by the LNK7090 linker, and stored in the source tree as MDO (Mad Object) extension files. This allowed me to link the MAD compiled programs to allow for an easy way to build them into the distribution kit installation tapes.
As I kept adding new CTSS programs I kept extending the utility programs that I'd written to more file type and modes. For example I added plotter file support to the extraction program. And utilities to add, delete users and report on user statistics.
For a while during this process I was considering how to distribute kits that could be used to just run the CTSS system without having to build it all from scratch or for those that might not have the expertise to perform a build.