Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/loaders/dtedmp.lst
There are no other files named dtedmp.lst in the archive.
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51
DTEDMP.MAC    30-DEC-82 15:37		TABLE OF CONTENTS

     3		Title page
    27		Edit history
    74		Feature test definitions
    80		Macros
   190		General bit definitions
   210		MOP protocol definitions
   226		CPU and KT-11 definitions
   261		DTE20 definitions
   301		Find top of physical memory
   400		Dump processor
   501		DTE subroutines
   641		Data area
   693		END
   699	000744'	000034			    .PRINT <M$$XSZ-.> ; Free space left
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 1
DTEDMP.MAC    30-DEC-82 15:37

     1						.ENABLE	LC
     2						.TITLE	DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP
     3						.SBTTL	Title page
     4						.IDENT	"X05.01"
     5					;
     6					;
     7					;                    COPYRIGHT (c) 1980, 1981, 1982
     8					;                    DIGITAL EQUIPMENT CORPORATION
     9					;                        Maynard, Massachusetts
    10					;
    11					;     This software is furnished under a license and may  be  used
    12					;     and copied only in accordance with the terms of such license
    13					;     and with the inclusion of the above copyright notice.   This
    14					;     software  or any other copies thereof may not be provided or
    15					;     otherwise made available to any other person.  No  title  to
    16					;     and ownership of the software is hereby transferred.
    17					;
    18					;     The information  in  this  software  is  subject  to  change
    19					;     without  notice  and should not be construed as a commitment
    20					;     by DIGITAL EQUIPMENT CORPORATION.
    21					;
    22					;     DIGITAL assumes no responsibility for the use or reliability
    23					;     of  its  software  on  equipment  which  is  not supplied by
    24					;     DIGITAL.
    25					;
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 2
DTEDMP.MAC    30-DEC-82 15:37		EDIT HISTORY

    27						.SBTTL	Edit history
    28					;
    29					;     Module: DTEDMP
    30					;
    31					;     Date:   9-Jun-78
    32					;
    33					;     Author: LEE WEBBER
    34					;
    35					;     Modifications:
    36					;
    37					;       4.01  24-Oct-78 Lee Webber
    38					;
    39					;			Take out DTE reset at start of MOP.
    40					;			Set I-bit on reading MOP message.
    41					;			Do all dump writes from buffer in low core.
    42					;
    43					;       4.02  26-Oct-78 Lee Webber
    44					;
    45					;			Typo fixes.
    46					;			Fix "DTESNA" bug.
    47					;
    48					;       4.03  27-Oct-78 Lee Webber
    49					;
    50					;			Add MOP header to dump data.
    51					;
    52					;       4.04  31-Oct-78 Lee webber
    53					;
    54					;			Add "MOP MODE RUNNING" with core size.
    55					;
    56					;       4.05  19-Dec-78 Lee Webber
    57					;
    58					;			Make 128K core size into 124K.
    59					;
    60					;	****** Release V3.0 DECnet-20 ******
    61					;
    62					;       5.01  3-Jun-81 Steve Jenness
    63					;
    64					;			Remove some unneeded conditionals.
    65					;			Leave bootstrap in low memory; stop overwritting
    66					;			    high memory.
    67					;			Extensive format changes to improve readability.
    68					;			Fix NXM trap (4) to prevent screwy occurances
    69					;			    when a bug occurs after memory search is done.
    70					;			Limit DTE MOP "DUMP DATA" message to 2k bytes
    71					;			    to prevent overrunning end of the buffer
    72					;			    area onto undumped memory.
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 3
DTEDMP.MAC    30-DEC-82 15:37		FEATURE TEST DEFINITIONS

    74						.SBTTL	Feature test definitions
    75
    76					;**	D$$BUG=	0		; Debug version if defined
    77		001000				M$$XSZ=	512.		; Max size of program is 512. bytes 
    78		004000				M$$MSG= 2048.		; Maximum number of bytes per dump request
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 4
DTEDMP.MAC    30-DEC-82 15:37		MACROS

    80						.SBTTL	Macros
    81					;
    82					; Macro - CALL
    83					;
    84					; Function - Subroutine linkage
    85					;
    86					; Usage -
    87					;
    88					;	CALL	rtnadr
    89					;
    90					; Parameters -
    91					;
    92					;    rtnadr	address expression for subroutine to be called
    93					;
    94
    95					.MACRO	CALL,A
    96
    97						JSR	PC,A		;CALL A
    98
    99					.ENDM
   100
   101					;
   102					; Macro - RETURN
   103					;
   104					; Function - To return from a subroutine called with either
   105					;	a JSR instruction or the CALL macro.
   106					;
   107					; Parameters - none
   108					;
   109
   110					.MACRO	RETURN
   111
   112						RTS	PC
   113
   114					.ENDM
   115
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 5
DTEDMP.MAC    30-DEC-82 15:37		MACROS

   117
   118					;
   119					; Macro - DEBUG
   120					;
   121					; Function - This macro conditionally assembles code.  If the feature
   122					;	test switch D$$BUG is defined, the specified operation (OP)
   123					;	is assembled.  If D$$BUG is not defined, the altenate operation
   124					;	(ALTOP) is assembled.
   125					;
   126					; Parameters -
   127					;
   128					;	OP	Instruction to execute if debugging is enabled
   129					;	MSG     Text to be associated with debugging code
   130					;	ALTOP   Instruction to execute if debugging is disabled
   131
   132					.MACRO DEBUG,OP,MSG,ALTOP
   133					  .IF DF D$$BUG
   134						OP		;MSG
   135					    .IF NDF PASS2
   136					    .PRINT . ;MSG
   137					    .ENDC
   138					  .IFF
   139						ALTOP
   140					  .ENDC
   141					.ENDM DEBUG
   142
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 6
DTEDMP.MAC    30-DEC-82 15:37		MACROS

   144
   145					;
   146					; Macro - ERR
   147					;
   148					; Function - This macro generates error conditional code.  If the
   149					;	debugging feature test switch D$$BUG is defined then a
   150					;	conditional instruction is built to check if an error has
   151					;	occured.  If debugging is enabled and the test succeeds
   152					;	the processor is halted.  If debugging is disabled and the
   153					;	test succeeds, the program jumps to MOPERR to restart the
   154					;	MOP protocol processor.
   155					;
   156					; Parameters -
   157					;
   158					;    CND     Branch type postfix code indicating failure test     
   159					;    MSG     Text to be associated with the failure
   160					;    WHERE   Optional failure destination if MOPERR is undesirable
   161					;
   162
   163					.MACRO ERR,CND,MSG,WHERE,?LABEL
   164					.IF DF D$$BUG
   165						 .IIF IDN <CND>,<R>,
   166						 .IIF IDN <CND>,<NE>,BEQ LABEL
   167						 .IIF IDN <CND>,<EQ>,BNE LABEL
   168						 .IIF IDN <CND>,<PL>,BMI LABEL
   169						 .IIF IDN <CND>,<MI>,BPL LABEL
   170						 .IIF IDN <CND>,<VC>,BVS LABEL
   171						 .IIF IDN <CND>,<VS>,BVC LABEL
   172						 .IIF IDN <CND>,<CC>,BCS LABEL
   173						 .IIF IDN <CND>,<CS>,BCC LABEL
   174						 .IIF IDN <CND>,<GE>,BLT LABEL
   175						 .IIF IDN <CND>,<LT>,BGE LABEL
   176						 .IIF IDN <CND>,<GT>,BLE LABEL
   177						 .IIF IDN <CND>,<LE>,BGT LABEL
   178						 .IIF IDN <CND>,<HI>,BLOS LABEL
   179						 .IIF IDN <CND>,<LOS>,BHI LABEL
   180						 .IIF IDN <CND>,<HIS>,BLO LABEL
   181						 .IIF IDN <CND>,<LO>,BHIS LABEL
   182					.IFTF
   183						DEBUG HALT,<ERROR: "MSG">,<B'CND	WHERE'MOPERR>
   184					.IFT
   185					LABEL:
   186					.ENDC
   187					.ENDM ERR
   188
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 7
DTEDMP.MAC    30-DEC-82 15:37		GENERAL BIT DEFINITIONS

   190						.SBTTL	General bit definitions
   191
   192		000001			BIT0=	000001
   193		000002			BIT1=	000002
   194		000004			BIT2=	000004
   195		000010			BIT3=	000010
   196		000020			BIT4=	000020
   197		000040			BIT5=	000040
   198		000100			BIT6=	000100
   199		000200			BIT7=	000200
   200		000400			BIT8=	000400
   201		001000			BIT9=	001000
   202		002000			BIT10=	002000
   203		004000			BIT11=	004000
   204		010000			BIT12=	010000
   205		020000			BIT13=	020000
   206		040000			BIT14=	040000
   207		100000			BIT15=	100000
   208
   209
   210						.SBTTL	MOP protocol definitions
   211
   212		000000			M.PMLT=	0.			; "Memory load with transfer"
   213		000002			M.PMLD=	2.			; "Memory load"
   214		000004			M.PRMD=	4.			; "Request memory dump"
   215		000006			M.PEMM=	6.			; "Enter MOP mode"
   216		000010			M.PRPR=	8.			; "Request program"
   217		000012			M.PRML=	10.			; "Request/acknowledge memory load"
   218		000014			M.PMMR=	12.			; "MOP mode running"
   219		000016			M.PMDP=	14.			; "Memory dump"
   220		000020			M.PDAP=	16.			; "(REMOTE-11) DAP envelope"
   221		000022			M.PEAM=	18.			; "(REMOTE-11) enter REMOTE-11 ASCII mode"
   222		000024			M.PLDP=	20.			; "Program data"
   223		000030			M.PLBT=	24.			; "Loopback test"
   224
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 8
DTEDMP.MAC    30-DEC-82 15:37		CPU AND KT-11 DEFINITIONS

   226						.SBTTL	CPU and KT-11 definitions
   227
   228					;
   229					; CPU register definitions
   230					;
   231
   232		177570			SWR=	177570			; Switch register
   233		177776			PS=	177776			; Processor status word
   234		000340				PR7=	7*BIT5		; Priority 7
   235
   236					;
   237					; Memory management register definitions
   238					;
   239
   240		177572			SR0=	177572			; Status register 0
   241
   242		172300			KISDR0=	172300			; Kernal page desriptor 0
   243		172302			KISDR1=	172302			; . . 1
   244		172304			KISDR2=	172304			; . . 2
   245		172306			KISDR3=	172306			; . . 3
   246		172310			KISDR4=	172310			; . . 4
   247		172312			KISDR5=	172312			; . . 5
   248		172314			KISDR6=	172314			; . . 6
   249		172316			KISDR7=	172316			; . . 7
   250
   251		172340			KISAR0=	172340			; Kernal page address register 0
   252		172342			KISAR1=	172342			; . . 1
   253		172344			KISAR2=	172344			; . . 2
   254		172346			KISAR3=	172346			; . . 3
   255		172350			KISAR4=	172350			; . . 4
   256		172352			KISAR5=	172352			; . . 5
   257		172354			KISAR6=	172354			; . . 6
   258		172356			KISAR7=	172356			; . . 7
   259
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 9
DTEDMP.MAC    30-DEC-82 15:37		DTE20 DEFINITIONS

   261						.SBTTL	DTE20 definitions
   262
   263
   264		000000			DLYCNT=	0			; Delay counter
   265		100000				BUSA17=	BIT15		; UNIBUS address bit 17
   266		040000				BUSA16=	BIT14		; UNIBUS address bit 16
   267		037777				DLYMSK=	37777		; Delay counter
   268		000002			DEXWD3=	2			; Deposit/examine word 3
   269		000004			DEXWD2=	4			;  . . 2
   270		000006			DEXWD1=	6			;  . . 1
   271		000010			TENAD1=	10			; KL-10 memory address 1
   272		000012			TENAD2=	12			;  . . 2
   273		000014			TO10BC=	14			; To -10 byte (word) count
   274		000016			TO11BC=	16			; To -11 byte (word) count
   275		100000				TO11IB=	BIT15		; Interrupt both -10 and -11 when done
   276		020000				TO11BM=	BIT13		; To -11 byte mode
   277		007777				TO11CM=	7777		; Byte (word) count
   278		000020			TO10AD=	20			; To -10 address
   279		000022			TO11AD=	22			; To -11 address
   280		000024			TO10DT=	24			; To -10 data word
   281		000026			TO11DT=	26			; To -11 data word
   282
   283		000030			DIAG1=	30			; Diagnostic/control register 1
   284		000032			DIAG2=	32			; Diagnostic register 2
   285		000100				DRESET=	BIT6		; (W) DTE20 reset
   286		000034			CSTAT=	34			; Control/status register
   287		100000				TO10DN=	BIT15		; (R) to -10 transfer done
   288		040000				DON10C=	BIT14		; (W) clear to -10 done
   289		020000				TO10ER=	BIT13		; (R) to -10 transfer error
   290		010000				ERR10C=	BIT12		; (W) clear to -10 transfer error
   291		004000				TO11DB=	BIT11		; (R/W) to -11 doorbell
   292		002000				INT11C=	BIT10		; (W) clear to -11 doorbell
   293		000400				TO10DB=	BIT8		; (R/W) to -10 doorbell
   294		000200				TO11DN=	BIT7		; (R) to -11 transfer done
   295		000100				DON11C=	BIT6		; (W) clear to -11 done
   296		000002				TO11ER=	BIT1		; (R) to -11 transfer error
   297		000001				ERR11C=	BIT0		; (W) clear to -11 transfer error
   298		000036			DIAG3=	36			; diagnostic/control register 3
   299		000001				TO10BM=	BIT0		; (W) to -10 byte mode
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 10
DTEDMP.MAC    30-DEC-82 15:37		FIND TOP OF PHYSICAL MEMORY

   301						.SBTTL	Find top of physical memory
   302					;
   303					; The BM873-YF, -YG, -YH, -YJ ROM loads this 256. word (512. byte) program
   304					; starting at location 0, then transfers to location 0.
   305					;
   306					; The following registers are left by the ROM:
   307					;
   308					;	R1	Address of DTE20 status word "CSTAT"
   309					;
   310					;
   311					;
   312					; Usages that stay constant throughout the program:
   313					;
   314					; Registers:
   315					;
   316					;	R1	Virtual address of DTE20 "CSTAT" register
   317					;	SP	Stack pointer
   318					;
   319					; Page registers:
   320					;
   321					;	0	Maps to physical 0 (and this code)
   322					;	1	Maps to source data (for searching or copying)
   323					;	7	Maps to external page
   324					;
   325
   326
   327	000000'				DTEDMP:
   328	000000'					DEBUG HALT,<Start of bootstrap>,NOP ; (0) Mark start of bootstrap
   329	000002'	000402				BR	10$			    ; (2) Skip over timeout code
   330	000004'	000166'	000340			.WORD	30$,PR7			    ; (4,6) Where to go on NXM
   331
   332					;
   333					; Wait for to -11 DOORBELL if not cleared by ROM
   334					;
   335
   336	000010'	032711	000200		10$:	BIT	#TO11DN,(R1)	; To -11 done?
   337	000014'	001403				BEQ	15$		; No.. doorbell has been cleared
   338	000016'	032711	004000			BIT	#TO11DB,(R1)	; Doorbell ringing?
   339	000022'	001772				BEQ	10$		; No.. wait
   340
   341					;
   342					; Find top block of physical memory (top down search)
   343					;
   344
   345	000024'	105067	000654		15$:	CLRB	MEMMGR		; Indicate unmapped system is running
   346	000030'	012706	000700'			MOV	#STACK-4,SP	; Set stack
   347	000034'	012705	160000			MOV	#160000,R5	; Start at external page if no KT11
   348
   349	000040'	012702	077406			MOV	#77406,R2	; Set max size for an APR
   350	000044'	010237	172300			MOV	R2,@#KISDR0	; Set map for this code (No KT11.. trap to 30$)
   351	000050'	010237	172302			MOV	R2,@#KISDR1	; Set map for finding memory
   352	000054'	010237	172316			MOV	R2,@#KISDR7	; Set map external page
   353	000060'	005037	172340			CLR	@#KISAR0	; Set map segment 0 to this code
   354	000064'	012737	007600	172342		MOV	#7600,@#KISAR1	; Start memory search at external page
   355	000072'	012737	007600	172356		MOV	#7600,@#KISAR7	; Also map external page
   356	000100'	012737	000001	177572		MOV	#1,@#SR0	; Enable segmentation (Turn KT11 on)
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 10-1
DTEDMP.MAC    30-DEC-82 15:37		FIND TOP OF PHYSICAL MEMORY

   357	000106'	012705	020000			MOV	#20000,R5	; Point to where mapping register 1 maps
   358	000112'	012737	000120'	000004		MOV	#20$,@#4	; Set NXM timeout on KT11 to step down
   359									;  through memory.
   360
   361	000120'	022626			20$:	CMP	(SP)+,(SP)+	; Remove trap stuff put onto stack
   362	000122'	005337	172342			DEC	@#KISAR1	; Count down
   363	000126'	005715				TST	(R5)		; Trap back to 20$ if non-existant memory
   364
   365					;
   366					; Found top of physical memory.  Compute physical address.
   367					;
   368
   369	000130'	013705	172342			MOV	@#KISAR1,R5	; Get physical address (right-shifted 6 bits)
   370	000134'	005004				CLR	R4		; Start with no extension address
   371	000136'	073427	000006			ASHC	#6,R4		; Shift extension bits into R4
   372									; Leave low order bits (0-15) in R5
   373	000142'	062705	000100			ADD	#100,R5		; Increment size by one 32 word block
   374	000146'	005504				ADC	R4		; If carry .. increment bits 16-17
   375
   376	000150'	010467	000542			MOV	R4,MMRADR+2	; Save extension bits
   377	000154'	010567	000534			MOV	R5,MMRADR	; Save physical memory count (0-15)
   378	000160'	005267	000520			INC	MEMMGR		; Indicate mapped virtual system is running
   379	000164'	000410				BR	40$		; Go save max address and start processing
   380
   381					;
   382					; Here if we must find top of memory without memory management
   383					;
   384
   385	000166'	022626			30$:	CMP	(SP)+,(SP)+	; Remove trap stuff put onto stack
   386	000170'	005305				DEC	R5		; Down by another word
   387	000172'	005715				TST	(R5)		; Trap to 30$ if still NXM
   388
   389	000174'	005067	000516			CLR	MMRADR+2	; Indicate no extension bits
   390	000200'	005205				INC	R5		; Increment to make if 1 relative (not 0)
   391	000202'	010567	000506			MOV	R5,MMRADR	; Save memory word count
   392
   393					;
   394					; Set NXM trap to restart MOP processor on trap.
   395					;
   396
   397	000206'	012737	000214'	000004	40$:	MOV	#MOP,@#4	; Set trap to start of processor
   398
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 11
DTEDMP.MAC    30-DEC-82 15:37		DUMP PROCESSOR

   400						.SBTTL	Dump processor
   401
   402					;
   403					;  Send a "MOP MODE RUNNING" message
   404					;
   405
   406	000214'				MOP:	DEBUG	HALT,<Start of MOP processor>
   407
   408	000214'	012706	000704'			MOV	#STACK,SP	; Reset stack pointer
   409
   410	000220'	012700	000707'			MOV	#MMR,R0		; Point to the "MOP MODE RUNNING" message
   411	000224'					CALL	DTESNA		; Send it
   412
   413					;
   414					;  Read a MOP dump request
   415					;
   416
   417	000230'	032711	004000		MOPWAT:	BIT	#TO11DB,(R1)	; Doorbell ringing?
   418	000234'	001775				BEQ	MOPWAT		; No.. wait until -10 rings us
   419
   420	000236'	012700	000723'			MOV	#RCVMSG,R0	; Get address of byte count word
   421	000242'	012702	000011			MOV	#9.,R2		; Set byte count for this read
   422	000246'	010203				MOV	R2,R3		;  and total (global) byte count
   423	000250'					CALL	DTERCA		; Receive dump request message
   424
   425					;
   426					; Verify count and MOP function
   427					;
   428
   429	000254'	122767	000007	000441		CMPB	#7,BYTCNT		; 7-byte message?
   430	000262'					ERR	NE,<Invalid message length>
   431	000264'	122767	000004	000433		CMPB	#M.PRMD,MOPFNC		; Program dump?
   432	000272'					ERR	NE,<Invalid MOP function code received>
   433
   434
   435	000274'	022767	004000	000430		CMP	#M$$MSG,MOPCNT		; Check for too big of a request
   436	000302'	002003				BGE	5$			;  No .. let it be
   437	000304'	012767	004000	000420		MOV	#M$$MSG,MOPCNT		; Override count to maximum allowed
   438
   439	000312'	026767	000412	000376	5$:	CMP	MOPADR+2,MMRADR+2	; Check if memory address exceeded
   440	000320'	003005				BGT	10$			;  Error if too big
   441	000322'	002405				BLT	20$			;  If less .. then ok
   442	000324'	026767	000376	000362		CMP	MOPADR,MMRADR		; Extension is equal .. check 0-15
   443	000332'	103401				BLO	20$			;  If less .. then ok
   444	000334'				10$:	ERR	R,<Starting dump address is too big>
   445
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 12
DTEDMP.MAC    30-DEC-82 15:37		DUMP PROCESSOR

   447
   448					;
   449					;  Write out the dump record for the request
   450					;
   451
   452	000336'	016700	000370		20$:	MOV	MOPCNT,R0		; Get byte transfer count
   453	000342'	062700	000005			ADD	#5,R0			; Add in header length
   454	000346'	110067	000363			MOVB	R0,COUNT		; Set count in DTE message
   455	000352'	000300				SWAB	R0
   456	000354'	110067	000356			MOVB	R0,COUNT+1
   457
   458
   459	000360'	016703	000342			MOV	MOPADR,R3		; Get low order (0-15) address bits
   460	000364'	105767	000314			TSTB	MEMMGR			; Check for mapped memory system
   461	000370'	001420				BEQ	30$			;  No.. use 16 bit address only
   462
   463	000372'	016702	000332			MOV	MOPADR+2,R2		; Get extension bits
   464	000376'	010367	000336			MOV	R3,MEMADR		; Set address in dump data messge
   465	000402'	010267	000334			MOV	R2,MEMADR+2
   466
   467	000406'	073227	177772			ASHC	#-6,R2			; Set mapping register to point
   468	000412'	010337	172342			MOV	R3,@#KISAR1		;  the data to be dumped
   469
   470	000416'	016703	000304			MOV	MOPADR,R3		; Calculate
   471	000422'	042703	177700			BIC	#^C<77>,R3		;   the data's
   472	000426'	062703	020000			ADD	#20000,R3		;   virtual address
   473
   474					;
   475					; Move the data into low core buffer
   476					;
   477
   478	000432'	012702	000744'		30$:	MOV	#DATA,R2	; Address the transmission buffer
   479	000436'	016700	000270			MOV	MOPCNT,R0	; Get byte count
   480
   481	000442'	112322			40$:	MOVB	(R3)+,(R2)+	; Move a byte
   482	000444'	077002				SOB	R0,40$		;   and go back for more
   483
   484					;
   485					; Send the block from the buffer in low core
   486					;
   487
   488	000446'	012700	000735'			MOV	#COUNT,R0	; Address count field
   489	000452'					CALL	DTESNA		;   and send the block out
   490
   491	000456'	000167	177546			JMP	MOPWAT		; Go cycle again
   492
   493					;
   494					; Here on error during dump processing.
   495					; Ignore dump request.
   496					;
   497
   498	000462'	000654			MOPERR:	BR	MOP		; Send MOP MODE RUNNING message
   499
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 13
DTEDMP.MAC    30-DEC-82 15:37		DTE SUBROUTINES

   501						.SBTTL	DTE subroutines
   502					;
   503					; Routine - DTESND
   504					;
   505					; Function - To send a byte stream message across the DTE20 from
   506					;	     mapped VIRTUAL address space.
   507					;
   508					;	     R0 points in virtual space to the data buffer. R4 and
   509					;	     R5 contain the physical offset for R0's virtual space.
   510					;
   511					; Parameters -
   512					;
   513					;	R0	Virtual address of data to send
   514					;	R1	Virtual address of DTE20 "CSTAT" register
   515					;	R4	Physical base addr of data buffer (Bits 17-16, in bits 15-14)
   516					;	R5	Physical base addr of data buffer (Bits 15-0)
   517					;
   518
   519	000464'	010461	177744		DTESND:	MOV	R4,DLYCNT-CSTAT(R1) ; Set memory extension bits
   520	000470'	060500				ADD	R5,R0		; Convert to physical
   521	000472'	000403				BR	DTESN1		; Go send message
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 14
DTEDMP.MAC    30-DEC-82 15:37		DTE SUBROUTINES

   523
   524					;
   525					; Routine - DTESNA
   526					;
   527					; Function - To send a byte stream message across the DTE20 from
   528					;	     unmapped PHYSICAL address space.
   529					;
   530					; Parameters -
   531					;
   532					;	R0	Low-order (bits 0-15) physical address to send data from
   533					;	R1	Virtual address of DTE20 "CSTAT" register
   534					;
   535
   536	000474'	042761	140000	177744	DTESNA:	BIC	#140000,DLYCNT-CSTAT(R1) ; Clear memory extension bits
   537
   538
   539	000502'	010061	177764		DTESN1:	MOV	R0,TO10AD-CSTAT(R1) 	; Set address of MOP message
   540	000506'	012711	050000			MOV	#DON10C!ERR10C,(R1) 	; Reset TO10DN and TO10ER
   541	000512'	012761	000001	000002		MOV	#TO10BM,DIAG3-CSTAT(R1) ; Set to -10 byte mode
   542	000520'	012711	002400			MOV	#TO10DB!INT11C,(R1)	; Ring -10's doorbell with this message
   543
   544					;
   545					; Wait for to -10 transfer
   546					;
   547
   548	000524'	032711	120000		10$:	BIT	#TO10DN!TO10ER,(R1)	; Done or error?
   549	000530'	001775				BEQ	10$			; Not done or error.. wait
   550	000532'					ERR	PL,<To -10 transfer error>
   551
   552	000534'					RETURN				; Return from DTESND/DTESNA
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 15
DTEDMP.MAC    30-DEC-82 15:37		DTE SUBROUTINES

   554
   555					;
   556					; Routine - DTERCV
   557					;
   558					; Function - To receive a byte stream message across the DTE20 into
   559					;	     mapped VIRTUAL address space.
   560					;
   561					;	     R0 points in virtual space to the data buffer. R4 and
   562					;	     R5 contain the physical offset for R0's virtual space.
   563					;
   564					; Parameters -
   565					;
   566					;	R0	Virtual address of data buffer
   567					;	R1	Virtual address of DTE20 "CSTAT" register
   568					;	R2	Number of bytes of message to be received
   569					;	R3	Number of bytes total in the message (global count)
   570					;	R4	Physical base addr of data buffer (Bits 17-16, in bits 15-14)
   571					;	R5	Physical base addr of data buffer (Bits 15-0)
   572					;
   573
   574	000536'	010461	177744		DTERCV:	MOV	R4,DLYCNT-CSTAT(R1)	; Set extended memory bits
   575	000542'	060500				ADD	R5,R0			; Make physical address
   576	000544'	000403				BR	DTERC1
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 16
DTEDMP.MAC    30-DEC-82 15:37		DTE SUBROUTINES

   578
   579					;
   580					; Routine - DTERCA
   581					;
   582					; Function - To receive a byte stream message across the DTE20 into
   583					;	     unmapped PHYSICAL address space.
   584					;
   585					; Parameters -
   586					;
   587					;	R0	Low-order (bits 0-15) physical address of data buffer
   588					;	R1	Virtual address of DTE20 "CSTAT" register
   589					;	R2	Number of bytes of message to be received
   590					;	R3	Number of bytes total in the message (global count)
   591					;
   592
   593	000546'	042761	140000	177744	DTERCA:	BIC	#140000,DLYCNT-CSTAT(R1) ; Clear memory extension bits
   594
   595	000554'	010061	177766		DTERC1:	MOV	R0,TO11AD-CSTAT(R1)	; Set address
   596	000560'	060200				ADD	R2,R0			; Update address
   597	000562'	103010				BCC	10$			; No boundary..
   598	000564'	001407				BEQ	10$			; Exactly a boundary.. ok also
   599
   600					;
   601					; The requested transfer crosses a 32K boundary.
   602					; We must do the transfer in two pieces.
   603					;
   604
   605	000566'	010046				MOV	R0,-(SP)		; Save residual count above boundary
   606	000570'	160002				SUB	R0,R2			; Change count to just below boundary
   607	000572'	005000				CLR	R0			; Set final address = 0
   608	000574'					CALL	10$			; Do the first part of the transfer
   609	000600'	012602				MOV	(SP)+,R2		; Get residual count
   610	000602'	010200				MOV	R2,R0			; That's final address, also
   611
   612	000604'	012711	000101		10$:	MOV	#DON11C!ERR11C,(R1)	; Reset TO11DN and TO11ER
   613	000610'	160203				SUB	R2,R3			; Last transfer?
   614	000612'	001403				BEQ	20$			; Yes.. Set TO11IB to indicate "DONE"
   615										;  to both processors
   616	000614'					ERR	LT,<To -11 message to short>
   617	000616'	052702	100000			BIS	#TO11IB,R2		; Clear TO11IB (when we negate R2)
   618
   619	000622'	005402			20$:	NEG	R2			; Negate byte count
   620	000624'	042702	050000			BIC	#^C<TO11IB!TO11BM!TO11CM>,R2 ; Clear unused bits
   621	000630'					ERR	EQ,<To -11 zero byte transfer>
   622
   623	000632'	010261	177762			MOV	R2,TO11BC-CSTAT(R1)	; Start transfer
   624
   625					;
   626					; Wait for to -11 transfer
   627					;
   628
   629	000636'	132711	000202		30$:	BITB	#TO11DN!TO11ER,(R1)	; Done or error?
   630	000642'	001775				BEQ	30$			; Not done or error.. wait
   631	000644'					ERR	PL,<To -11 transfer error>
   632
   633	000646'	005700				TST	R0			; This transfer cross a 32K boundary?
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 16-1
DTEDMP.MAC    30-DEC-82 15:37		DTE SUBROUTINES

   634	000650'	001003				BNE	40$			; No.. all ok
   635	000652'	062761	040000	177744		ADD	#BUSA16,DLYCNT-CSTAT(R1) ; Yes.. bump address bits
   636
   637	000660'	010302			40$:	MOV	R3,R2			; Get remaining count, and tst it
   638	000662'					RETURN				; Return from DTERCV/DTERCA
   639
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 17
DTEDMP.MAC    30-DEC-82 15:37		DATA AREA

   641						.SBTTL	Data area
   642					;
   643					; Stack
   644					;
   645						.EVEN
   646	000664'	000010				.BLKW	8.
   647	000704'				STACK:
   648
   649					;
   650					; Random data
   651					;
   652
   653	000704'	000001			MEMMGR:	.BLKB	1		; Memory manager
   654									;   0 - No KT11
   655									;   1 - KT11 exists and is enabled
   656
   657					;
   658					;  "MOP MODE RUNNING" message
   659					;
   660
   661		000706'				.EVEN
   662	000706'	000001			MMRPAD:	.BLKB	1		; Pad byte
   663	000707'				MMR:				; Start of message
   664	000707'	   010	   000			.BYTE	8.,0		; Message length
   665	000711'	   014				.BYTE	M.PMMR		; (1) : B  "MOP MODE RUNNING"
   666	000712'	   024				.BYTE	20.		; (1) : B  DTE device type
   667	000713'	   001				.BYTE	1		; (1) : B  MOP version #
   668	000714'	000000	000000		MMRADR:	.WORD	0,0		; (4) : B  Memory size (bytes)
   669	000720'	   002				.BYTE	2		; (1) : B  MOP features supported; dump only
   670
   671					;
   672					; Received MOP message
   673					;
   674		000722'				.EVEN
   675	000722'	000001			RCVMG0:	.BLKB	1		; Pad byte/start of second message
   676	000723'				RCVMSG:				; Start of first message
   677	000723'	000002			BYTCNT:	.BLKB	2		; Byte count
   678	000725'	000001			MOPFNC:	.BLKB	1		; (1) : B  MOP function
   679	000726'	000004			MOPADR:	.BLKB	4		; (4) : B  Address of data to be dumped
   680	000732'	000002			MOPCNT:	.BLKB	2		; (2) : B  Number of bytes to be dumped
   681					 
   682					;
   683					; Count field and start of output buffer in low core
   684					;
   685
   686						.EVEN
   687	000734'	000001			SNDPAD:	.BLKB	1		; Pad byte/start of dump data message
   688	000735'	000002			COUNT:	.BLKB	2		; DTE transfer byte count
   689	000737'	   016			CODE:	.BYTE	14.		; (1) : B  "DUMP IMAGE" MOP code
   690	000740'	000004			MEMADR:	.BLKB	4		; (4) : B  Address field
   691		000744'			DATA	= .			; Start of buffer
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 18
DTEDMP.MAC    30-DEC-82 15:37		END

   693						.SBTTL	END
   694
   695		   001			.IF NDF PASS2
   696		   002			  .IF G <.-M$$XSZ>
   697					    .ERROR <.-M$$XSZ> ; Too much stuff
   698					  .IFF
   699					    .PRINT <M$$XSZ-.> ; Free space left
   700		   001			  .ENDC
   701		   000			.ENDC
   702
   703	000744'				PASS2:
   704
   705		000000'				.END	DTEDMP
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 19
DTEDMP.MAC    30-DEC-82 15:37		CROSS REFERENCE TABLE -- USER SYMBOLS

