$CONTROL USLINIT,MAP,CODE                                               00010000
$CONTROL PRIVILEGED,UNCALLABLE,MAIN=HIOCIPR0                            00012000
                                                                        00014000
     << LAST MODIFIED BY DOUG WINTERROWD AT 12:30 ON 03/04/82   >>      00016000
                                                                        00018000
     <<*********************************************************>>      00020000
     <<                                                         >>      00022000
     <<  HIOCIPR0 [MODULE  1] -- HP-IB CIPER PHYSICAL DRIVER    >>      00024000
     <<                                                         >>      00026000
     <<  COPYRIGHT (C) 1981, HEWLETT PACKARD CO.  THIS PROGRAM  >>      00028000
     <<  MAY BE USED WITH ONE COMPUTER SYSTEM AT AT TIME AND    >>      00030000
     <<  SHALL NOT OTHERWISE BE RECORDED, TRANSMITTED OR STORED >>      00032000
     <<  IN A RETRIEVAL SYSTEM.  COPYING OR OTHER REPRODUCTION  >>      00034000
     <<  OF THIS PROGRAM EXCEPT FOR ARCHIVAL PURPOSES IS PRO-   >>      00036000
     <<  HIBITED WITHOUT THE PRIOR WRITTEN CONSENT OF HEWLETT-  >>      00038000
     <<  PACKARD COMPANY.                                       >>      00040000
     <<                                                         >>      00042000
     <<*********************************************************>>      00044000
$TP                                                                     00046000
$PAGE "DESCRIPTION"                                                     00048000
<<                                                                      00050000
                                                                        00052000
                                                                        00054000
           HP-IB CIPER Physical Driver 3000 Series - HIOCIPR0           00056000
           --------------------------------------------------           00058000
                                                                        00060000
                                                                        00062000
Structure of HIOCIPR0:                                                  00064000
                                                                        00066000
HIOCIPR0, together with the SIO Device Monitor (SIODM) constitute a     00068000
standard MPE Type 1 I/O Driver/Monitor.  This means that it does not    00070000
run in its own process, but executes on any stack and therefore must    00072000
run to completion.  During initialization it executes on PROGEN's       00074000
stack, during request initiation it executes on ATTACHIO's stack, and   00076000
during interrupt processing it executes on the Interrupt Control        00078000
Stack (ICS).                                                            00080000
                                                                        00082000
HIOCIPR0 consists of a global area, two procedures, and an "outer       00084000
block" which is really a linkage area for INITIAL.  The global area     00086000
contains an array called INITIAL which is comprised of three parts.     00088000
The first part specifies the size of the other two, the unit extract    00090000
instruction, and various parameters which are used by INITIAL.  This    00092000
section is deleted after INITIAL is through with it.  The other two     00094000
parts are the Device Information Table (DIT) and the Channel Program    00096000
area, which is part of the Interrupt Linkage Table (ILT).  INITIAL      00098000
will put each of these items in the area of memory where it belongs.    00100000
The linkage area specifies the procedure labels (P-labels) of the       00102000
associated monitor (SIODM), the request initiator (CPDRVR), the         00104000
request completor (CPDRVR), the initialization procedure (CPINIT,       00106000
called by PROGEN at system startup), and the interrupt handler (GIP).   00108000
                                                                        00110000
$PAGE                                                                   00112000
Operation of HIOCIPR0:                                                  00114000
                                                                        00116000
The primary working code of HIOCIPR0 is a procedure CPDRVR.  CPDRVR     00118000
is called with six parameters.   Two of these parameters, BANK and      00120000
BUFFADDR, are the absolute buffer address of the data to be processed.  00122000
The other three, DITP, IOQP, and SIOP are pointers to three arrays.     00124000
DITP is a pointer to the Device Information Table which contains        00126000
information about its associated device.  There is one DIT for          00128000
each unit on the controller and they contain information which must     00130000
be saved between I/O requests to the driver.  IOQP is a pointer to the  00132000
Input/Output Table which contains information relevent to the current   00134000
request.  SIOP is a pointer to the first element of the channel pro-    00136000
gram which is actually part of the Interrupt Linkage Table.  The last   00138000
parameter DRTN is the Device Reference Table (DRT) number of the        00140000
device.  These three elements are described in more detail elsewhere    00142000
in this listing.                                                        00144000
                                                                        00146000
CPDRVR is always called by the SIO device monitor (SIODM) and it        00148000
determines the reason for the call by examining the IOQ and the DIT.    00150000
When a new request is initiated, CPDRVR examines the function code      00152000
and parameter fields contained in the IOQ element to determine the      00154000
task that is desired.  The proper command codes and program branches    00156000
are then placed in the Channel Program and its execution is begun.      00158000
                                                                        00160000
Upon completion of the request, an interrupt is generated and CPDRVR    00162000
is again called.  The code checks for current activity in progress,     00164000
and this being the case, branches to the completion section of the      00166000
driver.  Here several status words are examined for errors or special   00168000
conditions which might have occurred during the execution of the        00170000
Channel Program, during the data transfer, or during the operation of   00172000
the device.  These conditions can cause error retries and/or            00174000
special notation back to the caller.  A list of the conditions and      00176000
the return codes is provided in this listing.                           00178000
$PAGE                                                                   00180000
                Device Information Table (DIT)                          00182000
                ------------------------------                          00184000
                                                                        00186000
                                                                        00188000
There is one DIT per physical device.  If a physical device represents  00190000
more than one logical device, the logical device number is obtained     00192000
from the IOQ element (however, this driver only supports one device per 00194000
controller.)  The following diagram shows the DIT used for the HP-IB    00196000
CIPER physical driver.                                                  00198000
                                                                        00200000
     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15   MNEMONIC          00202000
   +--+--+--+--+--+--+--+--+--+--+--+--+-----------+                    00204000
  0| 0| 0|AC|RQ| 0| 0| 0|IO|IA|NO|ST| 0|   STATE   |   DFLAG            00206000
   +--+--+--+--+--+--+--+--+--+--+--+--+-----------+                    00208000
  1| SYSDB relative pointer to the DIT for the next|   DLINK            00210000
   | device requesting this resource or service    |                    00212000
   +-----------------------------------------------+                    00214000
  2| SYSDB relative pointer to the first IOQ in    |   DIOQP            00216000
   | request list for this device                  |                    00218000
   +-----+-----------------+-----------------------+                    00220000
  3| IOT |    Phys. unit # | Logical device number |   DLDEV            00222000
   +-----+-----------------+-----------------------+                    00224000
  4| SYSDB relative pointer to Device Linkage Table|   DDLTP            00226000
   +-----------------------------------------------+                    00228000
  5| SYSDB relative pointer to Intrp Linkage Table |   DILTP            00230000
   +--+--+--+--+--+--------+-----------------------+                    00232000
  6|VS|AB|RE|TP|NR| NR CNT |     DEVICE STATUS     |   DSAVE            00234000
   +--+--+--+--+--+--------+-----------------------+                    00236000
  7| Hardware error status.  Set when the driver   |   DSERR            00238000
   | detects an error.  Whenever <>0, the driver   |                    00240000
   | monitor logs an I/O error and clears this word|                    00242000
   +-----------------------------------------------+                    00244000
%10| Bit 0 is set at completion of timer           |   DTIME            00246000
   +-----------------------------------------------+                    00248000
%11| Holds the time out request entry index while  |   DRQST            00250000
   | a timer is active.                            |                    00252000
   +--+--+--+--+--------+--------+--------+--------+                    00254000
%12|RF|UE|DE|TO|UNIT CNT|DATA CNT| TO CNT |PRTY CNT|  DCOUNTS           00256000
   +--+--+--+--+--------+--------+--------+--------+                    00258000
%13|           Error logging location #1           | DLOGERROR          00260000
   +-----------------------------------------------+                    00262000
%14|           Error logging location #2           | DLOGCOUNT          00264000
   +-----------------------------------------------+                    00266000
                                                                        00268000
                                                                        00270000
DFLAG - Flags and request state                                         00272000
  AC  ACTIVE  - A monitor is currently servicing this device.           00274000
  RQ  REQUEST - A service request is pending while the monitor is       00276000
                active.                                                 00278000
  IO  IOPROG  - An I/O Channel Program is running for this device.      00280000
  IA  IAK     - An interrupt or response has occurred for this device.  00282000
  NO  NOTRDY  - Go to state %10 after Idle Channel Program is started.  00284000
  ST  STWAIT  - The device monitor is starting an Idle Channel Program  00286000
                for this device.  There is no IOQ associated with this  00288000
                type of request.                                        00290000
$PAGE                                                                   00292000
  STATE       - State of the device monitor.  Specifies the next action 00294000
                to be taken in SIODM in servicing the request:          00296000
                  0 - start new request                                 00298000
                  1 - not used                                          00300000
                  2 - call driver initiator procedure                   00302000
                  3 - call driver completor procedure                   00304000
                  4 - not used                                          00306000
                  5 - process request completed                         00308000
                  6 - initiate device recognition sequence              00310000
                  7 - start operator intervention wait                  00312000
                %10 - wait for interrupt (operator intervention)        00314000
                      restart at state 0                                00316000
                %11 - wait for data segment freeze, then state 2        00318000
                %12 - wait for driver initiator to be frozen, then      00320000
                      allocate controller (state 2)                     00322000
                %13 - wait for I/O completion interrupt, then state 3   00324000
                %14 - wait for controller, then call driver initiator   00326000
                %15 - not used                                          00328000
                %16 - wait for initiator make present, then state 2     00330000
                %17 - wait for completor make present, then state 3     00332000
                                                                        00334000
