BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 2





      1					.TITLE	BADDAT - ...BAD DATA BASE

      2					.IDENT	/04/

      3					;

      4					;

      5					; COPYRIGHT (C) 1974,1975,1976,1977

      6					;

      7					;

      8					; THIS  SOFTWARE  IS  FURNISHED  UNDER A LICENSE FOR USE ONLY ON A

      9					; SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION

     10					; OF  THE  ABOVE COPYRIGHT  NOTICE.  THIS SOFTWARE, OR  ANY  OTHER

     11					; COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE  MADE AVAILABLE

     12					; TO  ANY  OTHER PERSON  EXCEPT  FOR USE ON SUCH SYSTEM AND TO ONE

     13					; WHO AGREES TO THESE LICENSE TERMS.  TITLE  TO  AND  OWNERSHIP OF

     14					; THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DIGITAL.

     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					; DIGITAL ASSUMES NO  RESPONSIBILITY FOR THE USE OR RELIABILITY OF

     21					; ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.

     22					;

     23					;

     24					; VERSION 04

     25					;

     26					; J. MASSE 01-JUL-74

     27					;

     28					;

     29					; MODIFIED BY:

     30					;

     31					;	P. J. BEZEREDI 01-NOV-76

     32					;

     33					;		PB010 -- BREAK BAD INTO SEPERATE MODULES.  ADD

     34					;			/LI SWITCH.

     35					;

     36					;	P. J. BEZEREDI 11-APR-77

     37					;

     38					;		PB023 -- MODIFICATIONS TO RUN STAND-ALONE.

     39					;

     40						.MCALL	GMCR$, QIOW$, GLUN$

     41

     42		000001 				$$$GBL=1

     43	000000					GLUN$

BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 3





     45		000001 			DSKEFN==1			; EVENT FLAG FOR DISK IO

     46		000002 			COLUN==2			;LUN FOR OUTPUT TO TI

     47		000003 			DSKLUN==3			;LUN FOR OUTPUT TO DISK

     48		000024 			$NBLKS==20.			;NO. OF BLOCKS IN BUFFER

     49		012000 			$BUFSZ==$NBLKS*256.		;NO. OF WORDS IN BUFFER

     50

     51

     52						.IF DF	IAS

     53

     54					.MCALL	FSRSZ$, GCMLB$

     55

     56						FSRSZ$	1

     57

     58					$GCMD::	GCMLB$	,BAD

     59

     60						.ENDC

     61

     62

     63	000006	000000 			$STATS::.WORD	0		;EXIT STATUS

     64	000010	   000 			$SWOVR::.BYTE	0		;OVERRIDE SWITCH

     65	000011	   000 			$SWLST::.BYTE	0		;LISTING SWITCH

     66	000012	000000 			$BBCNT::.WORD	0		;CUMULATIVE SUM OF BAD BLOCKS

     67	000014	000000 			$DVICE::.WORD	0		;DISK NAME (ASCII)

     68

     69

     70						.IF DF	S$$BAD

     71

     72					$DVUNT::.WORD	0		;DISK UNIT NUMBER

     73					$UCB::	.BLKW	1		;ADDRESS OF CURRENT UCB

     74					$SCB::	.BLKW	1		;ADDRESS OF CURRECT SCB

     75					$INADD::.BLKW	1		;ADDRESS OF INTERRUPT VECTOR

     76					$WCHK::	.BLKW	1		;WRITE CHECK FLAG

     77

     78						.ENDC

     79

     80

     81	000016				$IOST::	.BLKW	2		;I/O STATUS BLOCK FOR DISK I/O

     82	000022				$COST::	.BLKW	2		;I/O STATUS BLOCK FOR CONSOLE I/O

     83	000026	000000 			$BK0FG::.WORD	0		;BLOCK 0 FLAG - SET WHEN BLOCK 0 IS BAD

     84	000030	000000 			$IEBLK::.WORD	0		;TRANSFER ADDRESS USED BY $WRITE

     85	000032				$MXLBN::.BLKW	2		;TOTAL # OF BLOCKS ON VOLUME

     86	000036				$LTDSK::.BLKW	1		;LAST TRACK DISK FLAG

     87	000040				$MCRLN::GMCR$			;MCR LINE BUFFER

     88	000162				$BUF::	.BLKW	$BUFSZ		;BUFFER FOR DISK I/O

     89					;

     90					; ALLOCATE SOME WORK AREA FOR SUBROUTINE "$LTRCK",

     91					; OVERLAYING THE BUFFER AREA.

     92					;

     93		000162'				.=$BUF

     94	000162				$MBBUF::.BLKW	256.		;BUFFER FOR MDBSF

     95	001162				$SBBUF::.BLKW	256.		;BUFFER TO CREATE SDBSF

     96	002162				$BBLK::	.BLKW	2		;(DOUBLE WORD) BAD BLOCK NUMBER

     97

     98					; DON'T SEPARATE THE NEXT 3 LINES!

     99

    100	002166				$BCYL::	.BLKW	1		;(WORD) BAD BLOCK CYLINDER NUMBER

    101	002170				$BSEC::	.BLKB	1		;(BYTE) BAD BLOCK SECTOR NUMBER

BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 3-1





    102	002171				$BTRK::	.BLKB	1		;(BYTE) BAD BLOCK TRACK NUMBER

    103

    104					; DON'T SEPARATE THE ABOVE 3 LINES!

    105

    106		024162'				.=$BUF+<2*$BUFSZ>

    107

    108	024162				$GLDPB::.BLKW	6		;PARAMETER BLOCK FOR "GET LUN" DIRECTIVE

    109		024162'			$DEVNM==$GLDPB+G.LUNA		; ACTUAL DEVICE NAME

    110

    111	024176	165555 	133333 		$TSTPT::.WORD	165555,133333	;WORST CASE TEST PATTERN

    112

    113	024202				$BADBK::			;BUFFER FOR BAD BLOCK INFO

    114		000004 				$PTRSZ==4		;NO. OF BYTES IN A POINTER

    115		000146 				$NPTRS==102.		;MAX. # OF POINTERS

    116	024202	   001 				.BYTE	1		;COUNT FIELD SIZE

    117	024203	   003 				.BYTE	3		;ADDRESS FIELD SIZE

    118	024204	   000 				.BYTE	0		;# WORDS USED FOR BAD BLOCK POINTERS

    119	024205	   314 				.BYTE	$NPTRS*$PTRSZ/2	;# WORDS AVAILABLE FOR POINTERS

    120	024206					.BLKW	254.		;REMAINING WORDS IN BLOCK

    121		024204'				BB.USD==$BADBK+2	;POINTER TO # OF WORDS USED

    122		024206'				BB.PTR==BB.USD+2	;START OF BAD BLOCK POINTERS

    123		000000 				BB.NHI==0		;OFFSET TO HIGH BLOCK # BITS

    124		000001 				BB.CNT==1		;OFFSET TO # OF BAD BLOCKS IN GROUP

    125		000002 				BB.NLO==2		;OFFSET TO LOW BLOCK # BITS

    126		025036'				$PTRND==$NPTRS*$PTRSZ+BB.PTR  ;WORD FOLLOWING LAST POINTER

    127		025200'				BB.CKS==255.*2+$BADBK	;POINTER TO CHECKSUM

    128

    129	025202				$DSKPB::			;QIO DPB FOR DISK I/O

    130

    131	025202					QIOW$	,DSKLUN,DSKEFN,,$IOST,,<,,,,>  ;

    132

    133		025220'				$XFRSZ==$DSKPB+Q.IOPL+2 ;POINTER TO TRANSFER SIZE (BYTES)

    134		025224'				$LBNH==$DSKPB+Q.IOPL+6	;POINTER TO HIGH BLOCK # BITS

    135		025226'				$LBNL==$LBNH+2		;POINTER TO LOW BLOCK # BITS

    136

    137	025232				$CODPB::			;QIO DPB FOR CO I/O

    138

    139	025232					QIOW$	IO.WLB,COLUN,2,,$COST,,<,,40>

    140

    141					;+

    142					; **-$LTDEV--TABLE OF LAST TRACK DISKS

    143					;

    144					; MACRO FORMAT:	NAME,LBN,TRK,SEC,BLK,MBS,SBS

    145					; WHERE:

    146					;	NAME -	ASCII DEVICE NMEMONIC

    147					;	LBN -   NUMBER OF BLOCKS (DOUBLE WORD)

    148					;	TRK - 	NUMBER OF TRACKS/CYLINDER

    149					;	SEC -	NUMBER OF SECTORS/TRACK

    150					;	BLK -	NUMBER OF SECTORS/BLOCK

    151					;	MBS -	NUMBER OF MANUFACTURES BAD SECTORS

    152					;	SBS -	NUMBER OF SOFTWARE BAD SECTORS

    153					;-

    154

    155						.MACRO	LTDEV	NAME, LBN, TRK, SEC, BLK, MBS, SBS

    156						.WORD	"NAME

    157					$LTSIZ==.

    158						.WORD	LBN

BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 3-2





    159						.WORD	TRK, SEC, BLK

    160						.WORD	SEC/BLK

    161						.WORD	TRK*<SEC/BLK>

    162						.WORD	MBS, SBS

    163					$LTSIZ==.-$LTSIZ

    164						.ENDM	LTDEV

    165

    166

    167					;+

    168					; THIS TABLE DEFINES THE GEOMETRY OF A LAST TRACK DISK.  A DISK

    169					; WHICH HAS MORE THAN ONE TYPE OF GEOMETRY (IE. RK06/RK07) WILL

    170					; HAVE AN ENTRY FOR EACH OF IT'S TYPES.  THE DETERMINING FACTOR

    171					; WILL BE THE COMPARISON OF THE MAXIMUM LOGICAL BLOCK NUMBER FOUND

    172					; IN THE TABLE AND IN THE GET LUN INFO BLOCK OR PUD.  NOTE THAT

    173					; THE LBN ENTRY IS REDUNDANT BUT IS INCLUDED FOR FUTURE USE.

    174					;-

    175

    176	025262				$LTDEV::			;LAST TRACK DEVICE TABLE

    177

    178	025262				LTDEV	DM, <0,64766>, 3, 22., 1, 10.,12.	;RK06

    179	025306				LTDEV	DM, <0,151036>, 3, 22., 1, 10., 12.	;RK07

    180	025332				LTDEV	DL, <0,24000>, 2, 40., 2, 10., 10.	;RL01

    181	025356				LTDEV	DR, <2,1140>, 5, 32., 1, 10., 22.	;RM03

    182	025402	000000 				.WORD	0				;END OF TABLE

    183

    184

    185					; THE ORDER OF THIS TABLE MUST NOT CHANGE !!!!!!

    186

    187	025404	000000 			$LTTRK::.WORD	0		;# OF TRACKS

    188	025406	000000 			$LTSEC::.WORD	0		;# OF SECTORS/TRACK

    189	025410	000000 			$LTBLK::.WORD	0		;# OF SECTORS/BLOCK

    190	025412	000000 			$LTBPT::.WORD	0		;# OF BLOCKS/TRACK

    191	025414	000000 			$LTBPC::.WORD	0		;# OF BLOCKS/CYLINDER

    192	025416	000000 			$LTMBS::.WORD	0		;# OF BLOCKS IN MDBSF

    193	025420	000000 			$LTSBS::.WORD	0		;# OF BLOCKS IN SDBSF

    194

    195

    196					;+

    197					; THIS IS THE TABLE OF VALID DEVICE NAMES FOR THE STAND-ALONE

    198					; VERSION OF ...BAD.  THE TABLE CONTAINS A DOUBLE WORD ENTRY WITH

    199					; THE FIRST WORD BEING THE DEVICE NAME AND THE SECOND WORD BEING

    200					; THE INTERRUPT ADDRESS (NON-ERROR LOGGING).

    201					;-

    202

    203						.IF DF	S$$BAD

    204

    205						.MACRO	DEVTAB	NAME

    206						.ASCII	/NAME/

    207						.WORD	$'NAME'INT

    208						.ENDM	DEVTAB

    209

    210

    211					$DVTBL::			;DEVICE NAME TABLE

    212						.IRP	NAME, <DB,DF,DK,DL,DM,DP,DR,DS,DT,DX>

    213						DEVTAB	NAME

    214						.ENDM

    215					$DVTBE::

BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 3-3





    216

    217						.ENDC

    218

    219

    220		000001 				.END

BADDAT - ...BAD DATA BASE	MACRO M1110  22-AUG-78 02:06  PAGE 3-4

SYMBOL TABLE



A$$CHK= 000000   	G.LUBA= 000004   	N$$LDV= 000001   	S$$WPR= 000005   	$CODPB  025232RG

A$$CPS= 000000   	G.LUBL= 000006   	N$$MOV= 000021   	S$$WRG= 000000   	$COST   000022RG

A$$NSI= 000000   	G.LUCW= 000004   	N$$MXM= 000400   	S$$YSZ= 030000   	$DEVNM= 024162RG

A$$PRI= 000000   	G.LUFB= 000003   	N$$TMO= 000012   	T$$ACR= 000000   	$DSKPB  025202RG

A$$TRP= 000000   	G.LULU= 000002   	P$$D70= 000000   	T$$BTW= 000000   	$DVICE  000014RG

BB.CKS= 025200RG 	G.LUNA= 000000   	P$$GMX= 000000   	T$$BUF= 000000   	$GLDPB  024162RG

BB.CNT= 000001 G 	G.LUNU= 000002   	P$$LAS= 000000   	T$$CCA= 000000   	$IEBLK  000030RG

BB.NHI= 000000 G 	G.MCRB= 000002   	P$$P11= 000001   	T$$CCO= 000000   	$IOST   000016RG

BB.NLO= 000002 G 	IO.WLB= ****** GX	P$$P45= 000000   	T$$CTR= 000000   	$LBNH = 025224RG

