	XLIST
/8    COMMAND DECODER FOR OS/8 MONITOR
/
/
/
/
/
/
/
/
/
/COPYRIGHT  (C)  1974, 1975, 1977 BY DIGITAL EQUIPMENT CORPORATION
/
/
/
/
/
/
/
/
/
/
/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE
/AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
/CORPORATION.  DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/FOR ANY ERRORS THAT MAY APPEAR IN THIS DOCUMENT.
/
/THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED TO THE PURCHASER
/UNDER A LICENSE FOR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED
/(WITH INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
/SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL.
/
/DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE
/OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
/DIGITAL.
/
/
/
/
/
/
/
/
/
/
/APRIL 1977		RL/EF/HJ/SR

/ABSTRACT--
/COMMAND DECODER (CD) ACCEPTS TTY INPUT AND INTERPRETS
/THAT INPUT AS A LIST OF OPTIONS AND FILE SPECIFICATIONS
/FOR OS/8 CUSPS. TABLES ARE SETUP INDICATING THE SPECIFIED
/FILES AND OPTIONS.
/THIS VERSION OF CD IS CAPABLE OF RUNNING OS/8 BATCH.
/MODIFICATIONS TO INITIALIZATION CODE HAVE BEEN MADE TO
/ALLOW THIS.


	DCB=7760
	SHNDLR=7607
	USERFG=40	/LOCATION IN MAIN OS/8 ASSEMBLY - VOLATILE
	T1=41	/DITTO
	MCDREC=51	/ALSO PRETTY VOLATILE
	MOFILE=7600
	MIFILE=7617
	MPARAM=7643
	FIELD 0	/JUSTINCASE

	CDVERSION=6501	/5A
	ODTVERSION=6601	/6A
/V3 CHANGES TO CD:

/1. FIXED LOTS OF BUGS
/	A:B:C IS ILLEGAL
/	15-BIT = OPTION DOESN'T DESTROY ALTMODE BIT
/2.	ADDED ? SUPPORT IN SPECIAL MODE
/3.	ALLOWED SPECIAL MODE UNDER BATCH
/4.	REMOVED DCC CODE
/5.	^U, RO TO BOL, AND LF ALL REPRINT *
/6.	VERSION # AT LOC ZERO
/7.	DON'T LOAD HANDLERS FOR OUTPUT DEVICE
/8.	CHANGED _ TO < STANDARD

/V3 CHANGES TO ODT

/1.	REMOVED DCC CODE
/2.	FIXED CORE SIZE ROUTINE
/3.	ALLOWED SOFTWARE CORE SIZE
/4.	MODIFIED 'GO' COMMAND SO THAT IT DOESN'T RESTORE TRAP
/	LOCATION TO UNMODIFIED VALUE
/5.	FIXED BUG RE: JMS'S OUT OF FIELD WITH MAGIC LOCATION SET
/6.	TURN OFF INTERRUPTS ON BREAKPOINT

/CHANGES AFTER FIELD TEST RELEASE:

/1.	FIXED BUG RE FILE LENGTHS GT 2047 BLOCKS

/MAINTENANCE RELEASE:

/	NO CHANGES

/V3D CHANGES:

/CHANGED FORMAT OF VERSION NUMBERS
	*200
CD,	JMP I NUMBER	/EXECUTED IN SYSGEN
NUM,	JMP I T
ANALYZ,	TAD [BEGLN-1
	DCA XR
	TAD I XR
	SNA
	JMP NOBKAR
	TAD [-"<
	SZA CLA
	JMP .-5
	CLA CMA
NOBKAR,	DCA OUTSW
	TAD [BEGLN-1
	DCA LXR
BEGGRP,	TAD OUTSW
	SNA CLA
	TAD BEGDIF		/DIFF BETWEEN INPUT & OUTPUT AREAS
	TAD [MOFILE-1
	DCA CLXR
	STA
	DCA DVFLAG
	DCA DEV1
FILLP1,	DCA DEV2
FILLP,	JMS I [GNAME
	TAD ["A-":	/AC CONTAINED DELIM - "A
	SNA CLA
	JMP DEVNAM
	JMS I [ASSIGN
	TAD OUTSW
	SNA CLA
	TAD LIMDIF		/DIFF BETWWEN END OF OUTPUT & INPUT AREAS
	TAD OUTLIM		/END OF OUTPUT AREA
	TAD CLXR
	SMA CLA
	JMP CDER1
	TAD OUTSW
	SNA CLA
LKUPSW,	JMP INFILE		/ZEROED IF IN "SPECIAL DECODE" MODE
	CDF 10
	TAD DVICE
	DCA I CLXR
	TAD NAME1
	DCA I CLXR
	TAD NAME2
	DCA I CLXR
	TAD NAME3
	DCA I CLXR
	TAD NAME4
CDSKP,	SKP
INFILE,	JMS I [LOOKUP
	DCA I CLXR
DLOOK,	CDF 0
	STA
	DCA DVFLAG
	TAD DELIM
	SNA
	JMP CDOVER
	TAD [-"[
	SNA
	JMP I [OLENGT
	TAD ["[-",
	SNA
	JMP FILLP
	TAD [",-"<
	SNA
	JMP BKAROW
	TAD ["<-"=
	SZA CLA
	JMP I [CDER2
EQUAL,	DCA NUMFUJ
	JMS NUMBER
	DCA I [MPARAM+3
	CLA CLL CML RAR
	AND I [MPARAM-1	/PRESERVE  ALTMODE
	TAD HIORD
	DCA I [MPARAM-1
	JMP DLOOK
BKAROW,	ISZ OUTSW
	JMP I [CDER2
	JMP BEGGRP
DEVNAM,	TAD NAME1
	DCA DEV1
	ISZ DVFLAG
	JMP I [CDER2	/CATCHES A:B:
	TAD NAME2
	JMP FILLP1
CDOVER,	TSF
	JMP .-1	/LET PRINTER QUIET DOWN
	TCF	/AND CLEAR FLAG
	CDF CIF 10
	TAD TMONIT
	DCA I [200	/RESTORE "MONITO"
	TAD TUSRFG
	DCA I [USERFG	/RESTORE "USER FLAG"
	TAD TFPUTX	/LOAD "USER CALLING FIELD" INTO AC
	JMP I CD	/RETURN - MONITOR RESTORES CORE IF NECESSARY
NUMBER,	4000	/USED BY SYSGEN
	TAD CDSKP
	DCA NUMADD	/SET NUMADD TO EITHER "SKP" OR "TAD NUM"
	DCA HIORD
NUMLP,	DCA NUM
	JMS NUMTST	/INTO PAGE 0 FOR RANGE TEST
	SNL
	JMP EONUM
	DCA T
	CLA CLL CMA RTL
	DCA DELIM
	TAD NUM
ROTLP,	CLL RAL
	DCA NUMX
	TAD HIORD
	RAL
	SPA
	JMP I [CDER2
	DCA HIORD
	TAD NUMX
	ISZ DELIM
	JMP ROTLP
NUMADD,	TAD NUM		/SKP IF OCTAL
	TAD NUM
	TAD T
	JMP NUMLP
EONUM,	TAD ["0
	DCA DELIM
	TAD NUM
	CDF 10
	JMP I NUMBER
CDER1,	JMS I [PRMESG
	TEXT	/TOO MANY FILES/
	IFZERO .&400 <*400>
ASSIGN,	0
	TAD CLXR
	AND DVFLAG
	TAD OUTLIM
	SMA SZA CLA	/CHECK FOR OUTPUT OR FIRST INPUT
	JMP ASNORM	/IF DEVICE WAS SPECIFIC, OR IF WE ARE ON THE INPUT SIDE,
			/PROCEED NORMALLY
	TAD NAME1
	SNA CLA
	JMP ASGNST
	TAD DFLTNM+1
	DCA DEV2
	TAD DFLTNM
	DCA DEV1
ASNORM,	TAD DEV1
	DCA AS+1
	TAD DEV2
	DCA AS+2
	TAD OUTSW
	SNA CLA		/DON'T LOAD HANDLER IF WE ARE ON OUTPUT SIDE OF "_"
	TAD NAME1
SPKLG1,	SNA CLA		/OR IF THERE IS NO FILE NAME TO LOOK UP
	TAD GETHND	/GETHND=11 NORMALLY, 0 IF IN "SPECIAL DECODE" MODE
	IAC
	DCA AS
	TAD [1401	/ALLOW TWO PAGE HANDLERS
	DCA ASADR
	CIF 10
	JMS I [200
AS,	0
	0
	0
ASADR,	1401
	JMP I [CDER0
	TAD AS+2
ASGNST,	DCA DVICE
	JMP I ASSIGN
GNAME,	0
	DCA NAME1
	DCA NAME2
	DCA NAME3
	DCA NAME4
	TAD [NAME1
	DCA NMBASE
	CLA CMA
	DCA PERDSW
	DCA NAMECT
GTNMLP,	JMS I [GCH
	DCA DELIM
	TAD DELIM
	TAD [-"?
	SZA
	TAD ["?-"*
	SNA
STARSW,	JMP I [CDER2	/"JMP STARNM" IF "SPECIAL DECODE" MODE
	TAD ["*-".
	SNA CLA
	JMP PERIOD
	JMS I [DECODE
	JMP I GNAME
STARNM,	CLA		/THIS CODE HANDLES *'S AND ?'S CORRECTLY
	TAD DELIM
	AND [77
	DCA DELIM
	TAD NAMECT
	TAD [-6
	SMA CLA
	JMP GTNMLP
	TAD NAMECT
	CLL RAR
	TAD NMBASE
	DCA TT
	TAD DELIM
	SZL
	JMP .+4
	RTL
	RTL
	RTL
	TAD I TT
	DCA I TT
	ISZ NAMECT
	JMP GTNMLP
PERIOD,	TAD NAME1
	SZA CLA
	ISZ PERDSW
	JMP I [CDER2
	ISZ NMBASE
	TAD [4
	JMP GTNMLP-1
LOOKUP,	0
	DCA LNAME
	TAD NAME1
	SNA CLA
	JMP LKUPST
	JMP EXT1
LKUPLP,	DCA LNAME
	TAD AS+2
	CIF 10
	JMS I [200
	2
LNAME,	0	/NAME1
LENGTH,	0
	JMP LFAILD
	TAD LENGTH
	CLL
	TAD [400
	SNL
	CLA
	CLL RTL
	RTL
	AND [7760
LKUPST,	CDF 10
	TAD DVICE
	DCA I CLXR
	TAD LNAME
	JMP I LOOKUP
LFAILD,	TAD NAMECT
	SNA CLA		/WAS THERE AN EXPLICIT EXTENSION?
	TAD DEFALT	/NO - WAS THERE A DEFAULT EXTENSION?
	SNA CLA
	JMP I [CDER3	/YES OR NO - FILE NOT FOUND
	ISZ NAMECT	/NO AND YES - SET FLAG TO FAIL NEXT TIME
	JMP EXT2	/ZERO OUT THE EXTENSION AND TRY AGAIN
CDER3,	JMS I [PRNAME
	JMS I [PRMESG
	TEXT	/ NOT FOUND/
	IFZERO .+200&1000 <*600>
	0		/V3 [FREE LOC]
SLSHCH,	0
/V3	SNA
/V3	JMP I [CDER2
	DCA DELIM
	TAD [MPARAM-1
	DCA T
	JMS I [DECODE
	JMP I [CDER2
	SZL
	TAD [32
	CMA STL	/THE FOLLOWING TURNS ON THE CORRECT OPTION BIT
	DCA TT
SLSHLP,	SZL
	ISZ T
	RAR
	SNL
	ISZ TT
	JMP SLSHLP
	DCA TT
	CDF 10
	TAD TT
	CMA
	AND I T
	TAD TT
	DCA I T
	CDF 0
	JMP I SLSHCH
DECODE,	0
	TAD DELIM
	TAD [-"9-1
	CLL
	TAD ["9+1-"0
	SZL
	JMP DCDYES
	TAD ["0-"Z-1
	CLL CML
	TAD ["Z-"A+1
	SNL
DCDYES,	ISZ DECODE
	JMP I DECODE
CDER0,	TAD DEV1
	JMS I [PRWD
	TAD DEV2
	JMS I [PRWD
	JMS I [PRMESG
	TEXT	/ DOES NOT EXIST/

RESTRT,	JMS I [CRLF
	CDF 10
	TAD [MOFILE-1
	DCA XR
	TAD [-47
	DCA T
	DCA I XR	/ZERO OUT THE COMMAND DECODER OUTPUT AREA
	ISZ T
	JMP .-2
	CDF 0
	JMP I [GLINE
GCH,	0
	TAD I LXR
	TAD [-240
	SNA
	JMP GCH+1
	TAD [240-"/
	SNA
	JMP SLASH
	TAD ["/-"(
	SNA
	JMP OPENP
	TAD ["(
	JMP I GCH
SLASH,	TAD I LXR
	JMS I [SLSHCH
	JMP GCH+1
OPENP,	TAD I LXR
	TAD [-")
	SNA
	JMP GCH+1
	TAD [")
	JMS I [SLSHCH
	JMP OPENP
OLENGT,	TAD OUTSW
	AND NAME1	/[N] IS ONLY LEGAL ON THE OUTPUT SIDE OF THE "_"
	SNA CLA		/AND ONLY AFTER A FILE NAME
	JMP I [CDER2
	TAD [-4
	TAD CLXR
	DCA NMBASE
	CLA CLL CML RTL
	DCA NUMFUJ	/SET "NUMBER" TO ACCEPT DIGITS 8 AND 9
	TAD OLFUDJ	/LOAD FUDGE SO THAT "NUMBER" WILL BE DECIMAL
	JMS I [NUMBER
	CLL RTL
	RTL
	AND [7760
	TAD I NMBASE
	DCA I NMBASE
	CDF 0
	TAD DELIM
	TAD [-"]	/IS THERE A CLOSING BRACKET?
	SNA		/IF NOT, "DLOOK" ROUTINE WILL DETECT IT
	JMS I [GCH
	DCA DELIM
	JMP I [DLOOK
OLFUDJ,	NUM&177+1570

CDER2,	CLA
	JMS I [PRMESG
	TEXT	/ILLEGAL SYNTAX/
	IFZERO .&1000 <*1000>
	/TELETYPE INPUT ROUTINE FOR COMMAND DECODER
GLINE,	TAD (252	/SETS 1177=252 FOR * IN MESSAGE
	JMS I PRINT
	DCA RBFLAG
	TAD [BEGLN-1
	DCA LXR
CHLOOP,	6031		/KSF
	JMP CHLOOP
	TAD [200
	6034		/KRS
	DCA NAME1
	6032		/KCC
	TAD [SPADR-1
	DCA XR
DSPCHL,	TAD I XR
	SZA
	TAD NAME1
	SNA CLA
	JMP I XR
	JMP DSPCHL
SPADR,	-225;JMP CTRLU
	-215;JMP CARRET
	-377;JMP RUBOUT
	-375;JMP ALTMOD	/V3D MODIFIED BY SET
	-376;JMP ALTMOD	/V3D MODIFIED BY SET
	-233;JMP ALTMOD
	-200;JMP CHLOOP
	-217;JMP CHLOOP	/^O
	 -"_;JMP LESSTN
	-212;JMP LFEED
	-203;JMP CTRLC	/MUST BE LAST - SEE CLRLIN CODE
	0
	JMS PRNT
CINSRT,	TAD NAME1
	DCA I LXR
	TAD LXR
	TAD [-EOBUFR+2
	SPA CLA
	JMP CHLOOP
	JMS CRLF
	JMP I [CDER2
CARRET,	JMS CRLF
CLFINI,	DCA I LXR
	JMP I [ANALYZ
LESSTN,	JMS PRNT
	TAD ["<
	JMP CINSRT+1
CTRLC,
CTRLU,	TAD [336
	JMS I PRINT
	TAD NAME1
	TAD [100
CLRLIN,	JMS I PRINT
	JMS CRLF
	TAD I XR
	SZA CLA
	JMP GLINE
	CDF 10
	CLA CMA
	DCA I [7700
	TSF
	JMP .-1
	JMP I [7605	/7605=CDF CIF 10
CRLF,	0
	TAD [215
	DCA NAME1
	JMS PRNT
	TAD [212
	JMS I PRINT
	JMP I CRLF
ALTMOD,	TAD [244
	DCA NAME1
	CLA CLL CML RAR
	CDF 10
	DCA I [MPARAM-1
	CDF 0
	JMS PRNT
	JMP CLFINI
/*** LOCATIONS ON THIS PAGE ARE MODIFIED BY SET
/SEE SET FOR DETAILS.  DO NOT CHANGE.

RUBOUT,	TAD LXR
	TAD [1-BEGLN
	SNA CLA
	JMP RBSPCL
	TAD [334
	ISZ RBFLAG
	JMS I PRINT
	CLA CMA
	DCA RBFLAG
	TAD LXR
	DCA T
	TAD I T
	JMS I PRINT
LBCKUP,	CLA CMA
	TAD LXR
	JMP CHLOOP-1
RBSPCL,	ISZ RBFLAG
	JMP CLRLIN+1
	TAD [334
	JMP CLRLIN
PRNT,	0
	ISZ RBFLAG
	JMP .+3
	TAD [334
	JMS I PRINT
	DCA RBFLAG
	TAD NAME1
	JMS I PRINT
	JMP I PRNT
LFEED,	JMS CRLF
	DCA I LXR
	TAD [BEGLN-2
	DCA XR
	TAD I XR
	SNA
	JMP LBCKUP
	JMS I PRINT
	JMP .-4

	IFNZRO RUBOUT-1131 <_ERROR_>
	*1200		/INITIALIZATION - STORED OVER BY LINE BUFFER
	BEGLN=.		/LINE BUFFER
CDINIT,	DCA TFPUTX
	CDF 10
	CLA IAC
	TAD I [200
	DCA TMONIT	/SAVE AWAY MONITOR CALL ADDRESS SINCE WE CALL
	TAD I [USERFG	/THE MONITOR RECURSIVELY, LIKEWISE SAVE
	DCA TUSRFG	/THE "USER FLAG" AND THE FIELD WE WERE CALLED FROM
	TAD I [T1	/FETCH THE USERS ARGUMENT
	DCA DEFALT	/STORE IN THE DEFAULT EXTENSION WORD
	DCA I [7	/ZERO "DIRECTORY SEGMENT IN CORE" KEY
	CDF 0
	CIF 10
	JMS I [200
	13		/RESET ALL HANDLERS
	0		/BUT NOT OUTPUT FILES
	TAD DEFALT
	TAD M5200
	SZA CLA		/IS THIS A REQUEST FOR A "SPECIAL DECODE"?
	JMP CDCONT	/NO
	TAD ALTLIM
	DCA OUTLIM	/YES - SET UP ALL THE PROPER LOCATIONS
	TAD ALTDF1
	DCA LIMDIF	/TO YIELD 1 OUTPUT FILE AND 5 INPUT FILES
	TAD ALTDF2
	DCA BEGDIF	/ALL OF WHICH ARE 5-WORD <DEVICE,NAME> ENTRIES
	DCA I PLKUPS
	TAD STARJM
	DCA I PSTARS	/AND ALLOW * AS A FILE OR EXTENSION NAME
	DCA DEFALT	/NO DEFAULT EXTENSION IN "SPECIAL" MODE
	TAD CCLA	/STOPS FETCHES IN SPECIAL MODE
	DCA I PSPKG1	/NO HANDLER FETCHES NECESSARY EITHER SINCE NO LOOKUPS
CDCONT,	TAD I PRWD	/SEE IF BATCH FLAG IS UP
	RAL
	SPA CLA		/IF YES, GO TO PAGE0 CODE
	JMP TT		/TT ETC. IS ONCE-ONLY CODE
	JMP I CDRST
CDRST,	RESTRT+1
		/CONSTANTS NECESSARY TO SUPPORT "SPECIAL DECODE" MODE
M5200,	-5200
ALTLIM,	1-MOFILE-5
ALTDF1,	MOFILE+5-MPARAM+5
ALTDF2,	5
PLKUPS,	LKUPSW
STARJM,	STARNM&177+5200		/"JMP STARNM"
PSTARS,	STARSW
CCLA,	CLA
PSPKG1,	SPKLG1
	*1314
	EOBUFR=.
PRMESG,	0
	TAD I PRMESG
	JMS PRWD
	TAD I PRMESG
	ISZ PRMESG
	AND [77
	SZA CLA
	JMP PRMESG+1
	JMP I [RESTRT
PRWD,	7777
	DCA T
	TAD T
	RTR
	RTR
	RTR
	JMS PCHAR
	TAD T
	JMS PCHAR
	JMP I PRWD
PCHAR,	0
	AND [77
	SNA
	JMP I PCHAR	/IGNORE NULLS
	TAD [240
	AND [77
	TAD [240
	JMS TYPE
	JMP I PCHAR
PRNAME,	0
	TAD NAME1
/	SNA		/WOULD LIKE TO FIND ROOM FOR THESE 2 LOCS
/	JMP I [CDER2
	JMS PRWD
	TAD NAME2
	JMS PRWD
	TAD NAME3
	JMS PRWD
	TAD NAME4
	SNA CLA
	JMP I PRNAME
	TAD [256
	JMS PCHAR
	TAD NAME4
	JMS PRWD
	JMP I PRNAME
TYPE,	0
	JMP .+3
	TSF
	JMP .-1
	TLS
	CLA
	TAD [7000
	DCA TYPE+1
TYPRET,	JMP I TYPE
	IFNZRO TYPRET-1377 <BATCHX,ZQWE>
	*4001	/PROG TO WRITE CD AND ODT ONTO NEW SYSTEM DEVICE
		/4000=JMS SYSSWP TO SWAP PGS 6600 AND 7600
	TAD I (7777	/SET TO PROPER RECORD FOR FIELD 1 STUFF
	DCA F1STUF
	JMS I SYSHND
	4600
	0
	MCDREC
	JMP CERR
	JMS I SYSHND
	5011
	0
	ODTREC
	JMP CERR
	JMS I SYSHND
	0110		/READ IN UPPER PG 7600
	7600
F1STUF,	0
	JMP CERR
	JMP I .+1
	7605		/START HER UP
CERR,	TAD .+3
	DCA 4001
	JMP 4000	/RESWAP AND HALT
	HLT
SYSHND,	7607
	PAGE
	*0
	CDVERSION
	HLT		/POWER FAIL RESTART PROTECTION
NUMTST,	7777
	JMS I [GCH
	CMA
	TAD NUMFUJ
	TAD ["8		/TEST INPUT CHARACTER FOR RANGE
	CLL CMA		/0-7 IF NUMFUJ=0
	TAD [10		/0-9 IF NUMFUJ=2
	TAD NUMFUJ
	JMP I NUMTST
	*15
LXR,	0
XR,	0
CLXR,	0
T,	CDINIT
TT,	CDF 0		/***GETS SET TO CDF BATCH
HIORD,	TAD I DVICE	/CHECK TO SEE IF BOS IS REALLY THERE
NUMX,	TAD OUTSW	/IF NOT, SIGNAL ERROR
RBFLAG,	SNA CLA
NAME1,	JMP NAMECT	/IT'S O.K.....PROBABLY!
NAME2,	CDF 0		/BAD. SIGNAL ERROR TO MONITOR
NAME3,	ISZ I NUMTST
NAME4,	JMP I [7605	/AND RESTART BATCH MONITOR
NAMECT,	CIF CDF 0	/*****GETS ALTERED******
NMBASE,	JMP I .+1	/START UP IN CD AREA OF BATCH
DEV1,	RESTRT+1	/***GETS ADDRESS OF CD AREA
DEV2,	0
PERDSW,	0
NUMFUJ,	0
DVFLAG,	0
DELIM,	0
OUTSW,	0
DEFALT,	0
DVICE,	0
DFLTNM,	0423;1300	/DSK
BEGDIF,	MIFILE-MOFILE
LIMDIF,	MIFILE-MPARAM+2
OUTLIM,	1-MIFILE
GETHND,	11
TMONIT,	0
TUSRFG,	0
TFPUTX,	0
EXT1,	TAD NAME4
	DCA NAMECT	/REMEMBER TYPED EXTENSION
	TAD NAMECT
	SNA
	TAD DEFALT	/SUBSTITUTE DEFAULT IF ZERO
EXT2,	DCA NAME4
	TAD [NAME1
	JMP I .+1
	LKUPLP
PRINT,	TYPE
	FIELD 1
	XLIST
	EJECT INVISIBLE ODT
	/INVISIBLE ODT FOR OS/8 MONITOR
	/LOADS INTO FIELD 1 NOW, BUT LOADS & EXECUTES IN FIELD 0
	/DEFINITIONS OF MONITOR SYMBOLS - VOLATILE!
	ODTREC=60
	UDNAME=7741
	MREAD=7757
	MGET=7667
	KMREC=7
	MTEMP=27
	MARG1=7740
	JSBITS=7746
	LXM=6200		/EXTENDED MEMORY REGISTER LOAD
	RXM=6230		/EXTENDED MEMORY REGISTER READ
	RACA=6175		/EXTENDED MEMORY BIT MANIPULATION
	RACB=6176		/"                              "
	RACC=6177		/"				"
	*200
READ,	JMS I [OCRLF
READ5,	DCA WORD
	DCA WORD+1
	TAD [-7		/ SET CHARACTER LIMIT
	DCA TOTE
REA,	KSF		/CHARACTER INPUT
	JMP .-1
	JMS I [CTCTST	/CONTROL 'C' TEST
	JMP CTRC	
	TAD (203
	DCA TEMP	/STORE CHARACTERS
	KCC
	TAD TEMP
	JMS I [TYPN	/ECHO INPUT CHARACTERS
	TAD TABL1A	/SET UP COMMAND TABLE SEARCH
	DCA 10
CHFLP,	TAD I 10	/CHARACTER I.D.
	SPA
	JMP SEX		/NO COMMAND -NUMERIC INPUT
	CIA
	TAD TEMP
	SZA CLA
	JMP CHFLP	/NOT THIS ONE-TRY NEXT ONE
	TAD 10		/THIS IS THE COMMAND
	TAD TABL2A	/SET UP JUMP TO COMMAND SUBROUTINE
	DCA TEMP
	TAD I TEMP
	DCA TEMP
	TAD WORD
	JMS I [XLODE	/BANK AND FIELD ADJUSTMENT
	DCA WORD
	JMP FLDTST	/SEE IF FIELD SETTING IS LEGAL
CTRC,	JMS I [DUMP	/CONTROL 'C'
	LXM		/DISABLE KT8A
	JMP I [7605
TABL1=.		/COMMAND TABLE
	240		/SPACE
	212		/LINE FEED
	215		/CR
	257		/SLASH
	302		/B
	307		/G
	273		/;
	303		/C
	327		/W
	336		/^
	315		/M
	301		/A
	314		/L
	304		/D
	337		/<-ARROW
	306		/F
	377		/RUBOUT
	253		/+
	255		/-
	-270		/USED - SEE "SEX"
EXAM,	JMS TOTTST	/SLASH SUBROUTINE-LOCATION EXAMINATION
	JMP EX2
	TAD WORD	/FIELD
	DCA CAD
	TAD WORD+1	/ADDRESS
	DCA CAD+1
EX2,	JMS LOAD	/GET LOCATION CONTENTS
	CAD
	JMS I [PNUM	/ECHO CONTENTS 
	DCA SHUT
	JMP READ5
SEX,	TAD TEMP	/ADDRESS & FIELD ADJUSTMENT
	CLL
	TAD [10		/TEST FOR NUMBER
	SNL
	JMP NO
	DCA TEMP
	CLA CLL CMA RTL
	DCA CRL
SROT,	TAD WORD+1	/FIELD & ADDRESS PROCESSING
	CLL RAL
	DCA WORD+1
	TAD WORD
	RAL
	DCA WORD	/FIELD AND BANK STORAGE
	ISZ CRL
	JMP SROT
	TAD WORD+1
	TAD TEMP
	DCA WORD+1	/ADDRESS STORAGE
	ISZ TOTE	/TEST FOR TOO MANY CHARACTERS
	JMP REA
NO,	CLA		/UNACCEPTABLE INPUT ECHOS ?
	TAD [277
	JMS I [TYPN
	JMP READ
CRL,	0		
	JMS TOTTST
	JMP I CRL
	TAD WORD+1
	ISZ SHUT
	JMS I [STORE
	CAD
	CLA
	JMP I CRL
CRL1,	JMS CRL		/CARRAIGE RETURN
	JMP READ
CRL2,	TAD [215	/LINE FEED
	JMS I [TYPN
	JMS CRL
	JMS I [TYPN
	ISZ CAD+1
TABL1A,	TABL1-1
UPAR3,	JMS I [TYPD
	CAD
	TAD [257
	JMS I [TYPN
	JMP EX2
OPIN,	JMS CRL		/BKARROW/UNDERLINE
	JMS LOAD
	CAD
	DCA CAD+1
	TAD INDFLD
	JMS I [XLODE
	DCA CAD
UPAR2,	JMS I [OCRLF
	JMP UPAR3
SEMI,	JMS CRL		/SEMI COLON
	ISZ CAD+1
TABL2A,	TABL2-TABL1
	JMP READ5
	*400
/NOTE THAT LOCATIONS BURP,BURP+1 GET ALTERED AFTER BRKTST
/IS EXECUTED. THEY BECOME: CDF 10; TAD I [MARG1
BURP,	JMP I .+1	/RETURN FROM BREAKPOINT -GO REDETERMINE CORE SIZE
	BRKTST		/TO MAKE ILLEGAL FIELD GIVE ?
	DCA SAC
	/IOF	/COMMENTED OUT FOR HIGH GROUND SUPPORT
	TAD I [MTRAD		/RESTABLISH ADDRESS,FIELD,ETC.
	DCA TRAD
	TAD I [MTRAD1		/THESE ARE ALL 
	DCA TRAD+1
	TAD I [MKEEP		/BREAKPOINT PARAMETERS
	DCA KEEP
	TAD I [MPUNN		/
	DCA PUNN
	CLA IAC
	AND I (7700
	DCA LINK
	TAD I (7700
	CDF 0
	JMS I [T174	/BANK AND FIELD MANIPULATION
	TAD DATFLD
	DCA INDFLD
	TAD [KMREC
	CDF 10
	DCA I (MGET+4
	CLA CLL CMA RAL
	AND I [MGET+2
	DCA I [MGET+2	/REMOVE LOW-ORDER BIT FROM CONTROL WORD
	CDF 0
	TAD KEEP
	JMS I [STORE
	TRAD
	TAD TRAD+1
	IAC
	DCA GAME+1		/ESTABLISH CONTINUE PARAMETERS
	TAD TRAD
	DCA GAME
	TAD KEEP
	DCA INST
	JMS IOTTST
	SKP
	JMP JMPLIP
	TAD TRAD
	DCA CAD			/ESTABLISH EXAM PARAMETERS
	TAD TRAD+1
	DCA CAD+1
	JMS I [EFFADR
	TAD CAD
	DCA FROG
	TAD CAD+1
	DCA FROG+1
JMPLIP,	JMS I [CTCTST
	JMP I [7605
	CLA
	JMP I (LIP
CTCTST,	0		/CONTROL 'C' TEST
	TAD [200
	KSF
	STA
	KRS
	TAD (-203
	SZA
	ISZ CTCTST
	JMP I CTCTST

OCRLF,	0		/CARRAIGE RETURN-LINE FEED
	TAD [215
	JMS I [TYPN
	TAD [212
	JMS I [TYPN
	CLA CMA
	DCA SHUT
	JMP I OCRLF
TRAP,	JMS TOTTST	/ESTABLISHES BREAKPOINT
	TAD [SHNDLR
	TAD WORD+1
	DCA TRAD+1	/ADDRESS
	TAD WORD
	DCA TRAD	/FIELD
	TAD [7000
	DCA I [SHNDLR
	TAD [4
	DCA WORD+1
	TAD [UDNAME-MPUNN-1
	DCA TEMP
	TAD [BRKCOD-1	/MOVE UP RETURN CODE
	DCA 10
	TAD [UDNAME-1
	DCA 11
	TAD I 10
	CDF 10
	DCA I 11
	CDF 0
	ISZ TEMP
	JMP .-5
	TAD I [JSBITS
	RTR
	SZL CLA
	TAD [5
	CDF 10
	TAD I [J7600
	DCA I [J7600	/CHANGE JMP 7600 TO JMP 7605 IF ODT AREA NOT USED
	CDF 0
	TAD I [JSBITS
	DCA JSTEMP		/SAVE JSBITS BEFORE SETTING BRKPT
	TAD [CIF 10
	JMS I [STORE
	WORD
	ISZ WORD+1
	TAD [JMP I 6	/STORE RETURN JMP
	JMS I [STORE
	WORD
	ISZ WORD+1
	TAD DNAME
	JMS I [STORE
	WORD
	TAD JSTEMP
	DCA I [JSBITS		/RESTORE JSBITS
	JMP I [READ
SUBT,	CML
ADD,	TAD WORD+1	/MODIFY CURRENT LOCATION POINTER
	SNA
	IAC		/1 IS DEFAULT VALUE
	SZL		/+ OR -?
	CIA		/-
	TAD CAD+1
	DCA CAD+1
	JMP I [UPAR2	/AND DISPLAY LOC AND CONTENTS
	*600		/MONITOR ENTERS ODT HERE
LIP,	HLT		/ERROR. AT INIT, THE CODE AT 600
	JMP I .+1	/IS CHANGED TO: ISZ PUNN;
TTYTST,	INIT		/JMP XCONT; TSF
	JMP TTYOFF
LIPTYP,	JMS I [TYPD
	TRAD
	TAD P250
	JMS I [TYPN
	TAD LINK
	TAD [260
	JMS I [TYPN
	TAD [273
	JMS I [TYPN
	TAD SAC
	JMS I [PNUM
	JMP I [READ
JUMP,	JMS TOTTST	/TEST FOR 'G' WITH NO ADDRESS
	JMP I PNO
	TAD WORD
	DCA GAME
	TAD WORD+1
	DCA GAME+1
	TAD WORD
	JMS I [T174	/FIELD ADJUSTMENT -STORED IN DATFLD
	TAD [7000
	DCA INST
	DCA SAC
	DCA LINK
	JMP CONTX
CONTIN,	

	TAD WORD+1	/ 'C'-CONTINUE COMMAND
	CIA
	SNA
CONTX,	CMA
	DCA PUNN
	DCA I [7607	/IN CASE THERE WAS NO BREAKPOINT
	JMS LOAD	/V3
	TRAD		/V3
	DCA KEEP	/V3
	JMS I [OCRLF
XCONT,	TAD [JMP 4
	JMS I [STORE
	TRAD
	CDF 10
	TAD TRAD
	DCA I [MTRAD
	TAD TRAD+1
	DCA I [MTRAD1
	TAD KEEP
	DCA I [MKEEP
	TAD PUNN
	DCA I [MPUNN
	CDF 0
	TAD EXTEMP
	LXM
	JMS I [SIM	/SIMULATE THE BRKPOINTED INST HERE
	TAD LINK	/SAVE LINK
	DCA I [MLINK	/ESTABLISH RETURN CODE---MXXXX'S
	TAD SAC		/SAVE AC
	DCA I [MAC
	TAD GAME	/ESTABLISH START CDF
	TAD [CIF 0
	DCA I [MSTCDF
	TAD DATFLD	/ESTABLISH 'B' CDF
	JMS I [XLODE
	TAD [CDF 0
	DCA I [MCDF
	TAD GAME+1	/ESTABLISH START ADDRESS
	DCA I [MSTADR
	JMS I [DUMP
	TAD I [JSBITS
	RTR
	SZL CLA
	JMP I [MSWITC
	JMP I [MREAD	/EXECUTION TIME
UPAR1,	JMS I [CRL	/UP-ARROW COMMAND- CLOSE LOCATION
	JMS I [EFFADR
	JMP I [UPAR2	/PRINT REFERENCED LOCATION CONTENTS
EFFADR,	0		/USE CONTENTS AS MRI
	JMS LOAD
	CAD
	AND [177	/ISOLATE LOCATION REFERENCED
	DCA TEMP
	JMS LOAD
	CAD
	AND [200	/IS IT 'THIS PAGE'?
P250,	SNA CLA
	JMP .+3
	TAD CAD+1
	AND [7600
	TAD TEMP
	DCA TEMP
	JMS LOAD
	CAD
	AND T400	/IS IT INDIRECT-TEST '400' BIT
	SNA CLA
	JMP NOIND
	TAD TEMP
	DCA CAD+1
	JMS LOAD
	CAD
	DCA TEMP
	TAD CAD+1
	AND P7770	/IS IT AUTO-INDEXED?
	TAD P7770
	SZA CLA
	JMP NOAUTO
	ISZ TEMP
P7770,	7770		/COVERS ISZ....
	TAD TEMP
	JMS I [STORE
	CAD
NOAUTO,	TAD INDFLD	/NO INDEXING
	JMS I [XLODE
	DCA CAD
NOIND,	TAD TEMP	/NOT INDIRECT
	DCA CAD+1
	JMP I EFFADR
TTYOFF,			/WASTE SOME TIME
	JMS IOTTST
T400,	AND I 0
	ISZ NOUGHT
	JMP TTYTST
	JMP LIPTYP	/IF THE TTY FLAG ISN'T UP NOW, IT'LL NEVER GO UP
TABL2=.		/COMMAND TABLE SUBROUTINE INFO
	REA		/IGNORE BLANKS
	CRL2
	CRL1
	EXAM
	TRAP
	JUMP
	SEMI
	CONTIN
	WSER
	UPAR1
	MASKX
	ACX
	LINKX
	DATF
	OPIN
	INDF
	RBOUT
	ADD
	SUBT
IFZERO 1000&. <*1000>
PNUM,	0		/PRINTS CONTENTS OF ADDRESS LOCATION
	DCA PUNN	/OR ADDRESS...ITSELF
	TAD [-4
	DCA TEMP
PN2,	TAD PUNN
	RTL
	RAL
	DCA PUNN
	TAD PUNN
	RAL
	AND [7
	TAD [260
	JMS I [TYPN
	ISZ TEMP
	JMP PN2
	TAD [240
	JMS I [TYPN
	JMP I PNUM
TYPD,	0		/PRINTS BANK AND FIELD OF ACCESSED LOC.
	TAD I TYPD
	DCA TEMP
	TAD I TEMP
	JMS I TYPDXX
	JMS I [TYPN	/TYPE BANK
	TAD NWD		 
	JMS I [TYPN	/TYPE FIELD
	TAD I TEMP
	JMS I [PNUM	/PRINT ADDRESS
	ISZ TYPD
	JMP I TYPD
TYPDXX,	TYPDX
TYPN,	0		/PRINTS CHARACTERS PREPARED BY TYPD;PNUM,ETC.
	TLS
	TSF
	JMP .-1
	CLA
	JMS I [CTCTST
	JMP I [CTRC
	TAD [-14	/^O?
	SZA CLA
	JMP I TYPN	/NO
	KCC		/YES
	JMP I [READ
WSER,	JMS I [OCRLF	/ 'W'---WORD SEARCH
	TAD LIMLO
	DCA CKT+1	/ESTABLISH LOWER LIMIT
	TAD INDFLD
	JMS I [XLODE	/ADJUST WORD SEARCH BANK AND FIELD
	DCA CKT
WSER1,	JMS LOAD
	CKT
	AND MASK	/SEARCH MASK
	CIA
	TAD WORD+1
	SZA CLA
	JMP WSER2
	JMS I [TYPD	/WORD FOUND GO TYPE IT
	CKT
	TAD [257
	JMS I [TYPN
	JMS LOAD
	CKT
	JMS I [PNUM
	JMS I [OCRLF
WSER2,	TAD CKT+1	/TEST NEXT LOCATION
	CIA
	TAD LIMHI	/IF IT ISN'T ABOVE THE LIMIT
	SNA CLA
	JMP I [READ	/OVER LIMIT GO GET NEXT COMMAND
	ISZ CKT+1
	JMP WSER1	/SEARCH NEXT LOCATION

ACX,	TAD [SAC-LINK	/ 'A' COMMAND
LINKX,	TAD [LINK-MASK	/ 'L' COMMAND
MASKX,	TAD [MASK-INDFLD	/ 'M' COMMAND
INDF,	TAD [INDFLD-DATFLD		/'F' COMMAND
DATF,	TAD [DATFLD	/ 'D' COMMAND
	DCA WORD+1
	CLA CMA
	DCA WORD
	DCA TOTE
	TAD [257
	JMS I [TYPN
	JMP I [EXAM
BRKCOD=.		/RETURN CODE --- FROM 'G','C' COMMANDS
	NOPUNC
	*UDNAME		/STORED IN UPPER FIELD ZERO
	ENPUNC

	DCA MARG1
	RAL
	RDF
	DCA 7700
	TAD PODT
	DCA MGET+4
	ISZ MGET+2	/DON'T REVERSE TAPE MOTION TO PICK UP ODT
	CDF CIF 0
J7600,	JMP 7600
PODT,	ODTREC
P7603,	7603
MTRAD,	0
MTRAD1,	0
MKEEP,	0
MPUNN,	0

	NOPUNC
	*BRKCOD+MPUNN-UDNAME+1
	ENPUNC

DUMP,	0		/SUBROUTINE TO STORE ADJUSTED CODE
	TAD STOFLG	/LT
	SNA CLA
	JMP I DUMP
	JMS I [SHNDLR
	4200
	1400
GREC,	0		/SET BY GETADR
	HLT
	DCA STOFLG
	JMP I DUMP

RBOUT,	TAD [277	/RUBOUT COMMAND
	JMS I [TYPN
	TAD [240
	JMS I [TYPN
	JMP I REDE5
	IFNZRO .-1200&4000 <*1200>
SIM,	0		/SIMULATES BREAKPOINTED INST
	JMS IOTTST
	JMS LOAD
	FROG
	DCA TEMP
	JMS I [DUMP
	DCA I [GREC
	JMS I [SHNDLR	/DUE TO 128K CODE -SIM IS LOADED INTO 1600
	0100
SIMXT,	1600
	64
	HLT
	JMS I SIMXT
	JMS I [STORE
	FROG
	JMP I SIM
XLODE,	0		/TRANSFORMS 'ABCDE' TO 'ACDEB0' FOR CDF
	DCA NWD
	TAD TEMP	/TEST FOR GO COMMAND
	CIA		/A 'GO' ABOVE 32K REQUIRES SETTING EXTEMP
	TAD TJUMP	/FOR LXM ENABLE
	SNA CLA
	TAD (30
	AND NWD
	SNA CLA 
	JMP LT32K
	TAD [7000
	DCA EXTEMP
LT32K,	TAD NWD		/TRANFORMATION IS HERE
	AND (17
	TAD (7770
	SPA
	TAD (17
	TAD [7771
	TAD NWD
	CLL RTL
	JMP I XLODE

T174,	0		/TRANSFORMS 174 TO 37
	CLL RTR
	RAR
	AND (17
	TAD [10
	AND [7767	/... 0027 ARE THE RELEVANT BITS IN 7767
	SZL
	TAD [10
	DCA DATFLD
	JMP I T174
TYPDX,	0		/PROCESSES BANK & FIELD FOR PRINTING
	SPA		/ADJUSTMENT FOR LINE FEED AFTER
	CLA		/REFERENCE TO M,D,F,ETC. COMMANDS
	CLL RTR
	RAR
	DCA T174
	TAD T174
	AND [7
	TAD [260
	DCA NWD
	TAD T174
	AND [10
	SZL
	TAD [4
	CLL RTR
	TAD [260
	ISZ TEMP
	JMP I TYPDX


STORE,	0		/SUBROUTINE TO ADJUST CODE
	DCA LOAD
	TAD I STORE
	JMS I [GETADR
	ISZ STOFLG	/INDICATE THAT WE'RE CHANGING THIS RECORD
	TAD LOAD
	DCA I ADR
	CDF 0
	ISZ STORE
	JMP I STORE
GETADR,	0		/GETS ADDRESS....
	DCA ADR
	TAD I ADR
	DCA FADR
	ISZ ADR
	TAD I ADR
	DCA ADR
	TAD FADR
	SNA		/ONLY NEED TO FOOL WITH ADDRESS IF IT'S IN FIELD 0
	JMP CKADR
	SPA
	CLA
	TAD [CDF 0
	DCA .+1
FADR,	0
	ISZ GETADR
	JMP I GETADR
CKADR,	TAD ADR		/MANIPULATES FIELD 0 OF ODT'D PROGRAM
	RAL		/ACCESSES IT IN LOCS 1400-1777
	SZL SPA CLA	/
	JMP FADR+1
	CLA CLL CMA RTL
	AND I [JSBITS
	DCA I [JSBITS	/MODIFY THE JSW TO INDICATE ODT AREA VIOLATION
	TAD ADR
	CLL RTL
	RTL
	RAL
	AND [7		/CALCULATE BLOCK OF STORAGE
	TAD [MTEMP+4
	DCA GIREC
	TAD I [GREC	/MAYBE IT'S ALREADY IN CORE
	CIA
	TAD GIREC
	SNA CLA
	JMP NOREAD	/IT IS!!
	JMS I [DUMP	/MAYBE... ...IT ISN'T
	JMS I [SHNDLR	/LOADS RELEVANT PROGRAM CODE
	0200
G1400,	1400
GIREC,	0
	HLT
	TAD GIREC
	DCA I [GREC
NOREAD,	TAD ADR		/ADJUST THE ADDRESS FOR PROPER ACCESS
	AND (377
	TAD G1400
	DCA ADR
	JMP I GETADR


	*1400
	/INITIALIZATION CODE TO SET UP THE "MREAD" AREA IN FIELD 0
	/WITH THE ODT CODE TO START UP A PROGRAM

INIT,	TAD I 10
	DCA I 11
	ISZ TEMP
	JMP .-3
	JMS CORE	/DETERMINE CORE FIELD SIZE
	TSF
	JMP .-1
	JMP I [READ

BRKTST,	JMS CORE	/GET CORE SIZE NOW THAT WE WERE
	TAD KLIP
	DCA I PLIP	/SETUP LOCATIONS AT 600
	TAD KLIP+1
	DCA I PLIP+1
	TAD KLIP+2
	DCA I PLIP+2
	TAD KCDF10	/JUST BREAKPOINTED IN. THEN RESTORE
	DCA I BURPO	/LOCS AT BURP SO WE NEVER COME BACK
	TAD KCDF10+1	/HERE AGAIN UNTIL WE'RE SWAPPED
	DCA I BURP2
	JMP I BURPO
KCDF10,	CDF 10
	TAD I [MARG1	/SIMULATE LOCS AT BURP
BURPO,	BURP
BURP2,	BURP+1
RSTCOD=.		/RESTORES ODT AFTER 'C','G' COMMANDS
	NOPUNC
	*MREAD-1
	ENPUNC

	SHNDLR
	JMS I .-1
	1000
	0
	MTEMP+4
	HLT
MSWITC,	TAD MLINK
	CLL RAR
	TAD MAC
MCDF,	CDF 0		/CDF OF PREVIOUS BRKPOINTED INST
	JMP MSTCDF
MAC,	0		/SAVED AC
MLINK,	0		/LIKEWISE LINK
MSTCDF,	CIF 0		/START CDF
	JMP I .+1
MSTADR,	0		/START ADDRESS

	NOPUNC
	*RSTCOD+MSTADR-MREAD+2
	ENPUNC
CORE,	0		/DETERMINES AVAILABLE CORE
	RXM		/READ AND STORE EXT MEM INFO
	DCA EXTEMP
	TAD [7000
	LXM		/SETS LXM FOR ODT PURPOSES
	CLA
	CDF 0
	TAD I M1	/FIELD INFO STORED IN 7777(IF AVAILABLE)
	AND COR70
	CLL RTR
	RAR
	SZA		/HAS CORE SIZE BEEN SET?
	JMP USERCR	/VERILY
COR0,	CDF 0
	TAD CORSIZ	/GET FIELD TO TEST
	JMS I [XLODE	/EXTENDED MEMORY BANK&FIELD ADJUSTMENT
	TAD COREX
	DCA .+1		/SET UP CDF TO FIELD
COR1,	CDF	
	TAD I CORLOC	/SAVE CURRENT CONTENTS
COR2,	NOP
	DCA COR1
	TAD COR2
	DCA I CORLOC
COR70,	70		/ACTS AS NOP
	TAD I CORLOC	/TRY TO READ BACK 7000
CORX,	7400
	TAD CORX
	TAD CORV
	SZA CLA
	JMP COREX	/NON-EXISTENT FIELD EXIT
	TAD COR1	/RESTORES CONTENTS DESTROYED
	DCA I CORLOC
	ISZ CORSIZ	/TRY NEXT HIGHER FIELD
	JMP COR0

COREX,	CDF 0		/STORE AWAY LAST REAL FIELD IN 'ZERO'
	TAD CORSIZ
	TAD M1
USERCR,	CIA
	DCA ZERO
	JMP I CORE
CORLOC,	CORX
CORV,	1400
M1,	-1
CORSIZ,	1
KLIP,	ISZ PUNN
	XCONT&177+5200
	TSF
PLIP,	LIP
	LIP+1
	LIP+2

	*1600
SIMX,	0		/SIMULATES BREAKPOINTED INST
	TAD TEMP
	DCA 0
	JMS IOTTST	/IS IT AN IOT?
	TAD T777
	CMA
	AND INST
	RAL
	CML
	SNL SMA		/IS IT A JMS OR A JMP?
	JMP JMSJMP
	CML RAR
	DCA SOPR	/STORE INST IN SOPR
	TAD DATFLD	/PREPARE CDF
	JMS I [XLODE
	TAD [CDF 0
	DCA .+1
	HLT
	TAD LINK	/AND LINK
	CLL RAR
	TAD SAC		/AND AC
SOPR,	HLT		/EXECUTE INSTRUCTION
	SKP
	ISZ GAME+1
	DCA SAC		/RESAVE AC,LINK,DATFLD
	RAL
	DCA LINK
	RDF
	JMS I [T174
	CDF CIF 0
EOSIM,	TAD 0		/PREPARE TO RETURN
	CIA		/HAS LOC 0 BEEN CHANGED?BY A TAD...DCA...ISZ...
	TAD TEMP
EOTST,	SNA CLA		/IF SO,THEN...
	JMP .+3
	TAD 0		/...DO A STORE(ON RETURN TO SIM)
	JMP I SIMX
	ISZ SIMX
	JMP I SIMX
JMSJMP,	RTL		/PROCESS JMP,JMS
	SZL CLA
	JMP JMPX
	TAD TRAD
	DCA FROG
	TAD GAME+1
	DCA 0
	CLA IAC CLL
JMPX,	TAD FROG+1
	DCA GAME+1
	CML RAL		/PUT -LINK IN AC (0 IF JMP, 1 IF JMS)
	JMP EOTST
T777,	777

	*0
ZERO,	ODTVERSION
	/HLT		/IN CASE BKPT WITH INTER ON
	CIF 30		/SYMBIONT CODE
	JMP .-1
PUNN,	0
	*4		/PAGE 0 LITERALS AND CELLS
	CIF 10		/PROTOTYPE BREAKPOINT
	JMP I 6		/USED BY PROGRAMS WITH JSBITS(10)=1
DNAME,	UDNAME		/WHEN ODT IS RELOADED ON A BREAKPOINT

	*7
EXTEMP,	0
	RSTCOD-1
	MREAD-2
	*12
TOTE,	0
KEEP,	0
INST,	0
SHUT,	-1
TRAD,	0;SHNDLR
WORD,	0;0
LINK,	0
SAC,	0
CAD,	0;0
CKT,	0;0
GAME,	0;0
FROG,	0;0
TEMP,	MREAD-MSTADR-2
JSTEMP,	0
DATFLD,	0
INDFLD,	0
MASK,	7777
LIMLO,	0
LIMHI,	7577
ADR,	0
FLDTST,	TAD ZERO		/LOC. 0 HAS LAST REAL CORE FIELD
	TAD NWD		/IF USER TRIES TO ADDRESS NON-
	SMA SZA CLA		/EXISTENT CORE, A ? RETURNS
	JMP I PNO
	JMP I TEMP	/HE'S OK.
PNO,	NO
TOTTST,	0		/TEST FOR COMMAND WITHOUT ADDRESS
	TAD TOTE
	TAD [7
	SZA CLA
	ISZ TOTTST
	JMP I TOTTST
STOFLG,	0
NWD,	0
TJUMP,	JUMP
NOUGHT,	0
LOAD,	0		/SUBROUTINE TO LOAD PROGRAM CODE
	TAD I LOAD
	JMS I [GETADR
REDE5,	READ5
	TAD I ADR	/RETURNS ADDRESS CONTENTS IN AC
	CDF 0
	ISZ LOAD
	JMP I LOAD
IOTTST,	0		/TEST FOR ISOLATING I/O
	CLA CLL CML RTR
	TAD INST
	SZL CLA
	ISZ IOTTST
	JMP I IOTTST
	$

