>>>>> Arne Vajhøj <[EMAIL PROTECTED]> (AV) wrote: >AV> Robert Maas, http://tinyurl.com/uh3t wrote: >>> John W Kennedy <[EMAIL PROTECTED]> wrote: >JWK> Into the 60s, indeed, there were still machines being made >JWK> that had no instruction comparable to the mainframe BASx/BALx >JWK> family, or to Intel's CALL. You had to do a subprogram call by >JWK> first overwriting the last instruction of what you were >JWK> calling with a branch instruction that would return back to >JWK> you. >>> >>> That's not true, that you needed to do that, that there was no >>> other way available. The subroutine linkage I invented for S.P.S. >>> (Symbolic Programming System, i.e. IBM 1620 assembly language) was >>> to reserve a 5-digit space immediately before the subroutine entry >>> point for storing the return address. So the caller needed to know >>> only one address, the entry point, and do both store-return-address >>> and jump relative to that address, rather than needing to know both >>> the entry point and the last-instruction-JUMP-needs-patch address >>> as independent items of information.
>AV> CDC Cyber did something very similar. >AV> Not very recursion friendly. Actually, the CYBER way wasn't too bad. IIRC the CYBER had a subroutine instruction that stored the return address in the location that the instruction referenced and then jumped to the address following that location. To implement a recursive procedure you started the code of the procedure with saving the return address to a stack. -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list