# various rearranging moves

# Pure Squeal Mode code. Assembles identically use16 or 32. 
#  copy   is like that.


L patternfill16
L patternfill		# move D copies of C bytes each of @ SI to @ DI
	push A
	push B
		= C to A
		= SI to B
	  L nexrepl
		= A to C
		= B to SI
		copies bytes
		1- D
		 when not zero	short nexrepl
	pull B
	pull A
				return




L spreadcopy16		# move C bytes of @ SI to @ DI skipping bytes in @ DI
			# Range of @ DI is therefor 2*C
L spreadcopy			# handy with VGA. takes C, SI, DI
      push A			# Attributes are the even addresses, yes?
	  L nexspred
		copy byte
		1+ DI
	when C-1 	nexspred
     pull A
			return


#
#L smushcopy16
#L smushcopy	# in case you need to read what you wrote to VGA, e.g.
#     push A
#	  L nexspred
#		copy byte
#		1+ SI
#		1+ SI
#		1+ DI
#	when C-1 	nexspred
 #    pull A
#return


