I'm reading McCarthy's paper Recursive Functions of Symbolic Expressions And Their Computation by Machine, where when the author describes the machine implementation of lists, he writes this:

a. Representation of S-Expressions by List Structure. A list structure is a collection of computer words arranged as in figure 1a or 1b. Each word of the list structure is represented by one of the subdivided rectangles in the figure. The left box in the rectangle represents the address field of the word and the right box represents the decrement field. An arrow from a box to another rectangle means that the field corresponding to the box contains the location of the word corresponding to the other rectangle.

From further reading it isn't clear why would he use the word "decrement" to mean "a pointer to a memory location where the data associated with the given list element is stored". It doesn't exactly translate into "dereference" as used today when describing languages s.a. C, but if, in C terms, you were to treat the contents of "decrement" field as a pointer, and then dereference it, you'd get the value of the element.

So, why "decrement"? Was something really decremented? Was it due to some particular features of memory layout of IBM 704?


OK, I found a lead. Just needed to know what to search for: https://en.wikipedia.org/wiki/CAR_and_CDR

The 704 and its successors has a 36-bit word length and a 15-bit address space. These computers had two instruction formats, one of which, the Type A, had a short, 3-bit, operation code prefix and two 15-bit fields separated by a 3-bit tag. The first 15-bit field was the operand address and the second held a decrement or count. The tag specified one of three index registers. Indexing was a subtractive process on the 704, hence the value to be loaded into an index register was called a "decrement".[2]:p. 8 The 704 hardware had special instructions for accessing the address and decrement fields in a word.[2]:p. 26 As a result it was efficient to use those two fields to store within a single word the two pointers needed for a list.[3]:Intro.

Still, this memory model is very foreign to me, so I wouldn't mind if anyone explained how this would work.

  • $\begingroup$ It's not a memory model. It's just a mechanism to extract one (or the other) part of a word. (Think of C bitfields, for example.) $\endgroup$
    – rici
    Nov 22 '17 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.