	.IODEV 4,10
R.=20
L.=22
C.=24
V.=26
I.=30
	.GLOBL	BEGIN,DECODE,DISPO,KBFIX,LIST
	.GLOBL	LPON,SAV,SUBTAG,TABLEB,TABLEN
	.GLOBL	TVALUE,SAVE,START
TREAD	XX
	.BLOCK 44
TWRITE	XX
	.BLOCK 44
LTABLE	XX
	.BLOCK 144
PWNT	XX
	XX
PNODE	XX
	.BLOCK 300
WNODE	XX
	.BLOCK 300
/
/
AUTO10=10
AUTO11=11
DEVATE=20
/
/
/
/
/
/
DECODE	.INIT 4,1,CNTRLP
	.INIT 10,0,CNTRLP
	LAC	SUBTAG
	ADD	(13
	DAC	PLACE
	LAC*	PLACE
	DAC	GSYM	/CONTAINS DJS-GROUND
	LAC	TVALUE
	DAC	VPLACE#
	DAC	COND#	/NMB FOR ^P AND B#
	DZM	ANSERD#	/TEST FOR IO COMPLETION
	LAC*	VPLACE
	SNA
	JMP	.+3
	ISZ	VPLACE
	JMP	.-4
	JMS	INTSEQ
	DZM	CNTR#
	DZM	GOOD#	/CHECK FOR NON SEQUENTIAL NODE NMB
	.DEC
	LAW	-20	/ MAX IS 20 NODES
	.OCT
	DAC	NODCNT#
	LAC	TABLEN
	DAC	PLACE	/ ADDRESS OF NODES IN TABLE
CHKLOP	LAC*	PLACE
	SNA
	ISZ	GOOD	/ NON-ZERO FOR NODE NMB NOT USED
	SNA
	JMP	.+4	/ IF NO NODE  OK!
	LAC	GOOD	/ WAS A LOWER NMB MISSING
	SZA
	JMP	M16	/ YES!
	LAC	PLACE
	ADD	(3
	DAC	PLACE	/GET NEW ADDRESS
	ISZ	NODCNT	/ INCREMENT COUNTER
	JMP	CHKLOP
	DZM	IOFIN#
	DZM	BNMB
	LAC	(410002
	DAC	TWRITE
	DZM	TWRITE+1
	LAC	(160000
	DAC	TTPART
	LAC	(COMPON
	DAC	COMPON
	JMP	.+3	/ REMOVE THIS AFTER IO TEST
	LAC	(DISPLA
	DAC	IOTEST
	JMS	NXTVAL
	JMS	LINEF
	JMP	.-2
/
/
/
	.TITLE	DECODER MAINLINE
/
/
DISPLA	LAC	(PNODE
	TAD	(-1
	DAC*	(10
	LAC	(WNODE
	TAD	(-1
	DAC*	(11
	LAC	(40
	DAC	BNODE#
	JMS	VECTOR
	JMS	IOTEST	/SET UP WNODE LIST
	LAC	(222222
	DAC*	AUTO11
	DAC*	AUTO11
	DAC*	AUTO11
	DAC*	AUTO11
	JMS	XCROSS
	JMS	IOTEST
	JMS	PNTNOD
	JMS	IOTEST
	LAC*	(10
	ADD	(1
	DAC	PLACE
	LAC	(222222
	DAC*	PLACE
	ISZ	PLACE
	DAC*	PLACE
	ISZ	PLACE
	DAC*	PLACE
	JMS	PWNODE
	JMS	IOTEST
	JMS	GRN
	JMS	IOTEST
	JMS	MIX
	JMS	IOTEST
	JMS	UNICHK
	LAC	ANSERD
	SZA
	JMP	ACDCT
	CLL
	DZM	PLACE
	LAC	PLACE
	ADD	(1
	DAC	PLACE
	SNL
	JMP	.-4
	JMS	IOTEST
	JMP	.-13
QUEST	ISZ	ANSERD
	DZM*	VPLACE	/ THIS ENDS THE
	ISZ	VPLACE	/ TABLE OF VALUES
	DZM*	VPLACE	/ WITH ZERO'S
	LAC	(DISPLA	/ REMOVE THESE TWO INSTRUCTION WHEN
	DAC	IOTEST	/ I/O & DECIPHER RUN ASYNCHRONOUS
	JMP*	IOTEST
ACDCT	.INIT 4,1,CNTRLP
	.WRITE 4,2,TYPE,34
	.CLOSE 4
	.INIT 4,0,CNTRLP
	.READ 4,2,TREAD,34
	.CLOSE 4
	.WRITE 3,2,TREAD,34
	.WAIT 3
	LAC	TOP
	DAC	COND
	DZM	BNMB
	DZM	CNTR
	LAC	(160000
	DAC	TTPART
	LAC	(COMPON
	DAC	COMPON
	JMS	INTSEQ	/ANY NON-ZERO NUMBER
TOP	LAC	(TWRITE
	DAC	PLACE
	LAW	17736
	DAC	COMPAR
	DZM*	PLACE
	ISZ	PLACE
	ISZ	COMPAR
	JMP	.-3
	JMS	NXTVA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S NOT RECOGNIZED
	LAC	(JMP  PARDON	/ THEN WE TYPE 'WHAT?'
	DAC	IOVALD	/ GO & TYPE QUESTION & READ
	JMP	DEV2	/ ANSWER
PARDON	JMS	GOERR	/ TYPE WHAT?
	JMP	DEV1	/ READ ANSWER AGAIN
DEV2	.WRITE 4,2,SRCDEV,34
	.WAIT 4
	.INIT 4,0,CNTRLP
DEV1	.READ 4,2,TREAD,34
	.WAIT 4
	JMS	.DAT 	/ GET SRC DEV & SET UP DATSLOT
	LAC	(JMP*  .DAT	/ .DAT HAS UNDERSTOOD SRC DEV
	DAC	IOVALD	/ RETURN EXIT TO .DAT FOR
	LAC	(JMP  HERE	/ NORMAL CHANGE OF DEVnIN
	DAC	E.DAT	/ COMAN STRING READ
	.WRITE 4,2,STRING,34
	.CLOSE 4
	.WRITE 4,2,SENDER,34
	.CLOSE 4
HERE	.INIT 4,0,CNTRLP
RHERE	.READ 4,2,TREAD,34
	.CLOSE 4
	JMS	.DAT
	.WRITE 3,2,TREAD,34
	.WAIT 3
	JMP	HERE
SHUT	.CLOSE 3
	LAC*	SAV
	SZA
	JMS*	SAVE
	.EXIT
/
/
/
/
/THIS SUBROUTINE CHANGES READ DEVICE FOR COMMAND STRING FROM
/DAT 4 (TT) TO DAT 5 (PR) AND VICE VERSA.
.DAT	XX		/ CHECK FIRST TO SEE IF CHANGE REQ OR
	LAC	TREAD+2	/ IS IT PART OF COMAN STRING. GET
	AND	(777776	/ FIRST TWO & ONE HALF CHARS.
	SAD	(275240	/  IS IT /*  INDICATES END OF COMANS
	JMP	SHUT	/ CLOSE FILE AND CALL NEXT CHAIN
	SAD	(502440	/ IS IT PR
	SKP
	JMP	TTIO1	/ MAYBE IT IS TT
	LAC	(5	/ PR IS DATSLOT 5
	DAC	DATSLT#
	JMP	.+6	/ CHANGE THE CAL'S
TTIO1	SAD	(522500	/ IS IT TT
	SKP		/ IF NOT IT WILL CONTINUE OR
IOVALD	JMP*	.DAT	/ WILL JMP TO PARDON
	LAC	(4	/ TT IS DATSLOT 4
	DAC	DATSLT
	LAC	HERE	/ CHANGE DAT ON INIT
	AND	(777000
	XOR	DATSLT
	DAC	HERE
	LAC	RHERE	/ DARSLOT ON .READ
	AND	(777000
	XOR	DATSLT
	DAC	RHERE
	LAC	RHERE+4	/ DATSLT ON .CLOSE
	AND	(777000
	XOR	DATSLT
	DAC	RHERE+4
E.DAT	JMP	HERE	/ READ NEXT LINE FROM NEW DEV
/
/
/
/
/
/
/  TELETYPE QUESTIONS AND ANSWERS
/
/
COMPON	XX
	XX
	XX
	XX
	XX
	XX
INTSEQ	XX
	DZM	COMPON+1
	DZM	COMPON+2
	DZM	COMPON+3
	DZM	COMPON+4
	DZM	COMPON+5
	LAC	TABLEB
	DAC	PLACE#
	LAC*	PLACE
	SNA
	JMP	TWOS
	AND	(770000
	SAD	(200000
	ISZ	COMPON+1
	SAD	(220000
	ISZ	COMPON+2
	SAD	(240000
	ISZ	COMPON+3
	SAD	(260000
	ISZ	COMPON+4
	SAD	(300000
	ISZ	COMPON+5
	LAC	PLACE
	ADD	(4
	DAC	PLACE
	JMP	INTSEQ+10
TWOS	LAW	17773
	DAC	COMPAR#
	LAC	(COMPON
	ADD	(1
	DAC	PLACE
	LAC*	PLACE
	CMA
	TAD	(1
	DAC*	PLACE
	ISZ	PLACE
	ISZ	COMPAR
	JMP	.-6
	JMP*	INTSEQ
/
/
/
/
NXTVAL	XX
	LAC	CNTR#
	SZA
	JMP	ASK
	ISZ	COMPON
	LAC*	COMPON
	DAC	CNTR
	DZM	NUM#
	LAC	TTPART#
	ADD	(020000
	DAC	TTPART
	SAD	(260000
	DZM	COND#	/CONDITION FOR BRANCH IS R,L,&C
	SAD	(320000
	JMP	QUEST	/ I.O. HAS ENDED
	JMP	NXTVAL+1	/  EG.  NO  R'S
ASK	ISZ	CNTR
	NOP
	ISZ	BNMB#
	LAC	TABLEB
	DAC	TPLACE
	ISZ	NUM
	LAC*	TPLACE
	SNA
	JMP	.-5
	AND	(770000
	SAD	TTPART
	JMP	.+5
	LAC	TPLACE
	ADD	(4
	DAC	TPLACE
	JMP	.-11
	LAC*	TPLACE
	AND	(777
	SAD	NUM
	JMP*	NXTVAL
	JMP	.-10
/
/
/
/
LINEF	XX
	LAC	TPLACE
	ADD	(2
	DAC	TEMP#
	LAC*	TEMP
	SAD	(777777
	SKP
	JMP*	LINEF
	LAC	(TWRITE
	ADD	(2
	DAC	PLACE
	LAC	COND#
	SZA
	JMP	.+11
	LAW	-6
	DAC	TEMP
SPACEL	LAC	(240	/ FILL WITH SPACES
	DAC*	PLACE
	ISZ	PLACE
	ISZ	TEMP
	JMP	.-3
	JMP	ENDLIN
	LAC	BNMB
	DAC	NMB#
	JMS	OCTDEC
	LAC	(302	/ B FOR BRANCH
	DAC*	PLACE
	ISZ	PLACE
	LAC	TENS#
	SZA
	JMP	.+7
	LAC	UNITS#
	DAC*	PLACE
	ISZ	PLACE
	LAW	-4
	DAC	TEMP
	JMP	SPACEL
	DAC*	PLACE
	ISZ	PLACE
	LAC	UNITS
	DAC*	PLACE
	ISZ	PLACE
	LAW	-3
	DAC	TEMP
	JMP	SPACEL
ENDLIN	LAC	TTPART
	SAD	(200000
	LAC	(322
	SAD	(220000
	LAC	(314
	SAD	(240000
	LAC	(303
	SAD	(260000
	LAC	(326
	SAD	(300000
	LAC	(311
	DAC*	PLACE
	ISZ	PLACE
	LAC	NUM
	DAC	NMB
	JMS	OCTDEC
	LAC	TENS
	SZA
	JMP	.+10
	LAC	UNITS
	DAC*	PLACE
	ISZ	PLACE
	LAC	(240
	DAC*	PLACE
	ISZ	PLACE
	JMP	.+6
	DAC*	PLACE
	ISZ	PLACE
	LAC	UNITS
	DAC*	PLACE
	ISZ	PLACE
	LAC	(275
	DAC*	PLACE
	ISZ	PLACE
	LAC	(240
	DAC*	PLACE
	ISZ	PLACE
	LAC	(375
	DAC*	PLACE
	.WRITE 4,3,TWRITE,34
WWAIT	.WAITR 4,LOOP
	LAW	17737
	DAC	TEMP
	LAC	(TREAD
	DAC	TREAD
	ISZ	TREAD
	DZM*	TREAD
	ISZ	TREAD
	ISZ	TEMP
	JMP	.-3
	ISZ	IOFIN
	.READ 10,2,TREAD,34
RWAIT	.WAITR 10,LOOP
	.CLOSE 10
	DZM	IOFIN
	ISZ	TPLACE
	ISZ	TPLACE
	LAC	(TREAD
	ADD	(2
	DAC	TEMP
	LAC*	TEMP
	AND	(774000
	SAD	(064000	/IS IT A CARRIAGE RETURN?
	JMP*	LINEF	/YES! THEN DEPENDENT CURRENT SOURCE
	LAC	VPLACE
	DAC*	TPLACE
	LAC*	TEMP
	SNA
	JMP	.+5
	DAC*	VPLACE
	ISZ	TEMP
	ISZ	VPLACE
	JMP	.-6
	ISZ	VPLACE
	CLA!CMA
	DAC*	VPLACE
	ISZ	VPLACE
	JMP*	LINEF
/
/
/
IOTEST	NOP	/ CHANGE LATER TO DISPLA
	LAC	ANSERD#
	SZA
	JMP*	IOTEST
	LAC	IOFIN
	SZA
	JMP	RWAIT
	JMP	WWAIT
LOOP	JMP	IOTEST	/ ADD INDIRECT BIT LATER
/
/
/
/
/
/
/
VECTOR	XX
	LAC	BEGIN
	ADD	(2
	DAC	SPLACE#	/ THE HORZ PNT. BEFORE SUBR. OR VECT
	LAC*	SPLACE
	AND	(160000	/ IS MODE VECTOR
	SAD	(100000
	JMP	.+12	/ YES
	LAC	SPLACE	/ NO! HENCE SUBR.
	ADD	(4	/ NEXT HORZ PNT. 4 LOC FURTHER
	DAC	SPLACE	/ IS IT END OF DISPLAY FILE
	CMA
	TAD	(1
	TAD*	DISPO
	SPA
	JMP*	VECTOR	/ YES!
	JMP	VECTOR+4
	JMS	FCOORD
	JMS	IOTEST
	LAC	TABLEN
	ADD	(2
	DAC	PLACE
	LAW	17754	/ UP TO 20 NODES ALLOWED
	DAC	COMPAR
	DZM	NNMB#
	ISZ	NNMB
	LAC*	PLACE
	SAD	EECOMP#
	JMP	.+11
	LAC	PLACE
	ADD	(3
	DAC	PLACE
	ISZ	COMPAR
	JMP	.-10
	ISZ	BNODE	/ NO NODE NMB FOUND. IT IS GIVEN
	LAC	BNODE#	/ A TEMP. NMB OF 40+
	DAC	NNMB
	LAC	NNMB
	DAC*	ZONE	/ NODE NMB STORED IN TABLE
	JMP	VECTOR+4
/
/
/  THIS SUBROUTINE SETS UP WNODE (WIRE NODE) TABLE IN THE FOLLOWING
/ FORMAT FOR FURTHER ANALYSIS LATER
/
/
/         X(1),Y(1)
/            1
/            1
/            1
/            1
/            1
/            1
/            ----------------------------------------------
/       X(2),Y(2)                                   X(3),Y(3)
/
/
/       IN SEQUENTIAL MEMORY LOCATIONS
/        X(1),Y(1),X(2),Y(2),X(3),Y(3)
/
/
FCOORD	XX
	LAC*	(11
	ADD	(1
	DAC	ZONE	/ THIS ADDRESS IS SAVED SO THAT
	DZM*	AUTO11	/ VECTOR KNOWS WHERE TO PUT NODE NMB
	LAC*	SPLACE
	AND	(1777
	DAC*	AUTO11	/ SAVE X(1)
	DAC	XPERM#	/ REFERENCE VALUE
	LAC	SPLACE
	TAD	(-1	/ Y POINT IS SPECIFIED BEFORE X
	DAC	SPLACE
	LAC*	SPLACE
	AND	(1777
	DAC*	AUTO11	/ SAVE Y(1)
	DAC	YPERM	/ Y REFERENCE VALUE
	DZM	EECOMP	/ADDR OF ESCAPE WHEN VERT & HORZ DONE
	DZM	HORZ2#	/ 0 IF HORZ COMP FIRST,1 IF VERTICAL
	ISZ	SPLACE
	ISZ	SPLACE	/ POINTS AT FIRST VECT WRD.
	LAC*	SPLACE
	AND	(177
	SNA
	ISZ	HORZ2	/VERT
	LAC	HORZ2
	SZA
	JMP	YTAB
XTAB	DZM	MAG#	/ HOLDS TEMP DIFFERENCE
	DZM	DIRECT#	/ 0 FOR POSITIVE AND
	LAC	EECOMP	/ 1 FOR NEGATIVE LINE SEGMENT
	SZA
	JMP	XTABR	/ THERE IS NO HORZ COMPONENT
	LAC*	SPLACE
	AND	(200
	SZA
	ISZ	DIRECT	/ THE HORZ COMP IS -VE
	LAC*	SPLACE
	AND	(177
	SNA
	JMP	XTABR
	ADD	MAG
	DAC	MAG
	LAC*	SPLACE	/ IS ESCAPE BIT SET
	SPA
	JMP	.+3	/ YES
	ISZ	SPLACE
	JMP	.-12
	LAC	SPLACE
	DAC	EECOMP	/ END OF VECTOR INDICATOR
XTABR	LAC	MAG
	ADD	MAG	/ MUST DOUBLE VALUE SINCE THE VECTOR
	DAC	MAG	/ SCALE FOR WIRES IS 01
	LAC	DIRECT
	SNA
	JMP	.+5
	LAC	MAG	/ TAKE TWO'S COMPLEMENT
	CMA	/ IF NEGATIVE
	TAD	(1
	DAC	MAG
	LAC	XPERM#	/ GET VALUE FOR X(2) IF HORZ
	TAD	MAG	/ COMP FIRST OR X(3) IF VERT
	DAC	XPERM
	DAC*	AUTO11
	LAC	YPERM	/ PUT IN Y VALUE
	DAC*	AUTO11
	LAC	HORZ2
	SZA
	JMP	FEND	/ BOTH VERT & HORZ COMP DONE
YTAB	DZM	MAG	/ CLEAR INDICATORS
	DZM	DIRECT
	LAC	EECOMP	/ IF THERE WAS NO VERT COMP
	SZA	/ THEN THIS WILL CONTAIN ESCAPE
	JMP	YTABR	/ ADDRESS & PREVENT SEARCH FOR
	LAC*	SPLACE	/ NON-EXISTANT COMPONENT
	AND	(100000
	SZA
	ISZ	DIRECT	/ ONE IF NEG VERT COMP
	LAC*	SPLACE
	AND	(077400
	SNA
	JMP	YTABR
	ADD	MAG
	DAC	MAG
	LAC*	SPLACE
	SPA
	JMP	.+3
	ISZ	SPLACE
	JMP	.-12
	LAC	SPLACE
	DAC	EECOMP
YTABR	LAC	MAG
	ADD	MAG
	CLL
	LRS+10	/ RIGHT JUSTIFY VALUE
	DAC	MAG
	LAC	DIRECT
	SNA
	JMP	.+5
	LAC	MAG
	CMA
	TAD	(1
	DAC	MAG
	LAC	XPERM
	DAC*	AUTO11
	LAC	YPERM#
	TAD	MAG
	DAC	YPERM
	DAC*	AUTO11
	LAC	HORZ2
	SZA
	JMP	XTAB
FEND	ISZ	SPLACE	/ SPLACE NOW POINTS AT NEXT
	ISZ	SPLACE	/ HORZ PNT. INDICATING MODE
	ISZ	SPLACE	/ OF NEXT PART OF FILE
	JMP*	FCOORD
/
/
/
/
/
XCROSS	XX
	LAC	WNODE
	SAD	(222222
	JMP*	XCROSS	/ NO WIRES IN THIS CIRCUIT
	LAC	(WNODE
	ADD	(1
	DAC	W1#	/ ADDRESS OF X(1) OF WIRE 1
	ADD	(7
	DAC	W2#	/ ADDRESS OF X(1) OF WIRE 2
	LAC*	W2
	SAD	(222222
	JMP*	XCROSS	/ NO MORE WIRES
	JMS	IOTEST
	DZM	ZONE	/ THESE ARE INDICATORS USED TO
	DZM	ZTWO#	/ DETECT CROSSING WIRES. ALL
	DZM	ZTHREE#	/ WILL BE NON ZERO IF WIRE CROSS
	DZM	ZFOUR#
	DZM	CON#	/ USED FOR TWO CONNECTED NODES
	JMS	CRIS	/ SEE IF THEY CROSS
	LAC	ZONE
	SNA
	JMP	PTEST
	LAC	ZTWO
	SNA
	JMP	PTEST	/ WIRES DON'T CROSS. DO THEY MEET
	LAC	ZTHREE
	SNA
	JMP	PTEST
	LAC	ZFOUR
	SNA
	JMP	PTEST
MEET	LAC	W1	/ LINES MEET.W1 & W2 ALWAYS POINT
	TAD	(-1	/AT X(1) EXCEPT WHEN NODE NMBS
	DAC	W1	/ ARE BEING CHANGED.
	LAC	W2
	TAD	(-1
	DAC	W2
	DZM	CON
	LAC*	W1	/ GET NODE # OF WIRE
	AND	(777740	/ TEMPORARY NMBS ARE > 40 OCTAL
	SNA
	ISZ	CON	/VALID NODE #
	LAC*	W2	/ GET NODE NMB OF THE OTHER WIRE
	AND	(777740
	SZA
	JMP	.+10	/ THIS ONE NOT-NO ERROR
	LAC	CON
	SNA		/ ARE BOTH NODE NMBS THE
	JMP	.+5	/ SAME VALID NMB
	LAC*	W1
	SAD*	W2
	JMP	NEXTW2
	JMP	M10
	LAC	CON	/REPLACE TEMP NODE # WITH VALID NMB
	SNA
	JMP	.+6
	LAC*	W2
	DAC	COMPAR	/TEMP NODEGOES IN COMPARE
	LAC*	W1
	DAC	CON	/VALID NODE GOES IN CON
	JMP	.+5
	LAC*	W1
	DAC	COMPAR	/ TEMP NODE IN COMPARE
	LAC*	W2	/IF BOTH TEMP THE LARGEST IS TAKEN
	DAC	CON	/  VALID NODE IN CON
	LAC	(WNODE	/PLACE WILL POINT AT NODE# ON A
	DAC	PLACE	/SEARCH FOR TEMP NODES
	LAC*	PLACE
	SAD	(222222	/END OF TABLE?
	JMP	.+12
	SAD	COMPAR	/ IS THIS A TEMP NODE
	SKP	/ YES
	JMP	.+3	/NO
	LAC	CON	/REPLACE WITH VALID NODE
	DAC*	PLACE
	LAC	PLACE	/ LOOK AT NEXR NODE NUMBER
	ADD	(7
	DAC	PLACE
	JMP	.-13
NEXTW2	ISZ	W1	/CHECK TO SEE IF OTHER WIRES SAME X(1)
	LAC	W2	/ CROSS THIS WIRE
	ADD	(10	/7+1 TO GET X(1) FOR NEXT WIRE
	DAC	W2	/ IS THIS END OF WNODE TABLE
WIRCHK	LAC*	W2	/YES
	SAD	(222222
	SKP
	JMP	XCROSS+14
	LAC	W1	/CHECK NEXT WIRE IN THE LIST FOR
	ADD	(7	/CONNECTIONS AND USE OTHER AS 
	DAC	W1	/THE NEXT SEQUENTIAL ONE
	ADD	(7
	DAC	W2
	LAC*	W1	/IS THE FIRST WIRE IN THE COMPARISON
	SAD	(222222	/END OF TABLE
	JMP*	XCROSS
	JMP	.-14
PTEST	DZM	ZONE#	/MAYBE THE WIRES MEET
	DZM	ZTWO
	LAC	W1
	DAC	PP	/ POINT-POINT
	LAC	W2
	DAC	LP#	/ LINE-POINT
ANERP	LAW	17775	/ TWO'S COMPLEMENT OF -3
	DAC	CON
	JMS	NERP	/ GO TO SUBROUTINE
	LAC	NEAR	/ DO THEY MEET
	SZA
	JMP	MEET	/ YES
	ISZ	CON	/HAVE ALL 3 CO-ORDS BEEN CHKD
	SKP
	JMP	.+4	/ YES
	IS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PLACE
	JMP	.+4
	ISZ	LONE
	ISZ	ORIENT	/  1 FOR HORZ, 0 FOR VERT
	ISZ	COMPAR
	LAC*	LONE
	CMA
	ADD*	COMPAR
	SPA
	CMA
	ADD	(-DEVATE
	SMA
	JMP*	NERP	/  NOT NEAR!
	LAC	ORIENT	/  FURTHER CONSIDERATION
	SNA
	JMP	.+6
	LAC	PP
	DAC	COMPAR
	LAC	LP
	DAC	LONE
	JMP	.+4
	ISZ	PLACE
	ISZ	COMPAR
	ISZ	LONE
	LAC*	PLACE	/ CHECK FOR OPPOSITE SIGNS AFTER SUBTRACTION
	CMA
	ADD*	COMPAR
	SMA
	ISZ	SIGN1
	SPA
	CMA
	ADD	(-DEVATE
	SMA
	JMP	.+3
	ISZ	NEAR
	JMP*	NERP
	LAC*	LONE
	CMA
	ADD*	COMPAR
	SMA
	ISZ	SIGN2
	SPA
	CMA
	ADD	(-DEVATE
	SMA
	JMP	.+3
	ISZ	NEAR
	JMP*	NERP
	LAC	SIGN1	/ IF DIFFERENT THEN POINT IS BETWEEN
	SAD	SIGN2	/ THE END POINTS OF THE LINE
	JMP*	NERP
	ISZ	NEAR
	JMP*	NERP
/
/
/  NERP _  NEAR POINT
/  NAER=1  IF POINT IS CLOSE TO LINE
/  NEAR=0  IF POINT IS NOT CLOSE TO LINE
/
/
/
/
PNTNOD	XX
	DZM	NNMB
	LAW	17754
	DAC	COMPAR
	LAC	TABLEN
	ADD	(2
	DAC	PLACE
	ISZ	NNMB
	LAC*	PLACE
	SNA
	JMP	PNT0
	SAD	(777777
	SKP
	JMP	PNT0
	LAC	PLACE
	TAD	(-2
	DAC	PLACE
	LAC*	PLACE
	DAC*	AUTO10
	ISZ	PLACE
	LAC*	PLACE
	DAC*	AUTO10
	LAC	NNMB
	DAC*	AUTO10
	LAC	PLACE
	ADD	(4
	DAC	PLACE
	JMP	.+4
PNT0	LAC	PLACE
	ADD	(3
	DAC	PLACE
	ISZ	COMPAR
	JMP	PNTNOD+7
	JMP*	PNT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
M13	LAC	FPLACE
	TAD	(-3
	DAC	PLACE
	JMS	LETNUM
	LAC	PERN
	DAC	BERR+14
	LAC	TEMP
	DAC	BERR+15
	LAC	(BERR
	DAC	PERR+2
	JMP	EINIT
M14	LAC	TPLACE
	DAC	PLACE
	JMS	LETNUM
	LAC	PERN
	DAC	DEFORM+2
	LAC	TEMP
	DAC	DEFORM+3
	LAC	(DEFORM
	DAC	PERR+2
EINIT	.INIT 4,1,CNTRLP
PERR	.WRITE 4,2,NODERR,34
CNTRLP	.INIT 4,1,CNTRLP
	.WRITE 4,2,DISRE,34
	.CLOSE 4
	DZM*	LIST
	DZM*	SAV
	JMP*	KBFIX
/
/
/
/
NODERR	.ASCII	'     XX   AND  YY   ARE THE SAME NODE'<15>
/
BERR	.ASCII	'      ONE OR BOTH  NODES  OF  YXX  CANNOT BE '
	.ASCII	'DETERMINED'<15>
/
/
DEFORM	.ASCII	'     YXX  CANNOT BE FORMED INTO A VALID ECAP '
	.ASCII	'BRANCH'<15>
/
DISRE	.ASCII	'     CONTROL IS BEING RETURNED TO THE DISPLAY'<15>
/
NONSEQ	.ASCII	'     NODE NUMBERS MUST BE SEQUENTIAL'<15>
/
NOGRND	.ASCII	'     PLEASE ADD A GROUND REFERENCE TO TH'
	.ASCII	'E CIRCUIT'<15>
/
/
/
/
/
/
/
LETNUM	XX
	JMS	CHARC
	LAC	PERN
	CLL
	ALS+13
	DAC	PERN
	LAC*	PLACE
	AND	(777
	DAC	NMB
	JMS	OCTDEC
	LAC	TENS
	SNA
	LAC	(40	/ SPACE
	ALS+7
	XOR	UNITS
	LRS+3
	XOR	PERN
	DAC	PERN
	LACQ
	XOR	(20100
	DAC	TEMP
	JMP*	LETNUM
/
/
/
/
/
OCTDEC	XX
	LAC	NMB
	LMQ
	CLA!CLL
	DIV
	.DSA	12
	ADD	(60
	DAC	UNITS
	LACQ
	SZA
	JMP	.+3
	DZM	TENS
	JMP*	OCTDEC
	ADD	(60
	DAC	TENS
	JMP*	OCTDEC
/
/
/
/
/
/
/
/
/ THIS ROUTINE LOOKS FOR A SERIAL VOLTAGR SOURCE. WHEN ONE END
/ OF A COMPONENT HAS A NODE GREATER THAN 40 OCTAL THEN THE 
/ EITHER A NODE NUMBER HAS BEEN MISSED OR A VOLTAGE SOURCE IS
/ ALSO IN THIS BRANCH. IF THE OTHER END OF THE VOLT. SRC
/ HAS A NODE NUMBER GREATER THAN 40 THEN A VALID BRANCH CAN'T
/ BE CREATED. ERROR M14 HANDLES THIS CASE.
/
/
VLTFND	XX		/ FIND VOLTAGE SOURCE
	LAC	INVAL	/ PUT INVALID NODE NMB IN TEMP
	CLL		/ TO FACILIATE SEARCH VOLT. SRC
	ALS+11
	DAC	TEMP
	LAC	TABLEB	/ PLACE NOW HOLDS POINTER TO
	DAC	PLACE	/ COMP. IN BRANCH TABLE
FVB	LAC*	PLACE	/ LOOK AT COMP. IN TABLE
	SNA		/ END OF TABLE YET?
	JMP	M14	/YES! NO VOLT.SRC FOUND-INVALID
	AND	(770000	/ MASK COMPONENT CODE
	SAD	(V.*10000	/ IS THIS VOLT SRC
	JMP	.+5	/YES!
	LAC	PLACE	/ NO! LOOK AT NEXT COMP.
	ADD	(4	/ IN THE TABLE
	DAC	PLACE
	JMP	FVB	/ FIND VOLT BRANCH
	LAC	PLACE	/ LOOK AT NODE NMB FOR
	ADD	(3	/ THIS VOLTAGE SRC
	DAC	PLACE
	LAC*	PLACE	/ GET NODE NMBS
	AND	(777	/ MASK FOR V1
	SAD	INVAL	/ IS THIS OUR BAD NODE
	SKP		/ YES!
	JMP	.+6	/ LET'S LOOK AT OTHER NODE
	LAC*	PLACE	/ ARE BOTH NODES BAD
	AND	(740000	/ NON-ZERO IF > 40
	SZA		/ IF BOTH NODES OF VOLT SRC BAD
	JMP	M14	/ THEN NO BRANCH CAN BE FORMED
	JMP	NCHCK	/ OK! LET'S FIX UP
	LAC*	PLACE	/ IS THIS OUR INVALID NODE
	AND	(777000	/ MASK FOR CHECK
	SAD	TEMP
	SKP		/ THIS IS IT!
	JMP	.+6	/ THIS IS NOT THE ONE!
	LAC*	PLACE
	AND	(740	/ IS THE OTHER NODE OK?
	SZA
	JMP	M14	/ NO BRANCH CAN BE FORMED
	JMP	NCHCK	/ LET'S FIX UP
	ISZ	PLACE	/ PLACE AT NEXT COMP.
	JMP	FVB	/ FIND VOLT. BRANCH
NCHCK	LAC*	PLACE	/ REFER TO FLOW CHART TO
	AND	(777	/ OBTAIN CORRECT SIGN FOR VOLTAGE
	DAC	V1#	/ SOURCE
	LAC*	PLACE	/ SETUP V1 & V2
	AND	(777000
	CLL
	LRS+11
	DAC	V2#
	LAC	ZONE	/ START ALGORITHM
	AND	(777740
	SZA		/ IS IT VALID?
	JMP	NREPAR	/ NO
	LAC	V1	/ YES
	AND	(777740	/ IS V1 VALID
	SNA
	JMP	.+4	/ YES
	LAC	V2	/ NO
	DAC	ZTHREE
	JMP	NADJST
	LAC	ZONE
	DAC	ZTHREE
	LAC	V1
	DAC	ZONE
	JMP	NADJST
NREPAR	LAC	V1
	AND	(777740	/ IS V1 VALID?
	SZA
	JMP	.+4
	LAC	V1
	DAC	ZONE
	JMP	NADJST
	LAC	ZTHREE
	DAC	ZONE
	LAC	V2
	DAC	ZTHREE
NADJST	LAC	ZONE	/ REPAIR REMAIN POINTERS
	CLL
	ALS+11
	DAC	ZFOUR
	LAC	ZTHREE
	CLL
	ALS+11
	DAC	ZTWO
	LAC	PLACE
	TAD	(-3
	DAC	SERVLT#	/ SERIAL VOLT SRC
	JMP*	VLTFND	/ A VOLT SRC FOUND.
/
/
/
/
/
/
/
/
CURRENT	XX		/LOOKS FOR A PARALLEL CURRENT
	LAC	TABLEB	/SOURCE FOR TWO VALID NODES
	DAC	PLACE
	LAC*	PLACE
	SNA
	JMP*	CURRENT
	AND	(770000
	SAD	(300000	/ I  CURRENT SOURCE
	JMP	.+5
	LAC	PLACE
	ADD	(4
	DAC	PLACE
	JMP	CURRENT+3
	LAC	PLACE
	ADD	(2
	DAC	PLACE
	LAC*	PLACE
	ISZ	PLACE
	SAD	(777777
	SKP
	JMP	.+3
	ISZ	PLACE
	JMP	CURRENT+3	/NOT VALID LOOK FOR ANOTHER
	LAC*	PLACE
	AND	(777
	SAD	ZONE
	JMP	.+4
	SAD	ZTHREE
	SKP
	JMP	.-10
	LAC*	PLACE
	AND	(777000
	SAD	ZTWO
	JMP	.+4
	SAD	ZFOUR
	SKP
	JMP	.-17
	LAC	PLACE
	TAD	(-3
	DAC	CPNTR	/CURRENT POINTER
	JMP*	CURRENT
/
/
/
/  THIS CREATES THE FIRST PART OF THE ECAP STATEMENT
/
/
BANDN	XX		/ BZZ...N(XX,YY),..R=.0
	LAC	BNMB	/
	DAC	NMB	/  . = SPACE
	JMS	OCTDEC
	LAC	(LTABLE
	TAD	(-1
	DAC*	(10
	LAC	(102
	DAC*	AUTO10
	LAW	17774
	DAC	COMPAR
	LAC	TENS
	SZA
	JMP	.+4
	LAC	UNITS
	DAC*	AUTO10
	JMP	.+6
	ISZ	COMPAR	/SPACE COUNT
	LAC	TENS
	DAC*	AUTO10
	LAC	UNITS
	DAC*	AUTO10
	LAC	(40	/SPACE
	DAC*	AUTO10
	ISZ	COMPAR
	JMP	.-2
	LAC	(116	/N
	DAC*	AUTO10
	LAC	(50	/ (
	DAC*	AUTO10
	LAW	17774	/SPACE AFTER COMPONENT
	DAC	TEMP	/SPACE COUNTER
	LAC	ZONE
	DAC	NMB
	JMS	OCTDEC
	LAC	TENS
	SZA
	JMP	.+4
	LAC	UNITS
	DAC*	AUTO10
	JMP	.+6
	ISZ	TEMP
	LAC	TENS
	DAC*	AUTO10
	LAC	UNITS
	DAC*	AUTO10
	LAC	(54	/  ,
	DAC*	AUTO10
	LAC	ZTHREE
	DAC	NMB
	JMS	OCTDEC
	LAC	TENS
	SZA
	JMP	.+4
	LAC	UNITS
	DAC*	AUTO10
	JMP	.+6
	ISZ	TEMP
	LAC	TENS
	DAC*	AUTO10
	LAC	UNITS
	DAC*	AUTO10
	LAC	(51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OTERM
/
/
/
/
ADDON	XX
	LAC	(54	/ COMMA
	DAC*	AUTO10
	LAC	MAG
	DAC	PLACE
	JMS	CHARC	/ LETTER FOR COMPONENT
	DAC*	AUTO10	/ LETTER IN AC
	LAC	(75	/ EQUALS
	DAC*	AUTO10
	LAC	MAG
	ADD	(2
	DAC	PLACE
	LAC*	PLACE
	DAC	UPDATA
	JMS	DEPACK
	JMP*	ADDON
/
/
/
/
/
/
/
CHARC	XX
	LAC*	PLACE
	AND	(770000
	SAD	(200000
	LAC	(122	/ THE LETTER  R
	SAD	(220000
	LAC	(114	/  L
	SAD	(240000
	LAC	(103	/  C
	SAD	(260000
	LAC	(105	/  E  ECAP USES E FOR VOLTAGE
	SAD	(300000
	LAC	(111	/  I
	DAC	PERN
	JMP*	CHARC
/
/
/
/
/
/
/
GO	700702		/ EEM
	JMP*	START
/
/
TYPE	.ASCII	'     TYPE THE DESIRED ECAP ANA'
	.ASCII	'LYSIS STATEMENT'<15>
/
STRING	.ASCII	'     TYPE ECAP COMMAND STRING'<15>
/
SRCDEV	.ASCII	'     SOURCE FOR COMMAND STRING IS PR OR TT?'<15>
/
SENDER	.ASCII	'     WHEN FINISHED TYPE  /*'<15>
/
/
	.SIZE
	.END GO
