Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/kmcdmp.list
There are no other files named kmcdmp.list in the archive.
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31
KMCMAC.MAC    09-MAY-79 07:32		TABLE OF CONTENTS

    34		MICROPROCESSOR REGISTER DEFINITIONS
   182		MICRO-INSTRUCTION FIELD DEFINITIONS
   224		MICRO INSTRUCTION DEFINITIONS
   225			BRANCH INSTRUCTIONS
   263			INDEXED BRANCH INSTRUCTIONS
   364			MOVE INSTRUCTIONS
   766		DECLARATIONS
   832		DUMP - Dump the KMC
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 1
KMCMAC.MAC    09-MAY-79 07:32

     1						.TITLE	KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE
     2						.IDENT	/V2.0/
     3					;
     4					; COPYRIGHT (C) 1978
     5					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
     6					;
     7					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A
     8					; SINGLE COMPUTER SYSTEM AND MAY  BE  COPIED   ONLY  WITH  THE
     9					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE,  OR
    10					; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED  OR  OTHERWISE
    11					; MADE AVAILABLE TO ANY OTHER PERSON   EXCEPT FOR  USE ON SUCH
    12					; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE  TERMS.  TITLE
    13					; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL  TIMES  REMAIN
    14					; IN DEC.
    15					;
    16					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
    17					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
    18					; EQUIPMENT CORPORATION.
    19					;
    20					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF
    21					; ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
    22					;         
    23					; DATE: 14-FEB-78
    24					;
    25					; VERSION: 2	KMC11-B
    26					;
    27					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
    28					;
    29					; LAST MODIFICATION:
    30					; 8-MAR-78	FIX TYPO'S AND 4K CALL
    31					 
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 2
KMCMAC.MAC    09-MAY-79 07:32

    33
    34						.SBTTL	MICROPROCESSOR REGISTER DEFINITIONS
    35
    36					;
    37					; INBUS* ASSIGNMENTS
    38					;
    39		120000				INCON=	0!120000	;IN CONTROL CSR
    40		120020				MAIN=	20!120000	;MAINTAINANCE REGISTER
    41		120040				OCON=	40!120000	;OUT CONTROL CSR
    42		120060				LINENM=	60!120000	;LINE NUMBER
    43		120100				PORT1=	100!120000	;CSR 4
    44		120120				PORT2=	120!120000	;CSR 5
    45		120140				PORT3=	140!120000	;CSR 6
    46		120160				PORT4=	160!120000	;CSR 7
    47		120200				NPR=	200!120000	;NPR CONTROL REGISTER
    48		120220				UBBR=	220!120000	;MISC CONTROL REGISTER
    49		120240				PCLOW=	240!120000	;PC LATCH REGISTER LOW BYTE
    50		120260				PCHGH=	260!120000	;PC LATCH REGISTER HIGH 4 BITS
    51		120300				MARL=	300!120000	;MAR LATCH REGISTER LOW BYTE
    52		120320				MARH=	320!120000	;MAR LATCH REGISTER HIGH 5 BITS
    53
    54		120000				BSEL0=	0!120000	;BSEL0
    55		120020				BSEL1=	20!120000	;BSEL1
    56		120040				BSEL2=	40!120000	;BSEL2
    57		120060				BSEL3=	60!120000	;BSEL3
    58		120100				BSEL4=	100!120000	;BSEL4
    59		120120				BSEL5=	120!120000	;BSEL5
    60		120140				BSEL6=	140!120000	;BSEL6
    61		120160				BSEL7=	160!120000	;BSEL7
    62
    63					; INBUS ASSIGNMENTS
    64
    65		020000				INDAT1=	0!20000		;INPUT DATA LOW BYTE
    66		020020				INDAT2=	20!20000	;INPUT DATA HIGH BYTE
    67		020040				IODAT1=	40!20000	;OUTPUT DATA LOW BYTE
    68		020060				IODAT2=	60!20000	;OUTPUT DATA HIGH BYTE
    69		020100				IIBA1=	100!20000	;INPUT BA LOW BYTE
    70		020120				IIBA2=	120!20000	;INPUT BA HIGH BYTE
    71		020140				IOBA1=	140!20000	;OUTPUT BA LOW BYTE
    72		020160				IOBA2=	160!20000	;OUTPUT BA HIGH BYTE
    73		020200				XREG0=	200!20000	;EXTERNAL DEVICE REGISTER 0
    74		020220				XREG1=	220!20000	;EXTERNAL DEVICE REGISTER 1
    75		020240				XREG2=	240!20000	;EXTERNAL DEVICE REGISTER 2
    76		020260				XREG3=	260!20000	;EXTERNAL DEVICE REGISTER 3
    77		020300				XREG4=	300!20000	;EXTERNAL DEVICE REGISTER 4
    78		020320				XREG5=	320!20000	;EXTERNAL DEVICE REGISTER 5
    79		020340				XREG6=	340!20000	;EXTERNAL DEVICE REGISTER 6
    80		020360				XREG7=	360!20000	;EXTERNAL DEVICE REGISTER 7
    81
    82					; OUTBUS* ASSIGNMENTS
    83
    84		001000				OINCON=	0!1000		;IN CONTROL CSR
    85		001001				OMAIN=	1!1000		;MAINTAINTANCE REGISTER
    86		001002				OOCON=	2!1000		;OUT CONTROL CSR
    87		001003				OLINEN=	3!1000		;LINE NUMBER
    88		001004				OPORT1=	4!1000		;CSR 4
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 2-1
KMCMAC.MAC    09-MAY-79 07:32		MICROPROCESSOR REGISTER DEFINITIONS

    89		001005				OPORT2=	5!1000		;CSR 5
    90		001006				OPORT3=	6!1000		;CSR 6
    91		001007				OPORT4=	7!1000		;CSR 7
    92		001010				ONPR=	10!1000		;NPR CONTROL
    93		001011				OBR=	11!1000		;MISC CONTROL
    94		001012				OPCLOW=	12!1000		;PC LATCH LOW BYTE
    95		001013				OPCHGH=	13!1000		;PC LATCH HIGH
    96		001014				OMARL=	14!1000		;MAR LATCH LOW
    97		001015				OMARH=	15!1000		;MAR LATCH HIGH
    98
    99		001000				OBSEL0=	0!1000		;BSEL0
   100		001001				OBSEL1=	1!1000		;BSEL1
   101		001002				OBSEL2=	2!1000		;BSEL2
   102		001003				OBSEL3=	3!1000		;BSEL3
   103		001004				OBSEL4=	4!1000		;BSEL4
   104		001005				OBSEL5=	5!1000		;BSEL5
   105		001006				OBSEL6=	6!1000		;BSEL6
   106		001007				OBSEL7=	7!1000		;BSEL7
   107
   108					; OUTBUS ASSIGNMENTS
   109
   110		002000				OIDAT1=	0!2000		;INPUT DATA LOW BYTE
   111		002001				OIDAT2=	1!2000		;INPUT DATA HIGH BYTE
   112		002002				OUTDA1=	2!2000		;OUTPUT DATA LOW BYTE
   113		002003				OUTDA2=	3!2000		;OUTPUT DATA HIGH BYTE
   114		002004				IBA1=	4!2000		;INPUT BA LOW BYTE
   115		002005				IBA2=	5!2000		;INPUT BA HIGH BYTE
   116		002006				OBA1=	6!2000		;OUTPUT BA LOW BYTE
   117		002007				OBA2=	7!2000		;OUTPUT BA HIGH BYTE
   118		002010				OXREG0=	10!2000		;EXTERNAL DEVICE REGISTER 0
   119		002011				OXREG1=	11!2000		;EXTERNAL DEVICE REGISTER 1
   120		002012				OXREG2=	12!2000		;EXTERNAL DEVICE REGISTER 2
   121		002013				OXREG3=	13!2000		;EXTERNAL DEVICE REGISTER 3
   122		002014				OXREG4=	14!2000		;EXTERNAL DEVICE REGISTER 4
   123		002015				OXREG5=	15!2000		;EXTERNAL DEVICE REGISTER 5
   124		002016				OXREG6=	16!2000		;EXTERNAL DEVICE REGISTER 6
   125		002017				OXREG7=	17!2000		;EXTERNAL DEVICE REGISTER 7
   126
   127					; ALU FUNCTIONS
   128
   129		000000				ADD=	0		;ADD A+B
   130		000020				ADDC=	20		;ADD WITH CARRY -> A+B+C
   131		000040				SUBC=	40		;SUBTRACT WITH CARRY -> A-B-C
   132		060060				INCA=	60!BR		;INCREMENT A -> A+1 (DEFAULT SOURCE IS BRG)
   133		060100				APLUSC=	100!BR		;A PLUS CARRY -> A+C
   134		060120				TWOA=	120!BR		;A PLUS A -> A+A
   135		060140				TWOAC=	140!BR		;2*A PLUS CARRY -> A+A+C
   136		060160				DECA=	160!BR		;DECREMENT A -> A-1
   137		060200				SELA=	200!BR		;SELECT A
   138		000220				SELB=	220		;SELECT B
   139		000240				AORNB=	240		;A OR NOT B -> A!-B
   140		000260				AANDB=	260		;A AND B -> A&B
   141		000300				AORB=	300		;A OR B -> A!B
   142		000320				AXORB=	320		;A XOR B
   143		000340				SUB=	340		;SUBTRACT -> A-B
   144		000360				SUBOC=	360		;SUBTRACT ONE'S COMPLEMENT -> A-B-1
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 2-2
KMCMAC.MAC    09-MAY-79 07:32		MICROPROCESSOR REGISTER DEFINITIONS

   145
   146					; SCRATCH PAD DEFINITIONS
   147
   148		000000			SP0=0
   149		000001			SP1=1
   150		000002			SP2=2
   151		000003			SP3=3
   152		000004			SP4=4
   153		000005			SP5=5
   154		000006			SP6=6
   155		000007			SP7=7
   156		000010			SP10=10
   157		000011			SP11=11
   158		000012			SP12=12
   159		000013			SP13=13
   160		000014			SP14=14
   161		000015			SP15=15
   162		000016			SP16=16
   163		000017			SP17=17
   164
   165					; INSTRUCTION PAGE DEFINITIONS
   166					  
   167		000000			P0=0*4000	;PAGE 0
   168		004000			P1=1*4000	;PAGE 1
   169		010000			P2=2*4000	;PAGE 2
   170		014000			P3=3*4000	;PAGE 3
   171					 
   172					; NPR BIT DEFINITIONS
   173					 
   174		000001			DATI=1		;WORD INPUT NPR
   175		000003			DATIH=3		;WORD INPUT NPR WITH BUS HOLD
   176		000021			DATO=21		;WORD OUTPUT NPR
   177		000023			DATOH=23	;WORD OUTPUT NPR WITH BUS HOLD
   178		000221			DATOB=221	;BYTE OUTPUT NPR
   179		000223			DATOBH=223	;BYTE OUTPUT NPR WITH BUS HOLD
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 3
KMCMAC.MAC    09-MAY-79 07:32		MICROPROCESSOR REGISTER DEFINITIONS

   181
   182						.SBTTL	MICRO-INSTRUCTION FIELD DEFINITIONS
   183					 
   184					;	SOURCE FIELDS
   185
   186		000000			IMM=0		;IMMEDIATE
   187		020000			IBUS=20000	;INPUT BUS
   188		040000			MEMX=40000	;MEMORY
   189		060000			BR=60000	;BRG
   190
   191
   192					;	DESTINATION FIELDS
   193					 
   194		000400			WRTEBR=400	;WRITE THE BRG
   195		001000			WROUTX=1000	;EXTENDED OUTPUT BUS
   196		001400			SHFTBR=1400	;SHIFT THE BRG
   197		002000			WROUT=2000	;OUTPUT BUS
   198		002400			WRMEM=2400	;MEMORY
   199		003000			SPX=3000	;SCRATCH PAD
   200		003400			SPBRX=3400	;SRATCH PAD AND BRG
   201
   202
   203					;	JUMP CONDITIONS
   204
   205		000000			BRECON=0	;JUMP EXTENDED
   206		000400			ALCOND=400	;JUMP ALWAYS
   207		001000			CCOND=1000	;JUMP IF ALU CARRY = 1
   208		001400			ZCOND=1400	;JUMP IF ALU ZERO = 1
   209		002000			BR0CON=2000	;JUMP IF BRG BIT 0 = 1
   210		002400			BR1CON=2400	;JUMP IF BRG BIT 1 = 1
   211		003000			BR4CON=3000	;JUMP IF BRG BIT 4 = 1
   212		003400			BR7CON=3400	;JUMP IF BRG BIT 7 = 1
   213
   214
   215					;	MAR FIELDS
   216					 
   217		004000			LDMAPG=4000	;LOAD THE 4 MOST SIGNIFICANT BITS OF MAR
   218		010000			LDMAR=10000	;LOAD THE 8 LEAST SIGNIFICANT BITS OF MAR
   219		014000			INCMAR=14000	;INCREMENT MAR
   220					;
   221		054000			MEMI=MEMX!INCMAR	;READ FROM MEMORY AND INCREMENT THE MAR
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 4
KMCMAC.MAC    09-MAY-79 07:32		MICRO-INSTRUCTION FIELD DEFINITIONS

   223
   224						.SBTTL	MICRO INSTRUCTION DEFINITIONS
   225						.SBTTL		BRANCH INSTRUCTIONS
   226					;
   227		100000			JUMP=100000		;JUMP OP CODE
   228					;
   229					;
   230						.MACRO	BREXT ADDRES	;JUMP ALWAYS EXTENDED
   231						<JUMP!BRECON!<ADDRES-START&777/2>>
   232						.ENDM
   233					;
   234						.MACRO	ALWAYS ADDRES	;JUMP ALWAYS
   235						<JUMP!ALCOND!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   236						.ENDM
   237					;
   238						.MACRO	BR0 ADDRES	;JUMP IF BR0 SET
   239						<JUMP!BR0CON!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   240						.ENDM
   241					;
   242						.MACRO	BR1 ADDRES	;JUMP IF BR1 SET
   243						<JUMP!BR1CON!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   244						.ENDM
   245					;
   246						.MACRO	BR4 ADDRES	;JUMP IF BR4 SET
   247						<JUMP!BR4CON!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   248						.ENDM
   249					;
   250						.MACRO	BR7 ADDRES	;JUMP IF BR7 SET
   251						<JUMP!BR7CON!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   252						.ENDM
   253					;
   254						.MACRO	Z ADDRES	;JUMP IF Z BIT SET
   255						<JUMP!ZCOND!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   256						.ENDM
   257					;
   258						.MACRO	C ADDRES	;JUMP IF C BIT SET
   259						<JUMP!CCOND!<ADDRES-START&3000*4>!<ADDRES-START&777/2>>
   260						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 5
