DataMuseum.dk

Presents historical artifacts from the history of:

CR80 Wang WCS documentation floppies

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CR80 Wang WCS documentation floppies

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦038a7ac65⟧ Wang Wps File

    Length: 27846 (0x6cc6)
    Types: Wang Wps File
    Notes: CPS/SDS/028               
    Names: »2047A «

Derivation

└─⟦4e34bac2f⟧ Bits:30006102 8" Wang WCS floppy, CR 0161A
    └─ ⟦this⟧ »2047A « 

WangText



C…00…C…01…C…05…C…06…C…07…B…0b…B…0c…B…02…B…07…A…08…A…09…A…0e…A…0f……86…1
      
      
      
      
      
      
      
   …02…   
      
  …02…   …02… 
      
 

…02…CPS/SDS/028

…02…850301
   …02……02…
I/O CONTROL
DETAILED
 DESIGN
 SPECIFICATION…02…ISSUE
 1…02…CAMPS








4.2.4    L̲T̲U̲X̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲



4.2.4.1  S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲L̲T̲U̲X̲ ̲C̲O̲M̲M̲O̲N̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Input fra PU



4.2.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̲

         The functional specification covers only the functions
         executed by the application firmware. The LTUX system
         firmware is described in: LTUX-S Product Specification
         CSD-MIC/220/PSP/0012.

         The LTUX is an interface module between the CAMPS TDX
         bus and different lines and terminals.

         The functional specification is explained by means
         of a functional breakdown.

         The application functions vary for most of the devices.
         The application will be integrated to some extent,
         in order to make a single LTUX able to handle several
         different lines and terminals.



