On Thu, Oct 25, 2012 at 2:09 PM, Rick Bensene <rickb at bensene.com> wrote:
My first program was:
10 GOSUB 10
20 END
It's interesting to try this on various different BASICs as it does
create a situation where, if the bounds checking on the stack containing
the return statement numbers/pointers isn't good, you can cause
"interesting" things to happen. There are a few BASICs I've tried this
on where the program will actually crash BASIC.
On the C-64 (and the PET* and VIC-20), it runs 24 levels deep (I added
a counter and a print) then the program exits with "?OUT OF MEMORY
ERROR IN 10". The C-64 is unharmed.
-ethan
* BASIC 1 gets to 26 levels before quitting