KMCMAC.MAC    09-MAY-79 07:32			BRANCH INSTRUCTIONS

   262
   263						.SBTTL		INDEXED BRANCH INSTRUCTIONS
   264					;
   265					;	             ! [IBUS,] ADRI       !
   266					;	.<BRANCH> !--! [SRC,] FUNC [,SPN] !-- ,PN
   267					;		     ! IMM, DATA          !
   268					;
   269					;	NOTE: BREXT DOES NOT USE THE PAGE FIELD
   270					;
   271						.MACRO	.BREXT SRC,FUNC,SPLOC	 ;INDEXED JUMP ALWAYS EXTENDED
   272						.IF NB,SPLOC
   273						<JUMP!BRECON!SRC!FUNC!SPLOC>
   274						.MEXIT
   275						.ENDC
   276						<JUMP!BRECON!SRC!FUNC>
   277						.ENDM
   278					;
   279						.MACRO	.ALWAY SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ALWAYS
   280						.IF NB,OPARG1
   281						<JUMP!ALCOND!SRC!FUNC!SPLOC!OPARG1>
   282						.MEXIT
   283						.ENDC
   284						.IF NB,SPLOC
   285						<JUMP!ALCOND!SRC!FUNC!SPLOC>
   286						.MEXIT
   287						.ENDC
   288						<JUMP!ALCOND!SRC!FUNC>
   289						.ENDM
   290					;
   291						.MACRO	.BR0 SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON BR0 SET
   292						.IF NB,OPARG1
   293						<JUMP!BR0CON!SRC!FUNC!SPLOC!OPARG1>
   294						.MEXIT
   295						.ENDC
   296						.IF NB,SPLOC
   297						<JUMP!BR0CON!SRC!FUNC!SPLOC>
   298						.MEXIT
   299						.ENDC
   300						<JUMP!BR0CON!SRC!FUNC>
   301						.ENDM
   302					;
   303						.MACRO	.BR1 SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON BR1 SET
   304						.IF NB,OPARG1
   305						<JUMP!BR1CON!SRC!FUNC!SPLOC!OPARG1>
   306						.MEXIT
   307						.ENDC
   308						.IF NB,SPLOC
   309						<JUMP!BR1CON!SRC!FUNC!SPLOC>
   310						.MEXIT
   311						.ENDC
   312						<JUMP!BR1CON!SRC!FUNC>
   313						.ENDM
   314					;
   315						.MACRO	.BR4 SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON BR4 SET
   316						.IF NB,OPARG1
   317						<JUMP!BR4CON!SRC!FUNC!SPLOC!OPARG1>
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 5-1
KMCMAC.MAC    09-MAY-79 07:32			INDEXED BRANCH INSTRUCTIONS

   318						.MEXIT
   319						.ENDC
   320						.IF NB,SPLOC
   321						<JUMP!BR4CON!SRC!FUNC!SPLOC>
   322						.MEXIT
   323						.ENDC
   324						<JUMP!BR4CON!SRC!FUNC>
   325						.ENDM
   326					;
   327						.MACRO	.BR7 SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON BR7 SET
   328						.IF NB,OPARG1
   329						<JUMP!BR7CON!SRC!FUNC!SPLOC!OPARG1>
   330						.MEXIT
   331						.ENDC
   332						.IF NB,SPLOC
   333						<JUMP!BR7CON!SRC!FUNC!SPLOC>
   334						.MEXIT
   335						.ENDC
   336						<JUMP!BR7CON!SRC!FUNC>
   337						.ENDM
   338					;
   339						.MACRO	.Z SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON Z BIT SET
   340						.IF NB,OPARG1
   341						<JUMP!ZCOND!SRC!FUNC!SPLOC!OPARG1>
   342						.MEXIT
   343						.ENDC
   344						.IF NB,SPLOC
   345						<JUMP!ZCOND!SRC!FUNC!SPLOC>
   346						.MEXIT
   347						.ENDC
   348						<JUMP!ZCOND!SRC!FUNC>
   349						.ENDM
   350					;
   351						.MACRO	.C SRC,FUNC,SPLOC,OPARG1 ;INDEXED JUMP ON C BIT SET
   352						.IF NB,OPARG1
   353						<JUMP!CCOND!SRC!FUNC!SPLOC!OPARG1>
   354						.MEXIT
   355						.ENDC
   356						.IF NB,SPLOC
   357						<JUMP!CCOND!SRC!FUNC!SPLOC>
   358						.MEXIT
   359						.ENDC
   360						<JUMP!CCOND!SRC!FUNC>
   361						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 6
