[Coco] 64k test

Ciaran Anscomb cocomalt at 6809.org.uk
Wed Jul 19 05:08:00 EDT 2017


Johann Klasek wrote:
> On Mon, Jul 17, 2017 at 03:38:59AM +0000, Rietveld Rietveld wrote:
> > This program will test for 64k memory on a Coco 1/2
> 
> Thanks! Would you share the source assembly, too? Or would you provide
> us a disassembly of it?

Looks like it's a "copy ROM to RAM" routine really.

Here's what I'm using:

-----CUT-----
                ; test for 64K
                clr flag_64k
                sta reg_sam_tys
                lda $0062
                ldb $8063
                coma            ; a != [$0062]
                comb            ; b != [$8063]
                std $8062
                cmpd $8062
                bne no_64k      ; didn't write
                cmpd $0062
                beq no_64k      ; *did* shadow write
                com flag_64k
no_64k		sta reg_sam_tyc
-----CUT-----

Where flag_64k is somewhere useful.

Checks that a write to upper 32K in map type 1 succeeds, and that it
*didn't* shadow write to the lower 32K.  Address chosen so that it
*probably* doesn't destroy anything useful if it did shadow write.

For my use I don't care, but if you need it, you'll want to make
it preserve the original values in those locations and restore them
afterwards.

..ciaran


More information about the Coco mailing list