1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-27 01:09:49 +00:00

Greatly simplified the code in MLDEV.

This commit is contained in:
Eric Swenson
2023-10-07 09:56:34 -07:00
parent 0bf21fa5a6
commit 54e153b66b

View File

@@ -101,6 +101,7 @@ GO: MOVE P,[-LPDLL-1,,PDL-1]
ldb c,[003000,,a] ; get last four characters
camn c,[sixbit / SHOE/] ; is it the SHOE device?
jrst doshoe
jumpe c,dohh ; while we're at it, handle HH case
;; 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'
@@ -120,50 +121,22 @@ GO: MOVE P,[-LPDLL-1,,PDL-1]
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. ; move past hostname
camn c,dirdev ; is what remains the DIR device?
jrst dirchk ; yes, continue checking hhDIR case
;; we know that we don't have the DIRhh, DIRhhh, nor hh case. Check for hhh case.
hrlz c,a
jumpe c,dohh ; we have HHH, but handling is the same as HH
; is it hhhdir or hhh
hrlz c,a ; get device in c
jumpe c, host3 ; jump if no device
;; now we know we have either HHDDD, HHHDDD
;; check last character to see which case we have
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
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
jumpn c,hhhddd ; is there a ddd?, if so handle it
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
movem c,jbcdev ; set remote device from C
ldb a,[301400,,a] ; get hostname in A
jrst gothsx ; left justify hostname and process host
;; 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
@@ -199,23 +172,30 @@ notits: ; here we've determined that hostname is invalid, check for special d
NSD: MOVSI A,%ENSDV
JRST NOGO2
doshoe: ; device is SHOE
lsh c,12. ; left justfify device
movem c,jbcdev ; set remote device
ldb a,[301400,,a] ; get 2-character hostname
jrst gothsx ; left justify hostname and 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
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
;; we have HH or HHH in A. Make sure it is a host and not a special device.
dohh: move b,a
pushj p,isitsp ; is b an ITS name?
jrst notits ; no, process as special device
move c,dskdev ; set device as DSK
movem c,jbcdev
jrst gothst ; yes, process this host
;; Check if B has the name of an ITS, if so, skip return
;; Messes up T
@@ -226,9 +206,8 @@ isitz0: camn b,itses(t)
aobjn t,isitz0
popj p,
gothsx: ; a contains sixbit 2-char host, right-justified
gothsx: ; a contains sixbit 2-char host, right-justified. JBCDEV is already left-justified remote device
lsh a,24. ; left-justify host
hrlzm c,jbcdev ; save left-justified remote device
;; fall through
; a contains sixbit host, left-justified