/
/NARBUG
/SEE WRITE UP FOR COMPLETE
/DESCRIPTION OF USAGE
/PART 1
	*7745
/THIS IS THE "READ ROUTINE"
/BY WHICH INTERCOMMUNICATION
/BETWEEN THE ROUTINES IS 
/ACCOMPLISHED
DSAD,	0	/ADDRESS WHERE TO GO
NTRACK, 0	/CHANGE THIS FOR DIFF TRACK
MWRDS,	-146
WC,	0
MA,	0
BEG,	7577	/ALL SUBS START AT 7600
READ,	0
	TAD NTRACK
	DEAL
	CLA CLL
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD DSAD
	DMAR
	DFSC
	JMP .-1
	ISZ RETURN	/STANDARD RETURN?
	JMP 7600	/YA, MEIN HERR
	JMP I READ	/NEIN
RETURN, 0	/FOR NON STANDARD RETURNS
TRANS1, 0
TRANS2, 0
TRANS3,0
TRANS4, 0
TRANS5, 0

/
/
/INTERPRETER
	*7600
ENTRY,	TAD C215
	JMS TOUT
	TAD C212
	JMS TOUT
	TAD C252
	JMS TOUT
	JMS TTIN	/GET A CHAR
	DCA T1
	TAD M300	/SUBTRACT 300
	TAD T1		/FROM CHAR
	SPA		/MUST BE POSITIVE
	JMP ERR		/IT'S NOT POSITIVE
	DCA T1		/CHECK THAT IT
	TAD T1		/IS LEGAL
	CIA
	TAD M32		/THAT IS IT IS NOT
	SMA CLA		/GREATER THAN 332
	JMP ERR
	TAD T1		/IT IS A ALPHABETIC ONE
	TAD DMAP	/STRIPED CHAR
	DCA T1
	TAD I T1
	DCA DSAD
	JMS READ
ERR,	CLA 
	TAD ERROR
	DCA DSAD
	JMS READ
DMAP,	.
	200		/POINTERS "A"
	400		/ "B"
	600		/"C"
	1000		/"D"
ERROR,	3600		/ERROR
	1400		/"F"
	3200		/"G"
	3600		/"H"
	3600		/"I"
	3600		/"J"
	4000		/"K"
	1600		/"L"
	3600		/"M"
	3600		/"N"
	3600		/"O"
	2200		/"P"
	2000		/"Q"
	2400		/"R"
	2600		/"S"
	3600		/"T"
	3600		/"U"
	3600		/"V"
	3600		/"W"
	3600		/"X"
	3600		/"Y"
	3600		/"Z"
TTIN,	0
	KSF
	JMP .-1
	KRB
	DCA T1
	TAD T1
	JMS TOUT
	TAD T1
	JMP I TTIN
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
C212,	212
C215,	215
C252,	252
T1,	0
M300,	-300
M32,	-32
	$
/
/
/"A"
/ROUTINE GETS AC 
/AND ALLOWS IT TO BE CHANGED
	*7600
	TAD SP
	JMS TOUT
	TAD BUFAD
	DCA MA
	DEAL
	CLA CMA
	DCA WC
	TAD ACAD
	DMAR
	DFSC
	JMP .-1
	TAD BUFF
	DCA TRANS1
	TAD HERE
	DCA TRANS5
	JMS SAVE
	TAD OCTO
	DCA DSAD
	JMS READ
	TAD SP
	JMS TOUT
	TAD OCTI
	DCA DSAD
	IAC
	DCA TRANS4
	TAD HERE
	DCA TRANS5
	JMS SAVE
	JMS READ
	ISZ TRANS5
	JMP .+2
	JMP OUT	/NO
	TAD TRANS1
	DCA BUFF
	TAD BUFAD
	DCA MA
	CLA CMA
	DCA WC
	TAD ACAD
	DMAW
	DFSC
	JMP .-1
OUT,	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	DCA RETURN
	DCA DSAD
	JMS READ
