Google
 

Trailing-Edge - PDP-10 Archives - AP-4178E-RM - swskit-documentation/lp20.fnc
There are 6 other files named lp20.fnc in the archive. Click here to see a list.


+---------------+
! d i g i t a l !   I N T E R O F F I C E  M E M O R A N D U M
+---------------+

To:  KL-10 Front-End Group

                                        Date:  6 Aug 75

                                        From:  Tom Porcher

                                        Dept:  DEC10 S.E. Dept.

                                        Loc:   MR1-2  Ext: 6788

                                        File:  [DOC-FRONT-END]
                                                LP.SPC


Subj:   LP-20 Driver Functional Specification



This functional specification describes the  interface  to  the
LP-20  from  the KL-10 front end monitor, RSX10-F.  The special
features of the LP-20 are described in the design spec for said
device, and are not described herein.


                 INTER-PROCESSOR COMMUNICATION

All communication between the -10 and  the  LP-20  driver  goes
through  the  DTE-20, using the queued protocol.  the following
is a list of the available functions to tthe LP-20.

From -10 Information

Code    Function

  3     String Data

        This function addresses a specific line-printer and  is
        data  to  be  printed.   The  request  is queued to the
        proper line-printer and the line-printer is started.

  5     Return Device Status

        The current device status is  sent  to  the  -10.   See
        below, Send Device Status

 11     Flush Device Output

        This  clears  any  I/O  that  is  in  progress  on  the
        specified line-printer, and clears the request queue.
TO:  KL-10 Front-End Group                               Page 2
SUBJ: LP-20 Driver Functional Specification



  7     Here is Device Status

        The  LP-20   specific   operations   are   handled   as
        subfunctions  of this function.  The function specifies
        the line-printer to perform the function for,  and  the
        length  of  the  function  block.   This  is similar to
        string data, except that the data is interpreted by the
        driver  and  not  sent to the LP-20.  The first word of
        the function data is the function code.  The  following
        are the functions available:

        Code    Subfunction

         129    Load LP-20

                This function has one argument:   the  name  of
                the  file  on  the RSX-10F File System to load.
                This file  contains  the  Vertical  Format  and
                Translation   RAM.   Blocks  1,  2  and  3  are
                ignored.  Block 4 is the Translation RAM.   The
                first  word  of block 5 gives the length of the
                VF (in bytes), which is the rest of the file.

                These  files  are  set  up   for   the   proper
                processing of the data sent to the LP-20.

          130   Set Page Counter Interrupt

                The  low-order  12  bits  (bits  11-0)  of  the
                argument  are  the  value to be set in the page
                counter.  Bit 15 is set to  enable  page  count
                zero interrupts, clear to disable.

          131   Set device status register.

                This function allows the -10 program to set  or
                clear  the  DELHLD  and  MODE bits in the LP-20
                Status Register.  This is to allow for  testing
                of  the  printer,  as well as special character
                functions.

          2     Continue

                There are no arguments to  this  function.   If
                the  specified  line-printer is stopped, due to
                an error, illegal character interrupt, or  page
                count   reaching  zero,  the  LP-20  output  is
                resumed.

          1     End-of-File

                This clears the checksum, and  also  sends  the
                device status.
TO:  KL-10 Front-End Group                               Page 3
SUBJ: LP-20 Driver Functional Specification





To -10 Information

Code    Function

 15     Acknowledgement

        This is sent whenever there is room for more data to be
        sent  to  the LP-20.  The transmission of this function
        to the -10 indicates that the -10 can send more data.

  7     Here is Device Status

        This is sent on request from the -10, or when the LP-20
        stops for an error.  It is also sent if the LP-20 comes
        on-line.  Page count reaching zero will only  stop  and
        send status if it is enabled, by bit 15 of the Set Page
        Count function.

