; Copyright (C) 1983  Thomas Fenwick
; :ts=8
;Copyright (C) 1983 by Manx Software Systems
Cg	group	CODESEG
CODESEG	segment	word public 'code'
	assume	cs:Cg
	public blockmv_
blockmv_ proc near
	mov	bx,sp
	pushf
	cld
	push	si
	push	di
	mov	di,2[bx]
	mov	si,4[bx]
	mov	cx,6[bx]
	mov	dx,cx
	shr	cx,1
	jz	mv_skip
rep	movs	word ptr [di], word ptr [si]
mv_skip:
	test	dl,1
	jz	done
	movs	byte ptr [di], byte ptr [si]
done:
	pop	di
	pop	si
	popf
	ret

	public clear_
clear_:
	mov	bx,sp
	pushf
	cld
	push	di
	mov	di,2[bx]
	mov	cx,4[bx]
	mov	al,6[bx]
	mov	ah,al
	mov	dx,cx
	shr	cx,1
	jz	cl_skip
rep	stos	word ptr [di]
cl_skip:
	test	dl,1
	jz	cl_done
	stos	byte ptr [di]
cl_done:
	pop	di
	popf
	ret
blockmv_	endp
CODESEG	ends
	end
