
/EDGRIN INTERPRETIVE ASSEMBLER PATCHES LIST TO BREAK BACK TO 
/THE START OF THE COMMAND DECODER AT GSTART AND SETS THE
/EXIT FROM THIS DECODER ON ALT TO PASS THRU THE BINARY ASSEMBLER
/WHICH ENTERS THE DECODED VALUES INTO THE DISPLAY FILE.

*7200
TRANSL,	TAD BINST	/B CALLS THE TRANSLATOR
	DCA AXFILE	/INIT FILE
	TAD C272
	DCA I LISTX1	/ACTIVATE : AND ;
	TAD C273
	DCA I LISTX2
	TAD INLOW
	DCA INDEV	/INTERCEPT CHIN
	DCA ECHOSW

	TAD EE2
	DCA TE1	/INTERCEPT INSERT ON EXIT
	JMP I EE1	/TO GSTART WITH ECHOSW=0

C272,	272
EE1,	GSTART+2
EE2,	TRANSL
TESFIL,	0	/TEST FOR OVERFLOW OF SCRATCH BINARY BUFR
	CIA CLL
	TAD M2
	TAD END
	SZL CLA
	ESCAPE	/OVERFLOW INTO ASCII BUFFER
	JMP I TESFIL

SETUP4,	TAD WDCTSW 	/SET UP TEXT MODE ENTRY FOR 
	DCA AXIN
	CMA
	TAD AXCOMB 	/START AND WORD COUNT
	CIA
	TAD WDCTSW
	DCA WDCTSW
	TAD VEC2	/LOAD THE TEXT STATUS WD
	JMS I ROT6RI	/BITS 0-5=CHAR COUNT
	RAR
	AND M100
	DCA TESFIL
	TAD VEC3	/BITS 6-8=LINE COUNT
	RTL CLL
	RAL
	TAD VEC1	/BITS 9-11=SCALE THRESHOLD
	TAD TESFIL
	DCA I AXFILE
	TAD AXFILE
	DCA PACKIN 	/SET PACK TO ASSEMBLER LOCATION
	DCA XCTIN
CH4,	TAD I AXIN
	JMS I PACK1	/PACK TEXT
	TAD PACKIN
	JMS TESFIL	/TEST FOR FILE END
	ISZ WDCTSW	/LOAD AND TEST COUNT
	JMP CH4
	TAD PACKIN
	DCA AXFILE	/RESET ASSEMBLER PTR
	JMP I NXTL

NXTL,	SETUP5

SETUP2,	TAD CCR
	DCA I AXCOMB	/END COMMENT WITH C.R.
	CLL CLA CML RTL	/+2TEST FOR TEXT ENTRY
	TAD VECSW
	SNA 
	JMP CH7
	SPA CLA
	JMP SETUP4	/TEXT MODE VECSW=-3
	TAD WDCTSW
	TAD ARGIN
	SKP
CH7,	TAD C77
	DCA AXIN	/INITIALIZE INPUT PTR
CH5,	TAD I AXIN
	DCA I AXFILE	/ASSEMBLE THE ENTRIES INTO THE DF
	TAD AXFILE
	JMS TESFIL 	/TEST FOR END OF FILE
	ISZ WDCTSW	/TEST WORD COUNT
	JMP CH5
	JMP I NXTL
/COLON D SETS CALL DISPLAY, COLON J SETS CALL JUMP

CALDIS,	IAC	/SET STATUS:BIT 11 IS UP ON ENTRANCE
CALJMP,	DCA ZSW	/SET CALL EXIT:BIT 11 IS DOWN ON ENTRANCE
	TAD VEC2
	DCA VEC3
	TAD VEC1
	DCA VEC2
	TAD ZSW
	DCA VEC1
MORCAL,	JMS I CHI1
	JMS I COMAN1	/LOAD CHAR INTO SCRATCH BFR
	JMS I SORTJ
		LIST11-1
		OPS11-LIST11
	JMS I SORTF	/NOT A STATUS COMMAND
		STALIS-1
	JMP MORCAL
	TAD AXIN
	CIA
	TAD .-4
	DCA AXIN
	CLL CML RTR
	RAR
	ISZ AXIN
	JMP .-2
	TAD VEC1	/ACCUMULATE MICRO PROGRAM
	JMP MORCAL-1	/CONTIUNE
