[HN Gopher] What does LETTER. do in LISTRD in FAP from 196x?
       ___________________________________________________________________
        
       What does LETTER. do in LISTRD in FAP from 196x?
        
       Author : abrax3141
       Score  : 18 points
       Date   : 2024-11-26 18:41 UTC (7 days ago)
        
 (HTM) web link (drive.google.com)
 (TXT) w3m dump (drive.google.com)
        
       | abrax3141 wrote:
       | 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.)
        
         | secondcoming wrote:
         | ChatGPT seems to know the answer. Is it not correct, or would
         | you prefer verification by a human?
        
         | kens wrote:
         | > Notice cards are (were) 84 characters in width
         | 
         | Maybe I'm misunderstanding what you mean by a card, but the
         | 7090 used 80-column punch cards of which 72 columns could be
         | read into the computer. (Which is why Fortran used 72-character
         | lines.) The 7090 had a plugboard so you could select which 72
         | columns you wanted, but normally it would be the first 72. Why
         | 72? Because cards were read "sideways" and 72 columns fit into
         | two 36-bit words.
        
           | kps wrote:
           | > Because cards were read "sideways"
           | 
           | That is, cards were read row by row, not
           | column-(character)-by-column -- one 'bit' from every
           | character at once. And this is the case for practically all
           | card equipment. That surprised me a bit when I first learned
           | it, as someone used to sequential character streams, but it
           | makes sense in the context of pre-computer card operations,
           | where cards and holes started and stopped counting wheels for
           | each digit (column) at once to calculate totals.
        
       ___________________________________________________________________
       (page generated 2024-12-03 23:01 UTC)