;;; Copyright (c) 1999 Massachusetts Institute of Technology
;;; See the COPYING file at the top-level directory of this project.

.AUXIL

IFNDEF DEFSYM,[	;ALLOW USER TO USE SYMBOLS IN OTHER WAYS IF HE WISHES.
		;BUT NORMALLY, DEFSYM FOO==BAR DOES FOO==BAR WITH ERROR CHECK.
DEFINE DEFSYM X/
IRPS Z,,[X]
IFNDEF Z,X
.ELSE [
   $$TEM1==Z
   X
   IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
]
.ISTOP
TERMIN TERMIN

IFLE .MLLIT,.ERR .MLLIT MUST BE 1; SETTING IT TO 1.
.MLLIT==1
$$TEMP==1
]
.ELSE $$TEMP==0


;DISK PHYSICAL PARAMETERS

DEFSYM	NCYLS==200.	;# CYLINDERS NORMALLY USED (RP02)
DEFSYM	MCYLS==400.	;# CYLINDERS NORMALLY USED (RP03)
DEFSYM	XCYLS==3	;# EXTRA CYLINDERS FOR SPARES, HACKS, ETC.
DEFSYM	NHEDS==20.	;# TRACKS/CYLINDER
DEFSYM	NSECS==10.	;# SECTORS/TRK
DEFSYM	SECBLK==8	;# SECTORS/BLOCK
DEFSYM	NBLKSC==NHEDS*NSECS/SECBLK	;# BLKS/CYL
DEFSYM	NBLKS==NCYLS*NBLKSC	;TOTAL # REG BLKS (RP02)
DEFSYM	MBLKS==MCYLS*NBLKSC	;TOTAL # REG BLKS (RP03)
DEFSYM	XBLKS==XCYLS*NBLKSC	;# XTRA BLKS
DEFSYM	TBLKS==MBLKS+XBLKS	;TOTAL BLKS

DEFSYM	NTUTBL==1		;1 BLOCK PER TUT
DEFSYM	DECADE==20.		;NUMBER OF BLOCKS TO ALLOCATE AT A TIME
				;QSWAPA AND QLASTB MUST BE MULTIPLES OF THIS
DEFSYM	DPC==250		;I/O DEVICE NUMBER

;DISK COMMANDS

DEFSYM	DREADC==000000,,	;READ DATA
DEFSYM	DWRITC==100000,,	;WRITE DATA
				;OP CODE 2 UNUSED
DEFSYM	DWRITH==300000,,	;WRITE HEADER AND DATA (FORMAT PACK)
DEFSYM	DSEEKC==400000,,	;POSITION HEADS
DEFSYM	DEASEC==500000,,	;CLEAR ATTENTIONS
DEFSYM	DNOOPC==600000,,	;SELECT DRIVE
DEFSYM	DRCALC==700000,,	;RECALIBRATE DRIVE

;BYTE POINTERS FOR ABOVE COMMANDS

DEFSYM	DUNFLD==360300,,	;UNIT FIELD (ALL COMMANDS)
DEFSYM	DCYL==261000,,		;CYLINDER FIELD (READ,WRIT,WRITH,SEEK)
DEFSYM	DCYLXB==200100,,	;EXTRA BIT OF CYLINDER FIELD FOR RP03
DEFSYM	DSURF==210500,,		;SURFACE FIELD (READ,WRIT,WRITH)
DEFSYM	DSECT==140400,,		;SECTOR FIELD (READ,WRIT,WRITH)

;DATAI FIELDS


DEFSYM	DUNFLI==410300,,	;UNIT FIELD
DEFSYM	DCYLI==311000,,		;CYLINDER FIELD
DEFSYM	DCYLXI==130100,,	;EXTRA BIT OF CYLINDER FIELD

DEFSYM	SKINC==100,,		;SEEK INCOMPLETE
DEFSYM	ONCYL==40,,		;ON CYLINDER
DEFSYM	ONLINE==20,,		;ON LINE
DEFSYM	FUNSAF==10,,		;FILE UNSAFE
DEFSYM	NSCHDR==4,,		;NO SUCH DRIVE
DEFSYM	RDONLY==2,,		;READ ONLY
DEFSYM	NOWRIH==1,		;WRITE HEADER LOCKOUT

DEFSYM	RP03BT==2000		;SELECTED DRIVE IS AN RP03
DEFSYM	SECTI==140500,,

DEFSYM	ALLATT==776

;CONO INFORMATION

DEFSYM	DCLEAR==175710		;CLEAR ALL ERROR CONDITIONS


;CONI INFORMATION

DEFSYM	PARER==  4000
DEFSYM	SRCER== 40000
DEFSYM	HRDER==130000
DEFSYM	PROER==402300
DEFSYM	WRTER==  1000
DEFSYM	ALLER==577300
DEFSYM	DONE==10
DEFSYM	BUSY==20

;DF10 CHANNEL INFORMATION

DEFSYM	$DFCAD==002600,,	;CURRENT ADDRESS - 1 (IN CONTROL WORD)
				;ALSO BITS 4.7-4.9 HAVE 1'S COMPLEMENT OF MA 3.1-3.3
DEFSYM	$DFWC==261600,,		;- WORD COUNT (IN CONTROL WORD)
DEFSYM	$DFLAD==002600,,	;LAST DATA ADDRESS (IN STORED CONTROL WD)
DEFSYM	$DFCWA==261600,,	;LAST CONTROL WORD ADDRESS (IN STORED CONTROL WORD)


IFN $$TEMP,EXPUNG DEFSYM