UPARO,	TAD C100	/HERE IN :D OR :J FOR SECOND WD
	DCA PACKIN
	TAD M2
	DCA VECSW
	DCA XCTIN
	TAD ARGIN
	TAD M100	/SET UP WDCTSW FOR NAME OR ITERATE
	DCA WDCTSW	/0 FOR NO COMMA, 1 FOR 1 COMMA
UPAR1, 	JMS I CHI1	/GET NAME
	JMS I COMAN1	/LOAD BUFR
	JMS I SORTJ
		LIST11-1
		UOPS-LIST11
	JMS I PACK1	/PACK INTO VEC2 AND VEC3
	SKP
UPAR2,	ISZ WDCTSW	/ONE EXTRA SLASH ENTERS ALL ARGS PRECEDING :
	ISZ WDCTSW
	TAD WDCTSW
	TAD M4
	SPA SNA CLA
	JMP UPAR1
	ESCAPE	/TOO MANY CHARS OR ARGUMENTS

UOPS=.
	UPAR2	// NEEDED FOR BCD ENTRY FROM VEC1 OR VEC2
	ERRORS	/CR
	GSTART	/RO
	UPAR3	/TERMINATE ON ALT OR ;

UPAR3,	TAD WDCTSW	/HERE BY ALT
	TAD M3
	SMA CLA
	TAD C4000	/MAKE VEC2 NEG IF MORE THAN 1 NAME
	TAD VEC2
	DCA VEC2	/NO PROTECTION AGAINST BAD NAME
	TAD WDCTSW	/=0, NO ENTRIES- 1,2 FOR 1 WD, 3,4 FOR TWO WDS
	CLL IAC
	RAR
	JMP ALT	/WDCTSW=-1 OR -2 OR -3
SETTAG,	JMS I CHI1	/COLON /: GET LABEL
	JMS I COMAN1	/LOAD BUFR
	JMS I SORTJ
		LIST9-1
		LOPS1-LIST9
	JMP SETTAG	/HERE IF NOT CR,RO OR ;



COLON,	TAD M2	/SET VECSW=-1 FOR LIN VECS
SETCAM,	IAC	/SET VECSW=+1 FOR ARC
SETCM,	DCA VECSW	/SET VECSW=0 FOR CM
CH6,	JMS I CHI1
	JMS I COMAN1	/LOAD BUFR
	JMS I SORTJ
		LIST8-1
		OPS8-LIST8
	JMP CH6 /NOT A COMMAND
/SERIAL LIST SEARCH. CALL JMS SEARCH FOLLOWED BY 
/LIST-1 (PTR TO THE SEARCH LIST). EXIT IS TO
/THE LOCATION FOLLOWING LIST PTR IF NOT FOUND, 
/OR TO THE NEXT SEQUENTIAL LOCATION
/IF FOUND. EXIT WITH AC=0 AND
/AXIN SET POINTING TO THE LOCATION OF THE FOUND WORD
SEARCH,	0	/SERIAL LIST SEARCH
	TAD I SEARCH
	DCA AXIN
	ISZ SEARCH	/SET PTR AND EXIT TO LOC FOLLOWING PTR
SRCH1,	TAD I AXIN
	SNA
SRCH3,	JMP SRCH2+1	/ZERO ENDS LIST
	CIA
	TAD CHAR
	SZA CLA
	JMP SRCH1
SRCH2,	ISZ SEARCH
	JMP I SEARCH	/EXIT WITH AXIN POINTING TO FOUND LOAC

/GRAPHIC INTERPRETER SETUP AND INITIATE 

ALT4,	IAC	/VECSW=-3
ALT2,	IAC	/VECSW=-2
ALT3,	CMA	/VECSW=-1
	DCA VECSW
