Trailing-Edge
-
PDP-10 Archives
-
BB-P363B-SM_1985
-
mcb/netgen/finmod.mac
There are no other files named finmod.mac in the archive.
TITLE FINMOD
; ======
;
; COPYRIGHT (c) 1980, 1981, 1982, 1985
; DIGITAL EQUIPMENT CORPORATION
;
; This software is furnished under a license and may be used
; and copied only in accordance with the terms of such license
; and with the inclusion of the above copyright notice. This
; software or any other copies thereof may not be provided or
; otherwise made available to any other person. No title to
; and ownership of the software is hereby transferred.
;
; The information in this software is subject to change
; without notice and should not be construed as a commitment
; by DIGITAL EQUIPMENT CORPORATION.
;
; DIGITAL assumes no responsibility for the use or reliability
; of its software on equipment which is not supplied by
; DIGITAL.
;
; module FINMOD, containing the code sections for the
; NETGEN - Network configurator program
;
;
; SUMMARY OF EDIT HISTORY - FOR FULL DETAILS SEE MODULE NETGEN.MAC
;
; EDIT # DATE
; 1 26JUN81
; 2 15JUL81
; 3 07AUG81
; 5 31AUG81
; 6 03SEP81
; 7. 08SEP81
; 8. 09SEP81
; 9. 17SEP81
; 10. 21SEP81
; 12. 02OCT81
; 13. 05OCT81
; 14. 12OCT81
; 15. 04NOV81
; 16. 23NOV81
; 17. 14Dec81
; 18. 24Dec81
; 19. 22Feb82
; 20. 24Feb82
; 21. 05Mar82
; 22. 16Mar82
; 23. 23Mar82
; 24. 25Mar82
; 25. 26Mar82
; 26. 30Mar82
; 27. 31Mar82
; 28. 1Apr82
; 30. 16Apr82
; 31. 20Apr82
; 32. 21Apr82
; 33. 22Apr82
; 34. 23Apr82
; 36. 03May82
; 37. 07May82
; 38. 27May82
; 39. 04Jun82
; 40. 18-Jun-82
; 41. 21Jun82
; 42. 23Jun82
; 43. 25Jun82
; 44. 09Jul82
; 45. 09Jul82
; 46. 09Aug82
; 4.1
; 2 23Nov82
; 4 08Dec82
; 7 06Jan85
;
SUBTTL Universal searches and version information
SEARCH NETMAC
INIGEN (FINMOD) ; Initialize GLXLIB assembly options
;
; OTHER EQUATED SYMBOLS
;
PDLL==2000 ;PUSH-DOWN LIST LENGTH
CBFSIZ==200 ;LENGTH OF COMMAND BUFFER
ACBSIZ==200 ;LENGTH OF ATOM BUFFER
;
; Buffer pool definitions
; XWD <address of length>,<routine to produce S1/min, S2/max>
;
BUFLST: XWD [^D16],[ ; CE$buf 16.,<rdbnum>
MOVE S2,RDBNUM## ; For messages in transit.
MOVE NODTYP##
CAIN NDN200## ; DN200:
MOVE S2,BUFDIF## ; No messages in transit.
ADD S2,NTPIBQ## ; For NSP originating messages.
ADDI S2,3 ; (fudge factor?)
SKIPE S1,BUFDIF## ; Get min/max.
MOVN S1,S1
ADD S1,S2
MOVE NODTYP##
CAIN NX25## ; X.25:
$CALL [$SAVE <T1>
MOVE T1,NTPNLN## ; Get number
SUB T1,NTPNCK## ; of LAPB lines.
IMULI T1,^D2 ; These
SUBI T1,^D1 ; buffers
SUB S1,T1 ; are not
SUB S2,T1 ; needed.
$RET]
$RETT]
XWD [^D60],[ ; CE$buf 60.,<ntplix>+2.+4.
MOVE S2,NTPLIX##
ADDI S2,^D6
MOVE NODTYP##
CAIN NX25##
MOVEI S2,^D5
MOVE S1,S2
$RETT]
XWD [^D80],[ ; CE$buf 80.,5.
MOVE NODTYP##
CAIE NDN200##
$RETF
MOVEI S2,^D5
MOVE S1,S2
$RETT]
XWD [^D207],[
MOVE NODTYP##
CAIE NX25##
$RETF
MOVEI S1,^D3
MOVEI S2,^D6
$RETT]
XWD RDBLEN##,[ ; CE$buf <rdblen>,3.
MOVEI S2,^D3
MOVE S1,S2
$RETT]
EXP 0
CBBLST: XWD [0],[ ; CE$cbb 0,<ccbnum>
$SAVE <T1,T2>
MOVE S2,RDBNUM##
MOVE T1,RDBNUM##
MOVE T2,NODTYP##
CAIE T2,NDN200## ; Add rdbnum if not DN200
IDIVI T1,^D10 ; else add .1 rdbnum
ADD S2,T1
SKIPN CCBSTA## ;If an explicit value given
MOVE S2,CCBNUM## ;then use it.
MOVE S1,S2
$RETT]
XWD RDBLEN##,[ ; CE$cbb <rdblen>,<rdbnum>
MOVE S2,RDBNUM##
SKIPE S1,BUFDIF##
MOVN S1,S1
ADD S1,S2
$RETT]
EXP 0
LIT
;
; Set all the dependent defaults before use
;
; Calculate/set numbers of buffers, buffer quotas from internal data.
;
; RDBNUM: minimum #RDBs calculated from the following:
;
; 1 per DTE
; 7 per DMC
; 8 per DMR
; 2 per KDP
;
; then add BUFDIF
;
SETDFL::MOVE S2,DTENUM##
MOVE S1,KDPNUM##
IMULI S1,^D2
ADD S2,S1
MOVE S1,DMCNUM##
IMULI S1,^D7
ADD S2,S1
MOVE S1,DMRNUM##
IMULI S1,^D8
ADD S2,S1
ADD S2,BUFDIF##
SKIPE RDBSTA##
MOVEM S2,RDBNUM##
$CALL RDBCLC ; CALCULATE DEFAULT RDB SIZE
SKIPE RDSSTA##
MOVEM S1,RDBLEN## ; AND SAVE IT
;
;s2 now does not have # of free buffers.
; set XPT buffer quota:
; XP.lbq = #free buffers - XP.ebq
; (XPT code sets DLL Quota = XP.lbq)
;
LOAD S1,DNS11##,PRMINI ; ** CONSTANT FOR NOW **
SKIPE NTDLBQ##
MOVEM S1,NTPLBQ##
$RETT
;
;BLKCLC - Calculate The Minimum Data-Link-Block-Size and Return It In S1
;
;RETURNS WITH S1 = MAX (A,B) where
; A = NTPBUF (SC Rec. Buf size) B = 2*NTPNN (# nodes in net)
; + 15. (XPT overhead) +5 (3 header, 2 checksum)
; + 9. (NSP overhead)
; + 6. (DDCMP overhead)
; + 2. (header CRC)
; + 2. (trailer CRC)
;
BLKCLC::MOVE S1,NTPNN## ; GET NUMBER OF NODES
IMULI S1,2 ; TIMES 2
ADDI S1,5 ; PLUS FIVE FOR RESERVE
MOVE S2,NTPBUF## ; SC RECEIVE BUFFER SIZE
ADDI S2,^d34 ; PLUS ALL THE OVERHEADS
CAMGE S1,S2 ; S1 .LT. S2?
MOVE S1,S2 ; YES - MAKE S1 THE BIGGER OF THE TWO
ADDI S1,1 ; round up
TXZ S1,1 ; and
$RETT ; RETURN
;
;RDBCLC - A Routine To Calculate Minimum RDB Size
;
;RETURNS WITH S1 = DL.BLK+6
;
RDBCLC::MOVE S1,NTPBLK## ; Get DL block size
ADDI S1,<^D6+1> ; plus six
ANDI S1,^-1 ; rounded to even number.
MOVE TF,NODTYP## ; If
CAIE TF,NX25## ; an X.25 node
$RETT ; then
MOVE TF,XTPBLK## ; get
ADDI TF,^D2 ; max (S1, MAXIMUM BLOCK+2)
CAMLE S1,TF
MOVE S1,TF
$RETT
SUBTTL FINISH Command -- Utility routines
; ============== ----------------
;
;
; routines for the FINISH command
;
; Routines to output bytes decoded by $TEXT macros elsewhere
;
; Automatically called with S1 = byte to output
;
; Destroys S1 and S2
;
PACBYT: MOVE S2,PACIFN
JRST BOTH
NTPBYT: SKIPA S2,NTPIFN
CETBYT: MOVE S2,CETIFN
BOTH: EXCH S1,S2
$CALL F%OBYT
$RETIT
$TEXT ,<false retn'd by PAC/NTP/CETBYT>
$HALT
OPNER: $TEXT ,<false returned by call to open nmlacc,cetab or netpar.>
$HALT
SUBTTL FINISH Command -- Initial checking
; ============== ----------------
;
;
; THIS IS THE FINISH COMMAND. IT DOES ALL THE WORK.
;
FINISH::$CALL SETDFL ;Make sure defaults are set
;
; CHECK to make sure everything is in order (ie, will produce a fairly
; reasonable, runnable system image, as far as can be told here) before
; going to all the trouble of writing the output files.
;
; First, give warnings for "non-fatal" stuff:
; If RJE, no I/O device included (ie LPT / CR)
; If DN20, #links > 8 unsupported
; Only 290. <= BUFFER SIZE <= 576. supported
;
MOVE S1,NODTYP##
CAIE S1,NDN200##
JRST CHK1
;
; DN200s only:
;
SKIPL LPTSTA## ;if no LPT
JRST CHK2
SKIPE CR1STA## ;and no CR, warning
$TEXT ,<%You have not included an I/O device for your DN200.>
JRST CHK2
;
; DN20s only:
;
CHK1: SKIPE PRVLDG##
JRST CHK2
MOVE S1,NTPNCK## ;#NMX lines - 3 (3 is the initial fudge factor
SUBI S1,^D3 ;of 2, +1 for the DTE) is the # of ALL physical
;lines including x.25
CAILE S1,^D8 ;If more than 8 physical lines, warning message
$TEXT ,<%More than 8 communications lines on a DN20 is unsupported.>
;
; both node types:
;
CHK2: MOVE S1,NTPBLK## ;If dll block size out of range, unsupported
CAIGE S1,^D290
$TEXT ,<%Data Link Block Size less than 290. is unsupported.>
CAILE S1,^D576
$TEXT ,<%Data Link Block Size greater than 576. is unsupported.>
;
; ensure that NTPBUF (SC rec buf or NSP segment size) is at least 34. less than
; the data-link-block-size
;
MOVE T1,NTPBLK##
SUBI T1,^D34
CAMGE T1,NTPBUF##
MOVEM T1,NTPBUF##
;
; Check for "fatal" errors - if any of the following, do not write files
; Node name &/or address defaulted
; Node address > # of nodes in net
; #nodes in net not supported by block size.
; If DN20, no DTE
; If DN20, no line besides the DTE
; If DN20, no LP11s or CR11s
; If DN200, no comm line (DMC or DMR only)
; If DN200, any line(s) other than a DMC/DMR
; Note that routine BLKCLC enforces that the DL block size always conforms to
; the rules relating it to #nodes in net
;
SKIPE NTDSLF##
JRST [ $TEXT ,<?The Node Address has not been set>
$RETF]
;
SKIPE NONSTA##
JRST [ $TEXT ,<?The Node Name has not been set>
$RETF]
;
MOVE S1,NTPSLF## ;If this node address is
CAMLE S1,NTPNN## ; greater than number-of-nodes-in-net, load won't work
JRST [ $TEXT ,<?The node address requires a MAXIMUM ADDRESS of at least ^D/S1/>
$RETF]
;
MOVE S1,NTPNN## ;If number-of-nodes-in-net
IMULI S1,2 ;makes routing message
ADDI S1,1 ;greater than
CAMLE S1,NTPBLK## ;the DLL block size
JRST [ $TEXT ,<?The number of nodes in the net requires a BUFFER SIZE of at least ^D/S1/>
$RETF]
;
MOVE S1,NODTYP##
CAIE S1,NDN20##
JRST CHK3
;
; DN20:
;
SKIPN PRVLDG##
SKIPLE DTENUM## ;error if no DTE
SKIPA
JRST [$TEXT ,<?Your DN20 has no DTE.>
$RETF]
;
SKIPE LPTSTA## ;if LPT
SKIPN CR1STA## ;or CR, warning
JRST [$TEXT ,<?You cannnot include LP11 or CR11 devices on DN20s.>
$RETF]
;
MOVE S1,PLKNUM## ;GET NUMBER OF PHYSICAL LINKS
SKIPL DTENUM## ;DTE INCLUDED?
SUBI S1,1 ;YES - SUBTRACT ONE
SKIPT S1 ;OK IF NON-ZERO
JRST [ $TEXT ,<?You have not configured any communications lines.>
$RETF]
JRST CHK5
CHK3: MOVE S1,NODTYP##
CAIE S1,NDN200##
JRST CHK5
;
; DN200:
;
SKIPE DMCNUM##
JRST CHK4
SKIPN DMRNUM##
JRST [ $TEXT ,<?You have not configured a communications line (DMC/DMR) for your DN200.>
$RETF]
;
CHK4: MOVE S1,PLKNUM##
CAIE S1,^D1
JRST [ $TEXT ,<?You must have only one communications line on the DN200, and that a DMC or DMR.>
$RETF]
CHK5:
SUBTTL FINISH Command -- Generate NMLACC.MAC
; ============== ------------------
; OPEN NMLACC.MAC
;
TOPS20 <MOVE S1,[XWD 3,0]>
TOPS10 <MOVE S1,[XWD 5,0]>
MOVEM S1,PACFD
MOVEI S1,PACFD
MOVEM S1,PACFOB ; in FOB
MOVEI S1,7 ;set byte-
MOVEM S1,PACFOB+1 ; size too
MOVEI S1,2 ;length of FOB
MOVEI S2,PACFOB ; and its address
$CALL F%OOPN## ;open NMLACC.mac for output
JUMPF OPNER
MOVEM S1,PACIFN ; and save its IFN
SETOM S2 ; Flag for exact FD
$CALL F%FD ; Get it for printing
$TEXT ,<[Generating ^F/@S1/^A]>
; PUT A TITLE AND SUBTITLE ON NMLACC.MAC
; also the date and ident
;
$TEXT (PACBYT,< .TITLE NMLACC - NML PRIVILEGED ACCESS CONTROL>)
TOPS20 <$TEXT (PACBYT,< .SBTTL from ^W/IB##+IB.PRG/-20 on ^H/CDAT/>)>
TOPS10 <$TEXT (PACBYT,< .SBTTL from ^W/IB##+IB.PRG/-10 on ^H/CDAT/>)>
$text (pacbyt,<^I/IDENT/^M^J^T/CPYRGT/>)
;
;these macros are why we're here
;
EXT <USRSTR,PASSTR,ACTSTR>
$TEXT (PACBYT,<
.MACRO NM$ACC macro
'macro' ^T/LBRAK/^T/USRSTR/^T/P2NM2/^T/LBRAK/^T/PASSTR/^T/P2NM2/^T/LBRAK/^T/ACTSTR/^T/RBRAK/
.ENDM NM$ACC>)
MOVE NODTYP##
CAIE NX25##
JRST PAC.1
EXT <USRSXR,PASSXR,ACTSXR>
$TEXT (PACBYT,<
.MACRO GA$ACC macro
'macro' ^T/LBRAK/^T/USRSXR/^T/P2NM2/^T/LBRAK/^T/PASSXR/^T/P2NM2/^T/LBRAK/^T/ACTSXR/^T/RBRAK/
.ENDM GA$ACC>)
PAC.1: $TEXT (PACBYT,<>)
;
; HERE TO CLOSE NMLACC.MAC
;
MOVE S1,PACIFN
$CALL F%REL
JUMPF CLOSER
SETZM PACIFN
$TEXT ,< [OK]>
SUBTTL FINISH Command -- Generate CETAB.MAC
; ============== ------------------
; OPEN CETAB.MAC
;
TOPS20 <MOVE S1,[XWD 3,0]>
TOPS10 <MOVE S1,[XWD 5,0]>
MOVEM S1,CETFD
MOVEI S1,CETFD
MOVEM S1,CETFOB ; in FOB
MOVEI S1,7 ;set byte-
MOVEM S1,CETFOB+1 ; size too
MOVEI S1,2 ;length of FOB
MOVEI S2,CETFOB ; and its address
$CALL F%OOPN## ;open cetab.mac for output
JUMPF OPNER
MOVEM S1,CETIFN ; and save its IFN
SETOM S2 ; Flag for exact FD
$CALL F%FD ; Get it for printing
$TEXT ,<[Generating ^F/@S1/^A]>
;
; CONTINUED ON NEXT PAGE
;
;
; PUT A TITLE AND SUBTITLE ON CETAB.MAC
; also the date and ident
;
$TEXT (CETBYT,< .TITLE CETAB>)
TOPS20 <$TEXT (CETBYT,< .SBTTL from ^W/IB##+IB.PRG/-20 on ^H/CDAT/>)>
TOPS10 <$TEXT (CETBYT,< .SBTTL from ^W/IB##+IB.PRG/-10 on ^H/CDAT/>)>
$text (cetbyt,<^I/IDENT/^M^J^T/CPYRGT/>)
;
; output the MCALL for SYS$DF and the SYS$DF macro
;
EXT <NODNAM,NTPSLF>
$TEXT (CETBYT,<.MCALL SYS$DF^M^J SYS$DF ^T/NODNAM/,^D/NTPSLF/.>)
;
; CONTINUED ON NEXT PAGE
;
;
; OUTPUT BUF$DF MACRO
;
$CALL RDBCLC
MOVEM S1,RDBLEN##
;
SETZ T1, ; This is where it all goes.
MOVEI T4,BUFLST ; Start with CE$buf pools.
MEM.1: SKIPN T3,0(T4) ; For each one
JRST MEM.3 ; defined,
$CALL 0(T3) ; get min/max,
JUMPF MEM.2 ; (if the pool is appropriate)
HLRZ T3,T3 ; figure
MOVEI S2,^D8 ; minimum amount
ADD S2,0(T3) ; of
IMUL S1,S2 ; core needed
ADD T1,S1 ; and accumulate.
MEM.2: AOJA T4,MEM.1
MEM.3: MOVEI T4,CBBLST ; Now the CE$cbb pools.
MEM.4: SKIPN T3,0(T4) ; For each one
JRST MEM.6 ; defined,
$CALL 0(T3) ; get min/max,
JUMPF MEM.5 ; (if the pool is appropriate)
HLRZ T3,T3 ; figure minimum
MOVE S2,0(T3) ; amount of
IMUL S1,S2 ; core needed
ADD T1,S1 ; and accumulate.
MEM.5: AOJA T4,MEM.4
MEM.6: $TEXT (CETBYT,< MEM$DF 0.,^d/T1/. ; ,cor>)
;
; CONTINUED ON NEXT PAGE
;
;
;HERE TO PRODUCE THE PROCESSES
;
$TEXT (CETBYT,<;^M^J; Standard Processes^M^J;>)
$TEXT (CETBYT,< PRC$DF CEX,CE>)
SKIPL PRCMDT##
$TEXT (CETBYT,< PRC$DF MDT>)
$TEXT (CETBYT,< PRC$DF NDT>)
$TEXT (CETBYT,< PRC$DF INI^M^J PRC$DF NMX,NM>)
$TEXT (CETBYT,< PRC$DF SC^M^J PRC$DF SC1>)
$TEXT (CETBYT,< PRC$DF SCX,NS^M^J PRC$DF NSP^M^J PRC$DF NS1>)
$TEXT (CETBYT,< PRC$DF NS2^M^J PRC$DF XPT^M^J PRC$DF XPE>)
$TEXT (CETBYT,< PRC$DF TLI>)
MOVE S1,NODTYP## ;if not dn200,
CAIE S1,NDN200## ;then
$TEXT (CETBYT,< PRC$DF TOP>) ;include topology process
$TEXT (CETBYT,<;^M^J; Variable Processes^M^J;>)
MOVE S1,NODTYP## ;if not x25
CAIN S1,NX25## ;then skip
;;+
$TEXT (CETBYT,< PRC$DF GAT
PRC$DF GAN
PRC$DF PLP
PRC$DF PLE
PRC$DF PLN
PRC$DF FLN
PRC$DF FLP>)
;;-
SKIPLE DTENUM## ;skip if DTE not defined
$TEXT (CETBYT,< PRC$DF DTE>) ;put in DTE process
SKIPG DMCNUM## ;skip if DMC not defined
SKIPLE DMRNUM##
$TEXT (CETBYT,< PRC$DF DMC>) ;put in DMC process
SKIPLE DMRNUM##
$TEXT (CETBYT,< PRC$DF DMR>) ;put in DMR process
SKIPLE KDPNUM## ;skip if KDPs not defined
;;+
$TEXT (CETBYT,< PRC$DF DCP
PRC$DF KDP>)
;;-
MOVE S1,NODTYP## ;get node type
CAIN S1,NDN200## ;and if dn200
SKIPG NRLNUM## ;NRM logical links?
SKIPA
;;+
$TEXT (CETBYT,< PRC$DF NRM
PRC$DF NRD>)
;;-
SKIPLE LPTNUM## ;lineprinter?
$TEXT (CETBYT,< PRC$DF LE>)
SKIPLE CR1NUM## ;card reader?
$TEXT (CETBYT,< PRC$DF CR>)
MOVE S1,NODTYP## ;if dn200,
CAIN S1,NDN200## ;then
$TEXT (CETBYT,< PRC$DF XMD>) ; include this process
;
;CONTINUED ON NEXT PAGE
;
;
;GENERATE NON-STANDARD PROCESSES
;
SKIPGE PRCPTR## ;DO WE HAVE ANY NON-STANDARD PROCESSES?
JRST FNPR.1 ;NO - CONTINUE
$TEXT (CETBYT,<;^M^J; Non-standard Processes^M^J;>)
EXT <PRCNAM,PRCDRV>
SETZ T3, ;INITIALIZE COUNTER
FNPR.2: CAMLE T3,PRCPTR## ;ALL DONE?
JRST FNPR.1 ;YES - CONTINUE
SKIPN PRCDRV##(T3) ;Process
$TEXT (CETBYT,< PRC$DF ^T/PRCNAM(T3)/>)
SKIPE PRCDRV##(T3) ;Process/RSX drvier
$TEXT (CETBYT,< PRC$DF ^T/PRCNAM(T3)/,^T/PRCDRV(T3)/>)
AOJA T3,FNPR.2 ;LOOP FOR ALL PROCESSES
FNPR.1: ;HERE WHEN DONE ALL NON-STD PROCESSES
;
; HERE TO DO THE LLC$DF MACROS
;
;STANDARD LLC HEADER TEXT
;
;;+
$TEXT (CETBYT,<;
; Standard LLC Processes
;
LLC$DF CEX
LLC$DF INI
LLC$DF NMX
LLC$DF SC
LLC$DF SCX
LLC$DF NSP
LLC$DF XPT>)
;;-
MOVE S1,NODTYP## ;if not dn200,
CAIE S1,NDN200## ;then
$TEXT (CETBYT,< LLC$DF TOP>) ;include topology process
$TEXT (CETBYT,<;^M^J; Variable LLC Processes^M^J;>)
SKIPLE LPTNUM## ;skip if no line printer
$TEXT (CETBYT,< LLC$DF LE>)
SKIPLE CR1NUM## ;skip if no card reader
$TEXT (CETBYT,< LLC$DF CR>)
;
; HERE FOR X25
;
MOVE S1,NODTYP##
CAIN S1,NX25##
$TEXT (CETBYT,< LLC$DF GAT^M^J LLC$DF PLP>)
;
; HERE FOR NRD/NRM
;
MOVE S1,NODTYP## ;get node type
CAIN S1,NDN200## ;if dn200,
SKIPG NRLNUM## ;NRM LOGICAL LINKS
SKIPA ;JUMP IF WE DONT DON'T NEED NRM/NRD
$TEXT (CETBYT,< LLC$DF NRD^M^J LLC$DF NRM>)
;
; CONTINUED ON NEXT PAGE
;
;
;GENERATE NON-STANDARD LLC PROCESSES
;
SKIPGE PRCPTR## ;DO WE HAVE ANY NON-STANDARD PROCESSES?
JRST FNPR.4 ;NO - CONTINUE
;YES - PUT IN HEADER
$TEXT (CETBYT,<;^M^J; Non-Standard LLC processes^M^J;>)
EXT <PRCNAM>
SETZ T3, ;INITIALIZE COUNTER
FNPR.5: CAMLE T3,PRCPTR## ;ALL DONE?
JRST FNPR.4 ;YES - CONTINUE
SKIPGE PRCUSE##(T3) ;NO - DOES THIS PROCESS NEED LLC$DF?
JRST FNPR.6 ;NO - SKIPE THIS
$TEXT (CETBYT,< LLC$DF ^T/PRCNAM(T3)/>) ;YES - PUT IT IN
FNPR.6: AOJA T3,FNPR.5 ;LOOP FOR ALL PROCESSES
FNPR.4: ;HERE WHEN DONE ALL NON-STD PROCESSES
;
;Continued on Next Page
;
;
; HERE TO PRODUCE THE SLT$DF AND STA$DF MACRO(S)
;
;PRINT THE STANDARD SYSTEM LINES STUFF
FS.DEV: $TEXT (CETBYT,<;^M^J; System Lines^M^J;>)
;
; HERE TO DO THE DTE20
;
SKIPGE S1,DTENUM## ;Any DTE20s?
JRST FS.DMC
$CALL DEVDTE##
MOVEM S1,CTLNUM## ;NOTE: DTE-n-0 for CETAB!!
SETZM UNTNUM##
EXT <DEVTXT,CTLNUM,UNTNUM>
$TEXT (CETBYT,< SLT$DF TLI,^T/DEVTXT/,,^O/CTLNUM/,^O/UNTNUM/,,,ENABLE>)
;
; HERE TO DO THE DMC11S
;
FS.DMC: SKIPG T1,DMCNUM##
JRST FS.DMR
$CALL DEVDMC##
FSDMC1: $CALL DEVCTL##
SKIPL DMCUSE##(I1) ;THIS DMC11 IN USE?
EXT <DEVTXT,CTLNUM>
$TEXT (CETBYT,< SLT$DF TLI,^T/DEVTXT/,,^O/CTLNUM/,,,,ENABLE>)
AOS CTLNUM##
SOJG T1,FSDMC1 ;LOOP FOR ALL POSSIBLE DMC11S
;
; HERE TO DO THE DMR11S
;
FS.DMR: SKIPG T1,DMRNUM##
JRST FS.KDP
$CALL DEVDMR##
FSDMR1: $CALL DEVCTL##
SKIPL DMRUSE##(I1) ;THIS DMR11 IN USE?
EXT <DEVTXT,CTLNUM>
$TEXT (CETBYT,< SLT$DF TLI,^T/DEVTXT/,,^O/CTLNUM/,,,,ENABLE>)
AOS CTLNUM##
SOJG T1,FSDMR1 ;LOOP FOR ALL POSSIBLE DMR11S
;
; CONTINUED ON NEXT PAGE
;
;
; HERE TO DO THE KDP11S
;
FS.KDP: SKIPG T1,KDPNUM##
JRST FD.DEV
$CALL DEVKDP##
FSKDP1: $CALL DEVCTL##
SKIPG T2,KDPLNM##(I1) ;ARE THERE ANY DUPS ON THIS LINE
JRST FSKDP8 ;NO - GO DO NEXT
SETZM UNTNUM##
FSKDP2: $CALL DEVUNT##
EXT <DEVTXT,CTLNUM,UNTNUM>
$TEXT (CETBYT,< SLT$DF ^A>)
MOVE S1,LNTYP##(I1)
CAIE S1,^D5 ;NO DDCMP
$TEXT (CETBYT,<TLI,DCP^A>)
CAIN S1,^D5 ;X25
$TEXT (CETBYT,<PLP,FLP^A>)
$TEXT (CETBYT,<,^T/DEVTXT/,^O/CTLNUM/,^O/UNTNUM/,,,ENABLE>)
AOS UNTNUM##
SOJG T2,FSKDP2 ;BACK FOR NEXT DUP WITHIN THIS KDP
FSKDP8: AOS CTLNUM##
SOJG T1,FSKDP1 ;BACK FOR NEXT KDP
;
; Continued on next page
;
;
; NOW ISSUE DEV$DF, CTL$DF, UNT$DF AND TRB$DF FOR EACH DEVICE
;
FD.DEV: $TEXT (CETBYT,<;^M^J; Devices^M^J;>)
;
; DO THE DEV$DF, CTL$DF AND UNT$DF FOR THE DTE20
;
FD.DTE: SKIPGE S2,DTENUM## ;Any DTE20s?
JRST FD.DMX ;NO, ALL DONE.
$CALL DEVDTE##
MOVEM S2,CTLNUM##
SETZM UNTNUM##
LSH S2,5 ;COMPUTE CSR ADDRESS
ADDI S2,174400
MOVEM S2,DMXCSR##
MOVE S2,CTLNUM##
LSH S2,2 ;COMPUTE VECTOR ADDRESS
MOVNS S2
ADDI S2,774
MOVEM S2,DMXINT##
$TEXT (CETBYT,<;^M^J;^T/DEVTXT/^M^J;^M^J DEV$DF ^T/DEVTXT/,1>)
EXT <DTECST>
;
; HERE TO DO THE CTL$DF MACRO FOR THE DTE
;
$TEXT (CETBYT,< CTL$DF ^O/CTLNUM/,^O/DMXCSR/,^O/DMXINT/,7>)
;
; HERE TO DO THE UNT$DF MACRO
;
$TEXT (CETBYT,< UNT$DF ^D/UNTNUM/,^O/DTECST/>)
;
;Continued on Next Page
;
;
; DO THE DEV$DF, CTL$DF AND UNT$DF FOR THE DMC11S
;
FD.DMX: MOVEI S1,160740 ;STARTING CSR ADDRESS
MOVEM S1,DMXCSR## ;REMEMBER
MOVEI S1,670 ;STARTING INTERRUPT VECTOR
MOVEM S1,DMXINT## ;REMEMBER
FD.DMC: SKIPG T1,DMCNUM##
JRST FD.DMR
$CALL DEVDMC##
TXZ T4,F.DEV ;NO DEV MACRO YET
FDDMC1: $CALL DEVCTL##
SKIPGE DMCUSE##(I1) ;IS THIS DMC11 IN USE?
JRST FDDMC8 ;NO, CHECK NEXT.
TXON T4,F.DEV ;SENT DEV$DF MACRO YET?
$TEXT (CETBYT,<;^M^J;^T/DEVTXT/^M^J;^M^J DEV$DF ^T/DEVTXT/,2>)
EXT <DMCCST>
;
; HERE TO DO THE CTL$DF MACRO
;
$TEXT (CETBYT,< CTL$DF ^O/CTLNUM/,^O/DMXCSR/,^O/DMXINT/,5>)
MOVEI S1,10 ;DIFFERENCE IN VECTOR ADDRESS
ADDM S1,DMXCSR## ;POINT TO NEXT CSR ADDRESS
ADDM S1,DMXINT## ;POINT TO NEXT INTERRUPT ADDRESS
;
; HERE TO DO THE UNT$DF MACRO
;
MOVEI S1,177470
SKIPE DMCDUP##(I1)
AOS S1
$TEXT (CETBYT,< UNT$DF 0,^O/S1/,^O/DMCCST(I1)/>)
FDDMC8: AOS CTLNUM## ;GO TO NEXT DMC11
SOJG T1,FDDMC1
;
; CONTINUED ON NEXT PAGE
;
; DO THE DEV$DF, CTL$DF AND UNT$DF FOR THE DMR11S
;
FD.DMR: SKIPG T1,DMRNUM##
JRST FD.KDP
$CALL DEVDMR##
TXZ T4,F.DEV ;NO DEV MACRO YET
FDDMR1: $CALL DEVCTL##
SKIPGE DMRUSE##(I1) ;IS THIS DMR11 IN USE?
JRST FDDMR8 ;NO, CHECK NEXT.
TXON T4,F.DEV ;SENT DEV$DF MACRO YET?
$TEXT (CETBYT,<;^M^J;^T/DEVTXT/^M^J;^M^J DEV$DF ^T/DEVTXT/,2>)
EXT <DMRCST>
;
; HERE TO DO THE CTL$DF MACRO
;
$TEXT (CETBYT,< CTL$DF ^O/CTLNUM/,^O/DMXCSR/,^O/DMXINT/,5>)
MOVEI S1,10 ;DIFFERENCE IN VECTOR ADDRESS
ADDM S1,DMXCSR## ;POINT TO NEXT CSR ADDRESS
ADDM S1,DMXINT## ;POINT TO NEXT INTERRUPT ADDRESS
;
; HERE TO DO THE UNT$DF MACRO
;
MOVEI S1,177470 ;**** WHAT IS THIS? ****
SKIPE DMRDUP##(I1)
AOS S1
$TEXT (CETBYT,< UNT$DF 0,^O/S1/,^O/DMRCST(I1)/>)
FDDMR8: AOS CTLNUM## ;GO TO NEXT DMR11
SOJG T1,FDDMR1
;
; CONTINUED ON NEXT PAGE
;
;
; Here to do the DEV$DF, CNT$DF, and UNT$DF for the
; KDPs
;
FD.KDP: SKIPG T1,KDPNUM##
JRST FD.END
$CALL DEVKDP##
TXZ T4,F.DEV ;Flag no DEV generated yet
FDKDP1: $CALL DEVCTL##
SKIPG T2,KDPLNM##(I1) ;In use?
JRST FDKDP8 ;No, try next line
TXON T4,F.DEV ;DEV generated yet?
$TEXT (CETBYT,<;^M^J;^T/DEVTXT/^M^J;^M^J DEV$DF ^T/DEVTXT/,2>)
EXT <DUPCST>
MOVE S1,CTLNUM## ;COMPUTE CSR ADDRESS
LSH S1,3
ADDI S1,160540
MOVEM S1,DMXCSR##
MOVE S1,CTLNUM## ;COMPUTE VECTOR ADDRESS
LSH S1,3
ADDI S1,540
MOVEM S1,DMXINT##
$TEXT (CETBYT,< CTL$DF ^O/CTLNUM/,^O/DMXCSR/,^O/DMXINT/,5>)
;
; Continued on next page
;
;
; Here to generate UNT$DFs for the KDP
;
SETZM UNTNUM##
FDKDP2: $CALL DEVUNT##
MOVE S1,I1 ;compute DUP11 register
LSH S1,3
ADDI S1,160300
MOVEM S1,DMXCSR##
MOVE S1,DUPRAT##(I1) ;Build parameter word
LSH S1,^D4 ;from baud rate
ADD S1,DUPRAT##(I1)
LSH S1,^D8
SKIPE DUPDUP##(I1)
TXO S1,1B35 ; HALF DUPLEX
MOVE LNTYP##(I1)
CAIN ^D0 ; DDCMP-POINT
MOVX S2,1B35+0B32
CAIN ^D1 ; DDCMP-CONTROL
MOVX S2,1B35+1B32
CAIN ^D2 ; DDCMP-TRIBUTARY
MOVX S2,1B35+3B32
CAIN ^D4 ; DDCMP-DMC
MOVX S2,1B35+0B32
CAIN ^D5 ; LAPB
MOVX S2,0B35
$TEXT (CETBYT,< UNT$DF ^O/UNTNUM/,^O/DMXCSR/,^O/S1/,^O/S2/^A>)
;
; Here for CIRCUIT COST
;
MOVE LNTYP##(I1)
CAIE ^D5
$TEXT (CETBYT,<,^O/DUPCST(I1)/^A>)
$TEXT (CETBYT,<>)
AOS UNTNUM##
SOJG T2,FDKDP2
FDKDP8: AOS CTLNUM## ;On to next controller
SOJG T1,FDKDP1
FD.END:
;
; CONTINUED ON NEXT PAGE
;
;
; for DN200s only, include standard RSX-driver TT
;
MOVE S1,NODTYP## ;if dn200,
CAIN S1,NDN200## ;then include TTDRV
$TEXT (CETBYT,<;^M^J; RSX-DRIVER^M^J;^M^J DRV$DF TT>)
;
;HERE TO DO NON-STANDARD RSX DRIVERS
;
SKIPGE RSDPTR## ;ANY NON-STANDARD RSX DRIVERS?
JRST FNRD.1 ;NO - CONTINUE
$TEXT (CETBYT,<;^M^J; Non-Standard RSX Drivers^M^J;>)
EXT <RSDNAM>
SETZ T3, ;YES - INITIALISE COUNT
FNRD.2: CAMLE T3,RSDPTR## ;DONE ALL DRIVERS?
JRST FNRD.1 ;YES
$TEXT (CETBYT,< DRV$DF ^T/RSDNAM(T3)/>)
AOJA T3,FNRD.2 ;BACK FOR NEXT
FNRD.1: ;HERE WHEN DONE ALL DRIVERS
;
;Continued on Next Page
;
;
; Now Output the TSK$DF lines
;
$TEXT (CETBYT,<;^M^J; RSX Tasks^M^J;>) ;PRINT THE TASK HEADER
SKIPN NMLTYP##
$TEXT (CETBYT,< TSK$DF NML>)
SKIPLE NMLTYP##
$TEXT (CETBYT,< TSK$DF NMS>)
MOVE S1,NODTYP## ;if dn200,
CAIN S1,NDN200## ;then include POSI 15JUL81
$TEXT (CETBYT,< TSK$DF POSI,3>)
;
; Continued on next page
;
;
;HERE TO OUTPUT NON-STANDARD RSX TASKS
;
SKIPGE RSTPTR## ;ANY NON-STANDARD TASKS?
JRST FNRT.1 ;NO - SKIP THIS
$TEXT (CETBYT,<;^M^J; Non-Standard RSX Tasks^M^J;>) ;PRINT HEADER
EXT <RSTNAM>
SETZ T3, ;YES - ZERO POINTER
FNRT.2: CAMLE T3,RSTPTR## ;FINISHED?
JRST FNRT.1 ;YES
$TEXT (CETBYT,< TSK$DF ^A>);NO - PUT IN MACRO CALL
LSH T3,1 ;TIMES 2
$TEXT (CETBYT,<^T/RSTNAM(T3)/^A>);PUT IN TASK NAME
LSH T3,-1 ;DIVIDE BY 2
SKIPL RSTUSE##(T3) ;AUTOMATIC START?
$TEXT (CETBYT,<,4^A>) ;YES - START AFTER 4 SECS
$TEXT (CETBYT,<>)
AOJA T3,FNRT.2 ;BACK FOR NEXT TASK
FNRT.1: ;HERE WHEN DONE ALL TASKS
;
;Continued on Next Page
;
;
; NOW DO THE END$DF MACRO
;
$TEXT (CETBYT,<;^M^J;^M^J END$DF^M^J;^M^J;[End of CETAB]^M^J;>)
$TEXT (CETBYT,< .END^M^J^M^J>)
;
; HERE TO CLOSE CETAB.MAC
;
MOVE S1,CETIFN
$CALL F%REL
JUMPF CLOSER
SETZM CETIFN
$TEXT ,< [OK]>
SUBTTL FINISH Command -- Generate NETPAR.MAC
; ============== -------------------
;
;
; Open NETPAR.MAC
;
TOPS20 <MOVE S1,[XWD 3,0]>
TOPS10 <MOVE S1,[XWD 5,0]>
MOVEM S1,NTPFD
MOVEI S1,NTPFD ;set FD address
MOVEM S1,NTPFOB ; in FOB
MOVEI S1,7 ;set byte-
MOVEM S1,NTPFOB+1 ; size too
MOVEI S1,2 ;length of FOB
MOVEI S2,NTPFOB ; and its address
$CALL F%OOPN ;open netpar.mac for output
JUMPF OPNER
MOVEM S1,NTPIFN ;save its IFN
SETOM S2 ; Flag for exact FD
$CALL F%FD ; Get it for printing
$TEXT ,<[Generating ^F/@S1/^A]>
;
; Continued on next page
;
;
; Here to write-out NETPAR file
;
$TEXT (NTPBYT,< .TITLE NETPAR>)
TOPS20< $TEXT (NTPBYT,< .SBTTL from ^W/IB##+IB.PRG/-20 on ^H/CDAT/>) >
TOPS10< $TEXT (NTPBYT,< .SBTTL from ^W/IB##+IB.PRG/-10 on ^H/CDAT/>) >
$TEXT (NTPBYT,<^I/IDENT/^M^J^T/CPYRGT/>)
$TEXT (NTPBYT,<;^M^J; [Beginning of NETPAR]^M^J;^M^J.enabl lc>)
$TEXT (NTPBYT,<;+^M^J; MCB Process data base prefix file NETPAR^M^J;->)
;
; Continued on next page
;
EXT <NTPLIX,NTPBLK>
$TEXT (NTPBYT,< CE.lix = ^D/NTPLIX/. ; CEX - Number of line indices>)
$TEXT (NTPBYT,< DL.blk = ^D/NTPBLK/. ; DL - Block Size>)
$TEXT (NTPBYT,<^T/RDBSDF/>) ;CEX Rec. Buffer Size
;
; Buffer Pool Macros - CE$buf
;
$TEXT (NTPBYT,<^M^J .macro CE$buf macro ; CEX - buffer pools>)
MOVEI T4,BUFLST ; Start with CE$buf pools.
CEB.1: SKIPN T3,0(T4) ; For each one
JRST CEB.3 ; defined,
$CALL 0(T3) ; get min/max.
JUMPF CEB.2 ; (if the pool is appropriate)
HLRZ T3,T3
CAIE T3,RDBLEN##
$TEXT (NTPBYT,< 'macro' ^D/(T3)/.,^D/S2/.^A>)
CAIN T3,RDBLEN##
$TEXT (NTPBYT,< 'macro' RDB.sz,^D/S2/.^A>)
CAME S2,S1
$TEXT (NTPBYT,<,^D/S1/.^A>)
$TEXT (NTPBYT,<>)
CEB.2: AOJA T4,CEB.1
CEB.3: $TEXT (NTPBYT,< .endm CE$buf>)
;
;CE$cbb macro
;
$TEXT (NTPBYT,<^M^J .macro CE$cbb macro ; CEX - CCB/buffer pools>)
MOVEI T4,CBBLST ; Now the CE$cbb pools.
CEB.4: SKIPN T3,0(T4) ; For each one
JRST CEB.6 ; defined,
$CALL 0(T3) ; get min/max.
JUMPF CEB.5 ; (if the pool is appropriate)
HLRZ T3,T3
CAIE T3,RDBLEN##
$TEXT (NTPBYT,< 'macro' ^D/(T3)/.,^D/S2/.^A>)
CAIN T3,RDBLEN##
$TEXT (NTPBYT,< 'macro' RDB.sz,^D/S2/.^A>)
CAME S2,S1
$TEXT (NTPBYT,<,^D/S1/.^A>)
$TEXT (NTPBYT,<>)
CEB.5: AOJA T4,CEB.4
CEB.6: $TEXT (NTPBYT,< .endm CE$cbb>)
;
;
EXT <NODNAM>
$TEXT (NTPBYT,<^M^J .macro CE$nod macro ; CEX - local node name>)
$TEXT (NTPBYT,< 'macro' ^T/LBRAK/^T/NODNAM/^T/RBRAK/>);PUT IN NODE NAME
$TEXT (NTPBYT,< .endm CE$nod^M^J>) ;PUT IN THE END OF THE
; MACRO CALL
;
; DRIVER PARAMETERS
;
$TEXT (NTPBYT,< ;^M^J ;Driver Parameters^M^J ;>)
EXT <DMCPXB>
$TEXT (NTPBYT,< DMC.mx = 8. ; DMC - Max # DMCs>)
$TEXT (NTPBYT,< DMC.bf = RDB.sz ; DMC - DMC transmit buffer size>)
$TEXT (NTPBYT,< DMC.xb = ^D/DMCPXB/. ; DMC - DMC transmit buffers>)
$TEXT (NTPBYT,< DTE.mx = 4. ; DTE - Max # DTEs>)
$TEXT (NTPBYT,< DTE.bf = RDB.sz ; DTE - DTE transmit buffer size>)
$TEXT (NTPBYT,< KMC.mx = 3. ; KDP - Max # KMCs>)
$TEXT (NTPBYT,< DUP.mx = 12. ; KDP - Max # DUPs>)
$TEXT (NTPBYT,< KDP.mx = 4. ; KDP - Max # DUPs per KMC>)
$TEXT (NTPBYT,< ; hard limit of 16.>)
$TEXT (NTPBYT,< KDP.sg = 7. ; KDP - KDP transmit segment limit^M^J>)
;Continued on Next Page
;
;
;Phase II and III block sizes - added 3JUN81
;
EXT <NTPEBQ,NTPIBQ,NTPLBQ,NTPMXC,NTPMXH,NTPMXP>
$TEXT (NTPBYT,< XP.bl2 = DL.blk ; XPT - Phase II block size>)
$TEXT (NTPBYT,< XP.bl3 = DL.blk ; XPT - Phase III block size>)
$TEXT (NTPBYT,< XP.ebq = ^D/NTPEBQ/. ; XPT - ECL buffer quota (to NSP)>)
$TEXT (NTPBYT,< XP.ibq = ^D/NTPIBQ/. ; XPT - Input buffer quota (from NSP)>)
$TEXT (NTPBYT,< XP.lbq = ^D/NTPLBQ/. ; XPT - Line buffer quota>)
$TEXT (NTPBYT,< XP.mxc = ^D/NTPMXC/. ; XPT - Maximum total path cost>)
$TEXT (NTPBYT,< XP.mxh = ^D/NTPMXH/. ; XPT - Maximum network diameter (hops)>)
$TEXT (NTPBYT,< XP.mxl = 25. ; XPT - Maximum data-link cost>)
$TEXT (NTPBYT,< XP.mxp = ^D/NTPMXP/. ; XPT - Maximum Phase II logical links>)
;
;Continued on Next Page
;
EXT <NTPMXV,PLKNUM,NTPNN,NTPT1,NTPT2,NTPT3,NTPT4>
$TEXT (NTPBYT,< XP.mxv = ^D/NTPMXV/. ; XPT - Maximum visits (XP.mxh * 2)>)
$TEXT (NTPBYT,< XP.nln = ^D/PLKNUM/. ; XPT - Number of XPT lines>)
$TEXT (NTPBYT,< XP.nn = ^D/NTPNN/. ; XPT - Number of nodes in net>)
$TEXT (NTPBYT,< XP.t1 = ^D/NTPT1/. ; XPT - Maximum time between routing messages>)
$TEXT (NTPBYT,< XP.t2 = ^D/NTPT2/. ; XPT - Minimum time between routing messages>)
$TEXT (NTPBYT,< XP.t3 = ^D/NTPT3/. ; XPT - Time between hello messages>)
$TEXT (NTPBYT,< XP.t4 = ^D/NTPT4/. ; XPT - Node listener timeout>)
$TEXT (NTPBYT,< XP.uhq = CE.lix ; XPT - Update/Hello message quota^M^J>)
;
;Continued on Next Page
;
;
; HERE TO ISSUE THE XP$NID MACRO
;
EXT <NODID>
$TEXT (NTPBYT,<^T/NIDMAC/^A>) ;PRINT HEADER
$TEXT (NTPBYT,<^T/NODID/^A>) ;node id
$TEXT (NTPBYT,<^T/NIDEND/>) ;TRAILER
;
; Insert Maximum address table macro
;
$TEXT (NTPBYT,<
.MACRO XP$mxa macro>)
MOVEI S2,1
NTP.3: SKIPE S1,XPTMXA##-1(S2)
$TEXT (NTPBYT,< 'macro' ^D/S2/.,^D/S1/.>)
AOS S2
CAMG S2,NTPNN##
JRST NTP.3
$TEXT (NTPBYT,< .ENDM XP$mxa>)
;
; CONTINUED ON NEXT PAGE
;
;
; NOW DO THE PASSWORD MACROS
;
EXT <RCVPSW,XMTPSW>
$TEXT (NTPBYT,<^T/RCVMAC/^A>) ;print header
$TEXT (NTPBYT,<^T/RCVPSW/^A>) ;receive password
$TEXT (NTPBYT,<^T/RCVEND/^A>) ;print header
$TEXT (NTPBYT,<^T/XMTPSW/^A>) ;transmit password
$TEXT (NTPBYT,<^T/NIDEND/^M^J>) ;reuse this trailer
;
; CONTINUED ON NEXT PAGE
;
; NSP DEFINITIONS
;
EXT <NTPACT,NTPBUF,NTPDLY,NTPRET,NTPSLF>
$TEXT (NTPBYT,< NS.act = ^D/NTPACT/. ; NSP - Inactivity timer value>)
$TEXT (NTPBYT,< NS.buf = ^D/NTPBUF/. ; NSP - Minimum SC receive buffer size>)
$TEXT (NTPBYT,< NS.dly = ^D/NTPDLY/. ; NSP - NSP delay factor>)
$TEXT (NTPBYT,< NS.ret = ^D/NTPRET/. ; NSP - Retransmission threshold>)
$TEXT (NTPBYT,< NS.slf = ^D/NTPSLF/. ; NSP - Local node address>)
;
;Continued on Next Page
;
EXT <NTPTPT,NTPTRS,NTPWGT>
$TEXT (NTPBYT,< NS.tpt = ^D/NTPTPT/. ; NSP - Total number of ports supported>)
$TEXT (NTPBYT,<^T/TOTNDS/^A>) ;this used to include l and r brackets
$TEXT (NTPBYT,< NS.trs = ^D/NTPTRS/. ; NSP - Total number of reserved ports>)
$TEXT (NTPBYT,< NS.wgt = ^D/NTPWGT/. ; NSP - Delay Weight^M^J>)
;
; X25-Protocol Line Pararmeters
;
MOVE S1,NODTYP##
CAIE S1,NX25## ;IF NOT X25 THEN SKIP
JRST NX25C
$TEXT (NTPBYT,< ;^M^J ;X25 Line Definitions^M^J ;>)
EXT <XTPBLK,XTPWS,XTPIT1,XTPIRC>
$TEXT (NTPBYT,< FL.blk = ^D/XTPBLK/. ; MAX Block Size >)
$TEXT (NTPBYT,< FL.ws = ^D/XTPWS/. ; MAX Window Size >)
$TEXT (NTPBYT,< FL.it1 = ^D/XTPIT1/. ; Retransmit Timer >)
$TEXT (NTPBYT,< FL.irc = ^D/XTPIRC/. ; MAX Retransmit count >)
$TEXT (NTPBYT,< ;^M^J ;X25 Protocol Definitions^M^J ;>)
EXT <XTPDPS,XTPDWS,XTPMPS,XTPMWS,XTPTCA,XTPTCL>
EXT <XTPTRE,XTPTRS,XTPRCL,XTPRRE,XTPRRS,XTPLCN,XTPUGS>
$TEXT (NTPBYT,< PL.dps = ^D/XTPDPS/. ; Default Data Size >)
$TEXT (NTPBYT,< PL.dws = ^D/XTPDWS/. ; Default Window Size >)
$TEXT (NTPBYT,< PL.mps = ^D/XTPMPS/. ; MAX Packet Size >)
$TEXT (NTPBYT,< PL.mws = ^D/XTPMWS/. ; MAX Window Size >)
$TEXT (NTPBYT,< PL.tca = ^D/XTPTCA/. ; Call Timer >)
$TEXT (NTPBYT,< PL.tcl = ^D/XTPTCL/. ; Clear Timer >)
$TEXT (NTPBYT,< PL.tre = ^D/XTPTRE/. ; Reset Request Timer >)
$TEXT (NTPBYT,< PL.trs = ^D/XTPTRS/. ; Restart Request Timer >)
$TEXT (NTPBYT,< PL.rcl = ^D/XTPRCL/. ; MAX Clears >)
$TEXT (NTPBYT,< PL.rre = ^D/XTPRRE/. ; MAX Resets >)
$TEXT (NTPBYT,< PL.rrs = ^D/XTPRRS/. ; MAX Restarts >)
$TEXT (NTPBYT,< PL.lcn = ^D/XTPLCN/. ; MAX Channels >)
$TEXT (NTPBYT,< PL.ugs = ^D/XTPUGS/. ; MAX Groups >)
;
; Gateway Module Parameters
;
$TEXT (NTPBYT,< ;^M^J ;X25 Gateway Definitions^M^J ;>)
EXT <XTPDST>
$TEXT (NTPBYT,< GA.dst = ^D/XTPDST/. ; MAX Destinations >)
;
; Network Name
;
$TEXT (NTPBYT,< ;^M^J ;X25 Network Name Macro ^M^J ;>)
EXT <NETNAM>
$TEXT (NTPBYT,< .macro PL$NNM macro >)
$TEXT (NTPBYT,< 'macro' ^T/NETNAM/ >)
$TEXT (NTPBYT,< .endm >)
;
; X25 PL$DTE MACRO DEF
;
$TEXT (NTPBYT,< ;^M^J ;PL$DTE Macro Definitions^M^J ;>)
$TEXT (NTPBYT,< .macro PL$DTE macro >)
EXT <DEVTXT,CTLNUM,UNTNUM,DTEADR,CHRAGL,CHRAGH>
SKIPG T1,KDPNUM##
JRST PLX5
$CALL DEVKDP##
PLX1: $CALL DEVCTL##
SKIPG T2,KDPLNM##(I1) ;ARE THERE ANY DUPS ON THIS LINE?
JRST PLX4 ;NO - SKIP THIS KDP
SETZM UNTNUM##
PLX2: $CALL DEVUNT##
SKIPE DTEADR##(I2) ;This DTE in use?
$TEXT NTPBYT,< 'macro' ^T/LBRAK/^T/DEVTXT/-^d/ctlnum/-^d/untnum/^T/RBRAK/,^t/dteadr(I2)/,^D/CHRAGL(I1)/.,^D/CHRAGH(I1)/.>
AOS UNTNUM##
SOJG T2,PLX2 ;BACK FOR NEXT DUP WITHIN KDP
PLX4: AOS CTLNUM##
SOJG T1,PLX1 ;BACK FOR NEXT KDP
PLX5: $TEXT (NTPBYT,< .endm >)
;
; Destination Parameters Macro
;
$TEXT (NTPBYT,< ;^M^J ;DST$DF Macro Definitions^M^J ;>)
EXT <DESNAM,DSNODE,DSOBJS,DSOBJN,DSUSER,DSPASS,DSACCT,DSGRUP>
EXT <DSNUM,DSSUBL,DSSUBH,DSMASK,DSVAL,DSPRIO>
$TEXT (NTPBYT,< .macro DST$DF macro >)
SETZB I1,I2
LDX: CAMN I1,@QUADST##+ECUR
JRST LDX1
$TEXT (NTPBYT,< 'macro' ^T/DESNAM(I2)/^A>)
SKIPE DSNODE(I2)
$TEXT (NTPBYT,<,^T/DSNODE(I2)/^A>)
SKIPN DSNODE(I2)
$TEXT (NTPBYT,<,^D/DSNODE+1(I2)/^A>)
$TEXT (NTPBYT,<,^T/DSOBJS(I2)/,^D/DSOBJN(I2)/,^T/DSUSER(I2)/,^T/DSPASS(I2)/,^T/DSACCT(I2)/,^T/DSGRUP(I2)/,^T/DSNUM(I2)/,^D/DSSUBL(I1)/.,^D/DSSUBH(I1)/.,^T/DSMASK(I2)/,^T/DSVAL(I2)/,^D/DSPRIO(I1)/.>)
ADD I2,QUADST##+EINC
AOJA I1,LDX
LDX1: $TEXT (NTPBYT,< .endm >)
;
; PVC MACRO DEFINITIONS
;
$TEXT (NTPBYT,< ;^M^J ;PVC$DF Macro Definitions^M^J ;>)
EXT <X25CIR,DTECIR,CIRCHP,MXDATP,MXWINP>
$TEXT (NTPBYT,< .macro PVC$DF macro >)
SETZB I1,I2
LCX: CAMN I1,@ENTCIR##+ECUR
JRST NX25B
$TEXT (NTPBYT,< 'macro' ^T/X25CIR(I2)/,^T/DTECIR(I2)/,^D/CIRCHP(I1)/.,^D/MXDATP(I1)/.,^D/MXWINP(I1)/.>)
ADD I2,ENTCIR##+EINC
AOJA I1,LCX
NX25B: $TEXT (NTPBYT,< .endm>)
NX25C:
;
; SESSION CONTROL DEFINITIONS
;
;Session Control parameters added 3JUN81
;
$TEXT (NTPBYT,< ;^M^J ;Session Control Parameters^M^J ;>)
EXT <NTPITM,NTPOTM,NTPOPN>
$TEXT (NTPBYT,< SC.nln = XP.nln ; SC - Number of lines>)
$TEXT (NTPBYT,< SC.nn = XP.nn ; SC - Number of nodes>)
$TEXT (NTPBYT,< SC.tpt = NS.tpt ; SC - Number of logical links>)
$TEXT (NTPBYT,< SC.itm = ^D/NTPITM/. ; SC - Incoming connect timer default>)
$TEXT (NTPBYT,< SC.otm = ^D/NTPOTM/. ; SC - Outgoing connect timer default>)
$TEXT (NTPBYT,< SC.opn = ^D/NTPOPN/. ; SC - Number of OPEN ports to keep>)
;
;OUTPUT THE SC$NMT, SC$OBJ, AND SC$PRO MACROS
;
$TEXT (NTPBYT,<
;mapping from node number to node name
.macro SC$NMT MACRO
.endm SC$NMT>)
EXT <NTPNCK,NTPNLN>
MOVE S1,NODTYP##
CAIN S1,NDN200## ;dn200?
$TEXT (NTPBYT,<^T/OBJHD2/^A>) ;yes - use alternate text
CAIE S1,NDN200## ;dn200?
$TEXT (NTPBYT,<^T/OBJHDR/^A>) ;no - used to incl l and r brackets
$TEXT (NTPBYT,<^M^J NM.nck = ^D/NTPNCK/. ; NMX - Number of NMX Circuits>)
$TEXT (NTPBYT,< NM.nln = ^D/NTPNLN/. ; NMX - Number of NMX Lines>)
$TEXT (NTPBYT,< NM.nmo = 2. ; NMX - Number of NMX Modules>)
$TEXT (NTPBYT,< NM.nev = 6. ; NMX - Maximum event queue length>)
;
; Put in event filter settings
;
$TEXT (NTPBYT,<^M^J .macro NM$flt macro ; NMX - filter data base>)
MOVEI T4,7
SETZ I1,
FIN.1: SKIPN T1,GBLFLT##(I1) ; Get next class mask
JRST FIN.6 ; (if any are on).
$TEXT (NTPBYT,< 'macro' ^D/I1/.,^T/LBRAK/^A>)
SETZB T2,T3
FIN.2: HRRZ S1,T3 ; Find next bit on
LSHC T1,-1 ; by shifting it from T1
SKIPL T2 ; to T2.
AOJA T3,FIN.2
FIN.3: HRRZ S2,T3 ; Find next bit off
LSHC T1,-1 ; by shifting it from T1
SKIPG T2 ; to T2.
AOJA T3,FIN.3
FIN.5: TXOE T3,1000000
$TEXT (NTPBYT,<,^A>)
CAMN S1,S2 ; Single flag
$TEXT (NTPBYT,<^D/S1/.^A>)
CAME S1,S2 ; or range.
$TEXT (NTPBYT,<^T/LBRAK/^D/S1/.,^D/S2/.^T/RBRAK/^A>)
ADDI T3,2 ; Account for test bits
JUMPN T1,FIN.2 ; and go on if more.
$TEXT (NTPBYT,<^T/RBRAK/>)
FIN.6: AOS I1 ; On to next class.
SOJG T4,FIN.1
$TEXT (NTPBYT,< .endm NM$flt>)
;HERE TO WRITE NRM/NRD INFORMATION
;
MOVE NODTYP##
CAIE NDN200##
JRST FIN.7
EXT <NRLNUM>
$TEXT (NTPBYT,<^M^J NR.pip = ^D/NRLNUM/. ; NRM - Number of NRM Pipes>)
$TEXT (NTPBYT,< NR.flw = 4. ; NRM - Flow Count>);*EDIT 5
SKIPE LPTNUM##
$TEXT (NTPBYT,<^M^J LE.CSR = 177514^M^J LE.VEC = 200^M^J LE.PRI = 4>)
SKIPE CR1NUM##
$TEXT (NTPBYT,< CR.CSR = 177160^M^J CR.VEC = 230^M^J CR.PRI = 6>)
$TEXT (NTPBYT,<^M^J .macro NR$RES macro ; NRM>)
SKIPE PRVLDG##
SKIPE LPTNUM## ;DO WE HAVE A PRINTER?
$TEXT (NTPBYT,< 'macro' LP0,102,LP11>) ;yes - say so
SKIPE CR1NUM## ;DO WE HAVE A CARD READER?
$TEXT (NTPBYT,< 'macro' CR0,103,CR11>) ;yes - say so
$TEXT (NTPBYT,< .endm NR$RES>) ;print end of macro call
$TEXT (NTPBYT,<^M^J ND.flw = 10. ; NRD - Flow Count>)
$TEXT (NTPBYT,< ND.fld = 3. ; NRD - Low Water Flow Count>)
FIN.7:
;
;Continued on Next Page
;
;
; Write ending of NETPAR
;
$TEXT (NTPBYT,<^T/NTPTRL/>)
;
; Close NETPAR.MAC
;
MOVE S1,NTPIFN
$CALL F%REL
JUMPF CLOSER
SETZM NTPIFN ;No JFN assigned
$TEXT ,< [OK]>
;
; Continued on next page
;
SUBTTL FINISH Command -- Termination
; ============== -----------
;
;
; ALL DONE WITH FINISH COMMAND
;
; Ensure that a SAVE Command has been done, if not issue warning message.
;
WDONE: SKIPE SAVDON## ;0 if SAVE command has been done
$TEXT ,<%Have you issued a SAVE command for this configuration?>
$RETT
CLOSER: $TEXT ,<False returned by F%REL for cetab or netpar.>
$HALT
;
TOTNDS: ASCIZ / .if le,<NS.tpt-XP.nn>
NS.nod = NS.tpt ; NSP - Total number of nodes supported
.iff
NS.nod = XP.nn ; NSP - Total number of nodes supported
.endc
/
TOTNLN=<.-TOTNDS>*5
P2NM1: ASCIZ /
'macro' </
P2NM1L=<.-P2NM1>*5
P2NM2: ASCIZ />,/
LBRAK:: ASCIZ /</
RBRAK:: ASCIZ />/
NIDMAC: ASCIZ / .MACRO XP$nid macro
'macro' </
NIDEND: ASCIZ />
.ENDM/
RCVMAC: ASCIZ /
.MACRO XP$rcv macro
'macro' </
RCVMLN=<.-RCVMAC>*5
RCVEND: ASCIZ />
.ENDM
.MACRO XP$xmt macro
'macro' </
RCVELN=<.-RCVEND>*5
;
;SC$OBJ AND SC$PRO HEADER
;
OBJHDR: ASCIZ\
;mapping for NSP obj name to RSX task name
.macro SC$OBJ MACRO
'macro' 2,<NURD..>
'macro' 7,<NRM...>
'macro' 19.,<NMLMCB>
'macro' 25.,<NMLMCB>
'macro' 65.,<TOP...>
'macro' 63.,<DTR...>
'macro' 0,<SCX...>
.endm SC$OBJ
;mapping for RSX task name to MCB process name
.macro SC$PRO macro
'macro' <DNDDT.>,<NDT>
'macro' <TOP...>,<TOP>
'macro' <NRM...>,<NRM>
'macro' <NURD..>,<NRD>
'macro' <DTR...>,<DTR>
.endm SC$PRO
\
OBJHD2: ASCIZ\
;mapping for NSP obj name to RSX task name
.macro SC$OBJ MACRO
'macro' 2,<NURD..>
'macro' 7,<NRM...>
'macro' 19.,<NMLMCB>
'macro' 25.,<NMLMCB>
'macro' 65.,<TOP...>
'macro' 39.,<POSI..>
'macro' 63.,<DTR...>
'macro' 0,<SCX...>
.endm SC$OBJ
;mapping for RSX task name to MCB process name
.macro SC$PRO macro
'macro' <DNDDT.>,<NDT>
'macro' <NRM...>,<NRM>
'macro' <NURD..>,<NRD>
'macro' <DTR...>,<DTR>
.endm SC$PRO
\
;
RDBSDF: ASCIZ/ RDB.sz = <DL.blk+6.+1>&<-2> ; CEX - Receive Buffer Size/
;
;NETPAR TRAILER
;
NTPTRL: ASCIZ /
;
; [End of NETPAR]
;
/
;
;
; INCLUDE NONSTD MCB PROCESS
;
MCBNAM::BLOCK 2 ;for holding mcb process name/also for ph-II node name
MCBUSE::BLOCK 1 ; " " . . . use (llc yes=0, no=-1)/also ph-II node number
;
;ROUTINE TO GET NODE NAME IN S1,S2
; CALL WITH S1 = string address
;
GETNOD::$SAVE <P1,P2>
TXZ TF,F.ALPH ;NO ALPHA CHARACTER SEEN
SETZB P1,P2 ;CLEAR BOTH INITIALLY
MOVE T1,[POINT 7,P1] ;WHERE TO PLACE CHARS
MOVEI T2,6 ;MAX NUMBER OF CHARS
MOVE T3,[POINT 7,(S1)] ;WHERE TO LOAD CHARS FROM
GETND1: ILDB T4,T3 ;GET NEXT CHAR
JUMPE T4,GETND2 ;SPACE-FILL ON NUL
TRNE T4,100 ;MAKE UPPER-CASE
TRZ T4,40 ;IF NECESSARY
caige t4,"0" ;if chr not 0-9, a-z, or A-Z,
jrst badchr ; illegal
caig t4,"9"
jrst gn1
caig t4,"@"
jrst badchr
caige t4,"["
jrst gn1
caig t4,"`"
jrst badchr
caige t4,"{"
jrst badchr
gn1: CAIL T4,"A" ;ALPHA CHAR?
CAILE T4,"Z" ;WELL?
CAIA ;NO - DO NOTHING
TXO TF,F.ALPH ;YES - SET FLAG
IDPB T4,T1 ;STORE THE CHAR
SOJG T2,GETND1 ;BACK FOR NEXT CHAR
GETND2: SETZ T4, ;set null char & use it for flag check
CAME T4,NAMFLG## ;if flag=0, pad w/nulls[S.T. 28-JAN-81]
MOVEI T4," " ;SET UP TO SPACE FILL
SOJL T2,GETND3 ;RETURN WHEN DONE
IDPB T4,T1 ;STORE A SPACE
JRST GETND2 ;BACK FOR NEXT
GETND3: MOVE S1,P1 ;return char in S1
MOVE S2,P2 ; and S2
TXNE TF,F.ALPH ;ALPHA CHARACTER SEEN?
$RETT ;YES - TRUE RETURN
seto s1
$RETF ;NO - FALSE RETURN
badchr: $text ,<?Illegal character in node name>
setz s1
$retf
;
EXT <VERSION>
IDENT: ITEXT (< .IDENT /X^D2R0/VERSION,VI%MAJ/^D/VERSION,VI%MIN/^D2R0/VERSION,VI%EDT//>)
CPYRGT: ASCIZ \;
;
; COPYRIGHT (c) 1980, 1981, 1982, 1985
; DIGITAL EQUIPMENT CORPORATION
;
; This software is furnished under a license and may be used
; and copied only in accordance with the terms of such license
; and with the inclusion of the above copyright notice. This
; software or any other copies thereof may not be provided or
; otherwise made available to any other person. No title to
; and ownership of the software is hereby transferred.
;
; The information in this software is subject to change
; without notice and should not be construed as a commitment
; by DIGITAL EQUIPMENT CORPORATION.
;
; DIGITAL assumes no responsibility for the use or reliability
; of its software on equipment which is not supplied by
; DIGITAL.
;\
CDAT: EXP -1
TOPS20 <
CETFD: block 1
ASCIZ /CETAB.MAC/ ;file
NTPFD: block 1
ASCIZ /NETPAR.MAC/ ; descriptors
PACFD: block 1
ASCIZ /NMLACC.MAC/ ;
>
TOPS10 <
CETFD: EXP <NTPFD-CETFD> ; .FDLEN - LENGTH WORD
SIXBIT /DSK/ ; .FDSTR - STRUCTURE CONTAINING THE FILE
SIXBIT /CETAB/ ; .FDNAM - FILE NAME
SIXBIT /MAC/ ; .FDEXT - FILE EXTENSION
EXP 0 ; .FDPPN - OWNER OF THE FILE
NTPFD: EXP <CETIFN-NTPFD> ;
SIXBIT /DSK/ ;
SIXBIT /NETPAR/ ;
SIXBIT /MAC/ ;
EXP 0
PACFD: EXP <CETIFN-PACFD> ;
SIXBIT /DSK/ ;
SIXBIT /NMLACC/ ;
SIXBIT /MAC/ ;
EXP 0
>
CETIFN: BLOCK 1 ; CETAB int. file #
CETFOB: BLOCK 2 ; and file output block
NTPIFN: BLOCK 1 ; NETPAR int. file #
NTPFOB: BLOCK 2 ; and file output block
PACIFN: BLOCK 1 ; NMLACC int. file #
PACFOB: BLOCK 2 ; and file output block
END