BIT0  = 000001        	  192#	  297	  299
BIT1  = 000002        	  193#	  296
BIT10 = 002000        	  202#	  292
BIT11 = 004000        	  203#	  291
BIT12 = 010000        	  204#	  290
BIT13 = 020000        	  205#	  276	  289
BIT14 = 040000        	  206#	  266	  288
BIT15 = 100000        	  207#	  265	  275	  287
BIT2  = 000004        	  194#
BIT3  = 000010        	  195#
BIT4  = 000020        	  196#
BIT5  = 000040        	  197#	  234
BIT6  = 000100        	  198#	  285	  295
BIT7  = 000200        	  199#	  294
BIT8  = 000400        	  200#	  293
BIT9  = 001000        	  201#
BUSA16= 040000        	  266#	  635
BUSA17= 100000        	  265#
BYTCNT  000723R       	  429	  677#
CODE    000737R       	  689#
COUNT   000735R       	  454*	  456*	  488	  688#
CSTAT = 000034        	  286#	  519*	  536*	  539*	  541*	  574*	  593*	  595*	  623*	  635*
DATA  = 000744R       	  478	  691#
DEXWD1= 000006        	  270#
DEXWD2= 000004        	  269#
DEXWD3= 000002        	  268#
DIAG1 = 000030        	  283#
DIAG2 = 000032        	  284#
DIAG3 = 000036        	  298#	  541*
DLYCNT= 000000        	  264#	  519*	  536*	  574*	  593*	  635*
DLYMSK= 037777        	  267#
DON10C= 040000        	  288#	  540
DON11C= 000100        	  295#	  612
DRESET= 000100        	  285#
DTEDMP  000000R       	  327#	  705
DTERCA  000546R       	  423	  593#
DTERCV  000536R       	  574#
DTERC1  000554R       	  576	  595#
DTESNA  000474R       	  411	  489	  536#
DTESND  000464R       	  519#
DTESN1  000502R       	  521	  539#
D$$BUG= ****** U      	  328	  406	  430	  432	  444	  550	  616	  621	  631
ERR10C= 010000        	  290#	  540
ERR11C= 000001        	  297#	  612
INT11C= 002000        	  292#	  542
KISAR0= 172340        	  251#	  353*
KISAR1= 172342        	  252#	  354*	  362*	  369	  468*
KISAR2= 172344        	  253#
KISAR3= 172346        	  254#
KISAR4= 172350        	  255#
KISAR5= 172352        	  256#
KISAR6= 172354        	  257#
KISAR7= 172356        	  258#	  355*
KISDR0= 172300        	  242#	  350*
KISDR1= 172302        	  243#	  351*
KISDR2= 172304        	  244#
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 19-1
DTEDMP.MAC    30-DEC-82 15:37		CROSS REFERENCE TABLE -- USER SYMBOLS