KMCMAC.MAC    09-MAY-79 07:32			INDEXED BRANCH INSTRUCTIONS

   363
   364						.SBTTL		MOVE INSTRUCTIONS
   365					;
   366		000000			MOVE=0		;MOVE OPCODE
   367					;
   368					;	B SIDE DESTINATION GROUP
   369					;	NODST  !  ! [IBUS,] ADRI        !
   370					;	BRWRTE !--! [SRC,] FUNC [,SPN]  !--[,MAR]
   371					;	BRSHFT !  ! IMM,DATA		!
   372					;	MEM    !
   373					;
   374					;	NOTE: NODST AND BRSHFT HAVE ZERO OPERAND FORMS EQUIVALENT TO IMM,0
   375					;
   376						.MACRO	NODST	SRC,FUNC,SPADDR,OPARG1	;NO DESTINATION
   377						.IF NB,OPARG1
   378						<SRC!FUNC!SPADDR!OPARG1>
   379						.MEXIT
   380						.ENDC
   381						.IF NB,SPADDR
   382						.IIF IDN,SRC,IMM,<IMM!<FUNC&377>!SPADDR>
   383						.IIF DIF,SRC,IMM,<SRC!FUNC!SPADDR>
   384						.MEXIT
   385						.ENDC
   386						.IF NB,FUNC
   387						.IIF IDN,SRC,IMM,<IMM!<FUNC&377>>
   388						.IIF DIF,SRC,IMM,<SRC!FUNC>
   389						.MEXIT
   390						.ENDC
   391						.IF NB,SRC
   392						<SRC>
   393						.MEXIT
   394						.ENDC
   395						<0>
   396						.ENDM
   397					;
   398						.MACRO	BRWRTE	SRC,DATA,OPARG1,OPARG2	;MOVE TO BR
   399						.IF NB,OPARG2
   400						<MOVE!WRTEBR!SRC!DATA!OPARG1!OPARG2>
   401						.MEXIT
   402						.ENDC
   403						.IF NB,OPARG1
   404						.IIF IDN,SRC,IMM,<MOVE!WRTEBR!IMM!<DATA&377>!OPARG1>
   405						.IIF DIF,SRC,IMM,<MOVE!WRTEBR!SRC!DATA!OPARG1>
   406						.MEXIT
   407						.ENDC
   408						.IIF IDN,SRC,IMM,<MOVE!WRTEBR!IMM!<DATA&377>>
   409						.IIF DIF,SRC,IMM,<MOVE!WRTEBR!SRC!DATA>
   410						.ENDM
   411					;
   412						.MACRO	BRSHFT	SRC,DATA,OPARG1,OPARG2	;BR SHIFT RIGHT
   413						.IF NB,OPARG2
   414						<MOVE!SHFTBR!SRC!DATA!OPARG1!OPARG2>
   415						.MEXIT
   416						.ENDC
   417						.IF NB,OPARG1
   418						.IIF IDN,SRC,IMM,<MOVE!SHFTBR!IMM!<DATA&377>!OPARG1>
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 6-1
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   419						.IIF DIF,SRC,IMM,<MOVE!SHFTBR!SRC!DATA!OPARG1>
   420						.MEXIT
   421						.ENDC
   422						.IF NB,DATA
   423						.IIF IDN,SRC,IMM,<MOVE!SHFTBR!IMM!<DATA&377>>
   424						.IIF DIF,SRC,IMM,<MOVE!SHFTBR!SRC!DATA>
   425						.MEXIT
   426						.ENDC
   427						.IF NB,SRC
   428						<MOVE!SHFTBR!SRC>
   429						.MEXIT
   430						.ENDC
   431						<MOVE!SHFTBR>
   432						.ENDM
   433					;
   434						.MACRO	MEM	SRC,DATA,OPARG1,OPARG2	;MOVE TO MEMORY
   435						.IF NB,OPARG2
   436						<MOVE!WRMEM!SRC!DATA!OPARG1!OPARG2>
   437						.MEXIT
   438						.ENDC
   439						.IF NB,OPARG1
   440						.IIF IDN,SRC,IMM,<MOVE!WRMEM!IMM!<DATA&377>!OPARG1>
   441						.IIF DIF,SRC,IMM,<MOVE!WRMEM!SRC!DATA!OPARG1>
   442						.MEXIT
   443						.ENDC
   444						.IIF IDN,SRC,IMM,<MOVE!WRMEM!IMM!<DATA&377>>
   445						.IIF DIF,SRC,IMM,<MOVE!WRMEM!SRC!DATA>
   446						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 7
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   448
   449					;
   450					;	SP DESTINATION GROUP
   451					;	SP   !  ! [IBUS,] ADRI !
   452					;	SPBR !--! [SRC,] FUNC  !--,SPN [,MAR]
   453					;	        ! IMM, DATA    !
   454					;
   455						.MACRO	SP	SRC,FUNC,SPLOC,OPARG1	;LOAD SCRATCH-PAD
   456						.IF IDN,SRC,IMM
   457						.IIF NE,<FUNC&17>-SPLOC	.ERROR ;ILLEGAL USE OF IMMEDIATE MODE
   458						.ENDC
   459						.IF NB,OPARG1
   460						.IIF IDN,SRC,IMM,<MOVE!SPX!IMM!<FUNC&377>!SPLOC!OPARG1>
   461						.IIF DIF,SRC,IMM,<MOVE!SPX!SRC!FUNC!SPLOC!OPARG1>
   462						.MEXIT
   463						.ENDC
   464						.IF NB,SPLOC
   465						.IIF IDN,SRC,IMM,<MOVE!SPX!IMM!<FUNC&377>!SPLOC>
   466						.IIF DIF,SRC,IMM,<MOVE!SPX!SRC!FUNC!SPLOC>
   467						.MEXIT
   468						.ENDC
   469						<MOVE!SPX!SRC!FUNC>
   470						.ENDM
   471					;
   472						.MACRO	SPBR	SRC,FUNC,SPLOC,OPARG1	;LOAD SP AND BR
   473						.IF IDN,SRC,IMM
   474						.IIF NE,<FUNC&17>-SPLOC	.ERROR ;ILLEGAL USE OF IMMEDIATE MODE
   475						.ENDC
   476						.IF NB,OPARG1
   477						.IIF IDN,SRC,IMM,<MOVE!SPBRX!IMM!<FUNC&377>!SPLOC!OPARG1>
   478						.IIF DIF,SRC,IMM,<MOVE!SPBRX!SRC!FUNC!SPLOC!OPARG1>
   479						.MEXIT
   480						.ENDC
   481						.IF NB,SPLOC
   482						.IIF IDN,SRC,IMM,<MOVE!SPBRX!IMM!<FUNC&377>!SPLOC>
   483						.IIF DIF,SRC,IMM,<MOVE!SPBRX!SRC!FUNC!SPLOC>
   484						.MEXIT
   485						.ENDC
   486						<MOVE!SPBRX!SRC!FUNC>
   487						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 8
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   489
   490					;
   491					;	OUTBUS/OUTBUS* DESTINATION 
   492					;		! [IBUS,] ADRI !
   493					;	OUT  !--! [SRC,] FUNC  !--,ADRO [,MAR]
   494					;		! IMM, DATA    !
   495					;
   496						.MACRO	OUT	SRC,DATA,ADRO,OPARG1	;WRITE TO OUTBUS/OUTBUS*
   497						.IF IDN,SRC,IMM
   498						.IIF NE,<DATA&17>-<ADRO&17> .ERROR	;ILLEGAL USE OF IMMEDIATE MODE
   499						.ENDC
   500						.IF NB,OPARG1
   501						.IIF IDN,SRC,IMM,<MOVE!IMM!<DATA&377>!ADRO!OPARG1>
   502						.IIF DIF,SRC,IMM,<MOVE!SRC!DATA!ADRO!OPARG1>
   503						.MEXIT
   504						.ENDC
   505						.IF NB,ADRO
   506						.IIF IDN,SRC,IMM,<MOVE!IMM!<DATA&377>!ADRO>
   507						.IIF DIF,SRC,IMM,<MOVE!SRC!DATA!ADRO>
   508						.MEXIT
   509						.ENDC
   510						<MOVE!SRC!DATA>
   511						.ENDM
   512					;
   513						.MACRO	OUTPUT	SRC,DATA,ADRO,OPARG1	;WRITE TO OUTBUS/OUTBUS*
   514						.IF IDN,SRC,IMM
   515						.IIF NE,<DATA&17>-<ADRO&17> .ERROR	;ILLEGAL USE OF IMMEDIATE MODE
   516						.ENDC
   517						.IF NB,OPARG1
   518						.IIF IDN,SRC,IMM,<MOVE!IMM!<DATA&377>!ADRO!OPARG1>
   519						.IIF DIF,SRC,IMM,<MOVE!SRC!DATA!ADRO!OPARG1>
   520						.MEXIT
   521						.ENDC
   522						.IF NB,ADRO
   523						.IIF IDN,SRC,IMM,<MOVE!IMM!<DATA&377>!ADRO>
   524						.IIF DIF,SRC,IMM,<MOVE!SRC!DATA!ADRO>
   525						.MEXIT
   526						.ENDC
   527						<MOVE!SRC!DATA>
   528						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 9
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   530
   531					;
   532					;	IMPLICIT MAR FUNCTION GROUP
   533					;	MEMINC !  ! [IBUS,] ADRI
   534					;	LDMA   !--! [SRC,] FUNC [,SPN]
   535					;	LDMAP  !  ! IMM, DATA
   536					;
   537						.MACRO	MEMINC	SRC,DATA,OPARG1	;MOVE TO MEM, INCR MAR
   538						.IF NB,OPARG1
   539						<MOVE!WRMEM!INCMAR!SRC!DATA!OPARG1>
   540						.MEXIT
   541						.ENDC
   542						.IIF IDN,SRC,IMM,<MOVE!WRMEM!INCMAR!IMM!<DATA&377>>
   543						.IIF DIF,SRC,IMM,<MOVE!WRMEM!INCMAR!SRC!DATA>
   544						.ENDM
   545					;
   546						.MACRO	LDMA	SRC,DATA,OPARG1	;LOAD MEMORY ADDRESS REG
   547						.IF NB,OPARG1
   548						<MOVE!LDMAR!SRC!DATA!OPARG1>
   549						.MEXIT
   550						.ENDC
   551						.IIF IDN,SRC,IMM,<MOVE!LDMAR!IMM!<DATA&377>>
   552						.IIF DIF,SRC,IMM,<MOVE!LDMAR!SRC!DATA>
   553						.ENDM
   554					;
   555						.MACRO	LDMAP	SRC,DATA,OPARG1	;LOAD MEMORY PAGE NUMBER
   556						.IF NB,OPARG1
   557						<MOVE!LDMAPG!SRC!DATA!OPARG1>
   558						.MEXIT
   559						.ENDC
   560						.IIF IDN,SRC,IMM,<MOVE!LDMAPG!IMM!<DATA/400>>
   561						.IIF DIF,SRC,IMM,<MOVE!LDMAPG!SRC!DATA>
   562						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 10
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   564
   565					;
   566					;	GET ADDRESS GROUP
   567					;	BRADDR !
   568					;	BRADRE !--! LABEL [,MAR]
   569					;	MEMADR !
   570					;	MEMADE !
   571					;
   572					;
   573						.MACRO	BRADDR	ADDRES,OPARG1	;PUT ADDR (1 BYTE) IN BR
   574						.IF NB,OPARG1
   575						<MOVE!WRTEBR!<ADDRES-START&777/2>!OPARG1>
   576						.IFF
   577						<MOVE!WRTEBR!<ADDRES-START&777/2>>
   578						.ENDC
   579						.ENDM
   580					;
   581						.MACRO	BRADRE	ADDRES,OPARG1	;PUT EXT ADDRES (UPPER 4 BITS) IN BR
   582						.IF NB,OPARG1
   583						<MOVE!WRTEBR!<ADDRES-START/1000&17>!OPARG1>
   584						.IFF
   585						<MOVE!WRTEBR!<ADDRES-START/1000&17>>
   586						.ENDC
   587						.ENDM
   588					;
   589						.MACRO	MEMADR	ADDRES,OPARG1	;WRITE ADDRESS TO MEMORY
   590						.IF NB,OPARG1
   591						<MOVE!WRMEM!<ADDRES-START&777/2>!OPARG1>
   592						.IFF
   593						<MOVE!WRMEM!<ADDRES-START&777/2>>
   594						.ENDC
   595						.ENDM
   596					;
   597						.MACRO	MEMADE	ADDRES,OPARG1	;WRITE EXTENDED ADDRESS TO MEMORY
   598						.IF NB,OPARG1
   599						<MOVE!WRMEM!<ADDRES-START/1000&17>!OPARG1>
   600						.IFF
   601						<MOVE!WRMEM!<ADDRES-START/1000&17>>
   602						.ENDC
   603						.ENDM
   604					;
   605					;
   606					;	OTHER MISC HANDY COMBINATIONS
   607					;
   608					;
   609						.MACRO	COMP	SRC,SPADDR	;COMPARE SOURCE AND SP
   610						<SUBOC!SRC!SPADDR>
   611						.ENDM
   612					;
   613						.MACRO	JMPEXT	ADDRES		;LOAD PC PAGE AND BRANCH EXTENDED
   614						BRADRE	ADDRES
   615						OUT	BR,SELB,OPCHGH
   616						BREXT	ADDRES
   617						.ENDM
   618					;
   619						.MACRO	INCMA			;INCREMENT THE MAR
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 10-1
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   620						<INCMAR>
   621						.ENDM
   622					;
   623						.MACRO	BROTAT			;BR ROTATE
   624						<MOVE!SHFTBR!SELB!BR>
   625						.ENDM
   626					;
   627						.MACRO RSTATE	ADDRES		;UPDATE RECIEVER STATE
   628						MEMADR	ADDRES
   629						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 11
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   631
   632					;
   633					;	SUBROUTINE CALLS
   634					;
   635						.MACRO	CALLSB	REG,ADDRES,BRGVAL	;SUBROUTINE CALL
   636						DISP=<.-START>/2&377
   637						.IF B	BRGVAL
   638						BRWRTE	IMM,DISP+3
   639						.IFF
   640						BRWRTE	IMM,DISP+4
   641						.ENDC
   642						SP	BR,SELB,REG
   643						.IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   644						ALWAYS	ADDRES
   645						.ENDM
   646					;
   647					;
   648						.MACRO	CALLSR	REG,ADDRES,RADDR,BRGVAL	;SUBROUTINE CALL WITH SPECIAL RETURN ADD
   649						BRADDR	RADDR
   650						SP	BR,SELB,REG
   651						.IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   652						ALWAYS	ADDRES
   653						.ENDM
   654					;
   655					;
   656						.MACRO	RTNSUB	REG,PAGE	;SUBROUTINE RETURN
   657						.ALWAY	SELA,REG,PAGE
   658						.ENDM
   659
   660					;
   661					;	4K SUBROUTINE CALL
   662					;	NOTE: TWO (2)!!! SP'S ARE USED IN THIS CALL (IE. REG,REG+1)
   663					;
   664						.MACRO	CALLEX	REG,ADDRES,BRGVAL	;SUBRTN CALL ACROSS 4K
   665						DISP=<.-START>/2+6
   666						.IIF NB,BRGVAL,DISP=DISP+1
   667						RPAGE=DISP/400&17
   668						SPAGE=<ADDRES-START>/1000&17
   669						.IIF NE,<RPAGE/4>-<SPAGE/4>,DISP=DISP+2
   670
   671						BRWRTE	IMM,<DISP/400&17>
   672						SP	BR,SELB,REG
   673						BRWRTE	IMM,<DISP&377>
   674						SP	BR,SELB,REG'+1
   675
   676						.IF EQ,<RPAGE/4>-<SPAGE/4>
   677						   .IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   678						   ALWAYS	ADDRES
   679						.IFF
   680						   BRWRTE	IMM,SPAGE
   681						   OUT		BR,SELB,OPCHGH
   682						   .IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   683						   BREXT	ADDRES
   684						.ENDC
   685						.ENDM
   686					;
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 11-1
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   687					;
   688						.MACRO	CALREX	REG,ADDRES,RADDR,BRGVAL	;CALL W/RETURN ADR EXTENDED
   689						BRADRE	RADDR
   690						SP	BR,SELB,REG
   691						BRADDR	RADDR
   692						SP	BR,SELB,REG'+1
   693
   694						.IF EQ,<<.-START>&6000>-<<ADDRES-START>&6000>
   695						  .IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   696						  ALWAYS	ADDRES
   697						.IFF
   698						  BRADRP	ADDRES
   699						  OUT		BR,SELB,OPCHGH
   700						  .IIF NB,BRGVAL,BRWRTE	IMM,BRGVAL
   701						  BREXT		ADDRES
   702						.ENDC
   703						.ENDM
   704					;
   705					;
   706						.MACRO	RTNEX	REG		;4K CALL RETURN
   707						BRWRTE	SELA,REG
   708						OUT	BR,SELB,OPCHGH
   709						.BREXT	SELA,REG'+1
   710						.ENDM
