@@ -55,6 +55,8 @@ FILBLN: 0 ;FILE LENGTH, IN BYTES OF SIZE WRITTEN IN.
5555FILBSZ: 0 ;BYTE SIZE FILE WRITTEN IN.
5656FILDTP: 0 ;-1 => WE KNOW THE CREATION DATE OF THIS FILE.
5757FILDAT: 0 ;FILE CREATION DATE (IF KNOWN).
58+ dirdev: sixbit /DIR/ ; DIR device
59+ dskdev: sixbit /DSK/ ; DSK device
5860
5961nitses==:40
6062itses: block nitses
@@ -94,69 +96,95 @@ GO: MOVE P,[-LPDLL-1,,PDL-1]
9496 move c,[sixbit /ITSNMS/]
9597 .getsys b,
9698 .value
97- ;; is it DIRxx? See if xx is an ITS name, then make it xxDIR instead
98- hlrz c,a
99+ ;; check for 4-character devices. Only one checked for is SHOE, which only works with 2-character
100+ ;; hostnames.
101+ ldb c,[003000,,a] ; get last four characters
102+ camn c,[sixbit / SHOE/] ; is it the SHOE device?
103+ jrst doshoe
104+
105+ ;; devices that are DIRhh or DIRhhh are converted to hhDIR or hhhDIR for later consistent handling.
106+ hlrz c,a ; a is for example, 'DIREX'; c becomes ' DIR'
99107 cain c,'DIR
100- jrst [ hrlz b,a ;get xx part in b
101- pushj p,isitsp
102- jrst .+1
103- ;; b is an ITS, make device xxDIR
104- lsh c,-12.
105- dpb b,[.bp (777700),c]
106- movem c,jbcdev
107- move a,b ; get host in A for gothst
108- jrst gothst ]
109- ;; is it Xxx? allow this as alias for "Xperimental" xx
108+ jrst dodir
109+
110+ ;; is it Xhhx or Xhhh? allow this as alias for "Xperimental" hh or hhh
110111 ldb c,[.bp (770000),a]
111112 cain c,'X
112113 jrst [ move b,a
113114 lsh b,6 ;get rid of X
114- pushj p,isitsp
115- jrst .+1
116- movem b,jbcdev
117- move a,b ;get host in A for gothst
118- jrst gothst ]
119- ;; is it xxDIR?
115+ pushj p,isitsp ; see if we now have a known ITS name
116+ jrst nox ; nope, skip handling as experimental case
117+ move c,dskdev ; assume DSK device
118+ movem c,jbcdev ; store as remote device
119+ move a,b ; get host in A for gothst
120+ jrst gothst ] ; and go process request for this host
121+
122+ nox: ; jump here if hostname minus first "x" is not a known ITS
123+ ; check to see if format is hhDIR
120124 move c,a
121- lsh c,12.
122- cain c,'DIR
123- jrst [ ldb b,[.bp (777700),a] ;get xx part in b
124- pushj p,isitsp
125- jrst .+1
126- move a,b ; get host in A
127- jrst gothst ]
128- move b,a
129- ;; is b an ITS name?
130- pushj p,isitsp
131- jrst notits
132- jrst gothst
125+ lsh c,12. ; move past hostname
126+ camn c,dirdev ; is what remains the DIR device?
127+ jrst dirchk ; yes, continue checking hhDIR case
128+
129+ ; is it hhhdir or hhh
130+ hrlz c,a ; get device in c
131+ jumpe c, host3 ; jump if no device
132+
133+ ldb c,[000600,,a] ; can only be hhddd if last sixbit character is null
134+ jumpe c,hhddd1 ; handle hhddd case if last character is NUL
133135
134- notits: ;; nothing came of it, fall through
135- MOVS A,JBCDEV
136- CAIN A,'XGP ;XGP THROUGH THE NET TO AI FROM ML/MC/DM
137- JRST [ MOVS A,[SIXBIT/AIXGP/]
138- MOVSM A,JBCDEV
139- MOVEI A,'AI
140- JRST GOTHST]
141- CAIN A,'GLP ;GOULD THROUGH THE NET TO MX
142- JRST [ MOVS A,[SIXBIT/MXGLP/]
143- MOVSM A,JBCDEV
144- MOVEI A,'MX
145- JRST GOTHST]
146- CAIN A,'DVR ;DVR THROUGH THE NET TO MC FROM AI/ML/DM
147- JRST [ MOVS A,[SIXBIT/MCDVR/]
148- MOVSM A,JBCDEV
149- MOVEI A,'MC
150- JRST GOTHST]
151- CAIN A,'DVS ;DVS THROUGH THE NET TO MC FROM ML/DM
152- JRST [ MOVS A,[SIXBIT/MCDVS/]
153- MOVSM A,JBCDEV
154- MOVEI A,'MC
155- JRST GOTHST]
156- CAIN A,'TPL ;TPL THROUGH THE NETWORK FOR MC
157- JRST [ MOVS A,[SIXBIT/MLTPL/]
158- MOVSM A,JBCDEV
159- LDB B,[000400,,JBCOP]
136+ hrlz c,a ; check for hhhddd, get ddd in c
137+ jumpn e,hhhddd ; is there a ddd?, if so handle it
138+ jrst chkits ; nope, assume that we just have hhh
139+
140+ host3: ; seems like hhh, but may be special, check to see if ITS
141+ move b,a ; hostname in A
142+ pushj p,isitsp ; is it a known ITS
143+ jrst notits ; nope, see if special device
144+ move c,dskdev ; we have an ITS name, so assume DSK device
145+ movem c,jbcdev ; save remote device
146+ jrst gothst ; and process our host
147+
148+ dirchk: ; 2-char hostname with DIR device
149+ ldb b,[.bp (777700),a] ; get hh part in b
150+ lsh b,24. ; left justify hostname
151+ dirch2: move c,dirdev ; set remote device as DIR device
152+ movem c,jbcdev
153+ move a,b ; get host in a
154+ jrst gothst ; process host
155+
156+ hhddd2: ldb a,[301400,,jbcdev] ; get hostname in A
157+ lsh a,24. ; left justify hostname
158+ movem c,jbcdev ; set remote device from C
159+ jrst gothst ; process host
160+
161+ hhddd1: ; continue check for hhddd
162+ ldb c,[003000,,a] ; get device portion
163+ lsh c,12. ; left-justify
164+ jumpn c,hhddd2 ; jump if we have a device; get hostname and set remote device
165+
166+ ;; fall through; assume just an ITS name
167+ chkits: move b,a
168+ pushj p,isitsp ; is b an ITS name?
169+ jrst notits ; no, process as special device
170+ jrst gothst ; yes, process this host
171+
172+ notits: ; here we've determined that hostname is invalid, check for special device
173+ MOVS C,JBCDEV
174+ CAIN C,'XGP ;XGP THROUGH THE NET TO AI FROM ML/MC/DM
175+ JRST [ MOVEI A,'AI
176+ JRST GOTHSX]
177+ CAIN C,'GLP ;GOULD THROUGH THE NET TO MX
178+ JRST [ MOVEI A,'MX
179+ JRST GOTHSX]
180+ CAIN C,'DVR ;DVR THROUGH THE NET TO MC FROM AI/ML/DM
181+ JRST [ MOVEI A,'MC
182+ JRST GOTHSX]
183+ CAIN C,'DVS ;DVS THROUGH THE NET TO MC FROM ML/DM
184+ JRST [ MOVEI A,'MC
185+ JRST GOTHSX]
186+ CAIN C,'TPL ;TPL THROUGH THE NETWORK FOR MC
187+ JRST [ LDB B,[000400,,JBCOP]
160188 CAIN B,2
161189 JRST TPLLK ;TRYING TO LINK ON TPL: LOSES
162190 LDB B,[410100,,JBCOP] ;0 => INPUT 1 => OUTPUT
@@ -166,22 +194,45 @@ notits: ;; nothing came of it, fall through
166194 .SUSET [.RUNAME,,JBCFN2]
167195 JRST (A) ]
168196 MOVEI A,'ML ;USE THE MATHLAB LINE PRINTER
169- JRST GOTHST ]
197+ JRST GOTHSX ]
170198;HOST NOT RECOGNIZED
171199NSD: MOVSI A,%ENSDV
172200 JRST NOGO2
173201
202+ hhhddd: ; get device from last 3 characters
203+ hrlz c,a ; get device and left justify
204+ movem c,jbcdev ; save remote device
205+ hllzs a ; get hostname
206+ jrst gothst ; process host
207+
208+ doshoe: ; device is SHOE
209+ lsh c,12. ; left justfify device
210+ movem c,jbcdev ; set remote device
211+ ldb a,[301400,,a] ; get 2-character hostname
212+ lsh a,30 ; left justify hostname
213+ jrst gothst ; process host
214+
215+ dodir: hrlz b,a ;a is for example 'DIREX', or 'DIREXA' ; b becomes 'EX' or 'EXA'
216+ hrlzm c,jbcdev ; save left-justified 'DIR' as remote device
217+ move a,b ; get host in A for gothst
218+ jrst gothst ; process host
219+
174220;; Check if B has the name of an ITS, if so, skip return
175221;; Messes up T
176222isitsp: movsi t,-nitses
177223isitz0: camn b,itses(t)
178- jrst popj1 ;match, skip return
224+ jrst popj1 ;match, skip return
179225 skipe itses(t)
180226 aobjn t,isitz0
181227 popj p,
182228
183- ;A CONTAINS SIXBIT HOST, RIGHT-JUSTIFIED
184- GOTHST: MOVE B,[440700,,BUF] ;Make ASCIZ host name
229+ gothsx: ; a contains sixbit 2-char host, right-justified
230+ lsh a,24. ; left-justify host
231+ hrlzm c,jbcdev ; save left-justified remote device
232+ ;; fall through
233+
234+ ; a contains sixbit host, left-justified
235+ GOTHST: MOVE B,[440700,,BUF] ;Make ASCIZ host name
185236GOTHS1: LDB T,[360600,,A]
186237 JUMPE T,GOTHS2
187238 ADDI T,40
@@ -196,11 +247,8 @@ GOTHS2: LSH A,6
196247 MOVEM TT,NETWRK' ;Network number
197248 PUSHJ P,NETWRK"HSTUNMAP ;Don't need host table any more
198249 .VALUE
199- LDB A,[3000,,JBCDEV] ;Right-hand four characters
200- JUMPN A,.+2
201- MOVE A,[SIXBIT / DSK/]
202- LSH A,14
203- MOVEM A,JBCDEV
250+
251+ move a,jbcdev
204252 MOVEM A,FDEVN
205253 SETOM JBGTN' ;FLAG INITIAL JOBGET DONE
206254 MOVE A,NETWRK
0 commit comments