1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-05 16:14:50 +00:00

Avoid hardcoding machine names.

Instead, use ITSNMS table.

- MAGFRM doesn't need to check machine name.

- But still knows about MC's config...

- Look up hosts in ITSNMS table instead of a hardwired one, and use all of the ITSNMS for *.
This commit is contained in:
Björn Victor
2021-06-23 21:48:55 +02:00
committed by Lars Brinkhoff
parent fec5059bfe
commit 6c1180aa52
15 changed files with 387 additions and 132 deletions

View File

@@ -2212,6 +2212,12 @@ MAYBE LSJCLBUF==10 ;ENOUGH FOR 40. CHARS
SJCLBUF: 0 ;FIRST WORD HOLD NUMBER OF CHARS BUFFERED
BLOCK LSJCLBUF
0 ;INSURES THAT ILDBS WILL FINALLY SEE A ZERO
ifn its,[
;; Used in QIO
mchcnt==:20 ;max #ITS
mchtab: block mchcnt ;.SEE INIMCH
]
SUBTTL INITIAL READTABLE, OBARRAY (IN LOW CORE)
@@ -15488,11 +15494,7 @@ IFN ITS,[
.CALL LISP43 ;GETS NAME OF ITS (AI, MC, ML, MD, MX, ES) IN TT
.VALUE
SETZ A, ;CONVERT TO ATOMIC SYMBOL
HLRZS TT
IRP X,,[AI,ML,MC,MD,MX,DB,KA,KL,HX]
CAIN TT,(SIXBIT \X\)
MOVEI A,Q!X
TERMIN
pushj p,sixatm
SKIPN A
.VALUE
] ;END OF IFN ITS

View File

@@ -589,11 +589,9 @@ IFN ITS,[
;;; THE SUPER-HAIRY BINARY SORT HACK ABOVE. TABLE MUST BE AN EXACT POWER OF
;;; TWO IN LENGTH SO WE CAN USE SUPER-WINNING BINARY SEARCH METHOD.
IDNTB: ; There are currently 62. entries in this table.
IRP X,,[AI,AIAR,AIARC,AIDIR,AR,ARC,BOJ,CLA,CLI,CLO,CLU,COM,COR
DIR,DIRHNG,DK,DM,DMAR,DMARC,DMDIR,DNR,DNRF,DSK,ERR,JOB,LP,LPT,LR
MC,MCAR,MCARC,MCDIR,MD,MDAR,MDARC,MDDIR
ML,MLAR,MLARC,MLDIR,MX,MXAR,MXARC,MXDIR
IDNTB: ; There are currently 38. entries in this table.
IRP X,,[AR,ARC,BOJ,CLA,CLI,CLO,CLU,COM,COR
DIR,DIRHNG,DK,DNR,DNRF,DSK,ERR,JOB,LP,LPT,LR
MT,NUL,OJB,P,PK,PTP,PTR,S,SPY,ST,STY,SYS,T,TPL,TTY,TY,USR,UT]
SIXBIT \X\
TERMIN
@@ -660,6 +658,56 @@ IDND3: ROT TT-1,-6
] ;END OF REPEAT LOG2IDNTB
EXCH TT,F ;RESTORE TT
CAMN F,IDNTB(R) ;FALL THRU IF RECOGNIZED DEVICE
jrst idnds
;; after that superefficient binary search of 38 entries,
;; do a less efficient but generic search.
;; check the ITSNMS table
skipn mchtab
pushj p,inimch ;may need to initialize it
push p,a
move a,tt ;is it an ITS name?
pushj p,mchok0
jrst isarcp ;nope, check devices
pop p,a
jrst idnds ;found a host
isarcp: lsh a,12. ;skip host part (2 chars)
;; check if it ends with AR, ARC or DIR
caie a,'AR
cain a,'ARC
skipa
cain a,'DIR
jrst [ ldb a,[.bp (777700),tt] ;then see if it is an ITS
call mchok0
jrst isnarc
pop p,a
jrst idnds ]
;; not a special device
isnarc: pop p,a
jrst idndx
;; Look for an ITS name in A
mchok0: push p,tt
movsi tt,-mchcnt
mchok1: camn a,mchtab(tt)
jrst popj1t ;skip return
skipe mchtab(tt) ;no more to check?
aobjn tt,mchok1
pop p,tt
popj p, ;non-skip return
popj1t: pop p,tt
aos (p) ;skip return
popj p,
;; initialize ITS name table
inimch: push p,a
push p,b
move a,[-mchcnt,,mchtab]
move b,[sixbit /ITSNMS/]
.getsys a,
.value
pop p,b
pop p,a
popj p,
] ;END OF IFN ITS
;;; FALL THRU TO HERE IF IT IS A DEVICE
IDNDS: AOS -1(P) ;AND IF DEVICE, THEN SKIP ONE ON RETURN