;       SCCSID = @(#)calldd.asm	6.1 90/11/17
;	SCCSID = @(#)calldd.asm 13.2 90/01/25

include devhdr.inc

.286

.model medium, pascal

.code	_BTXT

;***	CallDD - Call Device Driver
;
;	CallDD calls the specified Device Driver with the request
;	packet provided
;
;	ENTRY	int far CallDD (PVOID pDD,	-> Device Driver
;				PVOID pReqPkt); -> Request Packet
;
;	EXIT	returns error code in ax

public CallDD
CallDD proc far uses si di ds , 		      \
       pDD:dword,				      \
       pReqPkt:dword

	lds	di,pDD
	mov	ax,ds:[di].SDevProtCS
	mov	word ptr pDD+2,ax
	mov	ax,ds:[di].SDevStrat
	mov	word ptr pDD,ax 	; pDD -> DD strategy address

	les	bx,pReqPkt		; (es:bx) -> Request Packet
	call	pDD			; call the Device Driver
	ret
CallDD endp

	end
