1 ;;; Copyright (c) 1999 Massachusetts Institute of Technology
3 ;;; This program is free software; you can redistribute it and/or
4 ;;; modify it under the terms of the GNU General Public License as
5 ;;; published by the Free Software Foundation; either version 3 of the
6 ;;; License, or (at your option) any later version.
8 ;;; This program is distributed in the hope that it will be useful,
9 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;;; General Public License for more details.
13 ;;; You should have received a copy of the GNU General Public License
14 ;;; along with this program; if not, write to the Free Software
15 ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 IFNDEF DEFSYM,[ ;ALLOW USER TO USE SYMBOLS IN OTHER WAYS IF HE WISHES.
20 ;BUT NORMALLY, DEFSYM FOO==BAR DOES FOO==BAR WITH ERROR CHECK.
27 IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
32 IFLE .MLLIT,.ERR .MLLIT MUST BE 1; SETTING IT TO 1.
39 ;SYSTEMS CONCEPTS DC10 PHYSICAL CHARACTERISTICS
41 DEFSYM NCYLS==400. ;# CYLINDERS NORMALLY USED
42 DEFSYM XCYLS==6 ;# EXTRA CYLINDERS FOR SPARES, HACKS, ETC.
43 DEFSYM NHEDS==20. ;# TRACKS/CYLINDER
44 DEFSYM NSECS==2 ;# BLKS/TRK
45 DEFSYM SECBLK==1 ;# SECTORS/BLOCK
46 DEFSYM NBLKSC==NHEDS*NSECS ;# BLKS/CYL
47 DEFSYM NBLKS==NCYLS*NBLKSC ;TOTAL # REG BLKS
48 DEFSYM XBLKS==XCYLS*NBLKSC ;# XTRA BLKS
49 DEFSYM TBLKS==NBLKS+XBLKS ;TOTAL BLOCKS
51 DEFSYM NTUTBL==2 ;2 BLOCKS PER TUT (DUAL-DENSITY CALCOMPS THESE DAYS)
52 DEFSYM DECADE==20. ;NUMBER OF BLOCKS TO ALLOCATE AT A TIME
53 ;QSWAPA AND QLASTB MUST BE MULTIPLES OF THIS
58 DEFSYM XWBLK==1700,, ;BP TO PREV BLK # IN FILE FLD
59 DEFSYM XWAWC==171200,, ;BP TO ACTIVE WD CNT
63 DEFSYM NXWDS==4 ;NUMBER OF EXTRA WORDS
65 DEFSYM DC0==610 ;MAIN DEVICE CODE
66 DEFSYM DC1==614 ;READS ERR STATUS ETC, SETS TIMER DRIVER # ON CONO
68 ;FIELDS IN HEADER WORD 0
70 DEFSYM DPKID==240700,, ;PACK ID FIELD
71 DEFSYM DCYL==131100,, ;CYLINDER CHECK FIELD
72 DEFSYM DSURF==60500,, ;SURFACE CHECK FIELD
73 DEFSYM DSECT==600,, ;SECTOR FIELD
77 DEFSYM DHIND==1000,, ;4.1 INDIRECT IF 1, CYL, SURF, SECTOR SAME AS ABOVE
78 DEFSYM DHSPRT==400,, ;BIT 3.9 SOFTWARE PROTECT
79 DEFSYM DHHPRT==200,, ;3.8 HARDWARE PROTECT
80 DEFSYM DHNXAD==270200,, ;3.7, 3.6 HOW TO COMPUTE NEXT DISK ADR
82 ;01 SET SECTOR TO 0, ADD 1 TO SURF
83 ;10 SET SECTOR AND SURFACE TO 0, ADD 1 TO CYL
85 DEFSYM DHEPB==10,, ;PARITY BIT FOR EVEN BITS OF 56 BIT HEADER
86 DEFSYM DHOPB==4,, ;PARITY BIT FOR ODD BITS OF 56 BIT HEADER
87 DEFSYM DHSLNG==1600,, ;-LENGTH OF SECTOR FIELD
89 ;DISK ADDRESS DATA COMMANDS (OP CODES)
91 DEFSYM DRC==400000,, ;READ COMPARE
92 DEFSYM DWRITE==440000,, ;WRITE
93 DEFSYM DREAD==500000,, ;READ
94 DEFSYM DSEEK==540000,, ;SEEK
95 DEFSYM DRCC==600000,, ;READ COMPARE CONTINUOUS
96 DEFSYM DWRITC==640000,, ;WRITE CONTINUOUS
97 DEFSYM DREADC==700000,, ;READ CONTINUOUS
99 DEFSYM DUNENB==20000,, ;ENABLE LOAD UNIT FIELD
100 DEFSYM DUNFLD==330400,, ;UNIT FIELD
101 ;PKID, CYL, SURF, AND SECTOR SAME AS ABOVE
103 ;COPY / COMPARE / SKIP COMMAND
105 DEFSYM DCOPY==40000,, ;COPY
106 DEFSYM DCCOMP==100000,, ;COMPARE
107 DEFSYM DCSKIP==140000,, ;SKIP
109 DEFSYM DCWC==241400,, ;-WC FIELD
110 DEFSYM DCCA==2400,, ;CORE ADDRES
111 DEFSYM DCBN==121200,, ;BLOCK NUMBER
114 DEFSYM DHLT==0 ;0 IN 4.9-4.5 = JUMP AND IN 3.5,3.6 = HALT
115 DEFSYM DXCT==20,, ;XCT
116 DEFSYM DJMP==40,, ;JUMP
117 DEFSYM DJSR==60,, ;JSR
119 ;"B" COMMAND BITS 3.3, 3.4
121 DEFSYM DAOJNC==4,, ;AOJN THE CONTROL COUNTER
122 DEFSYM DDOK==10,, ;ON NO DATA ERROR
123 DEFSYM DSRQF==14,, ;IF SEEK RQ FLAG ON
125 ;STORE REGISTER COMMAND
126 DEFSYM DSREG==240400,, ;STORE REG
128 DEFSYM DSREGS==240300,, ;SOURCE REGISTER SELECT FIELD
129 DEFSYM DSRDB==0 ;STORE DATA BUFFER
130 DEFSYM DSRDL==4,, ;STORE DISK LOCATION
131 DEFSYM DSRCC==10,, ;STORE COMMAND COUNT
132 DEFSYM DSRPC==24,, ;STORE PC (IN FORM OF JMP INST.)
133 DEFSYM DSRWC==30,, ;STORE WORD COUNT
134 DEFSYM DSRCA==34,, ;STORE CORE ADDRESS (TO XFER DATA TO OR FROM)
137 DEFSYM DALU==300000,, ;BASIC ALU OP CODE
138 DEFSYM DALUX==40000,, ;INDEX BIT (ADD CC TO ADR)
139 DEFSYM DALUD==40,, ;DIRECT BIT IF 1, REF MEM OT GET B OP
141 DEFSYM DASL==4000,, ;SKIP ON <0
142 DEFSYM DASE==10000,, ;SKIP ON = 0
143 DEFSYM DASLE==14000,, ;SKIP ON < OR = 0
144 DEFSYM DASA==20000,, ;ALWAYS SKIP
145 DEFSYM DASGE==24000,, ;SKIP ON > OR = 0
146 DEFSYM DASN==30000,, ;SKIP ON NOT = 0
147 DEFSYM DASG==34000,, ;SKIP ON > 0
149 ;DESTINATION SUB OP (ALSO SPECIFIES SOURCE A)
150 DEFSYM DLDB==0 ;OP A FROM DB, STORE IN DB
151 DEFSYM DLDL==4,, ;OP FROM DL, STORE IN DL
152 DEFSYM DLCC==10,, ;OP FROM CC, STORE IN CC
153 DEFSYM DLCA==14,, ;OP A =0, STORE IN CA
154 DEFSYM DLTDB==20,, ;TEST DB (OP A FROM DB, NO STORE)
155 DEFSYM DLDBPC==24,, ;OP A FROM DB, STORE IN PC
156 DEFSYM DLDBWC==30,, ;OP A FROM DB, STORE IN WC
157 DEFSYM DLDBM==34,, ;OP A FROM DB, STORE IN MEM (DIRECT MUST BE ONE TO REALLY MAKE IT)
160 DEFSYM DLADD==100,, ;A+B
161 DEFSYM DLSOS==200,, ;B-1
162 DEFSYM DLLB==300,, ;B
163 DEFSYM DLSUB==400,, ;B-A
165 DEFSYM DLAND==2300,, ;A&B
166 DEFSYM DLIOR==2500,, ;A IOR B
167 DEFSYM DLLA==3100,, ;LOAD A
168 DEFSYM DLSETO==3200,, ;-1
169 DEFSYM DLSETZ==3300,, ;0
172 DEFSYM DOPR==200000,, ;BASIC OPR
173 DEFSYM DOHXFR==400,, ;HALT DURING XFER (SO MB WILL BE SAFE)
174 DEFSYM DOCSRQ==200,, ;CLEAR SEEK RQ
175 DEFSYM DOSSRQ==100,, ;SET SEEK RQ
176 DEFSYM DOSCFL==40,, ;SET C FLAG
179 DEFSYM DSDRST==240000,, ;STORE DRIVE STATUS
180 ;UNIT ENABLE, UNIT FIELD SAME
181 DEFSYM DSDCNT==240400,, ;COUNT-1 FIELD
183 ;BITS IN DRIVE STATUS STORED
185 DEFSYM DDSWC==40,, ;WRITE CURRENT SENSED
186 DEFSYM DDSUNS==20,, ;DRIVE UNSAFE
187 DEFSYM DDSRDO==10,, ;READ ONLY
188 DEFSYM DDSSIC==4,, ;SEEK INCOMPLETE
189 DEFSYM DDSRDY==2,, ;DRIVE READY
190 DEFSYM DDSONL==1,, ;DRIVE ON LINE
191 DEFSYM DDSSEL==400000 ;DRIVE SELECTED
192 DEFSYM DDSCYL==101000,, ;PRESENT CYLINDER
193 DEFSYM DDSLAT==1000,, ;LATENCY TIMER
195 ;DISK ADR "SPECIAL COMMAND"
197 DEFSYM DSPC==740000,, ;BASIC OP CODE
198 ;USE, UNIT FIELDS AS NORMAL
202 DEFSYM DSWIDX==20,, ;WAIT UNTIL INDEX PULSE
203 DEFSYM DSWSEC==40,, ;WAIT UNTIL SECTOR PULSE
204 DEFSYM DSWINF==60,, ;NEVER (USE WITH G=3 OR 7)
206 ; F CONDITION (OTHER WAIT)
207 DEFSYM DSWHDM==0 ;WAIT FOR MATCHING HEADER
208 DEFSYM DSWAGH==4,, ;ANY GOOD HEADER
209 DEFSYM DSWAH==10,, ;ANY HEADER
210 DEFSYM DSWNUL==14,, ;NO WAIT
213 DEFSYM DSCRDC==0 ;READ DATA THRU DECODERS
214 DEFSYM DSCRIM==100,, ;READ DATA IMAGE
215 DEFSYM DSCRHD==200,, ;READ HEADER WORDS
216 DEFSYM DSRCAL==300,, ;(RECALIBRATE)
217 DEFSYM DSCWDC==400,, ;WRITE THRU DECODERS
218 DEFSYM DSCWIM==500,, ;WRITE IMAGE
219 DEFSYM DSMAIT==700,, ;MAINTENANCE (PUT CYL FIELD ON BUS LINES WITH CONTROL TAG)
222 DEFSYM DASSGN==400000,, ;ASSIGNED TO PROC (WITH SWITCH)
223 DEFSYM DPIRQC==400000 ;PI REQ BEING GENERATED
224 DEFSYM DSSRQ==200000 ;SEEK REQUEST
225 DEFSYM DSDEEB==10000 ;ENABLE INTERRUPT ON DATA ERROR OR READ/ COMP ERROR
226 DEFSYM DSSERR==4000 ;ERROR FLAG
227 DEFSYM DSSAEB==2000 ;ATTENTION ENABLE FLAG
228 DEFSYM DSSATT==1000 ;ATTENTION FLAG
229 DEFSYM DSIENB==400 ;IDLE FLAG ENABLE
230 DEFSYM DSSRUN==200 ;RUN
231 DEFSYM DSSACT==100 ;ACTIVE
232 DEFSYM DSSCEB==40 ;CHANNEL ENABLE
233 DEFSYM DSSCHF==20 ;CHANNEL FLAG
234 DEFSYM DSSCFL==10 ;CPU FLAG
237 ;DATAO DC0, SENDS COMMAND TO DISK
238 ; (IGNORED IF EXECUTING COMMANDS FROM MEMORY)
241 DEFSYM DCSET==400000 ;SET SELECTED
242 DEFSYM DCCLR==200000 ;CLEAR SELECTED
243 DEFSYM DCCSET==600000 ;RESET CONTROLLER THEN SET SELECTED
244 DEFSYM DCDENB==10000 ;DATA ERROR ENABLE
245 DEFSYM DCERR==4000 ;SET ERROR FLAG OR CLEAR ALL ERRORS
246 DEFSYM DCATEB==2000 ;ATTENTION ENABLE
247 DEFSYM DCCATT==1000 ;CLEAR ATTENTION
248 DEFSYM DCSSRQ==1000 ;SET SEEK REQUEST
249 DEFSYM DCIENB==400 ;IDLE ENABLE
250 DEFSYM DCSTAR==200 ;START (SET)
251 DEFSYM DCSSTP==200 ;STOP (CLEAR)
252 DEFSYM DCSGL==100 ;DO SINGLE COMMAND
253 DEFSYM DCCENB==40 ;CHANNEL ENABLE
254 DEFSYM DCCFLG==20 ;CHANNEL FLAG
255 DEFSYM DCCPUF==10 ;CPU FLAG
260 ;SET TIMER DRIVE # FROM 1.1-1.3
264 DEFSYM DSATDN==360400,, ;ATTENTION DRIVE #
265 DEFSYM DSTMDN==320400,, ;TIMER DRIVE #
266 DEFSYM DSLAT==221000,, ;LATENCY TIMER FOR DRIVE ABOVE
269 DEFSYM DIPE==4000 ;INTERNAL PARITY ERROR
270 DEFSYM DRLNER==2000 ;RECORD LENGTH
271 DEFSYM DRCER==1000 ;READ COMPARE ERROR
272 DEFSYM DOVRRN==400 ;OVERRUN
273 DEFSYM DCKSER==200 ;CKSUM OR DECODER ERR
274 DEFSYM DWTHER==100 ;WATCHDOG TIMER
275 DEFSYM DFUNSF==40 ;FILE UNSAFE, SEEK INCOMPLETE OR END OR DSK
276 DEFSYM DOFFL==20 ;OFF LINE OR MULT SEL
277 DEFSYM DPROT==10 ;WRT KEY OR RD ONLY OR PROTECT
278 DEFSYM DDOBSY==4 ;DATAO WHEN BSY
279 DEFSYM DNXM==2 ;NON-EX MEM
280 DEFSYM DCPERR==1 ;CORE PARITY ERR
282 DEFSYM LRIBLK==16 ;CONSISTENCY CHECK DSKDMP VS MARK
285 IFN $$TEMP,EXPUNG DEFSYM