Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/rsx11s/exdbt.list
There are no other files named exdbt.list in the archive.
EXDBT	MACRO M1110  22-AUG-79 07:14
TABLE OF CONTENTS

     4-  461	COMMAND PROCESSORS, SECTION ONE ( $ B R K A Q . )
     4-  463	"$,<ALT-MODE>" PROCESSOR - INTERNAL REGISTER MAPPER
     5-  495	"B" PROCESSOR - SET AND REMOVE BREAKPOINTS
     6-  550	"R" PROCESSOR - RELOCATION REGISTER PROCESSING
     7-  600	"K" PROCESSOR - COMPUTE AND PRINT RELOCATION
     7-  635	"A-Q-." PROCESSORS - SPECIAL VALUES
     8-  649	COMMAND DE-CODER AND MAIN LOOP OF ODT
     9-  713	EXPRESSION SETUP COMMANDS ( ; + - * , )
    10-  749	OPEN AND CLOSE PROCESSORS
    10-  751	"\-/-'-"-%-:" PROCESSOR - OPEN AND TYPE CONTENT COMMANDS
    11-  790	"<CR>-<LF>->-<-^-_-@" PROCESSOR - CLOSE AND OPEN REGISTERS
    12-  861	COMMAND PROCESSORS, SECTION TWO ( O = G S P )
    12-  863	"O" PROCESSOR - COMPUTE AND PRINT OFFSETS
    12-  888	"=" PROCESSOR - PRINT LEFT SIDE EXPRESSION ON RIGHT SIDE
    13-  897	SST INTERRUPT VECTOR ENTRY POINTS
    14- 1186	COMMAND PROCESSORS, SECTION THREE ( L V X W N E F )
    14- 1188	"L" PROCESSOR - LIST MEMORY ON THE SPECIFIED DEVICE
    15- 1254	UTILITIES - COMMAND SUPPORT ROUTINES
    20- 1482	UTILITIES - PRETTY PRINTERS
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3


      1						.TITLE	EXDBT
      2						.IDENT	/03/
      3
      4					;
      5					; COPYRIGHT (C) 1975, 1978
      6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
      7					;
      8					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
      9					; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
     10					;
     11					; VERSION 02
     12					;
     13					; D. N. CUTLER 7-DEC-74
     14					;
     15					; PREVIOUSLY MODIFIED BY:
     16					;
     17					;	E. L. BAATZ
     18					;	T. J. MILLER
     19					;
     20					; MODIFIED BY:
     21					;
     22					;	T. J. MILLER 30-AUG-75
     23					;
     24					;		TM002 -- ADD CHECKS COMPATIBLE WITH THOSE MADE IN SSTSR
     25					;			FOR SYNCHRONOUS TRAPS IN MAPPED EXEC.
     26					;
     27					;	T. J. MILLER 15-JUN-76
     28					;
     29					;		TM045 -- ADDITION OF "TE" AND "SO" REPORT.
     30					;
     31					;	T. J. MILLER 27-AUG-76
     32					;
     33					;		TM057 -- CORRECT USE OF FLOATING POINT CONDITIONAL.
     34					;
     35					;	E. L. BAATZ 7-OCT-76
     36					;
     37					;		EB006 -- CORRECT A FEW COMMENTS
     38					;
     39					;	J. E. PROVINO 27-OCT-77
     40					;
     41					;		JP028 -- FIX 'X' COMMAND SO THAT IT PROPERLY HANDLES
     42					;			 A STACK OVERFLOW CONDITION.
     43					;
     44					; EXECUTIVE ODT
     45					;
     46					; THIS IS A VERSION OF ODT THAT MAY BE USED TO DEBUG RSX-11M EXECUTIVE
     47					; MODULES. IT IS AN OUTGROWTH OF THE STANDARD RSX-11 ODT WHICH WAS PRO-
     48					; DUCED BY M. SMITH , H. LEV ET. AL.
     49					;
     50					; MACRO LIBRARY CALLS
     51					;
     52
     53						.MCALL	HWDDF$
     54	000000					HWDDF$			;DEFINE HARDWARE REGISTERS
     55
     56					;
     57					; EQUATED SYMBOLS
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-1


     58					;
     59
     60		000003 			BPT=3				;BREAKPOINT INSTRUCTION CODE
     61		000016 			BKP=16				;NUMBER OF BREAKPOINTS -1 X 2
     62		177516 			LPB=177516			;LINE PRINTER BUFFER REGISTER
     63		177514 			LPS=177514			;LINE PRINTER STATUS REGISTER
     64		000016 			RLR=16				;NUMBER OF RELOCATION REGISTERS -1 X 2
     65		000020 			TBT=20				;T-BIT MASK FOR PROCESSOR STATUS WORD
     66		177562 			TKB=177562			;CONSOLE TERMINAL INPUT BUFFER REGISTER
     67		177560 			TKS=177560			;CONSOLE TERMINAL INPUT STATUS REGISTER
     68		177566 			TPB=177566			;CONSOLE TERMINAL OUTPUT BUFFER REGISTER
     69		177564 			TPS=177564			;CONSOLE TERMINAL OUTPUT STATUS REGISTER
     70
     71					;
     72					; LOCAL MACROS
     73					;
     74					; DECODE NEXT COMMAND
     75					;
     76
     77						.MACRO	DECODE
     78						IOT
     79						.ENDM
     80
     81					;
     82					; ERROR
     83					;
     84
     85						.MACRO	ERROR
     86						EMT	0
     87						.ENDM
     88
     89					;
     90					; TEST MODE FOR EXEC OR USER
     91					;
     92
     93						.MACRO	TESTM ADDR
     94						JSR	R5,TESTM
     95						.WORD	ADDR
     96						.ENDM
     97
     98					;
     99					; TYPE OUT CHARACTER(S)
    100					;
    101					;	TYPE OUT IS EFFECTED WITH A TRAP INSTRUCTION WITH THE BOTTOM
    102					;	BYTE ENCODED AS FOLLOWS:
    103					;
    104					;		300 = OUTPUT BOTH BYTES IN R0.
    105					;		200 = OUTPUT LOW BYTE IN R0.
    106					;		340 = OUTPUT A <CR><LF> SEQUENCE.
    107					;		240 = OUTPUT A <CR> SEQUENCE.
    108					;
    109					;		ALL OTHER COMBINATIONS ARE TREATED AS THE ACTUAL BYTE
    110					;		TO OUTPUT.
    111
    112						.MACRO	TYPE ARG
    113						.IF IDN	<ARG>,<R0>
    114						TRAP	200
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-2


    115						.IFF
    116						.IF IDN	<ARG>,<R0+R0>
    117						TRAP	300
    118						.IFF
    119						.IF IDN	<ARG>,<CRLF>
    120						TRAP	340
    121						.IFF
    122						.IF IDN	<ARG>,<CR>
    123						TRAP	240
    124						.IFF
    125						TRAP	ARG&177
    126						.ENDC
    127						.ENDC
    128						.ENDC
    129						.ENDC
    130						.ENDM
    131
    132					;
    133					; LOCAL DATA
    134					;
    135					; CONTEXT VARIABLES
    136					; THE ORDER OF THESE ITEMS IS INTENTIONAL, SEE REGISTER MAPPING SCHEME
    137					;
    138
    139		000000'			INTBEG	=.	;STARTING ADDRESS OF INTERNAL REGISTERS
    140
    141	000000	000000 			UR0:	0			;USER R0			$0
    142	000002	000000 				0			;     R1			$1
    143	000004	000000 				0			;     R2			$2
    144	000006	000000 				0			;     R3			$3
    145	000010	000000 				0			;     R4			$4
    146	000012	000000 				0			;     R5			$5
    147	000014	000000 			USP:	0			;USER SP			$6
    148	000016	000000G			UPC:	$INITL			;USER PC			$7
    149	000020	000340 			UST:	PR7			;USER PS			$S
    150	000022	000000 			ARG:	0			;ARGUMENT REGISTER		$A
    151	000024	000000 			LOW:	0			;LOW LIMIT			$L
    152	000026	000000 			HI:	0			;HIGH LIMIT			$H
    153	000030	000462'			CNST:	$XDT			;CONSTANT REGISTER		$C
    154	000032	000000 			QUAN:	0			;QUANTITY REGISTER		$Q
    155	000034	000000 			FORM:	0			;FORMAT REGISTER		$F
    156
    157					;
    158					; INTERNAL TABLES
    159					;
    160
    161		000036'			INTINX	=.		;STARTING ADDRESS OF INTERNAL TABLES
    162
    163					;
    164					; BREAKPOINT CONTROL LISTS, AND EXTRA SLOT FOR SINGLE STEP
    165					;
    166
    167	000036				ADR1:		;ADDRESS OF THE BREAKPOINT	($0B-$7B)
    168	000036	000216'	000216'	000216'		.WORD	TRTC,TRTC,TRTC,TRTC,TRTC,TRTC,TRTC,TRTC,TRTC
	000044	000216'	000216'	000216'
	000052	000216'	000216'	000216'
    169
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-3


    170	000060				CT:		;PROCEED COUNT	($0G-$7G)
    171	000060	000001 	000001 	000001 		.WORD	1,1,1,1,1,1,1,1,1
	000066	000001 	000001 	000001
	000074	000001 	000001 	000001
    172
    173	000102				UIN:		;USER INSTRUCTION SAVE LOCATION	($0I-$7I)
    174	000102	000003 	000003 	000003 		.WORD	BPT,BPT,BPT,BPT,BPT,BPT,BPT,BPT,BPT
	000110	000003 	000003 	000003
	000116	000003 	000003 	000003
    175
    176					;
    177					; RELOCATION REGISTERS
    178					;
    179
    180	000124				RELT:		;RELOCATION TABLES	($0R-$7R)
    181	000124	177777 	177777 	177777 		.WORD	-1,-1,-1,-1,-1,-1,-1,-1
	000132	177777 	177777 	177777
	000140	177777 	177777
    182
    183		000142'			INTEND=.-2			;END OF INTERNAL REGISTERS AND TABLES
    184
    185					;
    186					; EXEC SST TRAP VECTOR ADDRESSES
    187					;
    188
    189	000144	002112'			SSTVEC:	 +	ODDA		;0-ODD ADDRESS, OR HALT, VECTOR @4
    190
    191
    192						.IF	DF M$$MGE
    193
    194	000146	002066'				 +	SGMT		;1-SEGMENT FAULT
    195
    196						.IFF
    197
    198						+	$NONSI		; NO SEGMENT FAULT POSSIBLE
    199
    200						.ENDC
    201
    202
    203	000150	002144'				 +	BPTI		;2-T-BIT OR BPT
    204	000152	002166'				 +	IOTX		;3-IOT
    205	000154	002204'				 +	ILLI		;4-RESERVED OR ILLEGAL INSTRUCTION
    206	000156	002230'				 +	NEMT		;5-EMT
    207	000160	002560'				 +	TRPI		;6-TRAP
    208
    209
    210						.IF DF	F$$LTP!F$$LPP
    211
    212						+	FPPE		;7-PDP 11/40 FLOATING POINT
    213
    214						.IFF
    215
    216	000162	000000G				+	$NONSI		;7-NO TRAP POSSIBLE
    217
    218						.ENDC
    219
    220
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-4


    221					;
    222					; WORDS AND ORDERED BYTES, ITEMS MUST BE KEPT FROM COMMAND TO COMMAND
    223					;
    224
    225	000164	000000 			CAD:	.WORD	0		;ADDRESS OF CURRENTLY OPEN REGISTER
    226	000166	000000 			DOT:	.WORD	0		;ADDRESS OF LAST EXPLICITLY OPENED CELL
    227	000170	000000 			BW:	.WORD	0		;LAST OPEN MODE 1=BYTE, 2=WORD
    228	000172	000000 			OPN:	.WORD	0		;LOCATION OPEN FLAG 0=NOT OPEN, NON-ZERO=OPEN
    229	000174	000000 			D.ARGS:	.WORD	0		;SEMI COLON PUSH WORD
    230
    231					;
    232					; THE FOLLOWING ITEMS NEED NOT BE KEPT FROM COMMAND TO COMMAND
    233					; THEIR ORDER IS INTENTIONAL SO KNOW THY MAKER!
    234					;
    235
    236	000176	   000 			OP:	.BYTE	0		;CURRENT ARITHMETIC OPERATOR
    237	000177	   000 			SMFD:	.BYTE	0		;SEMI-COLON COUNTER
    238	000200	000000 			EXP:	.WORD	0		;EXPRESSION BUCKET
    239	000202	177566 			OUTB:	.WORD	TPB		;CONSOLE PRINTER BUFFER ADDRESS
    240	000204	177564 			OUTS:	.WORD	TPS		;CONSOLE PRINTER STATUS REGISTER
    241	000206				PPC:	.BLKW	1		;SAVED PC LAST BREAKPOINT
    242
    243					;
    244					; THE FOLLOWING ITEMS MUST BE KEPT FROM COMMAND TO COMMAND.
    245					;
    246
    247	000210	   000 			T:	.BYTE	0		;T BIT IN USE FLAG
    248	000211	   377 			P:	.BYTE	-1		;PROCEED ALLOW FLAG
    249	000212	   000 			S:	.BYTE	0		;SINGLE INSTRUCTION MODE, 0=NORMAL, >0=ENABLE
    250	000213	   002 			FM:	.BYTE	2		;OUTPUT FORMAT MODE, BYTE, WORD, ANSII, RAD50
    251	000214	   002 			OBW:	.BYTE	2		;OPEN CELL TYPE, 1=BYTE, 2=WORD
    252	000215	   000 			SEQ:	.BYTE	0		;CHANGE SEQUENCE INDICATIOR
    253
    254					;
    255					; THE BELOW LOCATION IS USED IN BREAKPOINT PROCESSING
    256					;
    257
    258	000216	000003 			TRTC:	BPT		;TRACE TRAP PROTOTYPE
    259
    260					;
    261					; ALL XDT TYPE ERRORS JUST GO TO "ERR" OR SOMEWHERE ELSE
    262					;
    263
    264	000220	001236'			SSTXDT:	 +	ERR		;0-ODD ADDRESS
    265	000222	001236'				 +	ERR		;1-SEGMENT FAULT
    266	000224	001236'				 +	ERR		;2-BPT OR T-BIT ("MCR" CALL)
    267	000226	001244'				 +	DCD		;3-IOT ("DECODE")
    268	000230	001236'				 +	ERR		;4-RESERVED OR ILLEGAL INSTRUCTION
    269	000232	001236'				 +	ERR		;5-EMT ("ERROR")
    270	000234	003776'				 +	TYPE		;6-TRAP
    271	000236	001236'				 +	ERR		;7-PDP 11/40 FLOATING POINT EXCEPTION
    272
    273					;
    274					; SST VECTOR ADDRESS TABLE
    275					;
    276
    277	000240	000004 			SSTADR:	.WORD	4		;ODD ADDRESS
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-5


    278	000242	000250 				.WORD	250		;SEGMENT FAULT
    279	000244	000014 				.WORD	14		;BPT
    280	000246	000020 				.WORD	20		;IOT
    281	000250	000010 				.WORD	10		;ILLEGAL INSTRUCTION
    282	000252	000030 				.WORD	30		;EMT
    283	000254	000034 				.WORD	34		;TRAP
    284	000256	000244 				.WORD	244		;11/40 FLOATING POINT
    285
    286					;
    287					; INTERNAL REGISTER NAME AND CONTROL TABLES
    288					;
    289					; NON-INDEXED REGISTER NAMES
    290					;
    291
    292	000260	   060 	   061 	   062 	NIXMAP:	.ASCII	/01234567/	;USER REGISTER NAMES FOR MAPPING
	000263	   063 	   064 	   065
	000266	   066 	   067
    293
    294	000270	   123 			NIXREG:	.BYTE	'S		;UST	USER STATUS
    295	000271	   101 				.BYTE	'A		;ARG	ARGUMENT
    296	000272	   114 				.BYTE	'L		;LOW	LOW SCAN LIMIT
    297	000273	   110 				.BYTE	'H		;HI	HIGH SCAN LIMIT
    298	000274	   103 				.BYTE	'C		;CNST	CONSTANT
    299	000275	   121 				.BYTE	'Q		;QUAN	QUANTITY
    300	000276	   106 				.BYTE	'F		;FORM	FORMAT CONTROL
    301	000277	   000 				.BYTE	0		;END OF THIS LIST
    302
    303					;
    304					; INDEXED REGISTER NAMES
    305					;
    306
    307	000300	   102 			INXREG:	.BYTE	'B		;ADR1	BKPT ADDRESSES
    308	000301	   107 				.BYTE	'G		;CT	BKPT PROCEED COUNTS
    309	000302	   111 				.BYTE	'I		;UIN	BKPT USER INSTRUCTIONS
    310	000303	   122 				.BYTE	'R		;RELT	RELOCATION REGISTERS
    311	000304	   000 				.BYTE	0		;END OF THIS LIST
    312
    313					;
    314					; INDEXED REGISTER TABLE BASES
    315					;
    316
    317						.EVEN
    318	000306	000036'			INXTBL:	.WORD	ADR1		;BKPT ADDRESS TABLE
    319	000310	000060'				.WORD	CT		;BKPT PROCEED COUNTS
    320	000312	000102'				.WORD	UIN		;BKPT'D INSTRUCTION
    321	000314	000124'				.WORD	RELT		;RELOCATION TABLES
    322	000316	000144'				.WORD	INTEND+2	;END OF TABLE AREA FOR ADDRESS MAPPING
    323
    324					;
    325					; CHARACTER CONVERSION LISTS.
    326					;
    327
    328	000320	   033 	   175 	   176 	ALTTAB:	.BYTE	033,175,176	;ALTERNATE ALT-MODE FORMS
    329	000323	   000 				.BYTE	0		;END OF THIS LIST TOO
    330
    331					;
    332					; COMMAND NAME AND DISPATCH TABLES
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-6


    333					;
    334
    335	000324				COMTAB:		;ADDRESS OF THE CHARACTER TABLE
    336
    337					;
    338					; OPEN REGISTER COMMANDS (ORDER AND POSITION CRITICAL)
    339					;
    340
    341	000324	   134 	   057 	   047 		.BYTE	'\,'/,'','",'%
	000327	   042 	   045
    342
    343					;
    344					; CLOSE REGISTER COMMANDS
    345					;
    346
    347	000331	   015 	   012 	   136 		.BYTE	015,012,'^,'_,'@,'>,'<
	000334	   137 	   100 	   076
	000337	   074
    348
    349					;
    350					; SPECIAL FORMS
    351					;
    352
    353	000340	   044 	   075 	   103 		.BYTE	'$,'=,'C,'Q,'.
	000343	   121 	   056
    354
    355					;
    356					; OPERATORS (ORDER OF -+* IS CRITCAL)
    357					;
    358
    359	000345	   073 	   055 	   053 		.BYTE	';,'-,'+,'*,',
	000350	   052 	   054
    360
    361					;
    362					; COMMANDS
    363					;
    364
    365	000352	   102 	   107 	   113 		.ASCII	/BGKLOPRSX/
	000355	   114 	   117 	   120
	000360	   122 	   123 	   130
    366	000363	   000 				.BYTE	0		;******* END OF THE LIST *******
    367						.EVEN
    368
    369					;
    370					; THE DISPATCH TABLE, ORDERED ON ABOVE TABLE
    371					;
    372					; OPEN REGISTER COMMANDS
    373					;
    374
    375	000364	001464'			COMDIS:	.WORD	OCBYTE		;\	OPEN OCTAL BYTE
    376	000366	001456'				.WORD	OCWORD		;/	OPEN OCTAL WORD
    377	000370	001464'				.WORD	ANBYTE		;'	OPEN ANSII BYTE
    378	000372	001456'				.WORD	ANWORD		;"	OPEN ANSII WORD
    379	000374	001456'				.WORD	MODULO		;%	OPEN RADIX 50 WORD
    380
    381					;
    382					; CLOSE REGISTER COMMANDS
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-7


    383					;
    384
    385	000376	001560'				.WORD	CLCRET		;<CR>	CLOSE, NO SUCESSIVE OPEN
    386	000400	001572'				.WORD	CLLNFD		;<LF>	CLOSE, OPEN NEXT
    387	000402	001704'				.WORD	CLUPAR		;^	CLOSE, OPEN PREVIOUS
    388	000404	001720'				.WORD	CLBACK		;_	CLOSE, OPEN PC RELATIVE MODE
    389	000406	001736'				.WORD	CLATSG		;@	CLOSE, OPEN INDIRECT
    390	000410	001746'				.WORD	CLGRTH		;>	CLOSE, OPEN PC OFFSET AS BRANCH
    391	000412	001566'				.WORD	CLLSTH		;<	CLOSE, OPEN OLD SEQUENCE
    392
    393					;
    394					; SPECIAL FORMS
    395					;
    396
    397	000414	000570'				.WORD	REGT		;$	INTERNAL REGISTER REFERENCE
    398	000416	002060'				.WORD	EQUALS		;=	PRINT LEFT SIDE IN OCTAL
    399	000420	001214'				.WORD	CHRCEE		;C	CONSTANT REGISTER CONTENTS
    400	000422	001206'				.WORD	CHRQUE		;Q	QUANTITY REGISTER CONTENTS
    401	000424	001222'				.WORD	CHRDOT		;.	LAST OPENED LOCATION'S ADDRESS
    402
    403					;
    404					; OPERATORS
    405					;
    406
    407	000426	001360'				.WORD	SEMI		;;	MULTIPLE ARGUMENT DELIMITER
    408	000430	001414'				.WORD	MINS		;-	SUBTRACTION
    409	000432	001406'				.WORD	PLUS		;+	.WORD	ADDITION
    410	000434	001424'				.WORD	STAR		;*	MULTIPLY BY 50
    411	000436	001436'				.WORD	COMM		;,	RELOCATION COMPUTE
    412
    413					;
    414					; COMMANDS
    415					;
    416
    417	000440	000670'				.WORD	SEBK		;B	SET / CLEAR BREAKPOINTS
    418	000442	002564'				.WORD	GOTO		;G	GO TO USER'S DATA
    419	000444	001110'				.WORD	KILO		;K	KOMPUTE AND TYPE RELOCATION DATA
    420	000446	003146'				.WORD	LIST		;L	LIST MEMORY ON SPECIFIED DEVICE
    421	000450	002010'				.WORD	OFST		;O	TYPE PC RELATIVE OFFSETS
    422	000452	003004'				.WORD	PROC		;P	PROCEED FROM BREAKPOINT
    423	000454	001010'				.WORD	RELO		;R	SET / RESET RELOCATION REGISTERS
    424	000456	002772'				.WORD	SNGL		;S	SET / RESET SINGLE STEP MODE
    425	000460	003276'				.WORD	EXIT		;X	EXIT TO CRASH ROUTINE
    426
    427					;+
    428					; **-$XDT-RSX-11M EXECUTIVE ODT
    429					;-
    430
    431						.ENABL	LSB
    432	000462				$XDT::	MTPS	#PR7		;LOCK OUT INTERRUPTS
    433	000470	010667 	177320 			MOV	SP,USP		;SAVE ENTRY STACK POINTER
    434	000474	012706 	000014'			MOV	#USP,SP		;SET NEW STACK POINTER ADDRESS
    435	000500	010546 				MOV	R5,-(SP)	;SAVE REGISTERS R5 THRU R0
    436	000502	010446 				MOV	R4,-(SP)	;
    437	000504	010346 				MOV	R3,-(SP)	;
    438	000506	010246 				MOV	R2,-(SP)	;
    439	000510	010146 				MOV	R1,-(SP)	;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 3-8


    440	000512	010046 				MOV	R0,-(SP)	;
    441	000514	010706 				MOV	PC,SP		;CHANGE STACK POINTER
    442	000516	012700 	000240'			MOV	#SSTADR,R0	;POINT TO TRAP VECTOR ADDRESS TABLE
    443	000522	012701 	000220'			MOV	#SSTXDT,R1	;POINT TO XDT TRAP VECTOR TABLE
    444	000526	012130 			10$:	MOV	(R1)+,@(R0)+	;INSERT XDT TRAP VECTOR ADDRESSES
    445	000530	020127 	000240'			CMP	R1,#SSTADR	;ANY MORE TO SET?
    446	000534	103774 				BLO	10$		;IF LO YES
    447	000536	010706 				MOV	PC,SP		;LENGTHEN STACK
    448	000540					TYPE	CRLF		;PLACE TERMINAL CARRIAGE IN PROPER POSITION
    449	000542					TYPE	'X		;OUTPUT XDT IDENTIFICATION
    450	000544					TYPE	'D		;
    451	000546					TYPE	'T		;
    452	000550					TYPE	':		;
    453	000552					TYPE	40		;
    454	000554	016700 	000000G			MOV	$SYSID,R0	;GET SYSTEM IDENTIFICATION
    455	000560					TYPE	R0+R0		;OUTPUT SYSTEM IDENTIFICATION
    456	000562					TYPE	CRLF		;PLACE TERMINAL CARRIAGE IN PROPER POSITION
    457	000564	004667 	000454 			JSR	SP,DCD		;DECODE NEXT COMMAND
    458	000570				XDTSTK:				;REF LABEL - START OF XDT STACK
    459						.DSABL	LSB
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 4
COMMAND PROCESSORS, SECTION ONE ( $ B R K A Q . )

    461						.SBTTL	COMMAND PROCESSORS, SECTION ONE ( $ B R K A Q . )
    462
    463					.SBTTL "$,<ALT-MODE>" PROCESSOR - INTERNAL REGISTER MAPPER
    464
    465					;SYNTAX--
    466					;$L		DELIVER INTERNAL ADDRESS OF L
    467					;$NL		DELIVER INTERNAL ADDRESS OF L+2N
    468					;$N		DELIVER INTERNAL ADDRESS OF USER REGISTER N
    469
    470					;SEE MAPPING TABLES, RANGE OF N IS 0-7
    471
    472	000570	004767 	002722 		REGT:	JSR	PC,GETNUM	;GET AN OCTAL NUMBER
    473	000574	004767 	002526 			JSR	PC,RTST		;CHECK FOR ERROR
    474	000600	103461 				BCS	ERR0		;MPY R4 X 2
    475	000602	005702 				TST	R2		;SEE IF ANYTHING TYPED
    476	000604	001010 				BNE	10$		;IF SO IS INDEXED OR USER REGISTER
    477	000606	004567 	002750 			JSR	R5,LOOKUP	;SEE IF NON-INDEXED
    478	000612	000270'				 +	NIXREG
    479	000614	103410 				BCS	12$		;NON-INDEXED TURNS INTO A COMMAND
    480	000616	010104 				MOV	R1,R4		;PLACE IN LIST IS INTERNAL ORDER
    481	000620	062704 	000020'			ADD	#UST,R4		;GET ADDRESS IN R4, GOTTA READ CHAR
    482	000624	000414 				BR	20$
    483	000626	004567 	002730 		10$:	JSR	R5,LOOKUP	;SEE IF INDEXED
    484	000632	000300'				 +	INXREG
    485	000634	103006 				BCC	15$		;WAS TRULY INDEXED
    486	000636	022704 	000016 		12$:	CMP	#7+7,R4		;INTERNAL USER REGISTER RANGE CHECK
    487	000642	103440 				BLO	ERR0
    488	000644	062704 	000000'			ADD	#UR0,R4		;SET ACCESS TO R0-R7 OF THE USER
    489	000650	000404 				BR	25$		;AVOID READING OF COMMAND
    490	000652	066104 	000306'		15$:	ADD	INXTBL(R1),R4	;COMPUTE ADDRESS TO INDEXED TABLE
    491	000656	004767 	003012 		20$:	JSR	PC,GET		;GET THE ASSUMED TERMINATOR
    492	000662	005202 			25$:	INC	R2		;SHOW THEM THAT R4 GOT VALID DATA
    493	000664	000167 	000426 			JMP	CLGL		;RE-USE CHARACTER, R2 IS NON-ZERO
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 5
"B" PROCESSOR - SET AND REMOVE BREAKPOINTS

    495					.SBTTL "B" PROCESSOR - SET AND REMOVE BREAKPOINTS
    496
    497					;SYNTAX--
    498					;B			CLEAR ALL BREAKPOINTS
    499					;NB			CLEAR BKPT N
    500					;A;B			SET BKPT AT A, USE FIRST FREE  BKPT
    501					;A;NB			SET BKPT N AT A
    502
    503					;DEPENDS MIGHTILY UPON LOCATION "TRTC" CONTAINING A TRAP INST.
    504					;AND THAT A FREE BKPT CONTAINS THE ADDRESS "TRTC".
    505
    506	000670	006304 			SEBK:	ASL	R4		;MPY R4 X2, JUST IN CASE ALL IS GO
    507	000672	012700 	000216'			MOV	#TRTC,R0	;SET MAGIC VALUE IN R0, JUST IN CASE
    508	000676	005703 				TST	R3		;CHECK FOR THE REAL CASE
    509	000700	001414 				BEQ	REMB		;REMOVAL CASES, CLEAR THEM UP
    510	000702	032705 	000001 			BIT	#1,R5		;LOOK AT ADDRESS
    511	000706	001153 				BNE	ERR		;THAT'S ODD ?
    512	000710	005702 				TST	R2		;SEE IF I GET TO PICK IT OR NOT
    513	000712	001005 				BNE	15$		;OR NOT, DISAPPOINTMENT
    514	000714	020064 	000036'		10$:	CMP	R0,ADR1(R4)	;LOOK FOR LOCATION WITH FREE ADDRESS
    515	000720	001402 				BEQ	15$		;A HIT
    516	000722	005724 				TST	(R4)+		;KEEP AT FOR A LONG WHILE
    517	000724	000773 				BR	10$		;LOOOOOOOOP
    518	000726	010500 			15$:	MOV	R5,R0		;R0 HAS ADDRESS OF BREAKPOINT
    519	000730	000402 				BR	RE02		;GO TUCK IT IN
    520
    521					;REMOVE SOME BREAKPOINTS
    522
    523	000732	005702 			REMB:	TST	R2		;SEE IF ONE OR ALL
    524	000734	001404 				BEQ	RALL		;ALL
    525	000736	004767 	000016 		RE02:	JSR	PC,SETBRK	;SET THE ONE SET UP TO SET
    526	000742	103140 				BCC	DCD		;IT HAPPENED
    527	000744				ERR0:	ERROR			;SOME THING WENT WRONG
    528
    529					;
    530					; REMOVE ALL BREAKPOINTS
    531					;
    532
    533	000746	005004 			RALL:	CLR	R4		;R4 IS ZERO
    534	000750	004767 	000004 		10$:	JSR	PC,SETBRK	;SET THEM TILL
    535	000754	103375 				BCC	10$		;THEY GET OUTTA
    536	000756					DECODE			;HAND!!!!
    537
    538					;
    539					; SUBROUTINE TO SET/CLEAR BREAKPOINTS
    540					;
    541
    542	000760	022704 	000016 		SETBRK:	CMP	#BKP,R4		;LEGAL BREAKPOINT NUMBER?
    543	000764	103410 				BLO	10$		;IF LO NO
    544	000766	010064 	000036'			MOV	R0,ADR1(R4)	;SET BREAKPOINT ADDRESS
    545	000772	011064 	000102'			MOV	(R0),UIN(R4)	;SAVE CONTENTS OF BREAKPOINT LOCATION
    546	000776	012764 	000001 	000060'		MOV	#1,CT(R4)	;SET INITIAL PROCEED COUNT
    547	001004	005724 				TST	(R4)+		;ADVANCE BREAKPOINT NUMBER
    548	001006				10$:	RETURN			;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 6