4.2.4.1.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲B̲r̲e̲a̲k̲d̲o̲w̲n̲

         The functional breakdown is only shown for one LTUX.
         This LTUX includes all the functions to be implemented.

         An LTUX is interchanged via a bi-directional control
         channel and up to four bi-directional data channels.








                   FIGURE 4.2.4.1.1.1-1
                   FUNCTIONAL BREAKDOWN





         The application functions are divided into six major
         groups:

             1)  Initialize
             2)  Command Interpret
             3)  Records to Host
             4)  Records from Host
             5)  Line Handling
             6)  Character error.

         1)      Initialize

         The functions in this group include power up initialize
         and restart.

         1.1)    Initialize Firmware

         After power up or after a restart command from the
         host, the initalize program in the standard firmware
         is activated. The Z80 SIO and CTC are initalized.

         1.2)    Open Command Channel

         The command channel queue buffers are defined and the
         command channels are opened by means of a number of
         command calls to the standard firmware. Finally, the
         application processes are created and activated.







                   FIGURE 4.2.4.1.1.1-2
                   INITIALIZE BREAKDOWN








                   FIGURE 4.2.4.1.1.1-3
                    COMMAND INTERPRET




         2)      Command Interpret

         The functions dealing with status request, open / close
         channels and restart commands are allocated to the
         command interpret module.

         2.1)    Restart LTUX

         This command has the same effect as a power up initialize.

         2.2)    Open Channel

         An open channel command sets up all parameters required
         to open a channel.

         2.3)    Close Channel

         A specified channel is closed. The SIO interrupt to
         the channel is disabled, the status table updated and
         the line handler enabled.

         2.4)    Status Request

         A status request command from the host will result
         in a status report.

         2.5)    Cancel Outgoing Traffic

         The outgoing traffic on a specified channel is cancelled
         and the buffer contents cleared.

         2.6)    Command CC

         When a command is executed, a completion code is returned
         to the sender.







                   FIGURE 4.2.4.1.1.1-4
                  OPEN CHANNEL BREAKDOWN




         2.2.1)  Allocate Buffers

         The number and size of the TDX-packet queue buffers
         are defined.

         2.2.2)  Allocate character queues

         The receive and transmit character queues are defined.

         2.2.3)  Alphabet Converter On / Off

         The converter routine ITA 2/5 is enabled or disabled.
         

         2.2.4)  Set up Communication Mode

         The communication mode is different for most of the
         devices:

         a)  TRC, P-TO-P
             CAMPS is DTE
             Used V24 lines: 102, 103, 104, 107, 108/2
             V24 modem lines: 107, 108/2
             CAMPS set 108/2 on, indicate ready
             OCR set 107 on, indicate ready
             Specific control characters sent to CAMPS:
             CR-CR-LF, CR-LF.
             The control character sequences are detected by
             the record generator and will cause termination
             of the present record.
             The setup includes definition of legal control
             characters.

         b)  OCR
             CAMPS is DCE
             Used V24 lines 102, 103, 104, 107, 108/2
             V24 modem lines: 107, 108/2
             OCR set 108/2 on, indicate ready
             CAMPS set 107 on, indicate ready
             Specific control characters sent from OCR: STX,
             ETB, ETX, CR-CR-LF, CR-LF.
             The control characters are detected by the record
             generating module and will cause termination of
             the present record.
             The setup includes definition of legal control
             characters.



         c)  VDU
             CAMPS is DCE
             Used V24 lines: 102, 103, 104, 105, 106, 107, 108,2
             V24 Modem lines: 105, 106, 107, 108,2
             Specific control characters sent from VDU: ACK,
             BCC, ENQ, EOT, ETX, NAK, STX, WACK.
             The setup includes definition of legal control
             characters.

         2.2.5)  Program Z80 SIO/CTC
         The Z80 SIO is programmed with a number of parameters:

             a)  Bits per character
             b)  Number of stop bits
             c)  Parity mode
             d)  Interrupt mode
             e)  Clock mode
             f)  Receiver / transmitter enable.

         The Z80 CTC is programmed with a channel baud rate
         parameter. As the baud rate can only be programmed
         for channels in groups of two, an attempt to open the
         second channel with a different baud rate from the
         first will lead to a refuse of open.

         2.2.6)  Update Status
         The status table is updated. The status table contains
         the following information:

             a)  Command status
             b)  buffer status
             c)  Z80 SIO/CTC status

         2.2.6.1) Enable Line Handler
         The line handler deals with the actual opening and
         closing of logical channels and V24 transmission lines.







                    FIGURE 4.2.4.1.1-5
                 CLOSE V24 LINE BREAKDOWN







                    FIGURE 4.2.4.1.1-6
                OUTGOING RECORDS BREAKDOWN





         3)      Records to Host

         The functions implemented include character receive
         from Z80 SIO, alphabet converting and message record
         formal generating.

         3.1)    Character Receive

         An incoming character to the Z80 SIO will cause a "receive
         interrupt". The character will then be transferred
         to the receive character queue.

         3.2)    Alphabet Converter

         If enabled, ITA 2 characters will be converted to ITA
         5.

         3.3)    Record Generating

         The incoming characters from the receive character
         queue will be checked for defined control characters
         and defined character sequences. The respective flag
         will be set and the message record format terminated.
         If an error has occured (including illegal control
         character) an end of sequence record is generated indicating
         the reason.

         3.3.3)  Each received character restarts the character
                 timer

         If the incoming data stream stops for more than a preset
         time, a time out is generated and the present record
         is terminated.

         3.4)    Record Transfer to TDX Packet Queue

         The terminated message record format is transferred
         to the TDX packet queue.







                    FIGURE 4.2.4.1.1-7
                INCOMING RECORDS BREAKDOWN




         4)      Incoming Records

         Message record formats from the TDX packet queue are
         unpacked and transferred to the Z80 SIO.

         4.2)    Record Unpack

         The records from the TDX packet queue are tested for
         certain control flags and defined characters are added.

         4.3)    Alphabet Converting

         If enabled, ITA 5 characters will be converted to ITA
         2.

         4.4)    Character Transfer to transmit character queue

         Unpacked and converted characters will be temporarily
         stored in the transmit character queue.

         4.5)    Character Transmit

         When the transmit buffer in the Z80 SIO is empty, a
         "transmit interrupt" will cause the next character
         to be transferred from the transmit character queue.

         5)      Line Handling

         Line handling deals with handling of modem lines and
         with opening and closing of logical channels and V24
         transmission lines.

         5.1)    Read Status

         A status read determines the action to be taken.

         5.2)    Open Channel

         When an open channel command has been received, then
         the modem line status will be tested. If the modem
         lines indicate ready, then subroutine calls are made
         to open the logical channel. The SIO receive interrupt
         will be enabled and the modem lines changed according
         to the CCITT recommendations.

         5.2.3)  Start Outputter



         A start outputter command will be sent to the standard
         firmware when the first incoming characters are transferred
         to the TDX packet queue.

         5.2.5)  Enable SIO Interrupt

         The SIO transmit interrupt will be enabled when the
         first data are transferred to the TDX packet queue
         from the TDX bus.

         5.3)    Close Channel

         A specific V24 line and the applicable logical channel
         will be closed if one of two events occur:

                 a)  V24 modem line change occurs.
                 b)  Close channel command is received.

         A channel is closed by subroutine calls to the standard
         firmware.

         A V24 line is closed by disabling the SIO transmit
         / receive interrupts and by changing the modem lines
         according to the CCITT recommendationss.

         5.3.3)  Stop Outputter

         A stop outputter command will be sent to the standard
         firmware when the last icncoming characters are transferred
         to the TDX packet queue.

         5.3.5)  Disable SIO Interrupt

         The SIO transmit interrupt will be disabled when there
         is no more data in the TDX packet queue.

         5.5)    Report to Host

         The following channel and line errors will be reported
         to the host via the command channel.

             a)  Buffer overrun in TDX packet queue.
             b)  Overrun in outgoing/ingoing character queue.
             c)  V24 line not ready by channel/line open command.
             d)  Modem line change: identifying V24 line not
                 ready.







                   FIGURE 4.2.4.1.1.1-8
                 LINE HANDLING BREAKDOWN








                   FIGURE 4.2.4.1.1.1-9
            OPEN/CLOSE CHANNEL/LINE BREAKDOWN





         6)      Modem Change

         A shift in the V24 modem lines is detected by the Z80
         SIO. When a change arises, the status table is updated
         and the line handler module enabled.

         7)      Character Error

         If the Z80 SIO detects a parity, frame or overrun error,
         a special error interrupt is generated. The error interrupt
         will cause deletion of the garbled character and generation
         of an error flag.

         When an error flag is set, the record generating module
         will terminate the present record and generate an error
         record with an error code.







                   FIGURE 4.2.4.1.1.1-9
                  MODEM CHANGE BREAKDOWN








                  FIGURE 4.2.4.1.1.1-10
                CHARACTER ERROR BREAKDOWN