KMCMAC - KMC11-B MACRO DEFINITIONS PREFIX FILE	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 12
KMCMAC.MAC    09-MAY-79 07:32			MOVE INSTRUCTIONS

   712
   713						.LIST	MEB
   714						.NLIST	ME
   715					 
   716	000000'				START:
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 13
KMCDMP.MAC    14-JUN-79 14:30			MOVE INSTRUCTIONS

   718						.TITLE	KMCDMP - DUMP AN UNSUSPECTING KMC
   719						.IDENT	/X01.02/
   720						.ENABL	LC
   721
   722					;
   723					; COPYRIGHT (C) 1978
   724					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS 01754
   725					;
   726					; THIS SOFTWARE IS  FURNISHED UNDER A LICENSE FOR USE ONLY ON A SINGLE
   727					; COMPUTER  SYSTEM AND  MAY BE  COPIED ONLY  WITH THE INCLUSION OF THE
   728					; ABOVE COPYRIGHT NOTICE. THIS  SOFTWARE, OR ANY OTHER COPIES THEREOF,
   729					; MAY NOT BE PROVIDED OR OTHERWISE  MADE AVAILABLE TO ANY OTHER PERSON
   730					; EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE
   731					; TERMS. TITLE  TO AND  OWNERSHIP OF THE  SOFTWARE  SHALL AT ALL TIMES
   732					; REMAIN IN DEC.
   733					;
   734					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
   735					; AND  SHOULD NOT BE  CONSTRUED AS A COMMITMENT BY  DIGITAL  EQUIPMENT
   736					; CORPORATION.
   737					;
   738					; DEC ASSUMES  NO  RESPONSIBILITY  FOR THE USE OR  RELIABILITY OF ITS
   739					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
   740					;
   741
   742					;++
   743					; FACILITY:
   744					;	KMC micro-code debugging
   745					;
   746					; ABSTRACT:
   747					;
   748					;	This program dumps the contents of the KMC into a buffer
   749					;	and then BPT's so that one can look at what the KMC was doing.
   750					;	This version also includes the DUP CSRs.
   751					;
   752					; 
   753					; ENVIRONMENT:
   754					;	RSX11-S,-M, DN20 MCB
   755					;
   756					; AUTHOR: Bob Rosenbaum (copied by Scott Robinson), CREATION DATE: 01-APR-76
   757					;
   758					; MODIFIED BY:
   759					;
   760					; 	Scott G. Robinson, 12-JUN-79: VERSION X01
   761					; 01	-Fix misc bugs in execution of micro-instructions
   762					; 02	-Add code to save DUP CSRs
   763					;--
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 14
KMCDMP.MAC    14-JUN-79 14:30			MOVE INSTRUCTIONS

   765
   766						.SBTTL	DECLARATIONS
   767					;
   768					; INCLUDE FILES:
   769					;
   770
   771					;
   772					; MACROS:
   773					;
   774					 .MACRO	DO	INST
   775						MOV	INST,R1
   776						CALL	XCMC
   777						.ENDM
   778					 .MACRO DOS	INST
   779						DO	INST
   780						MOVB	2(R0),(R5)+
   781						.ENDM
   782					;
   783					; EQUATED SYMBOLS:
   784					;
   785		160300			DUPCSR=160300			;CSR for first DUP on this KMC
   786		000004			NUMDUP=4			;Number of DUPs on this KMC
   787		160540			KMCCSR=160540			;CSR for KMC
   788		001000			CD.RMI=1000			;Ram Input
   789		000400			CD.STP=400			;Step up
   790		177776			PS=-2				;Address of processor status
   791		000340			PR7=340				;Priority 7
   792					;
   793					; OWN STORAGE:
   794					;
   795	000000'				GTNPR0:	OUT	IBUS,INDAT1,OOCON
   (1)	000000'	021002				.IIF DIF,IBUS,IMM,<MOVE!IBUS!INDAT1!OOCON>
   796	000002'					OUT	IBUS,INDAT2,OOCON
   (1)	000002'	021022				.IIF DIF,IBUS,IMM,<MOVE!IBUS!INDAT2!OOCON>
   797	000004'					OUT	IBUS,IODAT1,OOCON
   (1)	000004'	021042				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IODAT1!OOCON>
   798	000006'					OUT	IBUS,IODAT2,OOCON
   (1)	000006'	021062				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IODAT2!OOCON>
   799	000010'					OUT	IBUS,IIBA1,OOCON
   (1)	000010'	021102				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IIBA1!OOCON>
   800	000012'					OUT	IBUS,IIBA2,OOCON
   (1)	000012'	021122				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IIBA2!OOCON>
   801	000014'					OUT	IBUS,IOBA1,OOCON
   (1)	000014'	021142				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IOBA1!OOCON>
   802	000016'					OUT	IBUS,IOBA2,OOCON
   (1)	000016'	021162				.IIF DIF,IBUS,IMM,<MOVE!IBUS!IOBA2!OOCON>
   803	000020'					OUT	IBUS,NPR,OOCON
   (1)	000020'	121202				.IIF DIF,IBUS,IMM,<MOVE!IBUS!NPR!OOCON>
   804	000022'					OUT	IBUS,UBBR,OOCON
   (1)	000022'	121222				.IIF DIF,IBUS,IMM,<MOVE!IBUS!UBBR!OOCON>
   805	000024'				GTBRG:	OUT	BR,SELB,OOCON
   (1)	000024'	061222				.IIF DIF,BR,IMM,<MOVE!BR!SELB!OOCON>
   806	000026'				GTSP0:	BRWRTE	SELA,SP0
   (1)	000026'	060600				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP0>
   807	000030'					BRWRTE	SELA,SP1
   (1)	000030'	060601				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP1>
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 14-1
KMCDMP.MAC    14-JUN-79 14:30		DECLARATIONS

   808	000032'					BRWRTE	SELA,SP2
   (1)	000032'	060602				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP2>
   809	000034'					BRWRTE	SELA,SP3
   (1)	000034'	060603				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP3>
   810	000036'					BRWRTE	SELA,SP4
   (1)	000036'	060604				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP4>
   811	000040'					BRWRTE	SELA,SP5
   (1)	000040'	060605				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP5>
   812	000042'					BRWRTE	SELA,SP6
   (1)	000042'	060606				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP6>
   813	000044'					BRWRTE	SELA,SP7
   (1)	000044'	060607				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP7>
   814	000046'					BRWRTE	SELA,SP10
   (1)	000046'	060610				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP10>
   815	000050'					BRWRTE	SELA,SP11
   (1)	000050'	060611				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP11>
   816	000052'					BRWRTE	SELA,SP12
   (1)	000052'	060612				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP12>
   817	000054'					BRWRTE	SELA,SP13
   (1)	000054'	060613				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP13>
   818	000056'					BRWRTE	SELA,SP14
   (1)	000056'	060614				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP14>
   819	000060'					BRWRTE	SELA,SP15
   (1)	000060'	060615				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP15>
   820	000062'					BRWRTE	SELA,SP16
   (1)	000062'	060616				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP16>
   821	000064'					BRWRTE	SELA,SP17
   (1)	000064'	060617				.IIF DIF,SELA,IMM,<MOVE!WRTEBR!SELA!SP17>
   822	000066'				INIMAR:	LDMA	IMM,0
   (1)	000066'	010000				.IIF IDN,IMM,IMM,<MOVE!LDMAR!IMM!<0&377>>
   823	000070'				INIMA1:	LDMAP	IMM,0
   (1)	000070'	004000				.IIF IDN,IMM,IMM,<MOVE!LDMAPG!IMM!<0/400>>
   824	000072'				GTMEM:	OUT	MEMI,SELB,OOCON
   (1)	000072'	055222				.IIF DIF,MEMI,IMM,<MOVE!MEMI!SELB!OOCON>
   825					;
   826					; Buffer for Dump
   827					;
   828	000074'	000020			CSRS:	.BLKW	NUMDUP*4
   829	000134'	001046			BUFFER:	.BLKW	550.
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 15
KMCDMP.MAC    14-JUN-79 14:30		DECLARATIONS

   831
   832						.SBTTL	DUMP - Dump the KMC
   833					;++
   834					; FUNCTIONAL DESCRIPTION:
   835					;
   836					;	Dump the contents of the KMC including various interesting
   837					;	registers and the memory to a buffer so we can look at it.
   838					;
   839					; CALLING SEQUENCE:
   840					;
   841					;	NONE
   842					;
   843					; INPUT PARAMETERS:
   844					;
   845					;	NONE
   846					;
   847					; IMPLICIT INPUTS:
   848					;
   849					;	NONE
   850					;
   851					; OUTPUT PARAMETERS:
   852					;
   853					;	NONE
   854					;
   855					; IMPLICIT OUTPUTS:
   856					;
   857					;	NONE
   858					;
   859					; COMPLETION CODES:
   860					;
   861					;	NONE
   862					;
   863					; SIDE EFFECTS:
   864					;
   865					;	BPTs when done
   866					;
   867					;--
   868	002250'	016746	177776		DUMP:	MOV	PS,-(SP)		;Save old PS
   869	002254'	112767	000340	177776		MOVB	#PR7,PS			;Shutdown interrupts
   870	002262'	012705	000134'			MOV	#BUFFER,R5		;Buffer address is in R5
   871	002266'	012700	160540			MOV	#KMCCSR,R0		;R0 will point at CSR
   872	002272'	010046				MOV	R0,-(SP)		;Save address
   873	002274'	011025				MOV	(R0),(R5)+		;Store initial contents of CSR
   874	002276'	005020				CLR	(R0)+			;Stop the KMC
   875	002300'	000240				NOP				;Wait for a few
   876	002302'	000240				NOP
   877	002304'	000240				NOP
   878	002306'	012025				MOV	(R0)+,(R5)+		;Save remainder of KMC registers
   879	002310'	012025				MOV	(R0)+,(R5)+
   880	002312'	012025				MOV	(R0)+,(R5)+
   881
   882	002314'	012700	160300			MOV	#DUPCSR,R0		;First DUPs CSR
   883	002320'	012701	000074'			MOV	#CSRS,R1		;First of CSR buffer
   884	002324'	012702	000004			MOV	#NUMDUP,R2		;Number of DUPs to dump
   885	002330'	012021			5$:	MOV	(R0)+,(R1)+		;CSR xx0
   886	002332'	012021				MOV	(R0)+,(R1)+		;CSR xx2
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 15-1
KMCDMP.MAC    14-JUN-79 14:30		DUMP - DUMP THE KMC

   887	002334'	012021				MOV	(R0)+,(R1)+		;CSR xx4
   888	002336'	012021				MOV	(R0)+,(R1)+		;CSR xx6
   889	002340'	077205				SOB	R2,5$			;Do all DUPs
   890
   891	002342'	012600				MOV	(SP)+,R0		;Restore CSR address
   892
   893	002344'	012702	000000'			MOV	#GTNPR0,R2		;Issue instructions from here
   894	002350'	012703	000026			MOV	#<GTBRG-GTNPR0+2>,R3	;This many instructions * 2
   895	002354'	006203				ASR	R3			;Make number of instructions
   896	002356'				10$:	DOS	(R2)+			;Do an instruction and store results
   (2)	002356'	012201				MOV	(R2)+,R1
   (2)	002360'	004767	000114			CALL	XCMC
   (1)	002364'	116025	000002			MOVB	2(R0),(R5)+
   897	002370'	077306				SOB	R3,10$			;Loop on
   898	002372'	105025				CLRB	(R5)+			;Put in zero byte
   899
   900	002374'	012703	000020			MOV	#16.,R3			;Dump contents of SP0-SP17
   901	002400'	012702	000026'			MOV	#GTSP0,R2
   902	002404'				20$:	DO	(R2)+
   (1)	002404'	012201				MOV	(R2)+,R1
   (1)	002406'	004767	000066			CALL	XCMC
   903	002412'					DOS	GTBRG
   (2)	002412'	016701	175406			MOV	GTBRG,R1
   (2)	002416'	004767	000056			CALL	XCMC
   (1)	002422'	116025	000002			MOVB	2(R0),(R5)+
   904	002426'	077312				SOB	R3,20$
   905
   906	002430'					DO	INIMAR			;Dump memory
   (1)	002430'	016701	175432			MOV	INIMAR,R1
   (1)	002434'	004767	000040			CALL	XCMC
   907	002440'					DO	INIMA1
   (1)	002440'	016701	175424			MOV	INIMA1,R1
   (1)	002444'	004767	000030			CALL	XCMC
   908	002450'	012703	002000			MOV	#1024.,R3		;Number of bytes in memory
   909	002454'				30$:	DOS	GTMEM
   (2)	002454'	016701	175412			MOV	GTMEM,R1
   (2)	002460'	004767	000014			CALL	XCMC
   (1)	002464'	116025	000002			MOVB	2(R0),(R5)+
   910	002470'	077307				SOB	R3,30$
   911
   912	002472'	012667	177776			MOV	(SP)+,PS		;Restore processor status
   913	002476'	000003				BPT				;Break point
   914					;
   915					;
   916					; XCMC - Execute the KMC instruction
   917					;
   918					;
   919	002500'	010160	000006		XCMC:	MOV	R1,6(R0)
   920	002504'	012710	001000			MOV	#CD.RMI,(R0)
   921	002510'	000240				NOP
   922	002512'	000240				NOP
   923	002514'	000240				NOP
   924	002516'	052710	000400			BIS	#CD.STP,(R0)
   925	002522'	000240				NOP
   926	002524'	000240				NOP
   927	002526'	000240				NOP
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 15-2
KMCDMP.MAC    14-JUN-79 14:30		DUMP - DUMP THE KMC

   928	002530'	005010				CLR	(R0)
   929	002532'	000207				RETURN
   930
   931
   932		002250'				.END	DUMP
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 16
KMCDMP.MAC    14-JUN-79 14:30		CROSS REFERENCE TABLE -- USER SYMBOLS

