Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/comp/dbdt.mac
There is 1 other file named dbdt.mac in the archive. Click here to see a list.
	SUBTTL	DUMP ROUTINES FOR DEBUGGARS
	SEARCH	SIMMAC,SIMMC2,SIMMCR
	CTITLE	DBDT
	IFE QDEBUG,<END>
	TWOSEG
	RELOC	400K
	SALL
	MACINIT
	EXTERN	YSTEPP,YDCSTB,YDCSTP,YOPSTB,YOPSTP,YEXPL,YEXPP,YDBRTC,YDBRTC,YCANTRY
	EXTERN	YBKST,YBKSTP,YDICT,YMAXID,YRDSTB,YRDSTP,YQRELT,YRELCD,YDBRTA
	EXTERN	O2DB4
DEFINE	DRD(R,F)
<	PROC
.'R::	SAVE	<X0,X1,X2,X3,X4,X5>
	OUTSTR	[ASCIZ/=====R AT /]
	LI	X3,22
	MOVE	X4,X1
	EXEC	L2
	OUTSTR	[ASCIZ/=====
/]
	IRP F	<	QSZ=0
			SIZE	(QSZ,F)
			IFE	<QSZ-1>,<IFON	F(X1)
					GOTO	[OUTSTR	[ASCIZ/F/]
						OUTCHR	["="]
						 LI	X4,"1"
						 OUTCHR	X4
						OUTSTR	[ASCIZ/
/]
						GOTO	.+1]
>
			IFN	<QSZ-1>,<LI	X3,QSZ
					 LF	(X4) F(X1)
					JUMPN	X4,[OUTSTR	[ASCIZ/F/]
						OUTCHR	["="]
						GOTO	.+1]
					JUMPE	X4,.+3
					 EXEC	L2
					OUTSTR	[ASCIZ/
/]
					>
>
	OUTSTR	[ASCIZ/
/]
	RETURN
DEFINE	R	<EXEC .'R>
L2():	SETZ	X2,0
	DIVI	X2,3
	SKIPE	X3
	AOJ	X2,0
	MOVN	X3,X2
	IMULI	X3,3
	ROT	X4,(X3)
L3():	SETZ	X5,0
	ROTC	X4,3
	ADDI	X5,"0"
	OUTCHR	X5
	DECR	X2,L3
	POPJ	XPDP,0
	EPROC
>
	DEFINE	ONEOF(A)=<
	HRRZ	X1,XP1
	IRP	A,<
		WHEN	XP1,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N	XP1,ZHB
		GOTO	[STEP	XP1,ZHB
			GOTO	EXT]
		WHEN	XP1,ZQU
		GOTO	[STEP	XP1,ZQU
			GOTO	EXT]
		WHEN	XP1,ZMP
		GOTO	[STEP	XP1,ZMP
			GOTO EXT]
	EXT:
	OD
	RETURN
	EPROC

ZNODUMP::	PROC
	SAVE	<X0,X1>
	ONEOF	<ZID,ZLI,ZOS,ZNS,ZNN,ZCN>
	RETURN
	EPROC

ZDEDUMP::	PROC
	SAVE	<X0,X1>
	ONEOF	<ZQU,ZHE,ZHB,ZMP>
	RETURN
	EPROC
	SUBTTL	DBMN
COMMENT;

PURPOSE:	OBTAIN A MNEMONIC OPCODE FROM ITS NUMBER

INPUT:		NUMERIC CODE RIGHT ADJUSTED IN X0

OUTPUT:	SIXBIT MNEMONIC OR ****** IN XO

ENTRY:		DBMN

;
DBMN::	PROC
	SAVE<X1>
OPHSH=1
IIISW=0
STANSW=0
	DEFINE	XX(A,B)=<>
	DEFINE	XK(A,B)=<
		X(A,B)
		>
	DEFINE	X(A,B)=<
	CAIN	B
	GOTO	[L	X1,[SIXBIT/A/]
		GOTO	DBMN.E]
	>
	L	X1,[SIXBIT/******/]
