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

Alex Evans varmfskii at gmail.com
Tue Dec 14 20:46:22 EST 2021


one I wrote recently for something else

allram:
;;  check if already in all RAM mode
lda $8000
tfr a,b
com $8000
eora $8000
beq rom
stb $8000
rts

;; copy ROMs to RAM
rom:
pshs cc
orcc #$50 ; disable interrupts
sts $fe
lds #$8000
loop@:
clr RAMROM
puls a,b,x,y,u
clr RAMRAM
pshs u,y,x,a,b
leas 8,s
cmps #$ff00
ble loop@
lds $fe
puls cc,pc

Copies eight bytes at a time by temporarily using the stack.

On Tue, Dec 14, 2021 at 3:48 PM Allen Huffman <alsplace at pobox.com> wrote:

> The BASIC here may be reformatted, but the assembly is the same.  I think
> this came from Rainbow and was always called ROMTORAM or something like
> that:
>
> 10 READ A$:IF A$="X" THEN END
> 20 POKE 20000+N,VAL("&H"+A$)
> 30 N=N+1:GOTO 10
> 40 DATA 34,01,1A,50,10,8E,80,00
> 50 DATA B7,FF,DE,EC,A4,AE,22,EE
> 60 DATA 24,B7,FF,DF,ED,A1,AF,A1
> 70 DATA EF,A1,10,8C,FE,FC,25,E8
> 80 DATA 10,8C,FF,00,24,0C,B7,FF
> 90 DATA DE,EC,A4,B7,FF,DF,ED,A1
> 100 DATA 20,EE,35,01,39
> 110 DATA X
>
> Can anyone turn this in to 6809 assembly source code, or if you know the
> source (Rainbow?) maybe it was in there?
>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list