The format of the status information sent is as follows:

        Word 0 (byte 0)  Current state:

                -5  Device error wait
                -4  VFU error wait
                -3  Page count zero wait
                -2  Illegal character wait
                -1  LP-20 off-line (I/O in progress)
                 0  LP-20 off-line (device idle)
                 1  I/O in progress
                 2  Device idle

        Word 0  (byte 1) Accumulated Checksum

LP-20 Device Registers:

        Word 1   LPCSRA  
        Word 2   LPCSRB
        Word 3   LPBSAD
        Word 4   LPBCTR
        Word 5   LPPCTR
        Word 6   LPRAMD
        Word 7   LPCBUF/LPCCTR
        Word 8   LPCKSM/LPTDAT
TO:  KL-10 Front-End Group                               Page 4
SUBJ: LP-20 Driver Functional Specification



                      QUEUE I/O INTERFACE

All data sent to the LP-20 from tasks running in  the  -11  are
sent  via  the  QUEUE I/O directives.  The LP-20 Driver accepts
the following I/O functions

IO.WLB  Write Logical Block.  Data is entered into the threaded
        output queue for the specified LP.

IO.WVB  Write Virtual Block.  Same as IO.WLB

IO.KIL  Kill all pending requests.  Aborts  all  sending  QUEUE
        I/O requests to the specified LP with I/O status IE.ABO
        (Operation Aborted).

IO.ATT  Attach Device.  Ignored.

IO.DET  Detach Device.  Ignored.

All other functions return IE.IFC (Illegal Function Code).

The following I/O status returns are given by the LP-20  Driver
for a request:

IS.SUC  Successful Completion.  Data has been printed.

IE.DNR  Device Not Ready.  The VFU  has  encountered  an  error
        when printing.

IE.VER  Controller Error.  A non-recoverable error has  occured
        (i.e., parity error).

IE.ABO  Operation Aborted.  Output has been flushed due  to  an
        IO.KIL request or a flush device request from the -10.

IE.IFC  Illegal Function Code.  The specified I/O  function  is
        not  one  of  the set IO.WLB, IO.WVB, IO.KIL, IO.ATT or
        IO.DET.

All device error conditions cause a message to  be  printed  on
the  console.   Any  error  except off-line aborts the request,
while off-line waits for on-line.


                PROGRAM FUNCTIONAL DESCRIPTION

The LP-20 Driver is broken up into several modules:

        LPDATA  Common Database and Parameters
        LPTASK  Task-Level Service
        LPINT   LP-20 Interrupt Service Routine
        LPCOMM  Common Subroutines
TO:  KL-10 Front-End Group                               Page 5
SUBJ: LP-20 Driver Functional Specification


COMMON DATABASE AND PARAMETERS

The number of LP-20's the driver is to service is the value  of
the symbol LPNUM.

All device-specific (i.e.  for each LP) data  is  kept  in  the
device  status  block  for  each device.  This is a table LPTBL
which has an 8-byte block for each LP, starting  with  unit  0.
Throughout the driver, the address of the block for the current
LP is kept in R2.  The size of each  entry  (8  bytes)  is  the
value of the symbol LPSIZE.


LPTBL descriptions:

0       LPTHD   Pointer to threaded output list.  This  is  the
                address  of the first item in the list (next to
                be printed), zero if there is no list.

2       LPEXP   External Page Adddress for this  LP.   This  is
                the  starting  address  of the device registers
                for this device (i.e., the address of  LPCSRA).
                This is normally kept in R3 when it is needed.