4.2.4.1.2    F̲i̲r̲m̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲

         The LTUX application firmware is divided into processes
         scheduled by the operating system and interrupt driven
         firmware.

         Processes scheduled by the operating system:

             Command interpreter
             Line handler
             Records to host
             Records from host

         Interrupt driven firmware:

             Character transmitter
             Character receiver
             Character error handler
             V24 modem change

         The firmware structure for the different processes
         and subroutines is shown on the following pages.

         C̲o̲m̲m̲a̲n̲d̲ ̲I̲n̲t̲e̲r̲p̲r̲e̲t̲e̲r̲

         The command interpreter process is able to receive
         and implement the following commands:

             a)  RESTART
             b)  OPEN CHANNEL
             c)  CLOSE CHANNEL
             d)  STATUS REPORT
             e)  CANCEL OUTGOING CHANNEL

         The Command Intepreter is divided into the following
         modules:

         C̲o̲m̲m̲a̲n̲d̲ ̲F̲e̲t̲c̲h̲

         The entry point is the COMFET module.
         This module fetches the commands from the command channel
         in the TDX packet queue. If no comments are available,
         the scheduling routine is called.

         C̲o̲m̲m̲a̲n̲d̲ ̲R̲e̲c̲o̲g̲n̲i̲z̲e̲

         If the received command is recognized, one of the command
         implementing modules is called, otherwise a completion
         code is returned by the Command CC module.






 Fig. 4.2.4.1.2.1-1 Command Interpret Firmware Structure





         C̲o̲m̲m̲a̲n̲d̲ ̲C̲C̲  This module generates and sends a completion
                     code to the command originator.

         L̲i̲n̲e̲ ̲H̲a̲n̲d̲l̲e̲r̲

         The line handler process is enabled when one of the
         following things occurs:

             a)  An open channel command is received.
             b)  A close channel command is received.
             c)  A modem change occurs.

         The line handler is able to react on changes in the
         V24 modem lines, according to CCITT recommendations.
         DTE or DCE mode is selectable.

         The Line Handler is divided into the following modules:

         D̲e̲t̲e̲r̲m̲i̲n̲e̲ ̲A̲c̲t̲i̲o̲n̲

         When the Line Handler is enabled, a flag in the status
         register indicates the action to be taken.

         U̲p̲d̲a̲t̲e̲ ̲S̲t̲a̲t̲u̲s̲

         The status register is updated if any changeds have
         occurred.

         O̲p̲e̲n̲ ̲C̲h̲a̲n̲n̲e̲l̲

         If the modem line status indicates ready and an open
         channel command is received, then the specified channel
         is opened, and the outgoing modem lines are changed
         according to CCITT recommendations.

         C̲l̲o̲s̲e̲ ̲C̲h̲a̲n̲n̲e̲l̲

         If the modem line status indicates not ready, or if
         a close channel command is received, then the specified
         channel size is closed and the outgoing modem lines
         are changed according to CCITT recommendations.






    Fig.4.2.4.1.2.1-2 Line Handler Firmware Structure.




         R̲e̲c̲o̲r̲d̲s̲ ̲t̲o̲ ̲H̲o̲s̲t̲

         The Records to Host process is scheduled by the LTUX
         operating system and is enabled at power up or restart.

         Records to Host consist of the following modules:

         G̲e̲t̲ ̲C̲h̲a̲r̲a̲c̲t̲e̲r̲

         This is the process entry point.
         Characters are fetched from the receive character queue
         and if requested, they are converted to ITA 5.

         A̲l̲p̲h̲a̲b̲e̲t̲ ̲C̲o̲n̲v̲e̲r̲t̲e̲r̲

         The incoming characters are converted to ITA 5.

         R̲e̲c̲o̲r̲d̲ ̲G̲e̲n̲e̲r̲a̲t̲e̲

         The message record format is generated by this module.
         The incoming characters are collected in a buffer.
         Each character is checked for any match with defined
         control characters and character sequences. The number
         of collected characters in the record buffer is registered
         in the character count.

         If one of the following events occurs, the record is
         terminated and transferred to the host:

             a)  Record count reaches maximum.
             b)  A defined control character is detected.
             c)  A defined control sequence is detected.
             d)  A time out occurs.
             e)  A character error is detected.
             f)  A modem line change is detected.

         R̲e̲c̲o̲r̲d̲ ̲T̲r̲a̲n̲s̲f̲e̲r̲

         A call to the Record Transfer module will cause a transfer
         of the terminated record buffer to the outgoing TDX
         full packet queue. An empty record buffer is then transferred
         from the outgoing TDX empty packet queue to the character
         collect area.






  Fig. 4.2.4.1..2.1-3 Record to Host Firmware Structure





         R̲e̲c̲o̲r̲d̲s̲ ̲f̲r̲o̲m̲ ̲H̲o̲s̲t̲

         Records from the host are placed in the "ingoing" full
         TDX packet queue.( Refer Q…0f…4…0e… figure 4.2.4.1.3.2-1)

         The incoming records are unpacked and CR-CR-LF sequence
         added if required.

         The unpacked and converted records are transferred
         to the transmit character queue.

         The Record from Host process consists of the following
         modules:

         G̲e̲t̲ ̲R̲e̲c̲o̲r̲d̲

         This module gets the message record from the ingoing
         full TDX packet queue.

         A̲l̲p̲h̲a̲b̲e̲t̲ ̲C̲o̲n̲v̲e̲r̲t̲e̲r̲

         The unpacked characters are converted from ITA 5 to
         ITA 2, if the converter is called.

         C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲T̲r̲a̲n̲s̲f̲e̲r̲

         Each character is transferred to the transmit character
         queue.






 Fig. 4.2.4.1.2.1-4 Records from Host Firmware Structure





         5.0     C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲T̲r̲a̲n̲s̲m̲i̲t̲t̲e̲r̲

         The transmitter is activated when the SIO buffer is
         empty and a character from the transmit character queue
         is transferred to the SIO buffer.

         If the FIFO was empty, an empty flag would be set in
         the status register.

         6.0     C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲R̲e̲c̲e̲i̲v̲e̲r̲

         The receiver is activated when the SIO receives a character.
         The received character is transferred from the SIO
         buffer to the receive character queue.

         7.0     C̲h̲a̲r̲a̲c̲t̲e̲r̲ ̲E̲r̲r̲o̲r̲ ̲H̲a̲n̲d̲l̲e̲r̲

         The error handler is activated when the SIO detects
         a character error. A character error is frame error,
         parity error or SIO buffer overrun error. The characters
         involved will be deleted and an error flag set in the
         status register.

         8.0     V̲2̲4̲ ̲M̲o̲d̲e̲m̲ ̲C̲h̲a̲n̲g̲e̲

         A change in the V24 modem lines, caused by external
         equipment, activates the V24 Modem Change module. The
         module status is updated and the Line Handler enabled.



