On 01/14/2017 10:45 AM, Jon Elson wrote: > Oh my! You couldn't have a subroutine that called another > subroutine, using their surroutine call/return instructions! I never > knew that!
My take on the "Branch Back" instruction was that it was useful for debugging and perhaps lowest-level subroutines. The usual subroutine calls were done with a BTM (branch and transmit immediate) instruction, where the immediate operand was the return address. However, this didn't preclude software implementation of call/return stacks. The big issue was that the programmer had to *know* where code was being executed, as there was no way to for software to read the P-counter. Indeed, most machines of the time (1960) didn't implement a stack and even machines like the CDC 6000 (RJ), the PDP-8 (JMS) and IBM S/360 (BALR) required software implementation for reentrancy. My biggest gripe with the 1620 architecture was that there were special "reserved" values for special characters, but there wasn't always a way to test for them. So, for example, "numeric blank" (coded as 8-4) would raise an error if one tried to perform arithmetic with it, but there was no test for its presence in a memory location. Similarly, one could read values into memory that could not be differentiated from similar values. For example, the record mark 8-2 was treated as such even if it was represented as 8-2-1. Given all of that, the 1620 did perform lots of useful work. Later versions of the machine after the CADET added functionality, but AFAIK, never addressed the problem of the inability to read the P-counter from a program. --Chuck
