	.TITLE COMCOM  -  COMMON COMMUNICATION.
/ 
/ 
/                   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
/COPYRIGHT 1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/EDIT 001   9-23-71
/FORTRAN CALLABLE SUBROUTINE FOR PHASE TWO RSX.
/ALLOWS NORMAL MODE TASK TO COMMUNICATE WITH SYSTEM COMMON BLOCKS.
/COMGET TRANSFERS DATA FROM SYSTEM COMMON TO TASK.
/COMPUT TRANSFERS DATA FROM TASK TO SYSTEM COMMON.
/CALLING SEQUENCE:  CALL COMGET(COMPUT) (LUN,WC,VN,SCN,OFFSET,EV)
/WHERE:
/	LUN=LOGICAL UNIT NUMBER 
/	WC=WORD COUNT (POSITIVE)
/	VN=VARIBALE NAME (ADDRESS)
/	SCN=SYSTEM COMMON NAME (1-5 ASCII CHARACTERS)
/	OFFSET=SYSTEM COMMON OFFSET (POSITIVE)
/	EV=EVENT VARIABLE
/
/ALL VARIABLES INTEGERS EXCEPT VN,SCN.
/OFFSET AND EV ARE OPTIONAL ARGS.(DEFAULT OFFSET IS ZERO)
/	JMS* COMGET(COMPUT)
/	JMP .+1+N	/N ARGUMENTS.
/	ADDR. OF LUN
/	ADDR. OF WC
/	ADDR. OF VN
/	ADDR. OF SCN
/	ADDR. OF OFFSET		OPTIONAL
/	ADDR. OF EV		OPTIONAL
	.EJECT
	.GLOBL COMGET,COMPUT,.DA,.FTSB
COMPUT	0		/SUBR. ENTRY.
	LAC	COMPUT	/SET UP DUMMY ENTRY FOR .DA
	DAC	EDUM
	LAC	(3100)	/SET GETPUT FOR CORPUT.
	DAC	GETPUT
	JMP	GARG	/GET ARGS. AND GO.
COMGET	0		/SUBR. ENTRY.
	LAC	COMGET	/SET UP DUMMY ENTRY FOR .DA
	DAC	EDUM
	LAC	(3000)	/SET GETPUT TO CORGET.
	DAC	GETPUT
	JMP	GARG	/GET ARGS. AND GO.
EDUM	0		/DUMMY SUBR. ENTRY FOR COMGET AND COMPUT.
GARG	JMS*	.DA
	JMP	ARGEND	/AROUND ARGS.
LUN	0		/ADDR. OF LOGICAL UNIT #
WC	0		/ADDR. OF WC.
VN	0		/VARIABLE ADDRESS.
SCN	0		/ADDR. OF SYS. COMM. NAME.
OFFSET	0		/ADDR. OF OFFSET.(ZERO IF NOT SPEC.)
EV	0	/USER EVENT VARIABLE(ZERO IF NOT SPEC.)
ARGEND	LAC*	LUN	/LUN TO CPB.
	DAC	LUN1
	LAC*	WC	/WC TO CTB
	DAC	CTB4
	LAC	VN	/VARIABLE ADDRESS TO CA OF CTB.
	DAC	CTB3
	JMS*	.FTSB	/CONVERT 5/7 ASCII TO SIXBT. AND STORE
	SCN		/IN CTB0,CTB1 AS SYS. COMM. NAME.
	CTB0
	LAC	OFFSET	/.FTSB RETURNS HERE.  OFFSET SPEC.?
	SZA		/ZERO IF NOT.
	LAC*	OFFSET	/YES.
	DAC	CTB2	/TO CTB.
	LAC	EV	/EVENT VAR. SPEC.?ZERO IF NOT.
	DAC	EV1	/TO CTB.
	DZM	OFFSET	/REINIT OPTIONAL ARGS.
	DZM	EV
	CAL	GETPUT	/CORGET OR CORPUT.
	JMP*	EDUM	/EXIT.
	.EJECT
/CAL PARAMETER BLOCK-CORGET/CORPUT.
GETPUT	0		/3000 IF CORGET,3100 IF CORPUT.
EV1	0	/EVENT VAR.
LUN1	0	/LOG. UNIT #.
CTB	CTB0	/PTR. TO CONTROL TABLE.
/
/CONTROL TABLE
CTB0	0		/SIXBT. ASCII SYS. COMM. BLK. 
CTB1	0		/NAME.
CTB2	0		/SYS COMM OFFSET.
CTB3	0		/CA.
CTB4	0		/WORD CNT.
	.END
/	ADDR. OF OFFSET
/	ADDR. OF EV