DLDEV - I/O system type, unit and logical device number                 00336000
    0 - HP3000 Series 2/3                                               00338000
    1 - HP3000 Series 33 (HPIB)                                         00340000
    2 - Unused                                                          00342000
    3 - Unused                                                          00344000
                                                                        00346000
DSAVE - Device processing flags                                         00348000
  VS - VALID STATUS - Set to indicate Device Status has been updated.   00350000
  AB - DVRABFLAG    - Sequence Abort in progress due to ABORT request.  00352000
  RE - RETRYFLAG    - Sequence Abort in progress due to an error.       00354000
  TP - TIMERPOPPED  - Current error is due to software timer popping.   00356000
  NR - NOTRDYFLAG   - Not Ready Wait in progress.                       00358000
  NR CNT            - Number of Not Ready Waits during this request.    00360000
  DEVICE STATUS     - Device status returned during a Sequence Abort.   00362000
       BIT  8       -   CRC available and enabled.                      00364000
        "   9       -   Reserved.                                       00366000
        "  10       -   Reserved.                                       00368000
        "  11       -   Reserved.                                       00370000
        "  12       -   Power fail or reset has occurred.               00372000
        "  13       -   A protocol error has been detected.             00374000
        "  14       -   A parity error has been detected.               00376000
        "  15       -   The peripheral has data to send.                00378000
                                                                        00380000
DSERR - Pointer to status to be logged.                                 00382000
        Bits(0:8)   - Number of words to be logged.                     00384000
        Bits(8:8)   - Offset relative to DITP(0).                       00386000
                                                                        00388000
DCOUNTS             - Error flags and error counts (4).                 00390000
   RF - REQ FAILED  - An error has forced this request to be aborted.   00392000
   UE - UNIT ERROR  - The current error is a Unit Error.                00394000
   DE - DATA ERROR  - The current error is a Data Error.                00396000
   TO - TIME OUT    - The current error is a GIC Time Out Error.        00398000
   UNIT CNT         - Number of Unit Errors during this request.        00400000
   DATA CNT         - Number of Data Errors during this request.        00402000
   TO CNT           - Number of GIC Time Outs during this request.      00404000
   PRTY CNT         - Number of HP-IB Parity Errors during this request.00406000
$PAGE                                                                   00408000
                Interrupt Linkage Table (ILT)                           00410000
                -----------------------------                           00412000
                                                                        00414000
                                                                        00416000
There is one ILT for each device controller configured on the system.   00418000
A controller may support more than one unit, however the HP-IB CIPER    00420000
physical driver currently only supports one unit.                       00422000
                                                                        00424000
     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15   MNEMONIC          00426000
   +-----------------------------------------------+                    00428000
  0|         Channel                               |   ICPVA0           00430000
  1|              Program                          |   ICPVA1           00432000
  2|                  Variable                     |   ICPVA2           00434000
  3|                       Area (ICPVA)            |   ICPVA3           00436000
   +-----------------------------------------------+                    00438000
  4|         DMA Abort                             |   ICPVA4           00440000
  5|              Address                          |   ICPVA5           00442000
   +-----------------------------------------------+                    00444000
  6|                      0                        |   ISRQL            00446000
   +--+-----------------+-----+-----------+--------+                    00448000
  7|LI|     CHANQUE     |     |   CHAN    |  DEV   |   ICNTRL           00450000
   +--+-----------------+-----+-----------+--------+                    00452000
%10| SYSDB relative pointer to Channel Program area|   ISIOP            00454000
   +-----------------------------------------------+                    00456000
%11| SYSDB relative pointer to Status Return area. |   ISTAP            00458000
   | (Always zero for this driver.)                |                    00460000
   +-----------------------------------------------+                    00462000
%12| single instruction that is executed to extract|   IUNIT            00464000
   | the device unit number from the status pointed|                    00466000
   | to by ISTAP.  (Since there is only one unit   |                    00468000
   | on the controller, this entry is not used.)   |                    00470000
   +-----------------------------------------------+                    00472000
%13| SYSDB relative DIT pointer of the device      |   ICDP             00474000
   | currently using the channel to perform a      |                    00476000
   | data operation.                               |                    00478000
   +-----------------------+-----------------------+                    00480000
%14|       SIOPSIZE        |        CQUEN          |   IQUEUE           00482000
   +--+--+--+--------------+-----------+-----------+                    00484000
%15|RW|WP|IG|                          |  HCUNIT   |   IFLAG            00486000
   +--+--+--+--------------------------+-----------+                    00488000
%16| SYSDB relative DIT pointer for unit 0         |   IDITP0           00490000
   +-----------------------------------------------+                    00492000
%17|             Peripheral                        |                    00494000
   .               Channel                         .                    00496000
   |                 Program                       |                    00498000
   +-----------------------------------------------+                    00500000
                                                                        00502000
                                                                        00504000
ICPVA0 - Channel Program Variable Area                                  00506000
                                                                        00508000
  The first word is used by the channel program processor to store      00510000
  status information after I/O channel aborts.  The next word is used   00512000
  by the driver to indicate if status should be examined for special    00514000
  conditions or errors.  The other two words are not used.              00516000
                                                                        00518000
$PAGE                                                                   00520000
ICPVA4/5 - DMA abort address                                            00522000
                                                                        00524000
  If a DMA abort occurs, the absolute address where the abort occurred  00526000
  is stored in this area.                                               00528000
                                                                        00530000
                                                                        00532000
ICNTRL - Contains controller information                                00534000
                                                                        00536000
  LIM     - If this bit is set, the controller is sharing a software    00538000
            channel resource in order to limit bandwidth.               00540000
  CHANQUE - The software channel resource number.                       00542000
  CHAN    - Channel number (four most significant bits of DRTN).        00544000
  DEV     - Device number (three least significant bits of DRTN).       00546000
                                                                        00548000
                                                                        00550000
IQUEUE -                                                                00552000
                                                                        00554000
  SIOPSIZE - (number of words + 1)/2 in the channel program area.       00556000
  CQUEN    - For a multi-unit controller this field contains the        00558000
             software controller resource number.                       00560000
                                                                        00562000
                                                                        00564000
IFLAG - Controller and Channel Program state flags                      00566000
                                                                        00568000
  RUNWAIT  - An Idle Channel Program should be started when there       00570000
             are no active requests to process.  This flag is always    00572000
             0 for this version of the driver.                          00574000
  WAITPROG - An Idle Channel Program has been started for this          00576000
             controller.  This bit is reset by an interrupt.            00578000
  IGNOREHI - An HIOP instruction has been issued against this con-      00580000
             troller but the channel program was not in a wait          00582000
             statement.  Therefore ignore the interrupt generated by    00584000
             the channel code when this program halts.                  00586000
  HCUNIT   - Highest configured unit number for this controller.        00588000
                                                                        00590000
                                                                        00592000
$PAGE                                                                   00594000
            I/O QUEUE ELEMENT (IOQ)                                     00596000
            -----------------------                                     00598000
                                                                        00600000
                                                                        00602000
     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15   MNEMONIC          00604000
   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+                    00606000
  0|      Request dependent flags (see below)      |   QFLAG            00608000
   +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+                    00610000
  1| SYSDB relative pointer to next IOQ element.   |   QLINK            00612000
   | Points to first word of element.              |                    00614000
   +-----------------------+-----------------------+                    00616000
  2|                       | Logical device number |   QLDEV            00618000
   +-----------------------+-----------------------+                    00620000
  3|                                               |   QMISC            00622000
   +--+--------------------------------------------+                    00624000
  4|  | If QFLAG.(3:1) is clear then this is the   |   QDSTN            00626000
   | S| DST number of the target data segment.  If |                    00628000
   |  | S is set, QADDR is DB relative.            |                    00630000
   +--+--------------------------------------------+                    00632000
  5| Offset in the data segment or system buffer   |   QADDR            00634000
   | table to the target data buffer.              |                    00636000
   +-----------------------+-----------------------+                    00638000
  6|                       | Function code for     |   QFUNC            00640000
   |                       | this request.  (See   |                    00642000
   |                       | next section.)        |                    00644000
   +-----------------------+-----------------------+                    00646000
  7| On initiation, specifies the word count (>0)  |   QWBCT            00648000
   | or byte count (<0).  At completion of the     |                    00650000
   | request this location contains the actual     |                    00652000
   | transmission count in the same units (bytes   |                    00654000
   | or words) as in the request.                  |                    00656000
   +-----------------------------------------------+                    00658000
%10| Parameter 1.                                  |   QPAR1            00660000
   +-----------------------------------------------+                    00662000
%11| Parameter 2.                                  |   QPAR2            00664000
   +-----------------------+--------------+--------+                    00666000
%12|         PCBN          |  QUALIFIER   |RSTATUS |   QSTAT            00668000
   +-----------------------+--------------+--------+                    00670000
                                                                        00672000
                                                                        00674000
