include	clib.inc
include	mouse.inc
include	conio.inc

PPROC	rcread, rc:dword, wc:DPTR
local	lsize:	word
	push	ds
	push	si
	push	di
	xor	ax,ax
	mov	al,_scrcol
	add	ax,ax
	mov	lsize,ax
  ifdef __MOUSE__
	call	mousehide
  endif
	mov	bx,word ptr rc
	call	@rcsprc
	mov	ds,dx
	mov	dx,ax
	MLES	di,wc
	mov	bx,di
	xor	ax,ax
	mov	cx,ax
	mov	al,rc.rc_col
	mov	ah,rc.rc_row
	cld
    rcread_loop:
	mov	si,dx
	add	dx,lsize
	mov	cl,al
	rep	movsw
	dec	ah
	jnz	rcread_loop
  ifdef __MOUSE__
	call	mouseshow
  endif
	mov	dx,es
	mov	ax,bx
	pop	di
	pop	si
	pop	ds
	ret
PEND	rcread

	END