"R" PROCESSOR - RELOCATION REGISTER PROCESSING

    550					.SBTTL "R" PROCESSOR - RELOCATION REGISTER PROCESSING
    551
    552					;DETERMINE IF CLEAR OR SET
    553
    554	001010	105767 	177163 		RELO:	TSTB	SMFD		;SEMI-COLON ABSENT MEANS CLEAR
    555	001014	001406 				BEQ	10$		;CLEAR DISPATCH, OR FALL TO SETTING
    556
    557					;FORMS HERE--
    558					; A;NR			SET RELOC(N) TO A
    559					;ABSENT A OR N DEFAULTS TO 0
    560
    561	001016	004767 	002304 			JSR	PC,RTST		;PROTECTION EDITING
    562	001022	103505 				BCS	ERR		;ILLEGAL REGISTER NUMBER ?
    563	001024	010564 	000124'			MOV	R5,RELT(R4)	;SET THE APPROPRIATE REGISTER
    564	001030					DECODE			;GO GET NEXT COMMAND
    565
    566					;FORMS HERE--
    567					;R			RESET ALL TO -1 FOR RELOC(0-7)
    568					;NR			RESET ONLY RELOC(N)
    569
    570	001032	005702 			10$:	TST	R2		;SEE IF NR OR JUST R
    571	001034	001404 				BEQ	15$		;CLEAR ALL
    572	001036	004767 	000012 			JSR	PC,RUCL		;CLEAR THE ONE IN R4
    573	001042	103475 				BCS	ERR		;ERROR, INVALID REGISTER ?
    574	001044					DECODE			;NEXT COMMAND
    575	001046	004767 	000022 		15$:	JSR	PC,RUAL		;DO THEM ALL
    576	001052					DECODE			;OFF AND ON
    577
    578					;
    579					; SUBROUTINE TO RESET RELOCATION BASE REGISTER
    580					;
    581
    582						.ENABL	LSB
    583	001054				RUCL:	CALL	RTST		;TEST FOR LEGAL REGISTER
    584	001060	103404 				BCS	10$		;IF CS ILLEGAL REGISTER
    585	001062	012764 	177777 	000124'		MOV	#-1,RELT(R4)	;RESET RELOCATION REGISTER
    586	001070	006204 				ASR	R4		;CONVERT BACK TO REGISTER NUMBER
    587	001072				10$:	RETURN			;
    588
    589					;
    590					; SUBROUTINE TO CLEAR ALL RELOCATION REGISTERS
    591					;
    592
    593	001074	005004 			RUAL:	CLR	R4		;START WITH REGISTER 0
    594	001076				20$:	CALL	RUCL		;CLEAR NEXT RELOCATION REGISTER
    595	001102	103773 				BCS	10$		;IF CS ALL DONE
    596	001104	005204 				INC	R4		;ADVANCE TO NEXT REGISTER
    597	001106	000773 				BR	20$		;
    598						.DSABL	LSB
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 7
"K" PROCESSOR - COMPUTE AND PRINT RELOCATION

    600					.SBTTL "K" PROCESSOR - COMPUTE AND PRINT RELOCATION
    601
    602					;SYNTAX--
    603					;AK				TYPE RELOCATION DEAL FROM DOT TO A
    604					;L;AK				TYPE RELOCATION DEAL FROM L TO A
    605
    606					;IF A IS NULL THE THE OLD BEST FIT RULE APPLIES
    607					;TYPES	=N,DDDDDD	WHERE N IS THE RELOCATION REGISTER
    608					;				AND D-D IS THE RELOCATION BIAS
    609
    610	001110	005702 			KILO:	TST	R2		;SEE WHO PICKS THE REGISTER
    611	001112	001012 				BNE	10$
    612	001114	005703 				TST	R3		; ADDRESS SPECIFIED?
    613	001116	001003 				BNE	5$		; YES
    614	001120	016704 	177040 			MOV	CAD,R4		; NO, GET CURRENT ADDRESS
    615	001124	000401 				BR	7$		;
    616	001126	010504 			5$:	MOV	R5,R4		; GET ADDRESS SPECIFIED ON COMMAND
    617	001130	004767 	003362 		7$:	JSR	PC,LOCA		; GET CLOSEST RELOCATION REGISTER
    618	001134	010004 				MOV	R0,R4		;DID WE FIND A RELOCATION REGISTER?
    619	001136	100437 				BMI	ERR		;CAN'T FIND ONE THATS GOOD
    620	001140	042704 	177770 		10$:	BIC	#177770,R4	;EDIT REGISTER
    621	001144					TYPE	'=		;OUTPUT CUE
    622	001146					TYPE	40		;
    623	001150	110400 				MOVB	R4,R0		;TYPE REGISTER & A ,
    624	001152	062700 	026060 			ADD	#"0,,R0
    625	001156					TYPE	R0+R0		;
    626	001160	006304 				ASL	R4		;GO GET IT AS TABLE INDEX
    627	001162	005703 				TST	R3		;SEE WHO TYPED THE ADDRESS
    628	001164	001002 				BNE	15$
    629	001166	016705 	176772 			MOV	CAD,R5		;THAT CAD!
    630	001172	166405 	000124'		15$:	SUB	RELT(R4),R5
    631	001176	010500 				MOV	R5,R0		;BIAS COMPUTE
    632	001200	004767 	003054 			JSR	PC,CADW		;PRINT AS WORD
    633	001204					DECODE
    634
    635					.SBTTL "A-Q-." PROCESSORS - SPECIAL VALUES
    636
    637					;MERELY SUBSTITUTE THE VALUE IN R4 WITH THE CONTENTS OF THE SPECIFIED
    638					;REGISTER.
    639
    640	001206	016704 	176620 		CHRQUE:	MOV	QUAN,R4		;LAST QUANTITY PRINTED
    641	001212	000405 				BR	CHR001
    642	001214	016704 	176610 		CHRCEE:	MOV	CNST,R4		;CONSTANT REGISTER
    643	001220	000402 				BR	CHR001
    644	001222	016704 	176736 		CHRDOT:	MOV	CAD,R4		;CURRENT LOCATION
    645	001226	005202 			CHR001:	INC	R2		;ALLOW AS R4 IS REAL
    646	001230	004767 	002440 			JSR	PC,GET		;GET NEXT CHARACTER AND ASSUME
    647	001234	000430 				BR	CLGL		;IT IS A TERMINATOR
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 8
COMMAND DE-CODER AND MAIN LOOP OF ODT

    649						.SBTTL	COMMAND DE-CODER AND MAIN LOOP OF ODT
    650
    651					; COMMAND DECODER - ODT
    652
    653					;  ALL REGISTERS MAY BE USED (R0-R5),
    654
    655					;ERROR ENTRY, TYPE FLAG AND GO DO COMMAND
    656
    657	001236				ERR:	CALL	SETCN		;SET OUTPUT FOR CONSOLE
    658	001242					TYPE	'?		;OUTPUT ERROR INDICATION
    659
    660					;
    661					; DECODE FROM THE TOP, CLOSE ALL AND DO CR/LF/_
    662					;
    663
    664	001244	012706 	000570'		DCD:	MOV	#XDTSTK,SP	;SET THE STACK FOR SANITY
    665	001250					CALL	SETCN		;SET OUTPUT FOR CONSOLE
    666	001254					TYPE	CRLF		;PLACE TERMINAL CARRIAGE IN PROPER POSITION
    667	001256	005067 	176710 			CLR	OPN		;SET NO LOCATION OPEN
    668	001262					TYPE	'X		;OUTPUT INPUT SOLICITATION
    669	001264					TYPE	'D		;
    670	001266					TYPE	'T		;
    671	001270					TYPE	76		;'>'
    672
    673					;MAINTAIN OPENED LOCATION, RE-INIT INPUT
    674
    675	001272	105067 	176701 		NEWC:	CLRB	SMFD		;CLEAR SEMI-COLON FLAG/COUNT
    676	001276	005003 				CLR	R3		;ZERO SECONDARY ARGUMENT FLAG
    677	001300	005005 				CLR	R5		;AND ARGUMENT
    678
    679					;NEW SUB-EXPRESSION ENTRY
    680
    681	001302	105067 	176670 		NEWE:	CLRB	OP		;CLEAR OPERATOR FOUND
    682	001306	005067 	176666 			CLR	EXP		;SET ZERO IN EXPRESSION SO FAR LOCATION
    683
    684					;GET NUMBER AND THEN SCAN FOR COMMAND
    685
    686	001312	004767 	002200 		NEWN:	JSR	PC,GETNUM	;GET AN OCTAL NUMBER AND TERMINATOR
    687
    688					;NON-OCTAL CHAR TYPED WHAT ARE WE TO DO?
    689
    690	001316	004567 	002240 		CLGL:	JSR	R5,LOOKUP	;GO SEE IF IT IS REAL
    691	001322	000324'				 +	COMTAB		;THIS DEFINES REAL
    692	001324	103744 				BCS	ERR		;EASY ENOUGH IF NOT REAL
    693	001326	005702 				TST	R2		;IF NOTHING TYPE BOTHER NOT
    694	001330	001402 				BEQ	CL01		;WITH THE EXPRESSION
    695	001332	004767 	002102 			JSR	PC,EXPCOM	;COMPUTE EXPRESSION
    696	001336	000171 	000364'		CL01:	JMP	@COMDIS(R1)	;GO TO PROPER ROUTINE
    697
    698					;FOR THE BENEFIT ALL REGISTERS ARE AS FOLLOWS
    699
    700					;R0	LAST CHARACTER TYPED, THE COMMAND ITSELF!
    701					;R1	TABLE INDEX TO COMMAND ADDRESSES, IT IS USED.
    702					;R2,R4	FIRST ARGUMENT, IF R2<>0 THEN R4 IS DATA
    703					;R3,R5	SECOND ARGUMENT, IF R3<>0 THEN R5 IS DATA
    704
    705					;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 8-1
