/ 
/ 
/                   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 #3
/
/ COPYRIGHT 1971, DIGITAL EQUIPMENT CORP., MAYNARD, MASS.
/
/ OTS ROUTINE FOR AFC-15     4 OCT 71       B. DE SIMONE
/				1 MAR 73	T. MURRAY
/
/ CALLING SEQUENCE:
/
/	CALL AI (LUN,LCH,UCH,IGAIN,IDATA[,IEV])
/
/	JMS*	AI
/	JMP	.+7(6)			/6 IF IEV NOT SPEC.
/	ADDR OF LOGICAL UNIT NUMBER	/INTEGER
/	ADDR OF LOWER CHANNEL NO.	/INTEGER
/	ADDR OF UPPER CHANNEL NO.	/INTERGER
/	GAIN ARRAY NAME PTR.		/INTEGER ARRAY NAME
/	DATA ARRAY NAME PTR.		/INTEGER ARRAY NAME
/	ADDR OF EVENT VARIABLE		/INTEGER (OPTIONAL)
/
/ AI - INPUTS GAIN AND DATA FOR EACH CHANNEL FROM
/ THE LOWER CHANNEL NUMBER TO THE UPPER CHANNEL NUMBER
/ INCLUSIVE.  THE CHANNELS ARE NUMBERED FROM ONE.
/ THE GAIN IS FETCHED FROM, AND THE DIGITIZED VALUES
/ ARE RETRUNED TO THE CALLING PROGRAM'S GAIN & DATA
/ ARRAYS.  IT IS ASSUMED THAT THE ARRAYS ARE LARGE
/ ENOUGH.
/
	.GLOBL AI,.DA
/
AI	0			/SUBR. ENTRY
	JMS*	.DA		/GET ARGS.
	JMP	ARGEND		/JMP AROUND ARGUNMENT ADR LIST
LUN	0			/ADDRESS OF LUN
LCH	0			/ADDR OF LOWER CH. NO.
UCH	0			/ADDR OF UPPER CH. NO.
IGAIN	0			/PTR TO FIRST WORD OF GAIN ARRAY .
IDATA	0			/PTR TO FIRST WORD OF DATA ARRAY 
IEV	0			/ADDR OF EV.
/
ARGEND	LAC*	LUN		/SET LUN IN CPB
	DAC	CPB2
	LAC*	LCH		/SET LOWER CHNL NUMBER IN CTB.
	AAC	-1
	DAC	CTB0
	LAC*	UCH		/SET UPPER CHNL NUMBER IN CTB
	AAC	-1
	DAC	CTB1
	LAC	IGAIN		/GET ADDR OF FIRST ARRAY ELEMENT.
	DAC	CTB2		/SET CTB
	LAC	IDATA
	DAC	CTB3		/SET CTB
	LAC	IEV		/SET EVENT VARIABLE ADDRESS (IF SPECIFIED)
	DAC	CPB1		/IN CPB, OTHERWISE, SET ZERO.
	DZM	IEV
/
	CAL	GET		/QUEUE I/O REQUEST
/
	JMP*	AI		/EXIT SUBROUTINE
/
/ AFC-15 GET CAL PARAM. BLK. (CPB)
/
GET	3000			/FUNCTION CODES
CPB1	0			/EV ADDR.
CPB2	0			/LUN
CPB3	CTB0			/PTR TO CTB.
/
/ AFC-15 GET CONTROL TABLE (CTB)
/
CTB0	0			/LOWER CHANNEL NUMBER
CTB1	0			/UPPER CHANNEL NUMBER
CTB2	0			/ADDR. OF GAIN TABLE
CTB3	0			/ADDR OF DATA TABLE
/
	.END
