News for hackers. Stuff that matters.
Re:TI-83 Plus One More by Jtsummers on Sunday July 31, 2022 @02:26PM (#32297529)
What at least the 85/86 series didn't permit (86 was almost identical to the 85) was direct recursion, which woulds fail immediately. I don't think I ever tried indirect recursion, which also would have failed. If I understand correctly, the problem was that there was no call stack (in the way every mainstream language does things anymore). So the return address location for a program was singular, if you made multiple (recursive, direct or indirect) calls into a program where it would return to was whatever the last call set the return address to. Like old school COBOL and FORTRAN where procedures were non-reentrant. Of course, I was in high school too and didn't know about the inner workings of computers like that. So I figured out how to use the list data structure on the calculator as a stack to create my own "recursive" programs either trampolining (A calls B repeatedly in a loop until the list-as-stack is emptied, indicating termination) or with loops (skip the call to B and keep it all in one program).

Limitations lead to creativity.

There are no comments on this comment yet.