COMMAND DE-CODER AND MAIN LOOP OF ODT

    706					; SET OUTPUT DEVICE TO CONSOLE TERMINAL
    707					;
    708
    709	001342	012767 	177566 	176632 	SETCN:	MOV	#TPB,OUTB	;SET OUTPUT BUFFER ADDRESS
    710	001350	012767 	177564 	176626 		MOV	#TPS,OUTS	;SET OUTPUT STATUS ADDRESS
    711	001356					RETURN			;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 9
EXPRESSION SETUP COMMANDS ( ; + - * , )

    713						.SBTTL	EXPRESSION SETUP COMMANDS ( ; + - * , )
    714
    715					;SEMI-COLON PROCESSOR
    716
    717	001360	105267 	176613 		SEMI:	INCB	SMFD		;COUNT SEMI-COLON
    718	001364	122767 	000002 	176605 		CMPB	#2,SMFD		;PUSH CONTENTS INTO MULTI
    719	001372	001002 				BNE	SEM1		;SEMI COLON ARG LIST
    720	001374	010567 	176574 			MOV	R5,D.ARGS
    721	001400	010203 			SEM1:	MOV	R2,R3		;PUSH R2 AND R4 INTO
    722	001402	010405 				MOV	R4,R5		;R3 AND R5 (FLAG AND CONTENTS)
    723	001404	000736 				BR	NEWE		;CONTINUE SCANNER
    724
    725					;ADDITION SETUP
    726
    727	001406	105067 	176564 		PLUS:	CLRB	OP		;OP IS 0 FOR +
    728	001412	000407 				BR	CO00
    729
    730					;SUBTRACT SET UP
    731
    732	001414	112767 	000002 	176554 	MINS:	MOVB	#2,OP
    733	001422	000403 				BR	CO00
    734
    735					;MULTIPLY BY 50 AND ADD
    736
    737	001424	112767 	177776 	176544 	STAR:	MOVB	#-2,OP		;OP IS -2 FOR *
    738	001432	005004 			CO00:	CLR	R4		;R4 IS RESET
    739	001434	000726 				BR	NEWN
    740
    741					;MEMORY RELOCATION CHECK
    742
    743	001436	006304 			COMM:	ASL	R4		;ALL NEED IT X 2
    744	001440	020427 	000016 			CMP	R4,#RLR		;SEE IF REGISTER IS OUT OF RANGE
    745	001444	003274 				BGT	ERR
    746	001446	016467 	000124'	176524 		MOV	RELT(R4),EXP	;COMPUTE REAL CORE ADDRESS
    747	001454	000754 				BR	PLUS
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 10
OPEN AND CLOSE PROCESSORS

    749						.SBTTL	OPEN AND CLOSE PROCESSORS
    750
    751					.SBTTL "\-/-'-"-%-:" PROCESSOR - OPEN AND TYPE CONTENT COMMANDS
    752
    753					;SYNTAX--
    754					;NC				OPEN LOC N IN MODE C, SET MODE FOR NEXT
    755					;C				TYPE LAST OPENED LOC IN MODE C
    756
    757	001456				OCWORD:		;OCTAL WORD -		R1=2
    758	001456				ANWORD:		;ANSII WORD -		R1=6
    759	001456				MODULO:		;RADIX 50 WORD -	R1=10
    760
    761					;OPEN WORD MODE ENTRY, R1 CONTAINS FORMAT INDEX
    762
    763	001456	012700 	000002 			MOV	#2,R0		;SET BYTE FLAG TO WORD FLAG
    764	001462	000402 				BR	OPE004		;GO TO IT ACE HOLE
    765
    766	001464				OCBYTE:		;OCTAL BYTE -		R1=0
    767	001464				ANBYTE:		;ANSII BYTE -		R1=4
    768
    769	001464	012700 	000001 		OPE001:	MOV	#1,R0		;SET WORD FLAG TO BYTE FLAG
    770
    771	001470	005702 			OPE004:	TST	R2		;IF NO VALUE TYPED NO MODE SET
    772	001472	001412 				BEQ	10$
    773	001474	010067 	176470 			MOV	R0,BW		;SET MODE AND FORMAT FLAGS
    774	001500	110067 	176510 			MOVB	R0,OBW		;SET THE LATER USE MODE
    775	001504	110167 	176503 			MOVB	R1,FM		;SET THE MODE FLAG FOR SOOTH
    776	001510	010467 	176450 			MOV	R4,CAD		;SET ADDRESS FOR EXPLICIT OPEN
    777	001514	010467 	176446 			MOV	R4,DOT		;RESET RETURN PTR.
    778	001520	022700 	000001 		10$:	CMP	#1,R0		;CHECK ON BYTE MODE
    779	001524	001406 				BEQ	15$		;NOT BYTE MODE
    780	001526	032767 	000001 	176430 		BIT	#1,CAD		;SEE IF ADDRESS IS ODD
    781	001534	001402 				BEQ	15$		;ALL IS GOOD
    782	001536	005001 				CLR	R1		;THEY GET BYTE MODE ONLY
    783	001540	000751 				BR	OPE001
    784	001542	010146 			15$:	MOV	R1,-(SP)	;SAVE FORMAT MAINLY
    785	001544	004767 	002040 			JSR	PC,GETCAD	;GET THE DATA
    786	001550	012601 				MOV	(SP)+,R1	;GET FORMAT
    787	001552	004771 	004364'			JSR	PC,@TYFORM(R1)	;PRINT DATA IN PROPER FORMAT
    788	001556	000645 				BR	NEWC		;GO GETTA NEW COMMAND TO DO
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 11
"<CR>-<LF>->-<-^-_-@" PROCESSOR - CLOSE AND OPEN REGISTERS

    790					.SBTTL "<CR>-<LF>->-<-^-_-@" PROCESSOR - CLOSE AND OPEN REGISTERS
    791
    792					;CARRIAGE RETURN
    793
    794	001560	004767 	002050 		CLCRET:	JSR	PC,PUTCAD	;CLOSE LOCATION
    795	001564	000627 				BR	DCD		;RETURN TO DECODER
    796
    797					;LESS THAN, BACK TO MAIN STREAM
    798
    799	001566	105267 	176423 		CLLSTH:	INCB	SEQ		;SET FLAG TO LATER RESTORE CAD
    800
    801					;LINE FEED, NEXT ONE DOWN
    802
    803	001572	004767 	002036 		CLLNFD:	JSR	PC,PUTCAD	;CLOSE PRESENT CELL
    804	001576	105767 	176413 			TSTB	SEQ		;SHOULD CAD BE RESTORED?
    805	001602	001406 				BEQ	OP5		;BRANCH IF NOT
    806	001604	016767 	176356 	176352 		MOV	DOT,CAD		;RESTORE PREVIOUS SEQUENCE
    807	001612	105067 	176377 			CLRB	SEQ		;RESET FLAG; NO LONGER NEEDED
    808	001616	000406 				BR	OP2A		;
    809	001620	066767 	176344 	176336 	OP5:	ADD	BW,CAD		;GENERATE NEW ADDRESS
    810	001626	016767 	176332 	176332 	OP2:	MOV	CAD,DOT		;INITIALIZE DOT
    811	001634				OP2A:	TYPE	CRLF		;PLACE CARRIAGE IN PROPER POSITION
    812	001636	016700 	176322 			MOV	CAD,R0		;NUMBER TO TYPE
    813	001642	004767 	002246 			JSR	PC,RORA		; CHECK FORMAT
    814	001646	116700 	176341 			MOVB	FM,R0		;SET FORMAT
    815	001652	006200 				ASR	R0		;SPLIT R0 IN HALF
    816	001654	116000 	000324'			MOVB	COMTAB(R0),R0	;SET SUFFIX CHARACTER
    817	001660					TYPE	R0		;PRINT CHARACTER
    818	001662	016704 	176276 			MOV	CAD,R4		;SET UP THE DATA
    819	001666	005002 				CLR	R2		; SET TO USE CAD ADDRESS
    820	001670	105067 	176302 			CLRB	OP		;THIS IS BECUZE
    821	001674	005067 	176300 			CLR	EXP
    822	001700	000167 	177412 			JMP	CLGL		;R0 HAS TERMIN, R4- DATA, R2= FLAG
    823
    824					;UP ARROW, NEXT ONE UP
    825
    826	001704	004767 	001724 		CLUPAR:	JSR	PC,PUTCAD
    827	001710	166767 	176254 	176246 		SUB	BW,CAD		;GENERATE NEW ADDRESS
    828	001716	000743 				BR	OP2		;GO DO THE REST
    829
    830					;BACK ARROW, PC RELATIVE COMPUTE
    831
    832	001720	004767 	000042 		CLBACK:	JSR	PC,TCLS		;TEST WORD MODE AND CLOSE
    833	001724	061202 				ADD	@R2,R2		;COMPUTE
    834	001726	122222 				CMPB	(R2)+,(R2)+	;NEW ADDRESS
    835	001730	010267 	176230 		PCS:	MOV	R2,CAD		;UPDATE CAD
    836	001734	000737 				BR	OP2A		;GO FINISH UP
    837
    838					;AT SIGN, ABSOLUTE OR INDIRECT CHAIN
    839
    840	001736	004767 	000024 		CLATSG:	JSR	PC,TCLS		;TEST WORD MODE AND CLOSE
    841	001742	011202 				MOV	@R2,R2		;GET ABSOLUTE ADDRESS
    842	001744	000771 				BR	PCS
    843
    844					;GREATER THAN, PC OFFSET BRANCH ADDRESS
    845
    846	001746	004767 	000014 		CLGRTH:	JSR	PC,TCLS		;TEST AND CLOSE
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 11-1
"<CR>-<LF>->-<-^-_-@" PROCESSOR - CLOSE AND OPEN REGISTERS

    847	001752	111201 				MOVB	@R2,R1		;COMPUTE NEW ADDRESS, EXTEND SIGN
    848	001754	006301 				ASL	R1		;R2=2@R2)
    849	001756	062701 	000002 			ADD	#2,R1		;+2
    850	001762	060102 				ADD	R1,R2		;   +PC
    851	001764	000761 				BR	PCS
    852
    853					;HANDY DANDY TO DO SOME LEG WORK
    854
    855	001766	004767 	001642 		TCLS:	JSR	PC,PUTCAD	;CLOSE CURRENT CELL
    856	001772	022767 	000002 	176170 		CMP	#2,BW		;ONLY WORD MODE ALLOWED
    857	002000	001031 				BNE	ERR1		;BRANCH IF ERROR
    858	002002	016702 	176156 			MOV	CAD,R2		;CURRENT ADDRESS IN R2
    859	002006	000207 				RTS	PC
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 12
COMMAND PROCESSORS, SECTION TWO ( O = G S P )

    861						.SBTTL	COMMAND PROCESSORS, SECTION TWO ( O = G S P )
    862
    863					.SBTTL "O" PROCESSOR - COMPUTE AND PRINT OFFSETS
    864
    865					;SYNTAX--
    866					;AO				TYPE OFFSETS FROM . TO A
    867					;L;AO				TYPE OFFSETS FROM L TO A
    868
    869					;TYPES	_PPPPPP >DDDDDD			WHERE P-P IS PC RELATIVE
    870					;					AND D-D IS BRANCH OFFSET
    871
    872	002010	005703 			OFST:	TST	R3		;HOW ABOUT A VALUE OTHER
    873	002012	001002 				BNE	10$		;THAN CAD
    874	002014	016705 	176144 			MOV	CAD,R5		;RELUCTANTLY
    875	002020	160504 			10$:	SUB	R5,R4
    876	002022	162704 	000002 			SUB	#2,R4		;NO TRICKS, ODD AND NON-EXIST THINGS
    877	002026					TYPE	'_		;TYPE PC RELATIVE CUE
    878	002030					TYPE	40		;
    879	002032	010400 				MOV	R4,R0
    880	002034	010446 				MOV	R4,-(SP)	;GOOD IDEA TO SAVE THIS
    881	002036	004767 	002216 			JSR	PC,CADW		;TYPE VALUE + BLANK
    882	002042					TYPE	76		;TYPE OFFSET BRANCH CUE
    883	002044	012600 				MOV	(SP)+,R0
    884	002046	006200 				ASR	R0		;DIVIDE
    885	002050	004767 	002204 		OF09:	JSR	PC,CADW		;16 BITS SO YOU CAN SEE HOW FAR OFF
    886	002054	000167 	177164 			JMP	DCD		; GET NEXT COMMAND
    887
    888					.SBTTL "=" PROCESSOR - PRINT LEFT SIDE EXPRESSION ON RIGHT SIDE
    889
    890	002060	010400 			EQUALS:	MOV	R4,R0		;PROPER PRIOR PLANNING PREVENTS
    891	002062	000772 				BR	OF09		;POOR PERFORMANCE
    892
    893					;JUST ANOTHER ERROR CALL
    894
    895	002064				ERR1:	ERROR
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13
SST INTERRUPT VECTOR ENTRY POINTS

    897					.SBTTL	SST INTERRUPT VECTOR ENTRY POINTS
    898
    899
    900						.IF DF 	M$$MGE
    901
    902					;
    903					; SEGMENT FAULT			- V1 - "MP" - NO PROCEED
    904					;
    905
    906	002066				SGMT:	TESTM	$SGFLT		;TEST IF IN EXEC MODE
    907	002074	042767 	160000 	177572 		BIC	#160000,SR0	;UNFREEZE SEGMENT UNIT
    908	002102	012767 	050115 	176070 		MOV	#"MP,EXP	;ENTRY PREFIX
    909	002110	000443 				BR	NIXP		;
    910
    911						.ENDC
    912
    913
    914					;
    915					; STACK OVERFLOW		-    - "SO" - NO PROCEED
    916					; ODD ADDRESS			- V0 - "OD" - NO PROCEED
    917					; BPT				- V2 - "BE" - SPECIAL CASES
    918					; T-BIT				- V2 - "TE" - PROCEED
    919					; IOT				- V3 - "IO" - PROCEED
    920					; RESERVED OR ILLEGAL		- V4 - "IL" - NO PROCEED
    921					;
    922
    923	002112	012767 	047523 	176060 	ODDA:	MOV	#"SO,EXP	;ASSUME STACK OVERFLOW
    924	002120	020627 	001204 			CMP	SP,#V$$CTR+4	;STACK OVERFLOW?
    925	002124	103435 				BLO	NIXP		;IF LO YES
    926	002126					TESTM	$TRP04		;TEST IF IN EXEC MODE
    927	002134	012767 	042117 	176036 		MOV	#"OD,EXP	;"OD:" FOR ODD ONE
    928	002142	000426 				BR	NIXP		;NIX ON PROCEED
    929	002144				BPTI:	TESTM	$TRACE		;TEST IF IN EXEC MODE
    930	002152	012767 	042502 	176020 		MOV	#"BE,EXP	;"BE:" FOR MAYBE A BAD ENTRY
    931	002160	105067 	176025 			CLRB	P		;ALLOW PROCEED DEAL
    932	002164	000433 				BR	INTR		;SPECIAL NUMBER FOR THIS ONE
    933	002166				IOTX:	TESTM	$IOTRP		;TEST IF IN EXEC MODE
    934	002174	012767 	047511 	175776 		MOV	#"IO,EXP	;"IO:" FOR IOTEE
    935	002202	000421 				BR	ALOP		;ALLOW PROCEED
    936	002204				ILLI:	TESTM	$ILINS		;TEST IF IN EXEC MODE
    937	002212	012767 	046111 	175760 		MOV	#"IL,EXP	;"IL:" FOR ILL INSTRUCTION
    938	002220	112767 	177777 	175763 	NIXP:	MOVB	#-1,P		;NO PROCEED
    939	002226	000412 				BR	INTR		;
    940
    941					;
    942					; EMT				- V5 - "EM" - PROCEED
    943					; TRAP				- V6 - "TR" - NO PROCEED
    944					;
    945
    946	002230				NEMT:	TESTM	$EMTRP		;TEST IF IN EXEC MODE
    947	002236	012767 	046505 	175734 		MOV	#"EM,EXP	;"EM:" FOR EMTEE
    948	002244	000400 				BR	ALOP		;
    949
    950					;
    951					; 11/40/45 FLOATING POINT	- V7 - "FP" - PROCEED
    952					;
    953
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13-1
SST INTERRUPT VECTOR ENTRY POINTS

    954
    955						.IF DF	F$$LTP!F$$LPP
    956
    957					FPPE:	TESTM	$FLTRP		;TEST IF IN EXEC MODE
    958						MOV	#"FP,EXP	;"FP:" FOR FLOATING POINT
    959
    960						.ENDC
    961
    962
    963	002246	112767 	000020 	175735 	ALOP:	MOVB	#BKP+2,P	;ALLOW PROCEED
    964
    965					;
    966					; COMMON INTERRUPT SERVICE AND DISPATCHER
    967					;
    968
    969	002254	032766 	000020 	000002 	INTR:	BIT	#TBT,2(SP)	;T-BIT SET IN STACKED PS WORD?
    970	002262	001405 				BEQ	1$		;IF EQ NO
    971	002264	026716 	175716 			CMP	PPC,(SP)	;PC CHANGE FROM LAST TRAP?
    972	002270	001002 				BNE	1$		;IF NE YES
    973	002272	000167 	000472 			JMP	RTN		;RTT MUST HAVE BEEN CHANGED TO AN RTI
    974	002276	012667 	175514 		1$:	MOV	(SP)+,UPC	;SET THE USER PC VALUE
    975	002302	012667 	175512 			MOV	(SP)+,UST	;AND HIS ENTRY STATUS
    976	002306	010067 	175466 			MOV	R0,UR0		;SAVE EXEC REGISTERS
    977	002312	012700 	000002'			MOV	#UR0+2,R0	;POINT TO REGISTER SAVE AREA
    978	002316	010120 				MOV	R1,(R0)+	;SAVE REGISTERS R1 THRU SP
    979	002320	010220 				MOV	R2,(R0)+	;
    980	002322	010320 				MOV	R3,(R0)+	;
    981	002324	010420 				MOV	R4,(R0)+	;
    982	002326	010520 				MOV	R5,(R0)+	;
    983	002330	010620 				MOV	SP,(R0)+	;
    984	002332	012706 	000570'			MOV	#XDTSTK,SP	;SET XDT STACK POINTER
    985	002336	012700 	000240'			MOV	#SSTADR,R0	;POINT TO TRAP VECTOR ADDRESS TABLE
    986	002342	012701 	000220'			MOV	#SSTXDT,R1	;POINT TO XDT TRAP VECTOR TABLE
    987	002346	012130 			5$:	MOV	(R1)+,@(R0)+	;SET XDT TRAP VECTOR ADDRESSES
    988	002350	020127 	000240'			CMP	R1,#SSTADR	;ANY MORE TO SET?
    989	002354	103774 				BLO	5$		;IF LO YES
    990
    991					;TRY AND FIND OUT WHAT TO DO
    992
    993	002356	105767 	175627 			TSTB	P		;SEE IF CONTROLLED BREAKPOINT
    994	002362	001006 				BNE	10$		;NOT DUE TO A PLANNED INTERRUPT
    995	002364	105767 	175620 			TSTB	T		;IS A BPT OR T-BIT, SEE IF A PROCEED
    996	002370	001103 				BNE	TBIT		;COMMAND IS BEING DONE, GO FINISH IT
    997	002372	105767 	175614 			TSTB	S		;NO REMOVAL OF BREAKS ON S.I. MODE
    998	002376	001007 				BNE	12$		;SKIP NEXT TWO WORDS
    999
   1000					;
   1001					; REMOVE EXEC BREAKPOINTS
   1002					;
   1003
   1004	002400	012704 	000036'		10$:	MOV	#ADR1,R4	;POINT TO BREAKPOINT VECTOR
   1005	002404	016434 	000044 		11$:	MOV	UIN-ADR1(R4),@(R4)+ ;REINSERT CORRECT CONTENTS
   1006	002410	022704 	000054'			CMP	#ADR1+BKP,R4	;ANY LEFT TO RESTORE?
   1007	002414	103373 				BHIS	11$		;IF HIS YES
   1008	002416	016705 	175374 		12$:	MOV	UPC,R5		;GET A COPY OF THE PC AT INTERRUPT
   1009	002422	105767 	175563 			TSTB	P		;BREAKPOINT OR T-BIT CHECK
   1010	002426	001043 				BNE	30$		;DEFINITELY NOT A BREAKPOINT
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13-2
SST INTERRUPT VECTOR ENTRY POINTS

   1011	002430	116704 	175556 			MOVB	S,R4		;SEE IF SINGLE STEPPING
   1012	002434	001024 				BNE	22$		;AND PRETEND
   1013
   1014					;AT THIS POINT IT MAY BE DUE TO T-BIT OR A BPT
   1015
   1016	002436	112767 	000020 	175545 		MOVB	#BKP+2,P	;SET ALLOW TO THE 8'TH ONE
   1017	002444	024567 	175546 			CMP	-(R5),TRTC	;BACK-UP R5 AND SEE WHAT'S UP
   1018	002450	001432 				BEQ	30$		;IT WAS A NON-BREAK BPT
   1019	002452	012704 	000016 			MOV	#BKP,R4		;SET ADDRESS OF LEGIT BREAKS
   1020	002456	020564 	000036'		15$:	CMP	R5,ADR1(R4)	;LOOK IT UP IN THE TABLE
   1021	002462	001407 				BEQ	20$		;FOUND THE NASTY LITTLE BUGGER
   1022	002464	162704 	000002 			SUB	#2,R4		;KEEP AT IT
   1023	002470	002372 				BGE	15$		;UNLESS NO MORE
   1024	002472	012704 	042524 			MOV	#"TE,R4		;NOT THERE, MUST BE T-BIT ERROR
   1025	002476	005725 				TST	(R5)+		;RESET PC TO MAKE IT RIGHT
   1026	002500	000414 				BR	26$		;LABOR
   1027	002502	010567 	175310 		20$:	MOV	R5,UPC		;BACK-UP PC FOR BREAKPOINT
   1028	002506	110467 	175477 		22$:	MOVB	R4,P		;BREAKPOINT IS A REAL ONE
   1029	002512	005364 	000060'			DEC	CT(R4)		;CHECK OUT THE PROCEED COUNT
   1030	002516	001145 				BNE	C990		;LABOR ON A MIS-CONCEPTION
   1031	002520	005264 	000060'			INC	CT(R4)		;RESET PROCEED COUNT
   1032	002524	006204 				ASR	R4		;OCTAL TO UN-BIASED ASCII
   1033	002526	062704 	041060 			ADD	#"0B,R4		;BIAS TO ASCII
   1034	002532	010467 	175442 		26$:	MOV	R4,EXP		;SET THE PREFIX UP
   1035
   1036					;COMMON TYPE ROUTINE FOR SST VECTORS USED UP
   1037
   1038	002536				30$:	TYPE	CRLF		;PLACE CARRIAGE IN PROPER POSITION
   1039	002540	016700 	175434 			MOV	EXP,R0		;THE PREFIX
   1040	002544					TYPE	R0+R0		;
   1041	002546					TYPE	':		;
   1042	002550	010500 				MOV	R5,R0		;TYPE ADDRESS OF INTERRUPT
   1043	002552	004767 	001336 			JSR	PC,RORA		;AND THE REST OF THE ENTRY
   1044	002556					DECODE
   1045
   1046					;
   1047					; TRAPS ARE ALWAYS HANDLED BY EXEC
   1048					;
   1049
   1050	002560	000167 	000000G		TRPI:	JMP	$TRTRP		;
   1051
   1052					;
   1053					; "G" PROCESSOR - GO TO PROGRAM
   1054					;SYNTAX--
   1055					;LG			START PROGRAM AT LOCATION L
   1056					;G			START PROGRAM AT CURRENT PC
   1057
   1058	002564	005702 			GOTO:	TST	R2		;SEE IF SPECIFIC ADDRESS
   1059	002566	001402 				BEQ	10$		;NO
   1060	002570	010467 	175222 			MOV	R4,UPC		;SET THE PC
   1061	002574	105067 	175412 		10$:	CLRB	S		;NO SINGLE INSTRUCTIONS
   1062	002600	105067 	175404 		TBIT:	CLRB	T		;CLEAR T-BIT FLAGS
   1063	002604	052767 	000020 	175206 		BIS	#TBT,UST	;BOTH
   1064	002612	105767 	175374 			TSTB	S		;SEE IF WE NEED A T-BIT BIT
   1065	002616	001015 				BNE	GRTT		;NO GO ON
   1066	002620	042767 	000020 	175172 		BIC	#TBT,UST	;SET THE TEE BIT
   1067
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13-3
SST INTERRUPT VECTOR ENTRY POINTS

   1068					;
   1069					; SET EXEC BREAKPOINTS
   1070					;
   1071
   1072	002626	012704 	000036'		10$:	MOV	#ADR1,R4	;POINT TO BREAKPOINT VECTOR
   1073	002632	017464 	000000 	000044 	20$:	MOV	@(R4),UIN-ADR1(R4) ;SAVE CONTENTS OF LOCATION
   1074	002640	016734 	175352 			MOV	TRTC,@(R4)+	;SET BREAKPOINT
   1075	002644	022704 	000054'			CMP	#ADR1+BKP,R4	;ANY MORE TO INSERT?
   1076	002650	103370 				BHIS	20$		;IF HIS YES
   1077	002652	012746 	000340 		GRTT:	MOV	#PR7,-(SP)	;SET RTT PS WORD
   1078	002656	012746 	002704'			MOV	#20$,-(SP)	;SET RTT PC WORD
   1079	002662	012737 	002674'	000010 		MOV	#10$,@#10	;PLUG ILLEGAL INSTRUCTION TRAP
   1080	002670	011700 				MOV	(PC),R0		;GET RTT INSTRUCTION CODE
   1081	002672	000006 				RTT			;EXECUTE RTT INSTRUCTION
   1082	002674	062706 	000004 		10$:	ADD	#4,SP		;CLEAN STACK
   1083	002700	012700 				MOV	(PC)+,R0	;GET RTI INSTRUCTION CODE
   1084	002702	000002 				RTI			;
   1085	002704	010067 	000060 		20$:	MOV	R0,RTN		;SET PROPER RETURN INSTRUCTION
   1086	002710	012700 	000240'			MOV	#SSTADR,R0	;POINT TO TRAP VECTOR ADDRESS TABLE
   1087	002714	012701 	000144'			MOV	#SSTVEC,R1	;POINT TO EXEC TRAP VECTOR TABLE
   1088	002720	012130 			30$:	MOV	(R1)+,@(R0)+	;SET EXEC TRAP VECTORS
   1089	002722	020027 	000260'			CMP	R0,#SSTADR+<SSTADR-SSTXDT> ;ANY MORE TO SET?
   1090	002726	103774 				BLO	30$		;IF LO YES
   1091	002730	012700 	000002'			MOV	#UR0+2,R0	;POINT TO SAVED R1
   1092	002734	012001 				MOV	(R0)+,R1	;RESTORE REGISTERS R1 THRU SP THEN R0
   1093	002736	012002 				MOV	(R0)+,R2	;
   1094	002740	012003 				MOV	(R0)+,R3	;
   1095	002742	012004 				MOV	(R0)+,R4	;
   1096	002744	012005 				MOV	(R0)+,R5	;
   1097	002746	012006 				MOV	(R0)+,SP	;
   1098	002750	016700 	175024 			MOV	UR0,R0		;
   1099	002754	016746 	175040 			MOV	UST,-(SP)	;SET EXEC PS WORD
   1100	002760	016746 	175032 			MOV	UPC,-(SP)	;SET EXEC PC WORD
   1101	002764	011667 	175216 			MOV	(SP),PPC	;SET PREVIOUS PC WORD
   1102	002770	000002 			RTN:	RTI			;RETURN TO EXEC (MAY BE CHANGED TO RTT)
   1103
   1104					;
   1105					; "S" PROCESSOR - SINGLE STEP PROCEED
   1106					;SYNTAX--
   1107					;NS				EXECUTE N INSTRUCTIONS AND THEN STOP
   1108					;S				EXECUTE ONE INSTRUCTION
   1109
   1110	002772	112700 	000020 		SNGL:	MOVB	#BKP+2,R0	;FAKE THE BREAK
   1111	002776	110067 	175210 			MOVB	R0,S		;SET THE FLAG FOR S.I. MODE
   1112	003002	000405 				BR	PR01		;FAKE A PROCEED IN S.I. MOOD
   1113
   1114					;
   1115					; "P" PROCESSOR - PROCEED FROM BREAKPOINT
   1116					;SYNTAX--
   1117					;NP				PROCEED THRU THIS BREAKPOINT N TIMES
   1118					;P				ASSUME N=1
   1119
   1120	003004	105067 	175202 		PROC:	CLRB	S		;SET FAST MODE
   1121	003010	116700 	175175 			MOVB	P,R0		;GET NUMBER OF BREAK
   1122	003014	100423 				BMI	PR02		;THERE WASN'T ONE SO FAR ?
   1123	003016	005702 			PR01:	TST	R2		;SEE IF VALUE IN R4 VIA R2
   1124	003020	001002 				BNE	10$		;SEE IF AND WHAT SETTING FOR COUNT
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13-4
SST INTERRUPT VECTOR ENTRY POINTS

   1125	003022	012704 	000001 			MOV	#1,R4		;INIT IT TO ONE FOR A START
   1126	003026	010460 	000060'		10$:	MOV	R4,CT(R0)	;SET USER'S COUNT
   1127	003032	126727 	175153 	000016 	C990:	CMPB	P,#BKP		;SEE IF A REAL ONE OR A FAKE
   1128	003040	003257 				BGT	TBIT		;BRANCH IF FAKE
   1129	003042	105767 	175144 			TSTB	S		;SEE IF SINGLE INSTRUCTION MODE
   1130	003046	001254 				BNE	TBIT		;IF SO EXIT NOW
   1131	003050	105267 	175134 			INCB	T		;SET T-BIT FLAG
   1132	003054	052767 	000020 	174736 		BIS	#TBT,UST	;SET T-BIT
   1133	003062	000673 				BR	GRTT
   1134	003064				PR02:	ERROR			;ANNOUNCE ERROR
   1135
   1136
   1137					;
   1138					; TEST IF IN EXEC MODE
   1139					;
   1140
   1141	003066	012546 			TESTM:	MOV	(R5)+,-(SP)	;PICK UP EXEC TRAP ROUTINE ADDRESS
   1142
   1143
   1144						.IF DF	M$$MGE
   1145
   1146	003070	005767 	000000G			TST	$STKDP		;ALLOW EXEC TO HANDLE TRAP?
   1147	003074	003022 				BGT	20$		;IF GT YES, TRAP WAS IN USER MODE
   1148	003076	002420 				BLT	10$		;IF LT NO, BAD STACK DEPTH
   1149	003100	026627 	000004 	000000G		CMP	4(SP),#$DRLM1	;TRAP OCCUR IN DIRECTIVE DISPATCHER?
   1150	003106	103404 				BLO	5$		;IF LO NO
   1151	003110	026627 	000004 	000000G		CMP	4(SP),#$DRLM2	;TRAP OCCUR IN DIRECTIVE DISPATCHER?
   1152	003116	101411 				BLOS	20$		;IF LO YES, PASS TRAP TO EXEC
   1153	003120	026627 	000004 	000000G	5$:	CMP	4(SP),#$DQLM1	;TRAP OCCUR IN QIO DIRECTIVE?
   1154	003126	103404 				BLO	6$		;IF LO NO
   1155	003130	026627 	000004 	000000G		CMP	4(SP),#$DQLM2	;TRAP OCCUR IN QIO DIRECTIVE?
   1156	003136	101401 				BLOS	20$		;IF LOS YES, ALLOW EXEC TO HANDLE TRAP
   1157	003140				6$:				;REF LABEL
   1158
   1159
   1160						.IF DF	P$$LAS
   1161
   1162						CMP	4(SP),#$DPLM1	;FAULT OCCUR RETRIEVING DEF BLOCK ADDR?
   1163						BLO	10$		;IF LO NO
   1164						CMP	4(SP),#$DPLM2	;FAULT OCCUR RETRIEVING DEF BLOCK ADDR?
   1165						BLOS	20$		;IF LOS YES, ALLOW EXEC TO HANDLE TRAP
   1166
   1167						.ENDC
   1168
   1169
   1170						.IFF
   1171
   1172						TST	$STKDP		;TRAP IN EXEC?
   1173						BLE	10$		;IF LE YES
   1174						CMP	4(SP),$EXSIZ	;TRAP OCCUR IN EXEC CODE?
   1175						BHIS	20$		;IF HIS NO
   1176						BIT	#PR7,6(SP)	;EXECUTING AT PRIORITY OTHER THAN ZERO?
   1177						BEQ	20$		;IF EQ NO
   1178
   1179						.ENDC
   1180
   1181
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 13-5
SST INTERRUPT VECTOR ENTRY POINTS

   1182	003140	010516 			10$:	MOV	R5,(SP)		;SET TO XDT ADDRESS
   1183	003142	012605 			20$:	MOV	(SP)+,R5	;SET RETURN ADDRESS
   1184	003144	000205 				RTS	R5		;PROCESS TRAP
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 14
COMMAND PROCESSORS, SECTION THREE ( L V X W N E F )

   1186						.SBTTL	COMMAND PROCESSORS, SECTION THREE ( L V X W N E F )
   1187
   1188					.SBTTL "L" PROCESSOR - LIST MEMORY ON THE SPECIFIED DEVICE
   1189
   1190					;SYNTAX--
   1191					; D;S;FL		WHERE	D IS DEV, <> OR 0 = CONSOLE, 1 = LPT
   1192					;				S IS START ADDRESS, SETS $L IF THERE
   1193					;				F IS STOP ADDRESS, SETS $H IF THERE
   1194
   1195	003146	005702 			LIST:	TST	R2		;SET UPPER AND LOWER LIMITS
   1196	003150	001402 				BEQ	10$		;IF SPECIFIED TO DO SO
   1197	003152	010467 	174650 			MOV	R4,HI
   1198	003156	005703 			10$:	TST	R3		;DO THE LOW ONE
   1199	003160	001402 				BEQ	15$
   1200	003162	010567 	174636 			MOV	R5,LOW
   1201	003166	122767 	000002 	175003 	15$:	CMPB	#2,SMFD		;SEE IF AN EXTRA ARGUMENT
   1202	003174	001012 				BNE	17$		;USE THE CONSOLE
   1203	003176	005767 	174772 			TST	D.ARGS		;LOOK AT THE ARGUMENT
   1204	003202	001407 				BEQ	17$		;DO NOT ARGUE
   1205	003204	012767 	177514 	174772 		MOV	#LPS,OUTS	;SET OUTPUT STATUS REGISTER TO LINE PRINTER
   1206	003212	012767 	177516 	174762 		MOV	#LPB,OUTB	;
   1207	003220					TYPE	14		;OUTPUT A FORM FEED
   1208	003222	016705 	174576 		17$:	MOV	LOW,R5		;GET STARTING DUMP ADDRESS
   1209	003226	116700 	174762 			MOVB	OBW,R0		;GET ADDRESS INCREMENT
   1210	003232	160005 				SUB	R0,R5		;BIAS ADDRESS BY ADDRESS INCREMENT
   1211	003234	010567 	174724 			MOV	R5,CAD		;SET CURRENT ADDRESS
   1212	003240	005746 				TST	-(SP)		;MAKE A HOLE IN THE STACK
   1213	003242	005016 			20$:	CLR	(SP)		;NEW LINE UP
   1214	003244	004767 	000070 			JSR	PC,SNAGIT	;ACCESS DEVICE FOR DATA
   1215	003250	004767 	000116 			JSR	PC,SPRINT	;PRINT ADDRESS AND FIRST ITEM
   1216	003254	004767 	000060 		25$:	JSR	PC,SNAGIT	;GET MORE DATA
   1217	003260	004767 	000134 			JSR	PC,DPRINT	;JUST PRINT THE DATA
   1218	003264	005216 				INC	(SP)		;COUNT THE DATA
   1219	003266	022716 	000007 			CMP	#7,(SP)		;CHECK THE COUNT
   1220	003272	001370 				BNE	25$		;JUST LIKE THEY TOLD YOU AT THE
   1221	003274	000762 				BR	20$		;FAMOUS PROGRAMMERS SCHOOL
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 15
"L" PROCESSOR - LIST MEMORY ON THE SPECIFIED DEVICE

   1223					;
   1224					; EXIT COMMAND
   1225					;
   1226					; SYNTAX X
   1227					;
   1228					; THE EXIT COMMAND IN XDT EFFECTS A JUMP TO THE EXECUTIVE $CRASH ROUTINE.
   1229					;
   1230
   1231	003276	012700 	000002'		EXIT:	MOV	#UR0+2,R0	;POINT TO SAVED R1
   1232	003302	012001 				MOV	(R0)+,R1	;RESTORE REGISTERS R1 THRU SP THEN R0
   1233	003304	012002 				MOV	(R0)+,R2	;
   1234	003306	012003 				MOV	(R0)+,R3	;
   1235	003310	012004 				MOV	(R0)+,R4	;
   1236	003312	012005 				MOV	(R0)+,R5	;
   1237	003314	012006 				MOV	(R0)+,SP	;
   1238	003316	016700 	174456 			MOV	UR0,R0		;
   1239					                                                                        ; JP028
   1240					                                                                        ; JP028
   1241						.IF DF	C$$RSH                                                  ; JP028
   1242					                                                                        ; JP028
   1243						MOV	UST,$CRUST	; MOVE USER PS FOR THE CRASH MODULE     ; JP028
   1244						MOV	UPC,$CRUPC	; MOVE USER PC FOR THE CRASH MODULE     ; JP028
   1245						JMP	$CRALT		; ALTERNATE ENTRY POINT TO THE CRASH MOD; JP028
   1246					                                                                        ; JP028
   1247						.IFF                                                            ; JP028
   1248					                                                                        ; JP028
   1249	003322	000167 	000000G			JMP	$CRASH		;IF NO CRASH SUPPORT, JUST CRASH        ; JP028
   1250					                                                                        ; JP028
   1251						.ENDC                                                           ; JP028
   1252					                                                                        ; JP028
   1253					                                                                        ;**-3
   1254						.SBTTL	UTILITIES - COMMAND SUPPORT ROUTINES
   1255
   1256					;TEST FOR VALID RELOCATION REGISTER IN R4
   1257
   1258	003326	022704 	000007 		RTST:	CMP	#RLR/2,R4	;GET A GOOD NUMBER FOR A REGISTER
   1259	003332	103401 				BLO	10$		;NOT TOO GOOD, QUESTION IT
   1260	003334	006304 				ASL	R4
   1261	003336				10$:	RETURN			;
   1262
   1263					;SNAG MEMORY LOCATION 	JSR PC,SNAGIT
   1264
   1265					;NEEDS--
   1266					;CAD		POINTS TO MEMORY WORD (APPROXIMATELY THAT IS)
   1267					;R0,R5		CONTAINS REAL WORD UPON EXIT TO "SRCHEK"
   1268
   1269	003340	116700 	174650 		SNAGIT:	MOVB	OBW,R0		;SET THE INCREMENT
   1270	003344	060067 	174614 			ADD	R0,CAD		;INCREMENT AND NOW
   1271	003350	026767 	174610 	174450 		CMP	CAD,HI		;SEE IF MORE TO DO
   1272	003356	101401 				BLOS	10$		;IF NOT DO NOT
   1273	003360					DECODE			;GO RESET STACK AND NO NEXT COMMAND
   1274	003362	004767 	000222 		10$:	JSR	PC,GETCAD	;ACCESS METHOD
   1275	003366	010005 				MOV	R0,R5		;MAKE A COPY FOR LATER
   1276	003370					RETURN			;
   1277
   1278					;SEARCH HIT PRINT			JSR PC,SPRINT
   1279
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 15-1
UTILITIES - COMMAND SUPPORT ROUTINES

   1280					;CAD POINTS TO THE LOC TO BE PRINTED
   1281					;R5 CONTAINS THE CONTENTS OF THE LOCATION TO BE PRINTED
   1282
   1283	003372				SPRINT:	TYPE	CRLF		;PLACE CARRIAGE IN PROPER POSITION
   1284	003374	016700 	174564 			MOV	CAD,R0		;THE LOCATION
   1285	003400	004767 	000510 			JSR	PC,RORA		;THE MODE
   1286	003404	116700 	174603 			MOVB	FM,R0		;PICK UP OLD CURENT MODE
   1287	003410	006200 				ASR	R0		;HALVES
   1288	003412	116000 	000324'			MOVB	COMTAB(R0),R0	;AH HA
   1289	003416					TYPE	R0		;TYPE THE MODE REGISTER
   1290
   1291					;DATA PRINT ROUTINE			JSR PC,DPRINT
   1292
   1293					;PRINTS DATA IN R5 IN CURRENT MODE
   1294
   1295	003420	116701 	174567 		DPRINT:	MOVB	FM,R1		;SET THE MODE
   1296	003424	010500 				MOV	R5,R0		;THIS IS THE POOR DATA
   1297	003426	010546 				MOV	R5,-(SP)	;SAVE THE DATA
   1298	003430	004771 	004364'			JSR	PC,@TYFORM(R1)	;DO THAT __ TO THE POOR DATA
   1299	003434	012605 				MOV	(SP)+,R5	;RESTORE THE DATA
   1300	003436	000207 				RTS	PC		;RESTORE THE PC
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 16
UTILITIES - COMMAND SUPPORT ROUTINES

   1302					;EXPRESSION COMPUTATION ROUTINE		JSR PC,EXPCOM
   1303
   1304					;NEEDS--
   1305					;OP			THE OPERATION (-2=*, 0=+, *=2)
   1306					;EXP			THE LEFT SIDE
   1307					;R4			THE RIGHT SIDE
   1308
   1309					;SETS UP--
   1310					;OP			BACK TO 0 FOR ADD
   1311					;EXP,R4		ALL SO FAR
   1312
   1313	003440	105767 	174532 		EXPCOM:	TSTB	OP		;SEE WHAT'S UP CHUCK
   1314	003444	100412 				BMI	20$
   1315	003446	001401 				BEQ	10$
   1316	003450	005404 				NEG	R4		;MINUS, OP=2
   1317	003452	066704 	174522 		10$:	ADD	EXP,R4		;PLUS, OP=0
   1318	003456	010467 	174516 		15$:	MOV	R4,EXP		;COMMON OUT, SET EXP TO WHATEVER
   1319	003462	105067 	174510 			CLRB	OP		;IS IN R4 TOO
   1320	003466	005202 				INC	R2		;SET R2 SO THAT R4 IS, OP=0
   1321	003470	000207 				RTS	PC
   1322	003472	016746 	174502 		20$:	MOV	EXP,-(SP)	;GET THE LEFT SIDE OF EXPRESSION
   1323	003476	006316 				ASL	(SP)		; MULTIPLY BY 10
   1324	003500	006316 				ASL	(SP)		;
   1325	003502	006316 				ASL	(SP)		;
   1326	003504	061604 				ADD	(SP),R4		; ADD IT
   1327	003506	006316 				ASL	(SP)		; MULTIPLY BY 40
   1328	003510	006316 				ASL	(SP)		; WHICH IS LIKE MULTIPLYING BY 50
   1329	003512	062604 				ADD	(SP)+,R4	;AND ADD IT TO THE RIGHT
   1330	003514	000760 				BR	15$		;COMMON OUT
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 17
UTILITIES - COMMAND SUPPORT ROUTINES

   1332					;BUILD AN OCTAL NUMBER		JSR PC,GETNUM
   1333
   1334					;NEEDS AND RETURNS--
   1335					;R0	NON-OCTAL TERMINATING CHARACTER
   1336					;R2	OCTAL CHARACTER COUNT
   1337					;R4	OCTAL NUMBER THAT I GOT, YOU GET
   1338
   1339	003516	005002 			GETNUM:	CLR	R2		;NEW R2 AND R4
   1340	003520	005004 				CLR	R4
   1341	003522	004767 	000146 		10$:	JSR	PC,GET		;GET 1 CHARACTER
   1342	003526	122700 	000060 			CMPB	#'0,R0		;NON-OCTAL, LESS THAN "0"
   1343	003532	101037 				BHI	GETC99
   1344	003534	122700 	000067 			CMPB	#'7,R0		;NON-OCTAL, LESS THAN "7"
   1345	003540	103434 				BLO	GETC99
   1346	003542	042700 	177770 			BIC	#177770,R0	;MAKE INTO ACCEPTABLE RANGE
   1347	003546	006304 				ASL	R4		; SHIFT LEFT
   1348	003550	006304 				ASL	R4		; 3 BITS
   1349	003552	006304 				ASL	R4		;
   1350	003554	060004 				ADD	R0,R4		;PLANT LO PLACE
   1351	003556	005202 				INC	R2		;ACCOUNT FOR NEW ONE
   1352	003560	000760 				BR	10$		;NEXT ONE OR OTHER
   1353
   1354					;SCAN A LIST OF CHARACTERS	JSR R5,LOOKUP
   1355
   1356					;CALL--
   1357					;		R0	HAS THE CHARACTER
   1358					;	JSR	R5,LOOKUP	;THAT IS IT
   1359					;	 +	LIST TO USE, 00 BYTE IS END OF LIST
   1360
   1361					;RETURNS AT CALL + 2 WITH--
   1362					;R0	STILL HAS CHARACTER
   1363					;R1	HAS INDEX X2 OF FOUND CHARACTER IF C=0
   1364					;C=1	CHARACTER WAS NOT FOUND
   1365
   1366	003562	011501 			LOOKUP:	MOV	(R5),R1		;GET LIST START
   1367	003564	120011 			10$:	CMPB	R0,(R1)		;IS THIS THE ONE
   1368	003566	001003 				BNE	20$		;RIGHT IT WASN'T
   1369	003570	162501 				SUB	(R5)+,R1	;COMPUTE INDEX AND RETURN
   1370	003572	006301 				ASL	R1		;DO THIS FOR EVERBODY, C=0
   1371	003574	000404 				BR	30$
   1372	003576	105721 			20$:	TSTB	(R1)+		;CHECK FOR END OF LIST
   1373	003600	001371 				BNE	10$		;IF NOT LOOK AT NEXT ITEM
   1374	003602	005725 				TST	(R5)+		;END, AVOID ILLEGAL INSTRUCTION
   1375	003604	000261 				SEC			;SECURITY EXCHANGE COMMISION
   1376	003606	000205 			30$:	RTS	R5		;SECURITY ELSEWHERE
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 18
UTILITIES - COMMAND SUPPORT ROUTINES

   1378					;GET CONTENTS OF ADDRESS IN THE MODE		JSR PC,GETCAD
   1379
   1380					;NEEDS--
   1381					;R0		THE MODE 1=BYTE, 2=WORD
   1382					;CAD		THE ADDRESS
   1383					;DEVI		THE DEVICE CODE
   1384
   1385					;RETURNS--
   1386					;R0		HAS THE DATA YOU ASKED FOR
   1387
   1388	003610	016703 	174350 		GETCAD:	MOV	CAD,R3		; GET CORE ADDRESS
   1389	003614	010667 	174352 			MOV	SP,OPN		; SET LOCATION OPEN
   1390	003620	006200 				ASR	R0		;PUSH BW FLAG INTO CARRY BIT
   1391	003622	103002 				BCC	10$		;2 WON'T FIT SO IS WORD
   1392	003624	111300 				MOVB	(R3),R0		;ACCESS BYTE
   1393	003626	000401 				BR	GETC99
   1394	003630	011300 			10$:	MOV	(R3),R0		;ACCESS WORD
   1395	003632	000207 			GETC99:	RTS	PC		;STACK ACCESS
   1396
   1397					;PUT R4 INTO ADDRESS IN THE MODE		JSR PC,PUTCAD
   1398
   1399					;NEEDS--
   1400					;R2		CONTENT FLAG, 0 FOR NONE, ELSE R4 IS GOLD
   1401					;R4		THE DATA
   1402					;BW		THE MODE FLAG, IF 0 THEN NO LOCATION OPEN
   1403
   1404	003634	005702 			PUTCAD:	TST	R2		;CHECK FOR TYPED VALUE
   1405	003636	001415 				BEQ	12$		;NO DATA NO DODO
   1406	003640	016700 	174324 			MOV	BW,R0		;PICK UP MODE AN CC'S
   1407	003644	005767 	174322 			TST	OPN		; IS A LOCATION OPEN AT PRESENT?
   1408	003650	001410 				BEQ	12$		;NOT OPEN NOT STORED
   1409	003652	016703 	174306 			MOV	CAD,R3		; GET CORE ADDRESS
   1410	003656	032700 	177776 			BIT	#177776,R0	;CHECK MODE
   1411	003662	001002 				BNE	10$		;WORD MODE
   1412	003664	110413 				MOVB	R4,(R3)		;BYTE MODE
   1413	003666	000401 				BR	12$		;BRANCH MODE
   1414	003670	010413 			10$:	MOV	R4,(R3)		;WORD MODE
   1415	003672	000207 			12$:	RTS	PC
   1416
   1417
   1418
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 19
UTILITIES - COMMAND SUPPORT ROUTINES

   1420					;
   1421					; GET CHARACTER FROM CONSOLE TERMINAL
   1422					;
   1423
   1424	003674	105767 	177560 		GET:	TSTB	TKS		;CHARACTER READY?
   1425	003700	100375 				BPL	GET		;IF PL NO
   1426	003702	116700 	177562 			MOVB	TKB,R0		;READ INPUT BYTE
   1427	003706	042700 	177600 			BIC	#177600,R0	;CLEAR EXCESS BITS
   1428	003712	120027 	000012 			CMPB	R0,#12		;BRANCH IF <LF>
   1429	003716	001426 				BEQ	40$		;NO ECHO <LF>'S
   1430	003720	004567 	177636 			JSR	R5,LOOKUP	;CHECK IF ALTMODE
   1431	003724	000320'				+	ALTTAB
   1432	003726	103402 				BCS	20$		;
   1433	003730	112700 	000044 			MOVB	#'$,R0		;CHANGE TO $ IF SO
   1434	003734	010046 			20$:	MOV	R0,-(SP)	;SAVE INPUT CHARACTER
   1435	003736					TYPE	R0		;ECHO CHARACTER
   1436	003740	012600 				MOV	(SP)+,R0	;RESTORE INPUT CHARACTER
   1437	003742	022700 	000141 			CMP	#141,R0		;LOWER CASE CHARACTER?
   1438	003746	101005 				BHI	30$		;IF HI NO
   1439	003750	022700 	000172 			CMP	#172,R0		;LOWER CASE CHARACTER?
   1440	003754	103402 				BLO	30$		;IF LO NO
   1441	003756	162700 	000040 			SUB	#40,R0		;CONVERT TO UPPER CASE CHARACTER
   1442	003762	122700 	000040 		30$:	CMPB	#' ,R0		;CVT BLANK
   1443	003766	001002 				BNE	40$
   1444	003770	112700 	000053 			MOVB	#'+,R0		;INTO +
   1445	003774				40$:	RETURN			;
   1446
   1447					;
   1448					; TYPE CHARACTER ON OUTPUT DEVICE
   1449					;
   1450
   1451	003776	011646 			TYPE:	MOV	(SP),-(SP)	;DUPLICATE RETURN ADDRESS
   1452	004000	162716 	000002 			SUB	#2,(SP)		;POINT TO TRAP INSTRUCTION
   1453	004004	113646 				MOVB	@(SP)+,-(SP)	;GET LOW BYTE OF INSTRUCTION
   1454	004006	100402 				BMI	10$		;IF MI CONTROL BYTE
   1455	004010	012600 				MOV	(SP)+,R0	;SET BYTE TO OUTPUT
   1456	004012	000411 				BR	30$		;
   1457	004014	032716 	000040 		10$:	BIT	#40,(SP)	;OUTPUT CONTENTS OF R0?
   1458	004020	001402 				BEQ	20$		;IF EQ YES
   1459	004022	012700 				MOV	(PC)+,R0	;SET TO OUTPUT <CR><LF>
   1460	004024	   015 	   012 			.BYTE	15,12		;
   1461	004026	106326 			20$:	ASLB	(SP)+		;OUTPUT TWO BYTES?
   1462	004030	100002 				BPL	30$		;IF PL NO
   1463	004032					TYPE	R0		;TYPE OUT FIRST BYTE
   1464	004034	000300 				SWAB	R0		;SET UP HIGH BYTE
   1465	004036	105777 	174142 		30$:	TSTB	@OUTS		;OUTPUT DEVICE READY?
   1466	004042	100375 				BPL	30$		;IF PL NO
   1467	004044	110077 	174132 			MOVB	R0,@OUTB	;OUTPUT BYTE
   1468	004050	105777 	174130 		35$:	TSTB	@OUTS		;OUTPUT DEVICE READY?
   1469	004054	100375 				BPL	35$		;IF PL YES
   1470	004056	122700 	000015 			CMPB	#15,R0		;WAS OUTPUT BYTE A CARRIAGE RETURN?
   1471	004062	001013 				BNE	50$		;IF NE NO
   1472	004064	022767 	177514 	174112 		CMP	#LPS,OUTS	;OUTPUT DEVICE LINE PRINTER?
   1473	004072	001407 				BEQ	50$		;IF EQ YES
   1474	004074	012746 	000005 			MOV	#5,-(SP)	;SET FILL COUNT TO 5
   1475	004100	105000 				CLRB	R0		;SET OUTPUT NULLS
   1476	004102				40$:	TYPE	R0		;OUTPUT A NULL
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 19-1
UTILITIES - COMMAND SUPPORT ROUTINES

   1477	004104	005316 				DEC	(SP)		;ANY MORE TO OUTPUT?
   1478	004106	003375 				BGT	40$		;IF GT YES
   1479	004110	005726 				TST	(SP)+		;CLEAN STACK
   1480	004112	000002 			50$:	RTI			;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 20
