	.TITLE VSDAPA
	.IDENT /070387/

;	File:[22,310]VSDAPA.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
;
;	Last Edit: 3-JUL-1987 12:08:07 
;

.REM |


PROCEDURE VSDAPA(Task_Name:Rad56; 
		Var Buff:CH512; 
		Buff_Len:INTEGER;
		EFN:Event_Flag
                );External;

{*USER*
 Pascal-3 procedure to send a variable 512-byte data packet to the 
specified task.
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.
  
This procedure directly implements executive directive VSDA$. 
$DSW holds the directive status on return.

      021882, 030582, 101582, 110183, 110883 JMB
} 
|

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

	.MCALL VSDA$S
	.PSECT	
	PROC VSDAPA
	PARAM TKN, 2*INTEGER	;TASK NAME IN RAD50
	PARAM BUFF, ADDRESS
	PARAM BUFLEN, INTEGER
	PARAM EFN, SCALAR
	SAVE <R0,R1,R2>
	BEGIN
	MOV SP,R0		;PRESERVE STACK POINTER
	MOV R0,R1		;
	ADD #TKN,R1		;R1->TASK NAME
	MOV BUFLEN(0),R2
	VSDA$S R1,BUFF(0),R2,EFN(0)
	ENDPR
	.END