4.2.4.1.3    D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲



4.2.4.1.3.1  D̲a̲t̲a̲ ̲F̲l̲o̲w̲

         The data flow is presented in HIPO chart.





HIPO charts - 11 pages


4.2.4.1.3.2  C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲

         Explanation regarding fig. 4.2.4.1.3.2-1:

         INT 1   -   Incoming character interrupt from SIO.
                     INT 1 indicates that a character is ready
                     to be collected.

         INT 2   -   Character error interrupt from SIO.
                     INT 2 activates the Character Error module.

         INT 3   -   Modem change interrupt from SIO.
                     A change in the ingoing modem lines causes
                     INT 3.

         INT 4   -   Outgoing character interrupt from SIO.
                     INT 4 indicates that the outgoing SIO character
                     buffer is empty.

         Q1      -   Outgoing record queue.
                     Records containing data and control characters
                     are transported to Q1.

         Q2      -   Incoming command queue.
                     Commands from CR80D host are received in
                     Q2.

         Q3      -   Command response queue.
                     Command completion codes are returned to
                     the host in Q3.

         Q4      -   Incoming record queue.
                     Records containing data and control logic
                     are received from Q4.

         F1      -   Receive character queue.
                     Characters from the the Receiver are temporarily
                     stored in the incoming FIFO.

         F2      -   Transmit character queue.
                     Characters to the Transmitter are temporarily
                     stored in the outgoing file.

         1       -   When an open/close channel command is received,
                     the status register is updated and the
                     line handler enabled.



         2, 3    -   The command interpret module sets up the
                     buffer size when an open command is received.

         4       -   When a character error is received, the
                     garbled character is deleted, the present
                     record terminated and an error code record
                     generated.

         5       -   A modem change enables the Line Handler.

         6, 7    -   The Line Handler enables and disables the
                     Transmitter and Receiver.






           Fig. 4.3.2.3.2-1 LTUX Control Logic





