	.TITLE ADSSET - SETUP FOR SEQUENTIAL AD15 CONVERSION.
/ 
/ 
/                   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.
/W.A. DESIMONE
/EDIT 003 12-2-71
/
/CALLING SEQUENCE:
/CALL ADSSET(LUN,LKNO,LKTYPE,LCH,IHCH,ISA,IDVTE,ICNT,LKEV,IMOEV,IEV)
/
/	JMS* ADSSET
/	JMP .+14		/SUBR. RETURN.
/	ADDR. OF LOGICAL UNIT NO.
/	ADDR. OF LINK NUMBER	/1 TO LIMIT OF AD15 HANDLER TASK(DEF=10)
/	ADDR. OF LINK TYPE	/0,1,2, OR 3.
/	ADDR. OF LOWER CHANL. #	/1 TO 128
/	ADDR. OF UPPER CHANL. #	/1 TO 128
/	ADDR. OF INPUT STATUS WD.	/SET BY CALL TO ADSMAP.
/	ADDR. OF 1ST ELEM. OF DIG. VALUES TABLE.
/	ADDR. OF REPEAT COUNT
/	ADDR. OF LINK EVENT VAR.
/	ADDR. OF MEM. OV VAR.	/NO OF CHAN. OVERFLOWING RET.
/	ADDR. OF I/O EVENT VAR.
/	NEXT INSTR.
/
/LAST FOUR ARGUMENTS ARE OPTIONAL.
/
/NOTE ON LINK TYPES*
/	0=NULL LINK
/	1=CHAIN LINK
/	2=END LINK
/	3=LOOP LINK
/
/ADSSET(LUN,LKNO,LKTYPE,LCH,IHCH,ISA,IDVTE,ICNT,LKEV,IMOEV,IEV) - 
/QUEUE AN ADSSET I/O REQUEST TO THE AD15 HANDLER TASK VIA LUN.
/THIS REQUEST SETS UP A LINK (NO=LKNO) IN THE AD15 HANDLER TASK LINK
/TABLE.  THE LINKS OF THE LINK TABLE ARE PROCESSED IN NUMERICAL
/ORDER ONCE I/O IS INITIATED(VIA CALL ADSTRT). THIS LINK WILL CONTROL
/ICNT SEQ. AD15 CONVERSIONS OF CHANNELS LCH TO HCH WITH ISA STATUS
/GOVERNING.  THE LINK EV (LKEV) WILL BE SET TO THE NO. OF REPEATS TO GO PLUS ONE
/AT THE END OF EACH TRANSFER (+1 MEANING THIS LINK IS EXHAUSTED).
/IF MEM. OVFL. OCCURS(ONLY HAS MEANING FOR ADD-TO-MEMORY MODE),
/PROCESSING ACCORDING TO THIS LINK WILL BE TERMINATED , THE CHANN.
/NO. OVERFLOWING WILL BE RETURNED IN IMOEV AND LKEV WILL BE SET TO
/-73(8).  THE DIGITAL VALUE WILL BE RECONSTRUCTED TO ITS VALUE
/BEFORE THE OVERFLOW.
/
	.EJECT
/
	.GLOBL ADSSET,.DA
/
ADSSET	0		/SUBR. ENTRY.
	JMS*	.DA
	JMP	ARGEND
LUN	0		/ADDR. OF LUN.
LKNO	0		/ADDR. OF LINK NUMBER.
LKTYPE	0		/ADDR. OF LINK TYPE (0,1,2, OR 3).
LCH	0		/LOWER CHANNEL NO.(LOWEST=1)
HCH	0		/HIGHER CHANNEL NO.(HIGHEST=128)
ISA	0		/ADDR. OF INPUT STATUS.
DVTE	0		/ADDR. OF 1S ELEM. OF DIGIT. VALUES TABLE.
CNT	0		/REPEAT COUNT.(OPTIONAL)
LKEV	0		/LINK EV (OPTIONAL).
MOEV	0		/MEM. OVFL. VAR. (OPTIONAL)
EV	0		/EVENT VAR. (OPTIONAL).
ARGEND	LAC*	LUN	/SET ADSSET REQUEST CPB AND CTB.
	DAC	CPB2
	LAC	EV
	DAC	CPB1
	LAC*	LKNO	/LINK NO. CTB.
	DAC	CTB0
	LAC*	LKTYPE	/LINK TYPE TO CTB.
	DAC	CTB1
	LAC*	LCH
	AAC	-1	/FOR AD15 NUMB. SYST.
	DAC	CTB2
	LAC*	HCH
	AAC	-1	/FOR AD15 NUMB. SYST.
	DAC	CTB3
	LAC	ISA
	DAC	CTB4
	LAC	DVTE
	DAC	CTB5
	LAC	CNT
	SZA		/INCASE NOT SPEC.
	LAC*	CNT
	DAC	CTB6
	LAC	LKEV
	DAC	CTB7
	LAC	MOEV
	DAC	CTB10
	DZM	CNT	/REINIT. OPT. ARGS.
	DZM	MOEV
	DZM	LKEV
	DZM	EV
	CAL	SEQSET
	JMP*	ADSSET	/EXIT
	.EJECT
/ADSSET QUEUE I/O REQUEST CPB AND CTB.
SEQSET	100		/FUNCTION CODE.
CPB1	0		/EV.
CPB2	0		/LUN.
	CTB0		/CTB POINTER.
/CTB
CTB0	0		/LINK NO.  1-HIGHEST LINK NO. (DEF=12(8))..
CTB1	0		/LINK TYPE (0,1,2, OR 3).
CTB2	0		/LOWER CHANNEL NO. (0=LOWEST)
CTB3	0		/HIGHER CHANNEL NO. (177(8)=HIGHEST)
CTB4	0		/ADDR. OF INPUTS STATUS WORD.
CTB5	0		/ADDR. OF 1ST. ELEM. OF DIG. VALS. TABLE.
CTB6	0		/REPEAT COUNT(POSITIVE)
CTB7	0		/LINK EV.
CTB10	0		/MEM. OVFL. EV.
	.END
