top - download
⟦1387aa34e⟧ Wang Wps File
Length: 32242 (0x7df2)
Types: Wang Wps File
Notes: CPS/SDS/028
Names: »4719A «
Derivation
└─⟦ce4ce986f⟧ Bits:30006193 8" Wang WCS floppy, CR 0449A
└─ ⟦this⟧ »4719A «
WangText
…1a… …19……08……19……0c……19……0f……19… …18……08……18……0b……18……0f……18……86…1
…02…
…02…
…02…
…02…CPS/SDS/028
…02…840501
…02……02…
I/O
CONTROL
…02……02…CAMPS
T̲A̲B̲L̲E̲ ̲O̲F̲ ̲C̲O̲N̲T̲E̲N̲T̲S̲
4.2.4.4 Subpackage LTUX-OCR Specification ......
4.2.4.4.1 Functional Specification ...........
4.2.4.4.2 Software Structure .................
4.2.4.4.3 Data Flow and Control Logic Within
Subpackage .........................
4.2.4.4.4 Module Specifications ..............
4.2.4.4.4.1 Module INIOCR Specifications
...
4.2.4.4.4.1.1 Functional Specification
...
4.2.4.4.4.1.2 Module Interface ..........
4.2.4.4.4.1.3 Module Components ..........
4.2.4.4.4.1.4 Data Description ..........
4.2.4.4.4.1.5 Module Design .............
4.2.4.4.4.2 Module PROCESSES Specification
.
4.2.4.4.4.2.1 Functional Specification
..
4.2.4.4.4.2.2 Module Interface ..........
4.2.4.4.4.2.3 Module Components .........
4.2.4.4.4.2.4 Data Description ..........
4.2.4.4.4.2.5 Module Design .............
4.2.4.4.4.3 Module CMDINT Specification ....
4.2.4.4.4.3.1 Functional Specification
..
4.2.4.4.4.3.2 Module Interface ..........
4.2.4.4.4.3.3 Module Components .........
4.2.4.4.4.3.4 Data Description ..........
4.2.4.4.4.3.5 Module Design .............
4.2.4.4.4.4 Module LINKPRO Specification
...
4.2.4.4.4.4.1 Functional Specification
..
4.2.4.4.4.4.2 Module Interface ..........
4.2.4.4.4.4.3 Module Components .........
4.2.4.4.4.4.4 Data Description ..........
4.2.4.4.4.4.5 Module Design .............
4.2.4.4.4.5 Module OUTBHAND Specification
..
4.2.4.4.4.5.1 Functional Specification
..
4.2.4.4.4.5.2 Module Interface ..........
4.2.4.4.4.5.3 Module Components .........
4.2.4.4.4.5.4 Data Description ..........
4.2.4.4.4.5.5 Module Design .............
4.2.4.4.4.6 Module INBHAND Specification
...
4.2.4.4.4.6.1 Functional Specification
..
4.2.4.4.4.6.2 Module Interface ..........
4.2.4.4.4.6.3 Module Components .........
4.2.4.4.4.6.4 Data Descriptions .........
4.2.4.4.4.6.5 Module Design .............
4.2.4.4.4.7 Module RXSYNT Specification ....
4.2.4.4.4.7.1 Functional Specification
..
4.2.4.4.4.7.2 Module Interface ..........
4.2.4.4.4.7.3 Module Components .........
4.2.4.4.4.7.4 Data Description ..........
4.2.4.4.4.7.5 Module Design .............
4.2.4.4.4.8 Module INTERRUPT Specification
.
4.2.4.4.4.8.1 Functional Specification
..
4.2.4.4.4.8.2 Module Interface ..........
4.2.4.4.4.8.3 Module Components .........
4.2.4.4.4.8.4 Data Description ..........
4.2.4.4.4.8.5 Module Design .............
4.2.4.4.4.9 Module V24 DRIVER Specification
4.2.4.4.5 Common Subpackage Data .............
4.2.4.4.6 Common Subpackage Procedures .......
4.2.4.4.7 Subpackage Interfaces ..............
4.2.4.4 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲L̲T̲U̲X̲-̲O̲C̲R̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The LTUX-OCR supports the interface between the CAMPS
host computer and the device:
o Optical character reader (OCR)
The device is supported in the following way:
O̲p̲t̲i̲c̲a̲l̲ ̲C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲R̲e̲a̲d̲e̲r̲
o ASCII character transfer
o 2400, 4800 or 9600 bps input speed
o Optional usage of V-24 lines 105/106 and 108.2/107
o Optional usage of even/odd/none parity
o 1 - 1 1/2 - 2 stop bits
For more details please refer to CAMPS LTUX-S V24 interfaces
(CPS/TCN/031) and I/O control detailed design specification
(CPS/SDS/028) figure 2.2.1.2-1.
The LTUX-OCR support one OCR and it shall be connected
to jack 1.
4.2.4.4.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
The following modules are defined:
INILSL : Initializes data structures such as queue
and buffer headers. Initializes scheduling
system.
PROCESS : Main routine activated by scheduling system
(one special section defined per channel).
Each section activates the subroutine needed
for service of actual channel.
LDUSCH : Main routine activated by scheduling system
(one special section defined per channel).
Each section activates the LDUDEMUX and
buffer release module of actual channel.
LDUREL : Buffer release module. Returns empty buffer
to queue indicated in buffer header byte
0 and 1.
LDUDEM : Reads LDU - buffer from TDX-I/F queue,
specified subdevice. The LDU's are verified
with respect to LDU-type, command codes
or data content. Data LDU's are delivered
in a special queue, command LDU's in an
other.
CMDINT : Reads command LDU's from the LDUDEM module.
The commands are verified and executed.
In most cases a completion code is returned.
The module generates asynchronous status
reports and transmission/reception status
reports too.
LINKPRO : This is the "master" module controlling
the input and output of data. The control
is based on V24-line state and commands
received by CMDINT.
OUTBHAND : Controls the transmission of ACK, NAK,
X-ON and X-OFF. If someone tries to send
data to the OCR an error report is sent
to the HOST.
INBHAND : Controls the transport of LDU's from device
to CR80. The module will wait for device
ready and input request before releasing
any buffer for transmission on the TDX-system.
RXSYNT : Detecting "Start of Message" (STX), "End
of line", "End of message" (ETX) and check
"Length of Data Block" (ETB).
Based on this information input data are
packed in LDU's and IOC records.
INTERRUPT : Interrupt routines used by serial interface
(SIO). Following interruptions are serviced:
TX-buffer empty, RX-character available,
external status interruption and special
receiver condition.
V24DRV : General subroutines used for initialization
and operation of serial interfaces (SIO's).
KERNEL : An assembly of subroutines used by one
or more of the other modules.
An overview of the firmware structure and the data
flow is shown in fig. 4.2.4.4.3-1. The figure shows
one channel. The figure does not show the scheduling
system nor the initialization modules.
4.2.4.4.3 D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲ ̲W̲i̲t̲h̲i̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲
For the channel used a number of queues are defined.
INFTQ : Data buffers ready for transmission. IOC-record
separators have been strupped off and replaced
with a device dependent no. of (CR) (LF)
characters. Normally not used. (No data
to OCR.)
Enqueing module: LDUDEM
Dequeing module: OUTBHAND
Initial no. of elements: 0
INTCQ : Command buffers with commands from the
CR80 or locally generated commands. The
CR80 commands are validated with respect
to command code and buffer size.
Enqueing module: LDUDEM
Dequeing module: CMDINT
Initial no. of elements: 0
INETQ : Empty packet buffers for outbound data.
Enqueing module: OUTBHAND
Dequeing module: LDUDEM
Initial no. of elements: 1
INFRQ : Data buffer with inbound data ready for
delivery to the CR80. Data are packed in
LDU's and IOC records.
Enqueing module: RXSYNT
Dequeing module: INBHAND
Initial no. of elements: 0
INERQ : This queue is not used in LTUX-OCR
INWRQ : Empty pocket buffers for inbound data.
Enqueing module: LDUREL, INBHAND
Dequeing module: RXSYNT
Initial no. of elements: 12
INFIQ : This queue is not used in LTUX-OCR
INEIQ : Empty buffers for asynchronous reports
for the CR80.
Enqueing module: LDUREL
Dequeing module: CMDINT
Initial no. of elements: 5
INTRQ : "Output request" buffers received from
LDUDEM by CMDINT. The buffers are for transmission
to complete, and are used for the generation
of transmission status report.
Enqueing module: CMDINT
Dequeing module: CMDINT
Initial no. of elements: 0
INWCQ : Command buffer received from LDUDEM by
CMDINT. The buffers are waiting for the
completion of actual command (open/close
protocol), and are used for the generation
of completion code.
Enqueing module: CMDINT
Dequeing module: CMDINT
Initial no. of elements: 0
Fig. 4.2.4.4.3-1
4.2.4.4.4 M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
4.2.4.4.4.1 M̲o̲d̲u̲l̲e̲ ̲I̲N̲I̲O̲C̲R̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
4.2.4.4.4.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module cleares all RAM and initializes buffer-
and queue-headers. RAM areas are reserved for control
tables (LSLCTAB 1-4). Process scheduling is initialized.
The resulting schedule list is:
LSJAK 1 (LDUDEM, LDUREL)
SCANIN (TDX-service)
SCANOUT (TDX-service) JACK 1 service
PROCESS 1 (CMDINT, OUTBHAND,
LINKPRO, RXSYNT,
INBHAND)
SCANIN
SCANOUT
The process INIOCR is passivated, when init is finished.
V24-driver tables are initialized
4.2.4.4.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Module is activated as process no. 4 and must be situated
a PROM location 6000H
4.2.4.4.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
N.A.
4.2.4.4.4.1.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Actual buffer and queue layout are determined by the
tables BETA 1 (JACK 1), and table BRAM. Resulting buffer
layout are:
QUEUE NO. OF SIZE OFF-SET
BUFFERS
TDX-outbound
empty buffer 2 128 0
INETQ 1 128 0
INEIQ 5 16 0
INWRQ 12 128 0
4.2.4.4.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
The lables LMRSPK, TBAVAI, LMPHNT, LDUMUX, LIITHL,
LMCENT are dummy subroutines called by the module LDUSCH
in the LTUX common subpackage.
I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲L̲S̲L̲
Clear all RAM
Create application processes
Passivate init processes
Evaluate buffers
Initialize V24-driver
Schedule
FIGURE 4.2.4.4.4.1.5-1
4.2.4.4.4.2 M̲o̲d̲u̲l̲e̲ ̲P̲R̲O̲C̲E̲S̲S̲E̲S̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.2.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module defines 1 processes, PROCESS1, serving
jack no. 1.
When activated the first time the process performs
the final initialization of control table and V24 driver.
4.2.4.4.4.2.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
N/A
4.2.4.4.4.2.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module consists of 1 section, serving JACK 1.
4.2.4.4.4.2.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
N/A.
4.2.4.4.4.2.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
An overall flowgram is shown (fig. 4.2.4.4.4.2.5-1)
Processes
Init control table of JACK1
Loop
Call relevant modules
Schedule
End loop
FIGURE 4.2.4.4.4.2.5-1
4.2.4.4.4.3 M̲o̲d̲u̲l̲e̲ ̲C̲M̲D̲I̲N̲T̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.3.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The command interpreter module receives commands from
the LDU demultiplex modules. Commands may be init commands,
input request or error reports. Another function of
the command interpreter is the generation of command
responses, TX and RX completion codes and asynchronous
error reports.
4.2.4.4.4.3.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Command buffers are received on queue INTCQ. Empty
buffer for reports etc. are fetched from INEIQ. Reports
etc. are delivered for the TDX-bus for transmission
(JACK1 uses subdevice 2). One control byte, CMDCONT1,
is used to indicate reports to generate. Error codes
are returned in other 6 bytes, for details refer section
4.2.4.4.5: Common subpackage data.
4.2.4.4.4.3.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module contain a sequential code area and a section
with the fixed part of the responses/reports to be
used.
4.2.4.4.4.3.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The data formats used corresponds to the formats specified
in section 4.1.4 Common package data.
4.2.4.4.4.3.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
C̲o̲m̲m̲a̲n̲d̲ ̲i̲n̲t̲e̲r̲p̲r̲e̲t̲e̲r̲
Command queue empty?
Get command/error report
Internale report? I̲n̲t̲e̲r̲n̲a̲l̲e̲ figure 4.2.4.4.4.3.5-2
Case of command code
Input request? Signal to INBHAND
Cancel inp. req.? Command not allowed
Report status? L̲i̲n̲e̲ ̲c̲o̲m̲m̲a̲n̲d̲s̲ figure
4.2.4.4.4.3.5-3
Open channel? Signal to LINKPRO
Close channel? Signal to LINKPRO
End command case
Get control bytes
Test flags
Generate reports accordingly
End
FIGURE 4.2.4.4.4.3.5-1
I̲n̲t̲e̲r̲n̲a̲l̲e̲
ASYNC status report?
Completion code NE 0? Send buffer to host
Queue buffer to TX-status
FIGURE 4.2.4.4.4.3.5-2
L̲i̲n̲e̲ ̲C̲o̲m̲m̲a̲n̲d̲s̲
Case of subcommand
Enable? Verify enable command
Init table accordingly
Signal to LINKPRO
Open Protocol? Signal to LINKPRO
Close Protocol? Signal to LINKPRO
Statistic? Generate statistic report
Status Generate status report
Device status? Generate device status
report
End subcommand case
FIGURE 4.2.4.4.4.3.5-3
4.2.4.4.4.4 M̲o̲d̲u̲l̲e̲ ̲L̲I̲N̲K̲P̲R̲O̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.4.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module is the "master" module in the LTUX-OCR.
It controls all data transfer based on the state of
the V24-lines and based on the commands received from
the command interpreter.
4.2.4.4.4.4.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Thru the control table the module receives the necessary
information from the other modules. The module receives
no data pockets from any module.
4.2.4.4.4.4.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module consists of a program part, a state/event table,
a number of actions and some special subroutines.
4.2.4.4.4.4.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The module refers to a number of fields in the control
table, the most important being the control byte (LINKCONT)
and the timer fields. For more details refer to section
4.2.4.4.5 Common subpackages data.
4.2.4.4.4.4.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
L̲i̲n̲k̲ ̲P̲r̲o̲t̲o̲c̲o̲l̲
Update all active timers
Get V24 state of JACK
Update V24-event-field
Get link control byte
No flags set? Event based on V24 state
Determine event
Determine new state
Determine action
A̲c̲t̲i̲o̲n̲s̲ figure 4.2.4.4.4.4.5-2
End
FIGURE 4.2.4.4.4.4.5-1
A̲c̲t̲i̲o̲n̲s̲
Case of action
LINKA000? no action
LINKA010? open out of sequence
LINKA020? close out of sequence
LINKA030? start open protocol
LINKA040? complete open protocol
LINKA050? open failed
LINKA060? open command overrided
LINKA070? drop V24-line 106 and 107
LINKA080? drop V24-line 106
LINKA090? drop V24-line 107
LINKA100? device failure due to drop 106 and 107
LINKA110? clean-up for restart
LINKA120? device failure due to close protocol
LINKA130? device failure due to paper out
LINKA140? recover after device failure
LINKA150? device failure due to drop 106
LINKA160? device failure due to drop 107
LINKA170? device failure due to unexpected action
LINKA180? V24-OK but paper out
LINKA190? error restart (master clear LTUX)
LINKA200? 106, low, check for timeout
LINKA210? 107 low, check for timeout
LINKA220? 106 and 107 low, check for timeout
LINKA230? waiting for V24-OK, check open timer
End action case
FIGURE 4.2.4.4.4.4.5-2
C̲l̲o̲s̲e̲ ̲d̲o̲w̲n̲ ̲a̲f̲t̲e̲r̲ ̲d̲e̲v̲i̲c̲e̲ ̲e̲r̲r̲o̲r̲
Disable transmitter
Disable receiver
Drain receiver registers
Close V24 line
Update state of V24
Stop used timer
Signal dev. fail for OUTBHAND
Signal dec. fail to INBHAND
Return
FIGURE 4.2.4.4.4.4.5-3
V̲2̲4̲-̲l̲i̲n̲e̲ ̲1̲0̲6̲ ̲t̲i̲m̲e̲o̲u̲t̲ ̲o̲r̲ ̲1̲0̲7̲ ̲t̲i̲m̲e̲o̲u̲t̲
Get state of timer
No timeout?
Signal timeout to LINKPRO
Reset timeout
Return
FIGURE 4.2.4.4.4.4.5-4
Fig. 4.2.4.4.4.4.5-5…01…Determination of V24-event
Fig. 4.2.4.4.4.4.5-6…01…LINKPRO state/action tables
4.2.4.4.4.5 M̲o̲d̲u̲l̲e̲ ̲O̲U̲T̲B̲H̲A̲N̲D̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.5.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module controls the transmission of control characters
to the OCR. If data are received (not allowed) then
a transmission status report is generated.
4.2.4.4.4.5.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Information about changes in the link status (watched
by LINKPRO) are received in the control table by OUTBCONT.
According to flags in the control byte the belonging
control characters are delivered for transmission by
interrupt routine through the control table.
Data buffers (if any) are received in Full Transmission
Queue (INFTQ).
4.2.4.4.4.5.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module contains 4 parts: Event determination, state/action-tables,
action programs and special subroutines. 1 subroutine
is defined.
4.2.4.4.4.5.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The module uses the common control table. Most important
is the OUTBCONT byte in which events are received from
other modules. The transmission control section storing
buffer links element, current position and bytes lift
is important too. For details refer 4.2.4.4.5.
4.2.4.4.4.5.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
The module is state/event controlled with the first
part used to determine actual event.
Outbound Handler
Device ready ? Event 0
Device fail ? Event 1
DC3 ? Event 3
DC 1 ? Event 2
NAK ? Event 5
ACK ? Event 4
Dequeue full
transmit queue
Queue not empty ? Event 6
Calculate action
Case actions of
OUTA00? Dummy
OUTA10? Send DC1 to OCR
OUTA20? Send DC3 to OCR
OUTA30? Send ACK to OCR
fig.4.2.4.4.4.5.5-2
OUTA40? Send NAK to OCR
OUTA50? Release data buffer
OUTA60? Send ACK with timeout
End of action case
Return
FIGURE 4.2.4.4.4.5.5-1
Outbound action 30
Get no. of buf in waiting RX queue
No. of buf less than min? - Set flag: ACK wanted
Get char. ACK
Transmit first character
Char. not transmitted ? Set flag: ACK wanted
Return
FIGURE 4.2.4.4.4.5.5-2
4.2.4.4.4.6 M̲o̲d̲u̲l̲e̲ ̲I̲N̲B̲H̲A̲N̲D̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.6.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Controls the transport of LDU's from OCR to CR80. The
module will wait for device ready and input request
before releasing any buffer for transmission on the
TDX-system.
4.2.4.4.4.6.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
External events are signalled to the module in the
control table, byte INBCONT. The current LDU no. to
insert in case of LDU-TYPE = SOL/EOL is read from control
table too (byte RLDU ̲NO). For details ref. section
4.2.4.4.5.
Bufer ready to transmission on the TDX-bus are received
in queue INFRQ. When a buffer is released for transmission
on TDX-bus, subdevice no. (1 + JACK no.) is used.
When a buffer is descarded it is inserted as empty
in the queue INWRQ.
4.2.4.4.4.6.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
As many of the other modules this contains 4 parts:
event determination, state/action table, action programs
and special subroutines. Only one subroutine is defined;
ref. below.
SUBROUTINE RESET RECEIVER ANALYSER RXRESET
PROGRAMMER: EJK
DESCRIPTION: The subroutine reset the RECEIVER syntax
analyser in case of device (status) error. Current
buffer used is released, stack is reset and all other
relevant areas in control table are reset too. Current
LDU-type is set to start of LDU.
ENTRY: IX: Start of Jack control table.
EXIT: -
REGISTERS AFFECTED: AF, BC, DE, HL
RESTRICTIONS: None
EXECUTION TIME: Long
4.2.4.4.4.6.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲s̲
The module uses the common control table. The INBCONT
byte is the most important part (as in any other module).
For details ref. section 4.2.4.4.5.
4.2.4.4.4.6.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
The module is state/event controlled with the first
part used to determine actual event.
INBHAND
Get control byte
No flags set? Receiver timeout? Full receiver
queue not empty?
Event EQ 8
Dequeue full receiver queue
Buffer not available?
Event EQ LDU-type
Determine new state
Determine action
I̲n̲b̲o̲u̲n̲d̲ ̲a̲c̲t̲i̲o̲n̲s̲
Return
FIGURE 4.2.4.4.4.6.5-1
I̲n̲b̲o̲u̲n̲d̲ ̲a̲c̲t̲i̲o̲n̲
Case action of
INBA000: No action
INBA010: Discard buffer
INBA020: Transmit buffer as SOL/EOL*
INBA030: Transmit buffer as POL/LOL*
INBA040: Clean-up after device error
INBA050: Clean-up after dev. status error
INBA060: SOTF-interruption
INBA070: Reset when device ready
INBA080: Generate reciver timeout report
INBA090: Clean-up for restart
End of action case
* A̲b̲b̲r̲e̲v̲i̲a̲t̲i̲o̲n̲:
LDU: Logical data unit
SOL: Start of LDU
POL: Part of LDU
LOL: Last of LDU
ENL: Entire LDU
FIGURE 4.2.4.4.4.6.5-2
4.2.4.4.4.7 M̲o̲d̲u̲l̲e̲ ̲R̲X̲S̲Y̲N̲T̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.7.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module handles the message format used between
CAMPS and the OCR. Each message will be delivered to
the HOST as one LDU. The module use Start of Text (STX)
and End of Text (ETX) to detect Start of Message and
End of Message.
End of Transmission Block (ETB) is used to separate
the blocks within the message. The length of the block
is tested and if not correct then the whole message
shall be retransmitted.
The message is packed in IOC records using either End
of Line (EOL) or character type shift, STX and ETX
to terminate current IOC record.
The IOC record type used is:
0: Letter characters, no End of Line
1: Letter characters, End of Line detected
4: Control characters
5: Start of Message
6: End of Message
End of Line (EOL) is either one carriage return, line
feed (CR)(LF) or two carriage return, line feed (CR)(CR)
(LF) (see CPS/ICD/008 sec. 5.1).
4.2.4.4.4.7.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Characters are received one by one in the RX-FIFO.
Completed buffers (full or End-of-Message/RX-timeout
detected) are delivered in Full Receiver Queue (INFRQ).
Empty buffers are fetched from Waiting Receiver Queue
(INWRQ).
The control table is used for information exchange
with other modules.
4.2.4.4.4.7.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module is state/event controlled with one section determing
actual event, one section with the event, state and
action table, one with the action code-segments and
one with the special subroutines.
4.2.4.4.4.7.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The control table is used to interchange the necessary
information between the modules. This module also uses
a syntax stack for detection of End of Line. When End
of Line is detected or max length of IOC-record is
exceeded then the length of the IOC record and the
type are inserted in the IOC record header.
If a buffer is running full the rest of the IOC record
is placed in the next buffer. The full buffer is inserted
in Full Receiver Queue (INFRQ) when the last IOC record
in the buffer is completed.
An empty buffer shall always be available, so there
shall be at least one buffer in Waiting Receiver Queue
(INWRQ) when the module is called. Else no action.
4.2.4.4.4.7.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
Receiver Syntax
No. of buf in INWRQ LT min?
Loop
Get control byte
End of block error ? Event 8
Receiver error ? Event 12
Wait for input request ? Input request not received
?
Send ACK to OCR
Receiver Timeout ? Event 9
NAK Timeout ? Event 11
ACK Timeout ? Event 10
Length of line GT max ? Event 7
Receiver FIFO empty ? Exit loop
Character EQ data ? Event 0
Determine event
Calculate new state
Determine action
R̲e̲c̲e̲i̲v̲e̲r̲ ̲a̲c̲t̲i̲o̲n̲ fig. 4.2.4.4.4.7.5-2
End loop
Return
FIGURE 4.2.4.4.4.7.5-1
R̲e̲c̲e̲i̲v̲e̲r̲ ̲A̲c̲t̲i̲o̲n̲s̲
Case of actions
RXA000 ? Dummy
RXA010 ? Character to buffer
RXA020 ? IOC record type 0, 4, char. to buffer
RXA030 ? IOC record type 4, char. to buffer
RXA040 ? Character to Syntax FIFO
RXA050 ? IOC record type 0, Syntax FIFO and
char. to buffer
RXA060 ? IOC record type 0, char. to buffer
RXA070 ? IOC record type 1
RXA080 ? Start of LDU
RXA090 ? Dummy
RXA100 ? OCR report error in data
RXA110 ? OCR report error in control char.
RXA120 ? End of LDU
RXA130 ? End of LDU when Syntax FIFO used
RXA140 ? End of LDU in control char sequence
RXA150 ? End of block error
RXA160 ? End of block
RXA170 ? More than max. char. type 0
RXA180 ? More than max. char. type 4
RXA190 ? Receiver timeout
RXA200 ? Receiver timeout in control char.
RXA210 ? NAK timeout
RXA220 ? Receiver error
ERROR ? Error action
End case
FIGURE 4.2.4.4.4.7.5-2
The Receiver Actions are mostly a collection of calls
to subroutines. Many things are the same but not with
the same parameters or in another order and that is
the reason for using subroutines. The header of the
subroutine with a short description and call parameters
are shown overleaf.
FIGURE 4.2.4.4.4.7.5-3
FIGURE 4.2.4.4.4.7.5-4
FIGURE 4.2.4.4.4.7.5-5
4.2.4.4.4.8 M̲o̲d̲u̲l̲e̲ ̲I̲N̲T̲E̲R̲R̲U̲P̲T̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.4.8.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This is the low level communication module. The subroutines
defined are all interrupt activated and deal with character
I/O and SIO control.
4.2.4.4.4.8.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The subroutines defined are called from the corresponding
interrupt routine in the V24DRV module. The routines
uses the general control table, ref. section 4.2.4.4.5.
4.2.4.4.4.8.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Module contains 4 subroutines, ref. section module
design.
4.2.4.4.4.8.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The control table contains pointers and counters used
for data transfer to and from V24 lines and special
bytes to interchange information with other modules.
4.2.4.4.4.8.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
The subroutines are shown on the following pages.
Transmitter interrupt ()()
End transmission ?
TX bytecounter not valid ? Stop transmitter
Send character Indicate transmitter stopped
Update pointer Clear TX-bytecounter
Return
FIGURE 4.2.4.4.4.8.5-1
Receive char. interrupt ()()
Restart receiver timer
Read character
Char. to Receiver FIFO
Receiver FIFO full ? Indicate receiver error
Indicate device error
Increment No.of FIFO overflow
Return
FIGURE 4.2.4.4.4.8.5-2
Special Receive Condition ()()
Read Error Status () (status byte)
Framing error? Indicate error
Indicate unexpected device
action
Increment No.of framing error
Receiver overrun Indicate error
Indicate receiver overrun
Increment No.of receiver overrun
Parity error ? Indicate receiver error
Indicate parity error
Increment No.of parity error
Return
FIGURE 4.2.4.4.4.8.5-3
External Status Interrupt (status byte)()
Break/abort? Indicate error
Indicate unexpected device
action
Return
FIGURE 4.2.4.4.4.8.5-4
4.2.4.4.4.10 M̲o̲d̲u̲l̲e̲ ̲V̲2̲4̲ ̲D̲R̲I̲V̲E̲R̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
4.2.4.4.5 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
To ensure that modules may be used reentrant all variables
are assembled in a control table. The variables are
addressed by use of the Z80 index register IX plus
an offset. The variable is defined by the value of
their offset. In the actual design 1 control table
is defined. Table layout is shown on the following
pages.
A number of constants are used which are specific to
the LTUX-OCR subpackage. Their names, values and usage
are shown in the listing of OCR ̲NAMES.
C̲o̲n̲t̲r̲o̲l̲ ̲T̲a̲b̲l̲e̲:
FIGURE 4.2.4.4.5-1
FIGURE 4.2.4.4.5-2
FIGURE 4.2.4.4.5-3
FIGURE 4.2.4.4.5-4
4.2.4.4.6 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
The subroutines are assembled in the module KERNEL.
On the following pages they are described by their
subroutine headers. The following subroutines are defined:
GENRESPO
GENASYNC
RANGE
SWTIM
LOOKUP
CASE
FIGURE 4.2.4.4.6-1
FIGURE 4.2.4.4.6-2
4.2.4.4.7 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
Subpackage interface described in section 4.2.4.1.7.