AANDB = 000260        	  140#
ADD   = 000000        	  129#
ADDC  = 000020        	  130#
ALCOND= 000400        	  206#
AORB  = 000300        	  141#
AORNB = 000240        	  139#
APLUSC= 060100        	  133#
AXORB = 000320        	  142#
BR    = 060000        	  132	  133	  134	  135	  136	  137	  189#	  805
BRECON= 000000        	  205#
BR0CON= 002000        	  209#
BR1CON= 002400        	  210#
BR4CON= 003000        	  211#
BR7CON= 003400        	  212#
BSEL0 = 120000        	   54#
BSEL1 = 120020        	   55#
BSEL2 = 120040        	   56#
BSEL3 = 120060        	   57#
BSEL4 = 120100        	   58#
BSEL5 = 120120        	   59#
BSEL6 = 120140        	   60#
BSEL7 = 120160        	   61#
BUFFER  000134R       	  829#	  870
CCOND = 001000        	  207#
CD.RMI= 001000        	  788#	  920
CD.STP= 000400        	  789#	  924
CSRS    000074R       	  828#	  883
DATI  = 000001        	  174#
DATIH = 000003        	  175#
DATO  = 000021        	  176#
DATOB = 000221        	  178#
DATOBH= 000223        	  179#
DATOH = 000023        	  177#
DECA  = 060160        	  136#
DUMP    002250R       	  868#	  932
DUPCSR= 160300        	  785#	  882
GTBRG   000024R       	  805#	  894	  903
GTMEM   000072R       	  824#	  909
GTNPR0  000000R       	  795#	  893	  894
GTSP0   000026R       	  806#	  901
IBA1  = 002004        	  114#
IBA2  = 002005        	  115#
IBUS  = 020000        	  187#	  795	  796	  797	  798	  799	  800	  801	  802	  803	  804
IIBA1 = 020100        	   69#	  799
IIBA2 = 020120        	   70#	  800
IMM   = 000000        	  186#	  822	  823
INCA  = 060060        	  132#
INCMAR= 014000        	  219#	  221
INCON = 120000        	   39#
INDAT1= 020000        	   65#	  795
INDAT2= 020020        	   66#	  796
INIMAR  000066R       	  822#	  906
INIMA1  000070R       	  823#	  907
IOBA1 = 020140        	   71#	  801
IOBA2 = 020160        	   72#	  802
IODAT1= 020040        	   67#	  797
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 16-1
KMCDMP.MAC    14-JUN-79 14:30		CROSS REFERENCE TABLE -- USER SYMBOLS

