View Single Post
Old 14 February 2021, 14:59   #10
LaBodilsen
Registered User
 
Join Date: Dec 2017
Location: Denmark
Posts: 179
Quote:
Originally Posted by ross View Post
Good idea (not sure if it gains speed)
This can be extended to save registers by knowing the constant distance between destination bplanes.


Code:
.copy_tile_right:				; Right copy
	move.w	(a0)+,d2
	move.w	(a5,d2.l*2),(a1)		; Bitplane 1
	
	move.w	(a0)+,d2
	move.w	(a5,d2.l*2),($xxxx.w,a1)        ; Bitplane 2
	
	move.w	(a0)+,d2
	move.w	(a5,d2.l*2),($xxxx*2.w,a1)	; Bitplane 3
	
	move.w	(a0)+,d2
	move.w	(a5,d2.l*2),($xxxx*3.w,a1)	; Bitplane 4
	adda.l	d0,a1
	
	dbf	d1,.copy_tile_right

Sweet.. would this work?:
Code:
.copy_tile_right:				; Right copy
	movem.w	(a0)+,d2/d3/d4/d5
	move.w	(a5,d2.l*2),(a1)		; Bitplane 1
	move.w	(a5,d3.l*2),($xxxx.w,a1)        ; Bitplane 2
	move.w	(a5,d4.l*2),($xxxx*2.w,a1)	; Bitplane 3
	move.w	(a5,d5.l*2),($xxxx*3.w,a1)	; Bitplane 4
	adda.l	d0,a1
	
	dbf	d1,.copy_tile_right
LaBodilsen is offline  
 
Page generated in 0.04411 seconds with 11 queries