top - download
⟦2b01d31d3⟧ Wang Wps File
Length: 62948 (0xf5e4)
Types: Wang Wps File
Notes: CPS/SDS/050
Names: »4587A «
Derivation
└─⟦ea7a1ecf3⟧ Bits:30006190 8" Wang WCS floppy, CR 0437A
└─ ⟦this⟧ »4587A «
WangText
…00……00……00……00……00…C…0a…C…0b…C…0c…C…05…B…01…B B…06…6…02…6…05…#…00…# "…08…"…0a…"…0b…"…0c…"…01…"
"…07…!…0c…!…0f……11……0b……11……00……11……05……10……0b……10……00……10… …0f……09……0f……0d……0f……02……0e……86…1 …02… …02… …02…
…02…CPS/SDS/050
…02…851220…02……02…
CAMPS LITSYNC FIRMWARE
DETAILED DESIGN SPECIFICATION…02……02…CAMPS
T̲A̲B̲L̲E̲ ̲O̲F̲ ̲C̲O̲N̲T̲E̲N̲T̲S̲
1 GENERAL ........................................
1
1.1 PURPOSE & SCOPE ............................
1
1.2 APPLICABLE DOCUMENTS .......................
2
1.3 ABBREVIATIONS ..............................
3
2 SUMMARY OF REQUIREMENTS ........................
5
3 ENVIRONMENT ....................................
6
3.1 EQUIPMENT ..................................
6
3.2 SUPPORT SOFTWARE ...........................
6
3.3 INTERFACES ................................
6
3.3.1 CR80D System Interfaces ................
6
3.3.2 Modem/Crypto Interface .................
6
3.3.3 Security ...............................
6
4 FUNCTIONAL BREAKDOWN ...........................
4
4.1 HIF ........................................
10
4.2 TRANSMITTER ................................
12
4.3 RECEIVER ...................................
13
4.4 MONITOR ....................................
14
4.5 SIF ........................................
15
5 DEFINITION OF NTS SUBSYSTEM CONSTANTS ..........
16
6 DEFINITION OF NTS SUBSYSTEM VARIABLES ..........
23
7 DETAILED SPECIFICATION OF PROCEDURES ...........
33
7.1 PROCEDURE ACKLTO ..........................
35
7.2 PROCEDURE ACKTO ...........................
36
7.3 PROCEDURE CHAR ̲INT ........................
37
7.4 PROCEDURE CHECK ̲RETRAN ....................
43
7.5 PROCEDURE CLEANUP .........................
44
7.6 PROCEDURE CLEAR ...........................
45
7.7 PROCEDURE CLOCK ̲INT .......................
46
7.8 PROCEDURE ENABLE ̲CHANNEL ..................
47
7.9 PROCEDURE EN ̲ERROR ........................
49
7.10 PROCEDURE EXTERNAL STATUS INTERRUPT .......
50
7.11 PROCEDURE FAT ̲ERR .........................
51
7.12 PROCEDURE GATHER ̲STATS ....................
52
7.13 PROCEDURE HARDWARE ̲INITIALIZE .............
54
7.14 PROCEDURE HIF ̲CANCEL ......................
55
7.15 PROCEDURE HIF ̲COMMAND .....................
56
7.16 PROCEDURE HIF ̲COMMAND ̲RETURN .............
58
7.17 PROCEDURE HIF ̲INPUT ......................
59
7.18 PROCEDURE HIF ̲RX ̲IN ......................
60
7.19 PROCEDURE HIF ̲RX ̲OUT .....................
61
7.20 PROCEDURE HIF ̲TX ̲IN ......................
62
7.21 PROCEDURE HIF ̲TX ̲OUT .....................
65
7.22 PROCEDURE HIF ̲TX ̲RTN .....................
67
7.23 PROCEDURE HOST ̲ACK .......................
68
7.24 PROCEDURE INIT ̲HOST ̲BUFFERS ..............
70
7.25 PROCEDURE INIT ̲HOSTIF ....................
71
7.26 PROCEDURE INITIATE ̲TRANSMISSION ..........
72
7.27 PROCEDURE LEVEL1 ̲CLOSE ...................
73
7.28 PROCEDURE L1HANDL ........................
74
7.29 PROCEDURE MONITOR ........................
76
7.30 PROCEDURE MOVE ̲DATA ......................
77
7.31 PROCEDURE MOVE ̲RX ̲DATA ...................
78
7.32 PROCEDURE OPEN ̲COMPLETE ..................
79
7.33 PROCEDURE OPEN ̲EDC .......................
80
7.34 PROCEDURE POPL ...........................
82
7.35 PROCEDURE PUSHL ..........................
82
7.36 PROCEDURE POPS ...........................
82
7.37 PROCEDURE PUSHS ..........................
82
7.38 PROCEDURE QUEUE ̲ACK ......................
83
7.39 PROCEDURE QUEUE ̲LCB ......................
84
7.40 PROCEDURE QUEUE ̲NAK ......................
85
7.41 PROCEDURE QUEUE ̲NAKF .....................
86
7.42 PROCEDURE QUEUE ̲STATUS ...................
87
7.43 PROCEDURE REDEFINE ̲PARAMETERS ............
88
7.44 PROCEDURE RED ̲ERROR ......................
90
7.45 PROCEDURE RESYNCHRONIZER .................
91
7.46 PROCEDURE RELEASE ̲BUFFER(CHANNO) .........
92
7.47 PROCEDURE REMOVE ̲ELEMENT .................
93
7.48 PROCEDURE RE ̲QUEUE ̲LCB(CHANNO) ...........
94
7.49 PROCEDURE REPORT ̲PROTOCOL ................
95
7.50 PROCEDURE RX ̲DISPATCHER ..................
96
7.51 PROCEDURE SCHEDULE .......................
104
7.52 PROCEDURE SEGMENT ̲PROCESSOR ..............
105
7.53 PROCEDURE SERVICE ̲INVALID ̲RETRANSMISSIONS
106
7.54 PROCEDURE SERVICE ̲NEXT ̲EXPECTED ..........
107
7.55 PROCEDURE SERVICE ̲RETRANSMISSIONS ........
107
7.56 PROCEDURE SET ̲XMIT ̲PRIORITY ..............
108
7.57 PROCEDURE SPEC ̲INT .......................
109
7.58 PROCEDURE STORE ̲PRIMARY ̲BUFFER ...........
110
7.59 PROCEDURE STORE ̲SEC ̲BUFFER ...............
111
7.60 PROCEDURE TRANSMITTER(CHANNO) ............
113
7.61 PROCEDURE TX ̲CANCEL ......................
115
7.62 PROCEDURE TX ̲ERROR .......................
117
7.63 PROCEDURE XMITTER ........................
118
7.64 PROGRAM DEFINITIONS ......................
130
8 TESTING ........................................
131
8.1 PHASE 1 ....................................
131
APPENDIX A
APPENDIX B
APPENDIX C
APPENDIX D
APPENDIX E
1̲ ̲ ̲G̲E̲N̲E̲R̲A̲L̲
1.1 P̲U̲R̲P̲O̲S̲E̲ ̲&̲ ̲S̲C̲O̲P̲E̲
This document describes the detailed design of the
Litsync Firmware (NICS-TARE Subsystem, NTS).
The NTS subsystem provides the functions/programs for
the interchange of ACP 127 formatted message segments
between CAMPS and the NICS-TARE network.
1.2 A̲P̲P̲L̲I̲C̲A̲B̲L̲E̲ ̲D̲O̲C̲U̲M̲E̲N̲T̲S̲
1) CAMPS Requirements Specification,
CPS/210/SYS/0001, Issue 3
2) CAMPS System Design Specification,
CPS/SDS/001
3) NiCS-TARE Interface,
CPS/ICD/004, 810525
4) Subset of (as defined in Ref. 3):
Subststem Specification for the TARE for NICS (Vol.
IV) App. 30 and 40 Doc. 177000-600F of 29 june
1979 with DCN G9 of 1 May 1981.
5) Functional Specification, CR80 LTU I/F,
CSS-MIC/040/FNC/0001
6) I/O Control,
Sec. 4.1.3.6.3.1 - 4.1.3.6.3.5 of CPS/SDS/028
7) Contract between Christian Rovsing A/S and Christian
Rovsing Corp. Sec. D.
8) MOSTEK 1981 Z80 Microcomputer Data Book
9) Intel Peripheral Design Handbook Aug. 1980
10) ZILOG Z80 CPU Central Processing Unit Product Spec.
11) ZILOG Z80 CTC Counter/Timer Circuit Product Spec.
12) 8066D LTU CSD-MIC/005/PSP/0041
13) AMD Product Specification
1.3 A̲B̲B̲R̲E̲V̲I̲A̲T̲I̲O̲N̲S̲
ACK Ackonwledge
ACKL Acknowledge LCB
ADDR Address
BID Block ID or sequence number
CHANNO Channel Number
CIRCLE Circular array
D Data
DELTA Time interval
EDC Error detection and correction
EOM End of message
EOS End of segment
HIF Host Interface
I/F Interface
LCB Line Control Block
LDU Logical Data Unit
LEN Length
LSB Least Significant Byte
LTU Line Termination Unit
MSB Most Significant Byte
NAK Negative Acknowledge
NAKF Full NAK
NAKI NAK (i)
NAKIJ NAK (i,j)
PIO Programmable Input Output
P1-Pn Parameters
PTR Pointer
RR Request Response Block
RX Receiver
RX.IN HIF area: HOST to LTU (empty buffers)
RX.OUT HIF area: LTU to HOST (data & status)
SEQ Segment
SEQ ̲NO Sequence Number
SETB Setup Block
SIO Serial Input Output
TX Transmitter
TX.IN HIF area; HOST to LTU (transmission & command)
TX.OUT HIF area; LTU to HOST (empty buffers)
All notation of the form (Dn, WRn, SIO), (Dn, RRn,
SIO), (DMA + n) or (DN, PIO) refers to the bit, register
and chip designation. Refer to the appropriate hardware
reference manual.
2̲ ̲ ̲S̲U̲M̲M̲A̲R̲Y̲ ̲O̲F̲ ̲R̲E̲Q̲U̲I̲R̲E̲M̲E̲N̲T̲S̲
The LTU Protocol software shall per LTU be able to
support two full duplex 2400 baud EDC controlled channels
at full speed.
The LTU Protocol Software together with the V24 drivers
and system software shall in program size not exceed
32 K bytes.
The LTU protocol Software and the V24 driver software
data space required for operation of two channels as
outlined above shall including buffers required for
the proper function of the EDC protocol and required
for the proper function of the interface to the Handler
shall not exceed 32 K bytes.
All requirements of the documents listed in Section
which refer to the EDC protocol should be satisfied.
3̲ ̲ ̲E̲N̲V̲I̲R̲O̲N̲M̲E̲N̲T̲
3.1 E̲Q̲U̲I̲P̲M̲E̲N̲T̲
The SITSYNC Firmware will be implemented in a CR80D
LTU, Type CR8066.
3.2 S̲U̲P̲P̲O̲R̲T̲ ̲S̲O̲F̲T̲W̲A̲R̲E̲
1) CR A/S will provide a working version of the NICS-TARE
Handler which runs in the CR80D and interfaces
to the LTU. This software is to be used for Phase
II testing. CR A/S will also provide programs to
transmit and receive messages from the NTS subsystem
via the NICS-TARE Handler and programs to compare
data transmitted with data received.
3.3 I̲N̲T̲E̲R̲F̲A̲C̲E̲S̲
3.3.1 C̲R̲8̲0̲D̲ ̲S̲y̲s̲t̲e̲m̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
Refer to Functional Specification, CR80 LTU I/F and
Sec. D of the contract (7).
3.3.2 M̲o̲d̲e̲m̲/̲C̲r̲y̲p̲t̲o̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Refer to NICS-TARE Interface, CPS/ICD/004 and CPS/SDS/028.
3.3.3 S̲e̲c̲u̲r̲i̲t̲y̲
All buffers returned to the CR80 as empty will be cleared
and all buffer received from the CR80 as empty will
be cleared.
4̲ ̲ ̲F̲U̲N̲C̲T̲I̲O̲N̲A̲L̲ ̲B̲R̲E̲A̲K̲D̲O̲W̲N̲
The NICS-TARE Subsystem, NTS, logically consists of
five major modules. These are:
I) The Host Inteface, HIF
II) The Transmitter
III) The Receiver
IV) I/O Interrupt Handlers, SIF
V) and The Monitor, MON
F̲i̲g̲u̲r̲e̲ ̲4̲-̲1̲ ̲ ̲S̲u̲b̲s̲y̲s̲t̲e̲m̲ ̲M̲o̲d̲u̲l̲e̲ ̲B̲r̲e̲a̲k̲d̲o̲w̲n̲
F̲i̲g̲u̲r̲e̲ ̲4̲-̲2̲ ̲ ̲M̲o̲d̲u̲l̲e̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲F̲l̲o̲w̲
4.1 H̲I̲F̲
The HOST Interface Module, HIF, handles all communications
between the LTU and the HOST. Its functions consist
of:
1) Monitor and Manage the HOST I/F area and its protocol
2) Accept Incoming Transmission buffers from the HOST
3) Accept, Identify and Verify Command Buffers from
the HOST
4) Return empty Buffers to the HOST
5) Accept Empty Buffers from the HOST
6) Return Filled Data Buffers and Command Buffers
to the HOST
7) Implement HOST Commands
8) Block Outgoing Message Segments
The following procedures constitute the HIF module:
1. CLEANUP
2. ENABLE ̲CHANNEL
3. GATHER ̲STATS
4. EN ̲ERROR
5. HARDWARE ̲INITIALIZE
6. HIF ̲CANCEL
7. HIF ̲COMMAND
8. HIF ̲COMMAND RETURN
9. HIF ̲INPUT
10. HIF ̲RX ̲OUT
11. HIF ̲TX ̲CANCEL
12. HIF ̲TX ̲SIN
13. HIF ̲TX ̲OUT
14. HOST ̲ACK
15. FAT ̲ERR
16. INIT ̲HOST ̲BUFFERS
17. MOVE ̲DATA
18. OPEN ̲COMPLETE
19. OPEN ̲EDC
20. REDEFINE ̲PARAMETERS
21. RED ̲ERROR
22. REPORT ̲PROTOCOL
23. STORE ̲PRIMARY ̲BUFFER
24. STORE ̲SECONDARY ̲BUFFER
25. TX ̲ERROR
26. QUEUE ̲STE
27. HIF ̲TX ̲RTN
28. INIT ̲HOSTIF
29. PUSHS
30. POPS
31. PUSHL
32. POPL
33. CLEAR
34. HIF ̲RX ̲IN
35. REMOVE ̲ELEMENT
4.2 T̲R̲A̲N̲S̲M̲I̲T̲T̲E̲R̲
The Transmitter module handles all data transmission
and those portions of the EDC protocol which deal with
transmissions.
Both line control blocks and data blocks are transmitted.
Transmissions which are acknowledged by NICS-TARE are
returned to the HOST as successful.
The HOST specifies the number of re-transmissions which
may occour before a fatal error results. Fatal errors
are reported to the HOST with an accompanying cessation
of protocol activity.
The Transmitter functions consist of:
1) Transmit Data Blocks
2) Transmit Line Control Blocks
3) Monitor NICS-TARE Acknowledgement of Blocks
4) Report Transmission Status to the HOST
5) Report Fatal Protocol Errors to the HOST
6) Transmit Protocol Control Blocks
7) Setup the Channel
The Transmitter consists of the following procedures:
1. ACKLTO
2. ACKTO
3. QUEUE ̲LCB
4. REQUEUE ̲LCB
5. TRANSMITTER
4.3 R̲E̲C̲E̲I̲V̲E̲R̲
The Receiver module handles all data reception and
those portions of the EDC protocol which deal with
reception. Both line control blocks and data blocks
are received. Data blocks are deblocked into message
segments and transferred to the HOST as data segments.
Data segments acknowledged by the HOST are acknowledged
to NICS-TARE. The Receiver maintains a log of incoming
blocks by BID and requests that missing blocks be retransmitted
by NICS-TARE
The Receiver functions consist of:
1) Reception of Data Blocks
2) Reception of Line Control Blocks
3) De-blocking of Data Blocks into Data Segments
4) Acknowledgement to NICS-TARE of HOST Acknowledged
Segments
5) Request for Re-transmission of Missing Blocks
The Receiver Module consists of the following procedures:
1. MOVE ̲RX ̲DATA
2. QUEUE ̲NAK
3. QUEUE ̲NAKF
4. QUEUE ̲ACK
5. CHECK ̲RETRAN
6. RX ̲DISPATCHER
7. SEGMENT ̲PROCESSOR
8. SERVICE ̲INVALID ̲TRANSMISSIONS
9. SERVICE ̲NEXT ̲EXPECTED
10. SERVICE ̲RETRANSMISSIONS
4.4 M̲O̲N̲I̲T̲O̲R̲
The Monitor module performs all functions related to
the scheduling of tasks. It maintains the system clock,
determines scheduling priorities and initiates execution
of procedures. Procedures may be scheduled periodically,
upon expiration of a timed interval or upon request
from another procedure.
The Monitor functions consist of:
1) Maintenance of the System Clock
2) Maintenance of the Scheduling Table by Priority
3) Initiation of Procedure Execution
The Monitor module consists of the following procedures:
1. CLOCK ̲INTERRUPT
2. MONITOR
3. SCHEDULE
4.5 S̲I̲F̲
The SIO Interface Module handles all interrupts from
the SIO, PIO, and DMA hardware. It performs all hardware
initialization and recovery. It maintains the level
1 protocol for either the remote or local TARE.
It assembles incoming data characters into blocks,
performs incoming character parity check and verifies
block checksums.
The SIF functions consist of:
1) Hardware Initialization
2) Service of Hardware Interrupts
3) Maintenance of Level 1 Protocol
The SIF modules consists of the following procedures:
1. CHAR ̲INT
2. SPEC ̲INT
3. EXT ̲INT
4. INITIATE ̲TRANSMISSION
5. LEV1 ̲CLOSE
6. RE ̲SYNCHRONIZER
7. RELEASE ̲BUFFER
8. L1HANDL
9. SET ̲XMIT ̲PRIORITY
10. XMITTER
5 DEFINITION OF NTS SUBSYSTEM CONSTANTS
R̲ ̲S̲T̲A̲T̲E̲ ̲-̲ ̲R̲E̲C̲E̲I̲V̲E̲R̲ ̲S̲T̲A̲T̲E̲S̲ ̲W̲H̲I̲C̲H̲ ̲I̲N̲C̲L̲U̲D̲E̲ ̲
1) READY ̲TO ̲RECEIVE - Receiver had buffer space and
is not in an error condition.
2) NAKF - An in range but not acceptable
BID was received. A NAKF has
been sent. The next expected
BID must be received before
a new BID will be accepted.
3) MAX ̲SEG - Two segments have been received
but not yet acknowledged. Only
re-transmissions will be accepted.
L̲T̲U̲ ̲S̲T̲A̲T̲E̲ ̲-̲ ̲L̲T̲U̲ ̲S̲T̲A̲T̲E̲S̲ ̲W̲H̲I̲C̲H̲ ̲I̲N̲C̲L̲U̲D̲E̲:
1) DISABLED - LTU is passive
2) ENABLED - LTU has received open channel
command but no EDC parameters
3) INITIALIZED - LTU has received LTU parameters,
hardware is initialized
4) OPENING - OPEN ̲EDC command has been received
5) RUNNING - Level 1 is functioning and
EDC has opened full-duplex
channel
6) ERROR - Level 1 or EDC fatal error
7) CLOSE - Either a fatal error has occured
or a CLOSE ̲EDC command has
been received
T̲S̲T̲A̲T̲E̲ ̲-̲ ̲T̲R̲A̲N̲S̲M̲I̲T̲T̲E̲R̲ ̲S̲t̲a̲t̲e̲d̲ ̲w̲h̲i̲c̲h̲ ̲i̲n̲c̲l̲u̲d̲e̲:
1) TSTATE0 - Transmitter has been initialized
with EDC parameters. Line is
down
2) TSTATE1 - OPEN ̲EDC command has been received
from HOST
3) TSTATE2 - SETB block has been transmitted.
LTU is awaiting ACK.
4) TSTATE3 - Line is up: Less than two segments
have been transmitted
5) TSTATE4 - Line is up: Two segments have
been transmitted
6) TSTATE5 - RR has been transmitted. LTU
is awaiting response.
7) TSTATE6 - Cleanup is in progress. This
could be caused by LEVEL 1
error, FATAL EDC error or CLOSE
̲EDC Host Command
R̲ ̲L̲ ̲S̲T̲A̲T̲E̲ ̲-̲ ̲L̲C̲B̲ ̲R̲e̲c̲e̲i̲v̲e̲r̲ ̲S̲t̲a̲t̲e̲s̲ ̲w̲h̲i̲c̲h̲ ̲i̲n̲c̲l̲u̲d̲e̲:
1) BUSY - LCB has been received: another
will not be accepted.
2) PENDING - LCB has been transferred to
HOST but HOST has not yet acknowledged
it.
3) ACCEPT - LTU is ready to receive an
LCB
L̲E̲V̲1̲ ̲S̲T̲A̲T̲E̲ ̲-̲ ̲L̲e̲v̲e̲l̲ ̲1̲ ̲S̲t̲a̲t̲e̲s̲ ̲w̲h̲i̲c̲h̲ ̲i̲n̲c̲l̲u̲d̲e̲:
1) SYN0 - OPEN ̲EDC command has been received
2) SYN1 - Cir 107 is off: transition
from SYN0
3) SYN2 - Cir 107 is on: transition from
SYN0
4) SYN3 - Temporary state to check Cir
106 and 109
5) SYN4 - Normal running state
6) SYN5 - Error state
7) SYN6 - Enabled state
8) SYN7 - Manual sync
9) SYN8 - Disabled
X̲S̲T̲A̲T̲E̲ ̲-̲ ̲X̲m̲i̲t̲t̲e̲r̲ ̲S̲t̲a̲t̲e̲s̲ ̲w̲h̲i̲c̲h̲ ̲i̲n̲c̲l̲u̲d̲e̲:
1) XSTATE1 - Idle, no block to transmit
2) XSTATE2 - Data blocks are to be transmitted
3) XSTATE3 - Data blocks are to be re-transmitted
4) XSTATE4 - ACK blocks are to be transmitted
5) XSTATE5 - NAK blocks are to be transmitted
6) XSTATE6 - LCB's are to be transmitted
7) XSTATE7 - ACKL is to be transmitted
8) XSTATE8 - RR is to be transmitted
9) XSTATE9 - SETB is to be transmitted
I̲N̲T̲E̲R̲N̲A̲L̲ ̲T̲A̲B̲L̲E̲ ̲L̲E̲N̲G̲T̲H̲ ̲w̲h̲i̲c̲h̲ ̲a̲r̲e̲ ̲f̲i̲x̲e̲d̲ ̲a̲t̲ ̲A̲s̲s̲e̲m̲b̲l̲y̲ ̲T̲i̲m̲e̲
TRANS ̲CIRCLE ̲LEN Length of TRANS ̲CIRCLE
PENDING ̲TABLE ̲LEN Length of PENDING ̲TABLE
STACK ̲OF ̲EMPTIES ̲RX ̲LEN Length of STACK ̲OF ̲EMPTIES
̲RX
STACK ̲OF ̲EMPTIES ̲LEN Length of STACK ̲OF ̲EMPTIES
NAK ̲TAB ̲LEN Length of NAK ̲CIRCLE
RETRAN ̲CIRCLE ̲LEN Length of RETRAN ̲CIRCLE
XMIT ̲CIRCLE ̲LEN Length of XMIT ̲CIRCLE
C̲O̲N̲T̲R̲O̲L̲/̲S̲T̲A̲T̲U̲S̲ ̲P̲a̲r̲a̲m̲e̲t̲e̲r̲s̲ ̲f̲o̲r̲ ̲L̲T̲U̲ ̲-̲ ̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) INPUT ̲REQUEST - Control Code 0
2) CANCEL ̲INPUT ̲REQUEST - Control Code 1
3) CANCEL ̲OUTPUT - Control Code 2
4) REPORT ̲STATUS ̲REQUEST - Control Code 3
5) OPEN ̲CHANNEL - Control Code 4
6) CLOSE ̲CHANNEL - Control Code 5
S̲t̲a̲t̲u̲s̲ ̲T̲y̲p̲e̲s̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) TRANSMISSION ̲STATUS Status Type 0
2) RECEPTION ̲STATUS Status Type 1
3) INTERRUPT Status Type 2
4) CHANNEL ̲STATUS Status Type 3
S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲S̲t̲a̲t̲u̲s̲ ̲S̲t̲a̲t̲e̲s̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) TX ̲OK Code 0
2) TX ̲CHANCELLED Code 1
3) TX ̲ERROR Codes 2-255
4) CANCEL ̲TX ̲ERROR Code 2
5) EDC ̲TX ̲ERROR Code 3
6) LEV1 ̲RX ̲ERROR Code 4
7) LDU ̲ERROR ̲ACK Code 5
8) RX ̲ERROR Code 1
9) RX ̲CANCELLED Code 2
10) CHANNEL ̲STATUS Codes 0-255
B̲u̲f̲f̲e̲r̲ ̲T̲y̲p̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) SINGLE ̲LDU Code 11B
2) START ̲LDU Code 01B
3) PART ̲LDU Code 00B
4) LAST ̲LDU Code 10B
5) STATUS bit 2 = 1
6) CTRL bit 2 = 1
7) DATA bit 1 = 0
S̲E̲G̲M̲E̲N̲T̲ ̲T̲Y̲P̲E̲S̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) INTERMEDIATE ̲SEG Code 0
2) LAST ̲SEG Code 1
3) LCB ̲SEG Code 2
C̲o̲d̲e̲ ̲3̲ ̲C̲o̲m̲m̲a̲n̲d̲ ̲C̲o̲d̲e̲s̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
ENABLE Command Code 1
OPEN ̲EDC Command Code 2
CLOSE ̲EDC Command Code 3
REDEF ̲EDC ̲PARAMS Command Code 4
STATISTICS Command Code 5
EDC ̲STATUS Command Code 6
ACKNOWLEDGE Command Code 7
A̲S̲Y̲N̲C̲H̲R̲O̲N̲O̲U̲S̲ ̲R̲E̲P̲O̲R̲T̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) LINK ̲FAILED Code 2
2) EDC ̲FAILURE Code 12
3) MANUAL ̲SYNC Code 13
4) INCOMING ̲RESET Code 14
I̲N̲T̲E̲R̲N̲A̲L̲ ̲C̲O̲N̲S̲T̲A̲N̲T̲S̲
1) TYPE ̲1 NAK (i)
2) TYPE ̲2 NAK (i,j)
3) TYPE ̲3 NAKF
4) NULL ̲1 -1 indicates that receiver has
been initialized
5) NULL ̲2 -2 indicates ACK received before
SETB (RX)
H̲O̲S̲T̲ ̲S̲U̲P̲P̲L̲I̲E̲D̲ ̲B̲A̲U̲D̲ ̲R̲A̲T̲E̲S̲
1) 600 ̲BAUD
2) 1200 ̲BAUD
3) 2400 ̲BAUE
H̲O̲S̲T̲ ̲S̲U̲P̲P̲L̲I̲E̲D̲ ̲B̲L̲O̲C̲K̲ ̲S̲I̲Z̲E̲
1) 32 ̲BYTES
2) 64 ̲BYTES
3) 128 ̲BYTES
4) 256 ̲BYTES
5) 512 ̲BYTES
I̲F̲S̲T̲A̲T̲E̲ ̲S̲U̲P̲P̲L̲I̲E̲D̲ ̲B̲Y̲ ̲H̲O̲S̲T̲ ̲F̲O̲R̲ ̲T̲A̲R̲E̲
1) LOCAL Local TARE
2) REMOTE Remote TARE
H̲O̲S̲T̲ ̲E̲R̲R̲O̲R̲ ̲C̲O̲D̲E̲S̲ ̲L̲T̲U̲-̲C̲R̲8̲0̲ ̲I̲/̲F̲
1) SERR ̲1 Invalid HOST command for LTU
̲STATE = DISABLED: only valid
command is OPEN ̲CHANNEL.
2) SERR ̲2 Invalid HOST command for LTU
̲STATE = ENABLED: only valid
commands are CLOSE ̲CHANNEL OR
ENABLE.
3) SERR ̲3 Invalid HOST command for LTU
̲STATE = INITIALIZED: only valid
commands are CLOSE ̲CHANNEL or
OPEN ̲EDC.
4) SERR ̲4 Invalid HOST COMMAND FOR …02…LTU
̲STATE = OPENED: OPEN ̲CHANNEL
has been received.
5) SERR ̲5 Invalid HOST command for LTU
̲STATE = RUNNING.
6) SERR ̲6 Channel in error or close state.
T̲R̲A̲N̲S̲M̲I̲S̲S̲I̲O̲N̲ ̲B̲L̲O̲C̲K̲ ̲S̲I̲Z̲E̲ ̲C̲O̲N̲S̲T̲A̲N̲T̲S̲
SETB ̲SIZE ̲L LSB of length of SETB block
SETB ̲SIZE ̲M MSB of length of SETB block
RR ̲SIZE ̲L LSB of length of RR block
RR ̲SIZE ̲M MSB of length of RR block
ACKL ̲SIZE ̲L LSB of length of ACKL block
ACKL ̲SIZE ̲M MSB of length of ACKL block
ACK ̲SIZE ̲L LSB of length of ACK block
ACK ̲SIZE ̲M MSB of length of ACK block
E̲N̲A̲B̲L̲E̲ ̲C̲H̲A̲N̲N̲E̲L̲ ̲S̲T̲A̲T̲U̲S̲:̲ ̲P̲A̲R̲A̲M̲E̲T̲E̲R̲ ̲D̲E̲F̲I̲N̲I̲T̲I̲O̲N̲
E0 CHANNEL HAS BEEN SUCCESSFULLY ENABLED
E5 TARE PARAMETER IS INCORRECT
E6 BAUDRATE IS INCORRECT
E7 LEVEL 1 SYNCHRONIZATION RETRY COUNT IS OUT-OF-RANGE
E8 BLOCK ̲SIZE IS INCORRECT
E9 TRANSMISSION RETRY COUNT IS OUT-OF-RANGE
E10 LCB RETRY COUNT IS OUT-OF-RANGE
E11 RR RETRY COUNT IS OUT-OF-RANGE
R̲E̲D̲E̲F̲I̲N̲E̲ ̲P̲A̲R̲A̲M̲E̲T̲E̲R̲ ̲S̲T̲A̲T̲U̲S̲:̲ ̲P̲A̲R̲A̲M̲E̲T̲E̲R̲ ̲D̲E̲F̲I̲N̲I̲T̲I̲O̲N̲
R8 BLOCK SIZE IS INCORRECT
R9 TRANSMISSION RETRY COUNT IS OUT-OF-RANGE
R10 LCB RETRY COUNT IS OUT-OF-RANGE
R11 RR RETRY COUNT IS OUT-OF-RANGE
R0 CHANNEL HAS BEEN SUCCESSFULLY ENABLED
M̲I̲S̲C̲E̲L̲L̲A̲N̲E̲O̲U̲S̲
MAX ̲NO ̲TX ̲BUFFERS MAXIMUM NUMBER OF TRANSMISSION
BUFFERS ASSIGNED TO THIS CHANNEL.
MAX ̲NO ̲RX ̲BUFFERS MAXIMUM NUMBER OR RECEPTION
BUFFERS ASSIGNED TO THIS CHANNEL.
EDC CLEANUP: OPEN FAILURE.
ACKLTO CLEANUP: ACKL TIME OUT.
H̲O̲S̲T̲ ̲I̲/̲F̲ ̲E̲R̲R̲O̲R̲ ̲C̲O̲D̲E̲S̲
TE1 DATA BUFFER NOT ACCEPTED IN TSTATE0.
TE2 DATA BUFFER NOT ACCEPTED IN TSTATE1.
TE3 DATA BUFFER NOT ACCEPTED IN TSTATE2.
TE6 LCB NOT ACCEPTED IN TSTATE0.
TE7 LCB NOT ACCEPTED IN TSTATE1.
TE8 LCB NOT ACCEPTED IN TSTATE2.
TE9 LCB ALREADY BEING TRANSMITTED.
TE11 ACK TIME OUT HAS OCCURED.
I̲N̲T̲E̲G̲E̲R̲ ̲P̲A̲R̲A̲M̲E̲T̲E̲R̲S̲
O ̲T ̲E 128
THREE ̲TWO 32
SIXTEEN 16
HUN ̲MILLI ̲SEC 100 sec
FOUR 4
6̲ ̲ ̲D̲E̲F̲I̲N̲I̲T̲I̲O̲N̲ ̲O̲F̲ ̲N̲T̲S̲ ̲S̲U̲B̲S̲Y̲S̲T̲E̲M̲ ̲V̲A̲R̲I̲A̲B̲L̲E̲S̲
ACK ̲BAS ACK buffers
ACK ̲CIR - Sequence numbers of ACK blocks
ACK ̲IN - Pointer into ACK ̲CIRCLE for
entry of new ACK buffer address
(TX)
ACK ̲ONE - BID of first segment requireing
acknowledgement (TX)
ACK ̲OUT - Pointer into ACK ̲CIRCLE for
XMITTER to realese buffer (TX)
ACL ̲TWP - BID of second segment requiring
acknowledgement (TX)
ACKTOS - Boolean flag indicating if ACK
timer in progress
ACKL ̲TB - Table of ACKL blocks
ACKLTOS - Boolean flag indicating that
ACKL timer is in progress
ALTODL - ACKL timeout time
ATODEL - ACK timeout time
BAUDR - Baudrate
BID - Sequence number of block
BID ̲BASE - Sequence number of first block
in TRAN ̲CIRCLE
BITMAP - Bitmap for GATHER area
BLOCK ̲SIZE - Current block size to be transmitted
BUFFER - Template for buffer either frame
of data
BUFFER.ADDR - Field in buffer header containing
the buffer address
BUFFER.BID - Field in frame containing the
BID
BUFFER.BYTECOUNT - Field in buffer header containing
the buffer length
BUFFER.C - Field in frame containing frame
length (word)
BUFFER.C1 - Field in frame containing LSB
of frame length
BUFFER.C2 - Field in frame containing MSB
of frame length
BUFFER.CODE - Field in buffer data area equal
to byte #2. For control and
status buffers it contains the
status type or control type
BUFFER.COMMAND - Field in control/status buffers
equal to byte #4. Containing
the command code
BUFFER.DATA - Data field of data buffer
BUFFER.LDU ̲ID - LDU sequence number: byte #3
of control/status buffer
BUFFER.OWNER - Field in buffer header which
indicates if buffer is assigned
to HOST or LTU
BUFFER.P1 througth
BUFFER.Pn - Parameter fields of control/status
buffer: equal to bytes 5 through
n of control/status buffer
BUFFER.SEQ ̲NO - LDU sequence number. byte #2
of data buffer
BUFFER.SEG ̲TYPE - Segment type: byte #3 of data
buffer
BUFFER.T ̲SEQ ̲NO - Temporary storage: byte #5 of
buffer header
BUFFER.T ̲SEG ̲TYPE - Tempoorary storage: byte #6
of buffer header
BUFFER.T ̲TYPE - Temporary storage: byte #4 of
buffer header
BUFFER.TYPE - Buffer TYPE: byte #0 of both
data and control/status buffers
CANCEL ̲LDU - List of LDU's cancelled by HOST
CHANNO - Channel number, either 0 or
1
COMPLETION ̲PTR - Pointer into PENDING ̲QUEUE showing
next buffer to be returned to
HOST
CONTROL - Template: same as BUFFER but
indicates control buffer from
HOST
CRC ̲STATUS - Field in receiver buffer which
is set by receiver interrupt
service routines to store CRC
status
CURRENT ̲LDU - List of LDU's supplied in HOST
input request
CURRENT ̲TRANSMISSION - XSTATE value at time that a
transmission is initiated by
XMITTER
D - Signifies type of frame as data
EDC ̲STATE - Contains value of EDC ̲STATE
to be returned to host, calculated
by REPORT ̲PROTOCOL
EOM - Signifies type of frame as end
of message
EOS - Signifies type of frame as end
of segment
EOS ̲1 - BID of first EOS frame transmitted,
but not yet acknowledged
EOS ̲1I - Offset into pending table corresponding
to first EOS block
EOS ̲2I - Do for second block
ENDMES - Flag indicating, that current
segment under transmission is
the last of a message
EOS ̲CNT - Number of segments completed
EOS ̲1 ̲COMPLETED - Flag signifying that all blocks
of first segment have been received
EOS ̲2 ̲COMPLETED - Flag signifying that all blocks
of second segment have been
received
EOS ̲PENDING - EOS frame has been received:
verify that all blocks of segment
have been received
FRAME - Template for defining fields
of a block
FRAME.C - Length field (word) of frame
FRAME.BID - Sequence number field of frame
FRAME.TYPE - Block type field of frame
HIF ̲TX ̲BLOCK - Pointer into HOST buffer showing
where deblocking is to begin
HIF ̲TX ̲IN ̲PROGRESS - Boolean flag indicating that
procedure is in progress
HOST ̲EMP - Stack of empty HOST buffers
HOST ̲IN - PTR into TRAN ̲CIRCLE for new
buffer to be incerted
HOST ̲OUT - PTR into TRAN ̲CIRCLE where buffer
is to be removed
HOST ̲RQ - Queue for refering receiver
buffers to HOST
HOST ̲RX ̲STACK - Stack of buffer indices of empty
receiver buffers received from
HOST
RS1 - Semaphore for RX ̲OUT
RS2 - Semaphore for RX ̲IN
RX ̲IN - Buffer adress of incoming empty
buffer: HIF
RX ̲OUT - Buffer address of outgoing status/data
buffer: HIF
TS1 - Semaphore for TX ̲OUT
TS2 - Semaphore for TX ̲IN
TX ̲IN - Buffer address of incoming empty
buffer: HIF
TX ̲OUT - Buffer address of outgoing control/data
buffer: HIF
IFSTATE - Variable which indicates LOCAL
or REMOTE TARE
INDEX - Byte 0 of buffer header: pointer
to buffer
INDEX2 - Temporary variable which contains
buffer index
INPUT ̲QUEUE - Queue which contains indices
of received buffers
LAST ̲ACKED - Last BID to have been ACKED
by receiver (TX)
LAST ̲GOOD - Last correct BID to have been
received by receiver: used to
determine BID of NAKF
LCB ̲ACKED - Boolean flag indicating if HOST
has acknowledged LCB
LCB ̲ADDR - Table containing address of
LCB to be transmitted by XMITTER
LCB ̲LEN - Length of LCB to be transmitted
LCB ̲BID - Block identifier or sequence
number of LCB block
LCB ̲INDEX - Index of buffer containing LCB
(TX)
LCB ̲INDEX ̲RX - Index of buffer containing LCB
RX
LCB ̲INP - LCB in progress flag
LCB ̲LDU - HOST LDU be which block has
been transferred to HOST
LCB ̲RETURN - Boolean flag indicating if LCB
processing is inhibited (RX)
LCB ̲SEQ ̲RX - Block identifier of received
LCB
LCOUNT - Retry count of LCB transmissions
LCOUNT ̲MAX - Maximum allowable LCB retry
count
LDU ̲DATA ̲1 - LDU of first segment transferred
to HOST
LDU ̲DATA ̲2 - LDU of second segment transferred
to HOST
LDU1 ̲OCC - Flag to tell wheather LDU is
available in LDU ̲DATA ̲1
LDU2 ̲OCC - Do for LDU2
LEV1 ̲STATE - State variable which describes
Level 1
LEV1 ̲TO - Level 1 timeout
LTU ̲STATE - State variable which describes
LTU
NAK ̲AVAIL - Boolean flag indicating that
NAK has been queued to XMITTER
NAK ̲BAS - NAK buffers
NAK ̲CIRCLE - Circular array of NAK types
of NAK block buffers
NAK ̲IN - Pointer indicating position
to add buffer to NAK ̲CIRCLE
NAK ̲OUT - Pointer indicating position
to delete buffer from NAK ̲CIRCLE
NAK ̲TYPE - Indicates NAKI, NAKIJ or NAKF
NCOUNT - Retry count for transmission
of a data block
NCOUNT ̲MAX - Maximum allowable retry count
for data block
NEXT ̲ACK - Next expected acknowledgement
block (TX)
NEXT ̲BID Block number to assign to next
block to be transmitted
NEXT ̲EXPECTED - BID of next block expected to
be received (RX)
OPEN ̲LDU - LDU of OPEN ̲EDC command: used
to send open status back to
HOST
PENDING TABLE - Table containing indices of
those data buffers which have
been legally received
P ̲INDEX - Data used by MOVE ̲DATA
PROCESS ̲ID - Name by which process is scheduled
RCOUNT - Retry count for transmission
of RR blocks
RCOUNTMAX - Maximum retry count for transmission
or RR blocks
RCVR ̲INDEX - Index of buffer currently being
filled by receiver
RETRAN ̲CIRCLE - Circular array of buffer indices
of buffers to be retransmitted
by XMITTER
RETRAN ̲IN - Pointer indicating position
to add buffer to RETRAN ̲CIRCLE
RETRAN ̲OUT - Pointer indicating position
to remove buffer indice from
RETRAN ̲CIRCLE
RLCB ̲INDEX - Buffer index of received LCB
RLCB ̲STATE - LCB receiver state
RR ̲ADDR - Array of RR blocks
R ̲STATE - State variable of receiver state
RX ̲L ̲COUNT - Number of received LCB's
RX ̲M ̲COUNT - Number of received message blocks
RX ̲RR ̲COUNT - Number of correctly received
RR blocks
SCHEDULING ̲TABLE - Table of process ids used by
the monitor in scheduling enabled
tasks by priority
SCOUNT - Number of retries for SETB block
transmission
SCOUNT ̲MAX - Maximum number of SETB transmission
retries
STACK ̲OF ̲EMPTIES - Stack of status buffers for
sending total error reports
STACK ̲OF ̲EMPTIES ̲RX - Stack of LTU buffers for receiving
data
STACK ̲OF ̲EMPTIES ̲TX - Stack of LTU buffers for transmitting
data
STATUS ̲RETURN - Stack of buffers containing
status to be returned to the
HOST
SYN ̲RETRY - Number of Level 1 resynchronization
retries
SYN ̲RETRY ̲COUNT - Number of sync retries at Level
1
SYN ̲RETRY ̲MAX - Maximum number of allowable
sync retries
T ̲BYTE ̲COUNT - Temporary byte count used be
MOVE-DATA
T ̲C ̲NCOUNT - Temporary variable containing
retry count
T ̲D ̲DEST - Destination used by MOVE-DATA
TEMP ̲INDEX - Temporary variable for containing
buffer index
T ̲D ̲SRC - Source used by MOVE-DATA
T ̲INDEX - Index for STORE-SEC-BUFFER
T ̲MOVP - Flag showing wheather move in
progress
TRAN ̲CIRCLE - Circular array of buffers indices
of buffers to be transmitted
TRAN ̲CIRCLE.
LAST ̲ACKED - Last transmitted block which
has been acknowledged by the
receiver
TXC ̲LACK - Same module TXCLEN
TRAN ̲CIRCLE.
HOSLT ̲IN - Pointer to next empty slot in
TRAN ̲CIRCLE
TRAN ̲CIRCLE.
HOST ̲OUT - Pointer to next buffer to be
removed from TRAN ̲CIRCLE and
returned to HOST
TRAN ̲CIRCLE.
OUTSTANDING - Boolean flag which indicates
if the buffer is currently being
transmitted by XMITTER
TRAN ̲IN - Pointer into XMIT ̲CIRCLE for
buffer to be added
TRAN ̲OUT - Pointer into XMIT ̲CIRCLE for
buffer to be removed
TRAN ̲INDEX ̲1 - Temporary pointer to first BID
of NAK
TRAN ̲INDEX ̲2 - Temporary pointe to second BID
of NAK
TRAN ̲NEXT - Pointer into TRAN ̲CIRCLE indicating
next buffer to transmit
TSTATE - State variable containing the
current transmission state
TX ̲BIDB - Transmittertable BID base
TX ̲L ̲COUNT- Number of successfully transmitted
LCB's
TX ̲BLK - HOST buffer block number
TX ̲M ̲COUNT - Number of successfully transmitted
message blocks
TX ̲INPR - Boolean indicating frame i progress
TX ̲R ̲L ̲COUNT - Number of retransmitted LCB's
TX ̲R ̲M ̲COUNT - Number of retransmitted message
blocks
TX ̲R ̲RR ̲COUNT- Number of retransmitted RR blocks
XMITTABLE - Circular array of indices of
buffers to be transmitted
XMIT ̲CIRCLE.OFFSET - Offset of buffer in TRAN ̲CIRCLE:
used to clear outstanding flag
XMT ̲IN - Insertion pointer into XMTTBL
XMIT ̲IN ̲PROGRESS - Boolean flag indicating that
physical transmissionis in progress
XMT ̲OUT - Revoval pointer into XMTTBL
XSTATE - State varable showing current
state of XMITTER
XSTATE1 ̲HEADER - Variable bit array of boolean
flags which indicates if XSTATE1
buffer is available for transmission
XSTATE2 ̲HEADER - Same as above for XSTATE2
XSTATE3 ̲HEADER - Same as above for XSTATE3
XSTATE4 ̲HEADER - Same as above for XSTATE4
XSTATE5 ̲HEADER - Same as above for XSTATE5
XSTATE6 ̲HEADER - Same as above for XSTATE6
XSTATE7 ̲HEADER - Same as above for XSTATE7
XSTATE8 ̲HEADER - Same as above for XSTATE8
7̲ ̲ ̲D̲E̲T̲A̲I̲L̲E̲D̲ ̲S̲P̲E̲C̲I̲F̲I̲C̲A̲T̲I̲O̲N̲ ̲O̲F̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲S̲
Detailed specifications of the following procedures
are included in this section:
ACKLTO (7.1)
ACKTO (7.2)
CHAR ̲INT (7.3)
CHECK ̲RETRAN (7.4)
CLEANUP (7.5)
CLEAR (7.6)
CLOCK ̲INTERRUPT (7.7)
ENABLE ̲CHANNEL (7.8)
EN ̲ERROR (7.9)
EXTERNAL ̲STATUS ̲INTERRUPT (7.10)
FAT ̲ERR (7.11)
GATHER ̲STAT (7.12)
HARDWARE ̲INITIALIZE (7.13)
HIF ̲CANCEL (7.14)
HIF ̲COMMAND (7.15)
HIF ̲COMMAND ̲RETURN (7.16)
HIF ̲INPUT (7.17)
HIF ̲RX ̲IN (7.18)
HIF ̲RX ̲OUT (7.19)
HIF ̲TX ̲IN (7.20)
HIF ̲TX ̲OUT (7.21)
HIF ̲TX ̲RTN (7.22)
HOST ̲ACK (7.23)
INIT ̲HOST ̲BUFFERS (7.24)
INIT ̲HOSTIF (7.25)
INITIATE ̲TRANSMISSION (7.26)
LIV1 ̲CLOSE (7.27)
L1HANDL (7.28)
MONITOR (7.29)
MOVE ̲DATA (7.30)
MOVE ̲RX ̲DATA (7.31)
OPEN ̲COMPLETE (7.32)
OPEN ̲EDC (7.33)
POP (7.34)
PUSH (7.35)
POPL (7.36)
PUSHL (7.37)
QUEUE ̲ACK (7.38)
QUEUE ̲LCB (7.39)
QUEUE ̲NAK (7.40)
QUEUE ̲NAKF (7.41)
QUEUE ̲STATUS (7.42)
REDEFINE ̲PARAMETERS (7.43)
RED ̲ERROR (7.44)
RE ̲SYNCHRONIZER (7.45)
RESEASE ̲BUFFER (7.46)
REMOVE ̲ELEMENT (7.47)
REQUEUE ̲LCB (7.48)
REPORT ̲PROTOCOL (7.49)
RX ̲DISPATCER (7.50)
SCHEDULE (7.51)
SEGMENT ̲PROCESSOR (7.52)
SERVICE ̲INVALID ̲TRANSMISSIONS (7.53)
SERVICE ̲NEXT ̲EXPECTED (7.54)
SERVICE ̲RETRANSMISSIONS (7.55)
SET ̲XMTI ̲PRIORITY (7.56)
SPEC ̲INT (7.57)
STORE ̲PRIMARY ̲BUFFER (7.58)
STORE ̲SECONDARY ̲BUFFER (7.59)
TRANSMITTER (7.60)
TX ̲CANCEL (7.61)
TX ̲ERROR (7.62)
XMITTER (7.63)
7.1 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲A̲C̲K̲L̲T̲O̲
F̲U̲N̲C̲T̲I̲O̲N̲
Handle time out which may occur waiting for an AKCL
in response to an LCB which has been transmitted.
E̲N̲T̲R̲Y̲: Called by scheduler at time out.
D̲E̲S̲C̲R̲I̲P̲T̲I̲O̲N̲ -
ACKLTO(CHANNO):
/* DETERMINE IF THE LCB HAS BEEN EXCESSIVELY TRANSMITTED*/
If LCOUNT(CHANNO) .GT. LCOUNT ̲MAX(CHANNO) THEN CLEAR
LCB ̲IN ̲PROGRESS(CHANNO);
/* Call CLEANUP; FATAL TRANSMISSION ERROR*/
Call CLEANUP (CHANNO,ACKLTO);
Call QUESTS (CHANNO, LNKFAL);
RETURN ;
ELSE
CALL RE ̲QUEUE ̲LCB (CHANNO);
RETURN;
END; /* ACKLTO */
7.2 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲A̲C̲K̲T̲O̲ ̲(̲C̲H̲A̲N̲N̲O̲)̲
F̲U̲N̲C̲T̲I̲O̲N̲ -
This procedure is called if the TRANSMITTER ACK TIMER
expires.
D̲E̲S̲C̲R̲I̲P̲T̲I̲O̲N̲ -
A̲C̲K̲T̲O̲ ̲(̲C̲H̲A̲N̲N̲O̲)̲:
Case of (STATE (CHANNO))
TSTATE2:
IF SCOUNT (CHANNO) .LT. MAXRCT(CHANNO) THEN SET ̲XMIT
̲PRIORITY (XSTATE8);
INC(SCOUNT) SCHED(ACKTO)
ELSE
TSTATE (CHANNO) = TSTATE6;
ISTATE (CHANNO) = RSYNC;
CALL LEV1 ̲CLOSE (CHANNO);
LTU ̲STATE (CHANNO) = DISABLED;
LDU = OPEN ̲INDEX (CHANNO);
CALL EN ̲ERROR (LDU, CHANNO, TE11);
TSTATE3:
TSTATE4:
TSTATE5:
IF RCOUNT (CHANNO) .EQ. MAX ̲RCOUNT (CHANNO) THEN
TSTATE (CHANNO) = TSTATE6;
CALL CLEANUP (CHANNO, EDC);
CALL QUESTS (CHANNO, LNKFAL);
ELSE
INCREMENT TX ̲RR ̲COUNT (CHANNO);
INCREMENT RCOUNT (CHANNO);
TSTATE (CHANNO) = TSTATE5;
RR ̲POINTER (CHANNO) = RR ̲ADDR (CHANNO);
RR ̲POINTER (CHANNO).BID = NEXT ̲STRAN-1;
RR ̲POINTER (CHANNO).TYPE = RR;
SET XSTATE7HEADER (CHANNO);
SET ̲XMIT ̲PRIORITY (XSTATE7);
ACKTOS (CHANNO): = TRUE;
SCHED (ACKTO);
RETURN;
TSTATE6:
RETURN
7.3 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲C̲H̲A̲R̲ ̲I̲N̲T̲
FUNCTION
SIO character interrupt routines
SIO receive character a ailable interrrupt entry
CHAV0(1):
save registers
CALL RXINT ̲0;
restore registers
RETURN;
SIO transmitter interrupt entry
TXEMP(0)1:
save registers
CALL TXINT-0
restore registers
RETURN;
Main entry for RX interrupts
RXINT ̲0:
strip off parity bet
JP (RXINT ̲PT)
Check SYNC2 clear and discard it
RXINT ̲1:
IF CHAR = SYNC2 then
disable "SYNC CHAR LOAD INHIBIT"
reset "ENTER HUNT PHASE"
RX ̲INT ̲PT: = RXINT ̲1A
ELSE
enable "SYNC-CHAR LOAD INHIBIT"
set HUNT MODE
RETURN;
Reste CRC and SYNC LOAD INHIBIT on first data character
RXINT ̲1A:
reset RXCRC generator
reset parity error
enable RX interrupt
CALL RXINT ̲2A
RXINT ̲PT: = RXINT ̲3
RETURN;
Sample CX character in buffer
RXINT ̲2A:
(RXBUF ̲PT): = CHAR;
INC (RXBUF ̲PT);
DEC (RXBUF ̲S12);
RETURN;
Sample C2 character and convert 14 bits count to 16
bets count.
RXINT ̲3:
RXINT ̲LPT: = RXINT ̲4;
convert 14 bits to 16 bits count CALL RXINT ̲2A
RETURN;
Sample type character and check C1, C2 against buffersize
RXINT ̲4:
IF C1, C2 LE buffersize THEN
CALL RX ̲INT ̲6A
RXINT ̲PT: = RXINT ̲5
ELSE
CALL PUSH (STKRXE);
CALL ALLOC;
RXINT ̲PT: = RXINT ̲OB;
enable "SYNC CHAR LOAD INHIBIT"
set "HUNT MODE"
RETURN;
Sample BID character
RXINT ̲5:
RXINT ̲PT: = RXINT ̲6
CALL RXINT ̲6
RETURN;
Sample DATA CHARACTER
RXINT ̲6
CALL RXINT ̲6A
IF COUNT 0 THEN RETURN;
disable parity
RXINT ̲PT: = RXINT ̲7
RETURN;
Sample one data character
RXINT ̲6A:
E (RXBUF ̲PR): = CHAR;
INC (RXBUF ̲PT);
DEC (RXBUF ̲CNT);
RETURN
Receive CRC character and check for error
RXINT ̲7:
IF not last CRC char THEN RETURN;
enable SYNC CHAR LOAD INHIBIT
set HUNT MODE
if CRC ERROR THEN mark buffer
PUSH(BUFFER, INQUE);
SCHED (RXDISP, CHANNO);
CALL ALLOC
RETURN;
Main entry for TX interrupts
TXINT ̲0:
JP (TXINT ̲PT)
State for transmitting SYNC charaters
TXINT ̲1:
TXINT ̲CNT: = PREAMBLE+1;
TXINT ̲PT: = TXINT ̲1A
Transmit SYNC characters
TXINT ̲1A:
DEC (TXINT ̲CNT);
IF TXINT ̲CNT = 0 THEN
send SYNC2
reset CRC calculation
TXINT ̲PT: = TXINT ̲2
ELSE
send SYNC1
RETURNM;
Enable CRC calculation and send 1. char
TXINT ̲2:
enable CRC calculation
TXINT ̲PT: = TXINT ̲3
Transmit buffer contens
TXINT ̲3:
send E (TXBUF ̲PT);
INC (TXBUF ̲PT);
DEC (TXBUF ̲CNT);
IF TXBUF ̲CNT NE 0 THEN RETURN;
enable CRC char transmission
TXINT ̲PT: = TXINT ̲4
RETURN;
Reset pending SIO TX interrupt for CRC transmission
TXINT ̲4:
reset pending SIO TX interrupt
TXINT ̲CNT: = 10;
TXINT ̲PT: = TXINT ̲5;
RETURN;
Exit this block transmission
TXINT ̲5:
DEC (TXINT ̲CNT);
IF TXINT ̲CNT NE 0 THEN RETURN;
reset pending TX interrupt
disable CRC calculation
disable TX interrupt
TXINT ̲PT: = TXINT ̲OB
SCHED (XMITTER, CHANNO);
RETURN;
7.4 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲C̲H̲E̲C̲K̲ ̲R̲E̲T̲R̲A̲N̲
FUNCTION
Check if a given BID is out of range.
OUTPUT: Carry set if out of range.
DESCRIPTION: IF ( BID - LAST ̲ACKED) MOD 128 GE = 0
THEN clear carry
ELSE
set carry;
RETURN;
7.5 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲C̲L̲E̲A̲N̲U̲P̲
FUNCTION
This procedure resets all state variables to disabled,
releases all HOST buffers to HOST, reseases all internal
LTU buffers to appropriate STACK ̲OP ̲EMPTIES.
ENTRY:
Call be various procedures in case of EDC or LEVEL1
ERROR or by HIF ̲COMMAND to CLOSE ̲EDC or as part of
CLOSE ̲CHANNEL.
DESCRIPTION
CLEANUP (CHANNO, CODE):
RXINT ̲PT: = RXINT ̲OB
reset NAK buffers;
reset ACK buffers;
reset retransmission buffers;
reset transmission buffers;
NEXT ̲EXPECTED (CHANNO) = NULL ̲0;
CALL LEV1 ̲CLOSE (CHANNO);
R ̲L ̲STATE (CHANNO) = BUSY;
R ̲STATE (CHANNO) = MAX ̲SEG;
LTU ̲STATE (CHANNO) = DISABLED;
TSTATE (CHANNO) = TSTATE6;
/* CLEAR LCB */
IF LCB ̲INDEX .NE. NULL THEN
TEMP = POP ( STACK ̲OF ̲IMPTIES ̲RX, CHANNO);
BUFFER(TEMP).CODE = TRANSMISSION ̲STATUS;
BUFFER(TEMP).TYPE = SINGLE ̲LDU ̲STATUS;
BUFFER(TEMP).P1 = CODE;
RETURN HOSTRQ
and INQUE buffer to pools
/* CLEAR PENDING TABLE */
FOR COMPLETION ̲PTR (CHANNO) TO NEXT ̲EXPECTED (CHANNO)
PUSH (INDEX, STACK ̲OF ̲IMPTIES ̲RX, CHANNO),
END; /* FOR STATEMENT */
IF RLCB ̲INDEX (CHANNO) .NE. NULL THEN
PUSH (RLCB ̲INDEX, CHANNO, STACK ̲OF ̲EMPTIES ̲RX);
/* CLEAR TRANS ̲CIRCLE */
FOR INDEX = HOST ̲IN (CHANNO) TO HOST ̲OUT (CHANNO)
IF BUFFER (INDEX) .OWNER .EQ. HOST THEN
CALL QUEQU ̲STATUS (CHANNO, LDU, 0);
CLEAR (INDEX);
PUSH (INDEX , CHANNO, HOST ̲EMPTIES);
ELSE /* LTU BUFFER */
PUSH (INDEX, CHANNO, STACK ̲OF ̲EMPTIES);
END /* FOR STATEMENT */
RETURN;
END; /* CLEANUP */
7.6 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲C̲L̲E̲A̲R̲
FUNCTION
Clear a buffer except the header.
7.7 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲C̲L̲O̲C̲K̲ ̲I̲N̲T̲
FUNCTION
This procidure handles the CTC INTERRUPT, PORT2, it
updates the SYSTEM CLOCK.
ENTRY
Scheduled every 8 USEC by the CTC.
DESCRIPTION
CLOCK ̲INT:
DEC (TCKCNT);
IF TCKCNT = 0 THEN
TCKCNT: = CTCTIC;
INC (TICKS);
END: /* CLOCK ̲INT */
7.8 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲E̲N̲A̲B̲L̲E̲ ̲C̲H̲A̲N̲N̲E̲L̲
FUNCTION
To validate enable channel parameters, initialize internal
variables, initialize the HARDWARE, and ENABLE LEVEL
1.
ENTRY
Called be HIF ̲COMMAND.
DESCRIPTION
ENABLE ̲CHANNEL (CHANNO, INDEX):
/* VERIFY TARE TYPE, LOCAL OR REMOTE */
DO CASE OF (BUFFER (INDEX) .P1)
ZERO: IF ̲STATE = LOCAL;
CONTINUE;
ONE: IF ̲STATE = REMOTE;
CONTINUE;
DEFAULT: CALL EN ̲ERROR (CHANNO, INDEX, E5);
RETURN
/* VERIFY BAUDRATE */
DO CASE OF (BUFFER (INDEX) .P2)
HEX ̲9: BAUD ̲RATE (CHANNO) 0 600 ̲BAUD;
CONTINUE;
HEX ̲A: BAUD ̲RATE (CHANNO) = 1200 ̲BAUD;
CONTINUE;
HEX ̲B: BAUD ̲RATE (CHANNO) = 24004BAUD;
CONTINUE;
DEFAULT: CALL EN ̲ERROR (CHANNO, INDEX, E6);
RETURN;
/* STORE LEVEL 1 TIME OUT */
LEVEL ̲1 ̲TO = BUFFER (INDEX) .P3
/* VERIFY RETRY COUNT FOR LEVEL 1 SYNCHRONIXATION */
IF (BUFFER (INDEX) .P4. GT. LEV1 ̲RTRY ̲MAX) .OR. (BUFFER
(INDEX) .P4. LT. LEV1 ̲RTRY ̲MIN) THEN
CALL EN ̲ERROR (CHANNO, INDEX, E7);
RETURN;
ELSE
SYN ̲RETRY ̲MAX = BUFFER (INDEX) .P4;
/* VERIFY & STORE BLOCKSIZE */
DO CASE OF (BUFFER (INDEX) .P6);
ZERO: BLOCK ̲SIZE (CHANNO) = 32 ̲BYTES;
CONTINUE;
ONE: BLOCK ̲SIZE (CHANNO) = 64 ̲BYTES;
CONTINUE;
TWO: BLOCK ̲SIZE (CHANNO) = 128 BYTES;
CONTINUE;
THREE BLOCK ̲SIZE (CHANNO) = 256 BYTES;
CONTINUE;
FOUR: BLOCK ̲SIZE (CHANNO) = 512 BYTES;
CONTINUE;
DEFAULE: CALL EN ̲ERROR (CHANNO, INDEX, E8);
RETURN
/* STORE ACK TIMEOUT AND ACKL TIMEOUT */
ACKTO ̲DELTA = BUFFER (INDEX) .P7
ACKLTO ̲DELTA = BUFFER (INDEX) .P8
/* VERIFY & STORE BLOCK RETRY COUNT */
IF (BUFFER (INDEX) .P11 .GT. BLOCK ̲RTRY ̲MAX) .OR. BUFFER
(INDEX) .P11. LT. BLOCK ̲RTRY ̲MIN) THEN
CALL EN ̲ERROR (CHANNO), INDEX , E9);
RETURN;
ELSE
NCOUNT ̲MAX = BUFFER (INDEX) .P11;
/* VERIFY & STORE LCB RETRY COUNT */
IF (BUFFER (INDEX) .P12. LT. LCB ̲RTRY ̲MAX) .OR. (BUFFER
(INDEX) .P12. LT. LCB ̲RTRY#MIN) THEN
CALL EN ̲ERROR (CHANNO, INDEX, E10);
RETURN;
ELSE
LCOUNT ̲MAX = BUFFER (INDEX) .P12
/* VERIFY & STORE RR RETRY COUNT */
IF ( BUFFER (INDEX) .P13. GT. RR ̲RTRY ̲MAX) .OR. (BUFFER
(INDEX) .13. LT. RR ̲RETRY ̲MIN) THEN
CALL EN ̲ERROR (CHANNO, INDEX, E11);
RETURN;
ELSE
RCOUNT ̲MAX = BUFFER (INDEX) .P13
/* INITIALIZE HARDWARE */
CALL HARDWARE ̲INITIALIZE (CHANNO);
TSTATE = TSTATE0;
/* LEVEL 1 IS NOW ENABLED */
LEV1 ̲STATE (CHANNO) = SYN6;
NEXT ̲EXPECTED (CHANNO) = NULL ̲1;
LTU ̲STATE (CHANNO) = INITIALIZED;
CALL EN ̲ERROR (CHANNO, INDEX, E0);
RETURN;
END; /* ENABLE CHANNEL */
7.9 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲E̲N̲ ̲E̲R̲R̲O̲R̲
FUNCTION
This procedure formats a status bufffer to be returned
to the HOST. Either the index of a command buffer or
and LDU is passed to the procedure. If an index is
passed the command and the LDU is taken from the buffer.
The buffer is then released.
If an LDU is passed (the negative of the LDU) then
an additional parameter which reflects the command
input must be passed.
ENTRY
Called by ENABLE ̲CHANNEL.
DESCRIPTION
EN ̲ERROR (CHANNO, INDEX, CODE, COMMAND):
/* IF INDEX IS NEGATIVE THEN IT IS AN LDU */
/* CODE = STATUS */
/* IF LDU THEN COMMAND IS NECESSARY */
TEMP = POP (STACK ̲OF ̲EMPTIES ̲RX, CHANNO);
BUFFER (TEMP) .TYPE = SINGLE ̲LDU ̲STATUS;
BUFFER (TEMP) .CODE = CHANNEL ̲STATUS;
CLEAR (INDEX);
PUSH (INDEX, CHANNO, HSTEMP);
ELSE
BUFFER (TEMP) .COMMAND = COMMAND;
BUFFER (TEMP) .LDU ̲ID = NEG (INDEX);
ENDIF;
BUFFER (TEMP) .P1CODE;
PUSH (TEMP, CHANNO, STSRET);
END; /* EN ̲ERROR */
7.10 E̲X̲T̲E̲R̲N̲A̲L̲ ̲S̲T̲A̲T̲U̲S̲ ̲I̲N̲T̲E̲R̲R̲U̲P̲T̲ ̲S̲I̲O̲ ̲R̲O̲U̲T̲I̲N̲E̲S̲
FUNCTION
Updates external status according to interrupt.
DESCRIPTION:
SIO reveiver "external/status condition" interrupt
entry.
XLRXO(1):
save registers
CALL EXTI ̲RO;
restore registers
RETURN;
SIO transmitter "external/status condition" interrupt
entry.
XLRTX0(1):
Save registers
CALL EXTI ̲TO
restore registers
RETURN;
Receiver interrupt routines
EXTI ̲RO:
reset ext. status interrupt condition;
update DCD status;
RETURN;
Transmitter interrupt routines
EXTI ̲TO:
reset ext. status interrupt condition;
IF TX underrun THEN
AND transmitting characters THEN
transmit SYNC1;
ELSE
update CTS status
RETURN;
7.11 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲F̲A̲T̲ ̲E̲R̲R̲
FUNCTION
Sends an asyncronous error report to the HOST.
ENTRY
Called in case of a fatal error in LTU.
DESCRIPTION
FAT ̲ERR:
POP (STKEMP, TEMP, CHANNO);
TEMP CODE. = INTSTS;
TEMP TYPE: = EDCFAL;
TEMP P1, P2: = RETURN ADDRESS;
PUSH (STSRET,TEMP, CHANNO);
RETURN;
7.12 P̲R̲O̲D̲E̲D̲U̲R̲E̲ ̲-̲ ̲G̲A̲T̲H̲E̲R̲ ̲S̲T̲A̲T̲S̲
FUNCTION
This procedure formats a status block to be returned
to the HOST. The BLOCK contains the latest statistics
gathered by the LTU for this channel. All variables
containing statistical data are reset after having
been copied to the STATUS BLOCK.
ENTRY
Called by HIF ̲COMMAND
D̲e̲s̲c̲p̲r̲i̲t̲i̲o̲n̲
GATHER ̲STATS (CHANNO, INDEX):
/* ALLOCATE STATUS BUFFER */
TEMP = POP (STACK ̲OF ̲EMPTIES ̲RX, CHANNO);
BUFFER (TEMP) .TYPE = SIGNLE ̲LDU ̲STATUS;
BUFFER (TEMP) .CODE = CHANNEL ̲STATUS;
BUFFER (TEMP) .P3 =TX ̲M ̲COUNT ̲L;
TX ̲M ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P4 = TX ̲M ̲COUNT ̲M;
TX ̲C ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P5 = TX ̲M ̲COUNT ̲L;
TX ̲L ̲COUNT ̲L = ZERO;
BUFFER (TEMP) .P6 = TX ̲L ̲COUNT ̲M;
TX ̲L ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P7 = RX ̲M ̲COUNT ̲L;
RX ̲M ̲COUNT ̲L = ZERO;
BUFFER (TEMP) .P8 = TX ̲M ̲COUNT ̲M;
RX ̲M ̲COUNT ̲M = ZERO;
BUFFER (TEMP) . P9 = RX ̲L ̲COUNT ̲L;
RX ̲L ̲COUNT ̲L = ZERO;
BUFFER (TEMP) .P10 = RX ̲L ̲COUNT ̲M;
RX ̲L ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P11 = TX ̲R ̲M ̲COUNT ̲L;
TX ̲RR ̲M ̲COUNT ̲L = ZERO;
BUFFER (TEMP) . P12 = TX ̲R ̲M ̲COUNT ̲M;
TX ̲R ̲M ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P13 = TX ̲R ̲L ̲COUNT ̲L;
TX ̲R ̲L ̲COUNT ̲L = ZERO
BUFFER (TEMP) .P14 = TX ̲R ̲L ̲COUNT ̲M;
TX ̲R ̲L ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P15 = TX ̲R ̲RR ̲COUNT ̲L;
TX ̲R ̲RR ̲COUNT ̲L = ZERO;
BUFFER (TEMP) .P16 = TX ̲R ̲RR ̲COUNT ̲M;
TX ̲R ̲RR ̲COUNT ̲M = ZERO;
BUFFER (TEMP) .P17 = RX ̲RR ̲COUNT ̲L;
RX ̲RR ̲COUNT ̲L = ZERO
BUFFER (TEMP) .P18 = RX ̲RR ̲COUNT#M;
RX ̲RR ̲COUNT#M = ZERO;
BUFFER (TEMP) .P19 = SYN ̲RETRY ̲COUNT ̲L;
SYN ̲RETRYE#L = ZERO;
BUFFER (TEMP) .P20 = SYN ̲RETRY ̲COUNT ̲M;
SYN ̲RETRY ̲M =ZERE;
CLEAR (INDEX);
PUSH (TEMP, CHANNO, STATUS ̲RETURN);
PUSH (INDEX, CHANNO, HOST ̲EMPTIES);
RETURN;
END; /* GATHER ̲STATISTICS */
7.13 H̲A̲R̲D̲W̲A̲R̲E̲ ̲I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲
FUNCTION
This module consists of 3 procedures:
1. INHARD - initialize hardware
2. HARDIT - do related to one channal
3. ALLOC - allocate receiver buffer.
DESCRIPTION
INITIALIZE ̲HARDWARE:
set interruptmode 2
initialize PIO's
initialize SIO's
disable DMA
load CTC interrupt pointer
load CTC control word
RETURN;
HARDWARE ̲INITIALIZE:
select EXTERNAL/INTERNAL CLOCK
select BAUDRATE
/* initialize SIO */
load SIO(WR4,CHN-B)
load SIO(WR6,CHN-B)
load SIO(WR7,CHN-B)
load SIO(WR5,CHN-B)
load SIO(WR1,CHN-B)
load SIO(WR4,CHN-A)
load SIO(WR6,CHN A)
load SIO(WR7,CHN A)
load SIO(WR5,CHA A)
load SIO(WR3,CHA A)
load SIO(WR1,CHA A)
ALLOC:
CALL POPS (STKRXE,CHANNO);
initialize RXBUF ̲PT
initialize RXBUF ̲SIZ
RXINT ̲PT: = RXINT ̲1
RETURN;
7.14 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲C̲A̲N̲C̲E̲L̲
FUNCTION
This procedure is called by HIF to cancel a previous
"INPUT REQUEST". The HOST will indicate the LDU to
be cancelled.
This procedure scans the CURRENT ̲LDU (CHANNO) QUEQU
to determine if the LDU is still waiting to be assigned.
It it is found it is removed and a STATUS BUFFER returned
to the HOST. If a match is not found the LDU will be
stored in CANCEL ̲LDU (CHANNO).
DESCRIPTION
HIF ̲CANCEL (CHANNO, INDEX):
LDU = BUFFER (INDEX) .P1;
FOR EACH ENTRY IN CURRENT ̲LDU (CHANNO)
IF LDU .EQ. ENTRY THEN
TEMP = POP (CHANNO, INDEX, STACK ̲OF ̲EMPTIES ̲RX);
BUFFER (TEMP) .TYPE = SINGLE ̲LDU ̲STATUS;
BUFFER (TEMP) .CODE = RECEIVER ̲STATUS;
BUFFER (TEMP) .COMMAND = RECEPTION ̲CANCELLED;
BUFFER (TEMP) .P1 = LDU;
PUSH (TEMP, CHANNO, STATUS ̲RETURN);
RETURN;
END; /* FOR STATEMENT */
/* LDU NOT FOUND */
PUSH (LDU, CHANNO, CANCEL ̲LDU);
RETURN
END; /* HIF ̲CANCEL
7.15 H̲I̲F̲ ̲C̲O̲M̲M̲A̲N̲D̲ ̲(̲C̲H̲A̲N̲N̲O̲)̲
FUNCTION
This procedure interpret and execute the commands received
from HOST
DESCRIPTION
DO CASE OF (LTU ̲STATE(CHANNO))
DISABLED
IF BUFFER (INDEX) .CODE .EQ. OPEN ̲CHANNEL THEN LTU
̲STATE (CHANNO) = ENABLED;
ELSE
CALL EN ̲ERROR (CHANNO, INDEX, SERR ̲1);
ENABLED
IF BUFFER (INDEX) .CODE .EQ. CLOSE ̲CHANNEL THEN
LTU ̲STATE (CHANNO) = DISABLED;
LEV1 ̲STATE (CHANNO) = DISABLED;
ELSEIF BUFFER (INDEX) .CODE .EQ. REPORT ̲STATUS THEN
IF BUFFER (INDEX .COMMAND .EQ. ENABLE THEN
CALL ENABLE ̲CHANNEL (CHANNO, INDEX);
ELSE
CALL EN ̲ERROR (CHANNO, INDEX, SERR ̲2);
ELSE
CALL EN ̲ERROR (CHANNO, INDEX, SERR ̲8);
INITIALIZED
IF BUFFER (INDEX) .CODE .EQ. CLOSE CHANNEL THEN
LTU#STATE (CHANNO) = DESABLED;
CALL LEV1 ̲CLOSE (CHANNO);
ELSEIF BUFFER (INDEX) .CODE .EQ. REPORT ̲STATUS THEN
IF BUFFER (INDEX) .COMMAND .EQ. OPEN ̲EDC THEN
CALL OPEN ̲EDC (CHANNO, INDEX);
ELSE
CALL EN ̲ERROR (CHANNO, INDEX, SERR ̲4);
ELSE
CALL EN ̲ERROR (CHANNO, INDEX, SERR ̲5),
OPENED: DO CASE OF (BUFFER /INDEX) .CODE)
INPUT ̲REQUEST: CALL HIF ̲INPUT (CHANNO, INDEX);
CANCEL ̲INPUT-
̲REQUEST: CALL HIF ̲CANC ̲L (CHANNO, INDEX):
CALL HIF ̲COMMAND ̲RETURN (CHANNO, INDEX):
CANCEL ̲OUTPUT: CALL TX ̲CANCEL (CHANNO, INDEX);
OPENCANCEL: CALL EN ̲ERROR (CHANNO, INDEX, SERR
̲8);
CLOSE ̲CHANNEL: LTU ̲STATE (CHANNO = DISABLED;
LEV1 ̲STATE (CHANNO) = DISABLED;
CALL CLEANUP (CHANNO);
CALL HIF ̲COMMAND ̲RETURN (CHANNO, INDEX);
REPORT ̲STATUS: DO THE CASE OF (BUFFER (INDEX) .COMMAND))
ENABLE: CALL EN ̲ERROR (CHANNO, INDEX, SERR
̲6);
OPEN ̲EDC: CALL EN ̲ERROR (CHANNO, INDEX, SERR
̲7);
CLOSE ̲EDC: CALL CLEANUP (CHANNO, INDEX);
CALL HIF ̲COMMAND ̲RETURN (CHANNO, INDEX);
REDEFINE ̲EDC: CALL REDEFINE ̲PARAMETERS (CHANNO, INDEX);
STATISTICS: CALL GATHER ̲STATUS (CHANNO, INDEX)
PROTOCOL ̲STATUS:CALL RERPOT ̲PROTOCOL (CHANNO, INDEX)
ACKNOWLEDGE: CALL HOST ̲ACK (CHANNO, INDEX);
END CASE: /* COMMAND */
END: /* HIF ̲COMMAND */
7.16 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲C̲O̲M̲M̲A̲N̲D̲ ̲R̲E̲T̲U̲R̲N̲
FUNCTION
This is a given procedure called to clear a transmission
buffer and return it to the HOST via the STACK HOST
̲EMPTIES.
ENTRY: Called by HIF ̲COMMAND.
DESCRIPTION
HIF ̲COMMAND ̲RETURN (INDEX, CHANNO):
CLEAR (INDEX);
PUSH (HOST ̲EMPTIES, INDEX, CHANNO);
RETURN;
END; /*HIF ̲COMMAND ̲RETURN */
7.17 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲I̲N̲P̲U̲T̲
FUNCTION
This procedure is called by HIF ̲COMMAND when the HOST
requests that a logical data unit by transferred to
the HOST. An LDU may be either an LCB or a DATA SEGMENT.
The LDU will be placed in the FIFO QUEUE; CURRENT ̲LDU.
ENTRY: Called by HEF ̲COMMAND.
DESCRIPTION
HIF ̲INPUT (CHANNO, INDEX):
PUSHL (CURRENT ̲LDU, BUFFER.P1);
CLEAR (INDEX);
PUSH (HOST ̲EMPTIES, INDEX);
RETURN;
END /* HIF ̲INPUT */
7.18 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲R̲X̲ ̲I̲N̲
FUNCTION
This procedure services empty receive buffer from the
HOST. It is scheduled periodically to scan the I/F
AREA for empty buffers which are stored in the STACK
̲OF ̲IMPTIES ̲RX.
DESCRIPTION
HIF ̲RX ̲IN (CHANNO):
IF RX (CHANNO) .RS2 .EQ. ENABLED THEN
ADDR = RX(CHANNO) .IN;
INDEX = BUFFER. INDEX;
PUSH (INDEX, CHANNO, STACK ̲OF ̲EMPTIES ̲RX);
SET RX (CHANNO) .RS2 = DISABLED;
RETURN;
END; /* HIF ̲RX ̲IN */
7.19 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲R̲X̲ ̲O̲U̲T̲
FUNCTION
To return DATA and STATUS BUFFERS to the HOST. STATUS
BUFFER reside in STATUS ̲RETURN while DATA BUFFERS reside
in HOST ̲RTN ̲QUEUE. All DATA BUFFERS are checked to
verify that input has not been cancelled. If an LDU
has been cancelled then the corresponding LCB ̲LDU and
LDU ̲DATA ̲1 or LDU ̲DATA ̲2 is cleared.
DESCRIPTION
HIF ̲RX ̲OUT(CHANNO):
IF RX(CHANNO).RS1.EQ.ENABLED THEN
IF STATUS ̲RETURN(CHANNO).NE.EMPTY THEN
INDEX = POP (CHNNO, STATUS ̲RETURN);
RX(CAHNNO).OUT = BUFFER (INDEX).ADDR;
RX(CAHNNO).RS1 =DISABLED;
RETURN;
ELSE
IF HOST ̲RTN ̲QUEUE(CHANNO) .NE. EMPTY THEN
INDEX = POP (CHANNP, HOST ̲RTN ̲QUEUE);
LDU = BUFFER(INDEX).SEQ ̲NO;
FOR EACH ENTRY IN CANCEL ̲LDU(CHANNO)
IF ENTRY .EQ. LDU THEN
IF BUFFER(INDEX).TYPE = LCB THEN
LCB ̲LDU(CHANNO) = NULL;
R ̲L ̲STATE(CHANNO) = ACCEPT;
ELSE
IF LDU .EQ. LDU ̲DATA ̲1(CHANNO) THEN
LDU ̲DATA ̲1(CHANNO) = NULL
ELSE
LDU ̲DATA ̲2(CHANNO) = NULL;
BUFFER(INDEX).TYPE = SINGLE ̲LDU ̲STATUS;
BUFFER(INDEX).COMMAND = INPUT ̲CANCELLED;
BUFFER(INDEX).CODE = RECEIVER ̲STATUS;
PUSH(INDEX,CHANNO,STATUS ̲RETURN);
RETURN;
END; /* FOR STATEMENT */
/* INPUT NOT CANCELLED*/
RX(CHANNO). OUT = BUFFER(INDEX).ADDR;
RX(CHANNO).RS1 = DISABLED;
RETURN
END; /*HIF ̲RX ̲OUT*/
7.20 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲T̲X̲ ̲I̲N̲
FUNCTION
This procedrue services the TX data area in the region
shared with the host. The buffer to be transmitted
may be of two separate types, DATA or LCB. Data buffers
are entered in transcircle and LCBs are placed in LCB
̲ADDR assuming that all operating conditions such as
TSTATE and LCB ̲IN ̲PROGRESS are correct.
If an error is detected the buffer is returned to the
host with a bad transmission status. Blocking is performed
if the BLOCK ̲SIZE is less thatn 512. Data buffers are
reserved from the TX pool STACH ̲OF ̲EMPTIES ̲TX.
They are returned there after transmission is complete.
If data moves are required HIF will exit so as to allow
other procedures to execute.
ENTRY
Scheudle periodically be itself or SOTRE ̲SEC ̲BUFFER.
ENTRY ̲P̲a̲r̲a̲m̲t̲e̲r̲s̲ ̲-̲ ̲N̲o̲n̲e̲
BUFFER ̲INDEX refers to the index of the buffer whose
address is contained in DATA.TX ̲IN.
DESCRIPTION
HIF ̲TX ̲IN(CHANNO):
IF TX (CAHNNO).TS2.EQ.DISABLED THEN
SCHEUDLE (HIF ̲TX ̲IN, CHANNO);
REURN;
ELSE
/*BUFFER AVAILABLE, DETERMINE INDEX*/
INDEX = BUFFER ̲ADDRESS ̲ LTU ̲GEADER;
DO CASE OF (BUFFER(INDEX).SEG ̲TYPE)
/* CASE 1 DATA BUFFER*/
DATA: DO CASE OF (TSTATE(CHANNO))
/*DATA IS NOT ACCEPTED UNTIL LINE IS FUNCTIONING*/
TSTATE0: CALL TX ̲ERROR(CAHNNO,BUFFER ̲INDEX,TE1);
SCHEDULE(HIF ̲TX ̲IN,CHANNO);
RETURN;
TSTATE1: CALL TX ̲ERROR(CAHNNO,BUFFER ̲INDEX,TE2);
SCHEDULE(HIF ̲TX ̲IN,CHANNO);
RETURN;
TSTATE2: CALL TX ̲ERROR(CAHNNO,BUFFER ̲INDEX,TE3);
SCHEDULE(HIF ̲TX ̲IN,CHANNO);
RETURN;
/*TSTATE3 INDICATES LINE IS FUNCTIONING*/
TSATE3:
TSATE4:
TSATE5:
IF HIF ̲TX ̲IN ̲PROGRESS THEN
/*BLOCKING OF SEGMENT IS IN PROGRESS, CONTINUE*/
IF BUFFER ̲EXHAUSTED .EQ. TRUE THEN
/*RELEASE HOST I/F AREA*/
TX(CHANNO).IN=ZERO;
TX(CHANNO).TS2=DISABLED;
RETURN;
ELSE
CALL STORE ̲SEC ̲BUFFER;
ELSE
/*BEGIN A NEW SEGMENT*/
/*MOVE HOST PARAMETERS TO LTU HEADER ARES*/
BUFFER(INDEX).T ̲COUNT=BUFFER(INDEX).BYTECOUNT;
BUFFER(INDEX).T ̲TYPE=BUFFER(INDEX).TYPE;
BUFFER(INDEX).T ̲SEG=BUFFER(INDEX).LDU;
BUFFER(INDEX).T ̲SEG ̲TYPE=BUFFER(INDEX).SEG ̲TYPE;
BUFFER(INDEX).OWNER=HOST;
IF BUFFER ̲SIZE(CHANNO) .LT. BLOCK ̲512 THEN
/*BLOCKING IS NECESSARY */
HIF ̲TX ̲BLOCK(CHANNO)=0;
HIF ̲TX ̲IN ̲PROGRESS(CHANNO)=TRUE;
CALL STORE ̲PRIMARY ̲BUFFER(CHANNO);
RETURN;
ELSE
/*BLOCKING IS UNNECESSARE*/
CALL STORE ̲PRIMARY ̲BUFFER(INDEX,CHANNO);
/*RELEASE I/F AREA*/
TX(CHANNO.IN=ZERO;
TX(CHANNO.TS2=DISABLED;
SCHEDULE(CHANNO,HIF ̲TX ̲IN);
RETURN;
END;/*TSTATE3, TSTATE4, TSTATE5*/
TSTATE6: /*CLEANUP IN PROGRESS*/
RETURN;
END;/*TSTATE6*/
END;/*END CASE OF DATA*/
END;/*CASE OF DATA*/
/*CASE2-LCB*/
/*BUFFER ̲INDEX REFERS TO THE INDEX OF THE BUFFER
IN
IDATA.TX ̲IN*/
LCB: DO CASE OF (TSTATE(CHANNO))
/*LCB IS NOT ACCEPTED IF LINE IS NOT FUNCTIONING*/
TSTATE0: CALL TX ̲ERROR(CHANNO,BUFER ̲INDEX,TE6);
RETURN;
TSTATE1: CALL TX ̲ERROR(CHANNO,BUFER ̲INDEX,TE7);
RETURN;
TSTATE2: CALL TX ̲ERROR(CHANNO,BUFER ̲INDEX,TE8);
RETURN;
/*LCB IS ACCEPTED IN TSTATES 3 THROUGH 5 IF ONE
IS NOT CURRENTLY BEING TRANSMITTED*/
TSTATE3:
TSTATE4:
TSTATE5: IF LCB ̲IN ̲PROGRESS(CHANNO)THEN
CALL TX ̲ERROR(CHANNO,BUFFER ̲INDEX,TE9);
RETURN;
ELSE
CALL QUEUE ̲LCB(CHANNO,BUFFER ̲INDEX);
RETURN;
/*LCB IS NOT ACCEPTED IF CLEANUP IS IN PROGRESS.
CLEANUP WILL RELEASE THE BUFFER*/
TSTATE6: RETURN;
END;/*CASE OF LCB*/
END; /*HIF ̲TX ̲IN*/
7.21 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲T̲X̲ ̲O̲U̲T̲
FUNCTION
This procedure returns TRANSMISSION BUFFERS to the
HOST which have been transmitted without ERROR. BUFFERS
in ERROR will be returned by CLEANUP. The BUFFER contents
are cleared, the TX BUFFER returned to the HOST and
a STATUS BUFFER formatted and returned to the HOST.
ENTRY: Schedule periodically by monitor.
DESCRIPTION
HIF ̲TX ̲OUT(CHANNO):
IF (LCB ̲INDEX(CHANNO).NE.NULL).AND.(LCB ̲PROGRESS(CHANNO)
.EQ. FALSE) THEN
/*RETURN LCB*/
INDEX=LCB ̲INDEX(CHANNO);
LDU=BUFFER(INDEX).SEQ ̲NO;
LCB ̲INDEX(CHANN=NULL;
CLEAR(INDEX);
PUSH(INDEX,CHANNO,HOST ̲EMPTIES);
/*FORMAT STATUS RETURN*/
TEMP=POP(CHANNO,STACK ̲OF ̲EMPTIES ̲RX);
BUFFER(TEMP).CODE=TRANSMISSION ̲STATUS;
BUFFER(TEMP).COMMAND=TRANSMISSION ̲OK;
BUFFER(TEMP).SEQ ̲NO=LDU;
BUFFER(TEMP).TYPE=SINGLE ̲LDU ̲STATUS;
PUSH(TEMP,CHANNO,STATUS ̲RETURN);
RETURN;
ELSE
/*RETURN DATA BUFFERS*/
DO CASE OF (TSTATE(CHANNO))
/*LINE IS NOT FUNCTIONING*/
TSTATE1: RETURN;
TSTATE2: RETURN;
TSTATE3: RETURN;
/*LINE IS FUNCTIONING*/
TSTATE3:
TSTATE4:
TSTATE5:
IF TRAN ̲CIRCLE(CHANNO).HOST ̲OUT.NE.TRAN ̲CIRCLE
(CHANNO).LAST ̲ACKED
THEN
INDEX=TRAN ̲CIRCLE(CHANNO).HOST ̲OUT;
INDEX=TRAN ̲CIRCLE(CHANNO,INDEX).INDEX;
DO CASE OF (BUFFER(INDEX).OWNER)
HOST:
CLEAR(INDEX);
LDU=BUFFER(INDEX).SEQ ̲NO;
INCREMENT TX ̲M ̲COUNT(CHANNO);
INC TRAN ̲CIRCLE(CHANNO).HOST ̲OUT MOD TRAN
̲CIRCLE ̲LEN;
TEMP=POP(CHANNO,STACK ̲OF ̲SEMPTIES ̲RX);
BUFFER(TEMP).CODE=TRANSMISSION ̲STATUS;
BUFFER(TEMP).COMMAND=TRANSMISSION ̲OK;
BUFFER(TEMP).P1=LDU;
BUFFER(TEMP).TYPE=SINGLE ̲LDU ̲STATUS;
PUSH(TEMP,CHANNO,STATUS ̲RETURN);
PUSH(INDEX,CHANNO,HOST ̲EMPTIES);
RETURN;
END;/*HOST*/
LTU:
PUSH(INDEX,CHANNO,STACK ̲OF ̲EMPTIES);
INC TRAN ̲CIRCLE(CHANNO).HOST ̲OUT MOD TRAN
̲CIRCLE ̲LEN;
RETURN;
END;/*LTU*/
END;/*CASE STATEMENT*/
END;/*HIF ̲TX ̲OUT*/
7.22 P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲-̲ ̲H̲I̲F̲ ̲T̲X̲ ̲R̲T̲N̲
FUNCTION
This procedure is scheduled periodically to return
empty BUFFERS to the HOST which were previously used
for COMMANDS or DATA TRANSMISSION.
DESCRIPTION
HIF ̲TX ̲RTN(CHANNO):
IF TX(CHANNO).TX1 .EQ. ENABLED THEN
INDEX=POP(CHANNO,HOST ̲EMPTIES);
IF INDEX.NE.NULL THEN
TX(CHANNO).OUT=BUFFER(INDEX).ADDR;
TX(CHANNO).TS1=DISABLED;
RETURN;
END;/*HIF ̲TX ̲RTN*/