[Coco] wanting to patch HPUT routine... (ping RG!)

Darren A mechacoco at gmail.com
Mon Aug 17 21:06:48 EDT 2009


On 8/17/09, Robert Gault wrote:
> theother_bob wrote:
>>
>>
>> What is the best (fastest?) way to copy one 8K block to another?
>>
>> Bob
>
> Since you don't require the presence of a 6309 CPU, the fastest method
> for transferring memory contents is to "stack-blast" from one MMU block
> to another.
> By that I mean you set regS and regU to appropriate memory locations,
> pull D,X,Y from one stack and push D,X,Y onto the other stack.
> Of course you must pre-save the original regS (and maybe regU) content
> and restore it after you are finished.
>
> --

Also, don't forget to mask interrupts before setting reg S.  If an
unmasked interrupt were to occur near the start or end of the block
move operation (depending on whether you use S for source or
destination), you would end up having the area preceding the source or
destination block getting stomped on.

Darren



More information about the Coco mailing list