IODAT2= 020060        	   68#	  798
JUMP  = 100000        	  227#
KMCCSR= 160540        	  787#	  871
LDMAPG= 004000        	  217#	  823
LDMAR = 010000        	  218#	  822
LINENM= 120060        	   42#
MAIN  = 120020        	   40#
MARH  = 120320        	   52#
MARL  = 120300        	   51#
MEMI  = 054000        	  221#	  824
MEMX  = 040000        	  188#	  221
MOVE  = 000000        	  366#	  795	  796	  797	  798	  799	  800	  801	  802	  803	  804	  805	  806
			  807	  808	  809	  810	  811	  812	  813	  814	  815	  816	  817	  818	  819
			  820	  821	  822	  823	  824
NPR   = 120200        	   47#	  803
NUMDUP= 000004        	  786#	  828	  884
OBA1  = 002006        	  116#
OBA2  = 002007        	  117#
OBR   = 001011        	   93#
OBSEL0= 001000        	   99#
OBSEL1= 001001        	  100#
OBSEL2= 001002        	  101#
OBSEL3= 001003        	  102#
OBSEL4= 001004        	  103#
OBSEL5= 001005        	  104#
OBSEL6= 001006        	  105#
OBSEL7= 001007        	  106#
OCON  = 120040        	   41#
OIDAT1= 002000        	  110#
OIDAT2= 002001        	  111#
OINCON= 001000        	   84#
OLINEN= 001003        	   87#
OMAIN = 001001        	   85#
OMARH = 001015        	   97#
OMARL = 001014        	   96#
ONPR  = 001010        	   92#
OOCON = 001002        	   86#	  795	  796	  797	  798	  799	  800	  801	  802	  803	  804	  805	  824
OPCHGH= 001013        	   95#
OPCLOW= 001012        	   94#
OPORT1= 001004        	   88#
OPORT2= 001005        	   89#
OPORT3= 001006        	   90#
OPORT4= 001007        	   91#
OUTDA1= 002002        	  112#
OUTDA2= 002003        	  113#
OXREG0= 002010        	  118#
OXREG1= 002011        	  119#
OXREG2= 002012        	  120#
OXREG3= 002013        	  121#
OXREG4= 002014        	  122#
OXREG5= 002015        	  123#
OXREG6= 002016        	  124#
OXREG7= 002017        	  125#
PCHGH = 120260        	   50#
PCLOW = 120240        	   49#
PORT1 = 120100        	   43#
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 16-2
KMCDMP.MAC    14-JUN-79 14:30		CROSS REFERENCE TABLE -- USER SYMBOLS