;	THE FOLLOWING SEQUENCE HAS BEEN COPIED FROM MACRO.MAC
;	IN THE DEC SYSTEM PROGRAM LIBRARY
IFN OPHSH,<		;PUT THE MOST USED OP CODES FIRST
X	GOTO  ,	254
X	PUSHJ , 260
X	POPJ  , 263
X	PUSH  , 261
X	POP   , 262
X	AOS   ,	350
X	ASCIZ ,	701
X	CALLI ,	047
X	EXTERN,	724
X	INTERN,	744
X	JFCL  ,	255
X	JSP   ,	265
X	L  ,	200
X	LI ,	201
X	ST ,	202
X	SETZM ,	402
X	SIXBIT,	717
X	SOS   ,	370
X	TLNE  ,	603
X	TLNN  ,	607
X	TLO   ,	661
X	TLZ   ,	621
X	TLZA  ,	625
X	TLZE  ,	623
X	TLZN  ,	627
X	TRNE  ,	602
X	TRNN  ,	606
X	TRZ   ,	620
>
X	ADD   ,	270
X	ADDB  ,	273
X	ADDI  ,	271
X	ADDM  ,	272

X	AND   ,	404
X	ANDB  ,	407
X	ANDCA ,	410
X	ANDCAB,	413
X	ANDCAI,	411
X	ANDCAM,	412
X	ANDCB ,	440
X	ANDCBB,	443
X	ANDCBI,	441
X	ANDCBM,	442
X	ANDCM ,	420
X	ANDCMB,	423
X	ANDCMI,	421
X	ANDCMM,	422
X	ANDI  ,	405
X	ANDM  ,	406

X	AOBJN ,	253
X	AOBJP ,	252

X	AOJ   ,	340
X	AOJA  ,	344
X	AOJE  ,	342
X	AOJG  ,	347
X	AOJGE ,	345
X	AOJL  ,	341
X	AOJLE ,	343
X	AOJN  ,	346

XX	AOS   ,	350
X	AOSA  ,	354
X	AOSE  ,	352
X	AOSG  ,	357
X	AOSGE ,	355
X	AOSL  ,	351
X	AOSLE ,	353
X	AOSN  ,	356
X	ARG   , 320
X	ARRAY , 771
IFN IIISW,<X	ASCID , 773>

X	ASH   ,	240
X	ASHC  ,	244


X	BLT   ,	251


XX	CAI   ,	300
X	CAIA  ,	304
X	CAIE  ,	302
X	CAIG  ,	307
X	CAIGE ,	305
X	CAIL  ,	301
X	CAILE ,	303
X	CAIN  ,	306

X	CALL  ,	040
XX	CALLI ,	047

XX	CAM   ,	310
X	CAMA  ,	314
X	CAME  ,	312
X	CAMG  ,	317
X	CAMGE ,	315
X	CAML  ,	311
X	CAMLE ,	313
X	CAMN  ,	316

XX	CLEAR ,	400
XX	CLEARB,	403
XX	CLEARI,	401
XX	CLEARM,	402

X	CLOSE ,	070
X	COMMEN, 770


IFN STANSW,<X	CONS,257>

XX	DATA. ,	020


XK	DFAD  , 110
XK	DFDV  , 113
XK	DFMP  , 112
X	DFN   ,	131
XK	DFSB  , 111

X	DIV   ,	234
X	DIVB  ,	237
X	DIVI  ,	235
X	DIVM  ,	236

XK	DMOVE , 120
XK	DMOVEM, 124
XK	DMOVN , 121
XK	DMOVNM, 125

X	DPB   ,	137


X	ENTER ,	077


X	EQV   ,	444
X	EQVB  ,	447
X	EQVI  ,	445
X	EQVM  ,	446

X	EXCH  ,	250


X	FAD   ,	140
X	FADB  ,	143
X	FADL  ,	141
X	FADM  ,	142

X	FADR  ,	144
X	FADRB ,	147
X	FADRI ,	145
X	FADRM ,	146