BB.PTR= 024206RG 	I$$RAR= 000000   	P$$RFL= 000000   	T$$C11= 000001   	$LBNL = 025226RG

BB.USD= 024204RG 	I$$RDN= 000000   	P$$RTY= 000000   	T$$GMC= 000000   	$LTBLK  025410RG

COLUN = 000002 G 	K$$CNT= 177546   	P$$R11= 000001   	T$$GTS= 000000   	$LTBPC  025414RG

C$$CDA= 000001   	K$$CSR= 177546   	P$$SRF= 000000   	T$$J16= 000001   	$LTBPT  025412RG

C$$CKP= 000000   	K$$LDC= 000000   	P$$TPT= 000000   	T$$KMG= 000000   	$LTDEV  025262RG

C$$ORE= 002000   	K$$TPS= 000074   	Q$$OPT= 000014   	T$$LWC= 000000   	$LTDSK  000036RG

C$$OVL= 000000   	LD$DB = 000000   	Q.IOAE= 000012   	T$$MAN= 016703   	$LTMBS  025416RG

C$$RSH= 177564   	LD$DK = 000000   	Q.IOEF= 000006   	T$$RNE= 000000   	$LTSBS  025420RG

DSKEFN= 000001 G 	LD$DS = 000000   	Q.IOFN= 000002   	T$$RPR= 000000   	$LTSEC  025406RG

DSKLUN= 000003 G 	LD$DT = 000000   	Q.IOLU= 000004   	T$$RST= 000000   	$LTSIZ= 000022 G

D$$BUG= 177514   	LD$DX = 000000   	Q.IOPL= 000014   	T$$RUB= 000000   	$LTTRK  025404RG

D$$H11= 000002   	LD$LP = 000000   	Q.IOPR= 000007   	T$$SYN= 000000   	$MBBUF  000162RG

D$$IAG= 000000   	LD$MM = 000000   	Q.IOSB= 000010   	T$$TRW= 000000   	$MCRLN  000040RG

D$$ISK= 000000   	LD$PP = 000000   	R$$DER= 000000   	T$$VBF= 000000   	$MXLBN  000032RG

D$$L11= 000001   	LD$PR = 000000   	R$$EXV= 000000   	U$$MHI= 000040   	$NBLKS= 000024 G

D$$M11= 000001   	LD$TT = 000000   	R$$JPO= 000000   	U$$MLO= 120000   	$NPTRS= 000146 G

D$$SHF= 000000   	L$$ASG= 000000   	R$$JP1= 000001   	U$$MRN= 170324   	$PTRND= 025036RG

D$$YNC= 000000   	L$$DRV= 000000   	R$$JS1= 000001   	V$$CTR= 000400   	$PTRSZ= 000004 G

D$$YNM= 000000   	L$$P11= 000001   	R$$KWC= 000000   	X$$DBT= 000000   	$SBBUF  001162RG

E$$DVC= 000000   	L$$11R= 000000   	R$$K11= 000001   	$BADBK  024202RG 	$STATS  000006RG

E$$NSI= 000000   	M$$CRB= 000124   	R$$LKL= 000000   	$BBCNT  000012RG 	$SWLST  000011RG

E$$PER= 000000   	M$$CRX= 000000   	R$$NDC= 000006   	$BBLK   002162RG 	$SWOVR  000010RG

E$$XPR= 000000   	M$$EXT= 000000   	R$$NDH= 000144   	$BCYL   002166RG 	$TSTPT  024176RG

F$$AST= 000000   	M$$FCS= 000000   	R$$NDL= 000001   	$BK0FG  000026RG 	$XFRSZ= 025220RG

F$$LPP= 000000   	M$$MGE= 000000   	R$$SND= 000000   	$BSEC   002170RG 	$$$ARG= 000003

F$$LVL= 000001   	M$$MUP= 000000   	R$$VAX= 000000   	$BTRK   002171RG 	$$$GBL= 000001

G$$TPP= 000000   	M$$NET= 000000   	R$$X11= 000001   	$BUF    000162RG 	$$$OST= 000014

G$$TSS= 000000   	M$$OVR= 000000   	R$$11M= 000000   	$BUFSZ= 012000 G 	$$$R4 = 000000

G$$TTK= 000000   	N$$CON= 000144   	S$$WPC= 000036



. ABS.	000000	   000

      	025422	   001

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  4797 WORDS  ( 19 PAGES)

DYNAMIC MEMORY:  5940 WORDS  ( 22 PAGES)

ELAPSED TIME:  00:00:12

OBJ$:BADDAT,LIS$:BADDAT/-SP=SRC$:RSXMC/PA:1,BADDAT

