Hacker News new | ask | show | jobs
by tenebrisalietum 910 days ago
Coverting GOSUB X:RETURN to GOTO X was my first tail-call optimization.

> I don't know that I ever looked into what happened if you called GOSUB from a GOSUB routine

I want to say all BASICs had a stack (not sure about Apple Integer BASIC), or used the CPU stack. Expression evaluation also used it, and if you overflowed it you would get a ?FORMULA TOO COMPLEX error.