PORT2 = 120120        	   44#
PORT3 = 120140        	   45#
PORT4 = 120160        	   46#
PR7   = 000340        	  791#	  869
PS    = 177776        	  790#	  868	  869*	  912*
P0    = 000000        	  167#
P1    = 004000        	  168#
P2    = 010000        	  169#
P3    = 014000        	  170#
SELA  = 060200        	  137#	  806	  807	  808	  809	  810	  811	  812	  813	  814	  815	  816	  817
			  818	  819	  820	  821
SELB  = 000220        	  138#	  805	  824
SHFTBR= 001400        	  196#
SPBRX = 003400        	  200#
SPX   = 003000        	  199#
SP0   = 000000        	  148#	  806
SP1   = 000001        	  149#	  807
SP10  = 000010        	  156#	  814
SP11  = 000011        	  157#	  815
SP12  = 000012        	  158#	  816
SP13  = 000013        	  159#	  817
SP14  = 000014        	  160#	  818
SP15  = 000015        	  161#	  819
SP16  = 000016        	  162#	  820
SP17  = 000017        	  163#	  821
SP2   = 000002        	  150#	  808
SP3   = 000003        	  151#	  809
SP4   = 000004        	  152#	  810
SP5   = 000005        	  153#	  811
SP6   = 000006        	  154#	  812
SP7   = 000007        	  155#	  813
START   000000R       	  716#
SUB   = 000340        	  143#
SUBC  = 000040        	  131#
SUBOC = 000360        	  144#
TWOA  = 060120        	  134#
TWOAC = 060140        	  135#
UBBR  = 120220        	   48#	  804
WRMEM = 002400        	  198#
WROUT = 002000        	  197#
WROUTX= 001000        	  195#
WRTEBR= 000400        	  194#	  806	  807	  808	  809	  810	  811	  812	  813	  814	  815	  816	  817
			  818	  819	  820	  821
