View Single Post
Old 23 April 2020, 22:35   #3
Per aspera ad astra

ross's Avatar
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 50
Posts: 2,716
You don't have to use SKIP but CNOP, see this code:
	lea	$dff000,a5
	move.w	#$4000,$9a(a5)
	move.w	#$0100,$96(a5)

	move.l #cop2,$84(a5) ; pointer COP
	move.l #cop1,$80(a5) ; pointer COP
;	move.w d0,$88(a5) 	; start COP
;	WHY! I wonder why everywhere in tutorials they put a copperjump without explaining the contraindications..

.ll	moveq	#50-1,d1	;1s blink
.wb	moveq	#$20,d0
	and.w	$1e(a5),d0
	beq.b	.wb
	move.w	d0,$9c(a5)
	dbf	d1,.wb
	eori.w	#$1fe^$8a,skip	; ;)
	bra.b	.ll


cop1: ; copperlist 1
	dc.w $1007,$fffe
	dc.w $180,$F00 ; red

	dc.w $4007,$fffe ; wait $fffe
	dc.w $8a,0 ; copjmp2 start or CNOP

	dc.w $180,$0F0 ; green
	dc.w $6007,$fffe
	dc.w $180,$00F ; blue
	dc.w $ffff,$fffe

cop2: ; copperlist 2
	dc.w $8007,$fffe
	dc.w $180,$000 ; black
	dc.w $A007,$fffe
	dc.w $180,$FFF ; white
	dc.w $C007,$fffe
	dc.w $180,$FF0 ; yellow
	dc.w $ffff,$fffe
SKIP skips following MOVE instruction unless beam position has been reached.
But in you code (without the WAIT) beam position is in video line $10, so the following MOVE (the CJMP) is always executed!

EDIT: ops, too much time to edit the code and Dan already replied
ross is offline  
Page generated in 0.06266 seconds with 11 queries