4       LPSTS   Status bits:

                LP.HNG  Device hung.  This bit is set every  20
                        seconds when the LP is not idle, and if
                        it  is  not  cleared  in  the  next  20
                        seconds  (by  doing  output)  the LP is
                        assumed to be hung.  The LP is  started
                        going again.

                LP.SST  Send status to -10.  This  bit  is  set
                        whenever  a  change  in  status  (i.e.,
                        off-line)  requires  the  -10   to   be
                        notified.    It  is  set  at  interrupt
                        level, and checked at task level.

                LP.WAT  Device is waiting for -10  to  respond.
                        This occurs on enabled interrupts (page
                        count reaching zero, illegal character,
                        or controller error).

                LP.PZI  Page count zero interrupt enable.  This
                        bit being set causes output to stop and
                        wait for a response from the  -10  when
                        the page count register reaches 0.

                LP.MCH  Multi-character print.  This bit is set
                        when    a    multiple-character   print
                        sequence (i.e.,  'arrow"  mode)  is  in
                        progress.   This  indicates  that  DONE
                        being set means to continue the current
TO:  KL-10 Front-End Group                               Page 6
SUBJ: LP-20 Driver Functional Specification


                        buffer after the character which caused
                        the multi-character print.

                LP.LDF  Load  Load  File.   Set  by   interrupt
                        service if VFUERR is up before starting
                        a transfer or on  encountering  a  Load
                        File  function  in  the  threaded list.
                        File is loaded at task level.

                LP.LIP  Load  in  progress.   Set  by  task  on
                        starting  load,  cleared  by  interrupt
                        service when a Set Mode 0 (Normal mode)
                        function is encountered.

                LP.F10  From  -10  request.   Set  on  any  -10
                        request  (data,  status  or  function).
                        Cleared when threaded  output  list  is
                        emptied.   Used  to determine if status
                        and acknowledgements should be sent  to
                        the -10.

                LP.EOF  End of File.   Set  when  End  of  File
                        function   encountered   by   interrupt
                        service  by  ..SSLP  when  checksum  is
                        cleared.

                LP.UNT  (Bits 1 and 0).  Unit  number  of  this
                        LP.


6       LPITH   Interrupt-level thread pointer.  This points to
                the  thread block in the threaded list which is
                currently being output.   Zero  if  the  LP  is
                stopped or idle.

A parallel table, LPTBL2, has additional  information.   Again,
the entry for each LP is 8 bytes long.  The indexes into LPTBL2
are defined from the start of LPTBL, so that the  same  pointer
(usually  in  R2) can be used for both tables.  The contents of
this table:

0       LPMCB   Multi-character buffer.  This word is a  2-byte
                buffer  for  multi-character  print  operations
                (i.e.  'arrow' mode).

2       LPCSM   Accumulated Checksum (low  byte).   Cleared  by
                End  of  File  function from -10.  High byte is
                trash.

4       LPFID   File-ID of last file loaded to LP-20

6       LPFSQ   File-sequence number of  last  file  loaded  to
                LP-20.
TO:  KL-10 Front-End Group                               Page 7
SUBJ: LP-20 Driver Functional Specification


Another parallel table, LPTBLS, has more information.

0       LPFIL   (4 words) Filename and  extension  of  file  to
                load from -11 file system.

Threaded Output List

All output to each LP is kept in a threaded output queue.   The
current  head of this queue is kept in LPTHD for each LP.  Each
thread block has the following information:

0       T.HRED  Thread word.  Points to next  thread  block  in
                list.  Zero if end of list.

2       T.HBCT  Byte count of thread block and following  data,
                if  any.   This  value  is  used  to return the
                thread block to the free pool.  If this word is
                zero,  it  is a Queue I/O request, and it is an
                extended thread block (length T.HQRS) which has
                more stuff in it.  See definitons below.

4       T.HCAD  Address of data to be printed  (physical).   If
                this is zero, this is not a data request, but a
                special  function  request.   See   definitions
                below.

6       T.CBC   Byte count of data.  If this is  negative,  the
                data  has  been  sent  (or function completed).
                This may be zero.

The size of this thread block is T.HHDS, 8 bytes.

Queue I/O request thread blocks have the  following  additional
information:

10      T.HEMA  Extended Memory address bits.  Bits 5 and 4 are
                the  memory extension bits, bus address bits 17
                and 1  respectively.   In  all  other  requests
                these bits are zero.

12      T.HNAD  Address of Queue I/O request node which invoked
                this  request.   This is needed to complete the
                Queue I/O reque