On Dec 13, 9:26, Mark Crispin wrote:
Unique? Quite a few processors of that time had a
store-PC-and-jump type
of
subroutine call. The beloved PDP-10 had three (JSR,
JSP, JSA/JRA) and
subsequent enhancements added more (JSYS, XPCW); yet it also had stacks
from
its inception.
Contemporary programming languages, such as BASIC and FORTRAN, did not
use
stack subroutines. It's possible that modern
BASIC and FORTRAN compilers
may
permit recursive subroutine calls, but doing so is
still prohibited by
the
language specification. Now you know why.
That's not wholly true; FORTRAN prior to FORTRAN-90 prohibits recursion but
it's a required feature in FORTRAN 90. I don't believe it's actually
prohibited in BASIC of the mid-to-late 60's. There were certainly
inplementations in the early 70s that allowed it, and it's a feature of the
modern standards (both de-facto and ANSI). Recursion was also a (required)
feature of ALGOL in 1958, and its successors, as was stack-based
evaluation.
However, in support of Mark, it's worth noting that the main reason there's
no recursion allowed in FORTRAN, and it almost was omitted from the
original ALGOL spec, was that it was hard for people to understand how it
could be implemented across a variety of architectures. Stacks had been
around since the mid-50s but lots of machines provided no specific support
for them.
--
Pete Peter Turnbull
Network Manager
University of York