[Coco] 64K ROM to RAM programs - where did this one come from?

Dave Philipsen dave at davebiz.com
Tue Dec 14 18:21:49 EST 2021


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

> On Dec 14, 2021, at 3:50 PM, Allen Huffman <alsplace at pobox.com> wrote:
> 
> 
>> 
>> On Dec 14, 2021, at 3:40 PM, L. Curtis Boyle <curtisboyle at sasktel.net> wrote:
>> 
>> The last part is because he is copying 6 bytes across at a time, which doesn’t work out evenly for the amount of memory he is copying, so that is a “clean up” to copy the last bytes. It is written with speed as the intention.
> 
> Beyond being slower, then, no end result difference with Hogg’s?
> 
>  orcc #$50
>  ldx #$800
> move
>  sta $ffde
>  lda ,x+
>  sta $ffdf
>  sta -1,x
>  cmpx #e000
>  blo move (typo in listing, said move2)
>  rts
> 
> Hmmm, he stops at #$E000. From the BASIC Unravelled memory map, it looks like that’s fine, since nothing is there…?
> 
> $8000 - Extended BASIC
> $a000 - Color BASIC
> $c000 - ROMPAK / Disk BASIC
> 
> I see he doesn’t record the interrupt masking, but I assume BASIC takes care of that.
> 
> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list