 VRECVE 

      Routine to receive packets via
      SEND/RECEIVE or SEND/RECEIVE BY REFERENCE
      NOTE: Reference packets have priority over normal packets

        In order to use the routine specify the following in the
        TKB commandfile:

        - GBLPAT=modulename:$RREF:0     If no Receive by reference
                                        packets are used

     Only if receive by reference is wanted (patch above is not done)
     specify:

        - GBLPAT=modulename:$VRAPR:n    To specify APR to be used for mapping
                                        (default APR 7 is used)

	- GBLPAT=modulename:$RCLUS:1	To specify if routine is to be 
					clustered with VSEND or SDTMBX.
					If specified : the same APR and window
					can be used for these routines.
					No Unmapping tests are performed then.
					(Default non clustered)

        - WNDWS=1                       Window when not already spec.
        - WNDWS=n+1                     Extra window when already spec.

  Fortran     CALL   VRECVE(BUFFER,IBUFL,[PARM],[ITMO],[IDTLEN],[TSKNAM],IDS)

         BUFFER = Buffer that receives data
         IBUFL  = Length of buffer
         PARM   = Parameter word
	 ITMO   = Time-out count in seconds.
	          Routine returns to caller when stop option is chosen
                  (VR.STP) and no data is received within the specified time
		  ( 0 = wait forever )
         IDTLEN = Integer to receive the actual received bytecount
         TSKNAM = 4 byte variable (or Real*4) to receive RAD50 sender
                  taskname
         IDS    = Integer to receive the directive status word

  Macro         MOV     #BUFFER,R1      ; Buffer that receives data
                MOV     #BUFLEN,R2      ; Length of buffer
                MOV     #<parameters>,R3; Parameters
                MOV	#TMO,R4		; Time-out count in seconds.
					; Routine returns to caller when stop
					; option is chosen (VR.STP) and no
					; data is received within the 
					; specified time (0 = wait forever)
                CALL    $VRECV

        R1            = Bufferaddress
        R2            = Contains the actual received bytecount
        $SENTS        = address of 2 word RAD50 sender taskname
        $DSW          = Status code
        carry bit set = Error

        Other registers are preserved

   Parameters:  VR.STP  1       : Receive data or stop (AST processing)
                VR.EXT  2       : Receive data or exit
                VR.RET  4       : Receive data or return
                VR.NOR  10      : Receive normal data 
                VR.REF  20      : Receive reference data 
                VR.ALL  30      : Receive all data 

        Default VR.STP!VR.ALL

   Errors  :  IS.SUC -- Succesful operation
              IE.RBS -- Receivebuffer too small
              IE.ITS -- No data queued
              IE.WOV -- Address window overflow (no extrawindow specified)
	      IE.ALG -- Invallid APR
	      IE.PRV -- Privilege violation; Detach from region with 
                        outstanding I/O. ( Not necessarily to this region )

