Repeatedly Folded Arithmetic

The PROCSY command interpreter offered simple logic but stopped short of any arithmetic. I found a way to hold a memory address in parameters and to increment it in the course of Backward Jumps.

The interpreter included a command that would print the contents of a single memory location. This would be useful for the systems staff who possessed listings showing the addresses of important values. I didn't have such listings. But I did have arithmetic, the mechanism to dump long lists of memory locations.

Ward shows two fellow dorm residents how to read account numbers out of a memory dump.

I wrote out the logic to add 1 to a given digit. I repeated this for every digit. Then I found ways with parameter substitution to fold this logic over onto it self so that the result was only a half-dozen lines.

I repeated these lines for every digit in a memory address and added a few more to handle the carry from one digit to the next. This to was folded over onto itself with more parameter substitution. The result was maybe 20 lines of mostly parameter references.

Aside: Christopher Alexander emphasizes Structure Preserving Transformations as central to the Nature of Order. By twice folding my logic I turned a tediously long program in to a small bundle of magic.

As spring final exams approached I already felt guilty for spending more time on this than my assigned studies. I eventually got a call from the computing center. I was told that they found my memory dump command and . . . wanted to offer me a summer job.

Months later my new office mate told me that my twice folded arithmetic logic had stumped the people who wrote the PROCSY system. This didn't surprise me because it would be harder to unfold it than it was to fold. Still, I had bothered to discover the process and applied the same inventiveness to my first paying computer work.