	.TITLE VSDA
	.IDENT /14MR88/

;	File:[22,310]VSDA.MAC
;	Author: Jim Bostwick 1-Nov-83 (P2util clone)
;	History: 8-Nov-83 JMB remove IDS parameter
;                12-Feb-87  PTH  corrected external defn
;		 17-APR-87  PJS Convert to VSDA from SDAT
;                14-Apr-88  PTH changed buffer type from CH512 to
;                           address.  Caller must still insure
;                           that address is word aligned.
;
;	Last Edit: 14-APR-1988 16:11:39 
;

.REM |


PROCEDURE VSDA(Task_Name:Rad56; 
               Buff: address; 
               Buff_Len:INTEGER;
               EFN:Event_Flag
               );External;

{*USER*
 Pascal-3 procedure to send a variable 512-byte max data packet to the 
specified task.  The SRDA directive requires that the data packet be
word aligned.  Thus the address supplied in BUFF must be even (word
aligned).  

EFN is set for the SENDING task. (of course, globals or group globals
may be used). If f0 is specified, no flag is set.

Task_Name must be in RAD50 format.

The length of the data packet sent is in words.  If LEN is less than
13 (or zero), a default minimum length of 13 words will be used.
  
This procedure directly implements executive directive VSDA$. 

$DSW holds the directive status on return.

} 
|

;
; Assemble with PASMAC.MAC as prefix file.
;

	.MCALL VSDA$S
	.PSECT	
	PROC VSDA
	PARAM TKN, 2*INTEGER	;TASK NAME IN RAD50
	PARAM BUFF, ADDRESS	;SEND PACKET ADDRESS
	PARAM BUFLEN, INTEGER	;LENGTH OF SEND PACKET IN WORDS
	PARAM EFN, SCALAR	;EVENT FLAG TO SET, 0 IF NONE
	SAVE <R0,R1>
	BEGIN
	MOV SP,R0		;PRESERVE STACK POINTER
	MOV R0,R1		;CREATE POINTER TO TARGET TASK NAME
	ADD #TKN,R1		;R1-> TASK NAME ADDRESS
	VSDA$S R1,BUFF(0),BUFLEN(0),EFN(0)
	ENDPR
	.END

