1
0
mirror of https://github.com/pkoning2/decstuff.git synced 2026-01-11 23:52:55 +00:00

Async DDCMP circuit support, including documentation.

This commit is contained in:
Paul Koning 2020-06-29 17:06:52 -04:00
parent 3a67c4d830
commit b870c2f37b
6 changed files with 444 additions and 1 deletions

View File

@ -2,4 +2,6 @@
Everything here is for DECnet/E V4, RSTS/E V10.1 unless otherwise stated.
1. 'evtlog.tsk' -- the standard evtlog with Y2K bugs fixed.
1. `evtlog.tsk` -- the standard evtlog with Y2K bugs fixed and support for events that reference TT (async DDCMP) lines/circuits.
2. `ncp.tsk` -- the standard NCP program with TT (async DDCMP) support added. Refer to file `ncp.txt` for more information.

123
decnete/async-rsts.txt Normal file
View File

@ -0,0 +1,123 @@
Software DDCMP in RSTS/E V10
NODVR, a software DDCMP driver was written for V9.6 as part of PRO
support (an unreleased and unsanctioned effort). In V10.0 it was made
part of the released product. These notes were reverse engineered
from the V10.1 code, though it is likely they are valid also for
V10.0.
NODVR is an "auxiliary driver", essentially a software coprocessor for
a standard device. In this case, it is associated with a terminal
line, and hooks to the terminal driver to become an alternate
character processor. Any physical terminal port other than the
console can be operated in DDCMP mode, but the PRO display,
pseudo-keyboards, and LAT terminals cannot.
Unlike other DDCMP devices, NODVR does not support use from
application programs. It can only be used as a DECnet data link.
Enabling NODVR support in RSTS.
While the software is built into the OS during SYSGEN, it is not
loaded unless enabled by a flag in the system configuration file
[0,1]CONFIG.SYS. To set this flag:
$ set system/async
The change will take effect after a system reboot. You can use "show
system" to confirm that the software DDCMP driver is loaded.
Starting DDCMP on a terminal line.
Running the DDCMP driver on a given terminal line is a two step
process. The first step enables DDCMP mode by binding an NODVR unit
to the terminal line. The second step starts the DDCMP state machine
for that unit.
1. Set DDCMP mode for a terminal
Before this is done, either the terminal line must be not owned, or it
must be owned (assigned) by the requesting job.
To enable DDCMP mode for a given terminal line, issue this DCL
command:
$ set term kb<x>/proto=ddcmp
Alternatively in a program, open NO0: and issue a .SPEC request with the
following arguments:
XRB: 3 (Function code: set DDCMP mode)
XRBC: Terminal unit number to set to DDCMP mode
On successful completion, the terminal line is now associated with the
DDCMP driver. As part of this, an NO<x>: DDB has been created, where
<x> is the terminal line unit number specified. The terminal line is
now marked as owned by DECnet (owner job appears as "TRN" in the SHOW
DEVICES/ALLOC command).
2. Start DDCMP circuit
Issue a DECnet circuit start request, which is a .MESAG with the
following arguments:
FQFIL = -21 (Function code: circuit control)
FQSIZM = 3 (Subfunction: circuit on)
FQ$MFL = Routing circuit flags [11]
LF.VER ==> Verification required
LF.ANS ==> Answer mode
LF.RST ==> Restartable (512)
LF.TRA ==> Trace for this circuit
FQNAM1 = Originating queue limit [7]
FQNAM1+2 = Recall timer [9]
FQBUFL = Hello timer interval [15]
FQMODE = Operational mode (see below) [17]
FQFLAG = Circuit cost [19]
FQ$CTM = Counter timer [21]
FQDEV,
FQDEVN = Device to use ("TT" in FQDEV, <x> in FQDEVN) [23..26]
FQCLUS = Buffer quota (byte) [27]
Numbers in [ ] indicate character positions in the Basic-PLUS syscall.
FQMODE bit 14 (8192) set indicates a request for sync mode. This is
only valid on a PRO, and then only for the terminal line corresponding
to the communication port. No other mode bits apply to the async DDMP
driver.
Make sure the XRB is zeroed since this is not a data transferring case
of .MESAG. Note that the device name is given as "TT" not "KB" or
"NO"; the DECnet circuit start code recognizes this name as a special
case.
Stopping DDCMP
This involves the reverse of the two steps given above.
1. Stop DDCMP circuit
Issue a DECnet circuit stop request, which is a .MESAG with the
following arguments:
FQFIL = -21 (Function code: circuit control)
FQSIZM = 4 (Subfunction: circuit off)
FQDEV,
FQDEVN = Device to use ("TT" in FQDEV, <x> in FQDEVN)
Make sure the XRB is zeroed since this is not a data transferring case
of .MESAG. Note that the device name is given as "TT" not "KB" or
"NO"; the DECnet circuit start code recognizes this name as a special
case.
2. Disable DDCMP mode for the terminal line
To return the terminal line that was used to normal operation rather
than being bound to the Async DDCMP driver, use the DCL command:
$ set term kb<x>/proto=none
Alternatively in a program, open NO0: and issue a .SPEC request with the
following arguments:
XRB: 4 (Function code: set normal mode)
XRBC: Terminal unit number to revert to normal mode
On successful completion, the terminal line is no longer associated
with the DDCMP driver. Any resources allocated for DDCMP mode have
been freed. Ownership of the terminal line is returned to what it was
before DDCMP mode was set.

