include	clib.inc
include	conio.inc

ifdef __WCC__
PPROC	rcmove, rect:dword, wp:dword, fl:word, x:word, y:word, offset_stack:word
else
PPROC	rcmove, rect:dword, wp:dword, fl:word, x:word, y:word
endif
	invoke	rchide, rect, fl, wp
	test	ax,ax
	jz	rcmove_end
	mov	al,byte ptr x
	mov	ah,byte ptr y
        mov	word ptr rect,ax
	mov	ax,fl
	and	ax,not _D_ONSCR
	invoke	rcshow, rect, ax, wp
    rcmove_end:
	mov	ax,word ptr rect
	mov	dx,word ptr rect+2
  ifdef __WCC__
	mov	bx,offset_stack
	mov	[bx],ax
	mov	[bx+2],dx
	mov	ax,bx
  endif
	ret
PEND	rcmove

	END