X	FDV   ,	170
X	FDVB  ,	173
X	FDVL  ,	171
X	FDVM  ,	172

X	FDVR  ,	174
X	FDVRB ,	177
X	FDVRI ,	175
X	FDVRM ,	176

XX	FIN.  ,	021

IFN STANSW,<X	FIX   , 130>
IFE STANSW,<XK	FIX   , 122>
XK	FIXR  , 126
XK	FLTR  , 127

X	FMP   ,	160
X	FMPB  ,	163
X	FMPL  ,	161
X	FMPM  ,	162

X	FMPR  ,	164
X	FMPRB ,	167
X	FMPRI ,	165
X	FMPRM ,	166

X	FSB   ,	150
X	FSBB  ,	153
X	FSBL  ,	151
X	FSBM  ,	152

X	FSBR  ,	154
X	FSBRB ,	157
X	FSBRI ,	155
X	FSBRM ,	156

X	FSC   ,	132

X	GETSTS,	062


X	HLL   ,	500
X	HLLE  ,	530
X	HLLEI ,	531
X	HLLEM ,	532
X	HLLES ,	533
X	HLLI  ,	501
X	HLLM  ,	502
X	HLLO  ,	520
X	HLLOI ,	521
X	HLLOM ,	522
X	HLLOS ,	523
X	HLLS  ,	503
X	HLLZ  ,	510
X	HLLZI ,	511
X	HLLZM ,	512
X	HLLZS ,	513

X	HLR   ,	544
X	HLRE  ,	574
X	HLREI ,	575
X	HLREM ,	576
X	HLRES ,	577
X	HLRI  ,	545
X	HLRM  ,	546
X	HLRO  ,	564
X	HLROI ,	565
X	HLROM ,	566
X	HLROS ,	567
X	HLRS  ,	547
X	HLRZ  ,	554
X	HLRZI ,	555
X	HLRZM ,	556
X	HLRZS ,	557

X	HRL   ,	504
X	HRLE  ,	534
X	HRLEI ,	535
X	HRLEM ,	536
X	HRLES ,	537
X	HRLI  ,	505
X	HRLM  ,	506
X	HRLO  ,	524
X	HRLOI ,	525
X	HRLOM ,	526
X	HRLOS ,	527
X	HRLS  ,	507
X	HRLZ  ,	514
X	HRLZI ,	515
X	HRLZM ,	516
X	HRLZS ,	517

X	HRR   ,	540
X	HRRE  ,	570
X	HRREI ,	571
X	HRREM ,	572
X	HRRES ,	573
X	HRRI  ,	541
X	HRRM  ,	542
X	HRRO  ,	560
X	HRROI ,	561
X	HRROM ,	562
X	HRROS ,	563
X	HRRS  ,	543
X	HRRZ  ,	550
X	HRRZI ,	551
X	HRRZM ,	552
X	HRRZS ,	553

X	IBP   ,	133

X	IDIV  ,	230
X	IDIVB ,	233
X	IDIVI ,	231
X	IDIVM ,	232

X	IDPB  ,	136


X	ILDB  ,	134

X	IMUL  ,	220
X	IMULB ,	223
X	IMULI ,	221
X	IMULM ,	222

X	IN    ,	056
XX	IN.   ,	016
X	INBUF ,	064
XX	INF.  ,	026
X	INIT  ,	041
X	INPUT ,	066


X	IOR   ,	434
X	IORB  ,	437
X	IORI  ,	435
X	IORM  ,	436



XX	JFCL  ,	255

X	JFFO  , 243

X	JRA   ,	267
XX	JRST  ,	254


X	JSA   ,	266
XX	JSP   ,	265
X	JSR   ,	264

XX	JUMP  ,	320
XX	JUMPA ,	324
X	JUMPE ,	322
X	JUMPG ,	327
X	JUMPGE,	325
X	JUMPL ,	321
X	JUMPLE,	323
X	JUMPN ,	326


X	LDB   ,	135


X	LOOKUP,	076