4.2.4.1.4    M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         TBD.



4.2.4.1.5    C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲

         The data and control characters are transported between
         the LTUX and TDX handlers in the Message Record Format.

         The Message Record Format consists of a start byte
         1E HEX, used as a record separator, a byte count that
         gives the number of data bytes and a flag byte.

         The flag byte identifies the type of data in the record.

         F̲l̲a̲g̲ ̲B̲y̲t̲e̲ ̲V̲a̲l̲u̲e̲s̲


         FLAG NO.    DESCRIPTION    LOW SPEED LINES     LTUX
         HOST
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

             0       Normal data    Oversize line or premature
                                      termination

             1       Line or field where CR-CR-LF was detected
                     by 
                       the LTUX

             3       Special control character. Key on/off.

             4       Control sequence.


                                                          HOST
 LTUX
           ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
 ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             0       Normal data

             1       Line or field where CR-CR-LF is added by
             the
                       LTUX

             4       Control sequence



         FLAG NO.    DESCRIPTION       OCR              LTUX
         HOST
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

             0       Normal data. Oversize line or premature
                     
                       terminator.

             1       Line or field where CR-CR-LF or CR-LF was
                     detected by the LTUX

             3       Control report

             4       Control sequences

                                                          HOST
 LTUX
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

             4       Control sequences



         FLAG NO.    DESCRIPTION       VDU           LTUX TO
                     HOST
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

             0       Normal Data. Oversize line or premature
                       termination.

             1       Line or field. Field separator 1C HEX.

             3       Interrupt sequence. Control report.

             4       Control sequence.

                                                       HOST
 TO LTUX
 ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
 ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲

             0       Normal data.

             1       Line or field. LTUX clear line, send data
                     
                       and TAB

             4       Control sequence.



