Trailing-Edge
-
PDP-10 Archives
-
bb-x141b-bb
-
boot.lst
There are 2 other files named boot.lst in the archive. Click here to see a list.
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04
TABLE OF CONTENTS
20- 44 EQUATED SYMBOLS
21- 100 PHASE 1 LOCAL DATA
22- 188 ERROR MESSAGE
23- 215 BOOT PHASE I
25- 419 PHASE 1 - ERROR PROCESSING
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 17
DTE20 HARDWARE BITS
701 .LIST MEB
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 19
DTE20 HARDWARE BITS
1 .TITLE BOOT - BOOT NEW SYSTEM
2 .IDENT "02"
3
4 ; COPYRIGHT (C) 1973, 1978, 1985 BY
5 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
6 ; ALL RIGHTS RESERVED.
7 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
8 ; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
9 ; OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THERE-
10 ; OF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
11 ; NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
12 ;
13 ; THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
14 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
15 ; CORPORATION.
16 ;
17 ; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
18 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
19 ;
20 ;
21 ; VERSION: 02
22 ; BY: H. LEV
23 ; DATE: 9/1/73
24 ; MODIFIED: 8/9/74 BRAKE INTO TWO MODULES FOR ASSEMBLY PURPOSES
25 ; 3/10/75 SWITCH TO SYSTEM STATE TO SEARCH LISTS
26 ; 4/8/75 ADD RX11 SUPPORT
27 ; 4/11/75 USE SAME DRIVERS FOR BOOT + SAVE
28 ; AND BOOT SYSTEMS OF ANY SIZE
29
30 ;
31 ; THIS PROGRAM BOOTS IN AN RSX-11M SYSTEM IMAGE FROM A FILES-11 DEVICE. IT OPENS AN
32 ; RSX-11M TASK IMAGE FILE, VERIFIES THAT IT IS AN OPERATING SYSTEM IMAGE
33 ; (NO TASK HEADER) AND THEN READS THE IMAGE INTO CORE
34 ;
35
36 .MCALL CSI$
37 000000 CSI$ ; DEFINE CSI CONTROL BLOCK OFFSETS
38 .MCALL FDOFF$
39 000000 FDOFF$ DEF$L ; DEFINE FDB OFFSETS
40 .MCALL CALL,DIR$,EXIT$S
41 .MCALL FDBK$A,FDBF$A,FDBDF$,FDOP$A
42 .MCALL FINIT$,FSRSZ$,NMBLK$,RETURN,WTSE$S
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 20
EQUATED SYMBOLS
44 .SBTTL EQUATED SYMBOLS
45 ;
46 ; CSI SWITCH FLAGS
47 ;
48 000001 FIDBIT = 1 ; /FI FILE ID.
49 ;
50 ; LOGICAL UNITS
51 ;
52 000001 LUN1 = 1 ; CO LUN
53 000002 LUN2 = 2 ; LUN FOR SYSTEM IMAGE FILE
54
55
56
57 ;
58 ; LABEL BLOCK OFFSETS
59 ;
60 000010 L$BFLG = 10 ; LABEL FLAGS
61 000014 L$BLDZ = 14 ; LOAD SIZE IN 32 WORD BLOCKS
62 000022 L$BHRB = 22 ; RELATIVE BLOCK OF START OF CODE
63 000026 L$BXFR = 26 ; SYSTEM TRANSFER ADDRESS
64 ;
65 ; LABEL FLAG BITS (L$BFLG)
66 ;
67 040000 TS$NHD = 40000 ; TASK IMAGE HAS NO HEADER
68
69 ;
70 ; MISCELANEOUS CONSTANTS
71 ;
72 000040 SPA = 40 ;
73 000015 CR = 15 ;
74 000033 ESC = 33 ;
75
76 000001 EFN1 = 1 ; EVENT FLAG TO WAIT ON
77
78 ;
79 ; DEVICE DRIVER TABLE OFFSETS
80 ;
81 000000 DRVNAM = 0 ; DEVICE NAME IN ASCII
82 000002 DRVSET = 2 ; DRIVER SET UP ROUTINE
83 000004 DRVLLN = 4 ; LOAD LENGTH WORD ADDRESS
84 000006 DRVBA = 6 ; BUFFER WORD ADDRESS
85 000010 DRVFUN = 10 ; DRIVER FUNCTION CODE ADDRESS
86 000012 DRVADR == 12 ; DRIVER ADDRESS
87 000014 DRVLEN == 14 ; DRIVER LENGTH IN WORDS
88 000016 DRVWRT = 16 ; WRITE FUNCTION CODE (WITH GO BIT)
89 000020 DRVRD = 20 ; READ FUNCTION CODE (WITH GO BIT)
90 000022 DRVUNT == 22 ; UNIT SELECT BITS IN CORRECT POSITION
91 000026 DRCSR == 26 ; ADDRESS OF CSR ADDRESS
92 000024 DRVSEL = 24 ; DRIVE SELECT WORD ADDRESS
93 .IF DF R$$20F
94 000030 DRCSRA = 30 ; CSR ADDRESS
95 000032 DRVENT = 32 ; LENGTH OF DRIVER ENTRY
96 .IFF ; .IF DF R$$20F
97 DRVENT = 30 ; LENGTH OF DRIVER ENTRY
98 .ENDC ; .IF DF R$$20F
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 21
PHASE 1 LOCAL DATA
100 .SBTTL PHASE 1 LOCAL DATA
101 ;
102 ; CSI CONTROL BLOCK
103 ;
104 000000 BOTCSI: .BLKB C.SIZE ;
105
106
107 ;
108 ; DISK FILE DESCRIPTOR BLOCK
109 ;
110 000054 BOTFDB: FDBDF$ ; ALLOCATE SPACE
111 000214 FDBK$A ,,,,BOTSTA ; I/O STATUS BLOCK
000100 001254' .WORD BOTSTA
112 000214 FDOP$A LUN2,BOTCSI+C.DSDS,BOTDNB ;
000116 002 .BYTE LUN2
000120 000006' .WORD BOTCSI+C.DSDS
000122 001216' .WORD BOTDNB
113 000214 FDBF$A EFN1 ;
000124 001 .BYTE EFN1
114 ;
115 ; COMMAND LINE DPB AND DISK BUFFER
116 ;
117 000214 177 051 BOTGCL: .BYTE 127.,41. ; DK AND LENGTH
118 000216 BOTBUF: .BLKB 512. ; COMMAND AND DISK BUFFER
119
120 ;
121 ; DEFAULT NAME BLOCK
122 ;
123 .IF DF R$$20F
124 001216 BOTDNB: NMBLK$ RSX20F,SYS,,SY
001224 071620 146266 .RAD50 /RSX20F/
001230 000000 .WORD 0
001232 075273 .RAD50 /SYS/
001250 054523 .WORD "SY
125 .IFF
126 BOTDNB: NMBLK$ RSX11M,SYS,,SY ; DEFAULT TO SY:RSX11M.SYS
127 .ENDC
128
129 ;
130 ; I/O STATUS BLOCK
131 ;
132 001254 BOTSTA: .BLKW 2 ;
133
134 ;
135 ; DISK FILE QIO DPB
136 ;
137 .IF DF R$$11M
138 .IFF
139 DSKDPB: .BYTE 1.,11. ; DIC AND LENGTH
140 .WORD 0 ; FUNCTION CODE
141 .WORD LUN2 ; LOGICAL UNIT
142 .WORD EFN1 ; EVENT FLAG TO WAIT ON
143 .WORD BOTSTA ; I/O STATUS BLOCK
144 .WORD 0 ; AST
145 DSKBUF: .WORD 0 ; PARAMETER AREA
146 .WORD 0,0,0,0 ;
147 .IFT
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 21-1
PHASE 1 LOCAL DATA
148 001260 001 014 DSKDPB: .BYTE 1.,12. ; DIC AND LENGTH
149 001262 000000 .WORD 0 ; FUNCTION CODE
150 001264 000002 .WORD LUN2 ;
151 001266 000001 .WORD EFN1 ;
152 001270 001254' .WORD BOTSTA ; I/O STATUS BLOCK
153 001272 000000 .WORD 0 ; AST ADDRESS
154 001274 000000 DSKBUF: .WORD 0 ; PARAMETER AREA
155 001276 000000 000000 000000 .WORD 0,0,0,0,0 ;
001304 000000 000000
156 .ENDC
157
158 ;
159 ; ERROR MESSAGE DPB
160 ;
161 001310 001 014 ERRDPB: .BYTE 1.,12. ; DIC AND LENGTH
162 001312 000000G .WORD IO.WVB ; FUNCTION CODE
163 001314 000001 .WORD LUN1 ; LOGICAL UNIT FOR "CO"
164 001316 000001 .WORD EFN1 ; EVENT FLAG
165 001320 000000 000000 .WORD 0,0 ; I/O STATUS AND AST
166 001324 000000 ERRBUF: .WORD 0 ; BUFFER ADDRESS
167 001326 000000 .WORD 0 ; LENGTH
168 001330 000040 .WORD 40 ; CARRIAGE CONTROL
169
170 ;
171 ; INTIALIZE FSR
172 ;
173 001332 FSRSZ$ 0 ; NO BUFFERS NEEDED
174
175
176 ;
177 ; CONTROL BLOCK FOR FILBN
178 ;
179 001332 000054' LBNBLK: .WORD BOTFDB ; FILE DESCRIPTOR BLOCK ADDRESS
180 001334 001216' .WORD BOTDNB ; DEFAULT NAME BLOCK
181 001336 000000' .WORD BOTCSI ; CSI CONTROL BLOCK ADDRESS
182 001340 .BLKW 2 ; SPACE FOR FILE LBN
183 .IF DF R$$11M
184 001344 .BLKW 1 ; SPACE FOR UNREDIRECTED UCB ADDRESS
185 .ENDC
186 001346 .BLKW 1 ; SPACE FOR FILE SIZE IN BLOCKS
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 22
ERROR MESSAGE
188 .SBTTL ERROR MESSAGE
189
190 001350 015 102 117 ERR1: .ASCIZ <15>/BOO -- SYNTAX ERROR/
001353 117 040 055
001356 055 040 123
001361 131 116 124
001364 101 130 040
001367 105 122 122
001372 117 122 000
191 001375 015 102 117 ERR2: .ASCIZ <15>/BOO -- FILE NOT FOUND/
001400 117 040 055
001403 055 040 106
001406 111 114 105
001411 040 116 117
001414 124 040 106
001417 117 125 116
001422 104 000
192 001424 015 102 117 ERR3: .ASCIZ <15>/BOO -- INVALID LOAD DEVICE/
001427 117 040 055
001432 055 040 111
001435 116 126 101
001440 114 111 104
001443 040 114 117
001446 101 104 040
001451 104 105 126
001454 111 103 105
001457 000
193 001460 015 102 117 ERR4: .ASCIZ <15>/BOO -- FILE NOT CONTIGUOUS/
001463 117 040 055
001466 055 040 106
001471 111 114 105
001474 040 116 117
001477 124 040 103
001502 117 116 124
001505 111 107 125
001510 117 125 123
001513 000
194 001514 015 102 117 ERR5: .ASCIZ <15>/BOO -- DPB ERROR/
001517 117 040 055
001522 055 040 104
001525 120 102 040
001530 105 122 122
001533 117 122 000
195 001536 015 102 117 ERR6: .ASCIZ <15>/BOO -- LABEL BLOCK READ ERROR/
001541 117 040 055
001544 055 040 114
001547 101 102 105
001552 114 040 102
001555 114 117 103
001560 113 040 122
001563 105 101 104
001566 040 105 122
001571 122 117 122
001574 000
196 001575 015 102 117 ERR7: .ASCIZ <15>/BOO -- NOT SYSTEM IMAGE/
001600 117 040 055
001603 055 040 116
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 22-1
ERROR MESSAGE
001606 117 124 040
001611 123 131 123
001614 124 105 115
001617 040 111 115
001622 101 107 105
001625 000
197 001626 015 102 117 ERR8: .ASCIZ <15>/BOO -- NO TRANSFER ADDRESS/
001631 117 040 055
001634 055 040 116
001637 117 040 124
001642 122 101 116
001645 123 106 105
001650 122 040 101
001653 104 104 122
001656 105 123 123
001661 000
198 .IF DF DEBUG
199 ERR10: .ASCIZ <15>/PAR5 SET/
200 ERR11: .ASCIZ <15>/PHASE 2 MOVED/
201 .ENDC
202 001662 015 102 117 ERR14: .ASCIZ <15>/BOO -- DEVICE NOT MOUNTED/
001665 117 040 055
001670 055 040 104
001673 105 126 111
001676 103 105 040
001701 116 117 124
001704 040 115 117
001707 125 116 124
001712 105 104 000
203 .IF DF R$$11M
204 .IFT
205 001715 015 102 117 ERR15: .ASCIZ <15>/BOO -- PRIVILEGED COMMAND/
001720 117 040 055
001723 055 040 120
001726 122 111 126
001731 111 114 105
001734 107 105 104
001737 040 103 117
001742 115 115 101
001745 116 104 000
206 001750 015 102 117 ERR16: .ASCIZ <15>/BOO -- DEVICE NOT IN SYSTEM/
001753 117 040 055
001756 055 040 104
001761 105 126 111
001764 103 105 040
001767 116 117 124
001772 040 111 116
001775 040 123 131
002000 123 124 105
002003 115 000
207 .ENDC
208 .IF DF R$$20F
209 002005 015 102 117 PRIPRM: .ASCIZ <15>/BOO -- PRIMARY PROTOCOL RUNNING/
002010 117 040 055
002013 055 040 120
002016 122 111 115
002021 101 122 131
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 22-2
ERROR MESSAGE
002024 040 120 122
002027 117 124 117
002032 103 117 114
002035 040 122 125
002040 116 116 111
002043 116 107 000
210 002046 102 117 117 BTPRMT: .ASCII /BOO>/
002051 076
211 000004 BTPRML=.-BTPRMT
212 .ENDC ; .IF DF R$$20F
213 .EVEN
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 23
BOOT PHASE I
215 .SBTTL BOOT PHASE I
216
217 ;+
218 ; *** - BOOTEP ENTRY POINT FOR BOOT COMMAND
219 ;
220 ; THIS SECTION OF CODE GETS THE MCR COMMAND LINE
221 ; CALLS CSI TO PARSE AND ANALIZE THE FILE SPECIFICATION.
222 ; IT THEN OPENS THE FILE AND READS THE FIRST BLOCK WHICH
223 ; IS THE LABEL BLOCK. THE SECOND SECTION OF CODE IS THEN
224 ; MOVED TO LOCATION 120000 AND CONTROL IS TRANSFERRED
225 ; THERE TO CONTINUE THE BOOT PROCESS
226 ;
227 ;-
228
229 002052 BOOTEP: FINIT$ ; INIT FCS
002052 004767 000000G JSR PC,.FINIT
230 .IF DF R$$20F
231 .IFF
232 .IF DF R$$11M
233 MOV $TKTCB,R0 ; GET OUR TCB ADDRESS
234 MOV T.UCB(R0),R0 ; GET TI UCB ADDRESS
235 CALL $SWSTK,6$ ; SWITCH TO SYSTEM STATE
236 5$: MOV U.RED(R0),R0 ; FOLLOW REDIRECT POINTER
237 CMP R0,U.RED(R0) ; END?
238 BNE 5$ ; NO CONTINUE DOWN LIST
239 MOV R0,2(SP) ; SET USER STATE R0
240 RETURN ; RETURN TO USER STATE
241 6$: BIT #U2.PRV,U.CW2(R0) ; IS TERMINAL PRIVILEGED?
242 BEQ 12$ ; NO , ERROR
243 .ENDC
244 DIR$ #BOTGCL ; GET MCR COMMAND LINE
245 BCS 10$ ; ERROR
246 MOV #BOTBUF,R0 ; GET BUFFER ADDRESS
247 .IFT
248 002056 012704 002046' MOV #BTPRMT,R4 ; POINT TO PROMPT
249 002062 012703 000004 MOV #BTPRML,R3 ; AND LENGTH
250 002066 CALL .GTCML ; GET THE COMMAND LINE
002066 004767 000000G JSR PC,.GTCML
251 002072 010400 MOV R4,R0 ; COPY THE BUFFER POINTER
252 .ENDC ; .IF DF R$$20F
253 002074 012705 001332' MOV #LBNBLK,R5 ; GET CONTROL BLOCK ADDRESS FOR FILBN
254 002100 CALL $FILBN ; GET FILE LBN
002100 004767 000000G JSR PC,$FILBN
255 002104 103027 BCC 20$ ; SKIP IF NO ERRORS
256 002106 005201 INC R1 ; IS IT SYNTAX?
257 002110 001405 BEQ 10$ ; YES
258 002112 005201 INC R1 ; NO, FILE NOT FOUND?
259 002114 001407 BEQ 15$ ; YES
260 002116 005201 INC R1 ; NO, DEVICE NOT MOUNTED?
261 002120 001407 BEQ 16$ ; YES
262 002122 000412 BR 18$ ; NO, DEVICE NOT IN SYSTEM
263 002124 000167 000672 10$: JMP BTER1 ; YES
264 002130 000167 000600 12$: JMP BTER15 ; PRIVILEGED COMMAND
265 002134 000167 000654 15$: JMP BTER2 ; FILE NOT FOUND
266 002140 000167 000576 16$: JMP BTER14 ; DEVICE NOT MOUNTED
267 002144 000167 000630 17$: JMP BTER4 ;
268 002150 000167 000552 18$: JMP BTER16 ; DEVICE NOT IN SYSTEM
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 23-1
BOOT PHASE I
269 .IF DF R$$20F
270 002154 012705 002005' 199$: MOV #PRIPRM,R5 ; GET MESSAGE ADDRESS
271 002160 000167 000642 JMP BTERR ; AND SEND IT
272 .IFTF
273 002164 005701 20$: TST R1 ; IS FILE CONTIGUOUS?
274 002166 001766 BEQ 17$ ; NO, NOT SYSTEM IMAGE
275 .IFT
276 002170 032767 000000G 000002G BIT #EF.PR1,.COMEF+2 ; PRIMARY PROTOCOL?
277 002176 001366 BNE 199$ ; YES -- PRIMARY PROTOCOL ILLEGAL
278 .ENDC ;.IF DF R$$20F
279 002200 016567 000014 000000G MOV 14(R5),$BTFSZ ; SAVE FILE SIZE IN BLOCKS
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 24
BOOT PHASE I
281 ;
282 ; CHECK FOR VALID DEVICE
283 ;
284 002206 016567 000006 000000G MOV 6(R5),$BTLBN ; SET LBN
285 002214 016567 000010 000002G MOV 10(R5),$BTLBN+2 ;
286 002222 011500 MOV (R5),R0 ; GET FDB ADDRESS
287 002224 012704 000000G MOV #$DVDRV,R4 ; GET ADDRESS OF DRIVER TABLE
288 002230 026064 000134 000000 25$: CMP F.DVNM(R0),DRVNAM(R4) ; IS THIS THE DEVICE?
289 002236 001407 BEQ 30$ ; YES
290 002240 062704 000032 ADD #DRVENT,R4 ; NO, INDEX TO NEXT ENTRY
291 002244 005764 000000 TST DRVNAM(R4) ; END OF TABLE?
292 002250 001367 BNE 25$ ; NO
293 002252 000167 000530 JMP BTER3 ; YES, ERROR
294 002256 016067 000134 000000G 30$: MOV F.DVNM(R0),$BTDEV ; GET DEVICE MNEMONIC
295 002264 016067 000136 000000G MOV F.UNIT(R0),$BTLUN ; SAVE LOGICAL DEVICE NUMBER
296 ;
297 ; READ LABEL BLOCK
298 ;
299 002272 016500 000012 MOV 12(R5),R0 ; GET UCB ADDRESS
300 .IF DF R$$20F
301 .IFF
302 CALL $SWSTK,40$ ; SWITCH TO SYSTEM STATE
303 35$: MOV U.RED(R0),R0 ; FOLLOW REDIRECT POINTER
304 CMP R0,U.RED(R0) ; END OF LIST?
305 BNE 35$ ; NO, CONTINUE DOWN LIST
306 MOV R0,2(SP) ; SET USER R0 WITH UCB ADDRESS
307 RETURN ; RETURN TO USER STATE
308 40$:
309 MOVB U.UNIT(R0),$BTUNT ; SET PHYSICAL UNIT NUMBER
310 MOV U.SCB(R0),R0 ; GET SCB ADDRESS
311 MOV S.CSR(R0),$BTCSR ; SAVE DEVICE CSR ADDRESS
312 .IFT ; .IF DF R$$20F
313 002276 016000 000000G MOV U.RP(R0),R0 ;GET UN-REDIRECTED PUD ENTRY ADDRESS
314 002302 116067 000000G 000000G MOVB U.UN(R0),$BTUNT ; SET PHYSICAL UNIT #
315 002310 016467 000030 000000G MOV DRCSRA(R4),$BTCSR ; SET CSR ADDRESS
316 .ENDC ; .IF DF R$$20F
317 002316 012767 000000G 176736 MOV #IO.RLB,DSKDPB+2 ; SET READ LOGICAL BLOCK FUNCTION
318 002324 012767 000216' 176742 MOV #BOTBUF,DSKBUF ; SET BUFFER ADDRESS
319 002332 012767 001000 176736 MOV #512.,DSKBUF+2 ; SET BUFFER LENGTH
320 002340 005067 176734 CLR DSKBUF+4 ; ZERO CARRIAGE CONTROL
321 002344 016767 000000G 176730 MOV $BTLBN,DSKBUF+6 ; SET HIGH LBN
322 002352 016767 000002G 176724 MOV $BTLBN+2,DSKBUF+10 ; AND LOW
323 002360 DIR$ #DSKDPB ; READ LABEL BLOCK
002360 012746 001260' MOV #DSKDPB,-(SP)
002364 104375 EMT 375
324 002366 103406 BCS 43$ ; ERROR IN DPB
325 002370 WTSE$S #EFN1 ; WAIT TILL DONE
002370 012746 000001 MOV #EFN1,-(SP)
002374 012746 MOV (PC)+,-(SP)
002376 051 002 .BYTE 41.,2
002400 104375 EMT 375
326 002402 103004 BCC 47$ ; OKAY
327 002404 000167 000362 43$: JMP BTER5 ; ERROR
328 002410 000167 000350 44$: JMP BTER6 ;
329 002414 005367 176634 47$: DEC BOTSTA ; ANY I/O ERRORS
330 002420 001373 BNE 44$ ; YES
331 002422 012705 000216' MOV #BOTBUF,R5 ; POINT TO LABEL BLOCK BUFFER
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 24-1
BOOT PHASE I
332 002426 066567 000022 000002G ADD L$BHRB(R5),$BTLBN+2 ; COMPUTE SYSTEM
333 002434 005567 000000G ADC $BTLBN ; IMAGE LBN
334 002440 166567 000022 000000G SUB L$BHRB(R5),$BTFSZ ; COMPUTE LOAD IMAGE LENGTH
335 002446 016567 000014 000000G MOV L$BLDZ(R5),$BTLLN ; SAVE SYSTEM IMAGE LENGTH IN 32 WORD BLOCKS
336 002454 016567 000026 000000G MOV L$BXFR(R5),$BTXFR ; SAVE TRANSFER ADDRESS
337 002462 032765 040000 000010 BIT #TS$NHD,L$BFLG(R5) ; IS THIS SYSTEM IMAGE? (NO HEADER?)
338 002470 001532 BEQ BTER7 ; NO, NOT OP SYSTEM
339 ;
340 ; COMPUTE MAXIMUM IMAGE TO READ
341 ;
342 .IF DF M$$MGE
343 MOV #7560,R1 ; SET 124K-.5K
344 .IFF
345 002472 012701 001560 MOV #1560,R1 ; SET 28K-.5K
346 .ENDC
347 .IF DF R$$20F
348 002476 020167 000000G 50$: CMP R1,.MSIZE ; ABOVE SYSTEM TOP?
349 .IFF
350 50$: CMP R1,$SYSIZ ; ABOVE SYSTEM TOP
351 .ENDC ; .IF DF R$$20F
352 002502 103403 BLO 55$ ; NO
353 002504 162701 000020 SUB #20,R1 ; YES, BACK OFF .5K
354 002510 000772 BR 50$ ; TRY AGAIN
355 002512 010167 000000G 55$: MOV R1,$BTMAX ; SET MAXIMUM READ LENGTH
356 ;
357 ; SET UP DRIVER
358 ;
359 002516 016701 000000G MOV $BTLLN,R1 ; GET LOAD LENGTH IN 32 WORD BLOCKS
360 002522 020167 000000G CMP R1,$BTMAX ; HIGHER THAN TOP OF CORE?
361 002526 101402 BLOS 57$ ; NO
362 002530 016701 000000G MOV $BTMAX,R1 ; YES, USE TOP OF CORE
363 002534 062701 000007 57$: ADD #7,R1 ; ROUND UP TO NEXT LBN
364 002540 006201 ASR R1 ; CONVERT TO NUMBER OF LBNS
365 002542 006201 ASR R1 ;
366 002544 006201 ASR R1 ;
367 002546 005767 000000G TST $BTXFR ; SAVED SYSTEM?
368 002552 001002 BNE 58$ ; NO
369 002554 012701 000001 MOV #1,R1 ; YES, READ ONLY ONE BLOCK
370 002560 010174 000004 58$: MOV R1,@DRVLLN(R4) ; SET LOAD LENGTH
371 002564 005074 000006 CLR @DRVBA(R4) ; SET STARTING BUFFER ADDRESS TO ZERO
372 002570 116474 000020 000010 MOVB DRVRD(R4),@DRVFUN(R4) ; SET READ FUNCTION
373 002576 016774 000000G 000026 MOV $BTCSR,@DRCSR(R4) ; SET CSR ADDRESS
374 002604 010405 MOV R4,R5 ; COPY DRIVER TABLE ENTRY ADDRESS
375 002606 CALL @DRVSET(R5) ; SET UP DRIVER
002606 004775 000002 JSR PC,@DRVSET(R5)
376 002612 056575 000022 000024 BIS DRVUNT(R5),@DRVSEL(R5) ; SET UNIT SELECT
377 ;
378 ; MOVE DRIVER TO CORRECT PLACE IN PHASE2
379 ;
380 002620 016500 000012 MOV DRVADR(R5),R0 ; GET DRIVER ADDRESS
381 002624 016502 000014 MOV DRVLEN(R5),R2 ; GET LENGTH IN WORDS
382 002630 012701 000000G MOV #$DRVER,R1 ; GET DESTINATION ADDRESS
383 002634 012021 60$: MOV (R0)+,(R1)+ ; MOVE DRIVER
384 002636 005302 DEC R2 ; DONE?
385 002640 003375 BGT 60$ ; NO, LOOP
386 ;
387 ; SWITCH TO SYSTEM STATE AND MOVE REST OF BOOT TO TOP OF MEMORY
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 24-2
BOOT PHASE I
388 ;
389 002642 032767 000001 000000G BIT #1,$BTXFR ; IS THERE A TRANSFER ADDRESS (MUST BE EVEN)
390 002650 001037 BNE BTER8 ; NO, ODD ADDRESS
391 .IF DF R$$20F
392 .IFF
393 CALL $SWSTK,90$ ; SWITCH TO SYSTEM STATE
394 .ENDC ;.IF DF R$$20F
395 002652 052737 000340 000000G BIS #340,@#PS ; INHIBIT INTERRUPTS
396 002660 016705 000000G MOV $BTMAX,R5 ;;; GET ADDRESS TO MOVE TO
397 .IF DF M$$MGE
398 MOV R5,@#KISAR6 ;;; SET APR6
399 MOV #1400,R5 ;;; SET TO USE APR6
400 .ENDC
401 002664 010504 MOV R5,R4 ;;; COPY
402 002666 012702 000006 MOV #6,R2 ;;; SET SHIFT COUNT
403 002672 006305 87$: ASL R5 ;;; SHIFT UP
404 002674 005302 DEC R2 ;;; DONE?
405 002676 001375 BNE 87$ ;;; NO, LOOP
406 002700 010504 MOV R5,R4 ;;; SAVE FOR BASE OF PHASE 2
407 002702 012701 000000C MOV #$BTEND-$BTPH2,R1 ;;; SET LENGTH OF MOVE IN BYTES
408 002706 006201 ASR R1 ;;; CONVERT TO WORDS
409 002710 012700 000000G MOV #$BTPH2,R0 ;;; SET SOURCE ADDRESS
410 002714 012024 90$: MOV (R0)+,(R4)+ ;;; MOVE A WORD
411 002716 005301 DEC R1 ;;; DONE
412 002720 001375 BNE 90$ ;;; NO, LOOP
413 .IF DF DEBUG
414 MOV #ERR11,R0
415 CALL TYPE
416 .ENDC
417 002722 000165 000000C JMP $BTEP2-$BTPH2(R5) ;;; GO TO MOVED ROUTINE
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 25
PHASE 1 - ERROR PROCESSING
419 .SBTTL PHASE 1 - ERROR PROCESSING
420
421 002726 012705 001750' BTER16: MOV #ERR16,R5 ; DEVICE NOT IN SYSTEM
422 002732 000435 BR BTERR ;
423 002734 012705 001715' BTER15: MOV #ERR15,R5 ; PRIVILEGED COMMAND
424 002740 000432 BR BTERR ;
425 002742 012705 001662' BTER14: MOV #ERR14,R5 ; DEVICE NOT MOUNTED
426 002746 000427 BR BTERR ;
427 002750 012705 001626' BTER8: MOV #ERR8,R5 ; NO TRANSFER ADDRESS
428 002754 000424 BR BTERR ;
429 002756 012705 001575' BTER7: MOV #ERR7,R5 ; NOT SYSTEM IMAGE
430 002762 000421 BR BTERR ;
431 002764 012705 001536' BTER6: MOV #ERR6,R5 ; LABEL BLOCK READ ERROR
432 002770 000416 BR BTERR ;
433 002772 012705 001514' BTER5: MOV #ERR5,R5 ; DPB ERROR
434 002776 000413 BR BTERR ;
435 003000 012705 001460' BTER4: MOV #ERR4,R5 ; FILE NOT CONTIGUOUS
436 003004 000410 BR BTERR ;
437 003006 012705 001424' BTER3: MOV #ERR3,R5 ; INVALID LOAD DEVICE
438 003012 000405 BR BTERR ;
439 003014 012705 001375' BTER2: MOV #ERR2,R5 ; OPEN ERROR
440 003020 000402 BR BTERR
441 003022 012705 001350' BTER1: MOV #ERR1,R5 ; SYNTAX ERROR
442 003026 010500 BTERR: MOV R5,R0 ; COPY ADDRESS
443 003030 105720 10$: TSTB (R0)+ ; IS NEXT CHAR END?
444 003032 001376 BNE 10$ ; NO, LOOP
445 003034 005300 DEC R0 ; FIX FOR CORRECT COUNT
446 003036 160500 SUB R5,R0 ; COMPUTE LENGTH
447 003040 010567 176260 MOV R5,ERRBUF ; SET BUFFER ADDRESS
448 003044 010067 176256 MOV R0,ERRBUF+2 ; AND LENGTH
449 003050 DIR$ #ERRDPB ; WRITE IT OUT
003050 012746 001310' MOV #ERRDPB,-(SP)
003054 104375 EMT 375
450 003056 103405 BCS 20$ ; ERROR
451 003060 WTSE$S #EFN1 ; WAIT TILL DONE
003060 012746 000001 MOV #EFN1,-(SP)
003064 012746 MOV (PC)+,-(SP)
003066 051 002 .BYTE 41.,2
003070 104375 EMT 375
452 003072 20$: EXIT$S ; EXIT
003072 012746 MOV (PC)+,-(SP)
003074 063 001 .BYTE 51.,1
003076 104375 EMT 375
453 002052' .END BOOTEP
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 25-1
SYMBOL TABLE
BOOTEP 002052R CD.OFL= 010000 DH.CL8= 000003 DM.CTS= 000040 F.BBFS= 000062
BOTBUF 000216R CD.ONL= 000010 DH.CNX= 000400 DM.DNE= 000200 F.BDB = 000070
BOTCSI 000000R CD.PAK= 000002 DH.DOV= 040000 DM.DTR= 000002 F.BGBC= 000057
BOTDNB 001216R CD.PWR= 000400 DH.LPR= 000004 DM.ENB= 000040 F.BKDN= 000026
BOTFDB 000054R CD.RDY= 000200 DH.LVL= 000005 DM.IEN= 000100 F.BKDS= 000020
BOTGCL 000214R CD.STS= 177160 DH.NRC= 000002 DM.INI= 002000 F.BKEF= 000050
BOTSTA 001254R CD.VEC= 000230 DH.NXM= 002000 DM.LE = 000001 F.BKP1= 000051
BR0 = 000000 CD.XAD= 000060 DH.PEN= 000020 DM.LVL= 000004 F.BKST= 000024
BR1 = 000040 CD0DAT= 177162 DH.RIE= 000100 DM.RNG= 000200 F.BKVB= 000064
BR2 = 000100 CD0STS= 177160 DH.SIE= 010000 DM.RTS= 000004 F.CNTG= 000034
BR3 = 000140 CI.INE= 000100 DH.SSR= 000016 DM.SCN= 004000 F.DFNB= 000046
BR4 = 000200 CLKENB= 000100 DH.TIE= 020000 DM.SR = 000020 F.DSPT= 000044
BR5 = 000240 CLKLVL= 000006 DH.VDP= 100000 DM.ST = 000010 F.DVNM= 000134
BR6 = 000300 CLKVEC= 000100 DH..FE= 020000 DM.STP= 000400 F.EFBK= 000010
BR7 = 000340 CLKWRD= 177546 DH..HD= 040000 DM..MM= 001000 F.EFN = 000050
BTERR 003026R CO.INE= 000100 DH..MC= 004000 DRCSR = 000026 G F.EOBB= 000032
BTER1 003022R CO..MM= 000004 DH..MM= 001000 DRCSRA= 000030 F.ERR = 000052
BTER14 002742R CR = 000015 DH..OP= 000040 DRVADR= 000012 G F.FACC= 000043
BTER15 002734R CS.DIF= 000002 DH..PE= 010000 DRVBA = 000006 F.FFBY= 000014
BTER16 002726R CS.DVF= 000004 DH..RI= 000200 DRVENT= 000032 F.FNAM= 000110
BTER2 003014R CS.EQU= 000040 DH..SI= 040000 DRVFUN= 000010 F.FNB = 000102
BTER3 003006R CS.INP= 000001 DH..TI= 100000 DRVLEN= 000014 G F.FTYP= 000116
BTER4 003000R CS.MOR= 000020 DH.2SB= 000004 DRVLLN= 000004 F.FVER= 000120
BTER5 002772R CS.NMF= 000001 DLDADR= 175610 DRVNAM= 000000 F.HIBK= 000004
BTER6 002764R CS.OUT= 000002 DLDSIZ= 000010 DRVRD = 000020 F.LUN = 000042
BTER7 002756R CS.WLD= 000010 DLRBUF= 000002 DRVSEL= 000024 F.MBCT= 000054
BTER8 002750R CTICHR= 177562 DLRSTS= 000000 DRVSET= 000002 F.MBC1= 000055
BTPRML= 000004 CTILVL= 000004 DLXBUF= 000006 DRVUNT= 000022 G F.MBFG= 000056
BTPRMT 002046R CTISTS= 177560 DLXSTS= 000004 DRVWRT= 000016 F.NRBD= 000024
B.DM11= 170500 CTIVEC= 000060 DL.BRK= 000001 DSKBUF 001274R F.NREC= 000030
B0 = 000001 CTOCHR= 177566 DL.CAR= 010000 DSKDPB 001260R F.OVBS= 000030
B1 = 000002 CTOLVL= 000004 DL.CTS= 020000 EFN1 = 000001 F.RACC= 000016
B10 = 002000 CTOSTS= 177564 DL.DIE= 000040 EF.PR1= ****** GX F.RATT= 000001
B11 = 004000 CTOVEC= 000064 DL.DSC= 100000 ERRBUF 001324R F.RCNM= 000034
B12 = 010000 C.CMLD= 000002 DL.DTR= 000002 ERRDPB 001310R F.RCTL= 000017
B13 = 020000 C.DEVD= 000006 DL.ERR= 100000 ERR1 001350R F.RSIZ= 000002
B14 = 040000 C.DIRD= 000012 DL.LVL= 000004 ERR14 001662R F.RTYP= 000000
B15 = 100000 C.DSDS= 000006 DL.OVR= 040000 ERR15 001715R F.STBK= 000036
B2 = 000004 C.FILD= 000016 DL.RGO= 004000 ERR16 001750R F.UNIT= 000136
B3 = 000010 C.MKW1= 000024 DL.RIE= 000100 ERR2 001375R F.URBD= 000020
B4 = 000020 C.MKW2= 000026 DL.RNG= 040000 ERR3 001424R F.VBN = 000064
B5 = 000040 C.SIZE= 000054 DL.ROK= 000200 ERR4 001460R F.VBSZ= 000060
B6 = 000100 C.STAT= 000001 DL.RTS= 000004 ERR5 001514R IO.RLB= ****** GX
B7 = 000200 C.SWAD= 000022 DL.XIE= 000100 ERR6 001536R IO.WVB= ****** GX
B8 = 000400 C.TYPR= 000000 DL.XOK= 000200 ERR7 001575R KL.LVL= 000004
B9 = 001000 DGUTS = 000000 DL..FE= 020000 ERR8 001626R KPAR0 = 172340
CD.CHK= 040000 DHBASE= 160020 DL..MM= 000004 ESC = 000033 KW.INE= 000100
CD.DAT= 177162 DHRFER= 020000 DL..PE= 010000 FIDBIT= 000001 KW.TIC= 000200
CD.DTE= 004000 DHROVR= 040000 DL..RC= 000377 FTASRT= 000001 LBNBLK 001332R
CD.DTL= 002000 DH.AEE= 100000 DL..RE= 000001 FTECHO= 000000 LP.DAT= 177516
CD.EOF= 020000 DH.BAR= 000012 DL..XC= 000377 FTETR = 000000 LP.DNE= 000200
CD.ERR= 100000 DH.BCR= 000010 DL.2RC= 002000 FTGLOM= 000000 LP.ERR= 100000
CD.GO = 000001 DH.BRK= 000014 DL.2XM= 000010 FT.CHK= 000001 LP.INE= 000100
CD.HEM= 000004 DH.CAR= 000006 DMBASE= 170500 FT.DDT= 000000 LP.LVL= 000004
CD.INE= 000100 DH.CL5= 000000 DM.ALI= 000017 FT.D75= 000000 LP.STS= 177514
CD.LVL= 000006 DH.CL6= 000001 DM.BSY= 000020 FT.HLP= 000001 LP.VEC= 000200
CD.NXM= 001000 DH.CL7= 000002 DM.CAR= 000100 F.ALOC= 000040 LP0DAT= 177516
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 25-2
SYMBOL TABLE
LP0STS= 177514 L2.VEC= 000754 R$$11M= 000001 TC.STS= 177340 TS.EET= 000002
LP1DAT= 177522 L20ADR= 000004 R$$20F= 000001 TC.UPS= 000200 TS.EEX= 000400
LP1STS= 177520 L20BCT= 000006 SPA = 000040 TC.US0= 000000 TS.EIS= 002000
LUN1 = 000001 L20BUF= 000014 STKLEN= 000200 TC.US1= 000400 TS.ENT= 000100
LUN2 = 000002 L20CHK= 000017 S.BFHD= 000020 TC.US2= 001000 TS.EPE= 000020
L$BFLG= 000010 L20COL= 000015 S.FATT= 000016 TC.US3= 001400 TS.ETD= 000200
L$BHRB= 000022 L20CRA= 000000 S.FDB = 000140 TC.US4= 002000 TS.IEN= 000001
L$BLDZ= 000014 L20CRB= 000002 S.FNAM= 000006 TC.US5= 002400 TS.IFB= 100000
L$BXFR= 000026 L20PCT= 000010 S.FNB = 000036 TC.US6= 003000 TS.MPE= 001000
L2.A16= 000020 L20PDA= 000016 S.FNBW= 000017 TC.US7= 003400 TS.PEX= 100000
L2.A17= 000040 L20RAM= 000012 S.FNTY= 000004 TC.VEC= 000214 TS.POF= 004000
L2.BCM= 007777 L20STS= 175400 S.FTYP= 000002 TC.WCR= 177344 TS.RES= 004000
L2.DB = 000377 L21STS= 175420 S.NFEN= 000020 TC.WRA= 000016 TS.RM = 000010
L2.DEL= 002000 MM.SR0= 177572 S..AMC= 000000 TC.WTM= 000012 TS.RST= 000100
L2.DH = 002000 MP.ENB= 000001 S..BDT= 000011 TC..BM= 002000 TS.TBM= 000001
L2.DL = 000010 MP.ERR= 100000 S..CHK= 000012 TC..DI= 010000 TS.XDN= 000004
L2.DNR= 000100 MP.LVL= 000007 S..CNK= 000003 TC..DM= 001000 TS.XEC= 010000
L2.DON= 000200 MP.REG= 172100 S..CTY= 000005 TC..EZ= 100000 TS.XEE= 004000
L2.DR = 010000 MP.VEC= 000114 S..DCP= 000013 TC..MM= 020000 TS.XER= 020000
L2.DTE= 000002 MP.WWP= 000004 S..DL1= 000002 TC..RD= 000004 TS.XNT= 100000
L2.ENB= 000100 NXMVEC= 000004 S..DTE= 000002 TC..SE= 004000 TS.XTS= 040000
L2.ERE= 001000 N.DID = 000024 S..ILS= 000004 TC..WR= 000014 TS.ZST= 040000
L2.ERR= 100000 N.DVNM= 000032 S..KW1= 000007 TE.BAS= 174400 U.RP = ****** GX
L2.GER= 000001 N.FID = 000000 S..MEM= 000006 TE.BNX= 000040 U.UN = ****** GX
L2.GO = 000001 N.FNAM= 000006 S..NCN= 000010 TE.DG1= 000030 VRS = 000022
L2.INI= 000400 N.FTYP= 000014 S..NXM= 000001 TE.DG2= 000032 $BTCSR= ****** GX
L2.INT= 004000 N.FVER= 000016 TC.A16= 000020 TE.DG3= 000036 $BTDEV= ****** GX
L2.LDP= 010000 N.NEXT= 000022 TC.A17= 000040 TE.DYC= 000000 $BTEND= ****** GX
L2.LPE= 000040 N.STAT= 000020 TC.BAR= 177346 TE.EAD= 000022 $BTEP2= ****** GX
L2.LVL= 000004 N.UNIT= 000034 TC.CLK= 000100 TE.EBC= 000016 $BTFSZ= ****** GX
L2.MPE= 000020 OB0 = 000001 TC.CMD= 177342 TE.EDT= 000026 $BTLBN= ****** GX
L2.MST= 000004 OB1 = 000002 TC.DAT= 177350 TE.LVL= 000006 $BTLLN= ****** GX
L2.ONL= 004000 OB10 = 000400 TC.DT0= 000020 TE.NNN= 000004 $BTLUN= ****** GX
L2.OVF= 004000 OB11 = 001000 TC.DT1= 000010 TE.STW= 000034 $BTMAX= ****** GX
L2.PCM= 007777 OB12 = 002000 TC.DT2= 000004 TE.VEC= 000774 $BTPH2= ****** GX
L2.PEN= 000002 OB13 = 004000 TC.D16= 000001 TE.XAD= 000020 $BTUNT= ****** GX
L2.PI = 000400 OB14 = 010000 TC.D17= 000002 TE.XA1= 000010 $BTXFR= ****** GX
L2.PNR= 020000 OB15 = 020000 TC.ERR= 100000 TE.XA2= 000012 $DRVER= ****** GX
L2.POL= 000200 OB16 = 040000 TC.ILO= 010000 TE.XBC= 000014 $DVDRV= ****** GX
L2.PZE= 040000 OB17 = 100000 TC.INE= 000100 TE.XDT= 000024 $FILBN= ****** GX
L2.RDB= 007777 OB2 = 000004 TC.LVL= 000006 TE.XW1= 000006 $$ = 000075
L2.RPB= 010000 OB3 = 000010 TC.MMT= 000040 TE.XW2= 000004 .COMEF= ****** GX
L2.RPE= 000010 OB4 = 000020 TC.MTE= 020000 TE.XW3= 000002 .FINIT= ****** G
L2.SPR= 040000 OB5 = 000040 TC.NXM= 000400 TRPVEC= 000034 .FSRCB= ****** G
L2.TB0= 000400 OB6 = 000100 TC.PAR= 040000 TS$NHD= 040000 .GTCML= ****** GX
L2.TB1= 001000 OB7 = 000200 TC.RDA= 000006 TS.CET= 000001 .MSIZE= ****** GX
L2.TB2= 002000 PASS = 000002 TC.RDY= 000200 TS.DEI= 000010 ...PC1= 000054R
L2.TM = 000004 PDP11 = 000040 TC.REV= 004000 TS.DEP= 010000 ...PC2= 001232R
L2.TRN= 001000 PRIPRM 002005R TC.RMT= 000002 TS.EBM= 020000 ...PC3= 000054R
L2.UCD= 020000 PS = ****** GX TC.SAT= 000000 TS.EEE= 000040 ...TPC= 000020
L2.VD = 100000 RD.LVL= 000004 TC.SST= 000010
. ABS. 000000 000
003100 001
$$FSR1 000000 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 5990 WORDS ( 24 PAGES)
BOOT - BOOT NEW SYSTEM MACRO M1113 27-FEB-85 12:04 PAGE 25-3
SYMBOL TABLE
DYNAMIC MEMORY: 7046 WORDS ( 27 PAGES)
ELAPSED TIME: 00:00:26
[52,10]BOOT,[52,20]BOOT/-SP=[52,30]RSXDC,BOOT