259
decnete/async.fth Normal file
View File

@ -0,0 +1,259 @@
\
\ A S Y N C . F T H
\
\ This is a small FORTH utility to control async DDCMP on a terminal
\ line in RSTS/E V10.1. While async DDCMP can be used with application
\ programs, here we use it as a DECnet line.
\
\ Edit history:
\
\ 22-Jul-19 GPK Initial version.
\ To compile ASYNC, you also need COMMON.FTH (a FORTH translation of
\ COMMON.MAC) from the FORTH optional install in the RSTS/E kit.
\ Lifted from COMMON.FTH since that doesn't seem to be on the kit.
base @
0 variable dot
: .dsect dot ! ;
: .bsect 1 .dsect ;
: ?b dot @ 1 and -dup
if dot +! ." Boundary error in " latest id. ." at " dot @ o. cr
endif ;
: .fillb dot +! ;
: .fillw ?b 2* .fillb ;
: .val dot @ constant ;
: .blkb .val .fillb ;
: .blkw ?b 2* .blkb ;
: .byte 1 .blkb ;
: .word 1 .blkw ;
: .bit dot @ .blkb ;
: .nobit dot @ .fillb ;
octal
\ XRB and FIRQB sizes
40 constant FQBSIZ \ Size of FIRQB in bytes
16 constant XRBSIZ \ Size of XRB in bytes
\ Some monitor calls
104014 constant .SPEC \ Special function
104060 constant .MESAG \ Message send/receive
\ Job Unique Low Memory Layout
0 .dsect
30 .fillw \ Job controlled
15 .fillw \ Reserved for monitor context use
30 .fillw \ Reserved for monitor FPP context use
103 .fillw \ Job's SP stack area
.val USRSP \ Default job SP stack setting
.word RSTS-KEY \ Keyword of job's current status
fqbsiz .blkb FIRQB \ File request queue block
xrbsiz .blkb XRB \ Transfer control block
200 .blkb CORCMN \ CCL line COMMON
26 .fillw \ Job controlled
.word USRPPN \ User's assignable PPN
.word USRPRT \ User's assignable protection code
4 4 * .blkw USRLOG \ User's logical device table
.val NSTORG \ End of low memory fixed layout
\ Transfer Control Block -- XRB
xrb .dsect
.word XRLEN \ Length of I/O buffer in bytes
.word XRBC \ Byte count for transfer
.word XRLOC \ Pointer to I/O buffer
.byte XRCI \ Channel number times 2 for transfer
.byte XRBLKM \ Random access block number -- msb
.word XRBLK \ Random access block number -- lsb
.word XRTIME \ Wait time for terminal input
.word XRMOD \ Modifiers
\ File Request Queue Block
firqb .dsect
1 .fillb \ Reserved for returned error code
1 .fillb \ Reserved byte
.byte FQJOB \ Holds your job number times 2
.byte FQFUN \ Function requested
.val FQERNO \ Error message code and text begin
.byte FQFIL \ Channel number times 2
.byte FQSIZM \ File size in blocks -- msb
.word FQPPN \ Project-programmer number
2 .blkw FQNAM1 \ 2 word filename in radix 50
.word FQEXT \ 1 word filetype in radix 50
.word FQSIZ \ File size in blocks -- lsb
.val FQNAM2 \ 3 word new FILNAM.TYP in radix 50
.word FQBUFL \ Default buffer length
.word FQMODE \ MODE indicator
.word FQFLAG \ Opened file's flag word as returned
.byte FQPFLG \ "Protection code real" indicator
.byte FQPROT \ New protection code
.word FQDEV \ 2 byte ascii device name
.byte FQDEVN \ 1 byte unit number
1 .fillb \ "Unit number real" indicator
.word FQCLUS \ File cluster size for file creates
.word FQNENT \ Number of entries on directory lookup
\ Define some more things, these are taken from NETDEF.MAC (the DECnet/E
\ definitions file).
decimal
-21 constant SR$LIN \ -21 circuit control
\ Send/receive sub-function code definitions (FIRQB byte 5)
1 .dsect \ Sub-functions of SR$LIN
.byte SF$ASN \ Set line owner exe
.byte SF$DEA \ Clear line owner
.byte SF$LON \ Set line state to on
.byte SF$LOF \ Set line state to off
.byte SF$LCH \ Change line parameters
\ Network FIRQB fields we need
octal
416 constant FQ$MFL \ Message flags (DM)
\ FQ$MFL bits
100 .dsect
.bit LF.VER \ (Point) Verification required on this circuit
.nobit
.nobit
.bit LF.RST \ Circuit is restartable
.bit LF.ANS \ (Point) Circuit is operating in answer mode
.nobit
.nobit
.bit LF.TRA \ Trace enabled for this circuit
\ More handler indexes (used in .SPEC call)
decimal
42 constant DDCHND \ DDCMP device handler
\ Lifted from ODT.FTH
\ define "next" for machine code definitions
octal
: next, 12403 , 133 , ; decimal
\ define word in machine code. this word is used to define other
\ words whose code is in machine language. it is followed by the name
\ of the word to define, and the code to generate (each in the form
\ value , ) terminated by next, .
: code create smudge [compile] [ ;
code mesag .mesag , next,
code spec .spec , next,
: ?firqb firqb c@ -dup
if (err) type cr ." ok" cr quit
endif ;
2ascii TT constant TT
( unit -- )
: circ FIRQB FQBSIZ erase XRB XRBSIZ erase
FQDEVN c! \ unit number
TT FQDEV ! \ device name
-21 FQFIL c! ; \ Circuit control
( unit -- status )
: circon
circ
3 FQSIZM c! \ Circuit on
10 FQNAM1 ! \ Originating queue limit
30 FQNAM1 2+ ! \ Recall timer
120 FQBUFL ! \ Hello timer
10 FQFLAG ! \ Circuit cost
LF.RST FQ$MFL ! \ Flags: enable restart
7 FQCLUS ! \ Buffer quota
mesag FIRQB c@ ;
( unit -- status )
: circoff
circ
4 FQSIZM c! \ Circuit off
mesag FIRQB c@ ;
( unit fun -- status )
: nospec
1 fileopen no0: -dup if (err) type quit endif
XRB XRBSIZ erase
XRB ! \ set function code
XRBC c! \ set unit number
2 XRCI c! \ set channel number *2
DDCHND XRCI 1+ c! \ set handler index
spec FIRQB c@
1 fileclose drop ;
( unit -- status )
: ddcmp 3 nospec ;
( unit -- status )
: normal 4 nospec ;
0 variable cclflag \ ccl entry flag
0 variable onflag \ true if "on" command
0 variable unum \ unit number
( unit -- )
: on
." Turning line TT-" dup . ." on" cr
dup ddcmp -dup if (err) type ." - in set ddcmp mode" quit endif
circon -dup if (err) type ." - in set circuit on" quit endif
." Circuit ON successful" cr quit ;
( unit -- )
: off
." Turning line TT-" dup . ." off" cr
dup circoff -dup
if
." warning: " (err) type ." - in set circuit off" cr
endif
normal -dup if (err) type ." - in set normal mode" quit endif
." Circuit OFF successful" cr quit ;
( -- )
: action
unum @ dup 1 < swap 127 > or if
." Invalid unit number, requires 1..127" cr bye
endif
-1 word here count 2dup upper
2dup " ON" drop -text 0= dup onflag ! 0=
if " OFF" drop -text 0=
if
." Usage: async unitnumber [ on | off ]" cr bye
endif
endif
unum @ onflag @ if on else off endif ;
( -- )
: interact
." Unit number? "
query -1 word here number drop unum !
." Action (on or off)? "
query action ;
( -- )
: main
fqnent @ 32767 and \ get "line" number, ignore priv flag
30000 = dup cclflag ! \ see if ccl entry
if 0 corcmn c@ corcmn + 1+ \ if so point to end of core cmn
2dup 1+ c! c! \ put in double null terminator
corcmn 1+ tib ! \ make that our temp input buffer
0 in ! \ and initialize scan
-1 word \ get rid of the invoking ccl
(in) c@ 0= \ test for end of line
if interact
else
-1 word here number drop unum !
action
endif
else interact endif
bye ;

Binary file not shown.

BIN
decnete/ncp.tsk Normal file

Binary file not shown.

59
decnete/ncp.txt Normal file
View File

@ -0,0 +1,59 @@
Using terminal lines as DECnet circuits using async DDCMP
Software DDCMP over RSTS terminal lines was written for V9.6 as part
of PRO support (an unreleased and unsanctioned effort). In V10.0 it
was made part of the released product. These notes apply to V10.1.
It is possible they will work on V10.0. I don't have a system to test
that, feedback would be welcome.
These notes describe how NCP (the version in this repository) supports
the use of terminal lines with async DDCMP as DECnet circuits.
NCP knows terminal circuits as circuit (or line) names TT-n where n is
an integer between 1 and 15. While RSTS supports higher unit numbers,
the DECnet/E database format does not have records allocated for
those. It would be possible to change that, but I have not done the
extra work and conversion needed.
Before terminal circuits are available for DECnet, you need two
preliminary steps.
1. Enabling NODVR support in RSTS.
While the software is built into the OS during SYSGEN, it is not
loaded unless enabled by a flag in the system configuration file
[0,1]CONFIG.SYS. To set this flag:
$ set system/async
The change will take effect after a system reboot. You can use "show
system" to confirm that the software DDCMP driver is loaded. This
step is needed only once, it is persistent once set.
2. Setting DDCMP mode on a terminal line.
Before this is done, either the terminal line must be not owned, or it
must be owned (assigned) by the requesting job.
To enable DDCMP mode for a given terminal line, issue this DCL
command:
$ set term kb<x>/proto=ddcmp
To return the terminal line that was used to normal operation rather
than being bound to the Async DDCMP driver, use the DCL command:
$ set term kb<x>/proto=none
3. NCP support
Lines and circuits TT-1 through TT-15 can be defined in the permanent
database with the DEFINE command, and displayed with the LIST
command. These commands are always available.
The corresponding operations on the active system, SET and SHOW, are
only valid on KB units that have been set into DDCMP mode as shown
above. The parameters that can be set, the status that is displayed,
and the counters you can see, are roughly those of the familiar DMC-11
devices (circuit name DMC-n or DMR-n). The counters are slightly
different, they were designed to match more closely what the DECnet
architecture spec calls for.