Google
 

Trailing-Edge - PDP-10 Archives - BB-F494Z-DD_1986 - 10,7/pltio.mac
There are 38 other files named pltio.mac in the archive. Click here to see a list.
TITLE	LINE
SUBTTL	D.TODD/DRT/DZN/PAH	2-OCT-85


;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1973,1983,1986. ALL RIGHTS RESERVED.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERRED.
;
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.


SEARCH	PLTPRM
SALL


CUSTVR==0		;CUSTOMER VERSION
DECVER==5		;DEC VERSION
DECMVR==1		;DEC MINOR VERSION
DECEVR==2027		;DEC EDIT VERSION
SUBTTL	REVISION HISTORY


;START OF VERSION 4A
;1217	Clean up the listings for release and fix unmatched angle brackets.
;1220	Release on both TOPS-10 and TOPS-20 as version 4A(1220).

;Start of Version 5.1
;1544	Change SETZ at DECPLT to a SETZM.
;2026	Update copyright notices.
;2027	Update copyright notices.
	IFE HILOW,<	TWOSEG
			RELOC	400000>
	HELLO	(LINE)
	SAVALL
	MOVEI	X,@0(16)
	MOVEI	Y,@1(16)
	MOVE	N,@2(16)
	MOVE	K,@3(16)
	JRST	0,%4M
%3M:
	POPALL
	POPJ	17,0
%4M:
	MOVEI	15,3
	MOVEM	15,I3
	MOVE	15,N
	IMUL	15,K
	MOVEM	15,NP
	MOVEI	13,1
	SUB	13,NP
	IDIV	13,K
	SUBI	13,1
	MOVEI	15,1
	MOVEM	13,.S0000
%5M:
	MOVEM	15,I
%6M:
	MOVE	14,I
	ADD	14,X
	MOVEI	14,777777(14)
	MOVE	15,I
	ADD	15,Y
	MOVEI	15,777777(15)
	FUNCT2	PLOT##,<$1,14,$1,15,$2,I3>
%10P:
	MOVEI	14,2
	MOVEM	14,I3
	MOVE	15,K
	ADDM	15,I
	AOSGE	0,.S0000
	JRST	0,%6M
%1M:
	JRST	0,%3M

;ARGUMENT BLOCKS:

	0,,0
%2M:	0,,0

	;REGISTER ASSIGNMENTS
	I=2
	I3=3
	K=4
	N=5
	NP=6
	X=7
	Y=10
	.S0000=11
	PRGEND
TITLE	PLOT	%2.(221) PLOT SUBROUTINES
SUBTTL	D. TODD/DRT/HPW/DZN/PAH 6-Jan-83


;COPYRIGHT (C) 1973, 1983 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR ANY  OTHER
;COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE  SOFTWARE  IS  HEREBY
;TRANSFERRED.
;
;
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT  NOTICE
;AND  SHOULD  NOT  BE  CONSTRUED  AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;
;DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY  OF  ITS
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

SEARCH	PLTPRM
SALL

	IFE HILOW,<	TWOSEG
			RELOC	400000>
;THIS PACKAGE CONTAINS THE PLOT ROUTINES FOR THE XY10 PLOTTER.
;THE CALLING SEQUENCE IS THAT USED BY FORTRAN IV

