include	clib.inc
include	io.inc

PPROC	osread, handle:word, buffer:DPTR, bsize:word
	stc
	MPUSH	ds
	mov	ax,3F00h
	mov	bx,handle
	mov	cx,bsize
	MLDS	dx,buffer
	int	21h
	MPOP	ds
	jc	osread_error
    osread_end:
	ret
    osread_error:
	call	@dosmaper
	xor     ax,ax
	jmp	osread_end
PEND	osread

	END