UTILITIES - PRETTY PRINTERS

   1482						.SBTTL	UTILITIES - PRETTY PRINTERS
   1483
   1484					;PRINT ADDRESS- RELOC, SYMBOLIC, OR ABSL	JSR PC.RORA
   1485
   1486					;R0	ADDRESS TO BE PRINTED
   1487					;FORM	CORE ADDRESS FORMAT (0-RELOC  1-ABSOL)
   1488
   1489					;REGISTER	'$R ' OR '$DR '
   1490					;CORE		'D,XXXXXX ' OR 'XXXXXX '
   1491
   1492	004114	010046 			RORA:	MOV	R0,-(SP)	;CALLING VALUE ONA TOPPA SATCK
   1493	004116	022716 	000000'			CMP	#INTBEG,(SP)
   1494	004122	101042 				BHI	50$		;BELOW FIRST NON-INDEXED
   1495	004124	022716 	000142'			CMP	#INTEND,(SP)
   1496	004130	103437 				BLO	50$		;ABOVE LAST NON-INDEXED
   1497	004132					TYPE	'$		;ANNOUNCE INTENSIONS
   1498	004134	022716 	000036'			CMP	#INTINX,(SP)
   1499	004140	101412 				BLOS	20$		;GO TO DO INDEXED
   1500	004142	012600 				MOV	(SP)+,R0	;NON-INDEXED REGISTER ----- "$R "
   1501	004144	162700 	000000'			SUB	#INTBEG,R0	;CLEANED UP STACK, GET OFFSET
   1502	004150	006200 				ASR	R0		;BYTE THAT WORD, WORD THAT BYTE
   1503	004152	116000 	000260'			MOVB	NIXMAP(R0),R0	;MAGIC CHARACTER FROM TABLE
   1504	004156	052700 			15$:	BIS	(PC)+,R0
   1505	004160	   000 	   040 			.BYTE	000,' 		;CHARACTER PLUSSA BLANK
   1506	004162					TYPE	R0+R0		;NAME PLUS BLANK AND SPLIT
   1507	004164					RETURN			;
   1508	004166	005001 			20$:	CLR	R1		;SEE WHICH SET OF TABLES WE GOT
   1509	004170	026116 	000310'		22$:	CMP	INXTBL+2(R1),(SP) ;LOOK ON AHEAD TO FIND BEHIND
   1510	004174	101002 				BHI	24$		;R1 POINTS TO BASE OF SET
   1511	004176	005721 				TST	(R1)+		;THINK ABOUT THOSE DUMMY ENTRIES DUMMY
   1512	004200	000773 				BR	22$
   1513	004202	012600 			24$:	MOV	(SP)+,R0	;INDEXED REGISTER ---- "$DR "
   1514	004204	166100 	000306'			SUB	INXTBL(R1),R0	;GET ADDRESS AND COMPUTE OFFSET IN WORDS
   1515	004210	006200 				ASR	R0		;AND FINALLY IN PLAIN TALK
   1516	004212	062700 	000060 			ADD	#'0,R0		;CONVERT TO ASCII
   1517	004216					TYPE	R0		;TYPE OUT REGISTER NUMBER
   1518	004220	006201 				ASR	R1
   1519	004222	116100 	000300'			MOVB	INXREG(R1),R0	;PICK UP THE REAL CHARACTER
   1520	004226	000753 				BR	15$		;GO PRINT REST OF IT
   1521	004230	005767 	173600 		50$:	TST	FORM		;CORE ADDRESS SEE WHAT USER WANTS
   1522	004234	001010 				BNE	80$		;TYPE AS ABSOLUTE.
   1523	004236	011604 				MOV	(SP),R4		;RELOCATE ---- "R,XXXXXX "
   1524	004240	004767 	000252 			JSR	PC,LOCA		;WE ALWAYS PICK, XDT KNOWS BEST
   1525	004244	100404 				BMI	80$		;BUT NOT ALL THE TIME
   1526	004246	010116 				MOV	R1,(SP)		;SET THE DISPLACEMENT
   1527	004250	062700 	026060 			ADD	#"0,,R0		;PRINT REGISTER AND COMMA
   1528	004254					TYPE	R0+R0		;DISK AND CORE
   1529	004256	012600 			80$:	MOV	(SP)+,R0	;PRINT R0 AS A WORD
   1530
   1531					;TYPE R0 AS BYTE OR WORD, TWO ENTRIES
   1532					;	FOR A WORD				JSR PC,CADW
   1533					;	FOR A BITE				JSR PC,CADB
   1534
   1535	004260	010067 	173546 		CADW:	MOV	R0,QUAN		;SET THE FAMOUS QUANTITY VALUE
   1536	004264	012703 	000006 			MOV	#6,R3		;# OF DIGITS
   1537	004270	012704 	177776 			MOV	#-2,R4		;# OF BITS FIRST-3
   1538	004274	000411 				BR	CA01		;DO THE COMMON THING
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 20-1
UTILITIES - PRETTY PRINTERS

   1539	004276	005067 	173530 		CADB:	CLR	QUAN		;SET FOR ALL OF QUAN A BYTE
   1540	004302	110067 	173524 			MOVB	R0,QUAN		;SET THE QUANTITY THING AGAIN
   1541	004306	012703 	000003 			MOV	#3,R3		;THERE ARE THREE DIGITS
   1542	004312	012704 	177777 			MOV	#-1,R4		;AND ONLY TWO BITS
   1543	004316	000300 				SWAB	R0		;SWITCH ENDS
   1544	004320	010046 			CA01:	MOV	R0,-(SP)	;SAVE R0
   1545	004322	062704 	000003 		10$:	ADD	#3,R4		;COMPUTE THE NUMBER OF BITS TO DO
   1546	004326	005000 				CLR	R0
   1547	004330	006116 			15$:	ROL	(SP)		;GET A BIT
   1548	004332	006100 				ROL	R0		;STORE IT AWAY
   1549	004334	005304 				DEC	R4		;DECREMENT COUNTER
   1550	004336	003374 				BGT	15$		;LOOP IF MORE BITS NEEDED
   1551	004340	062700 	000060 			ADD	#'0,R0		;CONVERT TO ASCII
   1552	004344					TYPE	R0		;TYPE IT
   1553	004346	005303 				DEC	R3		;SEE IF MORE DIGITS TO DO
   1554	004350	003364 				BGT	10$		;LOOP IF SO
   1555	004352	112700 	000040 			MOVB	#' ,R0		;SET UP FOR TRAILING SPACE
   1556	004356	005726 				TST	(SP)+		;GET RID OF JUNK
   1557	004360				FT01:	TYPE	R0		;
   1558	004362					RETURN			;
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 21
UTILITIES - PRETTY PRINTERS

   1560					;TYPE CONTENTS OF WORD IN FORMAT	JSR PC,@TYFORM(R1)
   1561
   1562					;R0		WORD OR BYTE TO BE TYPED, RHJ
   1563					;R1	CODE-	ENTRY PT,	FORMAT,	CODE
   1564
   1565	004364	004276'			TYFORM:	+	CADB		;BYTE OCTAL - 0
   1566	004366	004260'				+	CADW		;WORD OCTAL - 2
   1567	004370	004410'				+	30$		;BYTE ANSII - 4
   1568	004372	004404'				+	20$		;WORD ANSII - 6
   1569	004374	004376'				+	10$		;RADIX 50  - 10
   1570
   1571	004376	004767 	000014 		10$:	JSR	PC,TYRADX	;R0 GETS THE RADIX 50 TREATMENT
   1572	004402	000403 				BR	35$		;APPEND A BLANK TO 3 CHAR'S
   1573
   1574	004404				20$:	TYPE	R0		;TYPE BYTE IN R0
   1575	004406	000300 				SWAB	R0		;SWAP EM AND TYPE IT
   1576	004410				30$:	TYPE	R0		;TYPE BYTE IN R0
   1577	004412				35$:	TYPE	40		;TYPE A SPACE
   1578	004414					RETURN			;
   1579
   1580					;TYPE CONTENTS OF R0 IN RADIX 50		JSR PC,TYRADX
   1581
   1582	004416	012705 	000003 		TYRADX:	MOV	#3,R5		;COUNT OF CHARACTERS
   1583	004422	012702 	004504'			MOV	#50$,R2		;POINTER TO COEFFICENT TABLE
   1584	004426	010001 				MOV	R0,R1		;COPY OF RADIX 50 WORD
   1585	004430	010100 			10$:	MOV	R1,R0		; GET DIVIDEND
   1586	004432	012201 				MOV	(R2)+,R1	; GET DIVISOR
   1587	004434	004767 	000000G			JSR	PC,$DIV		; DIVIDE, R0=QUOTIENT, R1 =REMAINDER
   1588	004440	005700 				TST	R0		; IS QUOTIENT ZERO? (SP)?
   1589	004442	001406 				BEQ	12$		;"SP" = 040
   1590	004444	120027 	000033 			CMPB	R0,#33		;RAD50-$ =33
   1591	004450	001407 				BEQ	16$		;"$" = 044
   1592	004452	003004 				BGT	14$		;"." OR "0-9" = 056 OR 060-071
   1593	004454	062700 	000040 			ADD	#40,R0		;RAD50-A = 1, "A" = 101
   1594	004460	062700 	000016 		12$:	ADD	#16,R0		;40+16+11+11 = 100 + (A-Z)
   1595	004464	062700 	000011 		14$:	ADD	#11,R0		;16+11+11 = 40 + (SP)
   1596	004470	062700 	000011 		16$:	ADD	#11,R0		;11+11 = 22 + (.,0-9)
   1597	004474					TYPE	R0		;TYPE CHARACTER IN R0
   1598	004476	005305 				DEC	R5		;COUNT THE CHARACTERS
   1599	004500	001353 				BNE	10$		; LOOP
   1600	004502	000207 				RTS	PC
   1601
   1602					;COEFFICENT TABLE, RADIX 50 CONVERT
   1603
   1604	004504	003100 	000050 	000001 	50$:	.WORD	+1600.,+40.,+1.	;40.^2, 40.^1, 40.^0
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 22
UTILITIES - PRETTY PRINTERS

   1606					;SELECT RELOCATION REGISTER			JSR PC,LOC
   1607
   1608					;CAD		ADDRESS TO USE IN SELECTION
   1609
   1610					;RETURNS--
   1611					;R0				REGISTER NUMBER FOUND, -1 IF NONE FOUND
   1612					;R1				DISTANCE, RELOCATION FACTOR
   1613
   1614					;SUBROUTINE TO LOCATE RELOCATION REGISTER NEAREST BUT STILL
   1615					;BELOW THE ADDRESS IN CAD.  RETURNS WITH THE REGISTER
   1616					;NUMBER IN R0, AND WITH THE DISTANCE BETWEEN THE REGISTER
   1617					;AND (CAD) IN R1
   1618					;IF NO GOOD RELOC. REG. FOUND, R0 WILL = -1
   1619
   1620	004512	016704 	173446 		LOC:	MOV	CAD,R4	;SET UP CAD DATA
   1621	004516	005000 			LOCA:	CLR	R0
   1622	004520	012746 	177777 			MOV	#-1,-(SP)	;INITIALIZE RELOC. REG. INDEX
   1623	004524	011601 				MOV	(SP),R1		;INITIALIZE DISTANCE TO A HIGH VALUE
   1624	004526	020027 	000016 		10$:	CMP	R0,#RLR		;ARE WE DONE COMPARING?
   1625	004532	101012 				BHI	20$		;BRANCH IF DONE
   1626	004534	026004 	000124'			CMP	RELT(R0),R4	;IS CURR. RELOC. BIAS > (R4)?
   1627	004540	101005 				BHI	15$		;IF SO, BRANCH -- DON'T SUBTRACT, GET NEXT
   1628	004542	010402 				MOV	R4,R2		;OTHERWISE TAKE THE DIFFERENCE
   1629	004544	166002 	000124'			SUB	RELT(R0),R2	;OF CURR. RELOC. REG. AND CAD
   1630	004550	020102 				CMP	R1,R2		;IS THE RESULT THE SMALLEST SO FAR?
   1631	004552	101004 				BHI	25$		;BRANCH IF YES (UNSIGNED CONDITIONAL)
   1632	004554	005720 			15$:	TST	(R0)+		;OTHERWISE, BUMP R0 FOR NEXT RELOC. REG.
   1633	004556	000763 				BR	10$		;LOOP BACK FOR NEXT COMPARISON
   1634	004560	012600 			20$:	MOV	(SP)+,R0	;PUT REG.# IN R0
   1635	004562	000207 				RTS	PC		;JOB OVER, RETURN
   1636	004564	010201 			25$:	MOV	R2,R1		;REMEMBER SMALLEST DIFFERENCE IN XXY
   1637	004566	006200 				ASR	R0		;AND ASSOCIATED REGISTER NUMBER
   1638	004570	010016 				MOV	R0,(SP)		; IN (SP)
   1639	004572	006300 				ASL	R0		;RESTORE R0 TO ORIGINAL VALUE
   1640	004574	000767 				BR	15$		;GO FO NEXT COMPARISON.
   1641
   1642		000462'				.END	$XDT
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 22-1
SYMBOL TABLE

