/ 
/ 
/                   FIRST PRINTING, FEBRUARY 1974
/ 
/ THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO 
/ CHANGE WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED
/ AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPON-
/ SIBILITY FOR ANY ERRORS THAT MAY APPEAR IN THIS
/ DOCUMENT.
/ 
/ THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FUR-
/ NISHED TO THE PURCHASER UNDER A LICENSE FOR USE ON
/ A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH
/ INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR 
/ USE IN SUCH SYSTEM, EXCEPT AS MAY OTHERWISE BE PRO-
/ VIDED IN WRITING BY DIGITAL.
/ 
/ DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/ FOR THE USE OR RELIABILITY OF ITS SOFTWARE ON EQUIP-
/ MENT THAT IS NOT SUPPLIED BY DIGITAL.
/ 
/ COPYRIGHT (C) 1974, BY DIGITAL EQUIPMENT CORPORATION
/ 
/ 
        .EJECT
/	EDIT # 0
 
/COPYRIGHT 1973, DIGIGTAL EQUIPMENT CORP., MAYNARD, MASS., U.S.A.
 
/		3 JULY 73	T.A. MURRAY
 
/FORTRAN CALLABLE RSX UTILITY ROUTINE TO EXECUTE SPY FUNCTION, WHERE
/THE CALL PROVIDES A LOCATION ADDRESS RELATIVE TO THE LOWER
/BOUND OF THE SPYCOM AREA, AS DEFINED  IN LOCATION 321 (ABSOLUTE).
 
/	CALLING SEQUENCE
/		CALL SPYREL (ADDRS, VALUE [,EV])
/	WHERE
/		ADDRS IS AN INTEGER WHOSE VALUE IS ADDED TO THE CONTENTS
/		 OF LOCATION 321 TO COMPUTE THE ADDRESS TO BE SPYED.
/		VALUE IS AN INTEGER THAT RETURNS WITH THE CONTENTS
/		 OF THE LOCATION SPYED.
/		EV IS THE INTEGER EVENT VARIABLE.
 
	.GLOBL	SPYREL, .DAA
 
SPYREL	0
	JMS*	.DAA
	JMP	ARGEND
ADDRS	0
VALUE	0
EV	0
 
ARGEND	LAC	EV	/GET EVENT VARIABLE ADDRESS.  IF NOT SPECIFIED,
	SZA		/USE LOCAL LOCATION,ALTHOUGH USER WILL NEVER
	LAC	(EV1)	/KNOW IF IT CAME UP NEGATIVE.
	DAC	SPYR1
	DZM	EV	/RESET IN CASE NOT SPECIFIED ON ANOTHER CALL.
 
	LAC	(321)	/FIRST, SPY LOCATION 321 TO GET SPYCOM LOWER
	DAC	SPYR2	/BOUND
	CAL	SPYR0
	LAC*	SPYR1	/CHECK EV;  IF IT IS NEGATIVE, RETURN IMMEDIATE
	SPA
	JMP*	SPYREL
 
	LAC	SPYR3	/GET STUFF SPYED AT LOCATION 321
	TAD*	ADDRS	/ADD REQUESTED ADDRESS RELATIVE TO BEGINNING
	DAC	SPYR2	/OF SPYCOM, AND SPY IT.
	CAL	SPYR0
	LAC	SPYR3	/GET STUFF SPYED, WITHOUT CHICKING EV (WHICH
	DAC*	VALUE	/IS CALLER'S TASK), AND RETURN IT
	JMP*	SPYREL
 
SPYR0	31		/SPY
SPYR1	0		/EV ADDRESS
SPYR2	0		/ADDRESS OF LOCATIOJ TO SPY
SPYR3	0		/RETURNED VALUE
 
EV1	0		/LOCALLY PROVIDED EVENT VARIABLE WHEN EV NOT GIVEN
 
	.END
