[Coco] Optimizing BASIC (was: Expanding 4K Coco Mem)

Andrew keeper63 at cox.net
Fri Jan 2 20:35:12 EST 2015


Allen,

That was a great write-up - please let us know when you have that 
article done, I would love to see the rest!

One method that I am probably mis-remembering - from a "improved speed" 
standpoint (and likely greater memory footprint) - was to have a GOTO at 
the top of your program that would jump to your "main loop", and any 
GOSUBs would be placed at the beginning of the program (after that first 
GOTO), with the most accessed subroutine coming first. At least - it was 
something like that...

Anyhow - the concept only applied to interpreted BASIC - because the 
interpreter had to scan from the top of the listing to find the line 
number to GOSUB to - so the closer the most accessed routine was to the 
top of the code, the faster things went. Or at least, that's how I 
remember it. It's been years.

On 01/02/2015 09:53 AM, coco-request at maltedmedia.com wrote:
> Message: 6
> Date: Fri, 2 Jan 2015 09:02:46 -0600
> From: Allen Huffman<alsplace at pobox.com>
> To: CoCoList for Color Computer Enthusiasts<coco at maltedmedia.com>
> Subject: [Coco] Optimizing BASIC (was:  Expanding 4K Coco Mem)
> Message-ID:<5D31985C-080E-4879-AE89-3DD4A2A43F64 at pobox.com>
> Content-Type: text/plain;	charset=us-ascii
>
> WARNING: Long post about BASIC stuff (I will be taking this and making it an article on my site, I think)....

-- 
Andrew L. Ayers
Glendale, Arizona
http://www.phoenixgarage.org/


More information about the Coco mailing list