Skip to content

Commit

Permalink
Updated MLDEV device to handle 2- and 3-char ITS hostnames.
Browse files Browse the repository at this point in the history
  • Loading branch information
eswenson1 authored and larsbrinkhoff committed Oct 7, 2023
1 parent 3f24c9b commit 15e616b
Showing 1 changed file with 113 additions and 65 deletions.
178 changes: 113 additions & 65 deletions src/sysen2/mldev.107 → src/sysen2/mldev.108
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ FILBLN: 0 ;FILE LENGTH, IN BYTES OF SIZE WRITTEN IN.
FILBSZ: 0 ;BYTE SIZE FILE WRITTEN IN.
FILDTP: 0 ;-1 => WE KNOW THE CREATION DATE OF THIS FILE.
FILDAT: 0 ;FILE CREATION DATE (IF KNOWN).
dirdev: sixbit /DIR/ ; DIR device
dskdev: sixbit /DSK/ ; DSK device

nitses==:40
itses: block nitses
Expand Down Expand Up @@ -94,69 +96,95 @@ GO: MOVE P,[-LPDLL-1,,PDL-1]
move c,[sixbit /ITSNMS/]
.getsys b,
.value
;; is it DIRxx? See if xx is an ITS name, then make it xxDIR instead
hlrz c,a
;; check for 4-character devices. Only one checked for is SHOE, which only works with 2-character
;; hostnames.
ldb c,[003000,,a] ; get last four characters
camn c,[sixbit / SHOE/] ; is it the SHOE device?
jrst doshoe

;; devices that are DIRhh or DIRhhh are converted to hhDIR or hhhDIR for later consistent handling.
hlrz c,a ; a is for example, 'DIREX'; c becomes ' DIR'
cain c,'DIR
jrst [ hrlz b,a ;get xx part in b
pushj p,isitsp
jrst .+1
;; b is an ITS, make device xxDIR
lsh c,-12.
dpb b,[.bp (777700),c]
movem c,jbcdev
move a,b ; get host in A for gothst
jrst gothst ]
;; is it Xxx? allow this as alias for "Xperimental" xx
jrst dodir

;; is it Xhhx or Xhhh? allow this as alias for "Xperimental" hh or hhh
ldb c,[.bp (770000),a]
cain c,'X
jrst [ move b,a
lsh b,6 ;get rid of X
pushj p,isitsp
jrst .+1
movem b,jbcdev
move a,b ;get host in A for gothst
jrst gothst ]
;; is it xxDIR?
pushj p,isitsp ; see if we now have a known ITS name
jrst nox ; nope, skip handling as experimental case
move c,dskdev ; assume DSK device
movem c,jbcdev ; store as remote device
move a,b ; get host in A for gothst
jrst gothst ] ; and go process request for this host

nox: ; jump here if hostname minus first "x" is not a known ITS
; check to see if format is hhDIR
move c,a
lsh c,12.
cain c,'DIR
jrst [ ldb b,[.bp (777700),a] ;get xx part in b
pushj p,isitsp
jrst .+1
move a,b ; get host in A
jrst gothst ]
move b,a
;; is b an ITS name?
pushj p,isitsp
jrst notits
jrst gothst
lsh c,12. ; move past hostname
camn c,dirdev ; is what remains the DIR device?
jrst dirchk ; yes, continue checking hhDIR case

; is it hhhdir or hhh
hrlz c,a ; get device in c
jumpe c, host3 ; jump if no device