X	LSH   ,	242
X	LSHC  ,	246
XK	MAP   , 257
X	MLOFF , 767
X	MLON  , 766
XX	MOVE  ,	200
XX	MOVEI ,	201
XX	MOVEM ,	202
X	MOVES ,	203
X	MOVM  ,	214
X	MOVMI ,	215
X	MOVMM ,	216
X	MOVMS ,	217
X	MOVN  ,	210
X	MOVNI ,	211
X	MOVNM ,	212
X	MOVNS ,	213
X	MOVS  ,	204
X	MOVSI ,	205
X	MOVSM ,	206
X	MOVSS ,	207


X	MTAPE ,	072
XX	MTOP. , 024

X	MUL   ,	224
X	MULB  ,	227
X	MULI  ,	225
X	MULM  ,	226
XX	NLI.  , 031
XX	NLO.  , 032



X	OPEN  ,	050

X	OR    ,	434
X	ORB   ,	437
X	ORCA  ,	454
X	ORCAB ,	457
X	ORCAI ,	455
X	ORCAM ,	456
X	ORCB  ,	470
X	ORCBB ,	473

X	ORCBI ,	471
X	ORCBM ,	472
X	ORCM  ,	464
X	ORCMB ,	467
X	ORCMI ,	465
X	ORCMM ,	466
X	ORI   ,	435
X	ORM   ,	436

X	OUT   ,	057
XX	OUT.  ,	017
X	OUTBUF,	065
XX	OUTF. ,	027
X	OUTPUT,	067


XX	POP   ,	262
XX	POPJ  ,	263

X	PRGEND, 714

XX	PUSH  ,	261
XX	PUSHJ ,	260


X	RELEAS,	071


X	RENAME,	055


XX	RESET.,	015
X	RIM10B, 736

X	ROT   ,	241
X	ROTC  ,	245
X	RTSER., 001

XX	RTB.  ,	022
X	SALL  , 720
X	SEARCH, 721

X	SETA  ,	424
X	SETAB ,	427
X	SETAI ,	425
X	SETAM ,	426
X	SETCA ,	450
X	SETCAB,	453
X	SETCAI,	451
X	SETCAM,	452
X	SETCM ,	460
X	SETCMB,	463
X	SETCMI,	461
X	SETCMM,	462
X	SETM  ,	414
X	SETMB ,	417
X	SETMI ,	415
X	SETMM ,	416
X	SETO  ,	474
X	SETOB ,	477
X	SETOI ,	475
X	SETOM ,	476
X	SETSTS,	060
X	SETZ  ,	400
X	SETZB ,	403
X	SETZI ,	401
XX	SETZM ,	402


XX	SKIP  ,	330
X	SKIPA ,	334
X	SKIPE ,	332
X	SKIPG ,	337
X	SKIPGE,	335
X	SKIPL ,	331
X	SKIPLE,	333
X	SKIPN ,	336

XX	SLIST.,	025

X	SOJ   ,	360
X	SOJA  ,	364
X	SOJE  ,	362
X	SOJG  ,	367
X	SOJGE ,	365
X	SOJL  ,	361
X	SOJLE ,	363
X	SOJN  ,	366

XX	SOS   ,	370
X	SOSA  ,	374
X	SOSE  ,	372
X	SOSG  ,	377
X	SOSGE ,	375
X	SOSL  ,	371
X	SOSLE ,	373
X	SOSN  ,	376

IFN STANSW,<X SPCWAR,43>

X	STATO ,	061
X	STATUS,	062
X	STATZ ,	063


X	SUB   ,	274
X	SUBB  ,	277
X	SUBI  ,	275
X	SUBM  ,	276


X	TDC   ,	650
X	TDCA  ,	654
X	TDCE  ,	652
X	TDCN  ,	656
X	TDN   ,	610
X	TDNA  ,	614
X	TDNE  ,	612
X	TDNN  ,	616
X	TDO   ,	670
X	TDOA  ,	674
X	TDOE  ,	672
X	TDON  ,	676
X	TDZ   ,	630
X	TDZA  ,	634
X	TDZE  ,	632
X	TDZN  ,	636