4.2.4.1.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̲

         TBD.



4.2.4.1.7    S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲



4.2.4.1.7.1 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲t̲o̲ ̲L̲T̲U̲X̲ ̲H̲a̲n̲d̲l̲e̲r̲

         The interface to the LTUX Handler is implemented by
         means of command and completion codes sent via the
         LTUX command channel.

         The data interface is implemented with the Message
         Record Format and the different flag types mentioned
         in section 4.3.2.4.4.

         The commands from the LTUX Handler are as follows:

         COMMAND CODE      COMMAND DESCRIPTION
          ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
         ̲ ̲ ̲ ̲ ̲ ̲

             0             Restart LTUX. Same function as power
                             up initialize.

             1, CH         Open specified channel.

             2, CH         Close specified channel.

             3, CH         Status request.

             4, CH         Cancel specified outgoing channel.


         In the command completion codes, the command is repeated
         and a code identifies whether the command was executed
         or not.

         Refer section 4.2.2.7.





4.2.4.1.7.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲ ̲t̲o̲ ̲S̲t̲a̲n̲d̲a̲r̲d̲ ̲F̲i̲r̲m̲w̲a̲r̲e̲

         The interface between the LTUX application and the
         standard firmware is implemented by means of a number
         of sub-routine calls. 

         The sub-routines and their function will be described
         in this chapter. For further details please refer to
         CSD-MIC/220/PSP/0012.

         O̲p̲e̲r̲a̲t̲i̲n̲g̲ ̲S̲y̲s̲t̲e̲m̲

         The standard firmware includes a simple operating system.
         This system will be used to schedule the application
         firmware processes.

         The operating system uses a standard schedule list,
         which is not changeable.

         It is possible to schedule up to 12 application processes.
         The following sub-routine calls are available to control
         the operating system:

         C̲r̲e̲a̲t̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         This routine creates and activates a process. 
         Input parameters: Process number and Process start
         address.

         A̲c̲t̲i̲v̲a̲t̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         A specified process will be activated.
         Input parameter: Process number. 

         P̲a̲s̲s̲i̲v̲a̲t̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         A specified process will be de-activated.
         Input parameter: Process number.

         S̲c̲h̲e̲d̲u̲l̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         When a process calls the scheduling routine, the CPU
         stackpointer will be saved and the operating system
         will switch to the next process in the schedule list.

         To obtain maximum throughput, this routine must be
         called by the running process with about 1 msec. intervals.
         This is necessary, because the operating system is
         not supplied with a time-out facility.



         P̲a̲c̲k̲e̲t̲ ̲Q̲u̲e̲u̲e̲

         The maximum number of logical channels is ten.
         To each channel there are assigned four queue heads:

             1)  Outgoing empty queue head.
             2)  Outgoing full queue head.
             3)  Ingoing empty queue head.
             4)  Ingoing full queue head.

         The queue heads are placed in the system RAM area.
         The buffers belonging to the queue heads are created
         by the buffer evaluating routine.

         B̲u̲f̲f̲e̲r̲ ̲E̲v̲a̲l̲u̲a̲t̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         This routine creates a defined buffer for a specific
         queue head.

         Input parameters:
             Offset - space between buffer head and buffer area.
             Buffer size - this is the same as packet size.
             Pointer to buffer head.
             Pointer to queue head.

         Output parameter:
             Pointer to next buffer head.

         C̲o̲m̲m̲a̲n̲d̲ ̲H̲a̲n̲d̲l̲e̲r̲

         The LTUX application firmware is able to control the
         standard firmware via different commands.

         The commands are executed by calling the command handler
         routine. The input parameters decide the command type.

         C̲o̲m̲m̲a̲n̲d̲ ̲H̲a̲n̲d̲l̲e̲r̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Input parameters:  Command type
                            Channel number
                              CR-ID
                              Timer adjustment.

         Output parameters: Command acknowledge
                            CR-ID.



         The following command types are applicable:

         S̲t̲o̲p̲ ̲O̲u̲t̲p̲u̲t̲t̲e̲r̲

         Stops packet transmit from defined channel.

         S̲t̲a̲r̲t̲ ̲O̲u̲t̲p̲u̲t̲t̲e̲r̲

         Starts packet transmit from defined channel.

         S̲t̲o̲p̲ ̲I̲n̲p̲u̲t̲t̲e̲r̲

         Stops packet receive to defined channel.

         S̲t̲a̲r̲t̲ ̲I̲n̲p̲u̲t̲t̲e̲r̲

         Starts packet receive to defined channel.

         O̲p̲e̲n̲ ̲C̲h̲a̲n̲n̲e̲l̲

         The CR-ID for a defined channel is inserted in the
         protocol descriptor and the channel number is inserted
         in the scan table.

         C̲l̲o̲s̲e̲ ̲C̲h̲a̲n̲n̲e̲l̲

         The channel number is removed from the scan table.

         T̲e̲s̲t̲ ̲S̲c̲a̲n̲ ̲T̲a̲b̲l̲e̲ followed by R̲e̲q̲u̲e̲s̲t̲ ̲A̲n̲s̲w̲e̲r̲ 

         If the specified channel is opened, then the CR-ID
         is returned.

         A̲d̲j̲u̲s̲t̲ ̲R̲e̲c̲e̲i̲v̲e̲ ̲T̲i̲m̲e̲r̲

         The acceptable time from first to last frame in a packet
         is set by this command.

         A̲d̲j̲u̲s̲t̲ ̲T̲r̲a̲n̲s̲m̲i̲t̲ ̲T̲i̲m̲e̲r̲

         The acceptable time delay from when first frame in
         a packet is transmitted (to the packet ACK or NAK),
         to when it is received. This timeout is for transmission
         on the TDX bus.

         I̲n̲p̲u̲t̲ ̲P̲e̲r̲m̲i̲t̲

         This command informs the sending TDX device that a
         defined channel is ready to accept data.



         I̲n̲p̲u̲t̲ ̲N̲o̲t̲ ̲P̲e̲r̲m̲i̲t̲

         The sending TDX device will be informed that a defined
         channel cannot accept data.

         A̲p̲p̲l̲i̲c̲a̲t̲i̲o̲n̲ ̲Q̲u̲e̲u̲e̲ ̲A̲c̲c̲e̲s̲s̲ ̲R̲o̲u̲t̲i̲n̲e̲

         I̲G̲E̲P̲A̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Dequeue first buffer of ingoing full buffer queue head.
         Input paramater:  Channel number.
         Output parameter: Queue status.
                             If full buffer, then find first
 buffer
                             head address.

         O̲D̲E̲P̲A̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Enqueue (i.e. put into queue) defined buffer of outgoing
         full buffer queue head.
         Input parameter:  Channel number.
                             Buffer head address.

         O̲G̲E̲P̲A̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Dequeue first buffer of outgoing empty buffer queue
         head.
         Input parameter:  Channel number.
         Output parameter: Queue status.
                             If empty buffer, then first buffer
                             head address.

         I̲D̲E̲P̲A̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Enqueue defined buffer of ingoing empty buffer queue
         head.
         Input parameters: Channel number.
                             Buffer head address.

         E̲n̲q̲u̲e̲u̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Enqueue defined buffer in specified application created
         queue head.
         Input parameters: Queue head address.
                             Buffer head address.



         D̲e̲q̲u̲e̲u̲i̲n̲g̲ ̲R̲o̲u̲t̲i̲n̲e̲

         Dequeue first buffer in specified application created
         queue head.
         Input parameters:  Queue head address.
         Output parameters: Queue status.
                              If any buffer, then first buffer
 head
                              address.



4.2.4.2  S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲L̲T̲U̲X̲-̲V̲D̲U̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲

         Input fra PU