[Coco] 64K ROM to RAM programs - where did this one come from?
Allen Huffman
alsplace at pobox.com
Tue Dec 14 18:26:34 EST 2021
On Dec 14, 2021, at 5:22 PM, Dave Philipsen <dave at davebiz.com> wrote:
>
> Kind of strange that he auto-increments the X register first then back steps.. It should just be
>
> LDA ,X
> STA $FFDF
> STA ,X+
>
> or better yet
>
> LDD ,X
> STA $FFDF
> STD ,X++
>
>
> -Dave Philipsen
I am writing an article for my site about these approaches, and I am sure we will get some good comments on optimizing.
I wonder if this was intentional, because ,X twice plus an LEA was less bytes than ,X+? That doesn’t seem right, but maybe I can figure that out..
Changing to D for two bytes at a time is a good improvement, so I think the goal, as always, should be:
What is the smallest way to do it, so there is less BASIC to type in (the one I use is long), versus a faster one. But since this is only done once, I suppose it only helps if it is part of some startup just to make a program run a tad bit quicker.
More information about the Coco
mailing list