Getting APL\11 1976 to work --------------------------- I've tried to get many different versions of APL\11 to compile, but of particular interest was getting the oldest version (discovered so far) to compile. This version is the Yale APL\11 version which was completed in Oct 1976. Since it was from 1976 I figured it would probably compile and run on Unix version 6. It eventually did compile and run but certain modifications to the code had to be made. I decided to use the contents of file uv6swre.zip for my baseline unix v6 which I used in conjunction with the simh emulator for pdp-11's. Virgin unix v6 was written for a PDP-11/40 machine with 18-bit addressing, and APL\11 1976 will work on a PDP-11/40. The steps in this process are instructive and we will see that baseline unix v6 requires a certain amount of hand-turning. First create the special files so the emulated tape drive will work: /etc/mknod /dev/mt0 b 3 0 /etc/mknod /dev/tap0 b 4 0 /etc/mknod /dev/rmt0 c 12 0 It was critical to get a version of tar that would function with unix v6 so the transfer of APL\11 source code would be practical. Fortunately there was a binary of v6tar available. To get this onto v6 we do this: conv2 -o v6tar.tap v6tar then reference this file in an ini file: att -r tm0 v6tar.tap get v6tar into the unix v6 filesystem: dd if=/dev/mt0 of=v6tar bs=1 count=27494 then: v6tar 0x will transfer the files from the tape archive For compiling APL\11 I used the original Yale documentation but made some changes to the compile script: : install APL as ax.s;mv a.out ax.o yacc apl.y cc -n -f a?.c y.tab.c ax.o -ly mv a.out apl This created a "pure executable". In Yale's original file to compile APL\11 it passes the -i flag to cc which creates a "separate executable". The separate executable version will core dump every time the user tries to edit a file. APL\11 calls "ed" to edit files. The Yale docs talk about this: "At Yale we use separated I/D space with APL. Other places probably shouldn't because 1) it uses the system wait() routine which calls nargs() (which works with I/D space at Yale for complicated reasons) and 2) the mathematical functions in /lib/liba.a all have to be modified to work right with I/D space." in file ak.c two functions were stubbed out: line(x,y) move(x,y) which I assume were some sort of terminal functions. in file a9.c I commented out /* sclr(); */ which is probably a clear screen function The last part, writing APL\11 code that would work with this intepreter proved to be a bit of a puzzle until I realized that the syntax and operators of this 1976 version of APL\11 was very much different from all other versions of APL, different even from the version created in Feb 1977. After looking at the 1976 source code I realized that the [ character was being used as the assignment operator and not { as in other versions of APL\11. Here is a quick example of APL\11 1976 in action: in file quick: a [ 1 2 3 b [ 3 4 5 a : b a - b a = b a J.P b v [ I10 v J.- v , :/v }off execute via: apl < quick I was able to write functions to find factorials and binomial coefficients. None of the other attempts to compile other versions of APL\11 for Unix v6 were successful. There is a binary of APL\11 which will work (but not compile) on Unix v6 & v7 dated from Feb 1977. There are too many defines in y.tab.c and the symbol table in the original Unix v6 cc is too small to handle it, but perhaps cc could be modified to allow this. I was fearful that if I made too many changes to cc or the operating system that everything would get botched up so I decided to freeze the operating system, compiler and APL\11 source at it's current state. No changes have been made to cc or it's libraries at all. In the future I hope to get the Feb 1977, Apr 1977 and Feb 1979 versions to compile on Unix v6 and v7. The pre-compiled APL\11 from 25 Feb 1977 will run on unix v6, note that the unix v6 kernel must be compiled with m45.s so that separate executables are supported.