	.TITLE	RAVA
/
/  7 MAR 72 - MOD BY P. HENDERSON
/
/READ ANALOG VALUE SUBROUTINE
/EXECUTION TIME: DEVICE LIMITED
/CALLING SEQUENCE:
/     CALL RAVA(TYPE,ADDRESS,VALUE,ERROR)
/     TYPE: 0=AMPLIFIER,1=DERIVATIVE
/            2=FUNCTION GENERATOR,3=TRUNK,
/            4=POTENTIOMETER,5=PATCH PANEL
/            6=DERIVATIVE/10
/            7=HAND-SET POTENTIOMETER
/     ADDRESS:0-119 INTEGER PATCHBOARD
/                ADDRESS
/     VALUE: UNNORMALIZED INTEGER VALUE
/              IF ERROR=0
/            UNDEFINED
/               IF ERROR=1,2,4,5,OR 7
/     ERROR=0: NO ERROR
/          =1: ILL. TYPE OR ADDRESS REQ.
/          =2: TYPE AND/OR ADDRESS
/              FAILED TO SET PROPERLY
/          =4: HARDWARE MALFUNCTION
/          =5: DVM OVERRANGE (DVM>1.1799)
/          =7: KEYBOARD INTERFERENCE
/              RAVA CANNOT PROCEED
/
	.GLOBL RAVA,%DVM,%SACO
/
RAVA	XX
	.ARG	RAVA
	DAC TYPE    /TYPE LOCATION
	.ARG
	DAC VALUE
	LAC* VALUE
	LMQ         /ADDRESS IN MQ
	.ARG
	DAC VALUE   /VALUE LOCATION
	.ARG
	DAC ERROR   /ERROR LOCATION
	LAC* TYPE   /TYPE IN AC
	JMS* %SACO
	DAC* ERROR  /ERROR CODE
	SZA
	JMP* RAVA   /VALUE UNDEFINED
	JMS* %DVM
	DAC* ERROR  /ERROR
	LACQ
	DAC* VALUE  /VALUE
	JMP* RAVA
ERROR
TYPE
VALUE
	.END
	LAC* VALUE
	LMQ         /ADDRESS IN MQ
	ISZ RAVA
	LAC* RAVA
	DAC VALUE
	SPA
	LAC* VALUE	/INDIRECT
	DAC VALUE   /VALUE LOCATION
	ISZ RAVA
	LAC* RAVA
	DAC ERROR
	SPA
	LAC* ERROR  /INDIRECT
	DAC ERROR   /ERROR LOCATION
	ISZ RAVA    /BUMP TO EXIT
	LAC* TYPE   /TYPE IN AC
	JMS* %SACO
	DAC* ERROR  /ERROR CODE
	SZA
	JMP* RAVA   /VALUE UNDEFINED
	JMS* %DVM
	DAC* ERROR  /ERROR
	LACQ
	DAC* VALUE  /VALUE
	JMP* RAVA
ERROR
TYPE
VALUE
	.END