QFLAG - Request dependent flags                                         00676000
                                                                        00678000
  Bit 0  ABORT     - Abort this request and return an error indication  00680000
                     to the caller.                                     00682000
  Bit 1  SPECIAL   - Apply special handling to this request.  (Not used)00684000
  Bit 2  DIAG      - This is a request from the diagnostic subsystem.   00686000
  Bit 3  SYSBUFF   - Target is an index relative to the SBUF Table of   00688000
                     the data buffer.                                   00690000
  Bit 4  IOWAKE    - Wake caller on completion of request.              00692000
  Bit 5  BLOCKED   - Blocked I/O.  The caller is waited in ATTACHIO     00694000
                     until the request is completed.  Implies IOWAKE.   00696000
  Bit 6  COMPLETED - The request has been completed and the caller      00698000
                     awakened if he had requested (with IOWAKE).        00700000
  Bit 7  DATAFRZN  - Set by the memory management routines (MAM) when a 00702000
                     MAKEPRESENT request is successfully completed and  00704000
                     indicates the data segment is frozen in memory.    00706000
  Bit 8  MAMERRORD - An error has occurred while MAM was trying to      00708000
                     make the target data segment present and freeze    00710000
                     it in memory.                                      00712000
  Bit 9  PREQ      - (Not used)                                         00714000
  Bit 10 SFAIL     - Delayed failure of SIO instruction.  If a call to  00716000
                     STARTIO resulted in the request being added to     00718000
                     the channel queue, this bit indicates that the SIO 00720000
                     instruction failed when the request was selected   00722000
                     for execution.                                     00724000
  Bit 11 PFAIL     - The request was aborted because of a system power  00726000
                     failure.                                           00728000
                                                                        00730000
                                                                        00732000
QSTAT - PCB number and request completion status.                       00734000
                                                                        00736000
  PCBN      - The Process Control Block (PCB) number of the process     00738000
              which made this request.  If zero, the request is not     00740000
              associated with any process and the IOQ element is to     00742000
              be returned by the system when the request has completed. 00744000
  RSTATUS   - General status indicating the final state of the request. 00746000
              The following codes are used:                             00748000
                                                                        00750000
                0 - Not started or awaiting completion.                 00752000
                1 - Successful completion.                              00754000
                2 - End-of-file detected.                               00756000
                3 - Unusual, but recoverable, condition detected.       00758000
                4 - Irrecoverable error has occurred.                   00760000
                                                                        00762000
  QUALIFIER - A code which further defines or qualifies the general     00764000
              status.  (See the section Driver Return Status Codes.)    00766000
                                                                        00768000
$PAGE                                                                   00770000
            Device Reference Table DRT                                  00772000
            --------------------------                                  00774000
                                                                        00776000
There is one DRT per device controller.  The the contents of this       00778000
table are used for processing interrupts.                               00780000
                                                                        00782000
     0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15   MNEMONIC          00784000
   +-----------------------------------------------+                    00786000
  0|      Channel Program Pointer (SIOP)           |   DRT0             00788000
   +-----------------------------------------------+                    00790000
  1|  Channel Program Variable Area pointer (CPVA) |   DRT1             00792000
   +-----------------------------------------------+                    00794000
  2|      Interrupt Handler Program Label          |   DRT2             00796000
   +--+--+--+--------------------------+--+--+--+--+                    00798000
  3|ST|SH|PF|      ( status )          |WS|GF|DT|WT|   DRT3             00800000
   +--+--+--+--------------------------+--+--+--+--+                    00802000
                                                                        00804000
 Channel Program Status:                                                00806000
                                                                        00808000
   Bit  0 - ST, Channel Program Status; 0 - halted, 1 - running         00810000
        1 - SH, SIOP or HIOP instruction pending                        00812000
        2 - PF, Power Fail recovery in progress                         00814000
       12 - WS, Waiting for device status request                       00816000
       13 - GF, GIC FIFO buffer not empty                               00818000
       14 - DT, DMA transfer active                                     00820000
       15 - WT, Channel Program in Wait state                           00822000
                                                                        00824000
                                                                        00826000
                                                                        00828000
                                                                        00830000
                                                                        00832000
                                                                        00834000
                                                                        00836000
                                                                        00838000
                                                                        00840000
                                                                        00842000
                  LOGGING CONSIDERATIONS                                00844000
                  ----------------------                                00846000
                                                                        00848000
 DMA and Channel Program Aborts log CPVA(0).                            00850000
                                                                        00852000
 Each type of SIO failure logs a different type of information.         00854000
 If the failure occurs in GIP, then a '%201' is logged.  If the         00856000
 failure occurs in START'HPIB, then a '%202' is logged.  If an          00858000
 error occurs in the driver itself, then a '%203' is logged.  If        00860000
 an illegal haltcode is found in the CPVA, then the haltcode is         00862000
 logged.                                                                00864000
                                                                        00866000
 Unit, Data, Timeout, and Parity Errors log Device Status.              00868000
                                                                        00870000
 In all cases, the error flags and counters are also logged.            00872000
$PAGE                                                                   00874000
    HP-IB CIPER Physical Driver Request Codes                           00876000
    -----------------------------------------                           00878000
                                                                        00880000
         OPERATION  FUNCTION  PARAMETERS                                00882000
         ---------  --------  ----------                                00884000
                                                                        00886000
          READ           0    None                                      00888000
                                                                        00890000
          WRITE          1    None                                      00892000
                                                                        00894000
          FILE OPEN      2    None                                      00896000
                                                                        00898000
          FILE CLOSE     3    None                                      00900000
                                                                        00902000
          DEVICE CLOSE   4    None                                      00904000
                                                                        00906000
          CIPER INIT   184    None                                      00908000
                                                                        00910000
                                                                        00912000
                                                                        00914000
                                                                        00916000
                                                                        00918000
                                                                        00920000
                HP-IB CIPER SECONDARY COMMANDS                          00922000
                ------------------------------                          00924000
                                                                        00926000
   Secondary    Mode           Definition         # bytes               00928000
   ---------    -----    ---------------------    -------               00930000
                                                                        00932000
    P1100001    Write    Request to Write            0                  00934000
    P1100010    Write    Enable Read                 0                  00936000
    P1100011    Write    Sequence Complete           0                  00938000
    P1100100    Write    Write Data               < 32768               00940000
  * P1101111    Write    Not Defined                 0                  00942000
    P1110001    Write    Clear CRC Remainder         0                  00944000
                                                                        00946000
    P1100011    Read     Sequence Abort              1                  00948000
    P1100100    Read     Read Data                < 32768               00950000
    P1110000    Read     Device Specified Jump       1                  00952000
    P1110001    Read     Read CRC Remainder          2                  00954000
                                                                        00956000
                                                                        00958000
                   Where P => odd parity                                00960000
                                                                        00962000
  * - This secondary is not defined for use by the CIPER                00964000
      protocol.  However, it is used by this driver to force            00966000
      the peripheral into the protocol error state.  This               00968000
      in turn causes the peripheral to respond affirmatively            00970000
      to a parallel poll.  This method of determining the               00972000
      presence of the peripheral is used during the Not Ready           00974000
      Wait state.                                                       00976000
$PAGE                                                                   00978000
                       DRIVER RETURN STATUS CODES                       00980000
                       --------------------------                       00982000
                                                                        00984000
                                                                        00986000
 General Status (13:3)       Qualifying Status (8:5)      Overall (8:8) 00988000
                                                                        00990000
 0 - Pending                1 - Waiting For Completion         %10      00992000
                            3 - Not Ready Wait                 %30      00994000
                                                                        00996000
 1 - Successful             0 - No Errors                       %1      00998000
                                                                        01000000
 2 - End of File            (Not Used)                                  01002000
                                                                        01004000
 3 - Unusual Condition      3 - Request Aborted                %33      01006000
                            6 - Powerfail Abort                %63      01008000
                          %21 - Device Powered Up             %213      01010000
                                                                        01012000
 4 - Irrecoverable Error    0 - Invalid Request                 %4      01014000
                            1 - Transfer Error                 %14      01016000
                            2 - I/O Timed Out Before Complete  %24      01018000
                            4 - SIO Failure                    %44      01020000
                            5 - Unit Failure                   %54      01022000
                          %12 - System Error                  %124      01024000
                          %14 - Channel Failure               %144      01026000
                          %21 - Parity Error                  %214      01028000
                                                                        01030000
                                                                        01032000
>>                                                                      01034000
$PAGE "TABLE PARAMETERS"                                                01036000
BEGIN                                                                   01038000
  EQUATE                                                                01040000
                                                                        01042000
       << DITP PARAMETERS >>                                            01044000
                                                                        01046000
    DCOUNTS   = 10,  << ERROR FLAGS AND COUNTERS >>                     01048000
    DILTP     =  5,  << INTERRUPT LINKAGE TABLE POINTER >>              01050000
    DLDEV     =  3,  << LOGICAL DEVICE AND UNIT NUMBERS >>              01052000
    DLOGCOUNT = 12,  << DIT HARDWARE LOGGED ERROR COUNTERS >>           01054000
    DLOGERROR = 11,  << DIT HARDWARE LOGGED ERROR STATUS >>             01056000
    DRQST     =  9,  << DRIVER REQUEST FLAGS >>                         01058000
    DSAVE     =  6,  << DRIVER FLAGS >>                                 01060000
    DSERR     =  7,  << DIT HARDWARE COUNT & INDEX >>                   01062000
    DTIME     =  8,  << TIME-OUT REQUEST ENTRY INDEX >>                 01064000
                                                                        01066000
       << IOQP PARAMETERS >>                                            01068000
                                                                        01070000
    QFLAG     =  0,  << REQUEST FLAGS >>                                01072000
    QFUNC     =  6,  << REQUEST FUNCTION CODE >>                        01074000
    QMISC     =  3,  << FLAGS PERTAINING TO THIS REQUEST >>             01076000
    QSTAT     = 10,  << REQUEST STATUS AND PCB NUMBER >>                01078000
    QWBCT     =  7,  << WORD/BYTE COUNT >>                              01080000
                                                                        01082000