ldb c,[000600,,a] ; can only be hhddd if last sixbit character is null
jumpe c,hhddd1 ; handle hhddd case if last character is NUL
notits: ;; nothing came of it, fall through
MOVS A,JBCDEV
CAIN A,'XGP ;XGP THROUGH THE NET TO AI FROM ML/MC/DM
JRST [ MOVS A,[SIXBIT/AIXGP/]
MOVSM A,JBCDEV
MOVEI A,'AI
JRST GOTHST]
CAIN A,'GLP ;GOULD THROUGH THE NET TO MX
JRST [ MOVS A,[SIXBIT/MXGLP/]
MOVSM A,JBCDEV
MOVEI A,'MX
JRST GOTHST]
CAIN A,'DVR ;DVR THROUGH THE NET TO MC FROM AI/ML/DM
JRST [ MOVS A,[SIXBIT/MCDVR/]
MOVSM A,JBCDEV
MOVEI A,'MC
JRST GOTHST]
CAIN A,'DVS ;DVS THROUGH THE NET TO MC FROM ML/DM
JRST [ MOVS A,[SIXBIT/MCDVS/]
MOVSM A,JBCDEV
MOVEI A,'MC
JRST GOTHST]
CAIN A,'TPL ;TPL THROUGH THE NETWORK FOR MC
JRST [ MOVS A,[SIXBIT/MLTPL/]
MOVSM A,JBCDEV
LDB B,[000400,,JBCOP]
hrlz c,a ; check for hhhddd, get ddd in c
jumpn e,hhhddd ; is there a ddd?, if so handle it
jrst chkits ; nope, assume that we just have hhh

host3: ; seems like hhh, but may be special, check to see if ITS
move b,a ; hostname in A
pushj p,isitsp ; is it a known ITS
jrst notits ; nope, see if special device
move c,dskdev ; we have an ITS name, so assume DSK device
movem c,jbcdev ; save remote device
jrst gothst ; and process our host

dirchk: ; 2-char hostname with DIR device
ldb b,[.bp (777700),a] ; get hh part in b
lsh b,24. ; left justify hostname
dirch2: move c,dirdev ; set remote device as DIR device
movem c,jbcdev
move a,b ; get host in a
jrst gothst ; process host

hhddd2: ldb a,[301400,,jbcdev] ; get hostname in A
lsh a,24. ; left justify hostname
movem c,jbcdev ; set remote device from C
jrst gothst ; process host

hhddd1: ; continue check for hhddd
ldb c,[003000,,a] ; get device portion
lsh c,12. ; left-justify
jumpn c,hhddd2 ; jump if we have a device; get hostname and set remote device

;; fall through; assume just an ITS name
chkits: move b,a
pushj p,isitsp ; is b an ITS name?
jrst notits ; no, process as special device
jrst gothst ; yes, process this host

notits: ; here we've determined that hostname is invalid, check for special device
MOVS C,JBCDEV
CAIN C,'XGP ;XGP THROUGH THE NET TO AI FROM ML/MC/DM
JRST [ MOVEI A,'AI
JRST GOTHSX]
CAIN C,'GLP ;GOULD THROUGH THE NET TO MX
JRST [ MOVEI A,'MX
JRST GOTHSX]
CAIN C,'DVR ;DVR THROUGH THE NET TO MC FROM AI/ML/DM
JRST [ MOVEI A,'MC
JRST GOTHSX]
CAIN C,'DVS ;DVS THROUGH THE NET TO MC FROM ML/DM
JRST [ MOVEI A,'MC
JRST GOTHSX]
CAIN C,'TPL ;TPL THROUGH THE NETWORK FOR MC
JRST [ LDB B,[000400,,JBCOP]
CAIN B,2
JRST TPLLK ;TRYING TO LINK ON TPL: LOSES
LDB B,[410100,,JBCOP] ;0 => INPUT 1 => OUTPUT
Expand All @@ -166,22 +194,45 @@ notits: ;; nothing came of it, fall through
.SUSET [.RUNAME,,JBCFN2]
JRST (A) ]
MOVEI A,'ML ;USE THE MATHLAB LINE PRINTER
JRST GOTHST ]
JRST GOTHSX ]
;HOST NOT RECOGNIZED
NSD: MOVSI A,%ENSDV
JRST NOGO2

hhhddd: ; get device from last 3 characters
hrlz c,a ; get device and left justify
movem c,jbcdev ; save remote device
hllzs a ; get hostname
jrst gothst ; process host

doshoe: ; device is SHOE
lsh c,12. ; left justfify device
movem c,jbcdev ; set remote device
ldb a,[301400,,a] ; get 2-character hostname
lsh a,30 ; left justify hostname
jrst gothst ; process host

dodir: hrlz b,a ;a is for example 'DIREX', or 'DIREXA' ; b becomes 'EX' or 'EXA'
hrlzm c,jbcdev ; save left-justified 'DIR' as remote device
move a,b ; get host in A for gothst
jrst gothst ; process host

;; Check if B has the name of an ITS, if so, skip return
;; Messes up T
isitsp: movsi t,-nitses
isitz0: camn b,itses(t)
jrst popj1 ;match, skip return
jrst popj1 ;match, skip return
skipe itses(t)
aobjn t,isitz0
popj p,

;A CONTAINS SIXBIT HOST, RIGHT-JUSTIFIED
GOTHST: MOVE B,[440700,,BUF] ;Make ASCIZ host name
gothsx: ; a contains sixbit 2-char host, right-justified
lsh a,24. ; left-justify host
hrlzm c,jbcdev ; save left-justified remote device
;; fall through

; a contains sixbit host, left-justified
GOTHST: MOVE B,[440700,,BUF] ;Make ASCIZ host name
GOTHS1: LDB T,[360600,,A]
JUMPE T,GOTHS2
ADDI T,40
Expand All @@ -196,11 +247,8 @@ GOTHS2: LSH A,6
MOVEM TT,NETWRK' ;Network number
PUSHJ P,NETWRK"HSTUNMAP ;Don't need host table any more
.VALUE
LDB A,[3000,,JBCDEV] ;Right-hand four characters
JUMPN A,.+2
MOVE A,[SIXBIT / DSK/]
LSH A,14
MOVEM A,JBCDEV

move a,jbcdev
MOVEM A,FDEVN
SETOM JBGTN' ;FLAG INITIAL JOBGET DONE
MOVE A,NETWRK
Expand Down

0 comments on commit 15e616b

Please sign in to comment.