include	clib.inc
include	conio.inc

PPROC	dlopen, dobj:dword, at:word, ttl:dword
	les	bx,dobj
	invoke	rcopen,es:[bx.dl_rect],es:[bx.dl_flag],at,ttl,es:[bx.dl_wp]
	les	bx,dobj
	stom	es:[bx.dl_wp]
	jz	@F
	or	es:[bx.dl_flag],_D_DOPEN
	mov	ax,1
      @@:
	ret
PEND	dlopen

	END