$PAGE "CHANNEL PROGRAM VALUES"                                          01084000
       << CHANNEL PROGRAM ADDRESSES >>                                  01086000
                                                                        01088000
    ADDR1      =   3,  << ADDRESS CHANNEL TO TALK & DEVICE TO LISTEN >> 01090000
    ADDR2      =  25,  << ADDRESS CHANNEL TO TALK & DEVICE TO LISTEN >> 01092000
    ADDR3      =  32,  << ADDRESS CHANNEL TO TALK & DEVICE TO LISTEN >> 01094000
    BANKNO     =  12,  << BANK NUMBER ADDRESS >>                        01096000
    BUFAD      =  13,  << BUFFER ADDRESS ADDRESS >>                     01098000
    BYTCNT     =  10,  << READ / WRITE INSTRUCTION BYTE COUNT >>        01100000
    CMND1      =   4,  << REQUEST TO WRITE / ENABLE READ ADDRESS >>     01102000
    CMND2      =   9,  << READ / WRITE DATA ADDRESS >>                  01104000
    DSAVEADD   =  44,  << ADDRESS OF WORD 6 OF DIT >>                   01106000
    JMPREL     =   1,  << CHANNEL PROGRAM ENTRY JUMP ADDRESS >>         01108000
                                                                        01110000
    SIOBASE    =   2,  << ADDRESS OF 0 REL JUMP >>                      01112000
    SIODATA    =   2 - SIOBASE,                                         01114000
    SIONOTRDY  =  31 - SIOBASE,                                         01116000
    SIOABORT   =  38 - SIOBASE,                                         01118000
                                                                        01120000
       << CHANNEL PROGRAM INSTRUCTIONS >>                               01122000
                                                                        01124000
    REQ2WR     = %60477,  << REQUEST TO WRITE >>                        01126000
    ENABRD     = %61077,  << ENABLE READ >>                             01128000
    WRDATA     =  %2004,  << WRITE DATA >>                              01130000
    RDDATA     =  %1404,  << READ DATA >>                               01132000
    ADDCMD     = %57040,  << ADD CHANNEL TO TALK & DEVICE TO LISTEN >>  01134000
$PAGE "STATES AND STATUS"                                               01136000
       << COMPLETION STATUSES >>                                        01138000
                                                                        01140000
    CHANFAIL  = %144,  << I/O CHANNEL ERROR >>                          01142000
    DATAFAIL  =  %14,  << DATA TRANSFER ERROR >>                        01144000
    GOODIO    =    1,  << SUCCESSFUL I/O COMPLETION >>                  01146000
    INVALIDOP =    4,  << INVALID OPERATION REQUESTED >>                01148000
    PARITY    = %214,  << PARITY ERROR >>                               01150000
    PENDING   =  %10,  << WAITING FOR COMPLETION >>                     01152000
    PFABORT   =  %63,  << REQUEST ABORTED DUE TO POWER FAILURE >>       01154000
    SIOFAIL   =  %44,  << SIO FAILURE >>                                01156000
    SYSFAIL   = %124,  << SYSTEM FAILURE >>                             01158000
    TIMEOUT   =  %24,  << TIMED OUT ERROR >>                            01160000
    UNITFAIL  =  %54,  << UNIT FAILURE >>                               01162000
    USERABORT =  %33,  << REQUEST ABORTED >>                            01164000
                                                                        01166000
       << SIODM STATES >>                                               01168000
                                                                        01170000
    CALL'COMPLETOR =  3,  << MONITOR STATE = 3 >>                       01172000
    CALL'INITIATOR =  2,  << MONITOR STATE = 2 >>                       01174000
    INTRPTWAIT     =%13,  << WAIT FOR I/O COMPLETION >>                 01176000
    REQUESTDONE    =  5,  << REQUEST DONE >>                            01178000
                                                                        01180000
       << MISCELLANEOUS EQUATES >>                                      01182000
                                                                        01184000
    CIPER'INIT  =   184,  << CIPER INITIALIZE FUNCTION >>               01186000
    CLEAR       =     0,  << FLAG CLEAR VALUE >>                        01188000
    DCLOSE      =     4,  << DEVICE CLOSE FUNCTION >>                   01190000
    FCLOSE      =     3,  << FILE CLOSE FUNCTION >>                     01192000
    FOPEN       =     2,  << FILE OPEN FUNCTION >>                      01194000
    ICNTRL      =     7,  << ILT CONTROL INFORMATION >>                 01196000
    IOTIMER     =   %20,  << I/O TIMER PARAMETER >>                     01198000
    ISIOP       =     8,  << ILT CHANNEL PROGRAM AREA POINTER >>        01200000
    LOG2BYTES   =  [8/2,8/DLOGERROR],  << LOG DLOGERROR & DLOGCOUNT >>  01202000
    MAXNOTREDY  =     2,  << # OF NOT READY WAITS BEFORE ABORT >>       01204000
    MAXTIMEOUT  =     2,  << # OF TIMEOUT ERRORS BEFORE ABORT >>        01206000
    MAXUNITERR  =     2,  << # OF UNIT ERRORS BEFORE ABORT >>           01208000
    MAXDATAERR  =     2,  << # OF CRC ERRORS BEFORE ABORT >>            01210000
    NRDYMSG     =    11,  << NOT READY MESSAGE NUMBER >>                01212000
    READ        =     0,  << READ FILE FUNCTION >>                      01214000
    SET'        =     1,  << FLAG SET VALUE >>                          01216000
    SYSDB       = %1000,  << ADDRESS OF SYSDB AREA >>                   01218000
    SYSMSET     =     1,  << SYSTEM MESSAGE SET IN CATALOG >>           01220000
    WRITE       =     1,  << WRITE FILE FUNCTION >>                     01222000
  ENDEQ         =     0;                                                01224000
$PAGE "DEFINITIONS"                                                     01226000
                                                                        01228000
       << I/O STATUS BIT DEFINITIONS >>                                 01230000
                                                                        01232000
     DEFINE                                                             01234000
       DVRABFLAG      = DITPL(DSAVE).( 1:1)#,     << ABORT REQUEST >>   01236000
       NOTRDYFLAG     = DITPL(DSAVE).( 4:1)#,     << NOT READY FLAG >>  01238000
       NOTREDYCOUNT   = DITPL(DSAVE).( 5:3)#,     << NOT RDY COUNTER >> 01240000
       PARITYBIT      = DITPL(DSAVE).(14:1)#,     << PARITY ERROR BIT >>01242000
       PONBIT         = DITPL(DSAVE).(12:1)#,     << POWER UP/RESET >>  01244000
       POPPEDFLAG     = DITPL(DSAVE).( 3:1)#,     << SW TIMER POPPED >> 01246000
       PROTOBIT       = DITPL(DSAVE).(13:1)#,     << PROTOCOL ERROR >>  01248000
       RETRYFLAG      = DITPL(DSAVE).( 2:1)#,     << ERROR DETECTED >>  01250000
       VALIDSTATUS    = DITPL(DSAVE).( 0:1)#,     << STATUS UPDATED >>  01252000
                                                                        01254000
       << QFLAG BIT DEFINITIONS >>                                      01256000
                                                                        01258000
       ABORT      = IOQPL(QFLAG).( 0:1)#, << ABORT REQUEST >>           01260000
       DIAG       = IOQPL(QFLAG).( 2:1)#, << DIAGNOSTIC BIT >>          01262000
       PFAIL      = IOQPL(QFLAG).(11:1)#, << ABORT DUE TO PWR FAIL >>   01264000
       SFAIL      = IOQPL(QFLAG).(10:1)#, << DELAYED START SIO FAIL >>  01266000
                                                                        01268000
       << DCOUNTS FIELD DEFINITIONS >>                                  01270000
                                                                        01272000
       REQUESTFAILED  = DITPL(DCOUNTS).( 0:1)#,  << REQUEST FAILED >>   01274000
       UNITERRFLAG    = DITPL(DCOUNTS).( 1:1)#,  << UNIT ERROR >>       01276000
       DATAERRFLAG    = DITPL(DCOUNTS).( 2:1)#,  << DATA ERROR >>       01278000
       GICTOFLAG      = DITPL(DCOUNTS).( 3:1)#,  << GIC TIMEOUT >>      01280000
       UNITERRCOUNT   = DITP (DCOUNTS).( 4:3)#,  << UNIT ERROR >>       01282000
       DATAERRCOUNT   = DITP (DCOUNTS).( 7:3)#,  << DATA ERROR >>       01284000
       TIMEOUTCOUNT   = DITP (DCOUNTS).(10:3)#,  << GIC TIME OUT >>     01286000
       PARITYCOUNT    = DITP (DCOUNTS).(13:3)#,  << HP-IB PARITY >>     01288000
                                                                        01290000
       << MISCELLANEOUS DEFINITIONS >>                                  01292000
                                                                        01294000
       DEVADD     = (13:3)#,              << DEVICE ADDRESS ON HP-IB >> 01296000
       ERRORCODE  = CPVAP.( 0:3)#,        << HARDWARE ERROR CODE >>     01298000
       FUNC       = ( 8:8)#,              << FUNCTION CODE >>           01300000
       HALTCODE   = CPVAP(1).(4:12)#,     << CHANP HALT CODE >>         01302000
       IOSTAT     = IOQPL(QSTAT).( 8:8)#, << REQUEST STATUS RETURNED >> 01304000
       LDEV       = DITPL(DLDEV).( 8:8)#, << LOGICAL DEVICE # >>        01306000
       TIMEDOUT   = CPVAP.(13:1)#,        << XFER ABORTED-TIMED OUT >>  01308000
     ENDDEF       = 0#;                                                 01310000
