.SBTTL XDTE10 - driver for a DECsystem-10 through a DTE-20
; This module replaces the DL10 module in the DN60 front-end
; program to use the DTE-20 on a 1090 configuration rather
; than the DTE-20 on the 2040 or the DL10 on a 1070.
;
; Note that the hardware is the same for TOPS-10 and TOPS-20, but
; the TOPS-10 version is driven by D60SER/D6SINT, which interface
; to the TOPS-10 DTESER module for the DN60. The TOPS-20 version
; is driven by the TOPS-20 module FESRV which interfaces to
; DTESRV. FESRV was enhanced for the DN60 project, but
; is not special-purpose as D60SER/D6SINT is.
;
; This module conditionally assembles to interface to FESRV on
; TOPS-20 by setting the switch FTFEDV to a nonzero value.
;
; XDTE10.P11 is a replacement for the old HDTE10.P11 to use the
;common protocol module XTENCM and its standard interface.
.REPT 0
Things still to do, loose ends:
o separate common code for XDTE10 and XDTE20 (and perhaps XDMC20)
o move DLGONE to driver
o change DLACKF to be .WORD 0
o move DTE save code to TRPINT
.ENDR;.REPT 0
.REPT 0
COPYRIGHT (c) 1982,1981,1980, 1979
DIGITAL EQUIPMENT CORPORATION, maynard, mass.
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.
.ENDR;.REPT 0

VDTE10=033 ;XDTE10 edit number
VEDIT=VEDIT+VDTE10 ;DN60 total edit number
.REPT 0
Revision History
Edit Who Date What
5(31) KR 13-Oct-80 Strip out all common code, implement standard interface
This new module is (very) loosely based on 4(30) of
HDTE10.
5(32) RLS 28-JAN-81 Insert FTFEDV condtional code to create a TOPS-20/FESRV
protocol driver. Primary difference is that the DN60
header comes as an indirect message and any data
comes as a separate FE header,indirect transfer pair.
Also, each indirect part must be explicitly ack'd.
5(33) RLS 12-JUN-81 Insert FTP5 conditional code to create TOPS-20
release 5 protocol. Primary differences are an
expanded header(up to 8 words) and the exclusive
use of direct mode transfers. The response
header includes a 2 word device status and a 2
word line status. TENTSK may elect to return
no data on a read dta fcn - handled by setting
the queue size to zero and ringing the 10 doorbell.
Similarly the deposit fcn doesn't even return a
header...no header returned => no data returned.
.ENDR;.REPT 0

.REPT 0
This section contains the DTE-20 driver and the queued protocol
interface conforming to the RSX-20F specifications for
communication between the PDP-11 and DECsystem-10.
This module contains device-dependent code for talking to
the TOPS-10 modules D60SER/D6SINT and DTESER. It calls a common
protocol module, XTENCM.P11, via the standard interface, namely
calling either WAKTEN to wake up the DL10/DTE task if the -10
has had some sort of error, or WAKFNC to provide a function and
wake up the task if it has work to do.
The following symbols defined in this module are referred to by the
rest of the DN60 code:
DLSTCS routine to store stopcode value
DSPDLT once/tick timer code
DSPDLS once/second timer code
INITDL initialize -10 interface hardware
DLRESP send back response to -10
BLECHI block transfer of input data
BLECHO block transfer of output data
BYTCHI byte transfer of input data
BYTCHO byte transfer of output data
DT10DS two word device status - FTP5
DT10LS two word line status - FTP5
The following symbols defined elsewhere are used by this module:
T.HDR displacement of header in DL10/DTE task block
T.FN function code
T.RES result code
T.DEV device number
T.LIN line number
T.LNG (word) length of data
WAKTEN routine to wake DL10/DTE task
WAKFNC routine to give a function to DL10/DTE task and wake it
TENSLP routine to put DL10/DTE task to sleep waiting for EBTENI
DLGONE cell set to -1 when -10 interface is dead, 0 when it is alive
note, driver alone can set or clear it
This module implements the DN60-DTE interaction as a single state
machine, pieces of which are executed at both interrupt and non-interrupt
level. The subroutine NXTPRT does the next part of the state machine;
it has one of six interrupt conditions (I..xxx) set in cell INTCND. Each
state examines interrupt conditions in a fixed order, and decides upon
a new state to enter.
The interrupt conditions are generated by both the DTE hardware and the
DN60 software; the hardware conditions are to-10 done interrupt, to-11 done
interrupt and doorbell interrupt. The interrupt handler generates another
condition, TGHA doorbell, if valid examine is not on in the status word from
the -10 on a doorbell. The remaining two interrupt conditions are 1) response
ready (generated by DLRESP which the common module calls when it has finished
building the reply to a request) and 2) TGHA timer expired, which means the
once a second code has decremented the TGHA timer to zero.
.ENDR;.REPT 0