SP,	240
BUFAD,	BUFF-1
ACAD,	3700
HERE,	200
OCTO,	3400
OCTI,	1200
CR,	215
LF,	212
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
BUFF,	0
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/	"B"
/BREAK ROUTINE, 
/CALLED BY B XXXX,YYYY
/WHERE XXXX IS THE BREAK 
/ADDRESS AND YYYY IS THE
/LOCATION WHERE EXCUTION
/OF THE PROGRAM SHALL 
/START.	IF ONLY B XXXX
/IS GIVEN, THE ROUTINE
/WILL COMMENCE EXCUTION AT
/THE PREVIOUS BREAK ADDRESS.
/THE BREAK ROUTINE DESTROYS
/THE CONTENTS OF LOCATION
/175.	THE (AC), (MQ), AND
/(LINK) ARE SAVED WHEN THE
/PROGRAM BREAKS AND ARE 
/RESTORED WHEN EXECUTION 
/IS COMMENCED.
	*7600
	TAD BADRS	/SAVE LAST BREAK ADRS
	DCA LBADRS
	JMS IN	/GET NEW ADDRESS
	TAD TRANS1
	DCA BADRS
	JMS IN
	ISZ TRANS5	/VALID ENTRY?
	JMP .+2	/YES
	JMP .+3	/NO
	TAD TRANS1	/SET UP EXEC ADRS
	DCA LBADRS
	CLA CLL
	TAD I BADRS	/SAVE CONTENTS
	DCA SAVE1
	TAD INS1	/GET POINTER
	DCA 175	/AND SET UP
	TAD INS2	/INSTRUCTION FOR
	DCA I BADRS	/ACTUAL BREAK
	TAD BUFFAD	/NOW GET THE
	DCA MA	/REGISTERS
	TAD M3
	DCA WC
	TAD C3700	/LOCATION OF REGISTERS
	DMAR
	DFSC
	JMP .-1
	JMS CRLF
	TAD TRANS2	/GET MQ
	MQL
	TAD TRANS3	/GET LINK
	RAR
	TAD TRANS1	/GET AC
	JMP I LBADRS	/AND NOW BREAK
BREAK,	DCA TRANS1	/RETURN HERE AND SAVE
	RAL	/THE AC AND LINK
	DCA TRANS3
	MQA
	DCA TRANS2	/AND THE MQ
	TAD SAVE1	/RESTORE THE INSTRUCTION
	DCA I BADRS
	TAD M3
	DCA WC
	TAD BUFFAD	/SAVE THE REGISTERS
	DCA MA
	TAD NTRACK
	DEAL
	CLA
	TAD C3700
	DMAW
	DFSC
	JMP .-1
	JMS SAVE
	TAD AAD
	DCA DSAD
	JMS CRLF
	JMS READ
AAD,	200
IN,	0
	JMS SAVE
	TAD HERE
	DCA TRANS5
	IAC
	DCA TRANS4
	TAD OCTI
	DCA DSAD
	JMS READ
	JMP I IN
CRLF,	0
	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	JMP I CRLF
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
BADRS,	0
LBADRS, 0
M3,	-3
SAVE1,	0
INS1,	BREAK
INS2,	JMP I 175
BUFFAD, 7772
CR,	215
C3700,	3700
LF,	212
HERE,	400
OCTI,	1200
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/
/	"C"
/CALLED BY C XXXX
/THE CONTENTS OF XXXX ARE TYPED
/OUT AND MAY THEN BE CHANGED.
/A LF WILL OPEN THE NEXT LOCATION
/AND A CR WILL RETURN TO INTERPRETER
	*7600
	JMS OCTIN	/GET LOCATION
	TAD TRANS1
	DCA LOC
	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
LP1,	TAD LOC
	JMS OCTOUT	/PRINT LOCATION
	TAD DASH
	JMS TOUT
	TAD I LOC	/GET CONTENTS
	JMS OCTOUT	/AND PRINT THEM
	TAD SP	/OUTPUT
	JMS TOUT	/A SPACE
	JMS OCTIN	/GET NEW VALUE
	ISZ TRANS5	/WAS ANYTHING INPUT?
	SKP	/YES
	JMP .+3	/NO
	TAD TRANS1	/GET THE NEW
	DCA I LOC	/VALUE AND STORE IT
	TAD MCR	/TERMINATE?
	TAD TRANS4
	SNA CLA
	JMP FINITO	/YES
	ISZ LOC	/NO, SO GET NEXT
	TAD CR
	JMS TOUT
	JMP LP1
FINITO, TAD LF
	JMS TOUT
	DCA DSAD
	JMS READ
MCR,	-215
LOC,	0
DASH,	255
SP,	240
CR,	215
LF,	212
OCTIN,	0
	JMS SAVE
	TAD C1200
	DCA DSAD
	IAC	/WE WANT ONE INPUT
	DCA TRANS4
	TAD HERE
	DCA TRANS5
	JMS READ
	JMP I OCTIN
C1200,	1200
HERE,	600
OCTOUT, 0
	DCA TRANS1	/NUM TO BE OUTPUT
	JMS SAVE
	TAD HERE
	DCA TRANS5
	TAD C3400
	DCA DSAD
	JMS READ
	JMP I OCTOUT
C3400,	3400
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$

/DISC READ AND WRITE ROUTINES
/CALLED BY D(R OR W),WWWW,XXXX,YYYY,ZZZZ
/WHERE:
/	WWWW = INITIAL CORE LOCATION
/	XXXX = NUMBER OF WORDS
/	YYYY = TRACK NUMBER (0 THROUGH 7)
/	ZZZZ = INITIAL ADDRESS ON TRACK
/OR DCX,YYYY
/WHICH ACTS LIKE THE "C" ROUTINE
/EXCEPT FOR THE DISC.
	*7600
	JMS TIN
	DCA T1
	TAD T1
	TAD MR
	SNA CLA
	JMP R
	TAD T1
	TAD MW
	SNA CLA
	JMP W
	TAD T1
	TAD MC
	SNA CLA
	JMP C
	TAD ERRAD
	DCA DSAD
	JMS READ
	TAD SP
	JMS TOUT
R,	TAD RINS
	DCA EX
	JMP .+3
W,	TAD WINS
	DCA EX
	TAD C4
	DCA TRANS4
	TAD OCTI
	DCA DSAD
	TAD HERE
	DCA TRANS5
	JMS SAVE
	JMS READ
	CLA CMA
	TAD TRANS1
	DCA MA
	TAD TRANS2
	CIA
	DCA WC
	CAM
	TAD TRANS3
	SHL
	5
	DEAL
	CLA CLL
	TAD TRANS4
EX,	0
	DFSC
	JMP .-1
	DCA DSAD
	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	JMS READ
TIN,	0
	KSF
	JMP .-1
	KRB
	DCA T1
	TAD T1
	JMS TOUT
	TAD T1
	JMP I TIN
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
T1,	0
MR,	-322
MW,	-327
ERRAD,	3600
SP,	240
RINS,	DMAR
WINS,	DMAW
C4,	4
OCTI,	1200
HERE,	1000
CR,	215
LF,	212
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
MC,	-303
C,	TAD C3000
	DCA DSAD
	JMS READ
C3000,	3000
	$

/
/OCTAL INPUT SUBROUTINE
/CALL BY JMS READ
/	(TRANS4)=# OF INPUT BLOCKS
/	(TRANS5)=RETURN TRACK ADDRESS ON NTRACK
/RETURN IS TO VIA A JMP I READ
/WITH THE INPUT NUMBERS IN TRANS1 THROUGH 
/TRANS5
/IF LESS THAN 5 INPUTS ARE CALLED FOR
/	(TRANS4)=TERMINATING CHARACTER
/	(TRANS5)=7777 IF NO VALID INPUT
/ONLY VALID TERMINATORS ARE
/COMMA, LINE FEED, AND 
/CARRAIGE RETURN
	*7600
	TAD TRANS5	/GET RETURN
	DCA DSAD
	CMA CLA	/-1 FOR
	DCA RETURN	/NON STANDARD RETURN
	TLS	/SET FLAG
	CLA CMA	/-1
	DCA TRANS5	/WILL BE ZERO IF VALID INPUT
	TAD TRANS4	/GET NUMBER OF INPUT
	CIA
	DCA BLOCKS	/BLOCKS DESIRED
	TAD DEPAD
	DCA DEP
OLP1,	CAM
	DCA NUM
OLP2,	JMS OTIN
	DCA OT1
	TAD OT1
	TAD M260
	SPA
	JMP EOB
	TAD M10
	SMA CLA
	JMP EOB
	TAD OT1
	TAD M260
	DCA OT1
	TAD NUM
	SHL
	2
	TAD OT1
	DCA NUM
	DCA TRANS5
	JMP OLP2
M260,	-260
M10,	-10
BLOCKS, 0
OT1,	0
DEPAD,	7773
DEP,	0
NUM,	0
MCR,	-215
MLF,	-212
MCOMA,	-254
EOB,	CLA CLL
	TAD OT1	/NON NUMERIC INPUT
	TAD MCR	/CR?
	SNA CLA
	JMP EOB1
	TAD OT1	/LF?
	TAD MLF
	SNA CLA
	JMP EOB1
	TAD OT1
	TAD MCOMA
	SNA CLA
	JMP EOB1
	TAD ERRAD	/NOT A LEGAL TERMINATOR
	DCA DSAD	/SO GO TO
	DCA RETURN	/TO ERROR ROUTINE
	JMS READ
ERRAD,	3600
EOB1,	TAD OT1	/GET TERMINATOR
	DCA TRANS4
	TAD NUM
	DCA I DEP
	IAC
	TAD DEP
	DCA DEP
	ISZ BLOCKS
	JMP OLP1
	JMP READ+1
OTIN,	0
	KSF
	JMP .-1
	KRB
	TLS
	TSF
	JMP .-1
	JMP I OTIN
	$
?
/
/
/	"F"
/OPENS A FLOATING POINT "REGISTER",
/PRINTS THE CONTENTS, IF NEW NUMBER
/IS INPUT THIS REPLACES OLD.
/TERMINATION WITH LF OPENS NEXT
/SUCCESSIVE FLOATING POINT NUMBER
/(INCREMENTS BY 3).	CR RETURNS TO
/INTERPRETER.
	*7600
	JMS OCTIN
	JMS CRLF
	TAD TRANS1
	DCA LOC
	TAD C5600
	DCA 7
	JMS I 7	/SAVE THE FLOATING AC
	FPUT SAVE1
	FEXT
LP1,	TAD LOC
	JMS OCTOUT
	JMS I 7
	FGET I LOC
	FEXT
	JMS I FOUT
	TAD SP
	JMS TOUT
	TAD SP
	JMS TOUT
	JMS I FIN
	TAD 60	/VALID INPUT?
	SNA CLA
	JMP .+4	/NO
	JMS I 7	/YES
	FPUT I LOC
	FEXT
	TAD 57	/GET TERMINATOR
	CIA
	TAD CR	/IS IT A CR
	SNA CLA	/SKIP IF NOT
	JMP OUT
	JMS CRLF
	TAD C3
	TAD LOC	/INCREMENT LOC BY 3
	DCA LOC
	JMP LP1
OUT,	JMS I 7
	FGET I SAVE1
	FEXT
	DCA DSAD
	DCA RETURN
	JMS CRLF
	JMS READ
CRLF,	0
	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	JMP I CRLF
SP,	240
CR,	215
LF,	212
LOC,	0
C3,	3
SAVE1,	0; 0; 0
C5600,	5600
DASH,	255
FOUT,	7200
FIN,	7400
HERE,	1400
C1200,	1200
C3400,	3400
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
OCTIN,	0
	JMS SAVE
	CLA
	TAD HERE
	DCA TRANS5
	IAC
	DCA TRANS4
	TAD C1200
	DCA DSAD
	JMS READ
	JMP I OCTIN
OCTOUT, 0
	DCA TRANS1
	JMS SAVE
	TAD C3400
	DCA DSAD
	TAD HERE
	DCA TRANS5
	JMS READ
	JMP I OCTOUT
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/
/"L"
/ROUTINE GETS LINK
/AND ALLOWS IT TO BE CHANGED
	*7600
	TAD SP
	JMS TOUT
	TAD BUFAD
	DCA MA
	TAD NTRACK
	DEAL
	CLA CMA
	DCA WC
	TAD LAD
	DMAR
	DFSC
	JMP .-1
	TAD BUFF
	DCA TRANS1
	TAD HERE
	DCA TRANS5
	TAD OCTO
	DCA DSAD
	JMS SAVE
	JMS READ
	TAD SP
	JMS TOUT
	TAD OCTI
	DCA DSAD
	IAC
	DCA TRANS4
	TAD HERE
	DCA TRANS5
	JMS SAVE
	JMS READ
	ISZ TRANS5
	JMP .+2
	JMP OUT	/NO
	TAD TRANS1
	DCA BUFF
	TAD BUFAD
	DCA MA
	CLA CMA
	DCA WC
	TAD LAD
	DMAW
	DFSC
	JMP .-1
OUT,	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	DCA RETURN
	DCA DSAD
	JMS READ
SP,	240
BUFAD,	BUFF-1
LAD,	3702
HERE,	1600
OCTO,	3400
OCTI,	1200
CR,	215
LF,	212
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
BUFF,	0
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/
/
/	"Q"
/OUTPUTS THE MQ
/AND ALLOWS IT TO BE
/CHANGED
	*7600
	TAD SP
	JMS TOUT
	TAD BUFAD
	DCA MA
	TAD NTRACK
	DEAL
	CLA CMA
	DCA WC
	TAD MQAD
	DMAR
	DFSC
	JMP .-1
	TAD BUFF
	DCA TRANS1
	TAD HERE
	DCA TRANS5
	TAD OCTO
	DCA DSAD
	JMS SAVE
	JMS READ
	TAD SP
	JMS TOUT
	TAD OCTI
	DCA DSAD
	IAC
	DCA TRANS4
	TAD HERE
	DCA TRANS5
	JMS SAVE
	JMS READ
	ISZ TRANS5
	JMP .+2
	JMP OUT
	TAD TRANS1
	DCA BUFF
	TAD BUFAD
	DCA MA
	CLA CMA
	DCA WC
	TAD MQAD
	DMAW
	DFSC
	JMP .-1
OUT,	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	DCA DSAD
	JMS READ
SP,	240
BUFAD,	BUFF-1
MQAD,	3701
HERE,	2000
OCTO,	3400
OCTI,	1200
CR,	215
LF,	212
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
BUFF,	0
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/
/
/	"R"
/BINARY LOADER ROUTINE
	*7600
	CAM
	DCA CKSUM1
LDRLP,	JMS READ1
	TAD CHAR
	AND C200
	SZA CLA
	JMP LDRLP
LP1,	JMS CKSUM
	TAD CHAR
	AND C100	/ORIGIN?
	SZA CLA
	JMP ORIGIN
	TAD CHAR
	SHL
	5
	DCA T1
	JMS READ1
	JMS CKSUM
	TAD CHAR
	TAD T1
	DCA T1
	JMS READ1
	TAD CHAR	/TRAILER?
	AND C200
	SZA CLA
	JMP FIN
	TAD T1
	DCA I ADDRS
	TAD ADDRS
	IAC
	DCA ADDRS
	JMP LP1
FIN,	CLA CLL
	TAD T1
	LSR
	5
	DCA CHAR
	SHL
	5
	TAD CHAR
	CIA
	TAD CKSUM1
	CIA
	TAD T1
	SZA CLA
	JMP ERR
FIN1,	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	DCA DSAD
	JMS READ
READ1,	0
	RFC
	RSF
	JMP .-1
	RRB
	DCA CHAR
	JMP I READ1
CHAR,	0
ERR,	TAD QUES
	JMS TOUT
	JMP FIN1
ORIGIN, TAD CHAR
	SHL
	5
	DCA T1
	JMS READ1
	JMS CKSUM
	TAD T1
	TAD CHAR
	DCA ADDRS
	JMP LDRLP
CKSUM,	0
	CLA
	TAD CHAR
	TAD CKSUM1
	DCA CKSUM1
	JMP I CKSUM
CKSUM1, 0
QUES,	277
C200,	200
C100,	100
T1,	0
ADDRS,	0
CR,	215
LF,	212
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
	$
/
/	"S"
/SEARCH ROUTINE
/CALLED BY S,XXXX,YYYY,ZZZZ
/WHERE:
/	XXXX = LOWER LIMIT OF SEARCH
/	YYYY = UPPER LIMIT OF SEARCH
/	ZZZZ = WORD BEING SEARCH FOR
	*7600
	TAD OCTI
	DCA DSAD
	TAD C3
	DCA TRANS4
	TAD HERE
	DCA TRANS5
	JMS READ
	TAD TRANS1
	DCA LLIM
	TAD TRANS2
	DCA ULIM
	TAD TRANS3
	DCA WORD
	JMS CRLF
LP,	TAD I LLIM
	CIA
	TAD WORD
	SNA CLA
	JMP FIND	/WE FOUND ONE
FNDRET, ISZ LLIM	/END OF SEARCH?
	TAD LLIM
	CIA
	TAD ULIM
	SZA CLA
	JMP LP
	DCA DSAD
	JMS READ
FIND,	TAD LLIM	/GET ADDRESS
	JMS OCTO
	TAD I LLIM
	JMS OCTO
	JMS CRLF
	JMP FNDRET
OCTO,	0
	DCA TRANS1
	JMS SAVE
	TAD OCTOT
	DCA DSAD
	TAD HERE
	DCA TRANS5
	JMS READ
	JMP I OCTO
CRLF,	0
	TAD C215
	JMS TOUT
	TAD C212
	JMS TOUT
	JMP I CRLF
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
OCTI,	1200
C3,	3
HERE,	2600
LLIM,	0
ULIM,	0
WORD,	0
OCTOT,	3400
C215,	215
C212,	212
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/	"DC"
/SAME AS THE "C" ROUTINE
/EXCEPT WITH RESPECT TO THE
/DISC.	CALLED BY 
/DCX.YYYY WHERE X IS THE
/TRACK NUMBER AND YYYY IS THE
/LOCATION ON THE TRACK.
/
/
	*7600
ENTER,	TAD C2
	DCA TRANS4
	JMS OCTIN
	TAD TRANS1
	SHL
	5
	DCA TRK
	TAD TRANS2
	DCA LOC
	TAD C212
	JMS TOUT
LP,	TAD C215
	JMS TOUT
	JMP GET
LP1,	TAD LOC
	JMS OCTOUT
	TAD BUFF
	JMS OCTOUT
	CLA IAC
	DCA TRANS4
	JMS OCTIN
	ISZ TRANS5	/VALID INPUT
	JMP PUT	/YES
TEST,	TAD MCR
	TAD TRANS4
	SNA CLA
	JMP OUT
	TAD LOC
	IAC
	SNA
	JMP OUT	/END OF TRACK
	DCA LOC
	JMP LP
MCR,	-215
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
C215,	215
C212,	212
LOC,	0
BUFFAD, BUFF-1
C2,	2
GET,	JMS SET
	DMAR
	DFSC
	JMP .-1
	JMP LP1
PUT,	TAD TRANS1
	DCA BUFF
	JMS SET
	DMAW
	DFSC
	JMP .-1
	JMP TEST
BUFF,	0
SET,	0
	TAD TRK
	DEAL
	CLA CMA
	DCA WC
	TAD BUFFAD
	DCA MA
	TAD LOC
	JMP I SET
OUT,	DCA DSAD
	JMS READ
TRK,	0
HERE,	3000
C1200,	1200
C3400,	3400
OCTIN,	0
	TAD C1200
	JMS GO
	JMP I OCTIN
OCTOUT, 0
	DCA TRANS1
	TAD C3400
	JMS GO
	JMP I OCTOUT
GO,	0
	DCA DSAD
	JMS SAVE
	TAD HERE
	DCA TRANS5
	JMS READ
	JMP I GO
SAVE,	0
	TAD MWRDS
	DCA WC
	TAD BEG
	DCA MA
	DEAL
	TAD HERE
	DMAW
	DFSC
	JMP .-1
	JMP I SAVE
	$
/
/
/"GO"
/CALLED BY "G"XXXX
/COMMAND IS RELEASED TO
/THE PROGRAM AT XXXX
/THE REGISTERS ARE
/INITIALED TO THEIR CURRENT
/CONTENTS
*7600
	CLA IAC
	DCA TRANS4	/ONE BLOCK OF INPUT
	TAD HERE	/SET UP RETURN
	DCA TRANS5
	TAD OCTI	/OCTAL INPUT ADDRESS
	DCA DSAD
	JMS READ	/GO GET XXXX ADDRESS
	TAD M3		/GET THE REGISTERS
	DCA WC
	TAD BUFFAD
	DCA MA
	TAD C3700
	DMAR
	DFSC
	JMP .-1
	TAD BUFF2	/WE NOW SET UP TO EXECUTE
	MQL		/WE LOAD THE MQ
	TAD BUFF3	/AND LINK
	RAR
	CLA CMA		/WE WANT A NON-
	DCA RETURN	/STANDARD RETURN
	TAD SAVAC1	/SET UP RETURN INS
	DCA TRANS2
	TAD GOINS	/SET UP GO INSTRUCTION
	DCA TRANS3
	TAD TR2AD	/SET UP RETURN
	DCA READ
	TAD BUFF1	/SAVE AC
	DCA TRANS5	/AS BUFF1 WILL GET DESTROYED
	DCA DSAD	/GET INTERPRETER
	JMP READ+1
GOINS,	5773	/"JMP I TRANS1"
TR2AD,	7774		/RETURN TO TRANS1
SAVAC1,	TAD TRANS5	/RESTORES AC
BUFFAD,	BUFF1-1
BUFF1,	0
BUFF2,	0
BUFF3,	0
OCTI,	1200
HERE,	3200
C3700,	3700
M3,	-3
$
/
/
/	OCTAL OUTPUT
/ENTER WITH:
/	(TRANS1) = NUMBER TO BE OUTPUT
/	(TRANS5) = RETURN ADDRESS
	*7600
	TAD TRANS5
	DCA DSAD
	CLA CMA
	DCA RETURN
	TAD M4
	DCA COUNT
	TAD TRANS1
	MQL
LP1,	SHL
	2
	TAD C260
	TLS
	TSF
	JMP .-1
	CLA
	ISZ COUNT
	JMP LP1
	TAD C240
	TLS
	TSF
	JMP .-1
	CLA
	JMP READ+1
C260,	260
M4,	-4
C240,	240
COUNT,	0
	$
/	ERROR ROUTINE
/	RETURNS CONTROL TO INTERPRETER
	*7600
	DCA RETURN
	TAD QUES
	JMS TOUT
	TAD CR
	JMS TOUT
	TAD LF
	JMS TOUT
	DCA DSAD
	JMS READ
QUES,	277
LF,	212
CR,	215
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
/THE NEXT LOCATIONS ARE THE 
/DISC LOCATIONS FOR THE STORED REGISTERS
	*7700
AC,	0
MQ,	0
LINK,	0
	$
	/NARBUG ADDITION	AUG. 1,1968
	/"K" WILL CLEAR CORE AND
	/ DEPOSITS A HLT FROM 0-7577
	/THIS ROUTINE WILL ASK REALLY FIRST
	/ ANSWER WITH YES OR NO
*7600
	CLA 
	TAD BUFAD
	DCA AD
	TAD CHARS
	CIA
	DCA CNTR
LP1,	TAD I AD	/PRINT REALLY?
	JMS TOUT
	ISZ AD
	ISZ CNTR
	JMP LP1
	JMS TIN
	TAD MY	/IS IT A "Y"?
	SNA CLA
	JMP EXEC	/YES, EXCUTE
	DCA DSAD	/NO, SO
	JMS READ	/RETURN
EXEC,	TAD M7600
	DCA CNTR
	DCA AD
LP2,	TAD HALT
	DCA I AD
	ISZ AD
	ISZ CNTR
	JMP LP2
	DCA DSAD
	JMS READ
AD,	0
HALT,	7402
CNTR,	0
MY,	-331
BF,	"R
	"E
	"A
	"L
	"L
	"Y
	"?
	" 
TIN,	0
	KSF
	JMP .-1
	KRB
	DCA TMP
	TAD TMP
	JMS TOUT
	TAD TMP
	JMP I TIN
TOUT,	0
	TLS
	TSF
	JMP .-1
	CLA
	JMP I TOUT
TMP,	0
CHARS,	10
M7600,	-7600
BUFAD,	BF
$