XCMC    002500R       	  896*	  902*	  903*	  906*	  907*	  909*	  919#
XREG0 = 020200        	   73#
XREG1 = 020220        	   74#
XREG2 = 020240        	   75#
XREG3 = 020260        	   76#
XREG4 = 020300        	   77#
XREG5 = 020320        	   78#
XREG6 = 020340        	   79#
XREG7 = 020360        	   80#
ZCOND = 001400        	  208#
.     = 002534R       	  828#	  829#
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 17
KMCDMP.MAC    14-JUN-79 14:30		CROSS REFERENCE TABLE -- MACRO NAMES

ALWAYS	  234#
BRADDR	  573#
BRADRE	  581#
BREXT	  230#
BROTAT	  623#
BRSHFT	  412#
BRWRTE	  398#	  806	  807	  808	  809	  810	  811	  812	  813	  814	  815	  816	  817	  818	  819
	  820	  821
BR0	  238#
BR1	  242#
BR4	  246#
BR7	  250#
C	  258#
CALLEX	  664#
CALLSB	  635#
CALLSR	  648#
CALREX	  688#
COMP	  609#
DO	  774#	  896	  902	  903	  906	  907	  909
DOS	  778#	  896	  903	  909
INCMA	  619#
JMPEXT	  613#
LDMA	  546#	  822
LDMAP	  555#	  823
MEM	  434#
MEMADE	  597#
MEMADR	  589#
MEMINC	  537#
NODST	  376#
OUT	  496#	  795	  796	  797	  798	  799	  800	  801	  802	  803	  804	  805	  824
OUTPUT	  513#
RSTATE	  627#
RTNEX	  706#
RTNSUB	  656#
SP	  455#
SPBR	  472#
Z	  254#
.ALWAY	  279#
.BREXT	  271#
.BR0	  291#
.BR1	  303#
.BR4	  315#
.BR7	  327#
.C	  351#
.Z	  339#


. ABS.  000000     000	   CON   RW    ABS   LCL   I  
        002534     001	   OVR   RO    ABS   GBL   I  


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  0

 KMCDMP,KMCDMP/CR=KMCMAC,KMCDMP
 RUN-TIME: 1 1 .3 SECONDS
KMCDMP - DUMP AN UNSUSPECTING KMC	DNMAC X24.07-563  14-JUN-79  14:31  PAGE 17-1
KMCDMP.MAC    14-JUN-79 14:30		CROSS REFERENCE TABLE -- MACRO NAMES

 RUN-TIME RATIO: 24/3=6.6
 CORE USED:  7K  (13 PAGES)