Hacker News Clone new | comments | show | ask | jobs | submit | github repologin
What does LETTER. do in LISTRD in FAP from 196x? (drive.google.com)
2 points by abrax3141 2 hours ago | hide | past | web | 1 comment | favorite





Team ELIZA (and friends) are trying to make the original ~1965 MAD-SLIP ELIZA (discovered a few years ago in Jospeh Weizenbaum's MIT archives) run. A number of semi-overlapping groups are involved in this. Some have a 7090 emulator, some have a CTSS emulator on that, and some have various versions of MAD, SLIP, and the underlying FAP (IBM's Fortran Assembler) code that runs SLIP. (Yeah, I know. Go ahead and get the laughter out of your system. I did't name it!)

We (they) have this mostly under control, but for one single function, called "LETTER." that we cannot find the code for, and are having trouble divining the function of.

The code of concern is here:

  https://drive.google.com/file/d/1zAJ2zX9WaeR7Ui8F88ZNFZtI5Q-Ow5sb
If you search for "LETTER." there is a single call to it on card 00386. (MAD functions all end with "."; There are several occurrences of LETTER as labels, but only one function call.) This is in the function(entry) LISTRD. (000096) [This was in the days when functions could have multiple entry points in order to conserve memory.] and is used to load an array called KNOW (indexed by I). LISTRD is an s-expression reader (but into SLIP not LISP -- see below for LISTRD documentation).

Some potentially important factoids: The 7090 had 36 bit words and packed 6, 6-bit BCD characters into each. (You can see this in line 000356 where it appears to be packing 6 close parens (BCD 34k) into a word: CARD(I)=343434343434K (K for octal). Notice cards are (were) 84 characters in width and 84/6 is 14 -- the number 14 is used in multiple places as a loop limiter, so it's apparently scanning across cards (and the minimal comments and some variable names suggest this as well).

[Unfortunately, comments were used quite sparingly in those days because you had to punch them into cards!]

Again, the only function for which we don't have code is LETTER. So, okay, Sherlock Hackers...What exactly does LETTER. do and what exactly is it doing here?

Here's a SLIP manual:

   https://drive.google.com/file/d/1XtF7EM1KhwMPKsp5t6F0gwN-8LsNDPOl
LISTRD is documented on pg. 24 of the above manual.

(Possibly important is that lists had to start in column 1 with an open paren.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: