	.TITLE *** AN OCTAL DEBUGGER FOR RSX ***
/
/ 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
/
/
/ EDIT #13      DEC. 31, 1975      M. HEBENSTREIT
/
/ THIS PROGRAM IS AN ODT FOR RSX 
/
/ THE NAME OF THIS TASK IS ARBITRARY.  THERE CAN BE MULTIPLE
/ COPIES OF IT IN CORE SIMULTANEOUSLY, PROVIDED THAT EACH
/ COPY HAS A UNIQUE NAME AND PARTITION, AND EACH ACCESSES
/ DIFFERENT LUNS.  THROUGHOUT THE DESCRIPTION OF THIS TASK
/ IT WILL BE REFERRED TO AS RSXODT.
/
/	THE COMMANDS HONORED BY THIS PROGRAM ARE:
/
/			OPEN A MEMORY LOCATION OR REGISTER
/			START THE PROGRAM TO BE DEBUGGED
/			EXIT AND ABORT THE TASK
/			DEFINE A SYMBOL
/			SET A BREAKPOINT AT SOME LOCATION
/			REMOVE A BREAKPOINT
/			CONTINUE AFTER A BREAKPOINT HAS BEEN REACHED
/			RESTART THE TASK AT SOME LOCATION
/			RELOAD THE TASK KEEPING SYMBOL DEFS AND BRKPTS
/
/			IF THE ASSEMBLY PARAMETER ONEPLS IS DEFINED THE
/			FOLLOWING COMMANDS ARE ALSO HONORED:
/
/			DUMP THE TASK'S PARTITION INTO A CREATED FILE
/			DECODE THE LOCATIONS PRINTED BY OPEN
/			REGISTERS PRINTS THE AC,MQ,LR,XR, AND LINK
/
/	THE SYNTAX OF THESE COMMANDS AND THEIR RESTRICTIONS CAN BE FOUND
/	AT THE BEGINNING OF THE APPROPRIATE SECTION OF CODE.
/
/	TO USE RSXODT TO DEBUG A TASK, INSTALL BOTH THE PROGRAM BEING
/	DEBUGGED AND RSXODT, REASSIGN THE APPROPRIATE LUNS, THEN
/	REQUEST RSXODT FROM EITHER THE MCR OR TDV TERMINAL.
/
/	RSXODT WILL ALWAYS RUN AS AN EXEC MODE TASK IN A PARTITION
/	DISTINCT FROM THAT OF THE TASK TO BE DEBUGGED.
/
/
	.TITLE *** EXPLANATION OF BREAKPOINT HANDLING ***
/
/		WHEN THE 1ST BREAK POINT IS SET, ODT SETS UP A BREAK POINT
/		TRAP TABLE AS FOLLOWS:
/
/			WORD0	XX
/			WORD1	JMS	.+1
/			WORD2	0
/			WORD3	JMP	.
/
/		THIS TABLE IS POSITIONED IN WORDS 0-3 OF THE TASK'S PAR-
/		TITION. ONCE THIS TABLE IS SET UP FOR THE 1ST BREAK POINT
/		THE PROCESS OF SETTING BREAK POINTS PROCEEDS AS FOLLOWS.
/		THE ADDRESS OF THE BREAKPOINT IS SAVED IN THE BREAKPOINT
/		ADDRESS TABLE. (THE ADDRESSES ARE RELATIVE TO THE PARTITIONS BASE.)
/		THE CONTENTS OF THE BREAK POINT LOCATION IS SAVED IN THE 
/		BREAK POINT INSTRUCTION TABLE. THEN THE CONTENTS OF THE
/		BREAK POINT IS CHANGED TO AN XCT* X17 INSTRUCTION.
/		FINALLY X17 IS SET TO POINT TO WORD0 OF THE BREAK POINT
/		TRAP TABLE. WHEN THE TASK REACHES THE BREAK POINT IT EXECUTES
/		THE JMS .+1 INSTRUCTION IN THE BREAK POINT TRAP TABLE.
/		SINCE THE XCT* X17 INSTRUCTION DOES NOT CHANGE THE PC,
/		THE ADDRESS OF THE BREAK POINT CAN BE DETERMINED FROM THE
/		SUBROUTINE HEADER WORD IN THE BREAK POINT TRAP TABLE.
/		THE TASK THEN HANGS IN AN INFINITE LOOP AT THE JMP .
/		INSTRUCTION IN THE BREAK POINT TRAP TABLE. THE MONITOR
/		ROUTINE IN ODT CHECKS PERIODICALLY TO SEE IF THE TASK HAS
/		GOTTEN A CHANCE TO RUN AND IF IT IS HUNG UP AT THE JMP .
/		INSTRUCTION. IF BOTH THESE CONDITIONS ARE MET THEN THE
/		MONITOR ROUTINE SETS THE TASK'S STATUS TO 6 SO LOW
/		PRIORITY TASKS WILL GET A CHANCE TO RUN. THEN ODT
/		INFORMS THE USER THAT THE TASK IS AT SOME SPECIFIED BREAK
/		POINT. IF BOTH CONDITIONS ARE NOT MET, ODT ASSUMES THE TASK
/		IS STILL RUNNING AND CONTINUES TO PERIODICALLY CHECK ON
/		THE STATUS OF THE TASK.IF, AFTER A BREAK POINT IS REACHED,
/		THE USER INDICATES THAT THE TASK SHOULD CONTINUE, ODT PROCEEDS
/		AS FOLLOWS. THE FORMER CONTENTS OF THE LOCATION OF THE
/		BREAK POINT IS ENTERED INTO WORD0 OF THE BREAK POINT TRAP
/		TABLE. THEN WORD 17 (X17) OF THE PARTITION IS SET TO POINT
/		TO LOCATION WORD0-1. THE RESTART ADDRESS IN THE TASK'S PBDL
/		NODE  IS SET SO THE NEXT INSTRUCTION THE TASK WILL EXECUTE
/		IS THE XCT* X17 INSTRUCTION AT THE BREAK POINT LOCATION.
/		FINALLY ODT CHANGES THE TASK'S STATUS FORM 6 TO 5. AT THIS
/		TIME THE TASK CAN CONTINUE AS FOLLOWS. WHEN ITS REGISTERS
/		ARE RESTORED, THE TASK EXECUTES THE XCT* X17 INSTRUCTION
/		CAUSING THE INITIAL CONTENTS OF THE BREAK POINT LOCATION
/		TO BE EXECUTED. AFTERWARDS THE TASK CAN PROCEED NORMAL-
/		LY UNTIL ANOTHER BREAK POINT IS REACHED OR THE TASK EXITS.
/		
/		THE FOLLOWING RESTRICITONS APPLY TO TASKS TO BE DEBUGGED
/		WITH THIS ODT:
/
/		1.) NO TASK CAN MODIFY THE CONTENTS OF VIRTUAL LOC. 17
/		2.) NO TASK CAN MODIFY THE CODE AT A BREAK POINT
/		3.) NO TASK CAN MODIFY VIRTUAL LOCS. 0-3
/		4.) NO TASK CAN HAVE OVERLAYS
/		5.) A BREAK POINT CANNOT BE SET ON AN XCT INSTRUCTION
/		6.) ONLY NORMAL MODE TASKS CAN BE DEBUGGED WITH THIS PROGRAM
/
/		NOTE: BECAUSE THE AUTOINCREMENT REGISTERS FOR NORMAL MODE
/		TASKS ARE LOCATED IN WORDS 10-17 OF THE TASK'S PARTITION,
/		THESE REGISTERS ARE NEVER DESTROYED WHEN THE TASK ISSUES
/		A CAL. HENCE, RSXODT CAN USE X17 FOR BREAKPOINT HANDLING.
/		THIS IS NOT TRUE FOR EXEC MODE TASKS!
/
	.TITLE *** ODT CONSTANTS AND IOT'S ***
/
/ *** ODT CONSTANTS AND IOTS
/
	.IFUND ONEPLS
NO.CMD=11		/NUMBER OF COMMANDS HONORED
	.ENDC
	.IFDEF ONEPLS
NO.CMD=14
	.ENDC
	.IFUND SYMSIZ
SYMSIZ=20		/SYMBOL TABLE SIZE
	.ENDC
	.IFUND BRKSIZ
BRKSIZ=10		/BREAK POINT TABLE SIZE
	.ENDC
REGSIZ=14
	.IFUND LUN
	.DEC
LUN=40			/ODT I/0 LUN
	.OCT
	.ENDC
	.IFUND FILLUN
	.DEC
FILLUN=41		/ODT CREATED FILE LUN (MUST BE A DISK)
	.OCT
	.ENDC
	.IFUND	TIME
TIME=10			/NUMBER OF TIMES MONITOR ROUTINE SHOULD MARK TIME
			/BEFORE ASKING IF THE TASK SHOULD BE ABORTED.
			/EACH MARK TIME REQUEST SUSPENDS RSXODT FOR 1 SEC.
	.ENDC
ATL=244			/LISTHEAD FOR THE ATL
STL=242			/LISTHEAD FOR THE STL
SNAM=123		/ADDRESS OF FIND A NAME REENTRANT SUBROUTINE
R1=101			/REENTRANT REGISTER 1
R2=102			/REENTRANT REGISTER 2
CURTSK=135		/POINTER TO ATL NODE OF CURRENT TASK
X10=10			/AUTOINCREMENT REGISTER 10
X11=11			/AUTOINCREMENT REGISTER 11
X12=12			/AUTOINCREMENT REGISTER 12
.INH=705522		/INHIBIT INTERRUPTS IOT
.ENB=705521		/ENABLE INTERRUPTS IOT
IDX=ISZ			/USED IF INTENT IS TO INCREMENT BUT NOT TO SKP
	.TITLE *** ODT INITIALIZATION ***
