Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/loader/dmcdrv.list
There are no other files named dmcdrv.list in the archive.
DMC BOOT DRIVER	DNMAC X24.07-563  06-DEC-79  10:37  PAGE 1
DMCDRV.MAC    14-FEB-79 09:38

     1						.TITLE	DMC BOOT DRIVER
     2						.IDENT	/V01.01/
     3					 
     4					;
     5					; COPYRIGHT (C) 1978 BY
     6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
     7					;
     8					;
     9					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
    10					; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
    11					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
    12					; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
    13					; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
    14					; TRANSFERRED.
    15					;
    16					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
    17					; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
    18					; CORPORATION.
    19					;
    20					; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
    21					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
    22					;
    23					;
    24					; MODULE DESCRIPTION:
    25					;
    26					;	DMC DRIVER FOR BOOT (AND PANIC)
    27					;
    28					;
    29					;
    30					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
    31					;
    32					; IDENT HISTORY:
    33					;
    34					; 1.00	10-FEB-78
    35					;	VERSION 2.0 RELEASE
    36					;  .01	25-JAN-79  L. WEBBER	LW0001
    37					;		WHEN CALCULATING PHYSICAL ADDRESSES, DON'T ASSUME
    38					;		THEY ARE IN PAGE 6
    39					;
    40					;
    41					;
    42					; DEFINE THE MOP DEVICE CODE
    43					;
    44		000014				DEVTYP==12.
    45
    46					;
    47					; LOCAL SYMBOL DEFINITIONS
    48					;
    49		172340			KISAR0=172340                                                                   ;LW0001
    50		173356			REBOOT==173356                                                                  ;**-1
    51	000000'	000000			TMR::	.WORD	0			;TIMER INDICATOR FOR PANIC
    52
    53					;+
    54					; **-INIDRV-DEVICE INITIALIZATION
    55					;
    56					; INPUTS:
DMC BOOT DRIVER	DNMAC X24.07-563  06-DEC-79  10:37  PAGE 1-1
DMCDRV.MAC    14-FEB-79 09:38

    57					;
    58					;	R1 = CSR ADDRESS OF DEVICE
    59					;
    60					;	0(SP) = RETURN ADDRESS
    61					;	2(SP) = BUFFER ADDRESS
    62					;	4(SP) = HIGHEST ADDRESS BEFORE BUFFERS AND DEVICE STORAGE
    63					;
    64					; OUTPUTS:
    65					;
    66					;	THE DMC USES THE MEMORY PRECEEDING THE DATA BUFFER FOR ITS
    67					;	BASE TABLE.  THE DEVICE INITIALIZATION ADJUSTS THE ENTRY ON
    68					;	THE STACK TO REFLECT THIS.
    69					;-
    70					;
    71	000002'	016604	000002		INIDRV::MOV	2(SP),R4	;VIRTUAL BASE ADDR
    72	000006'	162704	000200			SUB	#128.,R4	;LEAVE ENOUGH ROOM FOR THE BASE TABLE
    73	000012'	010466	000004			MOV	R4,4(SP)	;ADJUST THE HIGHEST LOAD ADDRESS CELL
    74	000016'	010467	000342			MOV	R4,BASE		;SAVE FOR INTERNAL DEVICE INITIALIZATIONS
    75	000022'	005067	177752			CLR	TMR
    76
    77	000026'	052711	040000		INIT:	BIS	#40000,(R1)	;MASTER CLEAR DMC
    78	000032'	012711	100000			MOV	#100000,(R1)	;TURN DMC ON
    79	000036'	016704	000322			MOV	BASE,R4		;GET BASE ADDRESS
    80	000042'	004767	000234			JSR	PC,GTMADR	;GET REAL ADDR
    81	000046'	112711	000043			MOVB	#43,(R1)	;RQI + BASE
    82	000052'	004767	000012			JSR	PC,DMCIN	;GIVE TO DMC
    83	000056'	012703	002400			MOV	#2400,R3	;SET MOP & HALF DUPLEX
    84	000062'	005004				CLR	R4		;FILLER REG
    85	000064'	112711	000041			MOVB	#41,(R1)	;RQI + CNTLI
    86					;
    87					;	SET PARAMETERS TO DMC
    88					;	R4=FIRST PARM
    89					;	R3=SECOND PARM
    90					;
    91	000070'	105711			DMCIN:	TSTB	(R1)		;RDYI SET ?
    92	000072'	100406				BMI	INOK		;YES
    93	000074'	105761	000002			TSTB	2(R1)		;RDYO SET ?
    94	000100'	100373				BPL	DMCIN		;NO
    95	000102'	004767	000124			JSR	PC,DMCOUT	;CHECK COMPLETION
    96	000106'	000770				BR	DMCIN		;AGAIN
    97	000110'	010461	000004		INOK:	MOV	R4,4(R1)	;TO FIRST HALF DMC PORT
    98	000114'	010361	000006			MOV	R3,6(R1)	;TO SECOND HALF DMC PORT
    99	000120'	042711	000040			BIC	#40,(R1)	;CLEAR RQI-GIVE TO DMC
   100	000124'	105711			1$:	TSTB	(R1)		;RDYI CLEAR ?
   101	000126'	100776				BMI	1$		;NOT YET
   102	000130'	000244				CLZ			;FORCE AN ERROR RETURN CONDITION
   103	000132'	000207			5$:	RETURN			;RETURN TO CALLER
   104	000134'	000005			5
   105					;+
   106					; **-RCVDRV-RECEIVE A BLOCK FROM THE DEVICE
   107					; **-SNDDRV-TRANSMIT A BLOCK ON THE DEVICE
   108					;
   109					; INPUTS:
   110					;
   111					;	R1 = CSR ADDRESS
   112					;	R2 = MAXIMUM BLOCK LENGTH TO RECEIVE, OR