$PAGE "DIT INITIALIZATION"                                              01312000
<<                                                                      01314000
        *********************************                               01316000
        *                               *                               01318000
        *   DRIVER DB AREA DEFINITION   *                               01320000
        *                               *                               01322000
        *********************************                               01324000
>>                                                                      01326000
                                                                        01328000
        ARRAY INITIAL(0:142) = DB :=                                    01330000
        [8/13,8/1],   << DIT SIZE, NOT CORE RESIDENT >>                 01332000
                      << NO IDLE CHANNEL PROGRAM, DRIVER TYPE >>        01334000
                 0,   << NOT USED >>                                    01336000
                 0,   << UNIT EXTRACT INSTRUCTION - NOT USED >>         01338000
        [8/24,8/0],   << CHANNEL PROGRAM SIZE/2 >>                      01340000
                                                                        01342000
        << DIT >>                                                       01344000
                 0,   << DFLAG >>                                       01346000
                 0,   << DLINK >>                                       01348000
                 0,   << DIOQP >>                                       01350000
           %040000,   << DLDEV - HPIB DEVICE >>                         01352000
                 0,   << DDLTP >>                                       01354000
                 0,   << DILTP >>                                       01356000
                 0,   << DSAVE >>                                       01358000
                 0,   << DSERR >>                                       01360000
                 0,   << DTIME >>                                       01362000
                 0,   << DRQST >>                                       01364000
                 0,   << DCOUNTS >>                                     01366000
                 0,   << DLOGERROR >>                                   01368000
                 0,   << DLOGCOUNT >>                                   01370000
                                                                        01372000
$PAGE "CHANNEL PROGRAM"                                                 01374000
<<*******************************************************************>> 01376000
<<*******************************************************************>> 01378000
<<                                                                   >> 01380000
<<                         CHANNEL PROGRAM                           >> 01382000
<<                                                                   >> 01384000
<<*******************************************************************>> 01386000
<<*******************************************************************>> 01388000
<< 0>>  << JUMP >>              0,  << BRANCH POINT TO CP SECTION >>    01390000
<< 1>>                          0,  << +0:R/W  29:NOT RDY  36:SEQ AB >> 01392000
                                                                        01394000
<< 2>>  << CMD HP-IB >>     %6404,                                      01396000
<< 3>>                     %57040,  << CHAN TALK; DEV LISTEN >>         01398000
<< 4>>                          0,  << REQ TO WRT/ENAB RD; UNLISTEN >>  01400000
<< 5>>                          0,                                      01402000
<< 6>>                          0,                                      01404000
                                                                        01406000
<< 7>>  << WAIT >>          %1100,  << INCLUDES CRC INITIALIZE >>       01408000
<< 8>>                          0,                                      01410000
                                                                        01412000
<< 9>>  << READ/WRITE >>        0,  << READ/WRITE DATA >>               01414000
<<10>>                          0,  << BYTE COUNT >>                    01416000
<<11>>                          0,                                      01418000
<<12>>                          0,  << FLAGS & BANK NUMBER >>           01420000
<<13>>                          0,  << ADDRESS >>                       01422000
                                                                        01424000
<<14>>  << DSJ >>           %2401,  << CHECK PERIPHERAL'S RESPONSE >>   01426000
<<15>>                          0,  << RETURN BYTE >>                   01428000
<<16>>                          4,  << AFFIRMATIVE RESPONSE >>          01430000
<<17>>                          0,  << NEGATIVE RESPONSE >>             01432000
                                                                        01434000
<<*******************************************************************>> 01436000
<<                                                                   >> 01438000
<<           NEGATIVE AND ILLEGAL DSJ RESPONSE HANDLING              >> 01440000
<<                                                                   >> 01442000
<<*******************************************************************>> 01444000
<<18>>  << CRC COMPARE >>  %10601,  << CHECK THE CRC REMAINDERS >>      01446000
<<19>>                      %7774,  << HALT CODE = 3 >>                 01448000
                                                                        01450000
<<20>>  << INTERRUPT HALT >> %601,  << NEGATIVE OR ILLEGAL DSJ >>       01452000
<<21>>                          2,                                      01454000
                                                                        01456000
<<*******************************************************************>> 01458000
<<                                                                   >> 01460000
<<                 CONTINUE WITH GOOD DSJ RESPONSE                   >> 01462000
<<                                                                   >> 01464000
<<*******************************************************************>> 01466000
<<22>>  << CRC COMPARE >>  %10601,  << CHECK THE CRC REMAINDERS >>      01468000
<<23>>                      %7774,  << HALT CODE = 3 >>                 01470000
                                                                        01472000
<<24>>  << CMD HP-IB >>     %6404,                                      01474000
<<25>>                     %57040,  << CHAN TALK; DEV LISTEN >>         01476000
<<26>>                     %61477,  << SEQUENCE COMPLETE; UNLISTEN >>   01478000
<<27>>                          0,                                      01480000
<<28>>                          0,                                      01482000
                                                                        01484000
<<29>>  << INTERRUPT HALT >> %601,  << TRANSMISSION SUCCESSFUL >>       01486000
<<30>>                          1,                                      01488000
                                                                        01490000
<<*******************************************************************>> 01492000
<<                                                                   >> 01494000
<<                          NOT READY WAIT                           >> 01496000
<<                                                                   >> 01498000
<<*******************************************************************>> 01500000
<<31>>  << CMD HP-IB >>     %6404,                                      01502000
<<32>>                     %57040,  << CHAN TALK; DEV LISTEN >>         01504000
<<33>>                     %67477,  << ILLEGAL SECONDARY; UNLISTEN >>   01506000
<<34>>                          0,                                      01508000
<<35>>                          0,                                      01510000
                                                                        01512000
<<36>>  << WAIT >>          %1000,  << WAIT FOR PERIPHERAL TO WAKE UP >>01514000
<<37>>                          0,                                      01516000
                                                                        01518000
<<*******************************************************************>> 01520000
<<                                                                   >> 01522000
<<                          SEQUENCE ABORT                           >> 01524000
<<                                                                   >> 01526000
<<*******************************************************************>> 01528000
<<38>>  << INIT CRC >>     %10000,  << CLEAR CRC REMAINDERS >>          01530000
<<39>>                          0,                                      01532000
                                                                        01534000
<<40>>  << READ DATA >>     %1403,  << SEQUENCE ABORT >>                01536000
<<41>>                          1,  << 1 BYTE >>                        01538000
<<42>>                          0,                                      01540000
<<43>>                     %42000,  << RIGHT BYTE; NON-UPDATE >>        01542000
<<44>>                          0,  << ADD OF WORD 6 OF DIT >>          01544000
                                                                        01546000
<<45>>  << JUMP >>              0,  << CONTINUE EXECUTION WITH >>       01548000
<<46>>                        -25;  << CRC COMPARE INSTRUCTION >>       01550000
$PAGE "EXTERNAL PROCEDURES"                                             01552000
<<                                                                      01554000
         ***************************************                        01556000
         *                                     *                        01558000
         *   EXTERNAL PROCEDURE DECLARATIONS   *                        01560000
         *                                     *                        01562000
         ***************************************                        01564000
>>                                                                      01566000
                                                                        01568000
   PROCEDURE ABORTTIMEREQ(TRLX);                                        01570000
     VALUE TRLX;                                                        01572000
     INTEGER TRLX;                                                      01574000
     OPTION EXTERNAL;                                                   01576000
                                                                        01578000
   PROCEDURE GIP'HPIB;                                                  01580000
     OPTION EXTERNAL;                                                   01582000
                                                                        01584000
   LOGICAL PROCEDURE IOMESSAGE(SETNO,MSGNO,MASK,P1,P2,P3,P4,P5,         01586000
                               DEST,REPLY,OFFSET,DITP,IOTYPE);          01588000
     VALUE SETNO,MSGNO,MASK,P1,P2,P3,P4,P5,DEST,REPLY,OFFSET,IOTYPE;    01590000
     INTEGER SETNO,MSGNO,MASK,P1,P2,P3,P4,P5,DEST,REPLY,OFFSET,IOTYPE;  01592000
     INTEGER POINTER DITP;                                              01594000
     OPTION EXTERNAL, VARIABLE;                                         01596000
                                                                        01598000
   PROCEDURE LOGERROR(DITP,IOQP,ERRSTAT);                               01600000
      VALUE DITP,IOQP,ERRSTAT;                                          01602000
      INTEGER POINTER DITP,IOQP;                                        01604000
      INTEGER ERRSTAT;                                                  01606000
      OPTION EXTERNAL;                                                  01608000
                                                                        01610000
   PROCEDURE MASTERCLEARHPIB(DITP);                                     01612000
     INTEGER ARRAY DITP;                                                01614000
     OPTION EXTERNAL;                                                   01616000
                                                                        01618000
   PROCEDURE SIODM(DITP,FLAGS);                                         01620000
     VALUE DITP,FLAGS;                                                  01622000
     LOGICAL FLAGS;                                                     01624000
     POINTER DITP;                                                      01626000
     OPTION EXTERNAL;                                                   01628000
                                                                        01630000
   PROCEDURE START'HPIB(DITP,SIOP,QFLAG);                               01632000
     VALUE DITP,SIOP,QFLAG;                                             01634000
     LOGICAL QFLAG;                                                     01636000
     POINTER DITP,SIOP;                                                 01638000
     OPTION EXTERNAL;                                                   01640000
                                                                        01642000
   INTEGER PROCEDURE TIMEREQ(CODE,REQ,TIME);                            01644000
     VALUE CODE,REQ,TIME;                                               01646000
     INTEGER CODE,REQ;                                                  01648000
     DOUBLE TIME;                                                       01650000
     OPTION EXTERNAL;                                                   01652000
