/FOCAL FUNCTIONS FOR A PDP12    -JVZ-

/THESE ROUTINES PROVIDE THREE FUNCTIONS FOR A PDP12

/FDIS(X,Y) DISPLAYS A POINT ON THE OSCILLOSCOPE.
/FADC(N) READS ANALOG CHANNEL N
/FRLY(R) SETS THE RELAY REGIISTER: R=1 CLOSES RELAY 5, R=2
/CLOSES RELAY 4; R=4 CLOSES RELAY 3....R=64 CLOSES RELAY 0

/SYMBOL DEFINITIONS:

	FIELD 1

	ATR=0014
	C100=111
	END=134
	DIS=0140
	EVAL=1613
	FIXIT=4453
	FLOAT=5512
	FNTABF=355
	FNTABL=2155
	FNEW=3224	/MAY BE DIFFERENT
	LINC=6141
	PDP=0002
	PUSHJ=4540
	RETURN=5536

	*END
	STVAR		/LOSE 1 VARIABLE


	*FNTABF+17	/ENTRY POINTS
	FADC

	*FNTABF+22
	FDIS

	*FNTABF+32
	FRLY


	*FNTABL+17	/CODED NAMES
	"A^2+"D^2+"C

	*FNTABL+22
	"D^2+"I^2+"S

	*FNTABL+32
	"R^2+"L^2+"Y
	*1142
FDIS,	FIXIT		/CONVERT X TO AN INTEGER
	DCA 16		/BETA REGISTER
	PUSHJ
	    EVAL-1	/SKIP COMMA, GET Y
	FIXIT		/CONVERT Y TO AN INTEGER
	IOF		/PREVENT LINC MODE INTERRUPTS
	LINC
	DIS 16		/PLOT A POINT AT (X,Y)
	PDP
	ION
	RETURN

FRLY,	FIXIT		/LOAD AC 6-11
	JMP I .+1
	FNEW


	*1343
FADC,	FIXIT		/PUT CHANNEL NUMBER IN AC
	TAD C100	/'SAM'=0100
	DCA SAM
	IOF
	LINC
SAM,	0		/READ CHANNEL N
	PDP
	ION
	FLOAT		/CONVERT TO F.P.



	*FNEW		/AFTER THE ZERO COMMAND
	IOF
	LINC
	ATR		/SET RELAYS
	PDP
	ION
	RETURN
STVAR=.			/COULD EASILY ADD OTHER FUNCTIONS
	$
