	.TITLE ADRSET - SETUP FOR RANDOM 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 002 12-2-71
/
/CALLING SEQUENCE:
/CALL ADRSET(LUN,LKNO,LKTYPE,NPTS,ISTE,IDVTE,ICNT,LKEV,IMOEV,IEV)
/
/	JMS* ADRSET
/	JMP .+13	/SUBR. RETURN.
/	ADDR. OF LOG. UNIT NO.
/	ADDR. OF LINK NO.	/1 TO LIMIT OF AD15 HANDLER(DEF=10)
/	ADDR. OF LINK TYPE	/0,1,2, OR 3.
/	ADDR. OF NO. OF CONVS.
/	ADDR. OF 1ST ELEM. OF INPUT STATUS TABLE.
/	ADDR. OF 1ST ELEM. OF DIGITAL VALUES TABLE.
/	ADDR. OF REPEAT COUNT.
/	ADDR. OF LINK EV.
/	ADDR. OF MEM. OV VAR.  (NO. OF CHANN. OVFL. RETURNED.
/	ADDR. OF I/O EV.
/	NEXT INSTRUCTION.
/LAST FOUR ARGUMENTS ARE OPTIONAL.
/
/NOTE ON LINKTYPES:
/	0=NULL LINK
/	1=CHAIN LINK
/	2=END LINK
/	3=LOOP LINK
/
/
/
/ADRSET(LUN,LKNO,LKTYPE,NPTS,ISTE,IDVTE,ICNT,LKEV,IMOEV,IEV) - 
/QUEUE AND ADRSET 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 FOF THE LINK TABLE ARE PRO-
/CESSED IN NUMERICAL ORDER ONCE I/O IS INITIATED (VIA CALL ADSTRT).
/THIS LINK WILL CONTROL NPTS AD15 CONVERSIONS ICNT TIMES WITH THE
/ISTE HEADED INPUT STATUS TABLE GOVERNING.  THE LINK EV (LKEV) IS SET
/TO THE NO. OF REPEATS TO GO PLUS ONE AT THE END OF EACH TRANSFER
/(+1 MEANING THAT THE LINK IS EXHAUSTED).  IF MEMORY OVERFLOW OCCURS,
/(THIS HAS MEANING ONLY FOR ADD-TO-MEMORY MODE) PROCESSING 
/ACCORDING TO THIS LINK WILL BE TERMINATED.  THE CHANNEL 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 ADRSET,.DA
/
ADRSET	0		/SUBR. ENTRY
	JMS*	.DA
	JMP	ARGEND
LUN	0		/ADDR. OF LUN.
LKNO	0		/ADDR. OF LINK NO.
LKTYPE	0		/ADDR. OF LINK TYPE.
NPTS	0		/ADDR. OF NO. OF CONVERSIONS.
STE	0		/ADDR. OF 1ST ELEM. OF INP. ST. TABL.
DVTE	0		/ADDR. OF 1ST ELEM. OF DIG. VALS. TABL.
CNT	0		/ADDR. OF REPEAT COUNT (OPTIONAL).
LKEV	0		/LINK EV.(OPTIONAL).
MOEV	0		/MEM. OVFL. VAR. (OPTIONAL).
EV	0		/I/O EV.
ARGEND	LAC*	LUN	/SET ADRSET REQUEST CPB AND CTB.
	DAC	CPB2
	LAC	EV
	DAC	CPB1
	LAC*	LKNO
	DAC	CTB0
	LAC*	LKTYPE
	DAC	CTB1
	LAC*	NPTS
	DAC	CTB2
	LAC	STE
	DAC	CTB3
	LAC	DVTE
	DAC	CTB4
	LAC	CNT	
	SZA		/INCASE NOT SPEC.
	LAC*	CNT
	DAC	CTB5
	LAC	LKEV
	DAC	CTB6
	LAC	MOEV
	DAC	CTB7
	DZM	CNT	/REINIT. OPT. ARGS.
	DZM	MOEV
	DZM	EV
	DZM	LKEV
	CAL	RANSET	/QUEUE ADRSET REQUEST
	JMP*	ADRSET	/EXIT.
	.EJECT
/
/ADRSET QUEUE I/O REQUEST CPB AND CTB.
/
RANSET	200		/FUNCTION CODE
CPB1	0		/EV.
CPB2	0		/LUN.
	CTB0		/CTB POINTER.
/CTB
/
CTB0	0		/LINK NO.  1-HIGHEST LK NO.(DEF=12(8))
CTB1	0		/LINK TYPE (0,1,2,OR 3).
CTB2	0		/NO OF PTS. TO CONVERT.
CTB3	0		/ADDR. OF 1ST EL. OF INP. ST. TABL.
CTB4	0		/ADDR. OF 1ST EL. OF DIG. VAL. TABL.
CTB5	0		/REPEAT CCOUNT (POS.).
CTB6	0		/LINK EV.
CTB7	0		/MEM. OVFL. EV.
	.END
/
