Hacker News new | ask | show | jobs
by EvanAnderson 908 days ago
Applesoft BASIC allowed nested GOSUBs. I think you could get about 10 deep, if memory serves. You could absolutely do recursive calls. You would have to implement subroutine-local variable scope yourself. (I would have use arrays with an index that incremented at the beginning of each call and decremented before the RETURN.)
1 comments

Applesoft BASIC was by Microsoft so it is pretty much identical to the other 6502 Microsoft BASICs like on the Commodore and OSI systems. Apple and Commodore both customized their Microsoft BASICs somewhat. If you benchmark Applesoft BASIC and Commodore BASIC, on systems with the same clock speed (eg. 1 MHz), they benchmark the same.