KISDR3= 172306        	  245#
KISDR4= 172310        	  246#
KISDR5= 172312        	  247#
KISDR6= 172314        	  248#
KISDR7= 172316        	  249#	  352*
MEMADR  000740R       	  464*	  465*	  690#
MEMMGR  000704R       	  345*	  378*	  460	  653#
MMR     000707R       	  410	  663#
MMRADR  000714R       	  376*	  377*	  389*	  391*	  439	  442	  668#
MMRPAD  000706R       	  662#
MOP     000214R       	  397	  406#	  498
MOPADR  000726R       	  439	  442	  459	  463	  470	  679#
MOPCNT  000732R       	  435	  437*	  452	  479	  680#
MOPERR  000462R       	  430	  432	  444	  498#	  550	  616	  621	  631
MOPFNC  000725R       	  431	  678#
MOPWAT  000230R       	  417#	  418	  491
M$$MSG= 004000        	   78#	  435	  437
M$$XSZ= 001000        	   77#
M.PDAP= 000020        	  220#
M.PEAM= 000022        	  221#
M.PEMM= 000006        	  215#
M.PLBT= 000030        	  223#
M.PLDP= 000024        	  222#
M.PMDP= 000016        	  219#
M.PMLD= 000002        	  213#
M.PMLT= 000000        	  212#
M.PMMR= 000014        	  218#	  665
M.PRMD= 000004        	  214#	  431
M.PRML= 000012        	  217#
M.PRPR= 000010        	  216#
PASS2   000744R       	  695	  703#
PR7   = 000340        	  234#	  330
PS    = 177776        	  233#
RCVMG0  000722R       	  675#
RCVMSG  000723R       	  420	  676#
SNDPAD  000734R       	  687#
SR0   = 177572        	  240#	  356*
STACK   000704R       	  346	  408	  647#
SWR   = 177570        	  232#
TENAD1= 000010        	  271#
TENAD2= 000012        	  272#
TO10AD= 000020        	  278#	  539*
TO10BC= 000014        	  273#
TO10BM= 000001        	  299#	  541
TO10DB= 000400        	  293#	  542
TO10DN= 100000        	  287#	  548
TO10DT= 000024        	  280#
TO10ER= 020000        	  289#	  548
TO11AD= 000022        	  279#	  595*
TO11BC= 000016        	  274#	  623*
TO11BM= 020000        	  276#	  620
TO11CM= 007777        	  277#	  620
TO11DB= 004000        	  291#	  338	  417
TO11DN= 000200        	  294#	  336	  629
TO11DT= 000026        	  281#
TO11ER= 000002        	  296#	  629
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 19-2
DTEDMP.MAC    30-DEC-82 15:37		CROSS REFERENCE TABLE -- USER SYMBOLS

TO11IB= 100000        	  275#	  617	  620
.     = 000744R       	  646#	  653#	  661#	  662#	  674#	  675#	  677#	  678#	  679#	  680#	  687#	  688#	  690#
			  691
DTEDMP -- DTE20 SECONDARY DUMP BOOTSRAP	DNMAC X24.07-563  25-JAN-83  09:51  PAGE 20
DTEDMP.MAC    30-DEC-82 15:37		CROSS REFERENCE TABLE -- MACRO NAMES

CALL	   95#	  411	  423	  489	  608
DEBUG	  132#	  328	  406	  430	  432	  444	  550	  616	  621	  631
ERR	  163#	  430	  432	  444	  550	  616	  621	  631
RETURN	  110#	  552	  638


. ABS.  000000     000	   CON   RW    ABS   LCL   I  
        000744     001	   OVR   RW    REL   GBL   D  


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  0

 DTEDMP,DTEDMP/CRF=DTEDMP
 RUN-TIME: 1 1 .2 SECONDS
 RUN-TIME RATIO: 19/2=6.8
 CORE USED:  6K  (11 PAGES)