/
/ *** ODT INITIALIZATION
/
/
/ GET THE XR ADJUSTMENT FACTOR
/
BEGIN	LAC	(BEGIN		/GET THIS ADDRESS
	AND	(70000		/SAVE ONLY THE HIGH BITS
	TCA			/NEGATE
	DAC	XRADJ		/STORE THE XR ADJUSTMENT FACTOR
/
/ GET THE NAME OF THIS TASK
/
	CAL	TSKNAM		/ISSUE THE TASK NAME DIRECTIVE
	LAC	(14		/CONVERT THE TSKNAM DIRECTIVE'S CPB
	DAC	REQODT		/INTO A SYNC CPB FOR THIS TASK
/
/ PRINT THE ODT HEADER
/
LOCB	JMS	ATTACH		/ATTACH THE OUTPUT DEVICE
	LAC	(MSGBL		/PRINT A BLANK LINE
	JMS	PRINT
	LAC	(MSGBL		/PRINT A BLANK LINE
	JMS	PRINT
	LAC	(MSGHDR		/PRINT THE HEADER
	JMS	PRINT
	LAC	(MSGBL		/PRINT A BLANK LINE
	JMS	PRINT
/
/ GET THE TASK NAME
/
	LAC	(MSGNAM		/PRINT THE QUESTION ASKING FOR TASK NAME
	JMS	PRINT
	JMS	READ		/READ A LINE
	JMS	IFAC		/INIT. FAC VARIABLES
	INBUFF			/BUFFER ADDRESS
	CLA			/CLEAR AC TO DENOTE NO CHAR IS IN IT
	JMS	GETNAM		/GET THE TASK NAME
	NAME1			/TASK NAME BUFFER
	JMP	ERRNAM		/RETURN HERE ON ERROR
	JMS	CR		/RETURN HERE IF OK -- CHECK THE LINE TERM.
	JMP	ERRNAM		/RETURN HERE IF IT'S NOT A TERM. -- ERROR
/
/ FIX THE TASK IN CORE
/
LOCA	JMS	DETACH		/REURN HERE IF OK -- DETACH THE I/O DEVICE
	LAC	(ATL		/SET UP TO SCAN ATL FOR ODT
	DAC*	(R1		/SET R1 TO ATL LISTHEAD
	LAC	(REQODT+2
	DAC*	(R2		/SET R2 TO POINT AT RSXODT'S NAME
	JMS*	(SNAM		/SCAN THE ATL
	JMP	ERREX		/RETURN HERE IF NOT FOUND -- IMPOSSIBLE
	JMS	SETXR		/RETURN HERE IF FOUND -- SET UP TO ACCESS ODT'S ATL NODE
	LAC	4,X		/GET ODT'S PRIORITY
	IAC			/SET UP TO REQUEST TASK AT PRIO PLUS 1
	DAC	PRIOR		/SAVE PRIORITY IN REQUEST CPB
	LAC	NAME1		/SET UP THE REQUIRED CPB'S - GET TASK NAME
	DAC	UNFIX+2		/SAVE 1ST 1/2 OF TASK NAME IN UNFIX CPB
	DAC	REQTSK+2	/SAVE THIS IN REQUEST CPB
	.IFDEF ONEPLS
	DAC	CRECTA+0	/SAVE 1ST 1/2 OF NAME IN CREATE CONTROL TABLE
	DAC	DELETE+3	/AND IN DELETE CPB
	.ENDC
	LAC	NAME2		/GET 2ND 1/2 OF TASK NAME
	DAC	UNFIX+3		/SAVE THIS IN UNFIX CPB
	DAC	REQTSK+3	/AND IN REQUEST CPB
	.IFDEF ONEPLS
	DAC	CRECTA+1	/SAVE 2ND 1/2 OF NAME IN CREATE CONTROL TABLE
	DAC	DELETE+4	/AND IN DELETE CPB
	.ENDC
	CAL	FIX		/FIX THE TASK
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/WHERE THERE ANY ERRORS?
	SPA
	JMP	ERRFIX		/YES
/
/ INITIALIZE VARIOUS DATA ITEMS FOR THIS TASK
/
	LAC	(STL		/NO -- SET UP TO SCAN STL FOR THIS TASK
	DAC*	(R1		/SET R1 TO STL LISTHEAD
	LAC	(NAME1
	DAC*	(R2		/SET R2 TO POINT AT TASK NAME
	JMS*	(SNAM		/SCAN THE STL
	JMP	ERRSYS		/RETURN HERE IF TASK NOT IN STL -- SYSTEM ERROR!
	JMS	SETXR		/RETURN HERE IF IN STL -- PREPARE TO ACCESS STL NODE
	LAC	11,X		/GET THE START ADDR AND FLAGS
	AND	(100000		/AND OFF EVERYTHING BUT THE NRM/EXM FLAG
	SNA			/IS THE TASK NORMAL MODE?
	JMP	ERREXM		/NO -- ERROR
	LAC	5,X		/YES -- GET THE PBDL NODE ADDR.
	DAC	PBADR		/SAVE IT
	JMS	SETXR		/PREPARE TO ACCESS PBDL NODE
	LAC	4,X		/GET BASE OF PARTITION
	DAC	PBASE		/SAVE IT
	.TITLE *** ODT COMMAND DISPATCH ROUTINE ***
/
/ *** GET AND DISPATCH A COMMAND
/
LOC0	JMS	ATTACH		/ATTACH THE I/O DEVICE
	DZM	CMD		/ZERO THE COMMAND WORDS
	DZM	CMD+1
	LAC	(MSGBL
	JMS	PRINT
	LAC	(MSGQUE		/PRINT THE COMMAND PROMPTER
	JMS	PRINT
	JMS	READ		/READ A LINE
	JMS	IFAC		/INIT. FAC VARIABLES
	INBUFF			/BUFFER ADDRESS
	CLA			/CLEAR AC TO DENOTE NO CHAR THERE
	JMS	GETNAM		/STORE THE COMMAND
	CMD			/COMMAND BUFFER
	JMP	ERRCMD		/RETURN HERE ON ERROR
LOC5	SAD	(40		/RETURN HERE IF OK -- IS BREAK CHAR A SPACE?
	JMP	LOC4		/YES
	SAD	(15		/NO -- A CR?
	JMP	LOC4		/YES
	SAD	(175		/NO -- ALTMODE?
	JMP	LOC4		/YES
	JMS	FAC57		/NO -- READ ANOTHER CHAR 
	JMP	LOC5		/GO SEE IF IT'S A BREAK CHAR
LOC4	DAC	TERM		/YES -- SAVE THE COMMAND TERMINATOR
	LAC	(CMDTBL-1	/SET UP TO SCAN LEGAL COMMAND TABLE
	DAC*	(X10		/INIT. X10 TO POINT TO COMMAND TABLE
	LAW	-NO.CMD		/SET UP A COMMAND COUNTER (-# CMD'S)
	DAC	TEMP		/SAVE COUNTER IN TEMP
	LAC	CMD		/GET THE SIXBT REP. FOR THIS COMMAND
LOC1	SAD*	X10		/DOES THE COMMAND MATCH TABLE ENTRY?
	JMP	LOC2		/YES -- PREPARE TO DISPATCH
	ISZ	TEMP		/NO -- ARE WE AT THE END OF THE TABLE?
	JMP	LOC1		/NO -- GO CONSIDER NEXT TABLE ENTRY
	JMP	ERRCMD		/YES -- ERROR - ILLEGAL COMMAND
/
/ *** COMMAND TRANSFER ROUTINE
/
LOC2	LAC	TEMP		/GET COMMAND COUNT INTO AC (<0)
	AAC	NO.CMD+1	/ADD DISPATCH TABLE OFFSET (# CMD'S +1)
	TAD	(JMP	LOC3	/ADD "JMP LOC3" INSTRUCTION
	DAC	LOC3		/SAVE RESULT IN NEXT LOCATION
LOC3	XX			/THIS INSTRUCTION IS MODIFIED TO JMP .+N
/
/ COMMAND DISPATCH VECTOR
/
	JMP	START
	JMP	OPEN
	JMP	SET
	JMP	CONTIN
	JMP	REMOVE
	JMP	DEFINE
	JMP	EXIT
	JMP	RESTAR
	JMP	RELOAD
	.IFDEF ONEPLS
	JMP	DUMP
	JMP	DECODE
	JMP	REGIST
	.ENDC
	.TITLE *** ODT START COMMAND ***
/
/ START COMMAND -- FORMAT: >STA(RT)
/
/			THIS COMMAND CAN BE USED ONLY IF THE TASK
/			HAS NOT ALREADY BEEN STARTED.
/
START	LAC	STFLAG		/HAS THE TASK ALREADY BEEN STARTED?
	SZA
	JMP	ERRST		/YES -- ERROR
	CLA!IAC			/NO -- SET THE 'STARTED' FLAG
	DAC	STFLAG
	CAL	REQTSK		/REQUEST THE TASK
	CAL	WAIT		/WAIT FOR THE 'REQUEST' DIRECTIVE
	LAC	EV		/PICK UP EV
	SPA			/WHERE THERE ANY ERRORS?
	JMP	ERRREQ		/YES
	JMS	DETACH		/NO -- DETACH THE DEVICE
	JMP	MONITOR		/GO MONITOR THE TASK'S PROGRESS
	.TITLE *** ODT DEFINE A SYMBOLIC ADDRESS COMMAND ***
/
/ DEFINE COMMAND -- FORMAT: >DEF(INE) XXX=NNNNNN
/
/			WHERE XXX IS A 1-3 CHARACTER SYMBOL AND
/			NNNNNN IS ANY OCTAL NUMBER. AFTER THE
/			FIRST THREE CHARACTERS OF A SYMBOL THE
/			SUBSEQUENT CHARACTERS ARE IGNORED.
/
/			NOTE: UNLIKE OTHER COMMANDS NNNNNN CANNOT BE A SYMBOL
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
DEFINE	CLA			/CLEAR AC TO DENOTE THERE'S NO CHAR THERE
	JMS	GETNAM		/GET THE SYMBOL
	SYMBOL			/SYMBOL BUFFER ADDRESS
	JMP	ERRNUM		/RETURN HERE ON ERROR
DEF2	SAD	(75		/RETURN HERE IF OK -- IS BREAK CHAR AN = ?
	SKP
	JMP	ERRNUM		/NO -- ERROR
	CLA			/YES -- CLEAR AC TO DENOTE NO CHAR THERE
	JMS	GETNUM		/GET THE VALUE
	JMP	ERRNUM		/RETURN HERE ON AN ERROR
	DAC	TEMP		/RETURN HERE IF OK -- SAVE NUMBER
	LACQ			/CHECK THE LINE TERM -- RETRIEVE FROM MQ
	JMS	CR		/GO CHECK IT
	JMP	ERRNUM		/IT'S NOT A CR OR ALT -- ERROR
	LAW	-SYMSIZ		/CHAR IS TERM -- SCAN THE SYMBOL TABLE FOR THIS SYMBOL
	DAC	TEMP1		/SET TEMP1 TO BE COUNTER OF SYMBOL TAB ENTRIES
	LAC	(SYMTAB-1	/SET UP X10 TO POINT TO SYMBOL TAB
	DAC*	(X10
	LAC	SYMBOL		/GET THE SYMBOL NAME INTO AC
DEF3	SAD*	X10		/DOES THIS SYMBOL MATCH THE ONE ALREADY IN TAB.?
	JMP	DEF4		/YES
	ISZ	TEMP1		/NO -- END OF TABLE?
	JMP	DEF3		/NO -- LOOK AT NEXT TABLE ENTRY
	JMP	DEF1		/YES -- PREPARE TO ENTER A NEW SYMBOL
/
/ THE NAME OF THIS SYMBOL IS ALREADY IN THE TABLE. REPLACE IT'S OLD VALUE
/
DEF4	LAC*	(X10		/SET A NEW VALUE IN TABLE FOR SYMBOL
	TAD	(SYMSIZ-1	/MAKE X10 POINT TO VALUE TABLE
	DAC*	(X10
	LAC	TEMP		/GET THE NEW VALUE
	DAC*	X10		/SAVE IT IN THE VALUE TABLE
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMP	LOC0		/GO PROCESS A NEW COMMAND
/
/ ENTER A NEW SYMBOL AND VALUE INTO THE TABLES
/
DEF1	ISZ	SYMCNT		/IS THERE ANY MORE ROOM IN SYMBOL TABLE?
	SKP			/YES
	JMP	ERRTAB		/NO -- ERROR
	LAC	TEMP		/SET VALUE INTO VALUE TABLE
	DAC*	VALPTR		/STORE VALUE IN VALUE TABLE
	IDX	VALPTR		/INCREMENT POINTER TO VALUE TABLE
	LAC	SYMBOL		/GET THE SYMBOL NAME
	DAC*	SYMPTR		/STORE IT IN THE SYMBOL TABLE
	IDX	SYMPTR		/INCREMENT POINTER TO SYMBOL TABLE
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMP	LOC0		/GO PROCESS A NEW COMMAND
	.TITLE *** ODT RESTART COMMAND ***
/
/ RESTART COMMAND -- FORMAT: >RES(TAR) NNNNNN
/
/			WHERE NNNNNN IS AN ADDRESS RELATIVE TO THE
/			BASE OF THE TASK'S PARTITION PLUS 20 OCTAL.
/
/			NOTE: NNNNNN COULD BE A SYMBOL 
/
/			THIS COMMAND IS LEGAL ONLY IF THE TASK IS AT A BRKPT
/
RESTAR	LAC	BRKPT		/IS THE TASK AT A BRKPT?
	SNA
	JMP	ERRCON		/NO -- ERROR
	CLA			/YES -- CLEAR AC TO DENOTE NO CHAR THERE
	JMS	GETNUM		/GO GET THE RESTART ADDR
	JMS	GETSYM		/RETURN HERE ON ERROR -- MAYBE SYMBOL
	AAC	20		/RETURN HERE IF OK -- ADD 20
	DAC	TEMP		/SAVE THE ADDRESS
	LACQ			/GET THE LINE TERM FROM MQ
	JMS	CR		/GO CHECK THAT IT'S A CR OR ALT.
	JMP	ERRNUM		/RETURN HERE ON ERROR
	JMS	ADRCHK		/RETURN HERE IF OK -- CHECK THE ADDRESS
	LAC	PBASE		/RESET X17 SO NEXT BREAKPOINT WILL WORK OK
	JMS	SETXR		/SET UP XR TO ACCESS PART. BASE
	CLA			/ZERO X17
	DAC	17,X
	JMP	CONT3		/GO ENTER RESTART ADDRESS INTO PBDL
				/AND SET UP TASK STATUS SO TASK CAN RUN
	.TITLE *** ODT RELOAD COMMAND ***
/
/ RELOAD COMMAND -- FORMAT: >REL(OAD)
/
/			THIS COMMAND WILL CAUSE THE TASK TO BE ABORTED
/			AND SUBSEQUENTLY RELOADED WITH BREAKPOINTS.
/			SYMBOL DEFINITIONS WILL BE RETAINED.
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
RELOAD	DZM	STFLAG		/CLEAR THE START FLAG
	DZM	RBPFLG		/CLEAR THE REMOVED BRKPT FLAG
	DZM	BRKPT		/CLEAR THE BREAKPOINT FLAG
	CAL	UNFIX		/UNFIX THE TASK
	CAL	WAIT		/WAIT FOR COMPLETION
	JMS	ATLSCN		/SCAN ATL FOR THE TASK
	JMP	REL3		/RETURN HERE IF NOT FOUND
	JMS	SETXR		/RETURN HERE IF FOUND -- SET UP XR
	LAC	(4		/SET TASK TO STATUS 4
	DAC	7,X
	LAC	(300		/SET RESTART TO 300
	DAC	10,X
/
/ WAIT FOR THE TASK TO ABORT
/
REL2	.ENB			/ENABLE INTERRUPTS
	CAL	MARK		/MARK TIME TO ALLOW TASK TO ABORT
	CAL	WAIT		/WAIT FOR COMPLETION
	JMS	ATLSCN		/SCAN THE ATL TO BE SURE TASK ABORTED
	SKP			/RETURN HERE IF NOT FOUND -- GOOD
	JMP	REL2		/RETURN HERE IF FOUND -- NOT SO GOOD
/
/ RE-INITIALIZE THE TASK COMPLETE WITH BREAK POINTS
/
REL3	.ENB			/ENABLE INTERRUPTS
	CAL	FIX		/FIX THE TASK
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/WERE THERE ANY ERRORS?
	SPA
	JMP	ERRFIX		/YES
				/THE FIX DIRECTIVE HAS PUT THE TASK INTO
				/STATUS 2 AND SET THE FIX BITS BUT AS YET
				/THE TASK HAS NOT BEEN LOADED INTO ITS PART.
				/THE TASK WILL NOT BE LOADED UNTIL HIGHER
				/PRIORITY TASKS RELINQUISH CONTROL. AS SOON
				/AS PROPER THE TASK WILL LOAD INTO CORE AND
				/THEN IT WILL EXIT VIA AN ABORT SEQUENCE.
				/THIS IS THE STANDARD WAY TASKS GET FIXED.
				/HENCE RSXODT MUST WAIT FOR THE TASK TO EXIT
				/FROM THE FIX-ABORT SEQUENCE, I.E. RSXODT
				/MUST WAIT UNTIL THE ATL NODE FOR THE TASK
				/GETS REMOVED FROM THE ATL.
REL8	JMS	ATLSCN		/SCAN THE ATL FOR THE TASK
	JMP	REL9		/RETURN HERE IF NOT FOUND -- GOOD
	.ENB			/RETURN HERE IF FOUND -- NOT SO GOOD
	CAL	MARK		/MARK TIME TO ALLOW TASK TO ABORT
	CAL	WAIT		/WAIT FOR COMPLETION
	JMP	REL8		/GO SCAN THE ATL -- MAYBE THE TASK HAS ABORTED
REL9	.ENB			/ENABLE INTERRUPTS AND PROCEED
/
/ SET UP THE BREAKPOINT TRAP TABLE
/
	LAC	PBASE		/SET UP BREAKPOINT TRAP TABLE
	AAC	-1
	DAC*	(X10		/USE X10 AS A POINTER TO BASE OF PART
	LAC	(740040		/0: XX
	DAC*	X10
	LAC	(100002		/1: JMS 2
	DAC*	X10
	DZM*	X10		/2: 0
	LAC	(600003		/3: JMP .
	DAC*	X10
	CLA!IAC			/SET THE BRKPT SET FLAG
	DAC	SETFLG
	LAW	-BRKSIZ		/USE TEMP1 AS A COUNTER FOR BRKPT
	DAC	TEMP1		/TABLE ENTRIES
	LAC	(BRKTAB-1	/USE X10 AS A POINTER TO BRKPT ADDR TAB
	DAC*	(X10
	AAC	BRKSIZ		/USE X11 AS A POINTER TO BRKPT INST TAB
	DAC*	(X11
/
/ TRY TO RESET THE BREAK POINTS, IF A BRKPT IS SET ON AN XQT INST
/ THEN IGNORE THE BRKPT AND ZERO TABLE ENTRIES.
/
REL4	LAC*	X10		/GET A BRKPT ADDR
	SNA			/IS IT ZERO?
	JMP	REL5		/YES -- IGNORE THIS TABLE ENTRY
	TAD	PBASE		/NO -- PREPARE TO CHANGE INSTRUCTIONS
	JMS	SETXR		/SET UP XR TO ACCESS BRKPT LOC.
	LAC	0,X		/GET THE INST AT THE BRKPT
	DAC*	X11		/SAVE IN THE BRKPT INST TABLE
	AND	(740000		/IS INST AN XQT?
	SAD	(400000
	JMP	REL6		/YES -- PREPARE TO IGNORE THE POINT
	LAC	(420017		/NO -- REPLACE INST WITH XQT* X17
	DAC	0,X		/REPLACE IT
	JMP	REL7		/GO TEST FOR END OF TABLE
/
/ THE TABLE ENTRY IS ZERO SO INCREMENT X11 AND GO TEST FOR END OF TABLE
/
REL5	IDX*	(X11		/INCR. X11 SO IT CORRESPONDS TO X10
	JMP	REL7		/GO TEST FOR END OF TABLE
/
/ THE INST AT THE BRKPT IS AN XQT SO UNSET THIS BREAKPOINT
/
REL6	LAC*	(X10		/DECREMENT X10 SO ENTRY CAN BE ZEROED
	AAC	-1
	DAC*	(X10
	DZM*	X10		/ZERO THE TABLE ENTRY
/
/ TEST FOR END OF TABLE
/
REL7	ISZ	TEMP1		/DONE WITH TABLE?
	JMP	REL4		/NO -- GO LOOK AT NEXT ENTRY
				/YES -- END OF TABLE
/
/ SET UP X17 TO IT POINTS TO WORD0 OF THE BRKPT TRAP TABLE (X17=0)
/
	LAC	PBASE		/PREPARE TO ACCESS PARTITION'S BASE
	JMS	SETXR		/SET UP THE XR
	CLA			/PREPARE TO ZERO X17
	DAC	17,X		/ZERO IT
	JMS	DETACH		/DETACH THE OUTPUT DEVICE
	JMP	LOC0		/GO GET ANOTHER COMMAND
	.TITLE *** ODT EXIT COMMAND ***
/
/ EXIT COMMAND -- FORMAT: >EXI(T)
/
/			IF THE LINE TERMINATOR IS A CARRIAGE RETURN
/			ODT WILL BE RE-REQUESTED, BUT IF THE TERMINATOR
/			IS AN ALTMODE ODT WILL SIMPLY EXIT.
/
/			NOTE: THE EXIT COMMAND WILL CAUSE THE TASK TO ABORT
/
/			THIS COMMAND IS LEGAL ANYTIME
/
EXIT	JMS	DETACH		/DETACH THE OUTPUT DEVICE
/
/ ABORT THE TASK
/
EXIT3	JMS	ATLSCN		/SCAN THE ATL FOR THE TASK
	JMP	EXIT2		/RETURN HERE IF TASK NOT IN ATL
	JMS	SETXR		/RETURN HERE IF FOUND -- SET UP XR
	LAC	(4		/SET STATUS TO 4 SO TASK CAN BE ABORTED
	DAC	7,X
	LAC	(300		/SET THE RESTART ADDRESS TO 300
	DAC	10,X
/ 
/ UNFIX THE TASK FROM IT'S PARTITION
/
EXIT2	.ENB			/ENABLE INTERRUPTS
	CAL	UNFIX		/UNFIX THE TASK
	CAL	WAIT		/WAIT FOR COMPETION
	LAC	TERM		/EXIT ACCORDING TO TERMINATOR
/
/ EXIT ACCORDING TO TERMINATOR
/
EXIT1	SAD	(15		/IS IT A CR?
	JMP	EXITCR		/YES
	SAD	(175		/NO -- ALTMODE?
	JMP	EXITAL		/YES
	JMS	FAC57		/NO -- GET NEXT CHAR AND 
	JMP	EXIT1		/GO CHECK IT
EXITCR	CAL	REQODT		/RE-REQUEST RSXODT
EXITAL	LAC	(MSGBL		/PRINT A BLANK LINE
	JMS	PRINT
	CAL	(10		/EXIT
	.TITLE *** ODT SET A BREAKPOINT COMMAND ***
/
/ SET COMMAND -- FORMAT: >SET NNNNNN
/
/			WHERE NNNNNN IS AN ADDRESS RELATIVE TO THE
/			BASE OF THE TASK'S PARTITION.
/
/			NOTE: NNNNNN COULD BE A SYMBOL 
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
SET	CLA			/CLEAR AC TO DENOTE NO CHAR. IS THERE
	JMS	GETNUM		/GET THE BREAK POINT LOCATION
	JMS	GETSYM		/RETURN HERE IF ERROR -- MAYBE SYMBOL 
	AAC	20		/RETURN HER IF OK (AC=VALUE) -- ADD 20
	DAC	TEMP		/SAVE IT
	LACQ			/CHECK THE LINE TERM - PUT TERM IN AC
	JMS	CR		/GO CHECK IT
	JMP	ERRNUM		/TERM ISN'T CR OR ALT -- ERROR
	JMS	ADRCHK		/TERM IS OK -- GO CHECK THE ADDRESS
	LAC	SETFLG		/RETURN HERE IF OK
	SZA			/HAS A BREAK POINT BEEN SET?
	JMP	SET1		/YES
/
/ CONTRUCT THE BREAK POINT TRAP TABLE
/
	LAC	PBASE		/NO -- SET UP A TRAP TABLE
	AAC	-1
	DAC*	(X10
	LAC	(740040		/0: XX
	DAC*	X10
	LAC	(100002		/1: JMS 2
	DAC*	X10
	DZM*	X10		/2: 0
	LAC	(600003		/3: JMP 3
	DAC*	X10
/
/ TRY TO ENTER THE BREAKPOINT IN THE TABLE
/
SET1	CLA!IAC			/SET THE SET BREAK POINT FLAG
	DAC	SETFLG
	LAW	-BRKSIZ		/IS THIS BREAK PT IN TABLE ALREADY?
	DAC	TEMP1		/USE TEMP1 AS A COUNTER OF BRKPT TAB ENTRIES
	LAC	(BRKTAB-1	/USE X10 AS A POINTER TO TABLE
	DAC*	(X10
	LAC	TEMP		/GET THE ADDRESS SPECIFIED
SET5	SAD*	X10		/DOES ADDR MATCH ONE IN TABLE?
	JMP	ERRBRK		/YES -- ERROR
	ISZ	TEMP1		/NO -- DONE WITH TABLE?
	JMP	SET5		/NO -- LOOK AT NEXT ENTRY
	LAC	(BRKTAB-1	/YES -- SCAN TABLE FOR FREE ENTRY
	DAC*	(X10		/USE X10 AS POINTER TO TABLE
	LAW	-BRKSIZ		/SET UP TEMP1 AS A COUNTER
	DAC	TEMP1		/OF TABLE ENTRIES
SET6	LAC*	X10		/GET NEXT TABLE ENTRY
	SNA			/IS IT ZERO?
	JMP	SET2		/YES -- A FREE ENTRY HAS BEEN FOUND
	ISZ	TEMP1		/NO -- DONE WITH TABLE?
	JMP	SET6		/NO -- GO LOOK AT NEXT ENTRY
	JMP	ERRTAB		/YES -- CAN'T FIND FREE ENTRY -- ERROR
/
/ ENTER THE BREAKPOINT
/
SET2	LAC*	(X10		/WE'VE FOUND A SPOT IN THE TABLE
	AAC	-1		/SET UP X10 AND X11 TO ACCESS
	DAC*	(X10		/FREE TABLE ENTRIES
	AAC	BRKSIZ
	DAC*	(X11
	LAC	TEMP		/STORE THE ADDR IN BRKTAB
	DAC*	X10
SET7	LAC	PBASE		/STORE THE CONTENTS OF ADDR IN INSTAB
	TAD	TEMP
SET8	JMS	SETXR		/SET UP TO ACCESS INSTRUCTION
	LAC	0,X		/PICK UP THE INST. AT THE BREAK
	DAC*	X11		/SAVE IT IN THE TABLE
	AND	(740000		/IS INSTRUCTION AN XCT?
	SAD	(400000
	JMP	SETERR		/YES -- PREPARE TO DECLARE AN ERROR
	LAC	(420017		/NO -- REPLACE THE INST. WITH XCT*  X17
	DAC	0,X
	LAC	PBASE		/PREPARE TO ACCESS PARTITION BASE ADDR
	JMS	SETXR
	CLA			/MAKE X17 POINT TO 0
SET4	DAC	17,X
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
/
/ THE BREAK POINT HAS BEEN SET ON AN XQT INSTRUCTION. THIS IS ILLEGAL SO
/ UNSET THE BREAK POINT AND DECLARE AN ERROR
/
SETERR	LAC*	(X10		/PREPARE TO ZERO THE TABLE ENTRY JUST MADE
	AAC	-1
	DAC*	(X10		/X10 IS NOW RESET SO THE ENTRY CAN BE ZEROED
	DZM*	X10		/ZERO THE ENTRY
	JMP	ERRXQT		/DECLARE ERROR -- BRKPT CAN'T BE SET ON XQT
	.TITLE *** ODT CONTINUE AFTER A BREAKPOINT COMMAND ***
/
/ CONTINUE COMMAND -- FORMAT: >CON(T)
/
/			THIS COMMAND IS LEGAL ONLY IF THE TASK IS AT A BREAK PT.
/
CONTIN	LAC	BRKPT		/ARE WE AT A BREAK?
	SNA
	JMP	ERRCON		/NO -- ERROR
	DAC	TEMP		/YES -- SAVE THE BRK PT ADDRESS
	LAC	RBPFLG		/HAVE WE REMOVED THE BREAK ?
	SZA
	JMP	CONT4		/YES -- THEN JUST SET TASK STATUS TO 5
	LAC	PBASE		/NO -- PREPARE TO ACCESS TRAP TABLE
	JMS	SETXR		/SET UP THE XR
CONT2	JMS	SEARCH		/SEARCH BRK PT TABLE FOR BRK LOCATION
	JMP	ERRSEA		/RETURN HERE IF NOT FOUND
	LAC*	X11		/GET THE INST. FROM THE INST. TABLE
	DAC	0,X		/PUT IT INTO TRAP TABLE
	LAW	-1		/SET UP X17 TO POINT TO WORD0-1
	DAC	17,X
/
/ SET UP TASKS RESTART ADDRESS AND PREPARE TO RESUME TASK
/ (RESTART ROUTINE ENTERS HERE ALSO)
/
CONT3	LAC	PBADR		/SET XR UP TO ACCESS PBDL NODE
	JMS	SETXR		/SET UP THE XR
	LAC	14,X		/GET THE MODE BITS INTO MQ
	AND	(700000		/AND OFF THE START ADDR
	LMQ			/SAVE RESULT IN MQ (FLAG BITS)
	LAC	TEMP		/GET. THE RESTART ADDR (ADDR OF XCT* X17)
	OMQ			/OR THE MODE BITS AND RESTART ADDR
	DAC	14,X		/SET UP THE RESTART ADDR
/
/ CHANGE THE TASK'S STATUS FROM 6 TO 5
/
CONT4	JMS	ATLSCN		/SCAN THE ATL FOR THE TASK
	JMP	CONERR		/RETURN HERE IF NOT FOUND
	JMS	SETXR		/RETURN HERE IF FOUND -- SET UP XR
	LAC	(5		/SET THE TASK'S STATUS BACK TO 5
	DAC	7,X
	.ENB			/ENABLE INTERRUPTS
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMS	MONITOR		/GO MONITOR THE TASK'S PROGRESS
/
/ TASK IS NOT IN ATL, DECLARE AN ERROR
/
CONERR	.ENB			/ENABLE INTERRUPTS
	JMP	ERREX		/DECLARE THE ERROR
	.TITLE *** ODT REMOVE A BREAKPOINT COMMAND ***
/
/ REMOVE COMMAND -- FORMAT: >REM(OVE) NNNNNN
/
/			WHERE NNNNNN IS AN ADDRESS RELATIVE TO THE
/			BASE OF THE TASK'S PARTITION PLUS 20 OCTAL.
/
/			NOTE: NNNNNN COULD BE A SYMBOL 
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
REMOVE	CLA			/CLEAR AC TO DENOTE NO CHAR. THERE
	JMS	GETNUM		/GET THE ADDR. OF THE BREAKPOINT
	JMS	GETSYM		/RETURN HERE IF ERROR -- MAYBE SYMBOL
	AAC	20		/RETURN HERE IF OK (AC=VALUE)
	DAC	TEMP		/SAVE THE ADDRESS
	LACQ			/CHECK THE LINE TERM - GET IT FROM MQ
	JMS	CR		/GO CHECK IT
	JMP	ERRNUM		/RETURN HERE IF IT'S NOT A CR OR ALT -- ERROR
REM2	LAC	BRKPT		/RETURN HERE IF TERM OK -- ARE WE AT A BREAK POINT?
	SNA
	JMP	REM3		/NO
	SAD	TEMP		/YES -- IS THIS THE BRK PT WE'RE AT?
	SKP
	JMP	REM3		/NO
/
/ REMOVE THE BREAKPOINT TASK IS AT RIGHT NOW
/
	JMS	SEARCH		/YES -- SCAN THE TABLE
	JMP	ERRSEA		/RETURN HERE IF POINT NOT FOUND
	IDX	RBPFLG		/SET REMOVED BRK PT FLAG
	LAC	PBASE		/PREPARE TO RESET X17
	JMS	SETXR		/SET UP THE XR
	CLA			/SET X17 TO 0
	DAC	17,X
	LAC	PBADR		/PREPARE TO ACCESS PARTITION BLOCK
	JMS	SETXR		/SET UP THE XR
	LAC	14,X		/GET THE MODE BITS
	AND	(700000		/AND OFF THE ADDRESS
	LMQ			/SAVE RESULT IN MQ
	LAC	TEMP		/GET THE BRK PT ADDR
	OMQ			/CONSTRUCT THE RESTART ADDRESS
	DAC	14,X		/SET UP THE RESTART ADDR
	JMP	REM4		/GO CLEAR OUT TABLE ENTRIES
/
/ REMOVE BREAKPOINT WITHOUT COMPLICATIONS
/
REM3	JMS	SEARCH		/SEARCH THE BRKPT TABLE
	JMP	ERRSEA		/RETURN HERE IF NOT FOUND -- ERROR
/
/ CLEAR OUT THE ENTRY IN THE BREAKPOINT TABLE
/
REM4	LAC*	(X11		/USE X11 POINT TO BREAKPOINT INST TABLE
	TAD	(-BRKSIZ	/AND USE X10 TO POINT TO BREAKPOINT
	DAC*	(X10		/ADDRESS TABLE
	DZM*	X10		/ZERO BRK PT. ADDR. TABLE ENTRY
	LAC	PBASE		/PREPARE TO ACCESS PARTITION BASE
	TAD	TEMP		/PLUS BRKPT LOCATION
	JMS	SETXR		/SET UP THE XR
	LAC*	X11		/RESTORE THE CONTENTS OF BRK PT LOC.
	DAC	0,X		/DEPOSIT FORMER CONTENTS OF INST
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
	.TITLE *** ODT OPEN A REGISTER OR LOCATION COMMAND ***
/
/ OPEN COMMAND -- FORMAT: >OPE(N) NNNNNN
/
/			WHERE NNNNNN IS AN ADDRESS RELATIVE TO THE BASE
/			OF THE TASK'S PARTITION PLUS 20 OCTAL.
/
/			NOTE: NNNNNN COULD BE A SYMBOL OR ONE OF THE FOLLOWING
/			REGISTERS - $AC,$MQ,$XR,$LR,$LINK,$X10,...,$X16 .
/
/			ODT WILL PRINT THE CONTENTS OF THE LOCATION OR REGISTER
/			AND WAIT FOR A RESPONSE. IF A VALUE(OCTAL ONLY) IS
/			GIVEN THAT VALUE WILL REPLACE THE FORMER CONTENTS
/			IF ONLY A TERMINATOR IS TYPED, ODT WILL PROCESS
/			IT. IN EITHER CASE IF THE RESPONSE IS ENDED WITH ALTM.
/			A BRAND NEW COMMAND WILL BE REQUESTED. IF, HOWEVER, THE
/			LINE IS TERMINATED BY A CR, THE NEXT LOCATION
/			WILL BE OPENED (UNLESS A REGISTER WAS SPECIFIED)
/			IF A NEW VALUE IS ENTERED FOR THE LINK ONLY BIT 0
/			IS RELAVANT.
/
/			THIS COMMAND IS LEGAL ANYTIME, BUT REGISTERS CAN
/			BE OPENED ONLY IF THE TASK IS AT A BREAKPOINT.
/
OPEN	CLA			/CLEAR AC TO DENOTE NO CHAR THERE
	DZM	OPEBPT		/CLEAR THE 'THIS IS A BRK PT' FLAG
	DZM	OPEREG		/CLEAR THE 'THIS IS A REGISTER' FLAG
	DZM	OPELNK		/CLEAR THE 'THIS IS THE LINK' FLAG
	JMS	GETNUM		/GET A NUMBER (LOCATION)
	JMP	OPEN1		/RETURN HERE IF POSSIBLE ERROR
	AAC	20		/RETURN HERE IF OK -- ADD 20 TO ADDR
/
/ OPEN A MEMORY LOCATION
/
OPEN3	DAC	TEMP		/SAVE THE LOCATION
	LACQ			/CHECK THE LINE TERM - GET CHAR FROM MQ
	JMS	CR		/GO CHECK IT
	JMP	ERRNUM		/ERROR -- NOT A TERM
	JMS	ADRCHK		/GO CHECK THE ADDRESS
	LAC	TEMP		/GET ACTUAL ADDR
	TAD	PBASE		/ADD BASE OF PARTITION
	JMS	SETXR		/SET UP XR TO ACCESS THAT LOCATION
	PXA			/SAVE THE XR
	DAC	TEMP1		/IN TEMP1
	JMS	SEARCH		/SCAN BRK PT TABLE TO SEE IF ADDR IS IN IT
	JMP	OPEN5		/ADDRESS IS NOT A BREAK
/
/ OPEN MEMORY LOC. AT A BREAKPOINT
/
	LAC*	X11		/ADDRESS IS A BREAK -- GET CONTENTS
	IDX	OPEBPT		/SET THE 'THIS IS A BRK PT' FLAG
	JMP	OPEN6		/GO PRINT THE CONTENTS
/
/ OPEN A MEMORY LOC NOT AT A BREAKPOINT
/
OPEN5	LAC	TEMP1		/SET UP TO GET THE CONTENTS
	PAX			/RESTORE XR
	LAC	0,X		/GET THE CONTENTS OF THE ADDR
/
/ PRINT THE CONTENTS OF THE MEMORY LOC OR REGISTER AND GET THE
/ NEW VALUE IF ONE WAS SPECIFIED.
/
	.IFUND ONEPLS
OPEN6	JMS	NUMOUT		/PRINT THE CONTENTS
	LAC	(MSGCOL		/PRINT A COLON
	.ENDC
	.IFDEF ONEPLS
/
/ IF THE FLAG SYMFLG IS SET, AND A LOCATION HAS BEEN OPENED, DECODE
/ THE OP. CODE OF THIS INSTRUCTION FOR THE USER.
/
OPEN6	DAC	OPEWRD		/SAVE CONTENTS OF THE LOCATION
	JMS	NUMOUT		/PRINT THE CONTENTS
	LAC	SYMFLG		/SHOULD THE CONTENTS BE DECODED?
	SNA
	JMP	OPECOL		/NO -- PREPARE TO GET NEW CONTENTS
	LAC	OPEREG		/MAYBE -- IS THIS A REGISTER?
	SZA
	JMP	OPECOL		/YES -- DON'T DECODE REGISTERS
OPESYM	LAC	OPEWRD		/NO -- DECODE THE WORD
	AND	(770000		/GET THE OP. CODE (6 BITS FOR SPECIAL CASES)
	SAD	(710000		/IS IT FPP?
	JMP	OPEFPP		/YES
	SAD	(720000		/NO -- IND?
	JMP	OPEIND		/YES
	AND	(740000		/NO -- MASK TO 4 BITS FOR NORMAL CASES
	SNA			/IS IT A CAL?
	JMP	OPECAL		/YES
	SAD	(040000		/NO -- DAC?
	JMP	OPEDAC		/YES
	SAD	(100000		/NO -- JMS?
	JMP	OPEJMS		/YES
	SAD	(140000		/NO -- DZM?
	JMP	OPEDZM		/YES
	SAD	(200000		/NO -- LAC?
	JMP	OPELAC		/YES
	SAD	(240000		/NO -- XOR?
	JMP	OPEXOR		/YES
	SAD	(300000		/NO -- ADD?
	JMP	OPEADD		/YES
	SAD	(340000		/NO -- TAD?
	JMP	OPETAD		/YES
	SAD	(400000		/NO -- XCT?
	JMP	OPEXCT		/YES
	SAD	(440000		/NO -- ISZ?
	JMP	OPEISZ		/YES
	SAD	(500000		/NO -- AND?
	JMP	OPEAND		/YES
	SAD	(540000		/NO -- SAD?
	JMP	OPESAD		/YES
	SAD	(600000		/NO -- JMP?
	JMP	OPEJMP		/YES
	SAD	(640000		/NO -- EAE?
	JMP	OPEEAE		/YES
	SAD	(700000		/NO -- IOT?
	JMP	OPEIOT		/YES
OPEOPR	LAC	(MSGOPR		/NO -- MUST BE AND OPR
	JMP	OPEPS		/GO PRINT THE SYMBOLIC REPRESENTATION
OPECAL	LAC	(MSGCAL		/GET CAL MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEDAC	LAC	(MSGDAC		/GET DAC MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEJMS	LAC	(MSGJMS		/GET JMS MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEDZM	LAC	(MSGDZM		/GET DZM MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPELAC	LAC	(MSGLAC		/GET LAC MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEXOR	LAC	(MSGXOR		/GET XOR MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEADD	LAC	(MSGADD		/GET ADD MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPETAD	LAC	(MSGTAD		/GET TAD MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEXCT	LAC	(MSGXCT		/GET XCT MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEISZ	LAC	(MSGISZ		/GET ISZ MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEAND	LAC	(MSGAND		/GET AND MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPESAD	LAC	(MSGSAD		/GET SAD MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEJMP	LAC	(MSGJMP		/GET JMP MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEEAE	LAC	(MSGEAE		/GET EAE MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEIOT	LAC	(MSGIOT		/GET IOT MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEFPP	LAC	(MSGFPP		/GET FPP MESSAGE
	JMP	OPEPS		/GO PRINT IT
OPEIND	LAC	(MSGIND		/GET IND MESSAGE
OPEPS	JMS	PRINT		/PRINT THE MESSAGE
OPECOL	LAC	(MSGCOL		/GET THE COLON MESSAGE
	.ENDC
	JMS	PRINT		/GO PRINT THE COLON
	JMS	READ		/READ A LINE
	JMS	IFAC		/INIT. FAC VARIABLES
	INBUFF			/INPUT BUFFER
	CLA			/CLEAR AC TO DENOTE NO CHAR THERE
	JMS	GETNUM		/TRY TO GET A NUMBER
	JMP	OPEN9		/RET. HERE ON POSSIBLE ERROR -- COULD BE TERM.
	PAL			/SAVE THE NUMBER IN LR
	LACQ			/GET THE BREAK CHAR
	JMS	CR		/IS IT A TERM?
	JMP	ERRNUM		/NO -- ERROR
	LAC	OPEBPT		/YES -- IS THIS ADDRESS A BREAK POINT?
	SNA
	JMP	OPEN8		/NO
/
/ CHANGE THE MEMORY LOCATION (AT A BREAKPOINT)
/
	LAC*	(X11		/YES -- RESET X11
	AAC	-1		/SO IT POINTS TO PROPER ENTRY
	DAC*	(X11		/IN BRKPT INST TABLE
	PLA			/GET NEW CONTENTS
	AND	(740000
	SAD	(400000		/IS IT AN XQT INST?
	JMP	ERRXQT		/YES -- ERROR
	PLA			/NO -- RESTORE NEW CONTENTS TO AC
	DAC*	X11		/PUT IT IN BREAK PT. TABLE
	JMP	OPEN9		/GO CHECK LINE TERM
/
/ CHANGE REGISTER OR MEMROY LOC (NOT AT A BREAKPOINT)
/
OPEN8	LAC	TEMP1		/NOT A BREAK PT. RESET XR
	PAX			/RESTORE XR
	LAC	OPELNK		/HAS THE LINK BEEN OPENED?
	SZA
	JMP	OPEN17		/YES
/
/ CHANGE REGISTER (EXECPT LINK) OR MEMROY LOC. (NOT AT A BREAKPOINT)
/
	PLA			/NO -- GET NEW CONTENTS
	DAC	0,X		/PUT NEW CONTENTS IN ADDR.
	JMP	OPEN9		/GO CHECK LINE TERM
/
/ CHANGE THE LINK (ONLY BIT 0 IS RELEVANT)
/
OPEN17	LAC	0,X		/PICK UP THE WORD WITH THE LINK
	AND	(377777		/KEEP EVERYTHING BUT THE LINK
	DAC	TEMP1		/SAVE THIS TEMPORARILY
	PLA			/GET NEW LINK CONTENTS
	AND	(400000		/KEEP ONLY THE SIGNIFICANT BIT
	XOR	TEMP1		/ENTER THE REST OF THE WORD
	DAC	0,X		/STORE THE RESULT
/
/ CHECK THE LINE TERM FOR A POSSIBLE ERROR
/
OPEN9	LACQ			/WHAT KIND OF TERM WAS IT?
	JMS	CR		/GO CHECK IT
	JMP	ERRNUM		/NOT A CR OR ALT -- ERROR
/
/ CHECK TO SEE IF THE NEXT MEMORY LOC SHOULD BE OPENED
/
OPEN13	SAD	(175		/ALTMODE?
	JMP	OPEN10		/YES -- GO GET NEXT COMMAND
	LAC	OPEREG		/NO -- WAS THIS A REG?
	SZA
	JMP	OPN10A		/YES -- GO GET NEXT COMMAND
	LAC	(15		/SET TERM = CR
	LMQ			/SAVE IN MQ
	LAC	TEMP		/BUMP THE ADDRESS
	IAC
	JMP	OPEN3		/OPEN THE NEXT ADDRESS
/
/ PRINT A BLANK LINE TO RETURN CARRIAGE AND GO GET NEXT COMMAND
/
OPEN10	LAC	(MSGBL		/PRINT A BLANK LINE
	JMS	PRINT
OPN10A	JMS	DETACH		/DETACH THE I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
/
/ OPEN A REGISTER OR MEMORY LOC DEFINED BY A SYMBOL
/
OPEN1	LACQ			/GET THE BREAK CHAR
	SAD	(44		/"$"?
	JMP	OPEN2		/YES -- OPEN A REGISTER MAYBE
	JMS	GETSYM		/NO -- GET A SYMBOL
	AAC	20		/ADD 20 TO THE ADDRESS
	JMP	OPEN3		/OPEN THE LOCATION AS USUAL
/
/ OPEN A REGISTER
/
OPEN2	PAL			/SAVE THE CHAR
	LAC	BRKPT		/ARE WE AT A BREAK POINT?
	SNA
	JMP	ERROPR		/NO -- ERROR (ILLEGAL TO OPEN REGISTERS)
	PLA			/YES -- RESTORE THE CHAR
	JMS	GETNAM		/GET A 'NAME' (IT'S REALLY A REGISTER)
	CMD			/REGISTER NAME BUFFER
	JMP	ERRNUM		/RETURN HERE ON AN ERROR
	LAC	(REGTB1-1	/PREPARE TO SCAN REGISTER TABLES
	DAC*	(X10		/USE X10 AS A POINTER TO TABLE
	LAW	-REGSIZ		/SET UP REG TABLE COUNTER
	DAC	TEMP2		/IN TEMP2
OPEN11	LAC	CMD		/SCAN THE 1ST TABLE
/
/ SCAN THE 1ST REGISTER NAME TABLE
/
	SAD*	X10		/MATCH?
	JMP	OPEN12		/YES -- CHECK 2ND HALF OF REGISTER NAME
	ISZ	TEMP2		/NO -- END OF 1ST TABLE?
	JMP	OPEN11		/NO -- CHECK NEXT TABLE ENTRY
	JMP	ERRNUM		/YES -- ERROR
/
/ CHECK THE 2ND HALF OF THE REGISTER'S NAME
/
OPEN12	LAC*	(X10		/CHECK TABLE 2
	AAC	REGSIZ		/USE TEMP1 AS A POINTER
	DAC	TEMP1		/TO 2ND REG TABLE
	LAC*	TEMP1		/GET 2ND HALF OF REG NAME
	SAD	CMD+1		/MATCH ON SECOND HALF OF REG. NAME?
	SKP			/YES
	JMP	OPEN11		/NO -- CONTINUE SCANNING TABLE 1
	LAC	TEMP1		/PREPARE TO GET REG. VALUE FROM PBDL
	AAC	REGSIZ		/USE TEMP1 AS POINTER 
	DAC	TEMP1		/TO BIAS TABLE ENTRY
	LAC*	TEMP1		/WE'VE GO THE BIAS --DOES BIAS REFER TO PBDL?
	SPA
	JMP	OPEN14		/NO -- BIAS REFERS TO PARTITION (X10-X16)
/
/ GET REGISTER CONTENTS FROM PBDL
/
	TAD	PBADR		/YES -- PREPARE TO ACCESS PBDL
/
/ PREPARE TO PRINT REGISTER CONTENTS
/
OPEN15	JMS	SETXR		/SET UP TO ACCESS PBDL
	PXA			/SAVE THE XR
	DAC	TEMP1		/IN TEMP1
	LAC	0,X		/GET THE VALUE OF THE REG
	IDX	OPEREG		/SET THE OPEN REGISTER FLAG
	PAL			/SAVE THE VALUE TEMPORIRIALY
	LAC	CMD		/GET THE 1ST HALF OF REGISTER NAME
	SAD	(441411		/DOES IT SHOW "$LI" FOR $LINK?
	JMP	OPEN16		/YES
	PLA			/NO -- RESTORE THE VALUE
	JMP	OPEN6		/GO PRINT CONTENTS OF THE REGISTER
/
/ GET REGISTER CONTENTS FORM VIRTUAL ADDRESSES 10-16 (X10-X16)
/
OPEN14	AND	(077777		/AND OFF BIT 0 THE FLAG BIT
	TAD	PBASE		/ADD BASE OF PARTITION
	JMP	OPEN15		/GO GET THE VALUE
/
/ GET THE CONTENTS OF THE LINK
/
OPEN16	PLA			/RESTORE THE VALUE
	AND	(400000		/SAVE ONLY THE SIGNIFICANT PART
	IDX	OPELNK		/SET THE 'OPEN LINK' FLAG
	JMP	OPEN6		/GO PRINT THE CONTENTS
/
/ LOCAL VARIABLES FOR OPEN
/
OPEREG	0			/SET 1 IF OPENING A REG, 0 IF NOT
OPEBPT	0			/SET 1 IF OPENING A BRKPT, 0 IF NOT
OPELNK	0			/SET 1 IF OPENING LINK, 0 IF NOT
	.IFDEF ONEPLS
OPEWRD	0			/USED TO SAVE A LOCATION'S CONTENTS
	.ENDC
	.TITLE *** ODT DUMP THE TASK COMMAND ***
/
/ DUMP COMMAND -- FORMAT: >DUM(P)
/
/			THE TASK IMAGE NOW IN CORE WILL BE DUMPED INTO
/			AN RSX CREATED FILE NAMED: 'TSKNAM DMP'.
/			BEFORE DUMPING THE FILE, RSXODT WILL REPLACE
/			THE CONTENTS OF BREAKPOINT LOCATIONS WITH
/			THEIR FORMER CONTENTS.  THESE LOCATIONS WILL
/			LATER BE RESTORED WHEN THIS FUNCTION IS DONE.
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
	.IFDEF ONEPLS
DUMP	CAL	HINF		/GET HANDLER INFO ON 'FILLUN' LUN
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/WERE THERE ERRORS?
	SPA
	JMP	ERRHIN		/YES
	AND	(77		/NO -- AND OFF EVERYTHING BUT DEVICE CODE
	SAD	(2		/IS DEVICE RF DISK?
	SKP			/YES -- OK
	SAD	(3		/NO -- RP DISK?
	SKP			/YES -- OK
	SAD	(24		/NO -- RK DISK?
	SKP			/YES -- OK
	JMP	ERRHIN		/NO -- ERROR (NOT A DISK)
/
/ SET UP THE CREATE AND PUT CPB'S AND CONTROL TABLES
/
	DAC	PUT+4		/SAVE DEVICE CODE IN PUT CPB
	LAC	PBADR		/PREPARE TO ACCESS PBDL NODE
	JMS	SETXR		/SET UP THE XR
	LAC	PBASE		/GET THE BASE ADDRESS
	DAC	PUTCTA+2	/SAVE IT IN THE PUT CONTROL TABLE
	LAC	5,X		/GET THE SIZE
	DAC	PUTCTA+3	/SAVE IT IN THE CONTROL TABLE
	CLL			/SET UP LINK FOR A SHIFT
	LRS	10		/CONVERT WORDS TO BLOCKS
	DAC	CRECTA+3	/SAVE NO. OF BLOCKS IN CREATE C.T.
/
/ CREATE THE FILE AND WRITE THE TASK IMAGE INTO IT
/
	CAL	CREATE		/CREATE THE FILE
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/ANY ERRORS?
	SPA
	JMP	ERRCRE		/YES
	LAC	CRECTA+7	/NO -- GET THE UNIT AND PLATTER
	DAC	PUTCTA+0	/STORE IN PUT CONTROL TABLE
	LAC	CRECTA+10	/GET THE DISK ADDRESS
	DAC	PUTCTA+1	/STORE IN PUT CONTROL TABLE
	JMS	REMRES		/RESTORE CONTENTS OF BRKPTS
	LAC*	X11		/WORD XCT'D BY SUBROUTINE REMRES
	CAL	PUT		/RETURN HERE -- PUT THE TASK TO DISK
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/ANY ERRORS?
	SPA
	JMP	DUMERR		/YES -- GO RESTORE BRKPTS AND TELL USER
	JMS	REMRES		/NO -- GO RESTORE BRKPTS
	LAC	(420017		/WORD XCT'D BY SUBROUTINE REMRES
	JMS	DETACH		/RETURN HERE -- DETACH I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
/
/ A PUT ERROR OCCURRED SO RESTORE THE BREAKPOINTS, DELETE THE FILE
/ AND DECLARE THE ERROR
/
DUMERR	CAL	DELETE		/DELETE THE CREATED FILE
	CAL	WAIT		/WAIT FOR COMPLETION
	JMS	REMRES		/RESTORE BRKPTS
	LAC	(420017		/WORD XCT'D BY SUBROUTINE REMRES
	JMP	ERRPUT		/RETURN HERE -- GO DECLARE ERROR
	.ENDC
	.TITLE *** ODT DECODE COMMAND ***
/
/ DECODE COMMAND -- FORMAT: >DEC(ODE) STRING
/
/			WHERE STRING IS EITHER 'ON' OR 'OFF'.
/
/			THIS COMMAND SETS (ON) OR CLEARS (OFF) A FLAG
/			WHICH TELLS OPEN WHETHER OR NOT TO DECODE
/			THE OP. CODE OF THE INSTRUCTIONS IN A TASK'S
/			PARTITION.
/
/			THIS COMMAND IS LEGAL ANYTIME.
/
	.IFDEF ONEPLS
DECODE	CLA			/CLEAR AC TO DENOTE NO CHAR THERE
	JMS	GETNAM		/GET THE STRING
	SYMBOL			/PLACE TO STORE THE STRING
	JMP	ERRNUM		/RETURN HERE ON ERROR
	LAC	SYMBOL		/RETURN HERE IF OK -- GET STRING
	SAD	(170606		/IS IT OFF?
	JMP	DECOFF		/YES
	SAD	(171600		/NO -- IS IT ON?
	JMP	DECON		/YES
	JMP	ERRNUM		/NO -- ERROR
/
/ THE STRING IS OFF SO CLEAR THE FLAG
/
DECOFF	DZM	SYMFLG		/ZERO THE FLAG
	JMP	DECEX		/PREPARE TO EXIT
/
/ THE STRING IS ON SO SET THE FLAG
/
DECON	CLA!IAC			/SET THE FLAG
	DAC	SYMFLG
DECEX	JMS	DETACH		/DETACH I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
	.ENDC
	.TITLE *** ODT REGISTERS COMMAND ***
/
/ REGISTERS COMMAND -- FORMAT: >REG(IST)
/
/			THIS COMMAND PRINTS THE CONTENTS OF THE AC,
/			MQ,XR,LR, AND LINK.
/
/			THIS COMMAND IS LEGAL ONLY IF TASK AT A BRKPT.
/
	.IFDEF ONEPLS
REGIST	LAC	BRKPT		/IS TASK AT A BRKPT?
	SNA
	JMP	ERRCON		/NO -- ERROR
/
/ PRINT CONTENTS OF AC
/
	LAC	(MSGAC		/YES -- GET MESSAGE FOR AC
	JMS	PRINT		/PRINT IT
	LAC	PBADR		/PREPARE TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	17,X		/GET AC'S VALUE
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGBL		/PRINT BLANK LINE
	JMS	PRINT
/
/ PRINT CONTENTS OF XR
/
	LAC	(MSGXR		/GET MESSAGE FOR XR
	JMS	PRINT		/PRINT IT
	LAC	PBADR		/PREPARE TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	20,X		/GET XR'S VALUE
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGBL		/PRINT BLANK LINE
	JMS	PRINT
/
/ PRINT CONTENTS OF MQ
/
	LAC	(MSGMQ		/GET MESSAGE FOR MQ
	JMS	PRINT		/PRINT IT
	LAC	PBADR		/PREPARE TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	22,X		/GET MQ'S VALUE
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGBL		/PRINT BLANK LINE
	JMS	PRINT
/
/ PRINT CONTENTS OF LR
/
	LAC	(MSGLR		/GET MESSAGE FOR LR
	JMS	PRINT		/PRINT IT
	LAC	PBADR		/PREPARE TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	21,X		/GET LR'S VALUE
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGBL		/PRINT BLANK LINE
	JMS	PRINT
/
/ PRINT CONTENTS OF LINK
/
	LAC	(MSGLNK		/GET MESSAGE FOR LINK
	JMS	PRINT		/PRINT IT
	LAC	PBADR		/PREPARE TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	14,X		/GET LINK AND RESTART ADDR.
	AND	(400000		/KEEP ONLY LINK
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGBL		/PRINT BLANK LINE
	JMS	PRINT
	JMS	DETACH		/DETACH I/O DEVICE
	JMP	LOC0		/GO GET NEXT COMMAND
	.ENDC
	.TITLE *** ODT MONITOR ROUTINE ***
/
/ *** MONITOR ROUTINE -- WAIT FOR THE TASK TO HANG UP AT A BREAK OR EXIT
/
MONITOR	LAW	-TIME		/SET UP THE TIME COUNTER
	DAC	TIMER		/SAVE IT IN TIMER
MON2	CAL	MARK		/MARK SOME TIME
	DZM	RBPFLG		/ZERO REMOVED BRK PT FLAG
	DZM	BRKPT		/ZERO FLAG SO IT SHOWS WE'RE NOT AT A BRK YET
	CAL	WAIT		/WAIT FOR MARK TIME REQUEST
	JMS	ATLSCN		/SCAN THE ATL FOR THE TASK
	JMP	MONDON		/RETURN HERE IF NOT FOUND -- TASK NOT IN ATL
	.ENB			/RETURN HERE IF FOUND -- ENABLE INTERRUPTS
	JMS	SETXR		/SET UP THE XR TO ACCESS ATL
	LAC	7,X		/GET THE TASK STATUS
	DAC	MONTMP		/SAVE IT FOR POSSIBLE PRINTING
	SAD	(5		/INTERRUPTED BY EXEC?
	SKP
	JMP	MON100		/NO
	PXA			/YES -- SAVE THE XR IN MQ
	LMQ
	LAC	PBADR		/SET UP TO ACCESS PBDL
	JMS	SETXR		/SET UP XR
	LAC	14,X		/GET RESTART ADDRESS
	AND	(077777		/KEEP ONLY THE ADDRESS
	DAC	TEMP		/SAVE THIS
	SAD	(3		/IS THE TASK HUNG UP AT THE JMP .?
	SKP
	JMP	MON100		/NO -- GO MARK SOME TIME
	LAC	PBASE		/YES -- SET UP TO GET ADDR OF BRK PT +1
	JMS	SETXR		/SET UP XR TO ACCESS TRAP TABLE
	LAC	2,X		/GET ADDR OF BRK PT +1
	AND	(077777		/AND OFF EVERYTHING BUT THE ADDRESS
	AAC	-1		/GET ADDR OF BRK PT
	DAC	TEMP		/SAVE THE ADDR OF ALLEGED BRK PT
MON1	JMS	SEARCH		/SEARCH THE TABLE FOR THIS ADDR
	JMP	MON100		/NOT FOUND
	LACQ			/RESTORE THE XR TO POINT TO THE ATL NODE
	PAX
	LAC	(6		/TASK AT BRK - SET THE TASK'S STATUS TO 6
	DAC	7,X
	LAC	(MSGBRK		/PRINT THE MESSAGE
	JMS	PRINT
	LAC	TEMP		/GET THE BRK PT ADDR
	DAC	BRKPT		/SAVE ADDR OF BREAK POINT
	AAC	-20		/SUBTRACT 20 SO ADDRESS PRINTED AT THIS
				/BREAKPOINT MATCHES THAT OF A DEFINED SYMBOL
	JMS	NUMOUT		/PRINT THE ADDR
	LAC	(MSGBL		/PRINT A BLANK LINE TO RETURN CARRIAGE
	JMS	PRINT
	JMP	LOC0		/GO GET A COMMAND
/
/ ENABLE INTERRUPTS AND GO MONITOR TASK'S PROGRESS
/ UNLESS ITS TIME TO SEE IF THE TASK SHOULD BE ABORTED
/
MON100	ISZ	TIMER		/TIME TO SEE IF TASK SHOULD BE ABORTED?
	JMP	MON2		/NO -- GO MONITOR THE TASK'S PROGRESS
/
/ DETERMINE IF THE TASK HAS RUN LONG ENOUGH AND SHOULD BE ABORTED
/
MON3	JMS	ATTACH		/YES -- ATTACH THE DEVICE
	LAC	(MSGSTA		/GET TASK STATUS MESSAGE
	JMS	PRINT		/PRINT IT
	LAC	MONTMP		/GET TASK STATUS
	JMS	NUMOUT		/PRINT IT
	LAC	(MSGABO		/PRINT THE ABORT QUESTION
	JMS	PRINT
	JMS	READ		/READ THE RESPONSE
	JMS	DETACH		/DETACH THE I/O DEVICE
	JMS	IFAC		/INIT. FAC VARIABLE
	INBUFF			/BUFFER ADDRESS
	JMS	FAC57		/GET A CHAR
	SAD	(116		/IS IT A "N"?
	JMP	MONITOR		/YES -- GO MONITOR
	JMP	RELOAD		/NO -- ABORT AND RELOAD THE TASK
/
/ TASK HAS EXITTED -- GO TELL THE USER
/
MONDON	.ENB			/ENABLE INTERRUPTS
	LAC	(MEDON		/GET THE MESSAGE ADDR
	JMS	ERPRNT		/PRINT THE MESSAGE
	JMP	RELOAD		/GO RELOAD THE TASK
/
/ MONITOR ROUTINE'S LOCAL VARIABLE
/
MONTMP	0			/SET TO TASK'S STATUS
	.TITLE *** ODT SUBROUTINES ***
/
/
/ *** SUBROUTINES
/
/ SUBROUTINE PRINT -- PRINT LINE WHOSE ADDR IS IN AC
/
/		RETURN AT JMS+1 UNCONDITIONALLY
/
/		ALL REGISTERS ARE MODIFIED
/
PRINT	0
	DAC	WRITE+4		/SAVE THE MESSAGE ADDR IN CPB
	CAL	WRITE		/PRINT THE MESSAGE
	CAL	WAIT		/WAIT FOR COMPLETION
	JMP*	PRINT		/RETURN
/
/ SUBROUTINE ATLSCN -- SCAN ATL FOR TASK NAMED BY NAME1 AND NAME2
/
/		RETURN AT JMS+1 IF NOT FOUND
/		RETURN AT JMS+2 IF FOUND WITH ATL NODE ADDR IN AC
/		ON RETURN INTERRUPTS WILL BE INHIBITTED IN EITHER CASE
/
/		AC,XR, AND X12 ARE MODIFIED
/
ATLSCN	0
	LAC	(NAME1		/SET UP TO ACCESS THE TASK NAME
	JMS	SETXR		/USE XR AS A POINTER TO THE NAME
	LAC*	(CURTSK		/SET UP TO SCAN ATL STARTING WITH RSXODT
	DAC	ATLTMP		/SAVE ADDR. OF RSXODT'S ATL NODE
	LAC*	ATLTMP		/GET POINTER TO NEXT NODE IN ATL
ATL1	.INH			/INHIBIT INTERRUPTS
	SAD	(ATL		/IS THIS THE END OF THE ATL?
	JMP*	ATLSCN		/YES -- TASK NOT FOUND RET. AT JMS+1
	DAC	ATLTMP		/NO -- SAVE THE ADDR OF THIS NODE
	IAC			/SET UP X12 TO POINT TO TASK NAME
	DAC*	(X12
	LAC*	X12		/GET 1ST 1/2 OF TASK NAME FROM ATL NODE
	SAD	0,X		/DOES IT MATCH THE NAME WE SEEK?
	SKP			/YES -- GO EXAMINE 2ND 1/2 OF NAME
	JMP	ATL2		/NO -- PREPARE TO LOOK AT NEXT NODE
	LAC*	X12		/GET THE 2ND HALF OF THE NAME IN ATL NODE
	SAD	1,X		/DOES 2ND 1/2 OF NAME MATCH?
	JMP	ATL3		/YES -- ATL NODE HAS BEEN FOUND
ATL2	.ENB			/NO -- ENABLE INTERRUPTS
	LAC*	ATLTMP		/PREPARE TO ACCESS NEXT NODE -- GET THE
	JMP	ATL1		/POINTER TO NEXT NODE AND GO CHECK IT
ATL3	LAC	ATLTMP		/GET THE ADDR. OF THIS NODE
	IDX	ATLSCN		/PREPARE TO RETURN AT JMS+2
	JMP*	ATLSCN		/RETURN
/
/ LOCAL VARIABLE FOR ATLSCN
/
ATLTMP	0			/ADDRESS OF ATL NODE
/
/ SUBROUTINE ATTACH -- ATTACH THE I/O DEVICE
/
/		RETURN AT JMS+1 IF ATTACH IS OK
/
/		ALL REGISTERS ARE MODIFIED
/ 
ATTACH	0
	CAL	ATT		/ISSUE ATTACH DIRECTIVE
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/CHECK EV -- OK?
	SMA
	JMP*	ATTACH		/YES -- RETURN
	JMP	ERRATT		/NO -- DECLARE ERROR
/
/ SUBROUTINE REMRES -- RESTORE LOCATION CONTENTS OR BRKPT
/
/		JMS+1 CONTAINS EITHER LAC* X11 OR LAC (420017
/		TO EITHER RESTORE CONTENTS OR BRKPT 
/
/		RETURN AT JMS+2 UNCONDITIONALLY
/
/		AC, XR, X10, X11, AND TEMP1 ARE ALTERED
/
	.IFDEF ONEPLS
REMRES	0
	LAW	-BRKSIZ		/USE TEMP1 AS A COUNTER OF TABLE ENTRIES
	DAC	TEMP1
	LAC	(BRKTAB-1	/USE X10 AS POINTER TO BRKPT ADDR TABLE
	DAC*	(X10
	AAC	BRKSIZ		/USE X11 AS POINTER TO BRKPT INST TABLE
	DAC*	(X11
REMRE1	LAC*	X10		/GET 1ST ADDR
	SNA			/IS IT ZERO?
	JMP	REMRE2		/YES -- IGNORE ENTRY
	TAD	PBASE		/NO -- PREPARE TO ACCESS LOCATION
	JMS	SETXR		/SET UP XR
	XCT*	REMRES		/XCT WORD AT JMS+1
	DAC	0,X		/STORE IT IN TASK
	SKP			/PREPARE TO TEST FOR END OF TABLE
REMRE2	LAC*	X11		/INCREMENT X11 (VALUE IS MEANINGLESS)
	ISZ	TEMP1		/END OF TABLE?
	JMP	REMRE1		/NO -- GO CHECK NEXT ENTRY
	IDX	REMRES		/YES -- PREPARE TO RETURN AT JMS+2
	JMP*	REMRES		/RETURN
	.ENDC
/
/ SUBROUTINE SETXR -- ADJUST THE XR
/
/ 		RETURN AT JMS+1 UNCONDITIONALLY
/
/		AC AND XR ARE MODIFIED
/
SETXR	0
	TAD	XRADJ		/ADD XR ADJUST. TO AC
	PAX			/STICK RESULT IN XR
	JMP*	SETXR		/RETURN
/
/ SUBROUTINE DETACH -- DETACH THE I/O DEVICE
/
/		RETURN AT JMS+1 UNCONDITIONALLY
/
/		ALL REGISTERS ARE MODIFIED
/
DETACH	0
	CAL	DET		/ISSUE DETACH DIRECTIVE
	CAL	WAIT		/WAIT FOR COMPLETION
	JMP*	DETACH		/RETURN
/
/ SUBROUTINE READ -- READ A COMMAND OR NAME LINE
/
/ 		RETURN AT JMS+1 IF NO ERRORS ARE FOUND
/
/		ALL REGISTERS ARE MODIFIED
/
READ	0
	CAL	READIT		/READ A LINE
	CAL	WAIT		/WAIT FOR COMPLETION
	LAC	EV		/CHECK EV -- OK?
	SMA
	JMP*	READ		/YES -- RETURN
	JMP	ERRREA		/NO -- DECLARE ERROR
/
/ SUBROUTINE ADRCHK -- CHECK ADDR. LEGALITY FOR NRM MODE TASKS
/
/		RETURN AT JMS+1 IF ADDR. IS OK
/		JUMP TO ERRADR IF ADDRESS IS ILLEGAL FOR THIS TASK
/
/		AC AND XR ARE ALTERED
/
ADRCHK	0
	LAC	PBADR		/PREPARE TO ACCESS PBDL NODE
	JMS	SETXR
	LAC	TEMP		/GET THE ADDRESS
	TCA			/NEGATE
	TAD	6,X		/ADD SIZE OF TASK
	SPA			/ADDR<=SIZE OF PART?
	JMP	ERRADR		/NO -- ERROR
	JMP*	ADRCHK		/YES -- RETURN
	.EJECT
/
/ SUBROUTINE GETNUM -- GET AN OCTAL NUMBER
/
/		RETURN AT JMS+2 IF OK WITH TERM IN MQ AND NUMBER IN AC
/		RETURN AT JMS+1 IF ERROR WITH THE CHAR IN MQ
/
/		AC AND MQ ARE MODIFIED
/
GETNUM	0
	DAC	NTEMP		/SAVE THE CHAR
	LAW	-6		/SET DIGIT COUNTER
	DAC	NCOUNT		/IN NCOUNT
	DZM	NUM		/ZERO PREVIOUS RESULTS
	DZM	NUMFLG		/CLEAR FLAG TO SHOW NOW DIGIT YET
	LAC	NTEMP		/PICK UP THE CHAR AGAIN
	SNA			/USE THIS IF NON-ZERO
NUM1	JMS	FAC57		/GET A CHARACTER
	SAD	(40		/SPACE?
	JMP	NUMSPC		/YES
	IDX	NUMFLG		/NO -- SET FLAG TO SHOW A DIGIT WAS READ
	DAC	NUMT		/SAVE IT TEMPORARILY
	AAC	-60		/IS IT A DIGIT?
	SPA
	JMP	NUM2		/NO -- EITHER A BREAK OR AN ERROR
	DAC	NCHAR		/MAYBE -- SAVE THE POTENTIAL DIGIT
	AAC	-10
	SMA
	JMP	NUM2		/NO -- EITHER A BREAK OR AN ERROR
	LAC	NUM		/YES -- PICK UP THE REAL NUMBER
				/THAT HAS ALREADY BEEN CONSTRUCTED
	CLL
	ALS	3		/SHIFT THE CONTENTS
	TAD	NCHAR		/ADD THE DIGIT JUST READ
	DAC	NUM		/SAVE THE RESULTING DECIMAL NUMBER
	ISZ	NCOUNT		/HAVE 6 DIGITS BEEN READ?
	JMP	NUM1		/NO -- READ SOME MORE
	JMS	FAC57		/YES -- READ A BREAK CHARACTER
NUM3	LMQ			/SAVE THE TERMINATOR
NUM5	LAC	NUM		/GET THE NUMBER
	IDX	GETNUM		/PREPARE TO RETURN AT JMS+2
	JMP*	GETNUM		/RETURN
/
/ CHAR IS EITHER A BREAK OR ERROR
/
NUM2	LAC	NUMT		/PUT OFFENDING CHAR IN MQ
NUM6	LMQ
	LAW	-6		/CHARACTER IS EITHER A BREAK OR ERROR
	SAD	NCOUNT		/IF THIS WAS THE 1ST CHARACTER READ
				/ITS AN ERROR. OTHERWIZE ITS A BREAK.
	JMP*	GETNUM		/ERROR -- RETURN AT JMS+1
	JMP	NUM5		/BREAK CHAR -- PREPARE TO RETURN
/
/ CHAR IS A SPACE -- IS THIS A BREAK OR SHOULD IT BE IGNORED?
/
NUMSPC	LAC	NUMFLG		/HAS A DIGIT BEEN READ?
	SNA
	JMP	NUM1		/NO -- IGNORE THE CHAR
	LAC	(40		/YES -- RETRIEV THE BREAK CHAR (A SPACE)
	JMP	NUM6		/GO SEE IF THIS IS A REAL BREAK OR AN ERROR
/
/ LOCAL VARIABLES FOR GETNUM
/
NTEMP	0			/BUFFER FOR AC ON ENTRY
NCHAR	0			/POTENTIAL DIGIT BUFFER
NUM	0			/NUMBER BUFFER
NUMT	0			/CHARACTER SAVE BUFFER
NCOUNT	0			/DIGIT COUNTER
NUMFLG	0			/FLAG: 0 IF NOT DIGIT READ, 1 OR MORE OTHERWISE
	.EJECT
/
/
/ SUBROUTINE GETNAM -- GET AN ASCII NAME FROM TTY LINE AND ENTER
/                      THE SIXBT VERSION OF THE NAME INTO THE  
/                      LOCATIONS SPECIFIED AT JMS+1
/			RETURN AT JMS+2 ON ERRORS
/			RETURN AT JMS+3 ON OK
/
/			AC ON ENTRY HAS 1 CHAR OR 0
/			AC ON RETURN HAS BREAK CHAR
/
/			AC AND MQ ARE MODIFIED
/
GETNAM	0
	DAC	GNTEMP		/SAVE THE CHAR
	LAC*	GETNAM		/GET A POINTER TO THE NAME BUFFER
	DAC	GNCNT		/SAVE THE POINTER TEMPOR ARILY
	DZM*	GNCNT		/ZERO 1ST HALF OF NAME
	IDX	GNCNT		/INCREMENT THE POINTER
	DZM*	GNCNT		/ZERO 2ND HALF OF NAME
	LAW	-6		/SET THE CHAR. COUNT TO 6 CHARS.
	DAC	GNCNT		/SAVE IN GNCNT
	LAC	GNTEMP		/PICK UP FORMER CONTENTS OF AC
	SNA			/SKIP IF AC IS A CHAR.
GNLOC2	JMS	FAC57		/GET NEXT CHAR
	SAD	(40		/IS IT A SPACE?
	JMP	GNLOC3		/YES
	SAD	(15		/NO -- CARRIAGE RETURN?
	JMP	GNLOC3		/YES
	SAD	(175		/NO -- ALTMODE?
	JMP	GNLOC3		/YES
	SAD	(75		/NO -- EQUAL SIGN?
	JMP	GNLOC3		/YES
	AND	(77		/NO -- MASK TO 6 BITS
	DAC	GNTEMP		/SAVE THE SIXBT CHAR
	LAC	GNCNT		/DETERMINE IF THIS IS 1ST OR 2ND WORD STORE
	AAC	3
	SPA
	JMP	GNLOC5		/1ST WORD STORE
	LAC*	GETNAM		/2ND WORD STORE -- GET POINTER
	IAC			/(INCREMENT IT)
GNLOC6	DAC	GNPTR		/PTR NOW HAS ADDR OF 2ND WORD OF NAME
	LAC*	GNPTR		/PICK UP THE NAME
	CLL			/SET UP LINK FOR SHIFT
	ALS	6		/MAKE ROOM FOR NEXT CHAR
	TAD	GNTEMP		/INSERT NEXT CHAR
	DAC*	GNPTR		/STORE NAME
	ISZ	GNCNT		/HAVE SIX CHARS BEEN PROCESSED?
	JMP	GNLOC2		/NO -- GO GET THE NEXT CHAR
	JMS	FAC57		/YES -- GET THE BREAK CHAR
/
/ PREPARE TO RETURN
/
GNLOC4	IDX	GETNAM		/PREPARE TO RETURN AT JMS+2
	IDX	GETNAM
	JMP*	GETNAM		/RETURN
/
/ PREPARE TO CONSTRUCT 1ST 1/2 OF NAME
/
GNLOC5	LAC*	GETNAM		/1ST WORD STORE
	JMP	GNLOC6
/
/ A BREAK CHAR HAS BEEN READ, SO SHIFT NAME BUFFER WORDS TO SHOW
/ THAT THERE ARE NULLS ON THE END OF THE WORD
/
GNLOC3	DAC	GNTEMP		/SAVE THE BREAK
	LAW	-6		/IS THERE A CHAR IN THE NAME?
	SAD	GNCNT
	JMP	GNERR		/NO -- ERROR
	LAC	GNCNT		/YES -- SHIFT THE WORDS
	AAC	3		/CHECK IF THE 1ST OR 2ND WORD WAS PROCESSED
	SMA!CLA
	IAC			/2ND WORD SO ADD 1 TO POINTER
	TAD*	GETNAM		/SET UP A POINTER TO NAME WORD
	DAC	GNPTR		/SAVE THE POINTER
/
/ FIND OUT WHERE LAST CHAR WAS PUT AND SHIFT AS APPROPRIATE
/
	LAC	GNCNT		/GET THE CHAR COUNT
	SAD	(-5		/WAS 1 CHAR READ?
	JMP	GNLOC9		/YES -- GO SHIFT
	SAD	(-2		/NO -- WERE 4 CHARS READ?
	JMP	GNLOC9		/YES -- GO SHIFT
	SAD	(-4		/NO -- WERE 2 CHARS READ?
	JMP	GNLOC8		/YES -- GO SHIFT
	SAD	(-1		/NO -- WERE 5 CHARS READ?
	JMP	GNLOC8		/YES -- GO SHIFT
	JMP	GNLOC7		/NO -- NO SHIFT REQUIRED
/
/ SHIFT TO SHOW 2 NULLS IN NAME
/
GNLOC9	LAC*	GNPTR		/GET THE NAME WORD
	CLL			/SET UP FOR SHIFT
	ALS	14		/SHIFT IN 2 NULLS
	JMP	GNLOC0		/GO STORE RESULT
/
/ SHIFT TO SHOW 1 NULL IN NAME
/
GNLOC8	LAC*	GNPTR		/GET THE NAME WORD
	CLL			/SET UP FOR SHIFT
	ALS	6		/SHIFT IN 1 NULL
GNLOC0	DAC*	GNPTR		/STORE THE RESULT
GNLOC7	LAC	GNTEMP		/GET THE BREAK CHAR
	JMP	GNLOC4		/PREPARE TO RETURN
/
/ AN ERROR WAS FOUND -- RETURN AT JMS+1
/
GNERR	IDX	GETNAM		/PREPARE TO RETURN AT JMS+1
	JMP*	GETNAM		/RETURN
/
/ LOCAL VARIABLES FOR GETNAM
/
GNCNT	0			/CHAR COUNTER
GNTEMP	0			/TEMP STORE FOR CHAR
GNPTR	0			/POINTER TO NAME BUFFER
	.EJECT
/
/ SUBROUTINE NUMOUT -- PRINT THE CONTENTS OF AC AS AN OCTAL NUMBER
/
/			RETURN AT JMS+1 UNCONDITIONALLY
/
/			ALL REGISTERS ARE MODIFIED 
/
NUMOUT	0
	LMQ			/SAVE THE NUMBER TO BE PRINTED IN MQ
	LAW	-6		/SET UP DIGIT COUNTER
	DAC	NUMTMP		/IN NUMTMP
	DZM	OUTBUF+1	/ZERO CHECKSUM WORD IN BUFFER
	CLL			/PREPARE TO SHIFT
	LAC	(OUTBUF+1	/INIT. X10 TO OUTPUT BUFFER
	DAC*	(X10
NUMO1	CLA			/CLEAR OUT OLD RESULTS
	LLS	3		/SHIFT IN A DIGIT
	TAD	(60		/MAKE IT INTO ASCII
	DAC*	X10		/STORE IT IN BUFFER
	ISZ	NUMTMP		/HAVE WE DONE 6 DIGITS?
	JMP	NUMO1		/NO
	CAL	WRT		/YES -- WRITE OUT THE BUFFER
	CAL	WAIT		/WAIT FOR COMPLETION
	JMP*	NUMOUT		/RETURN
/
/ LOCAL VARIABLE FOR NUMOUT
/
NUMTMP	0			/DIGIT COUNTER
/
/
/ SUBROUTINE SEARCH -- SEARCH BREAK POINT TABLE FOR ADDRESS IN TEMP
/
/			RETURN AT JMS+1 IF ADDRESS NOT IN TABLE
/			RETURN AT JMS+2 IF ADDRESS FOUND WITH X11
/			SET UP TO FETCH INSTRUCTION.
/			ON ENTRY TO THIS SUBROUTINE TEMP HAS THE ADDRESS
/
/			AC AND X11 ARE MODIFIED
/
SEARCH	0
	LAC	(BRKTAB-1	/INIT X11 TO POINT TO TABLE
	DAC*	(X11
	LAW	-BRKSIZ		/SET UP THE TABLE LENGTH COUNTER
	DAC	SEAR3		/IN SEAR3
	LAC	TEMP		/SCAN DOWN THE TABLE
SEAR2	SAD*	X11		/DOES THE ADDRESS MATCH?
	JMP	SEAR1		/YES
	ISZ	SEAR3		/NO -- ARE WE AT THE END OF THE TABLE?
	JMP	SEAR2		/NO
	JMP*	SEARCH		/YES -- RETURN AT JMS+1
SEAR1	IDX	SEARCH		/PREPARE TO RETURN AT JMS+2
	LAC*	(X11		/SET UP X11 SO THE INST. CAN BE FETCHED
	TAD	(BRKSIZ-1
	DAC*	(X11
	JMP*	SEARCH		/RETURN AT JMS+2
/
/ LOCAL VARIABLE FOR SEARCH
/
SEAR3	0			/USED AS A TABLE ENTRY COUNTER
	.EJECT
/
/ SUBROUTINE GETSYM -- SEARCH SYMBOL TABLE FOR A SYMBOL AND RETURN WITH VALUE
/
/			RETURN AT JMS+1 WITH VALUE IN AC IF OK
/			AND MQ CONTAINING BREAK CHAR.
/			ON ENTRY MQ HAS 1ST CHAR OF SYMBOL
/
/			X10,MQ AND AC ARE MODIFIED
/
GETSYM	0
	DZM	GETSY1		/ZERO OLD SYMBOL NAME
	LACQ			/GET THE 1ST CHAR
	SAD	(44		/IS IT A "$"?
	JMP	ERRNUM		/YES -- THAT'S A RESERVED CHARACTER
	JMS	CR		/IS IT A TERM?
	SKP
	JMP	ERRNUM		/YES -- ERROR
	AND	(77		/NO -- MASK TO 6 BITS
	CLL			/STORE 1ST CHAR
	ALS	14		/IN BITS 0-5
	DAC	GETSY1		/OF GETSY1
	JMS	FAC57		/GET NEXT CHAR
	JMS	CR		/IS IT A TERM?
	SKP
	JMP	GETSY5		/YES -- END OF SYMBOL
	AND	(77		/NO -- MASK TO 6 BITS
	CLL
	ALS	6		/STORE 2ND CHAR.
	TAD	GETSY1		/IN BITS 6-11
	DAC	GETSY1		/OF GETSY1
	JMS	FAC57		/GET THE NEXT CHAR
	JMS	CR		/IS IT A TERM?
	SKP
	JMP	GETSY5		/YES -- END OF SYMBOL
	AND	(77		/NO -- MASK TO 6 BITS
	TAD	GETSY1		/STORE 3RD AND FINAL CHAR
	DAC	GETSY1		/IN BITS 12-17 OF GETSY1
	JMS	FAC57		/GET THE BREAK CHAR
GETSY5	LMQ			/SAVE IT IN THE MQ FOR THE RETURN
	LAC	(SYMTAB-1	/INIT X10 TO ACCESS TABLE
	DAC*	(X10
	LAW	-SYMSIZ		/SET UP THE TABLE SIZE COUNTER
	DAC	GETSY4
	LAC	GETSY1		/SEARCH THE TABLE
GETSY2	SAD*	X10		/IS IT A MATCH?
	JMP	GETSY3		/YES
	ISZ	GETSY4		/NO -- END OF TABLE?
	JMP	GETSY2		/NO
	JMP	ERRNUM		/YES -- SYMBOL NOT FOUND -- ERROR
GETSY3	LAC*	(X10		/PREPARE TO GET THE VALUE
	TAD	(SYMSIZ-1	/USE X10 AS A POINTER
	DAC*	(X10		/TO VALUE TABLE
	LAC*	X10		/PICK UP THE VALUE
	JMP*	GETSYM		/RETURN
/
/ LOCAL VARIABLES FOR GETSYM
/
GETSY1	0			/SYMBOL NAME BUFFER
GETSY4	0			/TABLE ENTRY COUNTER
/
/ SUBROUTINE ERPRNT -- PRINT ERROR MESSAGE
/
/			RETURN AT JMS+1 UNCONDITIONALLY
/
/			ON ENTRY AC HAS ADDRESS OF MESSAGE BUFFER
/
/			ALL REGISTERS ARE MODIFIED
/
ERPRNT	0
	DAC	TEMP		/SAVE THE MESSAGE BUFFER ADDR
ERPRN1	JMS	FAC57		/GET A CHAR FROM LINE BUFF
	SAD	(15		/IS IT A CR?
	JMP	ERPRN2		/YES -- PRINT ONLY MESSAGE
	SAD	(175		/NO -- ALTMODE?
	SKP
	JMP	ERPRN1		/NO -- GO LOOK FOR THE LINE TERM
	LAC	(MSGBL		/YES -- PRINT A BLANK LINE TO RET. CARRIAGE
	JMS	PRINT
ERPRN2	LAC	TEMP		/PRINT ERROR MESSAGE
	JMS	PRINT
	JMP*	ERPRNT		/RETURN
	.EJECT
/
/ SUBROUTINE CR -- TEST CHAR FOR A TERMINATOR
/
/			RETURN AT JMS+2 IF TERM
/			RETURN AT JMS+1 IF CHAR IS NOT A TERM
/
/			NO REGISTERS ARE MODIFIED
/
CR	0
	SAD	(15		/IS CHAR IN AC A CR?
	JMP	CR1		/YES -- PREPARE TO RETURN AT JMS+2
	SAD	(175		/NO -- ALTMODE?
	JMP	CR1		/YES -- PREPARE TO RETURN AT JMS+2
	SKP			/NO -- PREPARE TO RETURN AT JMS+1
CR1	IDX	CR		/INCREMENT RETURN ADDRESS
	JMP*	CR		/RETURN
	.EJECT
/
/	FAC57 IS A SET OF TWO SUBROUTINES TO GET CHARACTERS
/		FROM A LINE BUFFER IN 5/7 FORMAT AND RETURN
/		THEM TO THE CALLER.
/
/	SUBROUTINE IFAC
/
/		JMS	IFAC
/		+	LINE BUFFER ADDRESS
/
/	THIS ROUTINE MUST BE CALLED FIRST TO DEFINE THE
/	LINE BUFFER TO BE PROCESSED
/
/
/	SUBROUTINE FAC57
/
/		JMS	FAC57
/
/
/
/	THIS ROUTINE IS CALLED TO GET ONE CHARACTER
/	IT RETURNS WITH THE CHARACTER IN 7 BIT FORMAT
/	RIGHT JUSTIFIED IN THE AC.
/
/	IF A TERMINATOR IS SENSED ( 015,175) IT
/	WILL BE RETURNED ON EVERY SUBSEQUENT CALL TO FAC57
/
//////////////////////////////////////////////////////////////////////
/
/		THE AC IS MODIFIED
/
IFAC	0
	LAC*	IFAC		/GET LINE BUFFER ADDRESS(HEADER)
	AAC	2		/BUMP POINTER PAST BUFFER HEADER
	DAC	FACLBX		/SAVE RESULT 
	LAC	(FACCB+5)	/STARTS WITH END OF BUFFER
	DAC	FACCBX		/SETUP POINTERS
	ISZ	IFAC		/PREPARE TO RETURN AT JMS+2
	JMP*	IFAC		/RETURN
	.EJECT
/		
/	SUBROUTINE FAC57-- FETCH A CHARACTER FROM THE 5/7 ASCII 
/	LINE BUFFER 'FACLB' DESCRIBED BY THE POINTERS FACLBX
/	AND FACCBX.
/	CHARACTERS ARE NOT FETCHED BEYOND THE TERMINAL CHARACTER.
/
/	AC AND MQ ARE MODIFIED
/
/
FAC57	0
	LAC*	FACCBX		/FETCH THE NEXT UNPACKED CHAR
	SMA			/WAS THE CHARBUFFER EMPTY
	JMP	FAC2		/NO-- TEST FOR A TERMINAL CHARACTER
	LAC	(FACCB-1)	/YES -- REFILL FACLB FROM THE INPUT LINE
	DAC	FACCBX
	LAC*	FACLBX		/FIRST HALF OF A WORD PAIR
	ISZ	FACLBX
	LMQ
	CLA!CLL
	JMS	FACUPS		/FIRST CHAR
	JMS	FACUPS		/SECOND CHAR
	JMS	FACUPS		/FIRST 4 BITS OF THIRD CHAR
	LAC*	FACLBX		/SECOND HALF OF WORD PAIR
	ISZ	FACLBX
	LRS	17		/LAST 3 BITS OF THIRD CHAR
	XOR*	FACCBX
	DAC*	FACCBX
	CLA
	JMS	FACUPS		/FORTH CHAR
	JMS	FACUPS		/FIFTH CHAR
	LAC	(FACCB)		/RESET THE CHARACTER BUFFER INDEX
	DAC	FACCBX
	LAC*	FACCBX		/FETCH THE FIRST CHAR FROM TH BUFFER
				/OF CHARACTERS JUST FILLED
FAC2	SAD	(015)		/IF IT IS A TERMINAL CHARACTER, CARRIAGE
	JMP*	FAC57		/RETURN OR ALTMODE, RETURN WITH THE  CHAR
	SAD	(175)		/IN THE AC, BUT DO NO ALTER THE CHAR BUF INDEX
	JMP*	FAC57		/THUS REPEATED CALLS WILL GET THE SAME CHAR
	ISZ	FACCBX		/ELSE INCREMENT SAID INDEX
	JMP*	FAC57		/RETURN TO CALLER WITH CHAR IN AC
	.EJECT
/
/	SUBROUTINE FACUPS -- UNPACKING SUBROUTINE USED BY FAC57
/
/	CALLING SEQUENCE
/
/	AC AN LINK CLEAR
/	NEXT CHAR MUST BE IN
/	THE HIGH ORDER END OF THE MQ
/	FACCBX MUST POINT TO THE WORD PRECEDING
/	THE  ONE IN WHICH THE CHAR IS
/	TO BE STORED
/
/	JMS	FACUPS
/	(UNCONDITIONAL RETURN WITH FACCBX POINTING TO THE STORED
/	CHARACTER AND WITH THE AC AND LINK CLEARED)
/
/	MQ AND AC ARE MODIFIED
/
/
FACUPS	0
	LLS	7		/SHIFT THE CHAR INTO THE AC
	ISZ	FACCBX		/LOW BITS OF THIRD CHAR ARE ZERO
	DAC*	FACCBX		/BECAUSE THE LINK IS ZERO
	CLA
	JMP*	FACUPS		/RETURN TO CALLER
FACLBX	740040			/INITIALIZED TO HALT
FACCBX	740040	
FACCB	.BLOCK 5
	-1			/MARKS END OF BUFFER
	.TITLE *** ODT GLOBLE PROGRAM VARIABLES ***
/
/ *** GLOBLE PROGRAM VARIABLES
/
XRADJ	0		/XR ADJUSTMENT FACTOR
EV	0		/EVENT VARIABLE
PBADR	0		/TASK'S PBDL NODE ADDR.
PBASE	0		/TASK'S PART. BASE ADDR.
STFLAG	0		/1 IF TASK HAS BEEN STARTED, 0 IF NOT
SYMPTR	SYMTAB		/POINTER TO NEXT FREE ENTRY IN SYMBOL TABLE
VALPTR	VALTAB		/POINTER TO NEXT FREE ENTRY IN VALUE TABLE
SYMCNT	-SYMSIZ		/RUNNING COUNT OF SYMBOL TABLE ENTRIES LEFT
CMD	0		/1ST HALF OF COMMAND
	0		/2ND HALF OF COMMAND (USUALLY UNUSED)
TEMP	0		/TEMP. STORAGE
TEMP1	0
TEMP2	0
SYMBOL	0		/SYMBOL NAME (1ST HALF)
	0		/SYMBOL NAME (2ND HALF)
TIMER	0		/TIME COUNTER FOR MONITOR
SETFLG	0		/1 IF A BREAK POINT HAS BEEN SET, 0 IF NOT
TERM	0		/LINE TERMINATOR
RBPFLG	0		/1 ONLY IF THE NEWLY REMOVED BREAK POINT WAS THE
			/RESTART ADDRESS FOR CONTINUE COMMAND, 0 IF NOT.
BRKPT	0		/SET TO BREAK POINT ADDRESS ON BREAK POINTS
			/SET TO ZERO IF TASK NOT AT A BREAK POINT
	.IFDEF ONEPLS
SYMFLG	0		/SET ZERO IF OP. CODES NEED NOT BE DECODED
			/SET TO 1 IF OPEN SHOULD DECODE THEM
	.ENDC
	.TITLE *** ODT BUFFERS AND TABLES ***
/
/ *** BUFFERS AND TABLES
/
INBUFF	.BLOCK	20	/INPUT BUFFER
OUTBUF	5000		/OUTPUT BUFFER
	0
	.BLOCK	6
	40		/SPACE
	175		/ALTMODE
BRKTAB	.BLOCK BRKSIZ	/BREAK POINT LOCATION TABLE
INSTAB	.BLOCK BRKSIZ	/CONTENTS OF BREAK POINT LOCATION TABLE
SYMTAB	.BLOCK SYMSIZ	/SYMBOL NAME TABLE
VALTAB	.BLOCK SYMSIZ	/SYMBOL VALUE TABLE
CMDTBL	.SIXBT "STA"	/COMMAND DISPATCH TABLE
	.SIXBT "OPE"
	.SIXBT "SET"
	.SIXBT "CON"
	.SIXBT "REM"
	.SIXBT "DEF"
	.SIXBT "EXI"
	.SIXBT "RES"
	.SIXBT "REL"
	.IFDEF ONEPLS
	.SIXBT "DUM"
	.SIXBT "DEC"
	.SIXBT "REG"
	.ENDC
REGTB1	.SIXBT "$AC"	/REGISTER NAME TABLE (FOR 1ST HALF OF NAME)
	.SIXBT "$XR"
	.SIXBT "$MQ"
	.SIXBT "$LR"
	.SIXBT "$LI"
	.SIXBT "$X1"
	.SIXBT "$X1"
	.SIXBT "$X1"
	.SIXBT "$X1"
	.SIXBT "$X1"
	.SIXBT "$X1"
	.SIXBT "$X1"
REGTB2	0		/REGISTER NAME TABLE (FOR 2ND HALF OF NAME)
	0
	0
	0
	.SIXBT "NK@"
	.SIXBT "0@@"
	.SIXBT "1@@"
	.SIXBT "2@@"
	.SIXBT "3@@"
	.SIXBT "4@@"
	.SIXBT "5@@"
	.SIXBT "6@@"
REGTB3	17		/AC -- LOCATION OF REG WITHIN PBDL NODE
	20		/XR
	22		/MQ
	21		/LR
	14		/LINK
	400010		/X10 -- LOCATIONS NOT IN PBDL
	400011		/X11
	400012		/X12
	400013		/X13
	400014		/X14
	400015		/X15
	400016		/X16
	.TITLE *** ODT CPB'S ***
/
/ *** CPB'S
/
WAIT	20		/WAITFOR CPB
	EV		/EVENT VARIABLE ADDRESS
/
READIT	2600		/READ CPB
	EV		/EVENT VARIABLE ADDRESS
	LUN		/LOGICAL UNIT NUMBER
	2		/MODE (IOPS ASCII)
	INBUFF		/BUFFER ADDRESS
	20		/BUFFER SIZE
/
WRITE	2700		/WRITE CPB
	EV		/EVENT VARIABLE ADDRESS
	LUN		/LOGICAL UNIT NUMBER
	2		/MODE (IOPS ASCII)
	XX		/MESSAGE ADDRESS (UNDEFINED INITIALLY)
/
DET	2500		/DETACH CPB
	EV		/EVENT VARIABLE ADDRESS
	LUN		/LOGICAL UNIT NUMBER
/
ATT	2400		/ATTACH CPB
	EV		/EVENT VARIABLE
	LUN		/LOGICAL UNIT NUMBER
/
FIX	15		/FIX CPB
	EV		/EVENT VARIABLE ADDRESS
NAME1	XX		/TASK NAME (FIRST HALF, INITIALLY UNDEFINED)
NAME2	XX		/TASK NAME (SECOND HALF, INITIALLY UNDEFINED)
/
UNFIX	16		/UNFIX CPB
	EV		/EVENT VARIABLE ADDRESS
	XX		/TASK NAME (FIRST HALF, INITIALLY UNDEFINED)
	XX		/TASK NAME (SECOND HALF, INITIALLY UNDEFINED)
/
/ THE FOLLOWING CPB IS INITIALIZED TO ISSUE A TSKNAM DIRECTIVE.
/ ONCE ISSUED, THE CAL CODE IS CHANGED TO A 14 SO THE CPB
/ BECOMES A SYNC CPB FOR THIS TASK.
/
TSKNAM=.
REQODT	25		/SYNC CPB FOR RE-REQUESTING RSXODT (OVERLAYED)
	0		/EVENT VARIABLE ADDRESS (NONE SPECIFIED)
	.SIXBT "RSX"	/TASK NAME (FIRST HALF) (OVERLAYED)
	.SIXBT "ODT"	/TASK NAME (SECOND HALF) (OVERLAYED)
	2		/SYNC ON SECOND
	1		/RUN AFTER ONE UNIT
	2		/UNIT=SECOND
	0		/NO RE-SCHEDULING
	0
	0		/PRIORITY (USE DEFAULT)
/
MARK	13		/MARK TIME CPB
	EV		/EVENT VARIABLE ADDRESS
	1		/MARK TIME FOR 1 UNIT
	2		/THE UNIT IS A SECOND
/
WRT	2700		/WRITE CPB
	EV		/EVENT VARIABLE ADDRESS
	LUN		/LOGICAL UNIT NUMBER
	3		/MODE (IMAGE ASCII)
	OUTBUF		/OUTPUT BUFFER ADDRESS
/
REQTSK	1		/REQUEST CPB
	EV		/EVENT VARIABLE ADDRESS
	XX		/TASK NAME (FIRST HALF, INITIALLY UNDEFINED)
	XX		/TASK NAME (SECOND HALF, INITIALLY UNDEFINED)
PRIOR	XX		/TASK'S RUN PRIORITY (INITIALLY UNDEFINED)
/
	.IFDEF ONEPLS
CREATE	1600		/CREATE CPB
	EV		/EVENT VARIABLE ADDRESS
	FILLUN		/LOGICAL UNIT NUMBER
	CRECTA		/ADDRESS OF CREATE CONTROL TABLE
CRECTA	XX		/FILE NAME(FIRST HALF, INITIALLY UNDEFINED)
	XX		/FILE NAME(SECOND HALF, INITIALLY UNDEFINED)
	.SIXBT "DMP"	/FILE NAME EXTENSION
	XX		/FILE SIZE IN DISK BLOCKS
	0		/ACCOUNTING INFO
	0		/ACCOUNTING INFO
	1		/UPDATE INDICATOR (UPDATES ALLOWED)
	XX		/DISK UNIT AND PLATTER (INITIALLY UNDEFINED)
	XX		/DISK ADDRESS *INITIALLY UNDEFINED)
/
PUT	13100		/PUT CPB
	EV		/EVENT VARIABLE ADDRESS
	1		/LOGICAL UNIT NUMBER
	PUTCTA		/ADDRESS OF PUT CONTROL TABLE
	XX		/DEVICE CODE (INITIALLY UNDEFINED)
PUTCTA	XX		/DISK UNIT AND PLATTER (INITIALLY UNDEFINED)
	XX		/DISK ADDRESS (INITIALLY UNDEFINED)
	XX		/CORE ADDRESS (INITIALLY UNDEFINED)
	XX		/TRANSFER LENGTH (INITIALLY UNDEFINED)
/
HINF	3600		/HINF CPB
	EV		/EVENT VARIABLE ADDRESS
	FILLUN		/LOGICAL UNIT NUMBER
/
DELETE	3500		/DELETE CPB
	EV		/EVENT VARIABLE ADDRESS
	FILLUN		/LOGICAL UNIT NUMBER
	XX		/FILE NAME (FIRST HALF, INITIALLY UNDEFINED)
	XX		/FILE NAME (SECOND HALF, INITIALLY UNDEFINED)
	.SIXBT "DMP"	/FILE NAME EXTENSION
/
	.ENDC
	.TITLE *** ODT MESSAGES ***
/
/ *** MESSAGES
/
	.IFDEF ONEPLS
MEHIN	MEPUT-MEHIN/2*1000
	0
	.ASCII "HINF ERR"<15>
MEPUT	MECRE-MEPUT/2*1000
	0
	.ASCII "PUT ERR"<15>
MECRE	MSGAC-MECRE/2*1000
	0
	.ASCII "CREATE ERR"<15>
MSGAC	MSGXR-MSGAC/2*1000
	0
	.ASCII "AC:   "<175>
MSGXR	MSGMQ-MSGXR/2*1000
	0
	.ASCII "XR:   "<175>
MSGMQ	MSGLR-MSGMQ/2*1000
	0
	.ASCII "MQ:   "<175>
MSGLR	MSGLNK-MSGLR/2*1000
	0
	.ASCII "LR:   "<175>
MSGLNK	MSGCAL-MSGLNK/2*1000
	0
	.ASCII "LINK: "<175>
MSGCAL	MSGDAC-MSGCAL/2*1000
	0
	.ASCII " CAL "<175>
MSGDAC	MSGJMS-MSGDAC/2*1000
	0
	.ASCII " DAC "<175>
MSGJMS	MSGDZM-MSGJMS/2*1000
	0
	.ASCII " JMS "<175>
MSGDZM	MSGLAC-MSGDZM/2*1000
	0
	.ASCII " DZM "<175>
MSGLAC	MSGXOR-MSGLAC/2*1000
	0
	.ASCII " LAC "<175>
MSGXOR	MSGADD-MSGXOR/2*1000
	0
	.ASCII " XOR "<175>
MSGADD	MSGTAD-MSGADD/2*1000
	0
	.ASCII " ADD "<175>
MSGTAD	MSGXCT-MSGTAD/2*1000
	0
	.ASCII " TAD "<175>
MSGXCT	MSGISZ-MSGXCT/2*1000
	0
	.ASCII " XCT "<175>
MSGISZ	MSGAND-MSGISZ/2*1000
	0
	.ASCII " ISZ "<175>
MSGAND	MSGSAD-MSGAND/2*1000
	0
	.ASCII " AND "<175>
MSGSAD	MSGJMP-MSGSAD/2*1000
	0
	.ASCII " SAD "<175>
MSGJMP	MSGEAE-MSGJMP/2*1000
	0
	.ASCII " JMP "<175>
MSGEAE	MSGIOT-MSGEAE/2*1000
	0
	.ASCII " EAE "<175>
MSGIOT	MSGFPP-MSGIOT/2*1000
	0
	.ASCII " IOT "<175>
MSGFPP	MSGIND-MSGFPP/2*1000
	0
	.ASCII " FPP "<175>
MSGIND	MSGOPR-MSGIND/2*1000
	0
	.ASCII " IND "<175>
MSGOPR	MSGSTA-MSGOPR/2*1000
	0
	.ASCII " OPR "<175>
	.ENDC
MSGSTA	MSGBL-MSGSTA/2*1000
	0
	.ASCII "STATUS: "<175>
MSGBL	MSGCOL-MSGBL/2*1000
	0
	.ASCII "  "<15>
MSGCOL	MSGHDR-MSGCOL/2*1000
	0
	.ASCII ":"<175>
MSGHDR	MSGNAM-MSGHDR/2*1000
	0
	.ASCII "ODT V13"<15>
MSGNAM	MSGQUE-MSGNAM/2*1000
	0
	.ASCII "TASK NAME?"<175>
MSGQUE	MSGBRK-MSGQUE/2*1000
	0
	.ASCII "ODT>"<175>
MSGBRK	MEOPR-MSGBRK/2*1000
	0
	.ASCII "BRKPT AT "<175>
MEOPR	MEXQT-MEOPR/2*1000
	0
	.ASCII "ILLEGAL"<15>
MEXQT	MEEXM-MEXQT/2*1000
	0
	.ASCII "BRKPT AT XCT"<15>
MEEXM	MERER-MEEXM/2*1000
	0
	.ASCII "EXEC MODE"<15>
MERER	MEFORM-MERER/2*1000
	0
	.ASCII "READ ERR"<15>
MEFORM	MEFIX-MEFORM/2*1000
	0
	.ASCII "FORMAT ERR"<15>
MEFIX	MESYS-MEFIX/2*1000
	0
	.ASCII "FIX ERR"<15>
MESYS	MECMD-MESYS/2*1000
	0
	.ASCII "TASK NOT IN STL"<15>
MECMD	MEST-MECMD/2*1000
	0
	.ASCII "WHAT?"<15>
MEST	MEREQ-MEST/2*1000
	0
	.ASCII "ALREADY STARTED"<15>
MEREQ	MESYM-MEREQ/2*1000
	0
	.ASCII "REQ ERR"<15>
MESYM	MEBRK-MESYM/2*1000
	0
	.ASCII "TABLE FULL"<15>
MEBRK	MECON-MEBRK/2*1000
	0
	.ASCII "ALREADY DEFINED"<15>
MECON	MESEA-MECON/2*1000
	0
	.ASCII "NOT AT A BRKPT"<15>
MESEA	MEATT-MESEA/2*1000
	0
	.ASCII "NOT IN TABLE"<15>
MEATT	MEEX-MEATT/2*1000
	0
	.ASCII "ATTACH ERR"<15>
MEEX	MEADR-MEEX/2*1000
	0
	.ASCII "TASK NOT IN ATL"<15>
MEADR	MEDON-MEADR/2*1000
	0
	.ASCII "OUT OF BOUNDS"<15>
MEDON	MSGABO-MEDON/2*1000
	0
	.ASCII "TASK EXITTED"<15>
MSGABO	ENDMSG-MSGABO/2*1000
	0
	.ASCII "ABORT TASK?"<15>
ENDMSG=.
	.TITLE *** ODT ERROR ROUTINES ***
/
/ *** ERROR ROUTINES
/
/ INITIAL NAME ERROR
/
ERRNAM	JMS	DETACH		/DETACH THE OUTPUT DEVICE
	LAC	INBUFF+2	/WAS ONLY A TERM TYPED?
	AND	(774000
	SAD	(064000		/CR?
	JMP	EXITAL		/YES -- EXIT
	SAD	(764000		/NO -- ALTMODE?
	JMP	EXITAL		/YES -- EXIT
	LAC	(MSGBL		/NO -- PRINT BLANK LINE
	JMS	PRINT
	LAC	(MEFORM		/PRINT THE ERROR MESSAGE
	JMS	PRINT
	JMP	LOCB		/ASK FOR THE NAME AGAIN
/
/ FATAL ERRORS
/
/	TASK IS EXEC MODE
ERREXM	LAC	(MEEXM
	SKP
/	REQUEST ERROR
ERRREQ	LAC	(MEREQ
	SKP
/	FIX ERROR
ERRFIX	LAC	(MEFIX
	SKP
/	READ ERROR
ERRREA	LAC	(MERER
	SKP
/	TASK NOT IN ATL -- SYSTEM ERROR
ERREX	LAC	(MEEX
	SKP
/	TASK NOT IN STL
ERRSYS	LAC	(MESYS
	SKP
/	ATTACH ERROR
ERRATT	LAC	(MEATT
	JMS	ERPRNT		/PRINT ERROR MESSAGE
	LAC	(15		/SET UP TO EXIT AND RE-REQUEST ODT
	DAC	TERM
	JMP	EXIT
/
/ NON-FATAL ERRORS
/
	.IFDEF ONEPLS
/	HINF ERROR
ERRHIN	LAC	(MEHIN
	SKP
/	PUT ERROR
ERRPUT	LAC	(MEPUT
	SKP
/	CREATE ERROR
ERRCRE	LAC	(MECRE
	SKP
	.ENDC
/	BREAKPOINT NOT IN TABLE
ERRSEA	LAC	(MESEA
	SKP
/	REGISTERS CAN BE ONLY OPENED AT BREAK POINTS
ERROPR	LAC	(MEOPR
	SKP
/	BREAKPOINT AT XQT IS ILLEGAL
ERRXQT	LAC	(MEXQT
	SKP
/	UNRECOGNIZED COMMAND
ERRCMD	LAC	(MECMD
	SKP
/	TASK ALREADY STARTED
ERRST	LAC	(MEST
	SKP
/	ADDRESS OUT OF BOUNDS
ERRADR	LAC	(MEADR
	SKP
/	SYMBOL/BREAKPOINT TABLE FULL
ERRTAB	LAC	(MESYM
	SKP
/	BREAKPOINT ALREADY DEFINED
ERRBRK	LAC	(MEBRK
	SKP
/	TASK IS NOT AT A BREAKPOINT
ERRCON	LAC	(MECON
	SKP
/	FORMAT ERROR
ERRNUM	LAC	(MEFORM
	JMS	ERPRNT		/PRINT ERROR MESSAGE
	JMP	LOC0		/GO GET NEXT COMMAND
/
	.END
