CPMOVE


j:

lea	copper,a0
move.l 	a0,$dff080
move 	$dff088,d0
move 	#$83a0,$dff096
move.w	#$0020,$dff096

cyclesetup:
lea	col,a0
move	#39,d0
lea	radavst,a2
move	#$200f,d1
cop:
move	d1,(a0)+
move	#$fffe,(a0)+
move	#$0180,(a0)+
move	#$0000,(a0)+
add	(a2)+,d1
dbf	d0,cop

interupt:
cmp.b	#$10,$dff006
bne	wait
and	#1,$dff004
beq	interupt

cycle:
lea	colortab,a0
lea	colortab+2,a1
move	(a0),d1
move	#59,d0
colloop:
move	(a1)+,(a0)+
dbf	d0,colloop
move	d1,colortab+118
lea	col+6,a0
lea	colortab,a1
move	#39,d0
collen:
move	(a1)+,(a0)
add	#8,a0
dbf	d0,collen

wait:
btst	#6,$bfe001
bne	interupt

slut:
move.l	4,a6
lea	gfxname,a1
jsr	-408(a6)
move.l	d0,a1
move.l	38(a1),$dff080
jsr	-414(a6)
clr.l	d0
rts

gfxname:
dc.b	'graphics.library',0
even

radavst:
dc.w	$700,$700,$700,$600,$600,$600,$500,$500,$500,$400
dc.w	$400,$400,$400,$300,$300,$300,$300,$200,$200,$200
dc.w	$200,$200,$100,$100,$100,$100,$200,$100,$000,$100
dc.w	$100,$200,$100,$100,$100,$000,$100,$000,$100,$000

colortab:
dc.w	$000,$111,$222,$333,$444,$555,$666,$777,$888,$999
dc.w	$aaa,$bbb,$ccc,$ddd,$eee,$fff,$eef,$ddf,$ccf,$bbf
dc.w	$aaf,$99f,$88f,$77f,$66f,$55f,$44f,$33f,$22f,$11f
dc.w	$00f,$11f,$22f,$33f,$44f,$55f,$66f,$77f,$88f,$99f
dc.w	$aaf,$bbf,$ccf,$ddf,$eef,$fff,$eee,$ddd,$ccc,$bbb
dc.w	$aaa,$999,$888,$777,$666,$555,$444,$333,$222,$111

copper:
dc.w	$008e,$2c81,$0090,$34d1		;diwstart,stop
dc.w	$0092,$0038,$0094,$00d0		;datafetch,vert,hor

col:
blk.w	160,0				;reservera plats 

dc.w	$0100,$1200			;1 bitplan
dc.w	$00e0,$0006,$00e2,$612e		;bpl1pth,l
dc.w	$900f,$fffe,$0180,$0000		;svart bakgrund
dc.w 	$ffff,$fffe			;end copper