DMC BOOT DRIVER	DNMAC X24.07-563  06-DEC-79  10:37  PAGE 1-2
DMCDRV.MAC    14-FEB-79 09:38

   113					;	     BLOCK LENGTH TO TRANSMIT
   114					;
   115					;	0(SP) = RETURN ADDRESS
   116					;	2(SP) = BUFFER ADDRESS
   117					;
   118					; OUTPUTS:
   119					;
   120					;	Z-BIT SET:
   121					;	R2 = ACTUAL LENGTH OF BLOCK RECEIVED
   122					;	(SP) = BUFFER ADDRESS
   123					;
   124					;	Z-BIT CLEAR:
   125					;	AN ERROR WAS DETECTED ON THE DEVICE
   126					;	THE STACK IS AS DESRIBED ABOVE
   127					;-
   128					;
   129						.ENABL	LSB
   130
   131	000136'	112711	000044		RCVDRV::MOVB	#44,(R1)	;RQI + BA/CC + RCV
   132	000142'	000402				BR	10$		;
   133
   134	000144'	112711	000040		SNDDRV::MOVB	#40,(R1)	;RQI + BA/CC + XMT
   135
   136	000150'	016604	000002		10$:	MOV	2(SP),R4	;GET ADDRESS OF THE BUFFER
   137	000154'	004767	000122			JSR	PC,GTMADR	;GET REAL ADDR OF BUFFER
   138	000160'	050203				BIS	R2,R3		;SET BUFFER SIZE
   139	000162'	004767	177702			JSR	PC,DMCIN	;GIVE TO DMC
   140	000166'	005005				CLR	R5
   141	000170'	010346				MOV	R3,-(SP)
   142	000172'	012703	000024			MOV	#20.,R3		;IN CASE WE NEED LOOP
   143	000176'	105761	000002		20$:	TSTB	2(R1)		;TEST RDYO SET
   144	000202'	100410				BMI	21$
   145	000204'	005767	177570			TST	TMR		;NOT YET, NEED TIMER?
   146	000210'	001772				BEQ	20$		;NO
   147	000212'	005305				DEC	R5		;YES
   148	000214'	001370				BNE	20$
   149	000216'	005303				DEC	R3
   150	000220'	001366				BNE	20$		;
   151	000222'	000402				BR	DMCOT1
   152
   153					;
   154					;	CHECK COMPLETION FROM DMC-11
   155					;
   156					;
   157	000224'	005067	177550		21$:	CLR	TMR
   158	000230'	012603			DMCOT1:	MOV	(SP)+,R3
   159	000232'	016102	000006		DMCOUT:	MOV	6(R1),R2	;GET LENGTH OR ERROR BITS
   160	000236'	042702	140000			BIC	#140000,R2	;CLEAR MEMORY ENTENSION BITS
   161	000242'	005767	177532			TST	TMR		;TIMER ERROR?
   162	000246'	001403				BEQ	22$		;NO
   163	000250'	005067	177524			CLR	TMR		;YES, CLEAR IND.
   164	000254'	000664				BR	INIT
   165	000256'	132761	000003	000002	22$:	BITB	#3,2(R1)	;BA/CC OR CTLO
   166	000264'	001403				BEQ	30$		;IF EQ, BA/CC COMPLETION
   167	000266'	032702	001730			BIT	#1730,R2	;IS IT FATAL ERROR ?
   168	000272'	001255				BNE	INIT		;IF NE, CLEAR AND REINITIALIZE THE DEVICE