ALT,	CMA	/COLON OR COMMENT FOLLOWING COLON OR S OR C HERE
	DCA WDCTSW
	TAD VECSW	/TEST SEQUENCE
	SMA
	JMP LOADLV	/0=CM, +1=ARC
	IAC
	SNA
	JMP LOADSV	/-1=LINEAR VECTOR
	IAC
	SNA CLA
SETUP,	JMP I SETUP1	/-2=CALL
	TAD AXCOMB
	DCA WDCTSW	/-3=TEXT :T, SET PTR TO START OF TEXT STRING
	DCA ZSW	/CLEAR CHAR COUNTER
CH3,	JMS I CHI1	/GET TEXT
	JMS I COMAN1	/LOAD BUFR
	JMS I SORTJ
		LIST11-1
		OPS12-LIST11	/IS IT ALT OR CROR SLASH OR RUBOUT?
	ISZ ZSW	/INCR CHAR COUNT
	JMP CH3

CH8,	TAD VEC2	/SET CHARACTER AND LINE COUNT FOR ROTATE
	CIA
	TAD ZSW
	SPA
	CLA
	TAD VEC2
	DCA VEC2	/ZSW OR VEC2, WHICHEVER IS GREATER
	ISZ VEC3
	JMP CH3-1
/VECTOR COMPUTATION FOR LV OR SV, AND ADD CORRECT BITS

LOADLV,	IAC	/SET TO -2 FOR LV (TWO WORDS) ,-3 FOR ARC
	CMA
	DCA WDCTSW
LOADPT,	TAD VEC1
	AND C1777	/STRIP BIT 0 AND 1 FROM X
	TAD C2000	/SET BIT 1 FOR LV AND X
	DCA VEC1
LOADV2,	TAD VEC2
	ISZ ZSW	/TEST FOR Z (INTENSIFY)
	AND C1777	/NOT SET
	ISZ VECSW
	TAD C4000	/SET BIT 0 FOR CM,CAM OR SV
	DCA VEC2	/VECSW=-1 FOR LV, BIT0=0
	JMP SETUP	/TO APPEND
LOADSV,	TAD ARGIN
	TAD M100
	SNA CLA	/TEST FOR NO COMMA=GRAFPLOT
	JMP LOADPT
	TAD VEC1	/TEST AND SET SV IF APPLICABLE
	JMS VECTST
	TAD VEC2
	JMS VECTST
	TAD VEC2 	/HERE IF SV
	AND C2037	/CLEAR Y, LEAVE Z IF SET
	DCA VEC2
	DCA VECSW	/MUST PASS THRU TO SET BIT 1
	TAD VEC1
	AND C37	/CLEAR X
	JMS I ROT6RI	/ROTATE 5 LEFT
	RTR
	JMP LOADV2
///
VECTST,	0	/TESTS FOR SV LE 15
	AND C1760	/MASKS Z AND VALID BITS
	SZA
	CMA
	AND C1760
	SZA CLA	/IF ALL UNMASKED BITS WERE SAME,
	JMP LOADLV
	JMP I VECTST	/WE WILL EXIT HERE.

C1760,	1760
C2037,	2037
OPS12=.
	CH8	/SLASH ACTS LIKE CRLF IN :T FORMAT
	ERRORS	/CR IS A BOO-BOO
	GSTART	/RO
	SETUP	/ALT
LIST8=.
	303	/C FOR CIRCLE
	323	/S FOR SEGMENT
	304	/D FOR CALL DISPLAY
	312	/J FOR CALL JUMP
	324	/T FOR TEXT
LIST11=.
	257	// USED TO ENTER MULTIWORD CALLS
LIST9=.
	215	/C.R.
	377	/R.O.
	273	/ALT

OPS11=.
	UPARO
	ERRORS
	GSTART
	ALT2

*7060
STOP=.

