Trailing-Edge
-
PDP-10 Archives
-
BB-H311B-RM
-
rsx20f-swskit/listings/mount.lis
There is 1 other file named mount.lis in the archive. Click here to see a list.
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54
TABLE OF CONTENTS
3- 2 TITLE PAGE
4- 39 MACROS AND PARAMETERS
5- 91 LOCAL DATA
6- 112 SCAN COMMAND
7- 260 TYPE-OUT ROUTINES
8- 350 COMMAND ROUTINES
8- 351 COMMAND PARSER ROUTINES
9- 417 END STATEMENT
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 3
1 .TITLE MOUNT -- MCR FUNCTIONS 'MOU' AND 'DMO' FOR RSX-20F
2 .SBTTL TITLE PAGE
3 .IDENT "V001A"
4 ;
5 ;
6 ;
7 ;
8 ;
9 ; COPYRIGHT (C) 1975, 1978 BY
10 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
11 ;
12 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
13 ; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
14 ; OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THERE-
15 ; OF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
16 ; NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
17 ;
18 ; THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
19 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
20 ; CORPORATION.
21 ;
22 ; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
23 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
24 ;
25 ;
26 ;
27 ;
28 ;
29 ; MODULE: MOUNT
30 ;
31 ; VERSION: V001A
32 ;
33 ; AUTHOR: TOM PORCHER
34 ;
35 ; DATE: 13-OCT-75
36 ;
37 ;
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 4
MACROS AND PARAMETERS
39 .SBTTL MACROS AND PARAMETERS
40 ;
41 ; SETUP ASSEMBLY CONDITIONS
42 ;
43 .ENABLE AMA
44 .LIST MEB
45 ;
46 ; MISC. MCALL'S
47 ;
48 .MCALL QIOSY$,ALUN$S,GTSK$S,QIOW$,QIOW$S,RQST$,WSIG$S,EXIT$S,CALL,RETURN,PUSH,POP,SOB,$DEF
49 000000 $DEF
50 000000 QIOSY$
51 ;
52 ; MACROS
53 ;
54 .MACRO TEXT A,R
55 .PSECT TEXT
56 $$$=.
57 .ASCIZ "A"
58 .PSECT
59 MOV #$$$,R
60 .ENDM TEXT
61 ;
62 .MACRO ERR A,B
63 TEXT <B>,R1
64 BR TYPERR
65 .ENDM ERR
66 ;
67 .MACRO ERRD A,B
68 TEXT <B>,R1
69 BR TYPERD
70 .ENDM ERRD
71 ;
72 .MACRO GTSKHD R
73 MOV A.HA(R),R
74 .ENDM GTSKHD
75 ;
76 .MACRO XTSKHD
77 .ENDM XTSKHD
78 ;
79 ; PARAMETERS
80 ;
81 ; LOGICAL UNIT NUMBER ASSIGNMENTS
82 ;
83 000001 CTYLUN= 1 ;I/O TO CTY
84 000002 DSKLUN= 2 ;FOR MOUNTED DEVICE
85 ;
86 ; EVENT FLAGS
87 ;
88 000001 E.FQIO= 1 ;WAIT FOR QUEUE I/O TO COMPLETE
89 000001 EF.QIO=BIT0
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 5
LOCAL DATA
91 .SBTTL LOCAL DATA
92 ;
93 ; IMPURE DATA
94 ;
95 000000 DMOFLG: .BLKW 1 ;1: DISMOUNT FUNCTION
96 000002 QIOSTS: .BLKW 2 ;I/O STATUS OF QUEUE I/O
97 000006 MNTBLK: .BLKW 2 ;MOUNT CONTROL BLOCK
98 000012 DEVNAM: .BLKW 1 ;DEVICE TO MOUNT
99 000014 DEVUNT: .BLKW 1 ; UNIT FOR SAME
100 000016 TYPBUF: .BLKB 80. ;OUTPUT BUFFER FOR MESSAGES
101 000136 CTYBUF: .BLKB 80. ;COMMAND INPUT BUFFER
102 000120 CTYBFL=.-CTYBUF
103 ;
104 ; PURE DATA
105 ;
106 000256 GLNQIO: QIOW$ IO.RLB,CTYLUN,E.FQIO,,QIOSTS,,<CTYBUF,CTYBFL-1>
000256 003 010 .BYTE 3,$$$ARG
000260 001000 .WORD IO.RLB
000262 000001 .WORD CTYLUN
000264 001 000 .BYTE E.FQIO,
000266 000002' .WORD QIOSTS
000270 000000 .WORD
000272 000136' .WORD CTYBUF
000274 000117 .WORD CTYBFL-1
107 ;
108 000276 MNTQIO: QIOW$ IO.APV,DSKLUN,E.FQIO,,QIOSTS,,<,MNTBLK>
000276 003 010 .BYTE 3,$$$ARG
000300 014010 .WORD IO.APV
000302 000002 .WORD DSKLUN
000304 001 000 .BYTE E.FQIO,
000306 000002' .WORD QIOSTS
000310 000000 .WORD
000312 000000 .WORD
000314 000006' .WORD MNTBLK
109 ;
110 000316 RQSTSK: RQST$ XXXACP
000316 013 007 .BYTE 11.,7
000320 114730 003310 .RAD50 /XXXACP/
000324 000000 000000 .WORD 0,0
000330 000000 .WORD
000332 000 000 .BYTE ,
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 6
SCAN COMMAND
112 .SBTTL SCAN COMMAND
113 ;
114 ; HERE ON REQUEST FOR MCR FUNCTION 'MOU' OR 'DMO'
115 ;
116 000334 MOUNT: ALUN$S #CTYLUN,#"TT,#0 ;SET UP FOR CTY
000334 005046 CLR -(SP)
000336 012746 052124 MOV #"TT,-(SP)
000342 012746 000001 MOV #CTYLUN,-(SP)
000346 012746 MOV (PC)+,-(SP)
000350 007 004 .BYTE 7.,4
000352 104375 EMT 375
117 000354 005037 000000' CLR DMOFLG ;ASSUME WE ARE MOUNT
118 000360 TEXT ^\MOU>\,R0
000000 115 117 125 .ASCIZ "MOU>"
000003 076 000
000360 012700 000000' MOV #$$$,R0
119 000364 GTSK$S #TYPBUF ;GET TASK PARAMETERS INTO TYPBUF (SCRATCH)
000364 012746 000016' MOV #TYPBUF,-(SP)
000370 012746 MOV (PC)+,-(SP)
000372 077 002 .BYTE 63.,2
000374 104375 EMT 375
120 000376 103410 BCS PROMPT ;OOPS!!
121 000400 023727 000020' CMP TYPBUF+G.TSTN+2,(PC)+ ;ARE WE
122 000404 015427 .RAD50 /DMO/ ; DISMOUNT TODAY?
123 000406 001004 BNE PROMPT ;NO-- MUST BE MOUNT
124 000410 005237 000000' INC DMOFLG ;YES-- MUST BE DISMOUNT
125 000414 TEXT ^\DMO>\,R0
000005 104 115 117 .ASCIZ "DMO>"
000010 076 000
000414 012700 000005' MOV #$$$,R0
126 ;
127 000420 012704 000016' PROMPT: MOV #TYPBUF,R4 ;POINT TO OUTPUT BUFFER
128 000424 CALL TYPSTR ;TYPE THE STRING
000424 004737 001374' JSR PC,TYPSTR
129 000430 CALL TYPOUT ;FORCE TYPE OUT
000430 004737 001312' JSR PC,TYPOUT
130 000434 DIR$ #GLNQIO ;GET THE COMMAND LINE
000434 012746 000256' MOV #GLNQIO,-(SP)
000440 104375 EMT 375
131 000442 103544 BCS EXIT ;GIVE UP IF THAT FAILED
132 000444 105737 000002' TSTB QIOSTS+0 ;I/O ERROR?
133 000450 002541 BLT EXIT ;ALSO NO GOOD
134 000452 122737 000003 000003' CMPB #'C-100,QIOSTS+1 ;TERMINATED BY ^C?
135 000460 001535 BEQ EXIT ;YES-- GO AWAY
136 ;
137 000462 013705 000004' MOV QIOSTS+2,R5 ;GET END OF BUFFER
138 000466 105065 000136' CLRB CTYBUF(R5) ;MAKE ASCIZ
139 000472 CALL TYPCR ;FINISH OFF INPUT LINE
000472 004737 001302' JSR PC,TYPCR
140 000476 012704 000136' MOV #CTYBUF,R4 ;POINT TO START OF STRING
141 ;
142 ; PARSE THE COMMAND
143 ;
144 000502 CALL GETNB ;SKIP LEADING SPACES
000502 004737 001470' JSR PC,GETNB
145 000506 001712 BEQ MOUNT ;BACK TO PROMPT IF NULL COMMAND
146 000510 CALL GETNAM ;GET THE TWO CHARACTER NAME
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 6-1
SCAN COMMAND
000510 004737 001512' JSR PC,GETNAM
147 000514 103511 BCS SYNERR ;TOO LONG-- COMPLAIN
148 000516 010037 000012' MOV R0,DEVNAM ;REMEMBER IT
149 000522 001506 BEQ SYNERR ;SORRY, CHARLIE
150 000524 CALL GETNUM ;GET THE UNIT #
000524 004737 001570' JSR PC,GETNUM
151 000530 103503 BCS SYNERR ;TOO BIG-- COMPLAIN
152 000532 010037 000014' MOV R0,DEVUNT ;SAVE THAT TOO
153 000536 122724 000072 CMPB #':,(R4)+ ;FOLLOWED BY :?
154 000542 001076 BNE SYNERR ;NO-- MUST HAVE ONE
155 ;
156 000544 ALUN$S #DSKLUN,DEVNAM,DEVUNT ;ASSIGN THE DEVICE
000544 013746 000014' MOV DEVUNT,-(SP)
000550 013746 000012' MOV DEVNAM,-(SP)
000554 012746 000002 MOV #DSKLUN,-(SP)
000560 012746 MOV (PC)+,-(SP)
000562 007 004 .BYTE 7.,4
000564 104375 EMT 375
157 000566 103467 BCS DNAERR ;OOPS-- NO SUCH DEVICE
158 ;
159 000570 013700 000000G MOV .CRTSK,R0 ;GET OUR HEADER ADDRESS
160 000574 GTSKHD R0 ; TO FIND OUR TASK HEADER
000574 016000 000000G MOV A.HA(R0),R0
161 000600 016000 000006G MOV H.LUT+2+<4*<DSKLUN-1>>(R0),R0 ; TO GET PUD ADDRESS
162 000604 XTSKHD ;RESTORE MAPPING
163 000604 016000 000000G MOV U.RP(R0),R0 ;BUT GET REAL DEVICE
164 ;
165 000610 012701 000320' MOV #RQSTSK+R.QSTN,R1 ;POINT TO ACP TASK NAME
166 000614 016011 000000G MOV U.DACP(R0),(R1) ;STORE THE TASK NAME
167 000620 001444 BEQ NACERR ;OOPS-- NO ACP FOR DEVICE
168 ;
169 000622 005737 000000' TST DMOFLG ;THIS DISMOUNT?
170 000626 001063 BNE DISMNT ;YES-- PERFORM THAT
171 000630 005760 000000G TST U.VA(R0) ;IS DEVICE MOUNTED?
172 000634 001142 BNE DAMERR ;YES-- COMPLAIN
173 ;
174 000636 012704 000006' MOV #MNTBLK,R4 ;POINT TO MOUNT CONTROL BLOCK
175 000642 112724 000001 MOVB #1,(R4)+ ;FUNCTION 1: MOUNT
176 000646 110524 MOVB R5,(R4)+ ;SIZE OF STRING
177 000650 012724 000136' MOV #CTYBUF,(R4)+ ;POINT TO THE STRING
178 ;
179 000654 CALL ..FSTD ;FIND STD ADDRESS OF ACP (FROM TASK NAME (R1))
000654 004737 000000G JSR PC,..FSTD
180 000660 001040 BNE GOTACP ;GOT IT-- STORE ADDRESS AND MOUNT
181 ;
182 ; ACP IS NOT INSTALLED-- DO A REQUEST ON THE ACP TO INSTALL IT
183 ;
184 000662 DIR$ #RQSTSK ;REQUEST ACP
000662 012746 000316' MOV #RQSTSK,-(SP)
000666 104375 EMT 375
185 000670 103540 BCS RQSERR ;REQUEST ERROR
186 000672 012704 003410 MOV #60.*30.,R4 ;SET TIME-OUT COUNT FOR INSTAL
187 ;
188 000676 012701 000320' 20$: MOV #RQSTSK+R.QSTN,R1 ;POINT TO ACP TASK NAME
189 000702 CALL ..FSTD ;FIND THE STD ADDRESS
000702 004737 000000G JSR PC,..FSTD
190 000706 001411 BEQ NACERR ;NONE-- INSTAL MUST HAVE FAILED
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 6-2
SCAN COMMAND
191 000710 032762 000000G 000000G BIT #SF.IR,S.FW(R2) ;STILL BEING INSTALLED?
192 000716 001421 BEQ GOTACP ;GOT ACP-- SET IT IN PUD
193 000720 WSIG$S ;STILL BEING INSTALLED-- WAIT A SIGN. EVENT
000720 012746 MOV (PC)+,-(SP)
000722 061 001 .BYTE 49.,1
000724 104375 EMT 375
194 000726 SOB R4,20$ ;TRY FOR ACP AGAIN
000726 005304 DEC R4
000730 001362 BNE 20$
195 ;
196 000732 NACERR: ERR NAC,<NO ACP FOR DEVICE>
000012 116 117 040 .ASCIZ "NO ACP FOR DEVICE"
000015 101 103 120
000020 040 106 117
000023 122 040 104
000026 105 126 111
000031 103 105 000
000732 012701 000012' MOV #$$$,R1
000736 000527 BR TYPERR
197 ;
198 000740 SYNERR: ERR SYN,<SYNTAX ERROR>
000034 123 131 116 .ASCIZ "SYNTAX ERROR"
000037 124 101 130
000042 040 105 122
000045 122 117 122
000050 000
000740 012701 000034' MOV #$$$,R1
000744 000524 BR TYPERR
199 ;
200 000746 DNAERR: ERR DNA,<DEVICE NOT IN SYSTEM>
000051 104 105 126 .ASCIZ "DEVICE NOT IN SYSTEM"
000054 111 103 105
000057 040 116 117
000062 124 040 111
000065 116 040 123
000070 131 123 124
000073 105 115 000
000746 012701 000051' MOV #$$$,R1
000752 000521 BR TYPERR
201 ;
202 000754 EXIT: EXIT$S ;GOODBYE
000754 012746 MOV (PC)+,-(SP)
000756 063 001 .BYTE 51.,1
000760 104375 EMT 375
203 ;
204 000762 042762 000000G 000000G GOTACP: BIC #SF.EX,S.FW(R2) ;SAY NOT TO REMOVE ON EXIT FOR ACP
205 000770 010260 000000G MOV R2,U.ACP(R0) ;SAVE THAT ADDRESS IN THE PUD
206 000774 000411 BR XCTMNT ;DO THE MOUNT (AT LAST)
207 ;
208 000776 DISMNT: CALL GETNB ;SKIP TO EOL, HOPEFULLY
000776 004737 001470' JSR PC,GETNB
209 001002 001356 BNE SYNERR ;NO-- SYNATX ERROR
210 001004 005760 000000G TST U.VA(R0) ;DEVICE MOUNTED?
211 001010 001457 BEQ DNMERR ;NO-- DON'T TRY TO DISMOUNT IT AGAIN
212 001012 012737 000002 000006' MOV #2,MNTBLK ;SET FUNCTION: DISMOUNT
213 ;
214 001020 XCTMNT: DIR$ #MNTQIO ;PERFORM THE MOUNT/DISMOUNT
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 6-3
SCAN COMMAND
001020 012746 000276' MOV #MNTQIO,-(SP)
001024 104375 EMT 375
215 001026 103453 BCS MTEERR ;OOPS
216 001030 105737 000002' TSTB QIOSTS+0 ;MOUNT FAILED??
217 001034 002450 BLT MTEERR ;YES-- COMPLAIN
218 001036 005737 000000' TST DMOFLG ;THIS DISMOUNT?
219 001042 001434 BEQ MNTCMP ;NO-- JUST SAY DONE
220 ;
221 ; DISMOUNT -- REMOVE ACP IF NO OTHER PUD'S SAY THEY WANT IT
222 ;
223 001044 005760 000000G TST U.VA(R0) ;DISMOUNT SUCCEED??
224 001050 001045 BNE DCDERR ;NO-- ERROR
225 001052 012701 000320' MOV #RQSTSK+R.QSTN,R1 ;POINT TO TASK NAME
226 001056 021127 CMP (R1),(PC)+ ;IS THIS
227 001060 025167 .RAD50 /F11/ ; FILES-11 TASK?
228 001062 001424 BEQ MNTCMP ;YES-- NEVER REMOVE THAT!!!!!!
229 001064 CALL ..FSTD ;FIND IT'S STD ADDDR
001064 004737 000000G JSR PC,..FSTD
230 001070 001421 BEQ MNTCMP ;NONE-- MUST ALREADY BE REMOVED
231 ;
232 001072 012704 000000G MOV #.PUDBA,R4 ;POINT TO START OF PUD
233 ;
234 001076 026402 000000G 20$: CMP U.ACP(R4),R2 ;THIS PUD USING THIS ACP?
235 001102 001414 BEQ MNTCMP ;YES-- NO NEED TO REMOVE
236 001104 062704 000000G ADD #U.SZ,R4 ;POINT TO NEXT PUD ENTRY
237 001110 020427 000000G CMP R4,#.PUDEA ;THIS THE END OF PUD?
238 001114 103770 BLO 20$ ;NO-- KEEP ON LOOKING
239 ;
240 001116 052762 000000G 000000G BIS #SF.EX,S.FW(R2) ;NO-ONE ELSE USING THIS ACP -- SET TO REMOVE ON EXIT
241 001124 DIR$ #RQSTSK ;REQUEST THE ACP TO REMOVE IT
001124 012746 000316' MOV #RQSTSK,-(SP)
001130 104375 EMT 375
242 001132 103417 BCS RQSERR ;OOPS-- REQUEST ERROR
243 ;
244 ; MOU/DMO COMPLETE
245 ;
246 001134 MNTCMP: ERRD MTC,<MOUNT COMPLETE>
000076 115 117 125 .ASCIZ "MOUNT COMPLETE"
000101 116 124 040
000104 103 117 115
000107 120 114 105
000112 124 105 000
001134 012701 000076' MOV #$$$,R1
001140 000420 BR TYPERD
247 ;
248 001142 DAMERR: ERR DAM,<DEVICE ALREADY MOUNTED>
000115 104 105 126 .ASCIZ "DEVICE ALREADY MOUNTED"
000120 111 103 105
000123 040 101 114
000126 122 105 101
000131 104 131 040
000134 115 117 125
000137 116 124 105
000142 104 000
001142 012701 000115' MOV #$$$,R1
001146 000423 BR TYPERR
249 ;
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 6-4
SCAN COMMAND
250 001150 DNMERR: ERR DNM,<DEVICE NOT MOUNTED>
000144 104 105 126 .ASCIZ "DEVICE NOT MOUNTED"
000147 111 103 105
000152 040 116 117
000155 124 040 115
000160 117 125 116
000163 124 105 104
000166 000
001150 012701 000144' MOV #$$$,R1
001154 000420 BR TYPERR
251 ;
252 001156 MTEERR: ERRD MTE,<MOUNT ERROR>
000167 115 117 125 .ASCIZ "MOUNT ERROR"
000172 116 124 040
000175 105 122 122
000200 117 122 000
001156 012701 000167' MOV #$$$,R1
001162 000407 BR TYPERD
253 ;
254 001164 DCDERR: ERR DCD,<DEVICE CANNOT BE DISMOUNTED>
000203 104 105 126 .ASCIZ "DEVICE CANNOT BE DISMOUNTED"
000206 111 103 105
000211 040 103 101
000214 116 116 117
000217 124 040 102
000222 105 040 104
000225 111 123 115
000230 117 125 116
000233 124 105 104
000236 000
001164 012701 000203' MOV #$$$,R1
001170 000412 BR TYPERR
255 ;
256 001172 RQSERR: ERR RQS,<ACP REQUEST ERROR>
000237 101 103 120 .ASCIZ "ACP REQUEST ERROR"
000242 040 122 105
000245 121 125 105
000250 123 124 040
000253 105 122 122
000256 117 122 000
001172 012701 000237' MOV #$$$,R1
001176 000407 BR TYPERR
257 ;
258 001200 000665 EXITA: BR EXIT
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 7
TYPE-OUT ROUTINES
260 .SBTTL TYPE-OUT ROUTINES
261 ;
262 ; TYPERD/TYPERD -- TYPE ERROR MESSAGE
263 ; CALLED BY ERROR MACRO, JMP TYPERR/TYPERD
264 ;
265 001202 005737 000000' TYPERD: TST DMOFLG ;THIS DISMOUNT?
266 001206 001410 BEQ TYPERM ;NO-- MOUNT
267 001210 TEXT <DMO -- DIS>,R0
000261 104 115 117 .ASCIZ "DMO -- DIS"
000264 040 055 055
000267 040 104 111
000272 123 000
001210 012700 000261' MOV #$$$,R0
268 001214 000407 BR TYPERX ;DO THE STRING
269 ;
270 001216 TYPERR: TEXT <DMO -- >,R0 ;ASSUME DISMOUNT
000274 104 115 117 .ASCIZ "DMO -- "
000277 040 055 055
000302 040 000
001216 012700 000274' MOV #$$$,R0
271 001222 005737 000000' TST DMOFLG ;DISMOUNT?
272 001226 001002 BNE TYPERX ;YES-- TYPE IT
273 ;
274 001230 TYPERM: TEXT <MOU -- >,R0 ;SAY MOUNT
000304 115 117 125 .ASCIZ "MOU -- "
000307 040 055 055
000312 040 000
001230 012700 000304' MOV #$$$,R0
275 ;
276 001234 012704 000016' TYPERX: MOV #TYPBUF,R4 ;POINT TO TYPE-OUT BUFFER
277 001240 CALL TYPSTR ;PUT THE PREFIX AWAY
001240 004737 001374' JSR PC,TYPSTR
278 001244 010100 MOV R1,R0 ;COPY ERROR STRING
279 001246 CALL TYPSTR ;TYPE THAT TOO
001246 004737 001374' JSR PC,TYPSTR
280 001252 PUSH #MOUNT ;GO TO MOUNT WHEN DONE
001252 012746 000334' MOV #MOUNT,-(SP)
281 001256 113700 000002' MOVB QIOSTS+0,R0 ;GET QUEUE I/O STATUS
282 001262 002403 BLT 20$ ;ERROR-- REPORT CODE
283 001264 113700 000000G MOVB $DSW,R0 ;OK-- IS THERE A DIRECTIVE ERROR?
284 001270 002004 BGE TYPCR ;NO-- JUST CRLF IT OFF
285 001272 112724 000040 20$: MOVB #' ,(R4)+ ;YES-- SPACE IT OUT
286 001276 CALL TYPDEC ;TYPE THE ERROR CODE
001276 004737 001404' JSR PC,TYPDEC
287 ; BR TYPCR ;TYPE CRLF IT OFF
288 ;
289 ; TYPCR -- TYPE A <CR><LF>
290 ; THIS ALSO FORCES OUT THE OUTPUT BUFFER
291 ;
292 001302 112724 000015 TYPCR: MOVB #15,(R4)+ ;DO A <CR>
293 001306 112724 000012 MOVB #12,(R4)+ ; AND A <CR>
294 ; BR TYPOUT ;FORCE THE OUTPUT OUT
295 ;
296 ; TYPOUT -- FORCE TYPE-OUT BUFFER TO BE TYPED OUT
297 ;
298 001312 012700 000016' TYPOUT: MOV #TYPBUF,R0 ;POINT TO TYPE-OUT BUFFER
299 001316 160004 SUB R0,R4 ;COMPUTE LENGTH OF BUFFER
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 7-1
TYPE-OUT ROUTINES
300 001320 QIOW$S #IO.WLB,#CTYLUN,#E.FQIO,,#QIOSTS,,<R0,R4,#0>
001320 005046 CLR -(SP)
001322 010446 MOV R4,-(SP)
001324 010046 MOV R0,-(SP)
001326 005046 CLR -(SP)
001330 012746 000002' MOV #QIOSTS,-(SP)
001334 005046 CLR -(SP)
001336 112716 000001 MOVB #E.FQIO,(SP)
001342 012746 000001 MOV #CTYLUN,-(SP)
001346 012746 000400 MOV #IO.WLB,-(SP)
001352 012746 MOV (PC)+,-(SP)
001354 003 011 .BYTE 3,$$$T1
001356 104375 EMT 375
301 001360 103707 BCS EXITA ;GIVE UP IF WE CAN'T TYPE
302 001362 105737 000002' TSTB QIOSTS+0 ;FAILED OTHERWIZE?
303 001366 002704 BLT EXITA ;YES-- ALSO GIVE UP
304 ;
305 001370 010004 MOV R0,R4 ;POINT R4 BACK TO BEGINNING OF THE BUFFER
306 001372 RETURN ;THAT'S ALL, FOR TYPOUT
001372 000207 RTS PC
307 ;
308 ; TYPSTR -- TYPE A STRING
309 ; R0 -- ADDRESS OF ASCIZ STRING
310 ;
311 001374 112024 TYPSTR: MOVB (R0)+,(R4)+ ;COPY THE CHARACTER
312 001376 001376 BNE TYPSTR ;LOOP FOR ALL
313 001400 105744 TSTB -(R4) ;DONE-- BACK OVER NULL BYTE
314 001402 RETURN ;RETURN FROM TYPSTR
001402 000207 RTS PC
315 ;
316 ; TYPDEC -- TYPE A DECIMAL NUMBER
317 ; R0 -- NUMBER
318 ;
319 001404 012702 000012 TYPDEC: MOV #10.,R2 ;SET RADIX TO DECIMAL
320 001410 CALL TYPNUM ;TYPE THE NUMBER
001410 004737 001426' JSR PC,TYPNUM
321 001414 112724 000056 MOVB #'.,(R4)+ ;STORE A . FOR DECIMAL
322 001420 RETURN ;FROM TYPDEC
001420 000207 RTS PC
323 ;
324 ; TYPOCT -- TYPE AN OCTAL NUMBER
325 ; R0 -- NUMBER
326 ;
327 001422 012702 000010 TYPOCT: MOV #8.,R2 ;SET RADIX TO OCTAL
328 ; BR TYPNUM ;TYPE OCTAL AND RETURN
329 ;
330 ; TYPNUM -- TYPE A NUMBER
331 ; R0 -- NUMBER
332 ; R2 -- RADIX
333 ;
334 001426 005700 TYPNUM: TST R0 ;NEGATIVE #?
335 001430 002003 BGE 20$ ;NO-- OK
336 001432 005400 NEG R0 ;YES-- MAKE IT POSITIVELY
337 001434 112724 000055 MOVB #'-,(R4)+ ;AND SHOW IT IS NEGATIVE
338 ;
339 001440 010201 20$: MOV R2,R1 ;GET RADIX AS DIVISOR
340 001442 CALL $DIV ;CRANK OUT A DIGIT
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 7-2
TYPE-OUT ROUTINES
001442 004737 000000G JSR PC,$DIV
341 001446 062701 000060 ADD #'0,R1 ;CONVERT REMAINDER TO AN ASCII DIGIT
342 001452 PUSH R1 ;SAVE REMAINDER AS A DIGIT
001452 010146 MOV R1,-(SP)
343 001454 005700 TST R0 ;ALL DONE YET?
344 001456 001402 BEQ 30$ ;YES-- START UNLOADING THE DIGITS
345 001460 CALL 20$ ;NO-- RECURSE UNTIL WE STACK ALL THE DIGITS
001460 004737 001440' JSR PC,20$
346 ;
347 001464 112624 30$: MOVB (SP)+,(R4)+ ;RESTORE A DIGIT TO THE STRING
348 001466 RETURN ;TO GET ANOTHER DIGIT OR AWAY FROM TYPNUM
001466 000207 RTS PC
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 8
COMMAND ROUTINES
350 .SBTTL COMMAND ROUTINES
351 .SBTTL COMMAND PARSER ROUTINES
352 ;
353 ; GETNB -- GET NEXT NON-BLANK CHARACTER
354 ; CC-Z SET IF END-OF-LINE ENCOUNTERED
355 ;
356 001470 112401 GETNB: MOVB (R4)+,R1 ;GET THE NEXT CHARACTER
357 001472 122701 000040 CMPB #' ,R1 ;BLANK?
358 001476 001774 BEQ GETNB ;YES-- GET ANOTHER
359 001500 122701 000011 CMPB #' ,R1 ;OR TAB?
360 001504 001771 BEQ GETNB ;YES-- ALSO BLANK
361 001506 105744 TSTB -(R4) ;NO-- BACK OVER THAT CHARACTER & SET CC-Z
362 001510 RETURN ;RETURN FROM GETNB
001510 000207 RTS PC
363 ;
364 ; GETNAM -- GET TWO-CHARACTER ALPHABETIC NAME
365 ; RETURNS WITH NON-ALPHABETIC CHARACTER
366 ; R0 -- (LOW BYTE) FIRST CHAR (HIGH BYTE) SECOND CHAR
367 ; CC-C SET IF MORE THAN TWO CHARACTERS
368 ;
369 001512 005000 GETNAM: CLR R0 ;CLEAR ANSWER
370 001514 005001 CLR R1 ;AND ERROR FLAG
371 001516 122714 000101 10$: CMPB #'A,(R4) ;THIS ALPHA?
372 001522 101020 BHI 50$ ;NO-- JUST RETURN
373 001524 121427 000132 CMPB (R4),#'Z ;IS IT IN RANGE?
374 001530 101015 BHI 50$ ;NO-- RETURN
375 001532 005700 TST R0 ;YES-- GOT A BYTE YET?
376 001534 001002 BNE 20$ ;YES-- STORE SECOND BYTE
377 001536 112400 MOVB (R4)+,R0 ;NO-- STORE FIRST BYTE
378 001540 000766 BR 10$ ;LOOP FOR MORE CHARS
379 ;
380 001542 000300 20$: SWAB R0 ;GET HIGH BYTE
381 001544 001003 BNE 30$ ;ALREADY THERE-- SET CC-C
382 001546 152400 BISB (R4)+,R0 ;NONE-- SET THIS CHAR IN HIGH BYTE
383 001550 000300 SWAB R0 ;AND RESTORE TO PROPER ORDER
384 001552 000761 BR 10$ ;TRY FOR ANOTHER CHARACTER
385 ;
386 001554 000261 30$: SEC ;TWO CHARS ALREADY-- SET THE CARRY
387 001556 006101 ROL R1 ;AND SAVE IT
388 001560 105724 TSTB (R4)+ ;SKIP THE CHARACTER
389 001562 000755 BR 10$ ;BACK TILL NON-ALPHA
390 ;
391 001564 006001 50$: ROR R1 ;SET CC-C IF WE HAD TOO MUCH
392 001566 RETURN ;AND RETURN FROM GETNAM
001566 000207 RTS PC
393 ;
394 ; GETNUM -- GET OCTAL NUMBER
395 ;
396 ; RETURNS WITH NON-DIGIT OR IF MORE THAN A BYTE'S WORTH
397 ; R0 -- (LOW) NUMBER
398 ; CC-C SET IF LARGER THAN ONE BYTE
399 ;
400 001570 005000 GETNUM: CLR R0 ;CLEAR RESULT
401 001572 112401 10$: MOVB (R4)+,R1 ;GET A DIGIT
402 001574 162701 000060 SUB #'0,R1 ;TRIM DOWN TO DIGIT
403 001600 103413 BLO 40$ ;NOT A DIGIT-- GIVE UP
404 001602 022701 000007 CMP #7,R1 ;TOO HIGH?
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 8-1
COMMAND PARSER ROUTINES
405 001606 103410 BLO 40$ ;YES-- GIVE UP WITH CC-C CLEAR
406 000003 .REPT 3
407 ASLB R0 ;SHIFT OLD NUMBER A BIT
408 BCS 50$ ;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
409 .ENDR
001610 106300 ASLB R0 ;SHIFT OLD NUMBER A BIT
001612 103407 BCS 50$ ;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
001614 106300 ASLB R0 ;SHIFT OLD NUMBER A BIT
001616 103405 BCS 50$ ;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
001620 106300 ASLB R0 ;SHIFT OLD NUMBER A BIT
001622 103403 BCS 50$ ;CARRY OUT-- NUMBER TOO BIG-- CC-C SET
410 001624 060100 ADD R1,R0 ;ACCUMULATE THIS DIGIT
411 001626 000761 BR 10$ ;FETCH ANOTHER DIGIT
412 ;
413 001630 000241 40$: CLC ;CLEAR THE CARRY, GOOD RETURN
414 001632 105744 50$: TSTB -(R4) ;BACK OVER BAD CHARACTER
415 001634 RETURN ;FROM GETNUM
001634 000207 RTS PC
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 9
END STATEMENT
417 .SBTTL END STATEMENT
418 000334' .END MOUNT
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 9-1
SYMBOL TABLE
A.HA = ****** GX DISMNT 000776R G.TSTS= 000032 IE.MOD= 177753 IO.DCT= 002470
BIT0 = 000001 DLYCNT= 174400 G.TSVA= 000026 IE.NBF= 177731 IO.DEL= 012400
BIT1 = 000002 DMOFLG 000000R G.TSVL= 000030 IE.NBK= 177727 IO.DET= 002000
BIT10 = 002000 DNAERR 000746R HIBYTE= 177400 IE.NFI= 177704 IO.DIS= 016000
BIT11 = 004000 DNMERR 001150R H.LUT = ****** GX IE.NLN= 177733 IO.DTI= 016000
BIT12 = 010000 DON10C= 040000 IE.ABO= 177761 IE.NNC= 177674 IO.ENA= 006000
BIT13 = 020000 DON10S= 100000 IE.ACT= 177771 IE.NOD= 177751 IO.EOF= 003000
BIT14 = 040000 DON11C= 000100 IE.ADP= 177636 IE.NSF= 177746 IO.ESA= 002500
BIT15 = 100000 DON11S= 000200 IE.ALN= 177736 IE.OFL= 177677 IO.EXT= 011400
BIT2 = 000004 DPS4 = 040000 IE.AST= 177660 IE.ONP= 177773 IO.FDX= 003020
BIT3 = 000010 DRESET= 000100 IE.BAD= 177777 IE.OVR= 177756 IO.FNA= 004400
BIT4 = 000020 DR.DTE= 000011 IE.BBE= 177710 IE.PRI= 177760 IO.HDX= 003010
BIT5 = 000040 DSEND = 000004 IE.BDI= 177714 IE.RAC= 177724 IO.HIS= 015000
BIT6 = 000100 DSKLUN= 000002 IE.BDR= 177716 IE.RAT= 177723 IO.INL= 002400
BIT7 = 000200 DS04 = 004000 IE.BDV= 177711 IE.RBG= 177730 IO.ITI= 017000
BIT8 = 000400 DS05 = 002000 IE.BHD= 177700 IE.RCN= 177722 IO.KIL= 000012
BIT9 = 001000 DS06 = 001000 IE.BLK= 177754 IE.RER= 177740 IO.LED= 012000
BPARER= 000020 DTECMD= 000451 IE.BNM= 177712 IE.RNM= 177715 IO.LOV= 001010
CDD = 000020 DTEFLG= 000444 IE.BTF= 177675 IE.RSU= 177757 IO.LTK= 000050
CHNPNT= 000001 DTEF11= 000450 IE.BTP= 177725 IE.SDP= 177635 IO.MCS= 013400
CNUPE = 000002 DTEMTD= 000455 IE.BVR= 177701 IE.SNC= 177735 IO.MDA= 016000
CS.EXP= 177670 DTEMTI= 000456 IE.BYT= 177755 IE.SPC= 177772 IO.MDI= 014400
CTYBFL= 000120 DUPE = 000020 IE.CKP= 177766 IE.SQC= 177734 IO.MDO= 015400
CTYBUF 000136R DURE = 000004 IE.CKS= 177742 IE.SRE= 177762 IO.MLO= 006000
CTYLUN= 000001 DXWRD1= 002000 IE.CLO= 177732 IE.STK= 177706 IO.MOD= 003000
CYCLS = 000002 D1011 = 000040 IE.CON= 177752 IE.ULN= 177773 IO.MSO= 005000
DAMERR 001142R EBSEL = 000100 IE.DAA= 177770 IE.UPN= 177777 IO.RAL= 001010
DATE = 000004 EBUSPC= 000020 IE.DAO= 177763 IE.VER= 177774 IO.RAT= 013000
DCDERR 001164R EBUSPS= 000004 IE.DFU= 177750 IE.WAC= 177743 IO.RBC= 003000
DCOMST= 000001 EDONES= 040000 IE.DNA= 177771 IE.WAT= 177741 IO.RCI= 015000
DEP = 010000 EF.QIO= 000001 IE.DNR= 177775 IE.WER= 177737 IO.RCV= 015000
DEVNAM 000012R EPTR = 000000 IE.DUN= 177767 IE.WLK= 177764 IO.RDB= 001200
DEVUNT 000014R ERR10C= 010000 IE.DUP= 177707 IE.2DV= 177720 IO.RDN= 000022
DEX = 000400 ERR10S= 020000 IE.EBX= 177776 IFLOP = 100000 IO.REL= 013400
DEXDON= 000004 ERR11C= 000001 IE.EOF= 177766 INTROF= 000010 IO.RHD= 001010
DEXWD1= 174406 ERR11S= 000002 IE.EOT= 177702 INTRON= 000040 IO.RLB= 001000
DEXWD2= 174404 EXIT 000754R IE.EOV= 177765 INTSON= 000001 IO.RLV= 001100
DEXWD3= 174402 EXITA 001200R IE.EXP= 177676 INT10S= 000400 IO.RNA= 005400
DFUNC = 000200 E$$MSG= 000001 IE.FEX= 177717 INT11C= 002000 IO.RNC= 001004
DF.DMG= 000004 E$$TRP= 000001 IE.FHE= 177705 INT11S= 004000 IO.RNE= 001020
DF.DMN= 000007 E.FQIO= 000001 IE.FOP= 177713 IO.ACE= 007400 IO.RTC= 003400
DF.DOR= 000001 FORPRO= 000020 IE.HFU= 177744 IO.ACR= 006400 IO.RTI= 016400
DF.EHG= 000010 F$$LVL= 000001 IE.HWR= 177772 IO.ACW= 007000 IO.RTK= 000060
DF.EHM= 000011 GETNAM 001512R IE.IDU= 177644 IO.ADS= 014000 IO.RVB= 010400
DF.EMG= 000005 GETNB 001470R IE.IEF= 177637 IO.APC= 014000 IO.RWD= 002400
DF.EMN= 000006 GETNUM 001570R IE.IFC= 177776 IO.APV= 014010 IO.RWU= 002540
DF.KLR= 000012 GLNQIO 000256R IE.IFU= 177747 IO.ATT= 001400 IO.R1C= 002400
DF.KLW= 000013 GOTACP 000762R IE.ILL= 177726 IO.CCI= 014000 IO.SAO= 004000
DF.KLX= 000014 G.TSFW= 000024 IE.ILU= 177640 IO.CCT= 002460 IO.SCS= 013000
DF.OFF= 000002 G.TSGC= 000017 IE.INS= 177776 IO.CLN= 003400 IO.SDI= 013000
DF.ON = 000003 G.TSMT= 000022 IE.IPR= 177641 IO.CON= 015400 IO.SDO= 012400
DF.PDP= 000016 G.TSNL= 000020 IE.ISQ= 177703 IO.CRC= 001020 IO.SEC= 002520
DF.PEX= 000015 G.TSPC= 000016 IE.ITI= 177643 IO.CRE= 012000 IO.SEM= 002440
DIAG1 = 174430 G.TSPN= 000004 IE.ITS= 177770 IO.CTI= 015400 IO.SHT= 002410
DIAG2 = 174432 G.TSPR= 000014 IE.LCK= 177745 IO.CTL= 016400 IO.SLO= 005400
DIAG3 = 174436 G.TSRN= 000010 IE.LNL= 177646 IO.DAC= 010000 IO.SMO= 002560
DIKL10= 000010 G.TSTN= 000000 IE.MBK= 177721 IO.DCI= 014400 IO.SNM= 002450
MOUNT -- MCR FUNCTIONS 'MOU' AN MACRO M1108 05-DEC-77 20:54 PAGE 9-2
SYMBOL TABLE
IO.SPB= 002420 PROPNT= 000021 R.QSGC= 000015 TYPERX 001234R .LCRDR= 051000
IO.SPF= 002440 PRTOFF= 004000 R.QSPC= 000014 TYPNUM 001426R .LCRM1= 057000
IO.SSO= 004400 PR0 = 000000 R.QSPN= 000006 TYPOCT 001422R .LCRM2= 056000
IO.SST= 002430 PR1 = 000040 R.QSPR= 000012 TYPOUT 001312R .LCRM3= 055000
IO.STC= 002500 PR2 = 000100 R.QSTN= 000002 TYPSTR 001374R .LCRM4= 054000
IO.STP= 016400 PR3 = 000140 SCD = 000040 UNASG1= 000032 .LCRM5= 053000
IO.SYN= 003040 PR4 = 000200 SF.EX = ****** GX UNASG2= 000033 .LDAR = 077000
IO.TRM= 002410 PR5 = 000240 SF.IR = ****** GX UNASG3= 000034 .LDBRL= 043000
IO.UNL= 000042 PR6 = 000300 STAT = 174434 UNASG4= 000035 .LDBRR= 042000
IO.WAT= 013400 PR7 = 000340 STATUS= 000022 UNASG5= 000036 .LDCK1= 046000
IO.WLB= 000400 PS = 177776 SWR = 177570 UNASG6= 000037 .LDCK2= 047000
IO.WLS= 000410 PSWW1 = 000005 SWSLLT= 100000 U.ACP = ****** GX .LDDIS= 045000
IO.WLV= 000500 PSWW10= 000014 SYNERR 000740R U.DACP= ****** GX .LDRJD= 064000
IO.WVB= 011000 PSWW11= 000015 S.FW = ****** GX U.RP = ****** GX .LDRJV= 063000
IO.XMT= 014400 PSWW12= 000016 TENAD1= 174410 U.SZ = ****** GX .LDRM1= 060000
IO.XNA= 014410 PSWW13= 000017 TENAD2= 174412 U.VA = ****** GX .LDRM2= 061000
IQ.Q = 000002 PSWW2 = 000006 TOBM = 000004 WEP = 000010 .LDRM3= 062000
IQ.X = 000001 PSWW3 = 000007 TOD = 000003 XCTMNT 001020R .LDSEL= 044000
IS.BV = 000005 PSWW4 = 000010 TOIP = 000002 ZSTOP = 040000 .MEMRS= 076000
IS.CLR= 000000 PSWW5 = 000011 TOIT = 000001 $DIV = ****** GX .PCAB1= 150000
IS.CR = 006401 PSWW6 = 000012 TO10 = 000200 $DSW = ****** GX .PCAB2= 151000
IS.ESC= 015401 PSWW7 = 000013 TO10AD= 174420 $$ = 000037 .PCAB3= 152000
IS.PND= 000000 PULSE = 000020 TO10BC= 174414 $$MSG = 000000 .PCAB4= 153000
IS.RDD= 000002 QIOSTS 000002R TO10BM= 000001 $$$ = 000304R 002 .PUDBA= ****** GX
IS.SET= 000002 QSIZE = 000023 TO10DB= 000400 $$$ARG= 000003 .PUDEA= ****** GX
IS.SUC= 000001 Q.IOAE= 000012 TO10DN= 100000 $$$OST= 000034 .RCRM1= 147000
KLPWRF= 000010 Q.IOEF= 000006 TO10DT= 174424 $$$T1 = 000011 .RCRM2= 146000
LOAD11= 000004 Q.IOFN= 000002 TO10ER= 020000 .BRCLK= 005000 .RCRM3= 145000
MNTBLK 000006R Q.IOLU= 000004 TO11 = 000100 .CECLK= 004000 .RCRM4= 144000
MNTCMP 001134R Q.IOPL= 000014 TO11AD= 174422 .CLRMR= 006000 .RCSPF= 141000
MNTQIO 000276R Q.IOPR= 000007 TO11BC= 174416 .CLRUN= 010000 .RDJ14= 134000
MOUNT 000334R Q.IOSB= 000010 TO11BM= 020000 .CONBT= 012000 .RDJ71= 135000
MPE11 = 001000 RAMIS0= 010000 TO11DB= 004000 .CRTSK= ****** GX .RDMAB= 133000
MTEERR 001156R RFMAD0= 100000 TO11DN= 000200 .CSHRG= 164000 .SECLK= 003000
M$$HDR= 000001 RFMAD1= 040000 TO11DT= 174426 .DRLTC= 015000 .SETMR= 007000
NACERR 000732R RFMAD2= 020000 TO11ER= 000002 .DSACF= 066000 .SETRN= 011000
NULSTP= 000040 RFMAD3= 010000 TYPBUF 000016R .DSIOJ= 065000 .SSCLK= 002000
NUPE = 000002 RM = 000010 TYPCR 001302R .EIOJA= 067000 .STPCL= 000000
PERCLR= 001000 RQSERR 001172R TYPDEC 001404R .GFNR = 102000 .STRCL= 001000
PHYS = 100000 RQSTSK 000316R TYPERD 001202R .INICL= 070000 .WRMBX= 071000
PIDENT= 000000 R$$10F= 000001 TYPERM 001230R .IRLTC= 014000 ..FSTD= ****** GX
PRI7 = 000340 R$$11D= 000001 TYPERR 001216R .LCRDL= 052000 ...GBL= 000000
PROMPT 000420R R$$20F= 000001
. ABS. 000000 000
001636 001
TEXT 000314 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 7622 WORDS ( 30 PAGES)
DYNAMIC MEMORY: 8384 WORDS ( 32 PAGES)
ELAPSED TIME: 00:01:34
[53,10]MOUNT,[53,20]MOUNT/-SP=[53,30]RSXDC,MOUNT