$PAGE "DRIVER INITIALIZATION"                                           01654000
<<        ******************************************                    01656000
          *                                        *                    01658000
          *   DRIVER INITIALIZATION PROCEDURE      *                    01660000
          *                                        *                    01662000
          ******************************************                    01664000
>>                                                                      01666000
                                                                        01668000
                                                                        01670000
   PROCEDURE CPINIT(DITP);                                              01672000
     INTEGER ARRAY DITP;                                                01674000
                                                                        01676000
<<---------------------------------------------------->>                01678000
<<                                                    >>                01680000
<<   THIS PROCEDURE INITIALIZES THE RESTRICTED MODE   >>                01682000
<<   ADDRESSES AND THE STATUS BUFFER ADDRESSES IN     >>                01684000
<<   THE CHANNEL PROGRAM.                             >>                01686000
<<                                                    >>                01688000
<<---------------------------------------------------->>                01690000
                                                                        01692000
     BEGIN                                                              01694000
       INTEGER POINTER ILTP   = Q+1;                                    01696000
       INTEGER POINTER SIOP   = Q+2;                                    01698000
                                                                        01700000
       TOS := DITP(DILTP);      << ILTP    >>                           01702000
       TOS := ILTP(ISIOP);      << SIOP    >>                           01704000
                                                                        01706000
       SIOP(ADDR1) := SIOP(ADDR2) := SIOP(ADDR3) :=                     01708000
             ADDCMD + ILTP(ICNTRL).DEVADD;     << CHAN TLK; DEV LST >>  01710000
       SIOP(DSAVEADD) := @DITP + SYSDB + DSAVE;<< KEEP STATUS IN DIT >> 01712000
                                                                        01714000
     END;                                                               01716000
$PAGE "CIPER DRIVER"                                                    01718000
<<    ******************************************************            01720000
      *                                                    *            01722000
      *   CIPER HP-IB PHYSICAL DRIVER PROCEDURE - CPDRVR   *            01724000
      *                                                    *            01726000
      ******************************************************            01728000
>>                                                                      01730000
                                                                        01732000
   INTEGER PROCEDURE CPDRVR(IOQP,DITP,BANK,BUFFADDR,SIOP,DRTN);         01734000
                                                                        01736000
<<--------------------------------------------------------->>           01738000
<<                                                         >>           01740000
<<   THIS PROCEDURE INITIATES AND COMPLETES I/O REQUESTS   >>           01742000
<<   FOR THE DEVICE CONNECTED TO THE CIPER HP-IB PHYSICAL  >>           01744000
<<   DRIVER.                                               >>           01746000
<<                                                         >>           01748000
<<   MODE RETURNS IN CPDRVR -                              >>           01750000
<<     5 - REQUEST COMPLETED                               >>           01752000
<<   %13 - WAIT FOR COMPLETION                             >>           01754000
<<                                                         >>           01756000
<<--------------------------------------------------------->>           01758000
                                                                        01760000
   VALUE DITP,IOQP,BANK,BUFFADDR,SIOP,DRTN;                             01762000
   INTEGER BANK,BUFFADDR,DRTN;                                          01764000
   INTEGER POINTER DITP,IOQP,SIOP;                                      01766000
   OPTION PRIVILEGED,UNCALLABLE;                                        01768000
                                                                        01770000
   BEGIN                                                                01772000
     LOGICAL ARRAY                                                      01774000
       IOQPL(*)   = IOQP,                                               01776000
       DITPL(*)   = DITP;                                               01778000
                                                                        01780000
     INTEGER POINTER                                                    01782000
       CPVAP      = Q+1;   << HOLDS CHANNEL I/O STATUS >>               01784000
                                                                        01786000
     INTEGER                                                            01788000
       FCODE      = Q+2,   << FUNCTION CODE >>                          01790000
       COUNT      = Q+3,   << BUFFER BYTE COUNT >>                      01792000
       MSTATE     = CPDRVR;<< MONITOR STATE RETURN >>                   01794000
$PAGE "INTERNAL PROCEDURES"                                             01796000
<<                                                                      01798000
         ***************************************                        01800000
         *                                     *                        01802000
         *   INTERNAL PROCEDURE DECLARATIONS   *                        01804000
         *                                     *                        01806000
         ***************************************                        01808000
>>                                                                      01810000
                                                                        01812000
   SUBROUTINE LOGSTATUS;                                                01814000
                                                                        01816000
   << CALLED TO LOG DEVICE STATUS AND ERROR COUNTS >>                   01818000
                                                                        01820000
     BEGIN                                                              01822000
       DITP(DLOGERROR) := DITP(DSAVE);                                  01824000
       DITP(DLOGCOUNT) := DITP(DCOUNTS);                                01826000
       LOGERROR(DITP,IOQP,LOG2BYTES);                                   01828000
     END;                                                               01830000
$PAGE "INITIATOR AND CONTINUATOR COMMON AREA"                           01832000
<<---------------------------------------------------->>                01834000
<<                                                    >>                01836000
<<   INITIALIZE LOCAL POINTERS AND VARIABLES          >>                01838000
<<                                                    >>                01840000
<<---------------------------------------------------->>                01842000
                                                                        01844000
     TOS := DITP(DILTP);       << CPVAP >>                              01846000
     TOS := IOQP(QFUNC).FUNC;  << FCODE >>                              01848000
     TOS := IOQP(QWBCT);       << COUNT >>                              01850000
     IF <                      << CHANGE TO POSITIVE BYTE CNT >>        01852000
        THEN TOS := - TOS                                               01854000
        ELSE TOS := TOS&LSL(1);                                         01856000
                                                                        01858000
     IF MSTATE = CALL'INITIATOR THEN                                    01860000
       BEGIN                   << THIS IS AN INITIATOR CALL >>          01862000
         DITP(DCOUNTS) :=                                               01864000
         DITP(DSAVE) := 0;     << CLEAR FLAGS & COUNTS >>               01866000
         IF @IOQP=0 THEN                                                01868000
           BEGIN               << NOTHING TO DO >>                      01870000
             TOS := GOODIO;                                             01872000
             GOTO IODONE;                                               01874000
           END;                                                         01876000
       END;                                                             01878000
                                                                        01880000
     IF MSTATE = CALL'COMPLETOR THEN                                    01882000
       ABORTTIMEREQ(DITP(DRQST)); << ABORT TIMER >>                     01884000
                                                                        01886000
     << CHECK FOR POWER FAIL OR ABORT REQUEST >>                        01888000
                                                                        01890000
  RETRY:                                                                01892000
     IF ABORT THEN             << ABORT REQUEST >>                      01894000
       IF PFAIL THEN           << POWER FAIL ABORT >>                   01896000
         BEGIN                                                          01898000
           MASTERCLEARHPIB(DITP);                                       01900000
           TOS := PFABORT;                                              01902000
           GOTO ERROREXIT;                                              01904000
         END                                                            01906000
       ELSE                    << USER ABORT >>                         01908000
         IF DVRABFLAG THEN     << SEQ ABORT ALREADY IN PROGRESS >>      01910000
           BEGIN                                                        01912000
             TOS := USERABORT;                                          01914000
             GOTO ERROREXIT;                                            01916000
           END                                                          01918000
         ELSE                  << NEED TO START SEQ ABORT >>            01920000
           BEGIN                                                        01922000
             MASTERCLEARHPIB(DITP);                                     01924000
             DITP(DSAVE) := 0; << CLEAR FLAGS >>                        01926000
             DVRABFLAG := SET';                                         01928000
             GOTO SEQABORT;                                             01930000
           END;                                                         01932000
                                                                        01934000
     IF MSTATE = CALL'COMPLETOR THEN                                    01936000
       GOTO CPCONT;            << COMPLETION INTERRUPT >>               01938000
                                                                        01940000
$PAGE "DRIVER INITIATOR"                                                01942000
<<****************************************************>>                01944000
<<                                                    >>                01946000
<<                INITIALIZATION SECTION              >>                01948000
<<                                                    >>                01950000
<<****************************************************>>                01952000
                                                                        01954000
  << SET UP READ/WRITE CP VARIABLES >>                                  01956000
                                                                        01958000
     SIOP(JMPREL) := SIODATA;  << CP JUMP TO READ/WRITE >>              01960000
     SIOP(BYTCNT) := COUNT;                                             01962000
     SIOP(BANKNO) := BANK;                                              01964000
     SIOP(BUFAD)  := BUFFADDR;                                          01966000
                                                                        01968000
                                                                        01970000
                                                                        01972000
                                                                        01974000
                                                                        01976000
<<---------------------------------------------------->>                01978000
<<                                                    >>                01980000
<<   FILE READ [FUNCTION = 0]                         >>                01982000
<<                                                    >>                01984000
<<---------------------------------------------------->>                01986000
                                                                        01988000
     IF FCODE = READ THEN                                               01990000
       BEGIN                     << READ PROCESSING >>                  01992000
         IF COUNT < 1 THEN                                              01994000
           GOTO REQDONE;         << NO DATA TO XFER >>                  01996000
         SIOP(CMND1) := ENABRD;  << ENABLE READ     >>                  01998000
         SIOP(CMND2) := RDDATA;  << READ DATA SEC   >>                  02000000
         GOTO STARTCP;                                                  02002000
       END                       << READ PROCESSING >>                  02004000
                                                                        02006000
                                                                        02008000
                                                                        02010000
                                                                        02012000
                                                                        02014000
                                                                        02016000