SETUP5,	TAD M2	/SETUP TO INSERT
	TAD COMBEG
	DCA AXCOMB	/BACKUP FOR TAB, SLASH
	TAD AXFILE
	DCA BINEND	/SETS END OF INSERT LINE
	TAD BINST
	DCA AXFILE	/PTR TO TOP
	CMA
	DCA COMSW	/COMMENT AFTER FIRST INSERT
	DCA SEQSW
	DCA NOSW	/TAB FIRST, MSDIGIT FIRST
	TAD LOADC1
	DCA INDEV	/INPUT FROM COMBUF AND BINARY BUF
	JMP I APP1
LOADC1,	LOADC


LOADC,	0
	CMA
	TAD SEQSW
	SNA
	JMP LOADNO	/SEQSW=1
	SPA CLA
	JMP LOADTB	/SEQSW=0
	TAD COMSW
	SZA CLA
	JMP LOADCM	/COMMENT WHEN NOT ZERO
LOADEN,	DCA SEQSW
	DCA COMSW	/C.R. WHEN ALL ELSE FAILS
	TAD CCR
	JMP I LOADC

LOADTB,	TAD AXFILE
	CIA
	TAD BINEND
	SNA CLA	/TEST FOR END OF FILE
	JMP LOADFF
	ISZ SEQSW	/MAKE IT ONE FOR NO NEXT
	TAD CTAB
	JMP I LOADC

LOADFF,	TAD C214
	JMP I LOADC	/THIS ENDS THE INSERT

LOADCM,	TAD I AXCOMB	/RETRIEVE NEXT COMMAND ENTRY
	TAD MCR
	SNA
	JMP LOADEN	/ITS CR,TERMINATE INSERT
	TAD CCR
	JMP I LOADC

LOADNO,	TAD NOSW
	SNA CLA	/TEST DIGIT COUNT
	JMP SETNO	/STARTS WHEN NULL
	TAD LINK
	RAL
	TAD NUMB1
SETNO1,	RTL	/BINARY TO OCTAL PRINT
	RAL
	DCA NUMB1
	RAR
	DCA LINK
	TAD NUMB1
	AND C7
	TAD C260
	ISZ NOSW
	SKP
	ISZ SEQSW
	JMP I LOADC

SETNO,	TAD M4
	DCA NOSW
	TAD I AXFILE
	CLL RAL
	JMP SETNO1


OPS8,	SETCM	/CM
	SETCAM	/ARC
	CALDIS	/CALL DISPLAY
	CALJMP	/CALL JUMP
	ALT4	/TEXT
	SETTAG	/TAG
LOPS1=.
	ERRORS	/C.R.
	GSTART	/R.O.
	ALT	/ALT

*4000
INITAL,	TAD Q4	/TYPE INTIIAL DIALOG
	DCA AXIN
	TAD Q5
	DCA VEC1
	TAD I AXIN
	JMS I OUT1
	ISZ VEC1
	JMP .-3
	JMS I CHI1
	TAD MNO
	SNA CLA
	JMP NO
QX,	TAD Q1
	DCA VRSTR2
	JMP I KILL1

NO,	TAD BELL
	DCA I Q3
	TAD C2000
	DCA I Q2
	TAD BINST
	DCA END
	JMP QX

	MNO,	-316
Q1,	VRSTR
Q2,	LIST2+1
Q3,	BUFEND
Q4,	TEXT1-1
Q5,	-43

TEXT1,	215
	305
	304
	311
	324
	317
	322
	240
	263
	255
	262
	266
	255
	266
	271
	215
	322
	305
	324
	301
	311
	316
	240
	324
	322
	301
	316
	323
	314
	301
	324
	317
	322
	277
	255


/SYMBOLS
DTEM=H
COUNTP=VEC3
V0=TEMP
VAL=TEMP
S=AXTEM
SAVE=AXIN
TEMP3=PRNT1
C1=VECSW
ROTSW2=VECSW
CNT1=VECSW
BOX=WDCTSW
CMFL=ZSW
SVFL=ZSW
TEMP7=UTRA
PATH=XCTIN
SAVE2=OUTH
XCTEM=PACBUF
CNT=DELP
TEMP1=SORTB
TEMP2=ENDLN
TEMP6=PACBUF

$

