/

/COPYRIGHT (C) 1975

/DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

/

/THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

/ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH

/THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

/SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-

/VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

/EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO

/THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

/SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

/

/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

/WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-

/MITMENT BY DIGITAL EQUIPMENT CORPORATION.

/

/DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

/OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

	.EJECT

/ROLF HUBERT

/EDIT #2   23 MAY 73   T.A. MURRAY

/EDIT #3	9/19/75	SCR	COPYRIGHT

	.GLOBL	INIT,POINT,TEXT,.DA,VECT1,VECT2

	.IODEV	10		/VPA. IS ASSIGNED TO DAT SLOT 10

INIT	XX		/INITIALIZATION ROUTINE

	.INIT	10,1,0		/INITIALIZE STORAGE TUBE

	JMP*	INIT		/RETURN TO USER

POINT	XX		/DISPLAY POINT ROUTINE

	JMS*	.DA		/SUBPROGRAM TO LOAD ARGUMENTS

	JMP	.+4		/JUMP AROUND ARGUMENTS

N	.DSA	0		/NUMBER OF POINTS TO BE PLOTTED

M	.DSA	0		/STORE OR NON-STORE MODE

IA	.DSA	0		/FIRST POINT OF N TO BE PLOTTED

	LAC*	N		/TEST FOR N>1

	CMA; TAD (1		/SET UP COUNTER  FOR # OF POINTS

	DAC	CTR

AGAIN	LAC*	IA		/GET FIRST POINT

	DAC	PT

	LAC*	M		/DETERMINE WHICH MODE

	SZA			/IF 0 STORE MODE

	JMP	MODE14		/NON-STORE MODE

	.WRITE	10,4,PT,1 	/DISPLAY POINT IN STORE MODE

	JMP	HERE		/TEST FOR MORE POINTS

MODE14	.WRITE	10,14,PT,1	/DISPLAY POINT IN NON-STORE MODE

HERE	ISZ	IA		/GET NEXT POINT

	ISZ	CTR		/ANY MORE POINTS?

	JMP	AGAIN		/YES

	JMP*	POINT		/NO - RETURN TO USER

PT	0			/POINT TO BE PLOTTED

CTR	0			/NUMBER OF POINTS COUNTER

TEXT	XX		/DISPLAY TEXT ROUTINE

	JMS*	.DA		/GET  ARGUMENTS

	JMP	.+4

N1	.DSA	0		/NUMBER OF CHARACTERS

M1	.DSA	0		/SCALE

TEXT1	.DSA	0		/ARRAY NAME

	LAC*	N1		/GET NUMBER OF CHAR.

	CMA; TAD (1

	DAC	N1		/SET UP COUNTER FOR  NUMBER OF CHAR

	LAC	TEXT1

	DAC	NEWP

GETWD	LAC*	NEWP		/1ST WORD OF IOPS ASCII PAIR

	DAC	WRD2

	ISZ	NEWP		/INCREMENT NEWP TO GET 2ND WORD

	LAC*	NEWP		/2ND WORD OF PAIR

	DAC	WRD3

	ISZ	NEWP		/INCREMENT TO NEXT PAIR

	LAW	-5		/5 CHAR PER TWO WORDS COUNTER

	DAC	TEMP

GET	JMP	UNPACK		/UNPACK IOPS ASCII

OVER	ISZ	N1		/HAVE WE EXHAUSTED THE NUMBER OF CHAR

	JMP	.+2		/NO

	JMP*	TEXT		/YES - RETURN TO USER

	ISZ	TEMP

	JMP	GET		/GET ANOTHER CHAR

	JMP	GETWD		/GET ANOTHER WORD

UNPACK	LAW	-7		/SEVEN BIT COUNTER

	DAC	SEVEN		

ALL7	LAC	WRD3		/LOAD FIRST WORD

	RAL

	DAC	WRD3		

	LAC	WRD2		/LOAD SECOND WORD

	RAL

	DAC	WRD2

	LAC	WRD1		/LOAD UNPACKED WORD

	RAL

	DAC	WRD1		/UNPACKED CHAR

	AND	(177

	DAC	NWRD1

	ISZ	SEVEN		/ARE SEVEN BITS DONE?

	JMP	ALL7		/NO - KEEP UNPACKING

	LAC*	M1		/YES

	AND	(37

	RTR; RTR; RTR; RAR		/GET SCALE IN BITS 1-5

	TAD	(400000		/ADD SCALING FACTOR

	TAD	NWRD1		/ADD CHAR

	DAC	ARRAY		/PLACE IN IOPS IMAGE ARRAY

	.WRITE	10,3,IMAGE,2	/DISPLAY CHAR

	.WAIT	10

	JMP	OVER		/UNPACK ANOTHER CHAR

NEWP	0			/CONTAINS ADDRESS OF CHAR

WRD1	0			/UNPACKED CHAR

WRD2	0			/FIRST WORD OF IOPS ASCII WORD PAIR

WRD3	0			/2ND WORD OF IOPS ASCII WORD PAIR

TEMP	0			/5 CHAR PER 2 WORDS COUNTER

NWRD1	0			/UNPACKED CHAR

IMAGE	IMAG-.*400+3

SEVEN	0

ARRAY	0

	177

IMAG=.

VECT1	XX		/DISPLAY A POINT FOR THE LINE ROUTINE

	JMS*	.DA		/ GET ARGUMENT

	JMP	.+2

KA	.DSA	0		/ADDRESS OF POINT

	LAC*	KA		/GET POINT

	TAD	PT		/ADD PREVIOUS POINT

	DAC	PT1

	.WRITE	10,4,PT1,1	/DISPLAY POINT

	.WAIT	10

	JMP*	VECT1		/RETURN TO USER

PT1	0			/POINT TO BE DISPLAYED

VECT2	XX		/UPDATE PT FOR NEW LINE

	LAC*	KA		/GET LAST POINT

	TAD	PT		/ADD FIRST POINT

	DAC	PT		/NEW POINT

	JMP*	VECT2		/RETURN TO USER

	.END
