> 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.
WHAT "return" statement??!?
Anything otyher than
JMP $
is BROKEN!
On Thu, 25 Oct 2012, Ethan Dicks wrote:
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
So, you can't even do:
10 PRINT "Welcome to DOS!"
20 PRINT "C:\DERP> ";
30 INPUT A$
40 PRINT "Bad command od filename"
50 GOTO 20
60 END
Is THAT why operating systems aren't written in BASIC? :-)