ADR1    000036R  	FE.CEX= 020000   	LOCA    004516R  	PR5   = 000240   	TESTM   003066R
ALOP    002246R  	FE.DRV= 000010   	LOOKUP  003562R  	PR6   = 000300   	TKB   = 177562
ALTTAB  000320R  	FE.EXP= 000200   	LOW     000024R  	PR7   = 000340   	TKS   = 177560
ANBYTE  001464R  	FE.EXT= 000001   	LPB   = 177516   	PS    = 177776   	TPB   = 177566
ANWORD  001456R  	FE.EXV= 000004   	LPS   = 177514   	PUTCAD  003634R  	TPS   = 177564
ARG     000022R  	FE.LSI= 000400   	L$$ASG= 000000   	P$$RTY= 000000   	TRPI    002560R
A$$CHK= 000000   	FE.MUP= 000002   	L$$DRV= 000000   	P$$TPT= 000000   	TRTC    000216R
A$$CPS= 000000   	FE.MXT= 040000   	MINS    001414R  	QUAN    000032R  	TYFORM  004364R
A$$TRP= 000000   	FE.NLG= 100000   	MODULO  001456R  	RALL    000746R  	TYPE    003776R
BKP   = 000016   	FE.PKT= 000100   	MPAR  = 172100   	REGT    000570R  	TYRADX  004416R
BPT   = 000003   	FE.PLA= 000020   	MPCSR = 177746   	RELO    001010R  	UBMPR = 170200
BPTI    002144R  	FM      000213R  	M$$CRB= 000124   	RELT    000124R  	UDSAR0= 177660
BW      000170R  	FORM    000034R  	M$$MGE= 000000   	REMB    000732R  	UDSDR0= 177620
CAD     000164R  	FT01    004360R  	M$$NET= 000000   	RE02    000736R  	UIN     000102R
CADB    004276R  	GET     003674R  	M$$NT2= 000000   	RLR   = 000016   	UISAR0= 177640
CADW    004260R  	GETCAD  003610R  	NEMT    002230R  	RORA    004114R  	UISAR4= 177650
CA01    004320R  	GETC99  003632R  	NEWC    001272R  	RTN     002770R  	UISAR5= 177652
CHRCEE  001214R  	GETNUM  003516R  	NEWE    001302R  	RTST    003326R  	UISAR6= 177654
CHRDOT  001222R  	GOTO    002564R  	NEWN    001312R  	RUAL    001074R  	UISAR7= 177656
CHRQUE  001206R  	GRTT    002652R  	NIXMAP  000260R  	RUCL    001054R  	UISDR0= 177600
CHR001  001226R  	G$$TPP= 000000   	NIXP    002220R  	R$$DER= 000000   	UISDR4= 177610
CLATSG  001736R  	G$$TTK= 000000   	NIXREG  000270R  	R$$EXV= 000000   	UISDR5= 177612
CLBACK  001720R  	HI      000026R  	N$$LDV= 000001   	R$$SND= 000000   	UISDR6= 177614
CLCRET  001560R  	H$$RTZ= 000074   	OBW     000214R  	R$$11M= 000000   	UISDR7= 177616
CLGL    001316R  	ILLI    002204R  	OCBYTE  001464R  	R$$11S= 000000   	UPC     000016R
CLGRTH  001746R  	INTBEG= 000000R  	OCWORD  001456R  	S       000212R  	UR0     000000R
CLLNFD  001572R  	INTEND= 000142R  	ODDA    002112R  	SEBK    000670R  	USP     000014R
CLLSTH  001566R  	INTINX= 000036R  	OFST    002010R  	SEMI    001360R  	UST     000020R
CLUPAR  001704R  	INTR    002254R  	OF09    002050R  	SEM1    001400R  	V$$CTR= 001200
CL01    001336R  	INXREG  000300R  	OP      000176R  	SEQ     000215R  	V$$RSN= 000031
CMODE = 140000   	INXTBL  000306R  	OPE001  001464R  	SETBRK  000760R  	XDTSTK  000570R
CNST    000030R  	IOTX    002166R  	OPE004  001470R  	SETCN   001342R  	X$$DBT= 000000
COMDIS  000364R  	I$$RDN= 000000   	OPN     000172R  	SGMT    002066R  	$CRASH= ****** GX
COMM    001436R  	KDSAR0= 172360   	OP2     001626R  	SISDR0= 172200   	$DIV  = ****** GX
COMTAB  000324R  	KDSDR0= 172320   	OP2A    001634R  	SMFD    000177R  	$DQLM1= ****** GX
CO00    001432R  	KILO    001110R  	OP5     001620R  	SNAGIT  003340R  	$DQLM2= ****** GX
CT      000060R  	KISAR0= 172340   	OUTB    000202R  	SNGL    002772R  	$DRLM1= ****** GX
C$$ORE= 002000   	KISAR5= 172352   	OUTS    000204R  	SPRINT  003372R  	$DRLM2= ****** GX
C990    003032R  	KISAR6= 172354   	P       000211R  	SR0   = 177572   	$EMTRP= ****** GX
DCD     001244R  	KISAR7= 172356   	PCS     001730R  	SR3   = 172516   	$ILINS= ****** GX
DOT     000166R  	KISDR0= 172300   	PIRQ  = 177772   	SSTADR  000240R  	$INITL= ****** GX
DPRINT  003420R  	KISDR6= 172314   	PLUS    001406R  	SSTVEC  000144R  	$IOTRP= ****** GX
D.ARGS  000174R  	KISDR7= 172316   	PMODE = 030000   	SSTXDT  000220R  	$NONSI= ****** GX
EQUALS  002060R  	K$$CNT= 177546   	PPC     000206R  	STAR    001424R  	$SGFLT= ****** GX
ERR     001236R  	K$$CSR= 177546   	PROC    003004R  	SWR   = 177570   	$STKDP= ****** GX
ERR0    000744R  	K$$IEN= 000115   	PR0   = 000000   	S$$YSZ= 001740   	$SYSID= ****** GX
ERR1    002064R  	K$$LDC= 000001   	PR01    003016R  	T       000210R  	$TRACE= ****** GX
EXIT    003276R  	K$$TPS= 000074   	PR02    003064R  	TBIT    002600R  	$TRP04= ****** GX
EXP     000200R  	LIST    003146R  	PR1   = 000040   	TBT   = 000020   	$TRTRP= ****** GX
EXPCOM  003440R  	LOC     004512R  	PR4   = 000200   	TCLS    001766R  	$XDT    000462RG
FE.CAL= 000040

. ABS.	000000	   000
      	004576	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3217 WORDS  ( 13 PAGES)
DYNAMIC MEMORY:  4036 WORDS  ( 15 PAGES)
EXDBT	MACRO M1110  22-AUG-79 07:14  PAGE 22-2
SYMBOL TABLE

ELAPSED TIME:  00:01:09
[11,24]EXDBT,SY0:[11,34]EXDBT/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,EXDBT