<<---------------------------------------------------->>                02018000
<<                                                    >>                02020000
<<   FILE WRITE [FUNCTION = 1]                        >>                02022000
<<                                                    >>                02024000
<<---------------------------------------------------->>                02026000
                                                                        02028000
     ELSE IF FCODE = WRITE THEN                                         02030000
       BEGIN                     << WRITE PROCESSING >>                 02032000
         IF COUNT < 1 THEN                                              02034000
           GOTO REQDONE;         << NO DATA TO XFER >>                  02036000
         SIOP(CMND1) := REQ2WR;  << REQUEST TO WRITE >>                 02038000
         SIOP(CMND2) := WRDATA;  << WRITE DATA SEC   >>                 02040000
         GOTO STARTCP;                                                  02042000
       END                       << WRITE PROCESSING >>                 02044000
                                                                        02046000
$PAGE                                                                   02048000
<<---------------------------------------------------->>                02050000
<<                                                    >>                02052000
<<   FILE OPEN    [FUNCTION = 2]                      >>                02054000
<<   FILE CLOSE   [FUNCTION = 3]                      >>                02056000
<<   DEVICE CLOSE [FUNCTION = 4]                      >>                02058000
<<                                                    >>                02060000
<<---------------------------------------------------->>                02062000
                                                                        02064000
     ELSE IF (FCODE = FOPEN)                                            02066000
          OR (FCODE = FCLOSE)                                           02068000
          OR (FCODE = DCLOSE) THEN                                      02070000
            BEGIN                                                       02072000
              COUNT := 0;      << NO DATA XFERRED >>                    02074000
              GOTO REQDONE     << GOOD COMPLETION >>                    02076000
            END                                                         02078000
                                                                        02080000
                                                                        02082000
                                                                        02084000
                                                                        02086000
                                                                        02088000
<<---------------------------------------------------->>                02090000
<<                                                    >>                02092000
<<   CIPER INITIALIZE [FUNCTION = 184]                >>                02094000
<<                                                    >>                02096000
<<---------------------------------------------------->>                02098000
                                                                        02100000
     ELSE IF FCODE = CIPER'INIT THEN                                    02102000
       BEGIN                                                            02104000
         IF COUNT < 6 THEN GOTO INVALIDFUNC;                            02106000
                                                                        02108000
<<  RETURN 3 WORDS:  LEVEL2 HEADER SIZE (0)           >>                02110000
<<                   LEVEL 2 TRAILER SIZE (0)         >>                02112000
<<                   MAX PACKET SIZE (0 OR NO LIMIT)  >>                02114000
                                                                        02116000
         TOS := BANK;                                                   02118000
         TOS := BUFFADDR;                                               02120000
         ASSEMBLE (DDUP,       << DUPLICATE ADDRESS >>                  02122000
                   ZERO;       << LEVEL 2 HEADER SIZE >>                02124000
                   SSEA;                                                02126000
                   INCA,       << INCR BUFFADDR >>                      02128000
                   DZRO;       << LEVEL 2 TRAILER SIZE >>               02130000
                   SDEA);      << MAXIMUM PACKET SIZE >>                02132000
         COUNT := 6;           << 6 BYTES XFERRED >>                    02134000
         GOTO REQDONE          << GOOD COMPLETION >>                    02136000
       END                                                              02138000
                                                                        02140000
                                                                        02142000
                                                                        02144000
                                                                        02146000
                                                                        02148000
<<---------------------------------------------------->>                02150000
<<                                                    >>                02152000
<<   ALL OTHER FUNCTIONS                              >>                02154000
<<                                                    >>                02156000
<<---------------------------------------------------->>                02158000
                                                                        02160000
     ELSE GOTO INVALIDFUNC;                                             02162000
$PAGE "SET UP AND START CHANNEL PROGRAM"                                02164000
<<---------------------------------------------------->>                02166000
<<                                                    >>                02168000
<<   START CHANNEL PROGRAM                            >>                02170000
<<                                                    >>                02172000
<<---------------------------------------------------->>                02174000
                                                                        02176000
  STARTCP:                                                              02178000
     CPVAP(0) := 0;                << CLEAR CHANNEL STATUS WORDS >>     02180000
     CPVAP(1) := 0;                                                     02182000
     CPVAP(2) := 0;                                                     02184000
     CPVAP(3) := 0;                                                     02186000
                                                                        02188000
     START'HPIB(DITP,SIOP,TRUE);   << START CHANNEL PROGRAM >>          02190000
     IF < THEN                                                          02192000
       BEGIN                       << SIO FAILURE >>                    02194000
         TOS := %201;                                                   02196000
         GOTO SIOERROR;                                                 02198000
       END;                                                             02200000
                                                                        02202000
     DITP(DTIME) := 0;             << CLEAR TIMER FLAG >>               02204000
     DITP(DRQST) := TIMEREQ(IOTIMER,@DITP,10000D); << 10 SEC >>         02206000
                                                                        02208000
     IOSTAT := PENDING;                                                 02210000
     MSTATE := INTRPTWAIT;                                              02212000
     RETURN;                                                            02214000
                                                                        02216000
$PAGE "DRIVER CONTINUATOR"                                              02218000
<<****************************************************>>                02220000
<<                                                    >>                02222000
<<                CONTINUATOR SECTION                 >>                02224000
<<                                                    >>                02226000
<<****************************************************>>                02228000
                                                                        02230000
  CPCONT:                                                               02232000
     IF ERRORCODE = 6 THEN           << DMA ABORT >>                    02234000
       GOTO CHANERROR;                                                  02236000
                                                                        02238000
     IF ERRORCODE = 7 THEN           << CHANNEL ABORT >>                02240000
       IF TIMEDOUT <> 1 THEN                                            02242000
         GOTO CHANERROR              << NOT GIC TIMEOUT >>              02244000
                                                                        02246000
       ELSE                                                             02248000
         BEGIN                       << GIC TIMEOUT >>                  02250000
           TIMEOUTCOUNT := TIMEOUTCOUNT + 1;                            02252000
           IF NOT GICTOFLAG THEN                                        02254000
             BEGIN                   << LAST ERROR NOT GIC TO >>        02256000
               GICTOFLAG := SET';                                       02258000
               IF RETRYFLAG AND (TIMEOUTCOUNT > MAXTIMEOUT) THEN        02260000
                 GOTO TIMEOUTERROR   << TIMED OUT DURING FINAL RETRY >> 02262000
               ELSE GOTO ERRORETRY;                                     02264000
             END                                                        02266000
                                                                        02268000
           ELSE                                                         02270000
             BEGIN                   << TWO GIC TO'S IN A ROW >>        02272000
               IF NOT IOMESSAGE(SYSMSET,NRDYMSG,%10000,LDEV,,,,,) THEN  02274000
                 GOTO SYSERR;                                           02276000
               NOTREDYCOUNT := NOTREDYCOUNT + 1;                        02278000
               IF NOTREDYCOUNT > MAXNOTREDY THEN                        02280000
                 GOTO TIMEOUTERROR;  << TOO MANY NOT READY WAITS >>     02282000
               POPPEDFLAG := CLEAR;  << IN CASE THERE WAS ONE >>        02284000
               GICTOFLAG := CLEAR;   << RESET GIC TO INFO >>            02286000
               TIMEOUTCOUNT := 0;                                       02288000
               GOTO NOTRDYWAIT;                                         02290000
             END;                                                       02292000
         END;                                                           02294000
                                                                        02296000
     IF SFAIL THEN                                                      02298000
       BEGIN                         << FAILURE ON DELAYED START I/O >> 02300000
         TOS := %202;                                                   02302000
         GOTO SIOERROR;                                                 02304000
       END;                                                             02306000
                                                                        02308000
     DITP(DTIME).(0:1) := 0;         << SET CC ON TIMER >>              02310000
     IF <> THEN                                                         02312000
       BEGIN                         << TIMER POPPED >>                 02314000
         MASTERCLEARHPIB(DITP);      << ABORT CHANNEL PROGRAM >>        02316000
         IF NOTRDYFLAG THEN                                             02318000
           GOTO NOTRDYWAIT;          << KEEP WAITING >>                 02320000
         POPPEDFLAG := SET';                                            02322000
         GOTO ERRORETRY;                                                02324000
       END;                                                             02326000
$PAGE                                                                   02328000
     IF HALTCODE = 1 THEN            << NORMAL COMPLETION >>            02330000
       GOTO CPENDEDAOK                                                  02332000
                                                                        02334000
     ELSE IF HALTCODE = 2 THEN       << NEGATIVE OR ILLEGAL DSJ >>      02336000
       BEGIN                                                            02338000
         UNITERRFLAG := SET';                                           02340000
         UNITERRCOUNT := UNITERRCOUNT + 1;                              02342000
         GOTO ERRORETRY;                                                02344000
       END                                                              02346000
                                                                        02348000
     ELSE IF HALTCODE = 3 THEN                                          02350000
       BEGIN                         << BAD CRC >>                      02352000
         DATAERRFLAG := SET';                                           02354000
         DATAERRCOUNT := DATAERRCOUNT + 1;                              02356000
         IF RETRYFLAG AND (DATAERRCOUNT > MAXDATAERR) THEN              02358000
           GOTO DATAERROR            << DATA ERROR DURING FINAL RETRY >>02360000
         ELSE GOTO ERRORETRY;                                           02362000
       END                                                              02364000
                                                                        02366000
     ELSE                                                               02368000
       BEGIN                         << ILLEGAL CPVA CODE >>            02370000
         TOS := HALTCODE;                                               02372000
         GOTO SIOERROR;                                                 02374000
       END;                                                             02376000