;THE CALLS ARE:
;	CALL PLOTS (I)
;	CALL PLOT (X,Y,PEN)
;	CALL SYMBOL (X,Y,SIZE,BCD,THETA,NBCD
;	CALL SETABL (TABLE,ANSWER)
;	CALL MKTBL (TABLENUMBER,ADDRESS)
;	CALL WHERE (X,Y)
;	CALL NUMBER (X,Y,SIZE,FPNUM,THETA,FRACTDIGITS)
;
;	X,Y ARE INCHES FROM ORIGIN, FLT PT
;	SIZE IS CHARACTER HEIGHT, FLT PT, SHOULD BE
;	 A MULTIPLE OF .08" IF SMALL
;
;	THETA IS IN DEGREES, FLT PT.
;	PEN IS
;	3 PEN UP
;	2 PEN DOWN
;	1 PEN UNCHANGED
;	-N = N AND THEN CLEAR X,Y AND OUTPUT

;PLOTTER COMMANDS (USING CALCOMP'S AXIS CONVENTIONS)

	PENUP=40
	PENDWN=20
	MVLFT=10	;-X DRUM UP
	MVRT=4		;+X DRUM DOWN
	MVDWN=1		;-Y CARRIAGE RIGHT
	MVUP=2		;+Y CARRIAGE LEFT

;THE PLOTTER IS ON CHANNEL 17 TO AVOID CONFLICT WITH F4
	PCHN=17
	PDPSIZ==20		;PUSHDOWN STACK SIZE

;IMPLEM DEPEND CONSTANTS

	IFE LPSYM,<
	LPBUFSZ=^D2160
	LPWIDTH=^D120
	ILINES=^D90
>
;ACCUMULATOR DEFINITIONS

Q=16	;JSA AC

	IFE LPSYM,<
;ADDITIONAL USES

;VALUES SET UP BY LINK-10

	EXTERNAL LEAVES,INCHES,STEPS
	EXTERN LPBUF,POB,PLTCHAR,IX,IY,RX,RY,CURX,CURY,SPC.X,SPC.Y,PENPOS
	X=RX
	Y=RY
>
ENTRY PLOTS
	HELLO	(PLOTS)
	PUSH	P,PT

	IFE ALONE,<
	IFN LPSYM,<
	INIT PCHN,13	;IMAGE BINARY
	SIXBIT /PLT/
	XWD POB,0
	JRST FOOP	;ERROR RETURN>

	IFE LPSYM,<
	MOVEI	PT,'PLT'
	SKIPE	LPBUF	;NOSKIP MEANS SIMULATION
	MOVEI	PT,'LPT'
	HRLM	PT,PFNAM+1	; IN CASE DSK
	HRLZM	PT,OBLOCK+1	;DEVICE WORD OF OPEN BLK
	OPEN	PCHN,OBLOCK
	JRST	FOOP>

	HLLZS PFNAM+1
	SETZM PFNAM+2
	SETZM PFNAM+3
	ENTER PCHN,PFNAM	;IN CASE ASSIGNED DSK
	JRST FOOP		;CANT ENTER FILE
	SETOM PENPOS	;MARK PEN DOWN TO FORCE RAISE
	OUTBUF PCHN,2>		;SETUP THE BUFFER RING

	IFE HILOW,<
	MOVE	PT,@1(Q)
	MOVEM	PT,STEPS>	;STEPS IS POSIT./INCH
	IFE LPSYM,<
	SKIPN	LPBUF	;SKIP MEANS SET UP MAP2CH PARAMS
	JRST	PLS1
	PUSH	P,PT+1
	MOVE	PT,INCHES
	FMPR	PT,STEPS	;TOTAL WIDTH OF PLOTTER
	FUNCT	IFIX.,<PT>
	HRLZM	0,PT	;A TRICK TO ADD PRECISION BY MULTIP BY 2**18
	LSH	0,-^D17	;FOR THE TRICK TO WORK THE ORIG. MUST BE LT 2**17
	JUMPG	0,FOOP	;ERROR EXIT
	IDIVI	PT,LPWIDTH
	MOVEM	PT,SPC.Y	;NUM OF STEPS PER CHAR
	IMULI	PT,5		;5/3 IS RATIO OF SIDE/BOTTOM OF LPT CHAR
	IDIVI	PT,3
	MOVEM	PT,SPC.X
	POP	P,PT+1
	MOVSI	PT,700	;IMPROVE PACKING (LPT)
	SKIPA	0,0
PLS1:>
	MOVSI PT,600	;IMPROVE PACKING
	HLLM PT,POB+1	;BY CHANGING BYTE SIZE

	POP	P,PT
	SETZM @0(Q)	;MARK SUCCESS
	FUNCT PLOT,<X,Y,[-3]>	;LIFT PEN
	GOODBY	(1)

FOOP:	SETOM @0(Q)	;ERROR INDICATION
	POP	P,PT
	GOODBY	(1)	;RETURN
	ENTRY PLOT

	;REGISTERS
	PL.X=15
	PL.Y=14
	STEP=13
	DAT=12
	TDY=11
	TDX=10
	LP.BUFP=7
	TYY=7
	TY=6
	TX=5
	SC=4
	ISX=3
	ISY=2

	HELLO	(PLOT)		;ENTRY TO PLOT
	SAVALL
	MOVE	PL.X,@0(Q)
	MOVE	PL.Y,@1(Q)
	PUSHJ P,PLOT.	;DO WORK
	POPALL
	GOODBY	(3)	;RETURN TO CALLER

PLT1:
	IFE LPSYM,<
	SKIPE	LPBUF	;NO LPT BUFFER, DON'T INTERCEPT
	JRST	PLT2>
	SOSG POB+2
	OUTPUT PCHN,0
	IDPB DAT,POB+1
	POPJ P,0

	IFE LPSYM,<
PLT2:	TRNE	DAT,40	;NOSKIP MEANS PEN UP
	SETZM	PENPOS
	TRNE	DAT,20	;NOSKIP MEANS PEN DOWN
	SETOM	PENPOS
	TRNE	DAT,10	;NS MEANS -(X)
	SOS	CURX
	TRNE	DAT,4	;NS MEANS +(X)
	AOS	CURX
	TRNE	DAT,2	;NS MEANS +(Y)
	AOS	CURY
	TRNE	DAT,1	;NS MEANS -(Y)
	SOS	CURY

	SKIPN	PENPOS	;SKIP IF PEN DOWN, OTHER WISE FINIS
	POPJ	P,0
	LOCSUB	XY2CHR
	MOVEM	0,LP.BUFP
	MOVE	DAT,PLTCHAR	;SET BY PLTUTL--CHAR TO USE FOR LINES
	ROT	DAT,7		;RIGHT JUSTIFY
	IDPB	DAT,LP.BUFP	;LP.BUFP RETURNED BY XY2CHR

	POPJ	P,0>
	ENTRY PLOT.
PLOT.:
PENCK:	MOVM TX,@2(Q)
	CAIG TX,1
	JRST PENOK
	SUBI TX,3
	CAMN TX,PENPOS
	JRST PENOK
	MOVEI DAT,PENUP
	SKIPGE TX
	MOVEI DAT,PENDWN
	PUSHJ P,PLT1
	MOVEM TX,PENPOS
PENOK:	MOVE TX,PL.X
	FMPR TX,STEPS
	FADR TX,[DEC 0.5]
	SKIPGE	PL.X
	FSBR	TX,[DEC 1.0]
	FUNCT	INT,<TX>
	MOVEM 0,ISX
	MOVE TX,0
	MOVE TY,PL.Y
	FMPR TY,STEPS
	FADR TY,[DEC 0.5]
	SKIPGE	PL.Y
	FSBR	TY,[DEC 1.0]
	FUNCT	INT,<TY>
	MOVEM 0,ISY
	MOVE TY,0
	SUB TX,IX
	MOVEI TDX,MVLFT
	SKIPL TX
	MOVEI TDX,MVRT
	SUB TY,IY
	MOVEI TDY,MVDWN
	SKIPL TY
	MOVEI TDY,MVUP
	MOVMS TX
	MOVMS TY
	CAMG TY,TX
	JRST NOSWAP
	EXCH TX,TY
	EXCH TDX,TDY
NOSWAP:	JUMPE TX,ENDOU1	;NO MOTION
	JUMPE TY,NORM
	MOVEI SC,0
NY:	TLNE TY,200000
	JRST NX
	LSH TY,1
	TRO TY,1
	AOJA SC,NY
NX:	SUBI SC,^D34
MKSC:	IDIV TY,TX
	MOVNS SC
	LSH TY,0(SC)
NORM:	MOVEM TY,STEP
	MOVEI TY,0
	IOR TDY,TDX
INLOOP:	ADD TY,STEP
	MOVE DAT,TDX
	TLZE TY,200000
	MOVE DAT,TDY
	PUSHJ P,PLT1
	SOJG TX,INLOOP

	MOVEM ISX,IX
	MOVEM PL.X,X
	MOVEM ISY,IY
	MOVEM PL.Y,Y
ENDOU1:	SKIPL @2(Q)
	JRST ENDOUT
	IFE	LPSYM,<
	SKIPN	LPBUF	;NO NEED TO DO I/O WHEN SIMUL
>
	OUTPUT PCHN,0
	SETZM X
	SETZM Y
	SETZM IX
	SETZM IY
ENDOUT:
	POPJ P,0
	ENTRY SYMBOL

	;REGISTERS
	SINOR=15
	COSOR=14
	SVSZ=13
	SVTXT=12
	BYTE=11
	SVNTXT=10
	STROKE=7
	TY=6
	TK=5
	LPT.BYT=5
	STROCNT=4
	XO=3
	YO=2

	HELLO	(SYMBOL)
;	MOVE	SVX,@0(Q)	JUST TO SHOW WHICH ARG
;	MOVE	SVY,@1(Q)	DITTO
	SAVALL
	MOVE	SVSZ,@2(Q)
	MOVEI	SVTXT,@3(Q)
;	MOVE	SVOR,@4(Q)	TO SHOW WHICH ARG
	MOVE	SVNTXT,@5(Q)
	FUNCT2	COSD,<$1,4(Q)>
	MOVEM R0,COSOR
	FUNCT2	SIND,<$1,4(Q)>
	MOVEM R0,SINOR
	FUNCT2	PLOT,<$1,0(Q) ,$1,1(Q) ,$2,[3]>
	SKIPG SVSZ
	JRST ENDTXT	;SIZE MUST BE .GT. 0
	HRLI SVTXT,440700	;POINTER TO ASCII

	IFE LPSYM,<
	SKIPN	LPBUF		;SKIP MEANS LPT SIMULATION
	JRST	LP1		;NON-SIM PATH
	LOCSUB	XY2CHR		;SETUP BP ON BASIS OF CURX,CURY
	MOVEM	R0,LPT.BYT
SIM1:	SOJL	SVNTXT,ENDTXT
	ILDB	BYTE,SVTXT		;FROM ARG-LIST IN EFFECT
	IDPB	BYTE,LPT.BYT	;INTO LPT BUFFER
	JRST	SIM1
>
LP1:	SOSGE SVNTXT
	JRST ENDTXT
	ILDB BYTE,SVTXT	;GET TEXT BYTE
	MOVSI STROKE,440500	;SET UP FOR SYM STROKES

;FOLLOWING TWO LOCATIONS ARE MODIFIED TO GET DIFFERENT
;CHARACTER SETS.
T1M:	HRR STROKE,TBL1(BYTE)
T2M:	HLRZ STROCNT,TBL1(BYTE)	;NUMBER OF STROKES
	JUMPE STROCNT,LP1	;UNDEFINED BYTE
	MOVE XO,X
	MOVE YO,Y	;ORIGIN OF THE CHARACTER

OUT1:	ILDB TX,STROKE	;1 FOR MARK, 0 FOR BLANK
	MOVNS TX
	ADDI TX,3
	PUSH	P,TX
	ILDB TX,STROKE
	ILDB TY,STROKE
	SUBI TY,6	;OFFSET FOR VERTICAL
	FSC TX,230	;FLOAT AND DIVIDE BY 8
	FSC TY,230	;"
	FMPR TX,SVSZ
	FMPR TY,SVSZ
	MOVE BYTE,TX
	FMPR BYTE,COSOR
	MOVN R0,TY
	FMPR R0,SINOR
	FADR R0,BYTE
	FADR R0,XO
	PUSH	P,0
	MOVE BYTE,TY
	FMPR BYTE,COSOR
	MOVE R0,TX
	FMPR R0,SINOR
	FADR R0,BYTE
	FADR R0,YO
	PUSH	P,0
	MOVEI	TX,-1(P)
	MOVEI	TY,(P)
	MOVEI	BYTE,-2(P)
	FUNCT2	PLOT,<$1,TX ,$1,TY ,$1,BYTE>
	SUB	P,[3,,3]
	SOJG STROCNT,OUT1
	JRST LP1

ENDTXT:	POPALL
	GOODBY	(6)		;RETURN TO CALLER
;FORMAT OF CHARACTER TABLE IS: LEFT HALF, NUMBER OF LINE
;SEGMENTS IN CHARACTER. RIGHT HALF, ADDRESS OF BYTE TABLE
;DESCRIBING SEGMENTS

TBL1:	;THIS IS VERY LONG, SO XLIST
XLIST
	XWD 0,0		;CHARACTER TABLE
	XWD 6,T11
	XWD 11,T12
	XWD 17,T13
	XWD 4,T14
	XWD 4,T15
	XWD 13,T16
	XWD 7,T17
	XWD 5,T110
	XWD 13,T111
	XWD 15,T112
	XWD 11,T113
	XWD 7,T114
	XWD 16,T115
	XWD 14,T116
	XWD 14,T117
	XWD 7,T120
	XWD 7,T121
	XWD 7,T122
	XWD 7,T123
	XWD 6,T124
	XWD 6,T125
	XWD 15,T126
	XWD 11,T127
	XWD 3,T130
	XWD 6,T131
	XWD 4,T132
	XWD 6,T133
	XWD 5,T134
	XWD 5,T135
	XWD 7,T136
	XWD 4,T137
	XWD 1,T140
	XWD 5,T141
	XWD 5,T142
	XWD 11,T143
	XWD 17,T144
	XWD 23,T145
	XWD 14,T146
	XWD 3,T147
	XWD 5,T150
	XWD 4,T151
	XWD 11,T152
	XWD 5,T153
	XWD 7,T154
	XWD 3,T155
	XWD 6,T156
	XWD 2,T157
	XWD 14,T160
	XWD 4,T161
	XWD 12,T162
	XWD 14,T163
	XWD 5,T164
	XWD 13,T165
	XWD 13,T166
	XWD 4,T167
	XWD 21,T170
	XWD 13,T171
	XWD 13,T172
	XWD 14,T173
	XWD 4,T174
	XWD 5,T175
	XWD 4,T176
	XWD 12,T177
	XWD 23,T1100
	XWD 5,T1101
	XWD 14,T1102
	XWD 11,T1103
	XWD 7,T1104
	XWD 7,T1105
	XWD 5,T1106
	XWD 13,T1107
	XWD 6,T1110
	XWD 7,T1111
	XWD 10,T1112
	XWD 7,T1113
	XWD 4,T1114
	XWD 5,T1115
	XWD 4,T1116
	XWD 12,T1117
	XWD 7,T1120
	XWD 14,T1121
	XWD 11,T1122
	XWD 13,T1123
	XWD 5,T1124
	XWD 7,T1125
	XWD 4,T1126
	XWD 6,T1127
	XWD 4,T1130
	XWD 6,T1131
	XWD 5,T1132
	XWD 5,T1133
	XWD 3,T1134
	XWD 5,T1135
	XWD 6,T1136
	XWD 6,T1137
	XWD 3,T1140
	XWD 16,T1141
	XWD 12,T1142
	XWD 11,T1143
	XWD 14,T1144
	XWD 13,T1145
	XWD 10,T1146
	XWD 16,T1147
	XWD 7,T1150
	XWD 7,T1151
	XWD 7,T1152
	XWD 6,T1153
	XWD 3,T1154
	XWD 14,T1155
	XWD 7,T1156
	XWD 12,T1157
	XWD 13,T1160
	XWD 13,T1161
	XWD 6,T1162
	XWD 13,T1163
	XWD 10,T1164
	XWD 10,T1165
	XWD 4,T1166
	XWD 6,T1167
	XWD 4,T1170
	XWD 6,T1171
	XWD 5,T1172
	XWD 10,T1173
	XWD 3,T1174
	XWD 10,T1175
	XWD 5,T1176
	XWD 4,T1177
RADIX 10
;FORMAT OF BYTE TABLE: BYTE COME IN TRIPLES. FIRST IS
;0 FOR PEN UP, 1 PEN DOWN. SECOND IS X COORDINATE OF OTHER
;END OF SEGMENT. THIRD IS SAME FOR Y. CHARACTER ASSUMED
;TO START AT (0,6)
T11:	BYTE (5) 0,0,9,1,3,6,1,3,14,0,3,6,1,6,9,0,8,6
T12:	BYTE (5) 0,6,6,1,3,9,1,1,9,1,0,8,1,0,7,1,1,6,1,3,6
	BYTE (5) 1,6,9,0,8,6
T13:	BYTE (5) 1,2,8,1,2,13,1,3,14,1,5,14,1,6,13,1,6,12,1,5,11
	BYTE (5) 1,2,11,0,5,11,1,6,10,1,6,9,1,5,8,1,3,8,1,2,9
	BYTE (5) 0,8,6
T14:	BYTE (5) 0,0,8,1,3,11,1,6,8,0,8,6
T15:	BYTE (5) 0,1,10,1,5,10,1,5,8,0,8,6
T16:	BYTE (5) 0,3,9,1,2,10,1,1,10,1,0,9,1,0,7,1,1,6,1,2,6
	BYTE (5) 1,3,7,0,2,8,1,0,8,0,8,6
T17:	BYTE (5) 0,0,10,1,6,10,0,4,10,1,4,6,0,2,6,1,2,10,0,8,6
T110:	BYTE (5) 1,3,9,0,0,11,1,1,11,1,6,6,0,8,6
T111:	BYTE (5) 0,0,11,1,1,12,1,2,12,1,5,9,1,5,7,1,4,6,1,3,6
	BYTE (5) 1,2,7,1,2,8,1,6,12,0,8,6
T112:	BYTE (5) 0,2,10,1,1,10,1,0,9,1,0,7,1,1,6,1,3,6,1,4,7
	BYTE (5) 1,4,9,1,3,10,1,2,10,1,2,12,1,4,12,0,8,6
T113:	BYTE (5) 0,0,7,1,1,6,1,2,6,1,3,7,1,3,12,1,4,13,1,5,13
	BYTE (5) 1,6,12,0,8,6
T114:	BYTE (5) 0,0,9,1,4,9,0,2,11,1,2,7,0,0,7,1,4,7,0,8,6
T115:	BYTE (5) 0,0,8,1,0,7,1,1,6,1,3,6,1,4,7,1,4,9,1,3,10
	BYTE (5) 1,1,10,1,0,9,1,0,8,1,4,8,0,2,10,1,2,6,0,8,6
T116:	BYTE (5) 0,0,10,1,1,9,1,2,9,1,4,11,1,5,11,1,6,10,1,5,9
	BYTE (5) 1,4,9,1,2,11,1,1,11,1,0,10,0,8,6
T117:	BYTE (5) 0,4,8,1,3,9,1,1,9,1,0,8,1,0,7,1,1,6,1,3,6
	BYTE (5) 1,4,7,1,4,10,1,2,12,1,1,12,0,8,6
T120:	BYTE (5) 0,3,11,1,1,11,1,0,10,1,0,8,1,1,7,1,3,7,0,8,6
T121:	BYTE (5) 0,0,11,1,2,11,1,3,10,1,3,8,1,2,7,1,0,7,0,8,6
T122:	BYTE (5) 0,0,10,1,0,8,1,1,7,1,3,7,1,4,8,1,4,10,0,8,6
T123:	BYTE (5) 0,0,7,1,0,9,1,1,10,1,3,10,1,4,9,1,4,7,0,8,6
T124:	BYTE (5) 0,0,14,1,3,6,1,6,14,0,1,11,1,5,11,0,8,6
T125:	BYTE (5) 1,6,6,1,6,14,1,0,14,0,2,10,1,6,10,0,8,6
T126:	BYTE (5) 1,4,10,0,0,10,1,4,6,0,3,6,1,1,6,1,0,7,1,0,9
	BYTE (5) 1,1,10,1,3,10,1,4,9,1,4,7,1,3,6,0,8,6
T127:	BYTE (5) 0,2,8,1,0,10,1,2,12,0,0,10,1,6,10,0,4,12,1,6,10
	BYTE (5) 1,4,8,0,8,6
T130:	BYTE (5) 0,0,5,1,4,5,0,0,6
T131:	BYTE (5) 0,0,10,1,6,10,0,3,13,1,6,10,1,3,7,0,8,6
T132:	BYTE (5) 0,2,16,1,3,17,1,4,16,0,0,6
T133:	BYTE (5) 1,6,12,0,0,10,1,6,10,0,0,8,1,6,8,0,8,6
T134:	BYTE (5) 1,3,6,0,3,7,1,0,10,1,3,13,0,8,6
T135:	BYTE (5) 1,3,6,0,0,7,1,3,10,1,0,13,0,8,6
T136:	BYTE (5) 0,0,7,1,6,7,0,6,9,1,0,9,0,0,11,1,6,11,0,8,6
T137:	BYTE (5) 0,0,11,1,3,8,1,6,11,0,8,6
T140:	BYTE (5) 0,8,6
T141:	BYTE (5) 0,2,6,1,2,7,0,2,8,1,2,13,0,8,6
T142:	BYTE (5) 0,2,12,1,2,14,0,4,14,1,4,12,0,8,6
T143:	BYTE (5) 0,2,7,1,2,13,0,4,13,1,4,7,0,6,9,1,0,9,0,0,11
	BYTE (5) 1,6,11,0,8,6
T144:	BYTE (5) 0,0,8,1,2,6,1,4,6,1,6,8,1,4,10,1,2,10,1,0,12
	BYTE (5) 1,2,14,1,4,14,1,6,12,0,4,14,1,4,6,0,2,6,1,2,14
	BYTE (5) 0,8,6
T145:	BYTE (5) 1,6,12,1,1,12,1,0,11,1,0,10,1,1,9,1,2,9,1,3,10
	BYTE (5) 1,3,11,1,2,12,0,4,9,1,3,8,1,3,7,1,4,6,1,5,6
	BYTE (5) 1,6,7,1,6,8,1,5,9,1,4,9,0,8,6
T146:	BYTE (5) 0,6,6,1,1,11,1,1,13,1,2,14,1,3,14,1,4,13,1,0,9
	BYTE (5) 1,0,7,1,1,6,1,3,6,1,5,8,0,8,6
T147:	BYTE (5) 0,2,12,1,4,14,0,8,6
T150:	BYTE (5) 0,2,6,1,0,8,1,0,12,1,2,14,0,8,6
T151:	BYTE (5) 1,2,8,1,2,12,1,0,14,0,8,6
T152:	BYTE (5) 0,0,8,1,4,12,0,2,12,1,2,8,0,4,8,1,0,12,0,0,10
	BYTE (5) 1,4,10,0,8,6
T153:	BYTE (5) 0,2,7,1,2,11,0,0,9,1,4,9,0,8,6
T154:	BYTE (5) 0,3,6,1,3,7,1,2,7,1,2,6,1,3,6,1,2,5,0,8,6
T155:	BYTE (5) 0,0,9,1,4,9,0,8,6
T156:	BYTE (5) 0,2,6,1,3,6,1,3,7,1,2,7,1,2,6,0,8,6
T157:	BYTE (5) 1,6,12,0,8,6
T160:	BYTE (5) 0,0,7,1,6,13,0,6,12,1,4,14,1,2,14,1,0,12,1,0,8
	BYTE (5) 1,2,6,1,4,6,1,6,8,1,6,12,0,8,6
T161:	BYTE (5) 0,1,12,1,3,14,1,3,6,0,8,6
T162:	BYTE (5) 0,0,12,1,0,13,1,1,14,1,5,14,1,6,13,1,6,11,1,0,7
	BYTE (5) 1,0,6,1,6,6,0,8,6
T163:	BYTE (5) 0,0,13,1,1,14,1,5,14,1,6,13,1,6,12,1,4,10,1,6,8
	BYTE (5) 1,6,7,1,5,6,1,1,6,1,0,7,0,8,6
T164:	BYTE (5) 0,5,6,1,5,14,1,0,9,1,6,9,0,8,6
T165:	BYTE (5) 0,0,7,1,1,6,1,4,6,1,6,8,1,6,9,1,5,10,1,1,10
	BYTE (5) 1,0,9,1,0,14,1,6,14,0,8,6
T166:	BYTE (5) 0,0,9,1,1,10,1,5,10,1,6,9,1,6,7,1,5,6,1,1,6
	BYTE (5) 1,0,7,1,0,10,1,4,14,0,8,6
T167:	BYTE (5) 0,0,14,1,6,14,1,1,6,0,8,6
T170:	BYTE (5) 0,1,10,1,0,9,1,0,7,1,1,6,1,5,6,1,6,7,1,6,9
	BYTE (5) 1,5,10,1,6,11,1,6,13,1,5,14,1,1,14,1,0,13,1,0,11
	BYTE (5) 1,1,10,1,5,10,0,8,6
T171:	BYTE (5) 0,2,6,1,6,10,1,6,13,1,5,14,1,1,14,1,0,13,1,0,11
	BYTE (5) 1,1,10,1,5,10,1,6,11,0,8,6
T172:	BYTE (5) 0,2,6,1,3,6,1,3,7,1,2,7,1,2,6,0,2,10,1,3,10
	BYTE (5) 1,3,11,1,2,11,1,2,10,0,8,6
T173:	BYTE (5) 0,3,6,1,3,7,1,2,7,1,2,6,1,3,6,1,2,5,0,2,10
	BYTE (5) 1,3,10,1,3,11,1,2,11,1,2,10,0,8,6
T174:	BYTE (5) 0,3,7,1,0,10,1,3,13,0,8,6
T175:	BYTE (5) 0,0,8,1,6,8,0,6,10,1,0,10,0,8,6
T176:	BYTE (5) 0,0,7,1,3,10,1,0,13,0,8,6
T177:	BYTE (5) 0,1,13,1,2,14,1,4,14,1,5,13,1,5,12,1,3,10,1,3,8
	BYTE (5) 0,3,7,1,3,6,0,8,6
T1100:	BYTE (5) 0,1,6,1,0,7,1,0,11,1,1,12,1,5,12,1,6,11,1,6,8
	BYTE (5) 1,5,7,1,4,8,1,4,11,0,4,10,1,3,11,1,2,11,1,1,10
	BYTE (5) 1,1,9,1,2,8,1,3,8,1,4,9,0,8,6
T1101:	BYTE (5) 1,3,14,1,6,6,0,1,9,1,5,9,0,8,6
T1102:	BYTE (5) 1,0,14,1,5,14,1,6,13,1,6,11,1,5,10,1,0,10,0,5,10
	BYTE (5) 1,6,9,1,6,7,1,5,6,1,0,6,0,8,6
T1103:	BYTE (5) 0,6,13,1,5,14,1,2,14,1,0,12,1,0,8,1,2,6,1,5,6
	BYTE (5) 1,6,7,0,8,6
T1104:	BYTE (5) 1,0,14,1,4,14,1,6,12,1,6,8,1,4,6,1,0,6,0,8,6
T1105:	BYTE (5) 1,0,14,1,6,14,0,4,10,1,0,10,0,0,6,1,6,6,0,8,6
T1106:	BYTE (5) 1,0,14,1,6,14,0,4,10,1,0,10,0,8,6
T1107:	BYTE (5) 0,6,13,1,5,14,1,2,14,1,0,12,1,0,8,1,2,6,1,4,6
	BYTE (5) 1,6,8,1,6,10,1,4,10,0,8,6
T1110:	BYTE (5) 1,0,14,0,6,14,1,6,6,0,0,10,1,6,10,0,8,6
T1111:	BYTE (5) 0,1,6,1,5,6,0,3,6,1,3,14,0,1,14,1,5,14,0,8,6
T1112:	BYTE (5) 0,1,7,1,2,6,1,3,6,1,4,7,1,4,14,0,2,14,1,6,14
	BYTE (5) 0,8,6
T1113:	BYTE (5) 0,1,6,1,1,14,0,1,10,1,5,14,0,1,10,1,5,6,0,8,6
T1114:	BYTE (5) 1,0,14,0,0,6,1,6,6,0,8,6
T1115:	BYTE (5) 1,0,14,1,3,11,1,6,14,1,6,6,0,8,6
T1116:	BYTE (5) 1,0,14,1,6,6,1,6,14,0,8,6
T1117:	BYTE (5) 0,0,8,1,0,12,1,2,14,1,4,14,1,6,12,1,6,8,1,4,6
	BYTE (5) 1,2,6,1,0,8,0,8,6
T1120:	BYTE (5) 1,0,14,1,5,14,1,6,13,1,6,11,1,5,10,1,0,10,0,8,6
T1121:	BYTE (5) 0,0,8,1,0,12,1,2,14,1,4,14,1,6,12,1,6,8,1,4,6
	BYTE (5) 1,2,6,1,0,8,0,4,8,1,6,6,0,8,6
T1122:	BYTE (5) 1,0,14,1,5,14,1,6,13,1,6,11,1,5,10,1,0,10,0,2,10
	BYTE (5) 1,6,6,0,8,6
T1123:	BYTE (5) 0,0,8,1,2,6,1,4,6,1,6,8,1,4,10,1,2,10,1,0,12
	BYTE (5) 1,2,14,1,4,14,1,6,12,0,8,6
T1124:	BYTE (5) 0,3,6,1,3,14,0,0,14,1,6,14,0,8,6
T1125:	BYTE (5) 0,0,14,1,0,7,1,1,6,1,5,6,1,6,7,1,6,14,0,8,6
T1126:	BYTE (5) 0,0,14,1,3,6,1,6,14,0,8,6
T1127:	BYTE (5) 0,0,14,1,0,6,1,3,9,1,6,6,1,6,14,0,8,6
T1130:	BYTE (5) 1,6,14,0,0,14,1,6,6,0,8,6
T1131:	BYTE (5) 0,0,14,1,3,11,1,6,14,0,3,11,1,3,6,0,8,6
T1132:	BYTE (5) 0,0,14,1,6,14,1,0,6,1,6,6,0,8,6
T1133:	BYTE (5) 0,3,4,1,0,4,1,0,14,1,3,14,0,8,6
T1134:	BYTE (5) 0,0,12,1,6,6,0,8,6
T1135:	BYTE (5) 0,0,4,1,3,4,1,3,14,1,0,14,0,8,6
T1136:	BYTE (5) 0,0,11,1,3,14,1,6,11,0,3,14,1,3,6,0,8,6
T1137:	BYTE (5) 0,3,7,1,0,10,1,3,13,0,0,10,1,6,10,0,8,6
T1140:	BYTE (5) 0,2,14,1,4,12,0,8,6
T1141:	BYTE (5) 0,0,9,1,1,10,1,3,10,1,4,9,1,4,6,0,4,8,1,3,9
	BYTE (5) 1,1,9,1,0,8,1,0,7,1,1,6,1,3,6,1,4,7,0,8,6
T1142:	BYTE (5) 1,0,13,0,0,9,1,1,10,1,3,10,1,4,9,1,4,7,1,3,6
	BYTE (5) 1,1,6,1,0,7,0,8,6
T1143:	BYTE (5) 0,4,9,1,3,10,1,1,10,1,0,9,1,0,7,1,1,6,1,3,6
	BYTE (5) 1,4,7,0,8,6
T1144:	BYTE (5) 0,0,7,1,0,9,1,1,10,1,3,10,1,4,9,1,4,7,1,3,6
	BYTE (5) 1,1,6,1,0,7,0,4,6,1,4,13,0,8,6
T1145:	BYTE (5) 0,4,7,1,3,6,1,1,6,1,0,7,1,0,9,1,1,10,1,3,10
	BYTE (5) 1,4,9,1,4,8,1,0,8,0,8,6
T1146:	BYTE (5) 0,2,6,1,2,12,1,3,13,1,4,13,1,5,12,0,0,11,1,4,11
	BYTE (5) 0,8,6
T1147:	BYTE (5) 0,4,9,1,3,10,1,1,10,1,0,9,1,0,7,1,1,6,1,3,6
	BYTE (5) 1,4,7,0,4,10,1,4,5,1,3,4,1,1,4,1,0,5,0,8,6
T1150:	BYTE (5) 1,0,13,0,0,9,1,1,10,1,3,10,1,4,9,1,4,6,0,8,6
T1151:	BYTE (5) 0,3,12,1,3,11,0,3,10,1,3,7,1,4,6,1,5,6,0,8,6
T1152:	BYTE (5) 0,3,12,1,3,11,0,3,10,1,3,5,1,2,4,1,1,4,0,8,6
T1153:	BYTE (5) 1,0,13,0,0,8,1,2,10,0,0,8,1,2,6,0,8,6
T1154:	BYTE (5) 0,2,6,1,2,13,0,8,6
T1155:	BYTE (5) 1,0,10,0,0,9,1,1,10,1,2,10,1,3,9,1,3,6,0,3,9
	BYTE (5) 1,4,10,1,5,10,1,6,9,1,6,6,0,8,6
T1156:	BYTE (5) 1,0,10,0,0,9,1,1,10,1,2,10,1,3,9,1,3,6,0,8,6
T1157:	BYTE (5) 0,0,7,1,0,9,1,1,10,1,3,10,1,4,9,1,4,7,1,3,6
	BYTE (5) 1,1,6,1,0,7,0,8,6
T1160:	BYTE (5) 0,0,4,1,0,10,0,0,9,1,1,10,1,3,10,1,4,9,1,4,7
	BYTE (5) 1,3,6,1,1,6,1,0,7,0,8,6
T1161:	BYTE (5) 0,4,9,1,3,10,1,1,10,1,0,9,1,0,7,1,1,6,1,3,6
	BYTE (5) 1,4,7,0,4,10,1,4,4,0,8,6
T1162:	BYTE (5) 1,0,10,0,0,9,1,1,10,1,3,10,1,4,9,0,8,6
T1163:	BYTE (5) 0,0,7,1,1,6,1,3,6,1,4,7,1,3,8,1,1,8,1,0,9
	BYTE (5) 1,1,10,1,3,10,1,4,9,0,8,6
T1164:	BYTE (5) 0,2,13,1,2,7,1,3,6,1,4,6,1,5,7,0,1,11,1,3,11
	BYTE (5) 0,8,6
T1165:	BYTE (5) 0,0,10,1,0,7,1,1,6,1,3,6,1,4,7,1,4,10,1,4,6
	BYTE (5) 0,8,6
T1166:	BYTE (5) 0,0,10,1,2,6,1,4,10,0,8,6
T1167:	BYTE (5) 0,0,10,1,0,6,1,2,8,1,4,6,1,4,10,0,8,6
T1170:	BYTE (5) 1,4,10,0,0,10,1,4,6,0,8,6
T1171:	BYTE (5) 0,0,10,1,2,6,0,4,10,1,1,4,1,0,4,0,8,6
T1172:	BYTE (5) 0,0,10,1,4,10,1,0,6,1,4,6,0,8,6
T1173:	BYTE (5) 0,3,14,1,2,13,1,2,11,1,0,9,1,2,7,1,2,5,1,3,4
	BYTE (5) 0,8,6
T1174:	BYTE (5) 0,2,4,1,2,14,0,8,6
T1175:	BYTE (5) 0,0,14,1,1,13,1,1,11,1,3,9,1,1,7,1,1,5,1,0,4
	BYTE (5) 0,8,6
T1176:	BYTE (5) 0,2,16,1,3,17,1,4,16,1,5,17,0,0,6
T1177:	BYTE (5) 0,1,16,1,4,16,1,4,15,0,0,6
RADIX 8
LIST
	;END OF BYTE TABLES
		;ROUTINE TO GIVE BACK CURRENT X,Y POSITION
	ENTRY WHERE

	HELLO	(WHERE)
	MOVE	R0,X
	MOVEM	R0,@0(Q)
	MOVE	R0,Y
	MOVEM	R0,@1(Q)
	GOODBY	(2)
	EXTERN IFIX,FLOAT,EXP2.0,IFIX.
	ENTRY NUMBER

;	REGISTERS
	SVXN=15
	SVYN=14
	SVSZN=13
	SVFN=12
	SVORN=11
	SVNN=10
	T0=7
	DIGITS=6
	BFCHAR=5

	HELLO	(NUMBER)
	SAVALL
	MOVE SVXN,@0(Q)	;SVXN
	MOVE SVYN,@1(Q)	;SVYN
	MOVE SVSZN,@2(Q)	;SVSZN
	MOVE SVFN,@3(Q)	;SVFN
	MOVE SVORN,@4(Q)	;SVORN
	MOVE SVNN,@5(Q)	;SVNN
	FUNCT2	PLOT,<SVXN,SVYN,$2,[3]>

	IFE LPSYM,<
	SKIPN	LPBUF
	JRST	NUM1	;NO SIMUL
	LOCSUB	XY2CHR		;ARGS IN GLOBALS
	MOVEM	0,BFCHAR	;BYTE PTR

NUM1:
>
	MOVSI R1,264000
	SKIPGE SVFN
	PUSHJ P,DECP2
	MOVMS SVFN
	SKIPGE R1,SVNN
	MOVEI R1,0
	MOVNS 1
	MOVSI 0,(10.0)
	PUSHJ P,EXP2.0##
	MOVEM 0,T0
	FSC 0,-1
	FADRB 0,SVFN	;ROUND IN FIRST INSIGNIFICANT DIGIT
	FDVR 0,T0	;SCALE TO AN INTEGER
	FUNCT2 IFIX.,<R0>
	MOVM	R1,0
	PUSHJ P,DECPLT
	MOVSI R1,270000
	SKIPN SVNN	;NEED A DEC. PT. IN ONE CASE
	PUSHJ P,DECP2
ENDNUM:
	POPALL
	GOODBY	(6)
;**;[1544] Replace 1 Line at DECPLT	HD	28-Jan-83
DECPLT:	SETZM DIGITS	;[1544] Zero DIGITS
DECP3:	IDIVI R1,12
	HRLM 2,0(P)
	AOS DIGITS
	SKIPE 1
	PUSHJ P,DECP3
	CAMLE DIGITS,SVNN
	JRST DECP4
	MOVSI R1,270000
	PUSHJ P,DECP2	;PLOT A "."
	CAML DIGITS,SVNN
	JRST DECP4A
DECP5:	MOVSI R1,300000	;A ZERO
	PUSHJ P,DECP2
	AOS DIGITS
	CAMGE DIGITS,SVNN
	JRST DECP5
DECP4A:	SETOM SVNN	;FAKE OUT TEST NEXT TIME AROUND
DECP4:	SOS DIGITS
	HLRZ R1,0(P)
	TRO R1,60
	ROT R1,-7
DECP2:
	IFE LPSYM,<
	SKIPN	LPBUF
	JRST	DECP21

; SINCE CHAR IS ALREADY SET UP IN R1, JUST RIGHT JUSTIF

	ROT	R1,7
	IDPB	R1,BFCHAR	;BFCHAR SETUP IN CALL TO SYMBOL AT TOP OF ROUTINE
	POPJ	P,0
DECP21:
>
	FUNCT2 SYMBOL,<$2,X ,$2,Y ,$1,2(Q), R1, SVORN ,$2,[1]>
	POPJ P,0
	IFE LPSYM,<

	ENTRY LPTOUT

	TABQ=4
	PT=5	;PLOTTER TEMP
	LINES=6
	SPQ=7
	LSS8=10
	REM=11
	DATUM=12
LPTOUT:
	PUSH	P,PT		;NEED 4 AC'S
	PUSH	P,LSS8
	PUSH	P,TABQ
	PUSH	P,SPQ
	PUSH	P,DATUM
	PUSH	P,LINES
	PUSH	P,REM
	MOVEI	LINES,ILINES
	MOVSI	REM,440700
	HRR	REM,LPBUF	;SETS UP BP
PLT.NL:	MOVEI	PT,LPWIDTH	;CHARS PER LINE
	MOVEI	LSS8,LPWIDTH-10		;FOR TAB STOPS
	MOVEI	TABQ,1		;IF LINE NOT NULL--ALWAYS PUT OUT INIT TAB
	SETZ	SPQ,		;ZERO THE SPACE QUEUE HOWEVER
PLT.NC:	ILDB	DATUM,REM
	SKIPE	DATUM		;BLANKS "TO BE" ARE NOW NULLS
	JRST	PLTUNQ		;UNQUEUE THE QUEUES
	ADDI	SPQ,1		;INTO SPACE Q
PLT.0Q:	SUBI	PT,1		;LINE POS
	CAME	PT,LSS8		;TAB STOP?
	JRST	PLT.NC		;NO -- GET NX CHAR
P0MOD8:
	SKIPE	SPQ		;DON'T BUMP TABQ IF LAST NON-BLK CHAR  IN 8TH POS
	ADDI	TABQ,1		;DO THE BUMP
	SETZ	SPQ,		;READY FOR NEW TAB
	SUBI	LSS8,10		;PUT CHAR.CNT DOWN BY TAB
	JUMPG	PT,PLT.NC	;JUMP IF NOT EOL

PLTEOL:
	MOVEI	DATUM,15		;CAR-RET
	SOSG	POB+2	;ALSO DECR TO 0
	OUTPUT	PCHN,0
	IDPB	DATUM,POB+1
	MOVEI	DATUM,12		;LF
	SOSG	POB+2	;ALSO DECR TO 0
	OUTPUT	PCHN,0
	IDPB	DATUM,POB+1
	CAIE	TABQ,LPWIDTH/8+1	;SKIP MEANS ALL TABS (BLK LINE)
	SOJG	LINES,PLT.NL		;BUFFER IS N-CHAR/LINE M-LINES
PLTEOP:
	MOVEI	DATUM,14		;FORM FEED
	DPB	DATUM,POB+1	;OVERWRITE THE LAST LF
	SOS	POB+2		;GET BYTE CNT. PAST LAST BYTE
	OUTPUT	PCHN,0
	POP	P,REM
	POP	P,LINES
	POP	P,DATUM
	POP	P,SPQ
	POP	P,TABQ
	POP	P,LSS8
	POP	P,PT
	POPJ	P,0		;DONE

PLTUNQ:
	JUMPE	TABQ,CHKNOQ	;QUICKIE PATH TO CATCH BOTH QS 0.
	PUSH	P,DATUM	;FIRST THE PRELIMS
	MOVEI	DATUM,11	;ASCII TAB
OUTTAB:
	SOSG	POB+2	;ALSO DECR TO 0
	OUTPUT	PCHN,0
	IDPB	DATUM,POB+1
	SOJG	TABQ,OUTTAB	;NO JUMP MEANS START SPA. Q

	JUMPE	SPQ,OUTDAT
	MOVEI	DATUM,40		;ASCII SPACE
OUTSPA:
	SOSG	POB+2	;ALSO DECR TO 0
	OUTPUT	PCHN,0
	IDPB	DATUM,POB+1
	SOJG	SPQ,OUTSPA	;NO JUMP MEANS ALL Q'S FIN.
OUTDAT:
	POP	P,DATUM
OUTD1:
	SOSG	POB+2	;ALSO DECR TO 0
	OUTPUT	PCHN,0
	IDPB	DATUM,POB+1
	SETZ	TABQ,
	SETZ	SPQ,
	JRST	PLT.0Q		;RE-ENTER MAIN LINE
CHKNOQ:	JUMPE	SPQ,OUTD1	;NO QUEUES NO PUSH DATUM
	PUSH	P,DATUM
	JRST	OUTSPA-1	;SET UP THE OCT. 40
>
	IFE LPSYM,<

	ENTRY PLOTI
PLOTI:
	FUNCT2	PLOT,<$1,0(AP),$1,1(AP),$2,[3]>
	SETZM	CURX
	SETZM	CURY

;	ZERO THE LPT BUFFER

	PUSH	P,PT
	PUSH	P,REM
	HRRZ	PT,LPBUF
	MOVE	REM,PT
	SETZM	(PT)		;THE BASIS OF THE ZERO CHAIN
	ADDI	PT,1
	HRL	PT,LPBUF
	BLT	PT,LPBUFSZ-1(REM)
	POP	P,REM
	POP	P,PT
	POPJ	P,0
>
	IFE LPSYM,<
	
	ENTRY	XY2CHR

	XX=11
	XREM=12
	YY=13
	YREM=14

XY2CHR:
	PUSH	17,XX
	PUSH	17,XREM
	PUSH	17,YY
	PUSH	17,YREM
	HRLZ	XX,CURX	;BEGIN TASK OF SETTING CHAR IN LPT BUFF%
			;TRICK TO INCREASE PRECISION -- ALR. DONE TO SPC.?
	IDIV	XX,SPC.X	;STEPS/CHAR
	IMULI	XX,LPWIDTH	;GET RIGHT "ROW"
	HRLZ	YY,CURY	;SAME TRICK
	IDIV	YY,SPC.Y
	ADD	XX,YY
	IDIVI	XX,5	;CHANGE FROM CHAR TO WORDS
	HRRZ	YREM,SETPOS(XREM)	;THE DESIRED BYTE PTR
	ADD	YREM,XX			;THE BASE OF THE BUFFER & OFFSET
	ADD	YREM,LPBUF	;BASE OF BUFFER
	HLL	YREM,SETPOS(XREM)	;THE SIZE/POS PART
	MOVEM	YREM,0
	POP	17,YREM
	POP	17,YY
	POP	17,XREM
	POP	17,XX
	POPJ	P,0
>
;ALL SORTS TEMPS AND STUFF

SETPOS:	XWD 440700,0	;5 BYTE PTRS REG IS REFFED AS YY--USED BY MAP2CH
	XWD 350700,0
	XWD 260700,0
	XWD 170700,0
	XWD 100700,0

	IFE ALONE,<
	RELOC 0
PFNAM:	SIXBIT /LNKOVT/	;FILE NAME FOR PLOT FILE
	SIXBIT /DAT/
	0
	0
	IFE LPSYM,<
OBLOCK:	XWD	0,10
	XWD	0,0
	XWD	POB,0
>>
SUBTTL	THE END


	END