DMC BOOT DRIVER	DNMAC X24.07-563  06-DEC-79  10:37  PAGE 1-3
DMCDRV.MAC    14-FEB-79 09:38

   169
   170	000274'	105061	000002		30$:	CLRB	2(R1)		;CLEAR RDYO (SETS Z-BIT)
   171	000300'	000207				RETURN			;RETURN
   172
   173						.DSABL	LSB
   174
   175					;
   176					;	GET REAL ADDR FROM VIRTUAL ADDR
   177					;	VIRTUAL ADDR IN R4
   178					;	REAL ADDR IN R4(LOW 16 BITS)
   179					;	REAL ADDR IN R3(HIGH 2 BITS) BITS 14 AND 15
   180					;	IF STACK ADDR JUST BELOW 4K BOUNDARY THEN REAL MACHINE
   181					;	IF STACK ADDR JUST ABOVE 4K BOUNDARY THEN VIRTUAL MACHINE
   182					;	THIS WORKS FOR PRESENT BOOT ONLY ***BEWARE***
   183					;
   184					;
   185	000302'	010403			GTMADR:	MOV	R4,R3		;CALCULATE THE                                  ;LW0001
   186	000304'	072327	177764			ASH	#-12.,R3	;  PAGE NUMBER                                  ;LW0001
   187	000310'	042703	177761			BIC	#^C16,R3	;  (TIMES 2 FOR INDEXING)                       ;LW0001
   188	000314'	016303	172340			MOV	KISAR0(R3),R3	;PICK UP THE PROPER BIAS                        ;LW0001
   189	000320'	006304				ASL	R4		;SEPARATE BIAS FROM DISP                        ;**-3
   190	000322'	006304				ASL	R4		;
   191	000324'	000304				SWAB	R4		;BIAS TO LOW BYTE
   192	000326'	150403				BISB	R4,R3		;COMPUTE PHYS BLOCK ADDR
   193	000330'	006003				ROR	R3		;2 BITS OF PHYS ADDR...
   194	000332'	006004				ROR	R4		;TO DISP BYTE
   195	000334'	006203				ASR	R3		;
   196	000336'	006004				ROR	R4		;
   197	000340'	105004				CLRB	R4		;GET RID OF GARBAGE
   198	000342'	150304				BISB	R3,R4		;PHYS BLOCK TO ADDR
   199	000344'	000304				SWAB	R4		;REAL ADDR AGAIN
   200	000346'	105003				CLRB	R3		;CLEAR LOW OF REMAINDER
   201	000350'	006203				ASR	R3		;MOVE ADDR BITS 16 & 17
   202	000352'	006203				ASR	R3		;TO BITS 6 & 7 OF REG
   203	000354'	000303				SWAB	R3		;TO BITS 14 & 15 OF REG
   204	000356'	000207				RETURN			;BACK TO CALLER WITH ADDR
   205	000360'	005003			BMREAL:	CLR	R3		;HIGH ADDR BITS ARE ZERO
   206	000362'	000207				RETURN			;BACK TO CALLER WITH ADDR
   207
   208
   209					;
   210					; LOCAL DATA STORAGE
   211					;
   212	000364'	000001			BASE:	.BLKW	1		;START OF BASE TABLE
   213									;RESERVED AREA MOVED TO SEPARATE
   214									;MODULE				GP020278
   215
   216		000001				.END
DMC BOOT DRIVER	DNMAC X24.07-563  06-DEC-79  10:37  PAGE 2
DMCDRV.MAC    14-FEB-79 09:38		CROSS REFERENCE TABLE -- USER SYMBOLS

BASE    000364R       	   74*	   79	  212#
BMREAL  000360R       	  205#
DEVTYP= 000014 G      	   44#
DMCIN   000070R       	   82	   91#	   94	   96	  139
DMCOT1  000230R       	  151	  158#
DMCOUT  000232R       	   95	  159#
GTMADR  000302R       	   80	  137	  185#
INIDRV  000002RG      	   71#
INIT    000026R       	   77#	  164	  168
INOK    000110R       	   92	   97#
KISAR0= 172340        	   49#	  188
RCVDRV  000136RG      	  131#
REBOOT= 173356 G      	   50#
SNDDRV  000144RG      	  134#
TMR     000000RG      	   51#	   75*	  145	  157*	  161	  163*
.     = 000366R       	  212#


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


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  0

 DMCDRV,DMCDRV/CRF=DMCDRV
 RUN-TIME: .5 .4 .1 SECONDS
 RUN-TIME RATIO: 3/1=2.6
 CORE USED:  17K  (33 PAGES)