$PAGE "HANDLE SEQUENCE ABORT RETRIES"                                   02378000
  CPENDEDAOK:                                                           02380000
     IF NOT RETRYFLAG THEN                                              02382000
       BEGIN                         << SUCCESSFUL COMPLETION >>        02384000
         COUNT := COUNT - SIOP(BYTCNT);  << # BYTES XFERRED >>          02386000
         GOTO REQDONE;                                                  02388000
       END                                                              02390000
                                                                        02392000
     ELSE                            << STATUS JUST READ >>             02394000
       BEGIN                                                            02396000
         RETRYFLAG := CLEAR;                                            02398000
         VALIDSTATUS := SET';        << VALIDATE STATUS >>              02400000
                                                                        02402000
         IF UNITERRFLAG THEN                                            02404000
           IF UNITERRCOUNT > MAXUNITERR THEN                            02406000
             GOTO UNITERROR          << TOO MANY UNIT ERRORS >>         02408000
           ELSE IF NOT PONBIT THEN                                      02410000
             LOGSTATUS;              << ONLY LOG IF NOT PWR UP/RESET >> 02412000
                                                                        02414000
         IF DATAERRFLAG THEN                                            02416000
           IF DATAERRCOUNT > MAXDATAERR THEN                            02418000
             GOTO DATAERROR          << TOO MANY DATA ERRORS >>         02420000
           ELSE IF NOT PONBIT THEN                                      02422000
             LOGSTATUS;              << ONLY LOG IF NOT PWR UP/RESET >> 02424000
                                                                        02426000
         IF GICTOFLAG THEN           << GIC TIMED OUT >>                02428000
           BEGIN                                                        02430000
             IF PARITYBIT THEN       << CAUSED BY HP-IB PARITY ERR >>   02432000
               PARITYCOUNT := PARITYCOUNT + 1;                          02434000
             IF TIMEOUTCOUNT > MAXTIMEOUT THEN                          02436000
               GOTO TIMEOUTERROR     << TOO MANY TIME OUTS >>           02438000
             ELSE LOGSTATUS;         << LOG ERROR STATUS >>             02440000
           END;                                                         02442000
                                                                        02444000
         IF POPPEDFLAG THEN          << SOFTWARE TIMER POPPED >>        02446000
           IF PROTOBIT THEN                                             02448000
             LOGSTATUS;              << ONLY LOG PROTOCOL ERRORS >>     02450000
                                                                        02452000
         IF UNITERRFLAG OR DATAERRFLAG OR GICTOFLAG                     02454000
               OR POPPEDFLAG OR NOTRDYFLAG THEN                         02456000
                                                                        02458000
           BEGIN                     << WE'RE HERE FOR A REASON >>      02460000
             VALIDSTATUS := CLEAR;   << CLEAR FLAGS >>                  02462000
             UNITERRFLAG := CLEAR;                                      02464000
             DATAERRFLAG := CLEAR;                                      02466000
             GICTOFLAG   := CLEAR;                                      02468000
             POPPEDFLAG  := CLEAR;                                      02470000
             NOTRDYFLAG  := CLEAR;                                      02472000
             MSTATE := CALL'INITIATOR;  << CHANGE STATE FOR RETRY >>    02474000
             GOTO RETRY;                                                02476000
           END                                                          02478000
                                                                        02480000
         ELSE                                                           02482000
           BEGIN                     << SHOULD NEVER OCCUR >>           02484000
             TOS := %203;                                               02486000
             GOTO SIOERROR;                                             02488000
           END;                                                         02490000
       END;                                                             02492000
$PAGE "DRIVER EXITS"                                                    02494000
  CHANERROR:                      << CHANNEL FAILURE >>                 02496000
     DITP(DSERR) := LOG2BYTES;                                          02498000
     DITP(DLOGERROR) := CPVAP;    << LOG ERROR CODES >>                 02500000
     DITP(DLOGCOUNT) := DITP(DCOUNTS);                                  02502000
     TOS := CHANFAIL;                                                   02504000
     GOTO ERROREXIT;                                                    02506000
                                                                        02508000
  DATAERROR:                      << CRC REMAINDERS DISAGREED >>        02510000
     TOS := DATAFAIL;                                                   02512000
     GOTO STDLOGGING;                                                   02514000
                                                                        02516000
  INVALIDFUNC:                    << ILLEGAL FUNCTION CODE >>           02518000
     TOS := INVALIDOP;                                                  02520000
     GOTO ERROREXIT;                                                    02522000
                                                                        02524000
  SIOERROR:                       << SIO FAILURE >>                     02526000
     DITP(DSERR) := LOG2BYTES;                                          02528000
     DITP(DLOGERROR) := TOS;      << VALUE LOGGED DEPENDS ON CALLER >>  02530000
     DITP(DLOGCOUNT) := DITP(DCOUNTS);                                  02532000
     TOS := SIOFAIL;                                                    02534000
     GOTO ERROREXIT;                                                    02536000
                                                                        02538000
  SYSERR:                         << SYSTEM ERROR >>                    02540000
     TOS := SYSFAIL;                                                    02542000
     GOTO ERROREXIT;                                                    02544000
                                                                        02546000
  TIMEOUTERROR:                   << GIC HARDWARE TIME OUT >>           02548000
     IF PARITYCOUNT > 0 THEN                                            02550000
       TOS := PARITY              << TIME OUTS CAUSED BY PARITY >>      02552000
     ELSE                                                               02554000
       TOS := TIMEOUT;                                                  02556000
     GOTO STDLOGGING;                                                   02558000
                                                                        02560000
  UNITERROR:                      << NEGATIVE / ILLEGAL DSJ RESPONSES >>02562000
     TOS := UNITFAIL;                                                   02564000
                                                                        02566000
  STDLOGGING:                                                           02568000
     REQUESTFAILED := SET';       << INDICATE REQUEST ABORTED >>        02570000
     DITP(DSERR) := LOG2BYTES;                                          02572000
     DITP(DLOGERROR) := DITP(DSAVE);  << LOG DEVICE STATUS & COUNTS >>  02574000
     DITP(DLOGCOUNT) := DITP(DCOUNTS);                                  02576000
                                                                        02578000
  ERROREXIT:                                                            02580000
     IOQP(QWBCT) := 0;            << INDICATE NO DATA XFERRED >>        02582000
     GOTO IODONE;                                                       02584000
                                                                        02586000
  REQDONE:                                                              02588000
     IF IOQP(QWBCT) < 0           << CONVERT TO ORIGINAL FORMAT >>      02590000
        THEN IOQP(QWBCT) := -COUNT                                      02592000
        ELSE IOQP(QWBCT) := (COUNT + 1)&LSR(1);                         02594000
     TOS := GOODIO;                                                     02596000
                                                                        02598000
  IODONE:                                                               02600000
     IOSTAT := TOS;               << STORE RETURN STATUS >>             02602000
     MSTATE := REQUESTDONE;                                             02604000
     RETURN;                                                            02606000
$PAGE "NOT READY WAIT & SEQUENCE ABORT"                                 02608000
<<---------------------------------------------------->>                02610000
<<                                                    >>                02612000
<<               NOT READY WAIT                       >>                02614000
<<                                                    >>                02616000
<<---------------------------------------------------->>                02618000
                                                                        02620000
  NOTRDYWAIT:                                                           02622000
     NOTRDYFLAG := SET';          << NOTE NOT READY WAIT >>             02624000
     RETRYFLAG := SET';           << ALSO DO RETRY >>                   02626000
     SIOP(JMPREL) := SIONOTRDY;   << NOT READY CP ENTRY >>              02628000
     GOTO STARTCP;                                                      02630000
                                                                        02632000
<<---------------------------------------------------->>                02634000
<<                                                    >>                02636000
<<               SEQUENCE ABORT                       >>                02638000
<<                                                    >>                02640000
<<---------------------------------------------------->>                02642000
                                                                        02644000
  ERRORETRY:                                                            02646000
     RETRYFLAG := SET';           << NOTE RETRY IN EFFECT >>            02648000
                                                                        02650000
  SEQABORT:                                                             02652000
     SIOP(JMPREL) := SIOABORT;    << SEQUENCE ABORT CP ENTRY >>         02654000
     GOTO STARTCP;                                                      02656000
$PAGE "TABLES"                                                          02658000
END;                                                                    02660000
$PAGE "MAP"                                                             02662000
   ASSEMBLE(                                                            02664000
     PCAL SIODM;     << MONITOR >>                                      02666000
     PCAL CPDRVR;    << INITIATOR >>                                    02668000
     PCAL CPDRVR;    << CONTINUATOR >>                                  02670000
     CON  0;         << NO IO PROCESS >>                                02672000
     PCAL CPINIT;    << INITIALIZATION >>                               02674000
     CON  1;         << ONE INTERRUPT HANDLER >>                        02676000
     PCAL GIP'HPIB); << INTERRUPT HANDLER >>                            02678000
   END.                                                                 02680000