X	TLC   ,	641
X	TLCA  ,	645
X	TLCE  ,	643
X	TLCN  ,	647
X	TLN   ,	601
X	TLNA  ,	605
XX	TLNE  ,	603
XX	TLNN  ,	607
XX	TLO   ,	661
X	TLOA  ,	665
X	TLOE  ,	663
X	TLON  ,	667
XX	TLZ   ,	621
XX	TLZA  ,	625
XX	TLZE  ,	623
XX	TLZN  ,	627

X	TRC   ,	640
X	TRCA  ,	644
X	TRCE  ,	642
X	TRCN  ,	646
X	TRN   ,	600
X	TRNA  ,	604
XX	TRNE  ,	602
XX	TRNN  ,	606
X	TRO   ,	660
X	TROA  ,	664
X	TROE  ,	662
X	TRON  ,	666
XX	TRZ   ,	620
X	TRZA  ,	624
X	TRZE  ,	622
X	TRZN  ,	626

X	TSC   ,	651
X	TSCA  ,	655
X	TSCE  ,	653
X	TSCN  ,	657
X	TSN   ,	611
X	TSNA  ,	615
X	TSNE  ,	613

X	TSNN  ,	617
X	TSO   ,	671
X	TSOA  ,	675
X	TSOE  ,	673
X	TSON  ,	677
X	TSZ   ,	631
X	TSZA  ,	635
X	TSZE  ,	633
X	TSZN  ,	637
X	TTCALL, 051
X	TWOSEG, 731
X	UFA   ,	130
X	UGETF ,	073
X	UJEN  , 100
X	UNIVER, 737
X	USETI ,	074
X	USETO ,	075


XX	WTB.  ,	023


X	XCT   ,	256


X	XOR   ,	430
X	XORB  ,	433
X	XORI  ,	431
X	XORM  ,	432

X	XPUNGE, 730

X	Z     ,	000

X	.CREF , 740
X	.HWFRM, 742
X	.MFRMT, 743
X	.XCREF, 741


IFN OPHSH,<		;NO-OPS, OLD MNEMONICS,F4 UUOS
X	CAI   ,	300
X	CAM   ,	310
X	CLEAR ,	400
X	CLEARB,	403
X	CLEARI,	401
X	CLEARM,	402
X	JUMP  ,	320
X	JUMPA ,	324
X	SKIP  ,	330
>
DBMN.E:	L	X0,X1
	RETURN
	EPROC
COMMENT;
	ROUTINES FOR REMAPPING OF RUN TIME TRACE TABLE
	DBRTMU	IS CALLED AT ENTRY TO GENABS,GENFIX,GENLD,GENOP AND GENREL
		AND SAVES THE ADDRESS FROM WHERE IT WAS CALLED
	DBRTMA	IS CALLED AT START OF GENREL AND OUTPUTS DEBUG WORDS IF
		SO2D2 IS ON
;
DBRTMA::	PROC
	SAVE	<X0,X1>	; SAVE EXACTLY TWO REGISTERS
	L	X1,YQRELT
	PUSHJ	XPDP,DBTAB(X1)
	IF	IFOFF	SO2D2
		GOTO	FALSE
		L	YQRELT
		CAIN	QRELCD
		SKIPN	YCANTRY
		GOTO	FALSE
	THEN
		MOVSI	611000
		LI	'TRC'
		L	X1,YRELCD
		SUB	X1,YCANTRY
		HRL	X1,YDBRTA
		EXEC	O2DB4,<X0,X1>
		SETZM	YDBRTA
		SETOM	YDBRTC
	FI
	RETURN
DBTAB:	REPEAT	10,<POPJ	XPDP,0
	>
	EPROC


DBRTMU::	PROC
	SAVE	<X0,X1>	;SAVE EXACTLY TWO REGISTERS
	IF	AOSE	X1,YDBRTC
		GOTO	FALSE
	THEN	HRRZ	X1,-2(XPDP)
		ST	YDBRTA
	FI
	RETURN
	EPROC
	END