Google
 

Trailing-Edge - PDP-10 Archives - 6.1_emacs_manuals_1er - 2-diagnostics/dfcia.seq
There are no other files named dfcia.seq in the archive.
;DFCIA
                                                                                                                           SEQ 0001





                                IDENTIFICATION
                                --------------

        PRODUCT CODE:           AH-E???A-DD

        DIAGNOSTIC CODE:        DFCIA

        PRODUCT NAME:           DFCIAA0 CI Functional Diagnostic

        VERSION:                0.1

        DATE RELEASED:          December 31, 1983

        MAINTAINED BY:          Peripherals/CPS Engineering

        AUTHOR:                 Richard Stockdale



                        COPYRIGHT (C) 1983

                DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

        THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR  USE  ONLY  ON  A
        SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE INCLUSION
        OF THE ABOVE COPYRIGHT NOTICE.   THIS  SOFTWARE,  OR  ANY  OTHER
        COPIES  THEREOF, MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE
        TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO
        AGREES  TO  THESE  LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE
        SOFTWARE  SHALL  AT  ALL  TIMES  REMAIN  IN  DIGITAL   EQUIPMENT
        CORPORATION.

        THE INFORMATION IN THIS DOCUMENT IS SUBJECT  TO  CHANGE  WITHOUT
        NOTICE  AND  SHOULD  NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
        EQUIPMENT CORPORATION.

        DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY  FOR THE
        USE OR RELIABILITY OF  ITS  SOFTWARE  IN  EQUIPMENT WHICH IS NOT
        SUPPLIED BY DIGITAL EQUIPMENT CORPORATION.
MAINDEC-10-DFCIA-A-D                                             Page ii
Table of Contents                                                                                                          SEQ 0002


                           Table of Contents
                                                                    Page
                                                                    ----

        1.0     PROGRAM ABSTRACT . . . . . . . . . . . . . . . . . . 1

        2.0     REQUIREMENTS . . . . . . . . . . . . . . . . . . . . 2
        2.1       Hardware Requirements  . . . . . . . . . . . . . . 2
        2.1.1       KL10 Microcode Requirements  . . . . . . . . . . 2
        2.1.2       Memory Requirements  . . . . . . . . . . . . . . 2
        2.1.3       Load Device  . . . . . . . . . . . . . . . . . . 2
        2.2       Software Requirements  . . . . . . . . . . . . . . 2
        2.3       Diagnostic Prerequisites . . . . . . . . . . . . . 3

        3.0     PROGRAM LOADING PROCEDURE  . . . . . . . . . . . . . 4

        4.0     PROGRAM STARTING PROCEDURE . . . . . . . . . . . . . 5
        4.1       Starting the Diagnostic  . . . . . . . . . . . . . 5
        4.2       Initial Program Switches . . . . . . . . . . . . . 5
        4.3       Startup Procedure  . . . . . . . . . . . . . . . . 5
        4.4       Optional Restart Address . . . . . . . . . . . . . 6

        5.0     PROGRAM STOPPING PROCEDURE . . . . . . . . . . . . . 7

        6.0     PROGRAM OPERATING PROCEDURE  . . . . . . . . . . . . 8
        6.1       Overview . . . . . . . . . . . . . . . . . . . . . 8
        6.2       Hardware Configuration . . . . . . . . . . . . . . 8
        6.2.1       Configuration Modification . . . . . . . . . . . 8
        6.3       CI Configuration . . . . . . . . . . . . . . . . . 8
        6.4       Choosing Run Time Options  . . . . . . . . . . . . 9
        6.5       Modes of Diagnostic Operation  . . . . . . . . . . 9
        6.6       Scope Looping  . . . . . . . . . . . . . . . . . . 9
        6.7       General User Interface Philosophy  . . . . . . .  10
        6.7.1       User Interface . . . . . . . . . . . . . . . .  10
        6.8       Terminal Input . . . . . . . . . . . . . . . . .  10
        6.8.1       General  . . . . . . . . . . . . . . . . . . .  10
        6.8.2       Control-C Capability (Ctrl-C)  . . . . . . . .  10
        6.8.3       Control-O Capability (Ctrl-O)  . . . . . . . .  11
        6.8.4       Control-Q Capability (Ctrl-Q)  . . . . . . . .  11
        6.8.5       Control-S Capability (Ctrl-S)  . . . . . . . .  11
        6.8.6       Control-T Capability (Ctrl-T)  . . . . . . . .  11
        6.8.7       Control-U Capability (Ctrl-U)  . . . . . . . .  11
        6.8.8       Control-Z Capability (Ctrl-Z)  . . . . . . . .  11
        6.8.9       Question Mark (?)  . . . . . . . . . . . . . .  12
        6.8.10      Altmode (ESC)  . . . . . . . . . . . . . . . .  12
        6.9       Terminal Output  . . . . . . . . . . . . . . . .  12
        6.9.1       Statistics Printouts . . . . . . . . . . . . .  12

        7.0     PROGRAM OPTIONS (SWITCHES) . . . . . . . . . . . .  14
        7.1       Left Hand Switches . . . . . . . . . . . . . . .  14
        7.1.1       Left Hand Switches (Brief Description) . . . .  15
        7.1.2       Left Hand Switches (Detailed Description)  . .  16
        7.2       Right Hand Switches  . . . . . . . . . . . . . .  19
        7.2.1       Right Hand Switches (Brief Description)  . . .  19
        7.2.2       Right Hand Switches (Detailed Description) . .  20
MAINDEC-10-DFCIA-A-D                                          Page iii
Table of Contents                                                                                                          SEQ 0003


        8.0     ERRORS . . . . . . . . . . . . . . . . . . . . . .  23
        8.1       User Input Errors at the Terminal  . . . . . . .  23
        8.2       Error Reporting of Hardware Detected Errors  . .  23
        8.2.1       Reporting to SPEAR . . . . . . . . . . . . . .  23
        8.2.2       Error Printouts  . . . . . . . . . . . . . . .  24
        8.3       Unexpected Errors  . . . . . . . . . . . . . . .  27

        9.0     PROGRAM DESCRIPTION  . . . . . . . . . . . . . . .  28
        9.1       Program Overview . . . . . . . . . . . . . . . .  28
        9.1.1       Program Purpose  . . . . . . . . . . . . . . .  28
        9.1.2       Testing Strategy . . . . . . . . . . . . . . .  28
        9.2       Run-Time Dynamics  . . . . . . . . . . . . . . .  28
        9.2.1       Memory Allocation Requirements . . . . . . . .  28
        9.2.2       Operating System Interactions  . . . . . . . .  28
        9.2.2.1       TOPS-10  . . . . . . . . . . . . . . . . . .  29
        9.2.2.2       TOPS-20  . . . . . . . . . . . . . . . . . .  29
        9.2.3       User Mode Restrictions . . . . . . . . . . . .  29
        9.2.3.1       User Mode Privileges . . . . . . . . . . . .  29
        9.2.3.2       User Mode Priority Interrupts  . . . . . . .  29
        9.3       Exec Mode Capability . . . . . . . . . . . . . .  29
        9.4       User Mode Capability . . . . . . . . . . . . . .  29
        9.5       Fault Detection  . . . . . . . . . . . . . . . .  30
        9.5.1       Error Resolution . . . . . . . . . . . . . . .  30
        9.5.2       Fault Detection And Isolation  . . . . . . . .  30
        9.5.3       Fault Detection  . . . . . . . . . . . . . . .  30
        9.6       Performance During Hardware Failures . . . . . .  30
        9.6.1       CPU/Memory Failures  . . . . . . . . . . . . .  30
        9.6.2       Power Fail/Restart . . . . . . . . . . . . . .  30
        9.6.3       Port Failure . . . . . . . . . . . . . . . . .  31
        9.6.4       Unexpected Traps . . . . . . . . . . . . . . .  31
        9.7       Program Applications . . . . . . . . . . . . . .  31
        9.7.1       Users and Uses . . . . . . . . . . . . . . . .  31
        9.7.2       Engineering Usage  . . . . . . . . . . . . . .  31
        9.7.3       Manufacturing Usage  . . . . . . . . . . . . .  31
        9.7.4       Customer Services Usage  . . . . . . . . . . .  31
        9.7.5       Customer Usage . . . . . . . . . . . . . . . .  32
        9.8       Test Design  . . . . . . . . . . . . . . . . . .  32
        9.8.1       Type of Tests  . . . . . . . . . . . . . . . .  32
        9.8.2       Test Flow  . . . . . . . . . . . . . . . . . .  33
        9.8.2.1       Starting the Test  . . . . . . . . . . . . .  33
        9.8.2.2       Stopping the Test  . . . . . . . . . . . . .  34
        9.8.2.3       Obtaining Run Time Status (Control-T)  . . .  34
        9.8.2.4       Obtaining Run Time Status (S or Control-S) .  34

        10.0    TEST DESCRIPTIONS  . . . . . . . . . . . . . . . .  35
        10.1      Test Description Assumptions . . . . . . . . . .  35
        10.2      Test Description Overview  . . . . . . . . . . .  35
        10.3      Program Option Selections  . . . . . . . . . . .  36
        10.3.1      Basic Description  . . . . . . . . . . . . . .  36
        10.3.2      Commands Available . . . . . . . . . . . . . .  36
        10.3.3      Detailed Command Description . . . . . . . . .  37
        10.3.3.1      Hardware Tests . . . . . . . . . . . . . . .  37
        10.3.3.2      General Commands . . . . . . . . . . . . . .  38
        10.3.3.3      Test Control Commands  . . . . . . . . . . .  39
        10.3.3.4      Statistics Commands  . . . . . . . . . . . .  40
        10.3.3.5      CI Configuration Commands  . . . . . . . . .  41
MAINDEC-10-DFCIA-A-D                                           Page iv
Table of Contents                                                                                                          SEQ 0004


        10.3.3.6      Switches . . . . . . . . . . . . . . . . . .  41
        10.4      Hardware Tests . . . . . . . . . . . . . . . . .  43
        10.4.1      Hardware Tests - EBUS/MPROC/CBUS modules . . .  43
        10.4.2      Functional Tests - Packet Buffer/Link modules   43
        10.4.2.1      Register Tests . . . . . . . . . . . . . . .  43
        10.4.2.2      Transmit/Receive Buffer Tests  . . . . . . .  43
        10.4.2.3      Node Address Test  . . . . . . . . . . . . .  43
        10.4.2.4      Link Tests . . . . . . . . . . . . . . . . .  44
        10.4.2.5      CRC Tests  . . . . . . . . . . . . . . . . .  44
        10.4.2.6      Packet Tests . . . . . . . . . . . . . . . .  44
        10.5      Debug Test . . . . . . . . . . . . . . . . . . .  45
        10.5.1      Basic Description  . . . . . . . . . . . . . .  45
        10.5.2      Commands Available . . . . . . . . . . . . . .  45
        10.5.3      Detailed Command Description . . . . . . . . .  48
        10.5.3.1      General Commands . . . . . . . . . . . . . .  49
        10.5.3.2      Starting, Stopping, Initializing the Port  .  53
        10.5.3.3      Handling port registers  . . . . . . . . . .  55
        10.5.3.4      Handling port CRAM locations . . . . . . . .  57
        10.5.3.5      2901 Commands  . . . . . . . . . . . . . . .  59
        10.5.3.6      Local Storage Commands . . . . . . . . . . .  60
        10.5.3.7      Mark Bit Commands  . . . . . . . . . . . . .  61
        10.5.3.8      Breakpoint Commands  . . . . . . . . . . . .  62
        10.5.3.9      Microcode Commands . . . . . . . . . . . . .  63
        10.5.3.10     Statistics Commands  . . . . . . . . . . . .  65
        10.5.3.11     CI Configuration Commands  . . . . . . . . .  65
        10.5.3.12     CI Commands  . . . . . . . . . . . . . . . .  65
        10.5.3.13     PLI Register Commands  . . . . . . . . . . .  68
        10.5.3.14     Miscellaneous Commands . . . . . . . . . . .  70
        10.5.3.15     Data Transfer Commands . . . . . . . . . . .  73
        10.5.3.16     Switches . . . . . . . . . . . . . . . . . .  73

        11.0    PROGRAM RUN TIME . . . . . . . . . . . . . . . . .  75

        12.0    APPENDIX . . . . . . . . . . . . . . . . . . . . .  76
        12.1      Special Configurations . . . . . . . . . . . . .  76
        12.1.1      DMT Configuration  . . . . . . . . . . . . . .  76
        12.1.2      Creating the Modified Diagnostics  . . . . . .  76
        12.1.3      Modifying the System . . . . . . . . . . . . .  77
        12.1.4      Other configurations . . . . . . . . . . . . .  78
MAINDEC-10-DFCIA-A-D                                              Page 1
PROGRAM ABSTRACT                                                                                                           SEQ 0005


1.0  PROGRAM ABSTRACT

       DFCIA  is  a  functional  diagnostic  intended  to   verify   the
    functionality of a CI20 port consisting of an 3 Port modules, Packet
    Buffer module,  Link  module,  CI  cables,  and  Star  Coupler.   It
    attempts  to  isolate  faults  to  one  of  three items - (1) 3 Port
    modules, (2) Packet Buffer module, and (3) Link module  +  cables  +
    Star Coupler.

       DFCIA tests the CI port consisting of three port modules residing
    in  RH20  slot  #7  and  a  Packet  Buffer  module and a Link module
    residing in a separate card cage.

       DFCIA consists of two major program sections:

     o  Test section - Contains all of the hardware tests.  This section
        is  used to functionally verify the port or to isolate an actual
        problem.

     o  Debug section - Allows detailed manipulation  or  inspection  of
        the port.
MAINDEC-10-DFCIA-A-D                                              Page 2
REQUIREMENTS                                                                                                               SEQ 0006


2.0  REQUIREMENTS

    2.1  Hardware Requirements

       Hardware requirements consist of:

     o  A KL10, Model B, with at least 80K of memory.

     o  An IPA20-L Port in RH slot #7.

     o  Card cage installed,  with  a  Packet  Buffer  and  Link  module
        inserted  and  a  PLI interface cable connecting the CBUS module
        with the Packet Buffer module.

     o  A load device.




    2.1.1  KL10 Microcode Requirements

       The IPA20-L requires special functionality of the KL10 microcode.
    Therefore, Version 312 or above must be loaded both in user and exec
    mode.



    2.1.2  Memory Requirements

       The diagnostic requires 80K of memory of any type.  Memory may be
    configured  in  any manner, i.e., internal, external, interleaved in
    any rational manner.  The diagnostic's performance is  not  affected
    by  memory  and  cache  options other than in overall diagnostic run
    time.



    2.1.3  Load Device

       The diagnostic loads from  any  standard  load  device.   Program
    loading  is  a  function  of  the  standard  diagnostic  loaders and
    monitors, i.e., DIAMON, D20MON, MAGMON, KLDCP, etc.



    2.2  Software Requirements

       Software requirements consist of:

     o  In exec mode the diagnostic may  be  loaded  by  KLDCP,  DIAMON,
        D20MON,  or MAGMON.  The Subroutine Package must be loaded prior
        to running the diagnostic.

     o  In user mode, TOPS-20, Release 6.0 or above is required.
MAINDEC-10-DFCIA-A-D                                              Page 3
REQUIREMENTS                                                                                                               SEQ 0007


    2.3  Diagnostic Prerequisites

       The diagnostic should only be run after it has been verified that
    the  system  has  no  solid hardware problems of a nature that would
    render the diagnostic unable to run.  This should be  determined  by
    first running the following diagnostic programs:

     o  CPU and Memory Diagnostics

     o  E-Bus Diagnostics

     o  C-Bus Diagnostics

     o  MAINDEC-10-DFRHB - RH20 Fault Isolator Diagnostic.

     o  MAINDEC-10-DFPTA - IPA20-L Basic Device Diagnostic.
MAINDEC-10-DFCIA-A-D                                              Page 4
PROGRAM LOADING PROCEDURE                                                                                                  SEQ 0008


3.0  PROGRAM LOADING PROCEDURE

       The diagnostic must be loaded via a  diagnostic  loader  program.
    Refer  to  loader  documentation  for  instructions  on  loading and
    operating the loader program.  The diagnostic may be run as a single
    program or may be chained with other programs using the loader chain
    feature.

       Additionally, in exec mode under KLDCP,  the  diagnostic  may  be
    loaded without using a diagnostic loader program by telling KLDCP to
    load the diagnostic.  This has the advantage of being  simpler,  but
    has  the  disadvantage  of inhibiting file handling operations which
    then prevents use of the TAKE command, and  loading  of  operational
    microcode by the diagnostic.
MAINDEC-10-DFCIA-A-D                                              Page 5
PROGRAM STARTING PROCEDURE                                                                                                 SEQ 0009


4.0  PROGRAM STARTING PROCEDURE

    4.1  Starting the Diagnostic

       The diagnostic is started  in  the  same  manner  as  most  other
    diagnostics.  The diagnostic loader program is run, then the name of
    the diagnostic, DFCIA, is specified.   The  loader  then  loads  and
    starts the diagnostic.

       If the diagnostic is already loaded, it may be restarted by a STD
    or STM in exec mode, or a START or CONTINUE in user mode.



    4.2  Initial Program Switches

       In exec mode, right hand switches may be selected  using  the  SW
    command  as  documented  in  the KL10 Maintanance Guide under KLDCP.
    Left hand switches may be selected on the PDP 11 switch  panel.   If
    the  switches  are  0,  the diagnostic runs 5 passes of all hardware
    tests then exits.  To allow the user to select which test(s) to run,
    the left hand switch 'OPRSEL' should be set.

       In user mode, switches will be queried when the diagnostic starts
    up.   At  this  point,  OPRSEL  switch  can  be  set,  and any other
    switches.

       In both exec and user mode, switch settings may be altered  after
    the diagnostic has been started.



    4.3  Startup Procedure

       When the diagnostic is started, the diagnostic name  and  version
    number will be printed, followed by a memory map of the system.

       If OPRSEL switch is not  set,  the  diagnostic  will  immediately
    begin  testing  the  CI port.  If this switch is set, the diagnostic
    will ask what test to execute.

       For example (OPRSEL switch not set):

    |  D20MON CMD -
    |
    |  DFCIA CI Port Functional Diagnostic
    |  VERSION 0.1, SV=0.15, TOPS-20, KL10, CPU#=2263
    |  
    |  SWITCHES = 020010 002000 
    |  
    |  MEMORY MAP =
    |  FROM     TO         SIZE/K
    |  00000000 00215777     71
    |  
    |  End pass 1. at 3m 48s 
    |
MAINDEC-10-DFCIA-A-D                                              Page 6
PROGRAM STARTING PROCEDURE                                                                                                 SEQ 0010


    |  End pass 2. at 7m 32s 
    |
    |  End pass 3. at 11m 20s 
    |
    |  End pass 4. at 15m 8s 
    |
    |  End pass 5. at 18m 56s
    |
    |  D20MON CMD -


       For example (OPRSEL switch set):

    |  D20MON CMD -
    |
    |  DFCIA CI Port Functional Diagnostic
    |  VERSION 0.1, SV=0.15, TOPS-20, KL10, CPU#=2263
    |  
    |  SWITCHES = 020010 002000 
    |  
    |  MEMORY MAP =
    |  FROM     TO         SIZE/K
    |  00000000 00215777     71
    |  
    |  Type ? for help
    |  
    |  What test - 


       The diagnostic asks what test to run.  Any test may be  selected,
    or ?  or HELP typed to find out what tests are available.

       At the end of a test the diagnostic  continues  at  the  question
    'What test -'.  The next test is selected and run and so on.



    4.4  Optional Restart Address

       Under TOPS-20 the diagnostic can be restarted via  the  'REENTER'
    command.   The  program switches are queried, then either testing is
    begun immediately (if OPRSEL switch is not set) or 'What Test - ' is
    asked (if OPRSEL switch is set).

       Startup is identical to what occurs if  the  'START'  command  is
    given, except for the DIAMON asking 'DIAMON CMD - '.
MAINDEC-10-DFCIA-A-D                                              Page 7
PROGRAM STOPPING PROCEDURE                                                                                                 SEQ 0011


5.0  PROGRAM STOPPING PROCEDURE

       Several methods may be used to stop the diagnostic:


     o  Altmode.

     o  Control-C.

     o  ABORT switch.

     o  RSTART switch.


       A test can be aborted at any time by typing  an  altmode  on  the
    terminal.   When an altmode is typed, the diagnostic is restarted at
    the test selection routine.  At this point, if OPRSEL switch is set,
    the  diagnostic asks what test to run next.  If OPRSEL switch is not
    set the diagnostic runs all tests over again.

       Control-C may be typed at any time to stop  the  diagnostic.   To
    restart,  a  'START',  'CONTINUE', or 'REENTER' may be typed in user
    mode.  In exec mode a 'STD', 'ST', 'STM', or 'RN' may be used.

       In exec mode, the ABORT switch may  be  set,  so  the  diagnostic
    halts at end of pass.

       In exec mode, the RSTART switch may  be  set.   This  causes  the
    diagnostic  to  be  restarted,  and  if  OPRSEL  switch  is set, the
    diagnostic will have effectively stopped and  will  be  waiting  for
    selection of what test to run.
MAINDEC-10-DFCIA-A-D                                              Page 8
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0012


6.0  PROGRAM OPERATING PROCEDURE

    6.1  Overview

       The diagnostic is designed to perform functional level testing of
    the CI port.

       Essentially, the diagnostic consists of a series of  tests  which
    test  each of the modules.  Several of these are in the form of KL10
    based tests using CONO, CONI, DATAO, and DATAI's.  The remainder are
    microcode routines which are loaded into the port CRAM and executed.



    6.2  Hardware Configuration

       When the diagnostic starts up  it  assumes  that  a  CI  port  is
    located  in  RH20 slot #7.  It will attempt to select the port (this
    always succeeds in exec mode, but may  fail  in  user  mode  if  the
    system does not give the port to the diagnostic when requested).



    6.2.1  Configuration Modification

       The configuration of a CI port in RH20 slot #7 cannot be  changed
    via  program  commands.   However,  a memory location in the program
    which contains the controller number can be changed  to  indicate  a
    different  port  in the unlikely event that the CI port was actually
    in RH20 slot #5.  This location is called 'MBCN' and can be  changed
    as follows:

    What test - DDT

    Type RTN$X to continue
    DDT

    MBCN/ 57400,,0   56400,,0 <CR>
    RTN$X

    What test - 




    6.3  CI Configuration

       The diagnostic  can  be  directed  to  determine  and  print  the
    configuration  of  nodes  on  the  CI  bus.   This  is done with the
    'CONFIG' command which is identical to running TST61  'REQID  Test'.
    It  loads  operational microcode if necessary, then sends Request-ID
    packets to all possible nodes.  A configuration table is  built  and
    the configuration is then printed.  For example:
MAINDEC-10-DFCIA-A-D                                              Page 9
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0013



    |  What test - CONFIG
    |  
    |  ***** CI Configuration *****
    |   Port   Port       Dual  Maint  Port
    |  Number  Type       Path  State  State
    |  ------  ---------  ----  -----  -------
    |     1    KL10-Self  Yes   No     Initialized
    |     5    HSC-50     Yes   No     Initialized


       This can be used to determine, on a superficial basis, what nodes
    are  down  relative  to  their  ability  to  respond to a Request-ID
    packet.  It can also be used when debugging, to find out  what  port
    to send packets to and so forth.



    6.4  Choosing Run Time Options

       Before starting a test, the diagnostic may ask how many times  to
    execute  test  selected.   If  the  OPRSEL  switch  is  not set this
    question is not asked.  No other run  time  options  are  available,
    aside  from  program switch options which are fully described in the
    Section 7.0 'Program Options (Switches)'.



    6.5  Modes of Diagnostic Operation

       The diagnostic runs in  either  user  mode  or  exec  mode.   The
    operation  of the diagnostic is almost identical in either case with
    the exception of the handling of  console  switches,  and  speed  of
    operation.   The  diagnostic  runs  faster  in exec mode for obvious
    reasons.  Also, the PI system  is  not  used  in  user  mode.   This
    affects the ease of using breakpoints when debugging microcode.

       In  addition,  the  diagnostic  runs   with   or   without   user
    interaction.   This  is  determined  by the console switch 'OPRSEL'.
    More  details  may  be  found  in  Section  7.0   'Program   Options
    (Switches)'.



    6.6  Scope Looping

       Scope looping is not supported by the diagnostic.   However,  one
    can loop on a test, using the right hand switch 'LOOPTS'.
MAINDEC-10-DFCIA-A-D                                             Page 10
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0014


    6.7  General User Interface Philosophy

       Decimal numbers are  always  followed  by  a  point.   All  other
    numbers are octal.

       All input is preceded with a prompt.  All input  is  checked  for
    legality  and  incorrect responses are followed by a reprompt and/or
    an additional error message.  All numerical input can  be  specified
    as an octal number.  Some numerical input may be alternatively given
    as a decimal number followed by a  decimal  point.   Where  the  the
    diagnostic   allows  multiple  input  options,  a  help  message  is
    available to explain the options.   The  diagnostic  requests  three
    types of input - numerical, yes or no, and sixbit.

       Additionally, the user may obtain  a  short  description  of  the
    input  expected at any point by typing a question mark followed by a
    carriage return.  The text is printed and the question re-asked.



    6.7.1  User Interface

       The user interface to the  diagnostic  is  dialogue  through  the
    terminal.   In  exec  mode  the  console switches on the KL are used
    directly in  addition  to  software  switches.   In  user  mode  the
    software   switches   are   used   as   standard   procedure.    All
    user/diagnostic dialogue is done through the  diagnostic  subroutine
    package.



    6.8  Terminal Input

    6.8.1  General

       Terminal input is handled by the Subroutine Package.  It does not
    have  COMND  JSYS style input.  However, some control characters are
    supported.  And the diagnostic supports ?  and help  commands  where
    appropriate to facilitate input.



    6.8.2  Control-C Capability (Ctrl-C)

       Control-C is used to halt diagnostic execution.   In  exec  mode,
    control  is returned to KLDCP at the ">." prompt.  In user mode, the
    user is returned to monitor level.

       When ready to continue, the user  may  restart  or  continue  the
    diagnostic  in any manner listed previously in Section 5.0, 'Program
    Stopping Procedure'.  This would be by  saying  'CONTINUE'  in  user
    mode or 'RN' in exec mode.
MAINDEC-10-DFCIA-A-D                                             Page 11
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0015


    6.8.3  Control-O Capability (Ctrl-O)

       Control-O inhibits terminal output.  Terminal output resumes when
    the  diagnostic  prints  some  forced  output or when the user types
    another Control-O.



    6.8.4  Control-Q Capability (Ctrl-Q)

       In exec mode Control-Q is treated as an illegal character by  the
    diagnostic  and  typing  it  in response to a question results in an
    error message.

       In user mode Control-Q allows terminal output which may have been
    inhibited  by a prior Control-S.  This character may be typed at any
    time with no other effect than resuming terminal output.



    6.8.5  Control-S Capability (Ctrl-S)

       In exec mode, Control-S is treated as an illegal character by the
    diagnostic  and  typing  it  in response to a question results in an
    error message.  It may also be typed followed by a  carriage  return
    in order to obtain run-time status of the diagnostic.

       In user mode, it is used as a terminal output  control  character
    along with Control-Q, and has no other function.



    6.8.6  Control-T Capability (Ctrl-T)

       Control-T is treated as an illegal character  by  the  diagnostic
    and  typing it in response to a question results in an error message
    in exec mode.  Under TOPS-20, Control-T gives  the  current  program
    status and does not interfere with program input.



    6.8.7  Control-U Capability (Ctrl-U)

       Control-U is used to delete whatever has been  typed  so  far  in
    response  to  a question.  After typing Control-U, the desired input
    can be entered.



    6.8.8  Control-Z Capability (Ctrl-Z)

       Control-Z is used to exit from DDT, to either KLDCP in exec  mode
    or to monitor level in user mode.
MAINDEC-10-DFCIA-A-D                                             Page 12
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0016


    6.8.9  Question Mark (?)

       Question mark may be typed in  response  to  any  question.   The
    diagnostic  prints  a short help message and reprompts the user.  If
    the diagnostic is asking for a test name  or  a  debug  command,  it
    prints a list of all valid commands that may be typed.

       If a question mark is typed after a legal command,  the  expected
    format of the command is given, showing possible arguments.



    6.8.10  Altmode (ESC)

       Altmode is normally used to abort a test or a sequence  of  test.
    If  it is given in response to a question, the diagnostic aborts the
    task which is under way.  For example, in DEBUG test, if the user is
    altering  a  CRAM  location and types altmode in the middle of that,
    the diagnostic aborts the operation and returns to  'DEBUG>'  prompt
    without writing the location.



    6.9  Terminal Output

       The terminal output generated by the diagnostic consists of:


     o  Program initialization information

     o  Program questions/messages

     o  Test error messages

     o  Statistics printouts


       Much  of  this  output  can  be  affected  by  program  switches,
    specifically, NOPNT, PNTLPT, TXTINH, and INHMSG.



    6.9.1  Statistics Printouts

       Statistics are kept on CI traffic originating from or received at
    this  node.   They are not printed out by the program automatically.
    To obtain a printout, the  'OPRSEL'  switch  must  be  set  and  the
    command 'STATIS' given explicitly.

       Statistics may be useful when running a  debugger  test  such  as
    'WATCH'  over  a  long period of time.  One can obtain data from the
    statistics such as which CI path has the highest  occurrence  of  no
    responses or other failures.
MAINDEC-10-DFCIA-A-D                                             Page 13
PROGRAM OPERATING PROCEDURE                                                                                                SEQ 0017


    A sample printout follows:

    |  What test - STAT
    |  
    |  *** STATISTICS - Packets Sent (1m 59s) ***
    |  
    |          Packets   Bytes    -Response Path A--   -Response Path B--    Resp
    |   Type     Sent     Sent    ACK    NAK   NoRsp   ACK    NAK   NoRsp   Errors
    |   ----     ----     ----    ---    ---   -----   ---    ---   -----   ------
    |  Int PB      100     5000     47      0      0     53      0      0        0
    |  Int Lnk      50     2500     25      0      0     25      0      0        0
    |  Ext Lnk      50     2500     25      0      0     25      0      0        0
    |  Req ID      256     5120      3      0    253      0      0      0        0
    |  Reg R/W       1       20      1      0      0      0      0      0        0
    |  Other         1       20      0      0      1      0      0      0        0
    |  
    |  *** STATISTICS - Packets Received Path A (1m 59s) ***
    |  
    |          Packets   Bytes   Recv   Packets    Bytes
    |   Type     Rcvd     Recv  Errors  In Error  In Error
    |   ----     ----     ----  ------  --------  --------
    |  Int PB        47     2350      0       0       0
    |  Int Lnk       25     1250      0       0       0
    |  Ext Lnk       25     1250      0       0       0
    |  Req ID         3       84      0       0       0
    |  Reg R/W        1       20      0
    |  Other          1       20      0
    |  
    |  *** STATISTICS - Packets Received Path B (1m 59s) ***
    |  
    |          Packets   Bytes   Recv   Packets    Bytes
    |   Type     Rcvd     Recv  Errors  In Error  In Error
    |   ----     ----     ----  ------  --------  --------
    |  Int PB        53     2650      0       0       0
    |  Int Lnk       25     1250      0       0       0
    |  Ext Lnk       25     1250      0       0       0
MAINDEC-10-DFCIA-A-D                                             Page 14
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0018


7.0  PROGRAM OPTIONS (SWITCHES)

       Program options are controlled by switches.  Left  hand  switches
    are  predefined  but  not  all  are  used.   Most  of the right hand
    switches are defined specific to the diagnostic.



    7.1  Left Hand Switches

       In exec mode, left hand switches  are  modified  either  via  the
    front  end  console switches or by using the KLDCP command ESW.  See
    KLDCP documentation for details on  the  use  of  the  ESW  command.
    Typically,   these  switches  are  modified  by  using  the  console
    switches.

       In user mode, left hand switches are queried when the  diagnostic
    starts.   After  that,  if the OPRSEL switch is set, switches may be
    changed using the SWITCH command.  The diagnostic will ask  for  the
    switches  in the same manner as occurred at start up.  Also the name
    of the switch can be typed as a command.  This turns the  switch  on
    or off depending on its state.

       For example:

    |  What test - TXTINH
    |
    |  [TXTINH On]
    |
    |  What test - TXTINH
    |
    |  [TXTINH On]
    |
    |  What test - SWPRIN
    |
    |  Switches:  000210 000000   TXTINH OPRSEL
    |
    |  What test - TXTINH
    |
    |  [TXTINH Off]
    |
    |  What test - SWITCH
    |
    |  Print the selectable pgm switches? (Y or N) - N
    |
    |  Switches = 000010 000000 
    |
    |  10  LH Switches <# or ?> - 210
    |
    |  0  RH Switches <# or ?> - 0
    |
    |  SWITCHES = 020210 000000 
    |
    |  What test - SWPRIN
    |
    |  Switches:  000210 000000   TXTINH OPRSEL 
MAINDEC-10-DFCIA-A-D                                             Page 15
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0019






    7.1.1  Left Hand Switches (Brief Description)


      Switch       Symbol  State   Function Description
      ------       ------  -----   --------------------

    0 (400000)     ABORT      0    No function.
                              1    Abort at end of pass.

    1 (200000)     RSTART     0    No function.
                              1    Restart diagnostic.
                                   
    2 (100000)     TOTALS     0    No function.
                              1    No function.

    3 (040000)     NOPNT      0    Normal typeout.
                              1    Inhibit all printing except forced.

    4 (020000)     PNTLPT     0    Normal output to TTY.
                              1    Print on LPT (user, logical dev).

    5 (010000)     DING       0    No function.
                              1    Ring bell on error.

    6 (004000)     LOOPER     0    Normal operation.
                              1    Normal operation.

    7 (002000)     ERSTOP     0    Normal operation.
                              1    Halt on error.

    8 (001000)     PALERS     0    Print only first error in loop.
                              1    Print all errors.

    9 (000400)     RELIAB     0    No function.
                              1    Reliability mode switch.

    10 (000200)    TXTINH     0    Print full error messages.
                              1    Short error messages.

    11 (000100)    INHPAG     0    KL - allow 4096K addressing.
                              1    KL - inhibit paging.

    12 (000040)    MODDVC     0    No function.
                              1    Modify device codes.

    13 (000020)    INHCSH     0    Use cache.
                              1    Inhibit using cache on pgm start.

    14 (000010)    OPRSEL     0    Run default operations.
                              1    Operator test selections.

    15 (000004)    CHAIN      0/1  Used by "DIAMON", etc. to control
MAINDEC-10-DFCIA-A-D                                             Page 16
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0020


                                   chain operations.

    16 (000002)    Unused     0    KA10 60 Hertz power
                              1    KA10 50 Hertz power

    17 (000001)    Unused          Reserved



    7.1.2  Left Hand Switches (Detailed Description)

       The following is a detailed  description  of  each  console  data
    switch function:


    Switch 0 (ABORT)

       When this switch is set, the diagnostic returns  control  to  the
    diagnostic loader at end of pass.


    Switch 1 (RSTART)

       When this switch is set while  a  test  is  being  executed,  the
    diagnostic  aborts testing after completion of the current test, and
    restarts the diagnostic.


    Switch 2 (TOTALS)

       Setting this switch has no effect on diagnostic operation.


    Switch 3 (NOPNT)

       This switch inhibits all printout except forced.  Forced printout
    is  used  with  questions  requiring  user response.  This switch is
    useful when it is desired to force a test to  run  without  printing
    error  information.   To  suppress  the remainder of a current error
    report, type a Control-O  on  the  terminal.   This  suppresses  the
    remaining  error  information  for  the  current  error  and  allows
    printing to start again for the next error.


    Switch 4 (PNTLPT)

       When this switch is zero, all printouts from the  diagnostic  are
    printed  on  the terminal.  If set only forced printouts are printed
    on the terminal.  All data, including forced printouts,  is  printed
    on the line printer.


    Switch 5 (DING)
MAINDEC-10-DFCIA-A-D                                             Page 17
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0021


       This switch causes the terminal bell to be  rung  when  an  error
    occurs.


    Switch 6 (LOOPER) - Unused


    Switch 7 (ERSTOP)

       This switch causes the diagnostic to terminate  testing  when  an
    error  occurs.   If  the  OPRSEL  switch  is set the diagnostic will
    continue at the 'What Test -' prompt.  If the OPRSEL switch  is  not
    set  the  diagnostic  will exit and return control to the diagnostic
    loader.


    Switch 8 (PALERS)

       Normally an error message is printed only the first time an error
    occurs  if  that error is being repeated continuously.  To print all
    occurrences of every error, set this switch.


    Switch 9 (RELIAB)

       If this switch is set, each test is run 4 times before control is
    passed  to  the  next  test  selected.   If  only  one test has been
    selected, the test would be run 4 times the repeat count  given  for
    the test.


    Switch 10 (TXTINH)

       If this switch is not set, complete data  is  printed  with  each
    error  message.   If  this  switch is set, less data is printed in a
    shortened form.


    Switch 11 (INHPAG)

       This switch inhibits paging if set and allows it if not set.


    Switch 12 (MODDVC)

       If  this  switch  is  set,  DIAMON  asks  for  any  device   code
    modifications.  This is not used by the diagnostic itself.


    Switch 13 (INHCSH)

       This switch, if set, inhibits the use of cache  during  the  time
    the  diagnostic  is run.  This switch is inspected only in exec mode
    and only at diagnostic start up.  Changes of the switch  setting  do
    not affect the cache after the diagnostic has started up.
MAINDEC-10-DFCIA-A-D                                             Page 18
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0022



    Switch 14 (OPRSEL)

       If set, this switch  enables  increased  user  interaction.   The
    diagnostic  asks explicitly what test or function to do before doing
    anything.  Test selection is made in response to the question:

            What Test? -


       At least enough letters to recognize the test selection  must  be
    typed  although up to six letters are accepted.  '?' may be typed to
    get a list of the test names or commands.  'HELP' may  be  typed  to
    get a short description of each test or command.

       If this switch is not  set,  the  diagnostic  runs  all  hardware
    tests,  prints  fault isolation data (if the inhibit fault isolation
    switch is not set), then exits.


    Switch 15 (CHAIN)

       This switch is used by DIAMON in chaining operations and  is  not
    used by the diagnostic in normal operation.


    Switch 16 (50CYC) - Unused

       This switch is used on KA10's to select 50 hertz  power.   It  is
    not used by this diagnostic.


    Switch 17 - Unused

       This switch is reserved for use  by  the  diagnostic  monitor  or
    subroutine package and is not used by the diagnostic.
MAINDEC-10-DFCIA-A-D                                             Page 19
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0023


    7.2  Right Hand Switches

    7.2.1  Right Hand Switches (Brief Description)


      Switch       Symbol  State   Function Description
      ------       ------  -----   --------------------

    18 (400000)    TRACE      0    Normal operation.
                              1    Trace operation of tests.

    19 (200000)    INHFLT     0    Normal operation.
                              1    Inhibit fault isolation.

    20 (100000)    INHMSG     0    Normal operation.
                              1    Inhibit error message printout.

    21 (040000)    LOOPGM     0    Normal operation.
                              1    Loop on program.

    22 (020000)    LOOPTS     0    Normal operation.
                              1    Loop on selected test.

    23 (010000)    RUNALL     0    Normal operation.
                              1    Run all segments of each test.

    24 (004000)    DSPEAR     0    Normal operation.
                              1    Disable SPEAR error reporting.

    25 (002000)    UDEBUG     0    Normal operation.
                              1    Diagnostic debug mode.

    26 (001000)    MDEBUG     0    Normal operation.
                              1    Error message debug mode.

    27 (000400)    SDEBUG     0    Normal operation.
                              1    Test execute debug mode.

    28 (000200)    LDEBUG     0    Normal operation.
                              1    Inhibit loading of test microcode.

    29 (000100)    DDEBUG     0    Normal operation.
                              1    Dump port state upon error.

    30 (000040)    EDEBUG     0    Normal operation.
                              1    Print expanded error message upon error.

    31 (000020)    Unused

    32 (000010)    Unused

    33 (000004)    Unused

    34 (000002)    Unused

    35 (000001)    Unused
MAINDEC-10-DFCIA-A-D                                             Page 20
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0024






    7.2.2  Right Hand Switches (Detailed Description)


    Switch 18 (TRACE)

       This switch is used if the user wants to  follow  test  progress.
    As  each test is started, the diagnostic prints the name of the test
    and the current PC.  This is  useful  to  gain  assurance  that  the
    diagnostic  is  running  or to find out what test it died on, if the
    diagnostic fades into oblivion.

       The names of all tests selected are printed.   If  the  test  has
    been  disabled,  the  test  name  is  printed followed by the phrase
    '(Disabled)'.


    Switch 19 (INHFLT)

       If set, this switch inhibits  fault  isolation.   All  tests  are
    still run and in the same order, but the module callout in any error
    messages is ommitted.


    Switch 20 (INHMSG)

       This switch is  used  to  run  the  diagnostic  with  all  normal
    printout  except error messages.  It can be used in place of 'NOPNT'
    switch when looping on a test.


    Switch 21 (LOOPGM)

       If this switch is not set and  OPRSEL  switch  is  not  set,  the
    diagnostic  runs 5 passes of all tests.  Then the diagnostic returns
    to DIAMON or D20MON or KLDCP.

       If this  switch  is  set  and  OPRSEL  switch  is  not  set,  the
    diagnostic runs all tests continuously, pass after pass.

       If OPRSEL switch is set, the diagnostic asks 'What Test  -  '  to
    determine  what  test to run.  When done with a test, the diagnostic
    returns to this question.  The LOOPGM switch is not used.


    Switch 22 (LOOPTS)

       This switch allows a specified test to be looped on forever.   It
    is  equivalent  to  specifying '22 377777777777' to run TST22 a very
    large number of times.  This switch may be overridden by  specifying
    an explicit repeat count.
MAINDEC-10-DFCIA-A-D                                             Page 21
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0025


       This switch is effective only when selecting a single test.  If a
    class of tests is selected, the switch is ineffective.

       If this switch is not set the default repeat count when selecting
    a specific test is 1 repetition.


    Switch 23 (RUNALL)

       This switch forces every segment of a test to be run.   Normally,
    a  test  exits  after  the first error, unless looping on error.  To
    force the diagnostic to run every segment of the test regardless  of
    error, this switch may be set.

       This switch has no  effect  if  LOOPER  switch  is  set  and  the
    diagnostic is looping on an error.


    Switch 24 (DSPEAR)

       This switch enables or disables SPEAR error  reporting.   If  the
    switch  is not set, the diagnostic will make two SPEAR entries - (1)
    an entry when the diagnostic is started and (2) an entry either upon
    first error or at end of pass if no errors have occurred.

       If the switch is set, no SPEAR entries  will  be  made.   If  the
    diagnostic has already started, the second entry will not be made.


    Switch 25 (UDEBUG)

       This switch allows the diagnostic to be run in user mode  without
    a  port  for  the purposes of diagnostic development or debug or for
    the purpose of familiarization with the diagnostic without affecting
    or requiring a port.

       If this  switch  is  set,  the  diagnostic  runs  every  test  as
    demanded.   All  tests and most commands in the DEBUG test appear to
    succeed.


    Switch 26 (MDEBUG)

       This switch forces every test to fail and  prints  out  an  error
    message for each failure.  This may be used to debug error messages,
    or familiarize  a  person  with  typical  error  printouts  of  this
    diagnostic.   It  can also be used when trying to diagnose a failing
    test which passes the first few test segments - this  switch  causes
    error  messages  to  be  printed for passing portions of the test so
    that it can be seen  what  the  port  is  doing  correctly,  without
    looking through the diagnostic listing.


    Switch 27 (SDEBUG)
MAINDEC-10-DFCIA-A-D                                             Page 22
PROGRAM OPTIONS (SWITCHES)                                                                                                 SEQ 0026


       This switch is used for diagnostic debug purposes.  If set,  each
    table  entry  of  a  table  driven  test  is  printed as the test is
    executed.


    Switch 28 (LDEBUG)

       The first action of any test is normally to  load  the  microcode
    required  by  the  test.  Setting this switch inhibits the automatic
    loading of microcode.  This allows test  microcode  to  be  modified
    using the DEBUG facility and the test to be rerun.


    Switch 29 (DDEBUG)

       This switch affects the contents of error printouts.  If not  set
    error  printouts  contain  the  usual  amount  of data.  If set, the
    diagnostic prints a complete dump of the port  (about  12  pages  of
    data)  upon  any  error  applicable error.  The types of errors with
    which this would occur are such things as port hung or status  error
    in received packet, etc.

       This switch would be used if complete data regarding the state of
    the port and microcode was desired on any error.

    Switch 30 (EDEBUG)

       This switch affects the contents of error printouts.  If not  set
    error  printouts  contain  the  usual  amount  of data.  If set, the
    diagnostic prints port number and, if user mode, date  and  time  of
    error.

    Switch 31 - Unused

    Switch 32 - Unused

    Switch 33 - Unused

    Switch 34 - Unused

    Switch 35 - Unused
MAINDEC-10-DFCIA-A-D                                             Page 23
ERRORS                                                                                                                     SEQ 0027


8.0  ERRORS

       This section describes  the  operation  of  the  diagnostic  upon
    encountering  various  types  of  errors.  There are basically three
    types:

     o  User input errors

     o  Hardware errors

     o  Unexpected errors




    8.1  User Input Errors at the Terminal

       The diagnostic requests three types of input:  numerical, yes  or
    no, and SIXBIT.  The action taken upon input error is as follows:

       When an error is  detected  on  numerical  input  the  diagnostic
    prints  an  error  message  describing  the  type of error.  Then it
    either asks the question again, or  returns  to  'What  test  -'  or
    'DEBUG>'.

       When an error is detected on a yes  or  no  input,  the  user  is
    merely reprompted, until a Y or N is typed.

       When an error is detected on SIXBIT input  an  error  message  is
    printed and the user is asked the question again.  The user can then
    ask the diagnostic for further information by  asking  for  help  or
    typing '?'.



    8.2  Error Reporting of Hardware Detected Errors

       Upon the occurrence of a hardware error a full error  description
    is  printed, depending on the setting of switches 'NOPNT', 'PNTLPT',
    'TXTINH', and 'INHMSG'.

       If the diagnostic is looping on error only the  first  occurrence
    of an error is printed.  Subsequent errors at the same place are not
    printed.  If the 'DING' switch is set, the terminal bell is  sounded
    to  indicate  that  an  error  was  detected, even though nothing is
    printed.



    8.2.1  Reporting to SPEAR

       The diagnostic makes 2 SPEAR entries.  The first is an entry when
    the  diagnostic  is  started.   This  entry contains the date, time,
    user, diagnostic name and version.  A second entry is made when  the
    first  error  occurs.   This  entry  contains  the date, time, user,
    diagnostic name and version, failing test name and test description.
MAINDEC-10-DFCIA-A-D                                             Page 24
ERRORS                                                                                                                     SEQ 0028


       If the diagnostic completes a successful pass with no errors,  it
    will  make the second entry as above, but there will be no test name
    or test description included.

       If, thereafter, an error occurs and the  diagnostic  has  already
    made  an  entry  indicating  successful  completion  of  a pass, the
    diagnostic will make one more entry, giving the error information.

       Whenever the diagnostic is restarted by an STM  or  reloaded  and
    restarted,  it will make entries into the system error file.  If the
    2 entries have already been made, restarting via a STD or CONT  will
    not result in additional entries.

       SPEAR entries can be disabled using the switch 'DSPEAR'.



    8.2.2  Error Printouts

       Errors are printed as they  occur  in  a  standard  form.   Where
    appropriate,  the  CSR register or LAR register contents is printed.
    A sample printout with TXTINH switch not set follows:

    |  +-+-+-+-+-+-+
    |  Error:  TST1-1 - Port Hardware Test 1
    |  Test PC = 0'  Scope PC = 21'  Switches = 000010 000000 
    |  Write CSR '400000', then read CSR, verify result.
    |  CSR (Correct):  400003 000000 
    |       (Actual):  000000 400000 
    |  FRU:  EBUS/MPROC/CBUS modules
    |  -------------


       This error printout gives the following data:


     o  Test name - TST1-1 (Test #1 segment #1), name of test  is  'Port
        Hardware Test 1'.

     o  Test PC - 0' - address of the start of the test.  Note that this
        is a relative address as will be found in the test listing.

     o  Scope PC - 21' - address which can be found  in  the  diagnostic
        listing  of  the call to the scope loop routine.  Note that this
        is a relative address also.

     o  Switches - those in effect at the time of the error printout.

     o  'Write  CSR  '400000',  then  read  CSR,   verify   result.'   -
        description of the error.

     o  Results, correct and actual.

     o  Module callout - the three port modules.
MAINDEC-10-DFCIA-A-D                                             Page 25
ERRORS                                                                                                                     SEQ 0029



    |  +-+-+-+-+-+-+
    |  Error:  TST10-1 - Transmit Buffer Load Test
    |  Test PC = 0'  Scope PC = 11'  Switches = 000010 000000 
    |  CSR:  000000 000005 
    |  Transmit Buffer A load/read/select failure
    |  FRU:  PILA module
    |  -------------


       This error printout gives the following data:


     o  Test name - TST10-1 (Test #10  segment  #1),  name  of  test  is
        'Transmit Buffer Load Test'.

     o  Test PC - 0' - address of the start of the test.

     o  Scope PC - 11' - address of the call to the scope loop routine.

     o  Switches - those in effect at the time of the error printout.

     o  'Transmit Buffer A load/read/select failure'  -  description  of
        the error.

     o  Module callout - the Packet Buffer module.


    |  +-+-+-+-+-+-+
    |  Error:  TST7-1 - Link Register Test 2
    |  Test PC = 2650'  Scope PC = 2663'  Switches = 000010 000000 
    |  Read of Node Address Register failed
    |  Packet sent:  OpCode RDREG
    |   Word  Data
    |    +3   000 000 003 000 00 
    |    +4   000 000 000 000 00 
    |    +5   377 377 377 377 17 
    |    +6   000 000 015 233 11 
    |    +7   000 000 000 000 00 
    |  Response received count:  Expected 1  Actual 0
    |  Unexpected response received:  OpCode ??0??
    |   Word  Data
    |    +3   000 000 000 000 00 
    |    +4   000 000 000 000 00 
    |    +5   000 000 000 000 00 
    |    +6   000 000 000 000 00 
    |    +7   000 000 000 000 00 
    |  FRU:  PILA module
    |  -------------


       This error printout gives the following data:
MAINDEC-10-DFCIA-A-D                                             Page 26
ERRORS                                                                                                                     SEQ 0030


     o  Test name - TST7-1 (Test #7 segment #1), name of test  is  'Link
        Register Test 2'.

     o  Test PC - 2650' - address of the start of the test.

     o  Scope PC - 2663' -  address  of  the  call  to  the  scope  loop
        routine.

     o  Switches - those in effect at the time of the error printout.

     o  'Read of Node Address Register  failed'  -  description  of  the
        error.

     o  Packet related data:

         o  Packet sent, a RDREG packet - it is printed out.

         o  Expected to receive 1 response packet, but actually received
            none.

         o  Also received an unrecognized packet - it is printed out.


     o  Module callout - the Packet Buffer module.


       If TXTINH is set, the printouts looks like:

    |  +-+-+-+-+-+-+
    |  Error:  TST1-1  Scope PC 000021'  SW 000210 000000 
    |  CSR (C):  400003 000000 
    |      (A):  000000 400000 
    |  FRU:  EBUS/MPROC/CBUS
    |  -------------


    |  +-+-+-+-+-+-+
    |  Error:  TST7-1  Scope PC 002663'  SW 000210 000000 
    |  Packet sent:  OpCode RDREG
    |  Rsp rcv:  Expected 1  Actual 0
    |  Unexpected rsp req rcv:  OpCode ??0??
    |  FRU:  PILA
    |  -------------


    |  +-+-+-+-+-+-+
    |  Error:  TST10-1  Scope PC 000011'  SW 000210 000000 
    |  FRU:  PILA
    |  -------------
MAINDEC-10-DFCIA-A-D                                             Page 27
ERRORS                                                                                                                     SEQ 0031


    8.3  Unexpected Errors

       The diagnostic  is  written  to  recover  from  any  usual  error
    condition  and  continue  testing.   However,  there are a few halts
    coded into the diagnostic to catch a completely lost program because
    of some unexpected malfunction:

    ADDRESS        REASON
     1011    Fatal push list pointer error
     1012    Initial push list pointer error
     1013    MUUO with LUUO handler wiped out
     1014    DTE20 interrupt without doorbell
     1015    DTE20 clock interrupt without flag set
     1016    CPU initialization error
     1017    End of program error
     1020    Interrupt with LUUO handler wiped out

    The diagnostic is coded with several fatal instructions which cause

                Fatal program error at address  xxxxx

    to be printed and the diagnostic to halt.   These  instructions  are
    placed  where  the  diagnostic  finds itself in a situation where it
    does not know how to proceed.   There  are  no  anticipated  program
    deficiencies that allow a fatal error to be executed.
MAINDEC-10-DFCIA-A-D                                             Page 28
PROGRAM DESCRIPTION                                                                                                        SEQ 0032


9.0  PROGRAM DESCRIPTION

       This section provides a functional overview  of  the  diagnostic,
    giving  information  concerning requirements and restrictions, fault
    detection and isolation, error handling, terminal input  and  output
    characteristics, and diagnostic applications.



    9.1  Program Overview

    9.1.1  Program Purpose

       DFCIA  is  a  functional  diagnostic  intended  to   verify   the
    functionality of a CI20 port consisting of an 3 Port modules, Packet
    Buffer module,  Link  module,  CI  cables,  and  Star  Coupler.   It
    attempts  to  isolate  faults  to  one  of  three items - (1) 3 Port
    modules, (2) Packet Buffer module, and (3) Link module  +  cables  +
    Star Coupler.



    9.1.2  Testing Strategy

       The diagnostic attempts to run simpler tests first that  exercise
    a  small amount of logic.  Then more and more testing is done, until
    the tests are exercising much of the logic  of  the  port  at  once.
    First, the three port modules are tested, with basic hardware tests.
    Then Packet Buffer and Link module registers are read and  verified.
    Then  the  Packet Buffer transmit and receive buffers.  Then more of
    the Link logic.  Then transmitting and receiving  loopback  packets.
    Finally,  Request-ID's  are  sent  to  all  ports  and the responses
    tallied to produce a CI configuration report -  this  verifies  that
    some interaction is possible with other nodes on the CI bus.



    9.2  Run-Time Dynamics

    9.2.1  Memory Allocation Requirements

       The diagnostic loads and executes in less  than  96K  of  memory.
    This  includes  the memory used by the diagnostic monitor (DIAMON or
    D20MON or MAGMON) and the subroutine package (SUBRTN  or  SUBUSR  or
    SUBKL).



    9.2.2  Operating System Interactions
MAINDEC-10-DFCIA-A-D                                             Page 29
PROGRAM DESCRIPTION                                                                                                        SEQ 0033


    9.2.2.1  TOPS-10

       The diagnostic does not run under TOPS-10.



    9.2.2.2  TOPS-20

       The diagnostic interfaces with TOPS-20 via the  DIAG  JSYS.   The
    diagnostic  requests  the  port using the DIAG JSYS.  When done, the
    diagnostic releases the device also using the DIAG JSYS.

       The diagnostic can only be run if the port is not being  used  by
    the  operating  system.   The DIAG JSYS will succeed only if this is
    so.  Hence, the user must close the  CI  connection  before  running
    this  diagnostic.   This  is  done  by  dismounting  any  structures
    currently mounted on any HSC50's on the CI and terminating any other
    open  connections  that may exist.  This is accomplished via the OPR
    program.



    9.2.3  User Mode Restrictions

    9.2.3.1  User Mode Privileges

       Under TOPS-20 a user must have at least MAINTENANCE privileges in
    order  to  run  the  diagnostic.   WHEEL's  and OPERATOR's also have
    sufficient privileges to run the diagnostic in USER Mode.



    9.2.3.2  User Mode Priority Interrupts

       The diagnostic is not  allowed  to  use  the  Priority  Interrupt
    System  in  user  mode.   In user mode, the diagnostic polls the CSR
    Register for interrupt conditions.



    9.3  Exec Mode Capability

       The diagnostic runs in exec mode under  KLDCP  or,  additionally,
    under  DIAMON or MAGMON.  All tests are capable of being run in exec
    mode.



    9.4  User Mode Capability

       The diagnostic runs in user mode under TOPS-20  (Release  6.0  or
    newer).   There are some restrictions imposed upon the diagnostic in
    user mode that are listed in Section 9.2.3 'User Mode Restrictions'.
MAINDEC-10-DFCIA-A-D                                             Page 30
PROGRAM DESCRIPTION                                                                                                        SEQ 0034


    9.5  Fault Detection

    9.5.1  Error Resolution

       The diagnostic isolates faults to a module.



    9.5.2  Fault Detection And Isolation

       The purpose of the diagnostic is to diagnose hard faults  on  the
    IPA20-L Controller and to isolate those faults to a specific failing
    field replaceable unit (FRU).  The diagnostic testing  is  performed
    by   a  bottom  up  testing  technique.   This  is  accomplished  by
    performing a basic operation and then using that verified  logic  to
    verify the functionality of more logic.

       This diagnostic should detect 50% of solid faults in the  3  port
    modules,  95%  of  faults  in  the  Packet Buffer module, and 93% of
    faults in the Link module and isolate 90% of these to the FRU.



    9.5.3  Fault Detection

       Typically, the diagnostic detects a fault, then prints it out and
    continues  testing.   The  failing module is printed with each error
    message.

       Occasionally, particularly  with  EBUS  interface  failures,  the
    diagnostic  may just hang, or the KL10 microcode may hang.  This may
    happen if the port cannot complete an  EBUS  operation  such  as  an
    examine  or  deposit  properly.  If this occurs, no error message or
    module callout is  printed.   The  solution  is  to  run  the  basic
    diagnostic,  DFPTA,  in  order  to  debug  or  verify the three port
    modules, EBUS, MPROC, and CBUS modules.



    9.6  Performance During Hardware Failures

    9.6.1  CPU/Memory Failures

       Most CPU and memory faults are fatal errors to the diagnostic and
    it does not continue after one.



    9.6.2  Power Fail/Restart

       If a power fail occurs, the diagnostic must be reloaded and rerun
    when the system is back in operation.
MAINDEC-10-DFCIA-A-D                                             Page 31
PROGRAM DESCRIPTION                                                                                                        SEQ 0035


    9.6.3  Port Failure

       Hardware failure in the port is anticipated  and  results  in  an
    error message.



    9.6.4  Unexpected Traps

       The  diagnostic  can  fail  due  to  an  unexpected  malfunction.
    Sometimes  an  error  code  is  printed,  if  the subroutine package
    intercepts the error.  Other cases may result in a  hung  diagnostic
    or  CPU  or occasionally a fatal error message.  See the Section 8.3
    'Unexpected Errors' for more details.



    9.7  Program Applications

       The diagnostic can be used for coarse determination of a fault  -
    does the port work and if not what module is broken.

       It can also be used for detailed examination of a port.



    9.7.1  Users and Uses

       The diagnostic is generally used only by Manufacturing to  assist
    module  verification  and  debug,  and  by  Customer  Services  when
    determining the FRU of a failing port.



    9.7.2  Engineering Usage

       Engineering used this diagnostic  for  microcode  debug  and  for
    prototype debug and maintenance.  Engineering may use the diagnostic
    if any ECO's are made in the future.



    9.7.3  Manufacturing Usage

       This  diagnostic  is  used  by  Manufacturing  as  part  of   the
    acceptance procedure for an IPA20-L.



    9.7.4  Customer Services Usage

       Customer Services uses  the  diagnostic  as  part  of  acceptance
    procedure,  when  an  IPA20-L  is  sent to a customer in a drop ship
    environment.  Customer Services also uses this during CM and PM.
MAINDEC-10-DFCIA-A-D                                             Page 32
PROGRAM DESCRIPTION                                                                                                        SEQ 0036


    9.7.5  Customer Usage

       With the exception of OEM customers, it is not  likely  that  any
    customers  will use the diagnostic.  If they have a problem with the
    port they notify Customer Services who can then run the  diagnostic.
    OEM customers, running the diagnostic themselves, would interface to
    their account sales representative  if  any  difficulties  arose  or
    problems discovered.



    9.8  Test Design

       The basic design of most tests is as follows:


     o  Do something to the port.

     o  Inspect the results.

     o  If error, print an error message.

     o  If error and error looping enabled, loop on error.


       This fits into the diagnostic as described by the following steps
    done by the diagnostic:

     o  Do program initialization

     o  Select test category

     o  Run these tests

         o  Select a test

         o  Run it

         o  Select next test, exit if no more


     o  Select next test category to  test  if  OPRSEL  switch  is  set,
        otherwise exit the diagnostic.




    9.8.1  Type of Tests

       There are three types of tests:


     o  Hardware Test
MAINDEC-10-DFCIA-A-D                                             Page 33
PROGRAM DESCRIPTION                                                                                                        SEQ 0037


     o  Program Option Selection

     o  Debugger Test


       Whenever the tests are run without manual control of  which  test
    is  selected,  only  hardware  tests  are  run.   This  is the major
    function of the diagnostic and  these  tests  comprise  95%  of  the
    diagnostic.

       Program option  selection  tests  can  be  selected  when  manual
    control  of what test to run has been selected.  These are not tests
    in that they do not do anything to the hardware.  But since they are
    selected  from  a  list  of  hardware  tests, they are called tests.
    These consist of  switch  selections  or  changes,  help,  and  exit
    commands.

       The debugger test is a special test that allows one to  to  CONI,
    CONO,  DATAI,  and DATAO's to the port and in effect write one's own
    test.  The purpose of this test is for hardware debug of  the  port,
    where  one  is interested in doing things and inspecting the results
    in a less formal fashion than just running tests.  This is only  one
    test but it allows many different things to be done to the port.  It
    is intended to be used primarily in breadboard  debug,  but  may  be
    used later by Customer Services or Manufacturing.



    9.8.2  Test Flow

       The diagnostic runs all tests in numerical sequence, printing out
    error message and module callouts as necessary.

       The following sections describe starting and stopping tests.



    9.8.2.1  Starting the Test

       After the program switches have either  been  given  via  console
    switches or by typing them in on the terminal, the diagnostic starts
    the tests as selected by the switches or by user input.

       If test tracing is enabled, the diagnostic prints the test pc and
    test  name  at  the  beginning  of  each  test, and a phrase such as
    '(disabled)' if the test actually is not going to be run.

       A test is disabled if such has been specified  with  the  DISABLE
    test command.
MAINDEC-10-DFCIA-A-D                                             Page 34
PROGRAM DESCRIPTION                                                                                                        SEQ 0038


    9.8.2.2  Stopping the Test

       A test sequence may  stop  either  by  terminating  normally,  by
    halting  on error (if the ERSTOP switch is set), by the user setting
    the ABORT or RSTART switches, or by typing an Altmode or C.  In user
    mode, ABORT and RSTART are ignored if set.

       The diagnostic continues at one of several  places  depending  on
    switch  settings  and  whether or not the diagnostic is being run in
    exec or user mode  and  what  loader  has  been  used  to  load  the
    diagnostic:

     o  D20MON CMD -

     o  DIAMON CMD -

     o  MAGMON CMD -

     o  What Test -

     o  @ (TOPS-20 prompt)

     o  o >.  (KLDCP prompt)




    9.8.2.3  Obtaining Run Time Status (Control-T)

       In user mode the current program status is given when T is typed.
    This is not available in exec mode.



    9.8.2.4  Obtaining Run Time Status (S or Control-S)

       In exec mode, while running tests, the current test name and time
    is printed when an S <CR>, s <CR> or Control-S is typed.

       In user mode, typing an S or s produces the printout.
MAINDEC-10-DFCIA-A-D                                             Page 35
TEST DESCRIPTIONS                                                                                                          SEQ 0039


10.0  TEST DESCRIPTIONS

    10.1  Test Description Assumptions

       All test descriptions assume that no program  switches  are  set.
    The action of a test if a particular switch is set may be determined
    by reviewing the function of the switch, given in prior sections.



    10.2  Test Description Overview

       The description for 'program option selection' test  consists  of
    what each item does and a description of its use.

       The description given for a 'hardware' test consists of a  single
    line  test  description.  The diagnostic listing provides a detailed
    description at the beginning of each test.  Specific  implementation
    details  can  be  obtained from the listing or from the microcode of
    the test.

       The description for the 'debug' test gives a list of commands and
    what each does.
MAINDEC-10-DFCIA-A-D                                             Page 36
TEST DESCRIPTIONS                                                                                                          SEQ 0040


    10.3  Program Option Selections

    10.3.1  Basic Description

       This is a set of commands that can be given to facilitate running
    tests or debugging the port.



    10.3.2  Commands Available

       The commands available in regular mode are as follows, which  are
    typed in response to the prompt 'What test - ':

    NAME         DESCRIPTION
    ----         -----------

    Hardware Tests:
    --------------

    ALL n   Execute ALL tests (n times)
    PORT n  Execute Port modules tests
    PBUFF n Execute PBuff module tests
    LINK n  Execute Link module tests
    LOOP n  Execute Loopback tests
    FUNCT n Execute tests verifying microcode functionality
    m n     Test m

    General Commands:
    ----------------

    HELP    Print this message
    EXIT    Return to normal test dispatching
    DDT     Enter DDT (Type RTN$X to return)
    TAKE    Take cmds from file 
    NTAKE   Take cmds from file (not echoed)
    DEBUG   Enter port debugger
    DIAMON  Enter DIAMON

    Test Control Commands:
    ---------------------

    ENABLE n  Enable execution of test n
    DISABL n  Disable execution of test n
    DISLIS    List disabled tests

    LIST n    List all tests (or just test n)

    Statistics Commands:
    -------------------

    STATIS  Print statistics
    ZSTATS  Clear statistics

    CI Configuration Commands:
    -------------------------
MAINDEC-10-DFCIA-A-D                                             Page 37
TEST DESCRIPTIONS                                                                                                          SEQ 0041



    CONFIG      Determine/print configuration
    CONPNT      Print configuration

    Switches:
    --------

    SWITCH  Enter switch information
    SWPRIN  Print current switch settings

    NOPNT   Complement 'no print' switch
    PNTLPT  Complement 'print lpt' switch
    DING    Complement 'bell on error' switch
    ERSTOP  Complement 'halt on error' switch
    PALERS  Complement 'print all errors' switch
    RELIAB  Complement 'reliability mode' switch
    TXTINH  Complement 'text inhibit' switch
    OPRSEL  Complement 'operator select' switch

    TRACE   Complement 'trace test' switch
    INHFLT  Complement 'inhibit fault isolation' switch
    INHMSG  Complement 'inhibit error message' switch
    LOOPGM  Complement 'loop on pgm' switch
    LOOPTS  Complement 'loop on test' switch
    RUNALL  Complement 'run all test segments' switch
    DSPEAR  Complement 'disable SPEAR reporting' switch
    UDEBUG  Complement 'user mode debug' switch
    MDEBUG  Complement 'error message debug' switch
    SDEBUG  Complement 'test debug' switch
    LDEBUG  Complement 'load microcode debug' switch
    DDEBUG  Complement 'dump on error' switch
    EDEBUG  Complement 'expanded error msg' switch




    10.3.3  Detailed Command Description

       In more detail these commands are as follows:



    10.3.3.1  Hardware Tests

       ALL n

       This command will run all hardware  tests  the  number  of  times
    specified by the repeat count.  If no repeat count is specified, the
    diagnostic asks how many passes to run.

       PORT n

       This command  will  run  all  port  related  (EBUS,  MPROC,  CBUS
    modules)  tests  the  number of times specified by the repeat count.
    If no repeat count is specified, the diagnostic asks how many passes
    to run.
MAINDEC-10-DFCIA-A-D                                             Page 38
TEST DESCRIPTIONS                                                                                                          SEQ 0042


       PBUFF n

       This command will run all Packet Buffer module tests  the  number
    of  times  specified  by  the  repeat  count.  If no repeat count is
    specified, the diagnostic asks how many passes to run.

       LINK n

       This command will run all Link module tests the number  of  times
    specified by the repeat count.  If no repeat count is specified, the
    diagnostic asks how many passes to run.

       LOOP n

       This command will run all LOOPBACK  tests  the  number  of  times
    specified by the repeat count.  If no repeat count is specified, the
    diagnostic asks how many passes to run.

       FUNCT n

       This command will run all tests which verify the functionality of
    the  microcode.   They  will be run the number of times specified by
    the repeat count.  If no repeat count is specified,  the  diagnostic
    asks how many passes to run.

       m n

       This command is given to run a single test.  The test  number  is
    given  followed  by  an optional repeat count.  If a repeat count is
    not given, the test is executed only once.



    10.3.3.2  General Commands

       HELP

       This command prints a one line description for each command.

       EXIT

       This command returns control to the diagnostic loader or to KLDCP
    if no loader program was used to load the diagnostic in exec mode.

       DDT

       This command invokes DDT.  When RTN$X (POPJ  17,0)  is  executed,
    the  diagnostic  resets  the  PI  system in exec mode and returns to
    'What Test -  '  question.   DDT  can  also  be  entered  by  typing
    Control-D and when done typing RTN$X.  When invoked in this fashion,
    the diagnostic does not reset the PI system.

       TAKE file ext
MAINDEC-10-DFCIA-A-D                                             Page 39
TEST DESCRIPTIONS                                                                                                          SEQ 0043


       This command takes  commands  from  a  file.   The  file  may  be
    specified  as  an  argument  to  the  command.   If  no file name is
    specified, the default file name is used.  The default file name  is
    either 'DFCIA.CMD' or the last file specified.

       Any legal  command  may  be  specified  except  another  TAKE  or
    commands  which cause exit from the diagnostic such as DDT or DIAMON
    or EXIT.  DIAMON or EXIT may be included but processing of the  take
    file  will  terminate  with the command.  The diagnostic prints each
    command and result on the terminal as it executes each command.

       The file specified must be on the load device known to MAGMON  or
    D20MON  or DIAMON.  If not, an error message is printed and the take
    command is aborted.

       If any error occurs while processing  the  take  file,  the  take
    command  is  aborted.   Errors include any unexpected errors such as
    unrecognized command, failures to start the port,  argument  errors,
    etc.

       NTAKE file ext

       This command is identical to the TAKE  command  with  the  single
    exception that the commands executed are not echoed on the terminal.
    All output resulting from execution of the commands is echoed.

       DEBUG

       Enter port debugger.  This test allows specific operations to  be
    done   with  the  port  without  the  restrictions  of  executing  a
    particular test.

       DIAMON

       Enter DIAMON.  This  is  the  same  as  the  EXIT  command  if  a
    diagnostic  loader  is  present.   If  MAGMON  is  loaded instead of
    DIAMON, control returns to MAGMON.



    10.3.3.3  Test Control Commands

       ENABLE n,n,n,...  and DISABL n,n,n,...

       The running of a particular test can be explicitly prevented with
    the  DISABL command.  The ENABLE command allows the execution of the
    specified  tests  to  be  enabled  again.   Disabling  a  test  will
    guarantee that the test will not be run.  Enabling a test will allow
    a test to be run, but whether or not  it  is  run,  depends  on  the
    determination   made  by  the  fault  isolation  algorithm  and  the
    availability of the required port modules.

       Example:

    |  What test - ENABLE 3,4
    |  What test - DISABL 3,4,10,22
MAINDEC-10-DFCIA-A-D                                             Page 40
TEST DESCRIPTIONS                                                                                                          SEQ 0044




       DISLIS

       This command lists what tests have been disabled.  Example:

    |  What test - DISLIS
    |
    |  TST1 TST3 TST4 TST11 TST22


       LIST n

       List all tests (or just test n).  This command  prints  the  test
    description  which  is  also  printed  in each error message.  If no
    argument is given, all test descriptions are printed  (this  can  be
    aborted by typing an altmode).  If a test number such as 2 is typed,
    only the description for that test will be printed.  Example:

    |  What test - LIST 2
    |
    |  TST2 - Port Hardware Test 2
    |
    |  What test - LIST
    |
    |  TST1 - Port Hardware Test 1
    |  TST2 - Port Hardware Test 2
    |  TST3 - Port Hardware Test 3
    |  TST4 - PB Register Test 1
    |  TST5 - Link Register Test 1
    |  ...
        



    10.3.3.4  Statistics Commands

       STATIS

       This command prints accumulated statistics.  Statistics are  kept
    only  on  packets  sent and packets received and various information
    connected with each.  See the Section 6.9.1  'Statistics  Printouts'
    for more details.

       ZSTATS

       This   command   clears   statistics.    Statistics   are    also
    automatically cleared whenever the diagnostic is restarted via a STM
    command.
MAINDEC-10-DFCIA-A-D                                             Page 41
TEST DESCRIPTIONS                                                                                                          SEQ 0045


    10.3.3.5  CI Configuration Commands

       CONFIG

       This command is identical to  running  TST61  'REQID  Test'.   It
    loads  operational  microcode  if  necessary,  then sends Request-ID
    packets to all possible nodes.  A configuration table is  built  and
    the configuration is then printed.  For example:

    |  What test - CONFIG
    |  
    |  ***** CI Configuration *****
    |   Port   Port       Dual  Maint  Port
    |  Number  Type       Path  State  State
    |  ------  ---------  ----  -----  -------
    |     1    KL10-Self  Yes   No     Initialized
    |     5    HSC-50     Yes   No     Initialized


       CONPNT

       This command prints the configuration last determined.



    10.3.3.6  Switches

       SWITCH

       Enter switch information.  Switches can  be  entered  as  in  the
    following  example.   Usually, though, it is easier just to type the
    switch name to turn on or off a switch.

    |  What Test - SWITCH
    |
    |  Print the selectable pgm switches? (Y or N) - Y
    |
    |  ----Left Side Switches--------     ----Right Side Switches--------
    |
    |  SW    KL10     11    Function      SW   Value  Function
    |  --    ----    ----   --------      --   -----  --------
    |   0   400000  100000  Abort         18  400000  Program trace
    |   ...
    |
    |  Switches = 020010 004000 
    |
    |  20010  LH Switches <# or ?> - ?
    |
    |  Type  Y,N,^,CR,^Z
    |
    |  N ABORT - 
    |  N RSTART - 
    |  ...
    |
    |  4000  RH Switches <# or ?> - ?
    |
MAINDEC-10-DFCIA-A-D                                             Page 42
TEST DESCRIPTIONS                                                                                                          SEQ 0046


    |  Type  Y,N,^,CR,^Z
    |
    |  N TRACE - 
    |  N INHFLT - 
    |  ...


       SWPRIN

       Print current switch settings.  Example:
     
    |  What Test - SWPRIN
    |
    |  Switches:  020010 002000   PNTLPT OPRSEL UDEBUG 


    NOPNT    PALERS   TRACE    LOOPTS   MDEBUG   EDEBUG
    PNTLPT   RELIAB   INHFLT   RUNALL   SDEBUG
    DING     TXTINH   INHMSG   DSPEAR   LDEBUG
    ERSTOP   OPRSEL   LOOPGM   UDEBUG   DDEBUG
                      

       The name of each of these switches can be typed.  The  result  is
    to  complement  the switch setting.  If left hand switches are typed
    in exec mode an error message is printed.
MAINDEC-10-DFCIA-A-D                                             Page 43
TEST DESCRIPTIONS                                                                                                          SEQ 0047


    10.4  Hardware Tests

       More information on each of the following hardware  tests  listed
    here can be found in the program listing.



    10.4.1  Hardware Tests - EBUS/MPROC/CBUS modules

    TST1 - Port Hardware Test 1
    TST2 - Port Hardware Test 2
    TST3 - Port Hardware Test 3



    10.4.2  Functional Tests - Packet Buffer/Link modules

    10.4.2.1  Register Tests

    TST4 - PB Register Test 1
    TST5 - Link Register Test 1
    TST6 - PB Register Test 2
    TST7 - Link Register Test 2



    10.4.2.2  Transmit/Receive Buffer Tests

    TST10 - Transmit Buffer Load Test
    TST11 - Tranmit Buffer A Test
    TST12 - Transmit Buffer B Test
    TST13 - Transmit Buffer Addressing Test
    TST14 - PB Address Counter Test (Transmit)
    TST15 - PB Address Offset Test (Transmit Read)
    TST16 - PB Address Offset Test (Transmit Write)
    TST17 - Receive Buffer A Test
    TST20 - Receive Buffer B Test
    TST21 - Receive Buffer Addressing Test
    TST22 - Retransmit Buffer A Test
    TST23 - Retransmit Buffer B Test
    TST24 - Transmit Xmt Buffer A to Rcv Buffer B
    TST25 - Transmit Xmt Buffer B to Rcv Buffer A
    TST26 - PB Address Offset Test (Receive Read)
    TST27 - Addressing Test 1
    TST30 - Addressing Test 2
    TST31 - Addressing Test 3



    10.4.2.3  Node Address Test

    TST32 - Node Address Test
MAINDEC-10-DFCIA-A-D                                             Page 44
TEST DESCRIPTIONS                                                                                                          SEQ 0048


    10.4.2.4  Link Tests

    TST33 - Transmit Status
    TST34 - 'Abort Transmission' Function (Active)
    TST35 - 'Abort Transmission' Function (Inactive)
    TST36 - Receiver Status
    TST37 - PLI Parity Test
    TST40 - LINK Parity Test



    10.4.2.5  CRC Tests

    TST41 - CRC Test 1
    TST42 - CRC Test 2



    10.4.2.6  Packet Tests

    TST43 - Idle Loop Test
    TST44 - Queue Handling Test
    TST45 - CI Loopback Test
    TST46 - Link Loopback Test
    TST47 - Packet Buffer Loopback Test
    TST50 - REQID Test
MAINDEC-10-DFCIA-A-D                                             Page 45
TEST DESCRIPTIONS                                                                                                          SEQ 0049


    10.5  Debug Test

    10.5.1  Basic Description

       This test allows the selection of different operations  that  may
    be  done  on port.  In some cases, probably rarely, a field engineer
    may wish to diagnose an port by doing particular  operations.   More
    often  this  type of testing may be useful when repairing individual
    modules if the technician doing the repair is very familiar with the
    module  and how it works.  This test provides the ability to perform
    a basic operation such as writing a register or doing something with
    microcode and then inspecting the results to see what happened.

       Normally,  the  port  tests  provide  sufficient  detection   and
    isolation  of faults to fix the port.  Occasionally, a person trying
    to fix the port may encounter an unusual problem not detected by the
    diagnostic  or  having  strange  symptoms.  This test may allow some
    understanding of the problem to be gained.

       This  test  can  also  be  used  to  debug  microcode  using  the
    breakpoint  facilities.   And  it can be used to run small microcode
    routines of the user's own devising.



    10.5.2  Commands Available

       The commands available in debug mode are as  follows,  which  are
    typed in response to the prompt 'DEBUG> ':

    NAME         DESCRIPTION
    ----         -----------

    General Commands:
    ----------------

    HELP        Print this message
    EXIT        Exit DEBUG mode
    DDT         Enter DDT (Type RTN$X to return)

    SET opt arg    Set/clear/print options
    TAKE file ext  Take commands from a file
    NTAKE file ext Take commands from file (unechoed)

    Starting, Stopping, Initializing the Port:
    -----------------------------------------

    RESET       Issue EBUS Reset
    CLEAR       Issue a 'Port Clear'

    START adr   Start the port micro-sequencer
    STOP        Stop the port micro-sequencer
    CONT        Continue the port micro-sequencer
    SSTEP cnt   Single step the port micro-sequencer
    STRACE cnt  Single step and trace execution
    SPRINT cnt  Print single step history data
MAINDEC-10-DFCIA-A-D                                             Page 46
TEST DESCRIPTIONS                                                                                                          SEQ 0050


    SCLEAR      Clear single step history data
    SSINIT      Set up single step addr/data/history

    Handling Port Registers:
    -----------------------

    ECSR        Examine CSR Register
    DCSR dat    Deposit CSR Register
    ZCSR        Zero CSR Register  

    EEBUF       Examine EBUF register
    DEBUF dat   Deposit EBUF register
    ZEBUF       Zero EBUF register

    ELAR        Examine LAR register
    DRAR dat    Deposit RAR register
    ZRAR        Zero RAR register

    Handling Port CRAM Locations:
    ----------------------------

       The next few  commands  must  have  at  least  one  argument  and
    possibly  two.   Two  arguments give the range of CRAM address to be
    altered or inspected.  If only one argument is given  the  range  is
    only  one location.  If the deposit command is given, the diagnostic
    will ask what to deposit into each location.

    DCRAM adr,adr  Deposit into CRAM
    BCRAM adr,adr  Deposit into CRAM by fields
    ACRAM adr,adr  Alter CRAM
    ECRAM adr,adr  Examine CRAM
    LCRAM adr,adr  List CRAM
    ZCRAM adr,adr  Zero CRAM  

    2901 Commands:
    -------------

    E2901 reg,reg  Examine 2901 registers
    D2901 reg,dat  Deposit 2901 register
    Z2901 reg,reg  Zero 2901 registers

    Local Storage Commands:
    ----------------------

    ELOCS adr,adr  Examine local storage
    DLOCS adr,dat  Deposit local storage
    ZLOCS adr,adr  Zero local storage

    Mark Bit Commands:
    -----------------

    MARK adr,adr   Set mark bit
    RMARK adr,adr  Remove mark bit
    CMARK adr,adr  Clear all mark bits
    LMARK adr,adr  List mark bits
MAINDEC-10-DFCIA-A-D                                             Page 47
TEST DESCRIPTIONS                                                                                                          SEQ 0051


    Breakpoint Commands:
    -------------------

    BREAK adr,adr   Set breakpoint
    RBREAK adr,adr  Remove breakpoint
    CBREAK adr,adr  Clear all breakpoints
    LBREAK adr,adr  List breakpoints

    Microcode Commands:
    ------------------

    LOAD tst    Load microcode from Test 'tst' into CRAM
    LIST tst    List microcode from Test 'tst'
    FLOAD       Load microcode from file into CRAM
    FVERFY      Verify microcode loaded from file
    FLIST       List microcode in file
    FEXAM       Examine microcode in file 

    Statistics Commands:
    -------------------

    STATIS    Print statistics
    ZSTATS    Clear statistics

    Configuration Commands:
    ----------------------

    CONFIG    Determine/print configuration
    CONPNT    Print configuration

    CI Commands:
    -----------

    PINIT     Initialize PCB and queues
    SIDLE     Start port/wait for IDLE loop
    BPACK     Build packet
    IQUEUE    Put packet on cmd queue
    PQUEUE n  Print specified queue
    PPCB      Print PCB
    WATCH     Watch port and print events
    DEPPAK    Deposit into packet

    PLI Register Commands:
    ---------------------

    DPLI lnk,data,rep  Deposit PLI data
    EPLI lnk,rep       Examine PLI data
    IPLI               Initialize PILA/Link modules

    Miscellaneous Commands:
    ----------------------

    TRANSL dat  Translate data to CSR bits
    FILLNX dat  Fill CRAM with 'J=.+1,CTL=dat'
    FILLPC dat  Fill CRAM with 'J=.,CTL=dat'
    CCODE       Print condition codes
MAINDEC-10-DFCIA-A-D                                             Page 48
TEST DESCRIPTIONS                                                                                                          SEQ 0052


    ESTACK      Examine 2910 stack contents
    ENEXT       Examine next
    DNEXT arg   Deposit next
    DUMP        Dump entire port status

    IPRINT      Print accumulated interrupt activity
    ICLEAR      Clear accumulated interrupt activity
    IINIT       Init interrupt system 

    Data Transfer Commands:
    ----------------------

    CCWPNT    Print CCW list
    LOGPNT    Print logout data

    Switches:
    --------

    SWITCH  Enter switch information
    SWPRIN  Print current switch settings

    NOPNT   Complement 'no print' switch
    PNTLPT  Complement 'print lpt' switch
    DING    Complement 'bell on error' switch
    ERSTOP  Complement 'halt on error' switch
    PALERS  Complement 'print all errors' switch
    RELIAB  Complement 'reliability mode' switch
    TXTINH  Complement 'text inhibit' switch
    OPRSEL  Complement 'operator select' switch

    TRACE   Complement 'trace test' switch
    INHFLT  Complement 'inhibit fault isolation' switch
    INHMSG  Complement 'inhibit error message' switch
    LOOPGM  Complement 'loop on pgm' switch
    LOOPTS  Complement 'loop on test' switch
    RUNALL  Complement 'run all test segments' switch
    DSPEAR  Complement 'disable SPEAR reporting' switch
    UDEBUG  Complement 'user mode debug' switch
    MDEBUG  Complement 'error message debug' switch
    SDEBUG  Complement 'test debug' switch
    LDEBUG  Complement 'load microcode debug' switch
    DDEBUG  Complement 'dump on error' switch
    EDEBUG  Complement 'expanded error msg' switch




    10.5.3  Detailed Command Description

       In more detail these commands are as follows:
MAINDEC-10-DFCIA-A-D                                             Page 49
TEST DESCRIPTIONS                                                                                                          SEQ 0053


    10.5.3.1  General Commands

       HELP

       This command prints a one line description similar to  the  above
    for each command.

       EXIT

       This command returns control to normal test  dispatching  at  the
    'What Test -' question.

       DDT

       This command invokes DDT.  When RTN$X (POPJ  17,0)  is  executed,
    the  diagnostic  resets  the  PI  system in exec mode and returns to
    'DEBUG>' question.  DDT can also be entered by typing Control-D  and
    when   done  typing  RTN$X.   When  invoked  in  this  fashion,  the
    diagnostic does not reset the PI system.

       SET

       This command is used to set, clear,  or  print  program  options.
    The option is specified as the first argument and the option setting
    as the second argument.  The options that may be dealt with  are  as
    follows:

     o  SET ADDR adr.

        This command sets  the  start  address  of  the  microsequencer.
        Whenever  a  START  command  or  a  SSINIT command is given, the
        default address given here is used.  A START  command  may  also
        explicitly specify the starting address.  No commands other than
        SET ADDR alter the default starting address.

        The initial default address is location  0.   To  find  out  the
        current default address, type SET ADDR <CR>.

     o  SET CSR data.

        This command sets the initial CSR  register  starting  contents.
        When a subsequent START or SSINIT command is given, this data is
        written to the  CSR  when  starting  the  microsequencer.   This
        allows  the  state  of CSR bits to be set up - such as interrupt
        enable and PI level bits.

        The initial value is 0.  When a START or single step command  is
        given  with  the  default  CSR  data  equal to 0, the diagnostic
        writes 14 to the CSR register (MPRUN, PI Level 4)  or  20014  if
        single stepping (SINCYC bit included).

        To find out the current start data, type SET CSR <CR>.

     o  SET PARITY arg.
MAINDEC-10-DFCIA-A-D                                             Page 50
TEST DESCRIPTIONS                                                                                                          SEQ 0054


        This  command  affects  the  automatic  parity  generation  when
        loading  microcode  into  the  CRAM.   If  the flag is 'YES' the
        diagnostic  computes  correct  parity  before   it   loads   any
        microcode.   If  'NO'  the  diagnostic  assumes  the  parity has
        already computed and does not alter the parity bit specified  in
        the microcode data.

        This flag only affects microcode explicitly loaded in the  DEBUG
        test.   This flag does not affect loading microcode from a file.
        When operational microcode is loaded in this fashion, parity  is
        not affected.

        The initial value of the flag is 'YES'.  To find out the current
        setting, type SET PARITY <CR>.

     o  SET EBUF arg.

        This command affects the automatic preservation of the EBUF when
        single  stepping  or  stopping the microsequencer.  If 'preserve
        EBUF' flag is 'YES' the diagnostic will  read  the  EBUF  before
        reading the LAR and then write back the data afterwards.  If the
        flag is 'NO' the contents of the EBUF will  be  destroyed  every
        time the RAR is written or the LAR read.

        The initial value of the flag is 'YES'.  To find out the current
        setting, type SET EBUF <CR>.

     o  SET LENGTH len.

        This command sets the text length  in  bytes  to  be  used  when
        generating datagrams.  Any length up to 1000 (decimal) bytes may
        be specified.

        The initial length is '200 bytes'.   To  find  out  the  current
        setting, type SET LEN <CR>.

     o  SET PAT n.

        This command specifies the data pattern to be used when building
        a  datagram  containing a text portion.  Any data pattern from 1
        to 126 (octal) may be entered.

        The initial value is '1' (data pattern zeros).  To find out  the
        current setting, type SET PAT <CR>.

     o  SET PATLIS arg,arg.

        This command prints what data patterns are  available.   One  or
        two  arguments may be given to specify a range of data patterns.
        The diagnostic prints a description for each data pattern in the
        range  specified.   If  no  arguments  are  specified,  all data
        patterns will be printed.

     o  SET FNAME name ext
MAINDEC-10-DFCIA-A-D                                             Page 51
TEST DESCRIPTIONS                                                                                                          SEQ 0055


        The diagnostic allows a microcode file to be loaded into CRAM or
        listed  on  the  terminal.   The  commands  used  do not allow a
        microcode file name to be specified.  The name of the file  used
        can be changed by this command.

        The initial file name is 'KLIPA.ULD'.  To find out  the  current
        setting, type SET FNAME <CR>.

     o  SET PCB arg

        This command is used for operational microcode debug.  A flag is
        maintained  that  determines  whether  or  not the START command
        should set up a CCW list specifying a portion of the  PCB  (Port
        Control  Block).  If the flag is set, the diagnostic will set up
        the CCW list.  The microcode reads  the  data  in  the  PCB  for
        initialization purposes.

        The initial value of the flag is 'NO'.  To find out the  current
        setting, type SET PCB <CR>.

     o  SET RESPON arg

        This option specifies  whether  or  not  a  response  packet  is
        desired  on  every  command  packet  given  to  the  operational
        microcode.  If the response flag is not set  in  the  packet,  a
        response  packet will be placed on the response queue only if an
        error occurs.  If the response flag is set, a response packet is
        always built.

        The initial setting of the  flag  is  'NO'.   To  find  out  the
        current setting, type SET RESPON <CR>.

     o  SET PATH

        This option determines the path over which the packet is  to  be
        sent.  The setting can be:  Auto, Path 1, or Path 2.

        The initial setting of the flag is 'Auto path'.  To find out the
        current setting, type SET PATH <CR>.

     o  SET PORT

        This option specifies the our port number.  All loopback packets
        built  in  DEBUG  mode  will  contain  this  port  number as the
        destination.

        The initial setting of our port number is  determined  when  the
        node  number  register  in the Link module is read.  If no tests
        have been run, the initial  setting  is  0.   To  find  out  the
        current setting, type SET PORT <CR>.

     o  SET DPORT

        This option specifies the destination port number.  All  packets
        built  in  DEBUG  mode  will  contain  this  port  number as the
        destination.
MAINDEC-10-DFCIA-A-D                                             Page 52
TEST DESCRIPTIONS                                                                                                          SEQ 0056


        The initial setting of the destination port is  '14'.   To  find
        out the current setting, type SET DPORT <CR>.

     o  SET XCTID

        This option determines the transation ID to include  in  command
        packets  being  sent.  Typically, a test will initialize this to
        zero, and increment it after each packet is built.

        The initial setting of the XCT-ID is '12,34'.  To find  out  the
        current setting, type SET XCTID <CR>.

     o  SET PRINT

        This option determines the amount of the text portion  to  print
        when printing a packet.

        The initial setting of the flag is '3 words'.  To find  out  the
        current setting, type SET PRINT <CR>.

     o  SET IGNORE arg

        If the port is connected to the port and there are other  active
        nodes on the CI, the other nodes may periodically send datagrams
        to this port.  If the packets are  being  printed  as  they  are
        received,  these  extraneous  packets  may confuse things.  This
        option allows extraneous datagrams to be ignored.

        The initial setting of the flag  is  'YES'.   To  find  out  the
        current setting, type SET IGNORE <CR>.

     o  SET INTERV

        This parameter determines the interval to insert packets on  the
        command  queue  when running the special debug function 'WATCH'.
        If this is set to zero, packets will be stuffed on  the  command
        queue  until there is no more room, then as packets are received
        get put on the free  queue,  more  packets  are  placed  on  the
        command queue.

        The initial setting of the interval is '10  seconds'.   To  find
        out the current setting, type SET INTERV <CR>.

     o  SET SUMMAR

        This parameter determines the summary interval when running  the
        special  debug  function  'WATCH'.   Short  statistics  will  be
        printed at this interval.

        The initial setting of the interval is '60  seconds'.   To  find
        out the current setting, type SET SUMMAR <CR>.

     o  SET WHAT
MAINDEC-10-DFCIA-A-D                                             Page 53
TEST DESCRIPTIONS                                                                                                          SEQ 0057


        This command prints the current selection of each option.

     o  SET HELP

        This command  prints  a  help  message  describing  each  option
        available to the set command.


       TAKE file ext

       This command takes  commands  from  a  file.   The  file  may  be
    specified  as  an  argument  to  the  command.   If  no file name is
    specified, the default file name is used.  The default file name  is
    either 'DFCIA.CMD' or the last file specified.

       Any  legal  command  may  be  specified  including  another  TAKE
    command.  The presence of a TAKE or DDT or EXIT (from DFCIA) command
    in the take file will  terminate  use  of  the  current  file.   The
    diagnostic  prints  each  command  and  result on the terminal as it
    executes each command.

       The file specified must be on the load device known to MAGMON  or
    D20MON  or DIAMON.  If not, an error message is printed and the TAKE
    command is aborted.

       If any error occurs while processing  the  take  file,  the  TAKE
    command  is  aborted.   Errors include any unexpected errors such as
    unrecognized command, failures to start the port,  argument  errors,
    etc.

       NTAKE file ext

       This command is identical to the TAKE  command  with  the  single
    exception that the commands executed are not echoed on the terminal.
    All output resulting from execution of the commands is echoed.



    10.5.3.2  Starting, Stopping, Initializing the Port

       The START, SSTEP or STRACE commands can  be  given  at  any  time
    without  concern if the port is running or not.  The diagnostic will
    stop the port if it has to and clear any  error  condition.   If  it
    changes  the  state  of the port, the diagnostic prints a message to
    that effect.

       RESET

       Issue EBUS Reset.  This does a CONO APR,200000.  In user  mode  a
    'Port Clear' is done instead.

       CLEAR

       Issue a 'Port Clear'.  A 400000 is written to the CSR register.
MAINDEC-10-DFCIA-A-D                                             Page 54
TEST DESCRIPTIONS                                                                                                          SEQ 0058


       START adr

       The port is started at address specified.  The  procedure  is  as
    follows:

     o  Determine start address.  If no address is specified, the  start
        address  used  is  the  default  address  given  by the SET ADDR
        command.

     o  Determine start CSR data.  This is the data specified by  a  SET
        CSR  command.   Insert  the  necessary  bit  'MPRUN'  and ensure
        'SINCYC' bit is not set.

     o  Read the CSR register, if the port is already running  or  error
        bits are set, stop the port or clear error bits as necessary.

     o  Write the start address to the RAR

     o  Write CSR data to the CSR


       CONT

       This command is identical in function to the START  command  with
    the exception of the start address.  In addition, if the port is not
    already stopped, an error message is printed and the start  sequence
    aborted.  The start address is the last 'next' address obtained from
    a single step command.

       The only purpose of this command is to start up  the  port  after
    single stepping it for a while.

       STOP

       Stop the port micro-sequencer and print out the contents  of  the
    LAR.   If  the CSR is inaccessible, or if error bits CRAM PE or MBUS
    Error are set, an error message is printed.

       SSTEP n and STRACE n

       Single step the port  micro-sequencer  'n'  times.   Before  this
    command  is  done  the first time, the start data and start CSR data
    must be set up using the SSINIT command.   Thereafter,  the  address
    written to the RAR each time the port is single stepped is the 'last
    address' read from the LAR after the prior single step.

       STRACE causes the single step history data to be printed  at  the
    same  time that single steps are being done.  The data is printed in
    the same format as the SPRINT command except for the order in  which
    the single steps are printed.

       The port is stopped or  error  bits  are  cleared  from  the  CSR
    register as necessary before any single steps are done.
MAINDEC-10-DFCIA-A-D                                             Page 55
TEST DESCRIPTIONS                                                                                                          SEQ 0059


       If CRAM PE or MBUS Error bits become set in the CSR  register,  a
    message is printed and the single stepping is aborted.

       To abort the single step procedure at any time, type altmode.

       SPRINT n

       Print single step history data.  Data for the last  'n'  (maximum
    128)  single  steps  are  printed  in  the  following format.  If no
    argument is given, no more than 20 single steps are printed.

    |  DEBUG> SPRINT 4
    |
    |   RAR   LAR   CSR (final)  SS#
    |  0000  0100  000000 020010  12
    |  0100  0230  000000 020010  11
    |  0230  0231  000000 020010  10
    |  0231  0232  000000 020010  7


       SCLEAR

       Clear single step history data.

       SSINIT

       Set up single step data.  This sets the single step address to be
    the  default  address specified by the SET ADDR command.  The single
    step CSR data is set to the default data specified by  the  SET  CSR
    command.  Also, the single step history data is cleared.

       This command MUST be given in order to execute the  first  single
    step.  If not given the port will start at the last address executed
    by a single step.



    10.5.3.3  Handling port registers

       Each of the EBUF commands  can  be  given  at  any  time  without
    concern if the port is running or not.  The diagnostic will stop the
    port if it has to and clear any error condition.  If it changes  the
    state of the port, the diagnostic prints a message to that effect.

       ECSR

       Examine CSR Register.  The contents  are  printed  in  octal  and
    translated into English as well.

       DCSR dat

       Deposit CSR Register.  The data expected is up to 6 octal digits.

       ZCSR
MAINDEC-10-DFCIA-A-D                                             Page 56
TEST DESCRIPTIONS                                                                                                          SEQ 0060


       Zero CSR Register.  This also stops the port if it is running.

       EEBUF

       Examine EBUF register.  The data is printed in halfword format.

       The port is stopped or  error  bits  are  cleared  from  the  CSR
    register as necessary before reading the EBUF.  Then the 'Test EBUF'
    bit is set in the CSR register if it is not already set and the EBUF
    is read.

       DEBUF dat

       Deposit EBUF register.  The data  expected  is  up  to  12  octal
    digits.

       The port is stopped or  error  bits  are  cleared  from  the  CSR
    register as necessary before reading the EBUF.  Then the 'Test EBUF'
    bit is set in the CSR register if it is not already set and the EBUF
    is written.

       ZEBUF

       Zero EBUF register

       The port is stopped or  error  bits  are  cleared  from  the  CSR
    register as necessary before reading the EBUF.  Then the 'Test EBUF'
    bit is set in the CSR register if it is not already set and the EBUF
    is zeroed.

       ELAR

       Examine LAR register and  print  it  as  'LAR/  0000'.   This  is
    actually  a  13 bit register.  The right most bit is the bit written
    to the RAR register to specify which half of  the  CRAM  to  access.
    This bit is not printed.

       DRAR dat

       Deposit RAR register.  The data consists of a 12 bit CRAM address
    followed by one bit specifying left or right half.  Example:

    |  DEBUG> DRAR 0            ; Write location 0 (right half)
    |  DEBUG> DRAR 1            ; Write location 0 (left half)
    |  DEBUG> DRAR 10           ; Write location 4 (right half)
    |  DEBUG> DRAR 11           ; Write location 4 (left half)


       ZRAR

       Zero RAR register.
MAINDEC-10-DFCIA-A-D                                             Page 57
TEST DESCRIPTIONS                                                                                                          SEQ 0061


    10.5.3.4  Handling port CRAM locations

       Each of the following commands can be given at any  time  without
    concern if the port is running or not.  The diagnostic will stop the
    port if it has to and clear any error condition.  If it changes  the
    state  of  the port, the diagnostic prints a message to that effect.
    The diagnostic also ensures that 'Test EBUF' bit is not set and 'Sel
    LAR' bit is not set.

       Commands that read or write CRAM locations  are  given  up  to  2
    arguments.  The action in each case is as follows:


     o  No arguments - The CRAM addresses used are those last used.   So
        if  a zero CRAM command is given to clear locations 1001 through
        1004, a subsequent examine cram command with no arguments  would
        examine locations 1001 through 1004.

     o  One  argument  -  The  range  of  CRAM  locations  is  taken  as
        addr1,addr1.

     o  Two arguments  -  The  range  of  CRAM  locations  is  taken  as
        addr1,addr2.


       DCRAM adr,adr

       Deposit  into  CRAM  locations  specified  either   by   explicit
    arguments  or by default.  The format of the data is the same format
    produced as output of the MICRO2 assembler.  Example:

    |  DEBUG> DCRAM 10
    |
    |  Type xxxx,xxxx,xxxx,xxxx,xxxx
    |  0010 ::   11,22,33,44,55


       BCRAM adr,adr

       Deposit  into  CRAM  locations  specified  either   by   explicit
    arguments  or  by default.  The data is asked for each location, one
    field at a time.  The initial  data  to  be  written  to  each  CRAM
    location is zero.  Example:

    |  DEBUG> BCRAM 10
    |
    |  Type  value,value... or ^,CR,^Z,field name
    |  0010 ::
    |  J - 
    |  PAR -              Type:  value<CR> value<CR> ...
    |  OENA -               or:  value,value,...<CR>
    |  MGC -                or:  ^ to back up to the previous
    |  SORC -                       value
    |  FUNC -               or:  <CR> to leave a value unchanged
    |  DEST -               or:  field name such as MGC or FUN or
    |  CENA -                       A or M (for MGC) .. to skip to
MAINDEC-10-DFCIA-A-D                                             Page 58
TEST DESCRIPTIONS                                                                                                          SEQ 0062


    |  RAM -                        a particular field
    |  A -                  or:  ^Z to terminate input and store
    |  B -                          the CRAM location
    |  SK -                 or:  $ (altmode) to abort the command
    |  BUS -                        and not store anything
    |  CRY - 
    |  CTL - 
    |  TIME -
    |  SPARE - 
    |  MARK - 

        Note:  Everything can be typed on one line, such as this
               example to change A, B, and MGC fields only:

    |         DEBUG> BCRAM 10
    |
    |         Type  value,value... or ^,CR,^Z,field name
    |         0010 ::
    |         J - A,3,4,M,1234,^Z
    |
    |         DEBUG>


       ACRAM adr,adr

       Alter CRAM locations specified either by explicit arguments or by
    default.   The data is asked for each location, one field at a time.
    Example:

    |  DEBUG> ACRAM 10
    |
    |  Type  value,value... or ^,CR,^Z,field name
    |  0010 ::
    |  0 J - 
    |  0 PAR -              Type:  value<CR> value<CR> ...
    |  0 OENA -               or:  value,value,...<CR>
    |  33 MGC -               or:  ^ to back up to the previous
    |  0 SORC -                       value
    |  1 FUNC -               or:  <CR> to leave a value unchanged
    |  0 DEST -               or:  field name such as MGC or FUN or
    |  0 CENA -                       A or M (for MGC) .. to skip to
    |  0 RAM -                        a particular field
    |  0 A -                  or:  ^Z to terminate input and store
    |  0 B -                          the CRAM location
    |  22 SK -                or:  $ (altmode) to abort the command
    |  0 BUS -                        and not store anything
    |  1 CRY - 
    |  0 CTL - 
    |  0 TIME - 
    |  0 SPARE - 
    |  0 MARK - 

        Note:  Everything can be typed on one line, as in the
               example under 'BCRAM' command above.
MAINDEC-10-DFCIA-A-D                                             Page 59
TEST DESCRIPTIONS                                                                                                          SEQ 0063


       ECRAM adr,adr

       Examine CRAM locations specified either by explicit arguments  or
    by  default.   The  data  is  printed  in  MICRO2  assembler format.
    Example:

    |  DEBUG> ECRAM 10,12
    |
    |  0010 / 0000 0001 0400 0000 0400
    |  0011 / 0000 0001 1400 0000 0440
    |  0012 / 0000 0001 2400 0000 0500


       LCRAM adr,adr

       List CRAM locations specified either by explicit arguments or  by
    default.  The data is printed in bit field format.  Example:

    |  DEBUG> LCRAM 0,3
    |
    |  ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK
    |     0/    0  0   0    0  0   1   0   0  0   0  0  0  0   0  JZ    0  0  0 
    |     1/    0  0   0    0  0   3   0   0  0   0  0  0  0   0  JZ    0  1  0 
    |     2/    0  0   0    0  0   5   0   0  0   0  0  0  0   0  JZ    0  2  0 
    |     3/    0  0   0    0  0   7   0   0  0   0  0  0  0   0  JZ    0  3  0 


       ZCRAM adr,adr

       Zero CRAM locations specified either by explicit arguments or  by
    default.



    10.5.3.5  2901 Commands

       Each of the following commands can be given at any  time  without
    concern if the port is running or not.  The diagnostic will stop the
    port if it has to and clear any error condition.  If it changes  the
    state of the port, the diagnostic prints a message to that effect.

       These commands may be given up to 2  arguments.   The  action  in
    each case is as follows:


     o  No arguments - The 2901 registers used are those last used.   So
        if  registers  0  through  4  are examined, a subsequent examine
        command with no arguments would examine registers 0 through 4.

     o  One  argument  -  The  range  of  2901  registers  is  taken  as
        reg1,reg1.

     o  Two arguments  -  The  range  of  2901  registers  is  taken  as
        reg1,reg2
MAINDEC-10-DFCIA-A-D                                             Page 60
TEST DESCRIPTIONS                                                                                                          SEQ 0064


       E2901 reg,reg

       Examine the contents of the range of  2901  registers  specified.
    Microcode  is  loaded  into the port to accomplish this, but no 2901
    registers or local storage locations are affected.  And the original
    contents of the CRAM location used are restored.

       D2901 reg,data

       Deposit the data into the 2901 register specified.  Microcode  is
    loaded  into the port to accomplish this, and only the 2901 register
    specified is affected.  The original contents of the  CRAM  location
    used are restored.

       To deposit data into successive registers, additional data can be
    typed.   For example, to load registers 3,4,5,6 with 333,444,555,666
    respectively, type the following:

    |  DEBUG> D2901 3,333,444,555,666
    |


       Z2901 reg,reg

       Zero the range of 2901 registers specified.  Microcode is  loaded
    into the port to accomplish this.  The original contents of the CRAM
    location used are restored.



    10.5.3.6  Local Storage Commands

       Each of the following commands can be given at any  time  without
    concern if the port is running or not.  The diagnostic will stop the
    port if it has to and clear any error condition.  If it changes  the
    state of the port, the diagnostic prints a message to that effect.

       These commands may be given up to 2  arguments.   The  action  in
    each case is as follows:


     o  No arguments - The local storage addresses used are  those  last
        used.   So  if  a  zero  local storage command is given to clear
        locations 101 through 104, a subsequent  examine  local  storage
        command  with  no arguments would examine locations 1001 through
        1004.

     o  One argument - The range of local storage locations is taken  as
        addr1,addr1.

     o  Two arguments - The range of local storage locations is taken as
        addr1,addr2
MAINDEC-10-DFCIA-A-D                                             Page 61
TEST DESCRIPTIONS                                                                                                          SEQ 0065


       ELOCS adr,adr

       Examine  local  storage  addresses  specified  by  the  range  of
    addresses.  Microcode is loaded into the port to accomplish this and
    several 2901 registers are  destroyed  in  the  process.   No  local
    storage  locations  are  affected.  And the original contents of the
    CRAM locations used are restored.

       DLOCS adr,dat

       Deposit local storage address 'adr' with 36 bit octal data 'dat'.
    Microcode  is  loaded  into  the port to accomplish this and several
    2901 registers are destroyed  in  the  process.   No  local  storage
    locations  are  affected.   And  the  original  contents of the CRAM
    locations used are restored.

       To deposit data into successive locations, additional data can be
    typed.    For   example,  to  load  locations  103,104,105,106  with
    333,444,555,666 respectively, type the following:

    |  DEBUG> DLOCS 103,333,444,555,666
    |


       ZLOCS adr,adr

       Zero local storage addresses specified by the range of addresses.
    Microcode  is  loaded  into the port to accomplish this, but no 2901
    registers or local storage locations are affected.  And the original
    contents of the CRAM locations used are restored.



    10.5.3.7  Mark Bit Commands

       Each CRAM word has a mark bit that can be set or cleared.  It  is
    used  only  to  sync  a scope on.  Parity is not calculated for this
    location.

       The diagnostic does not keep track of which locations  have  mark
    bits  set.   If  it  is requested to list marked CRAM locations, the
    diagnostic just looks for locations with the mark bit set.

       Each of these commands can be given at any time  without  concern
    if the port is running or not.  The diagnostic will stop the port if
    it has to and clear any error condition.  If it changes the state of
    the port, the diagnostic prints a message to that effect.

       MARK adr1,adr2,adr3,...

       Set mark bit at locations adr1,adr2,adr3,...

       RMARK adr1,adr2,adr3,...
MAINDEC-10-DFCIA-A-D                                             Page 62
TEST DESCRIPTIONS                                                                                                          SEQ 0066


       Remove mark bit from locations adr1,adr2,adr3,...

       CMARK adr1,adr2

       Clear all mark bits between adr1 and adr2.  If only one  argument
    is  given  only  that one location is rewritten without the mark bit
    set.  If no arguments  are  supplied,  all  mark  bits  are  cleared
    throughout the CRAM.

       LMARK adr1,adr2

       List all locations with mark bit set between adr1 and  adr2.   If
    only one argument is given only that one location is checked.  If no
    arguments are supplied, all location with the  bit  set  are  listed
    throughout the CRAM.



    10.5.3.8  Breakpoint Commands

       A breakpoint  consists  of  a  location  with  bad  parity.   The
    diagnostic  does not keep track of these locations itself.  If it is
    requested to list breakpoints, it just looks for locations with  bad
    parity.

       Each of these commands can be given at any time  without  concern
    if the port is running or not.  The diagnostic will stop the port if
    it has to and clear any error condition.  If it changes the state of
    the port, the diagnostic prints a message to that effect.

       BREAK adr1,adr2,adr3,...

       Set breakpoints at locations adr1,adr2,adr3,...

       RBREAK adr1,adr2,adr3,...

       Remove breakpoints from locations adr1,adr2,adr3,...

       CBREAK adr1,adr2

       Clear all  breakpoints  between  adr1  and  adr2.   If  only  one
    argument  is  given  only  that  one location is rewritten with good
    parity.  If no arguments are supplied, all breakpoints  are  removed
    throughout the CRAM.

       LBREAK adr1,adr2

       List breakpoints between adr1 and adr2.  If only one argument  is
    given  only  that  one  location  is  checked for bad parity.  If no
    arguments are supplied, all breakpoints are  listed  throughout  the
    CRAM.
MAINDEC-10-DFCIA-A-D                                             Page 63
TEST DESCRIPTIONS                                                                                                          SEQ 0067


    10.5.3.9  Microcode Commands

       Each of these commands can be given at any time  without  concern
    if the port is running or not.  The diagnostic will stop the port if
    it has to and clear any error condition.  If it changes the state of
    the port, the diagnostic prints a message to that effect.

       LOAD tst

       Load microcode from Test 'tst' into CRAM and verify  the  result.
    Example:

    |  DEBUG> LOAD 3
    |
    |  [Done - Number of CRAM locations loaded/verified = 182.]


       LIST tst

       List microcode from Test 'tst'.  All locations are listed in  the
    order  that  they  would be loaded, not necessarily in order by CRAM
    address.  Example:

    |  DEBUG> LIST 3
    |
    |  ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK
    |     0/    2  0   0    0  0   0   0   0  0   0  0  1  0   0  CJPP  0  0  0 
    |     1/   10  1   0    0  0   0   0   0  0   0  0  0  0   0  JMAP  0  0  0 
    |     2/    4  1   0    0  0   0   0   0  0   0  0  3  0   0  CJPP  0  0  0 
    |     3/   11  0   0    0  0   0   0   0  0   0  0  0  0   0  JMAP  0  0  0 
    |     ...


       FLOAD

       Load microcode from file into a buffer and from the  buffer  into
    CRAM.   The file used is the default file name KLIPA.ULD or the file
    last specified by the SET FNAME command.  DIAMON or D20MON or MAGMON
    must be loaded in order to load the microcode from the selected load
    device.  The diagnostic prints an error message if it cannot  access
    the microcode file.  This command also verifies the microcode it has
    loaded.  Example:

    |  DEBUG> FLOAD
    |  
    |  [Reading file: K402.ULD]
    |  
    |  [3040. microwords loaded]
    |  
    |  [Loading K402.ULD into CRAM]
    |  
    |  [3040. CRAM locations loaded/verified]>
    |  
    |  [Ucode version 402]
    |  
    |  DEBUG>
MAINDEC-10-DFCIA-A-D                                             Page 64
TEST DESCRIPTIONS                                                                                                          SEQ 0068




       FVERFY

       This command causes the microcode  previously  loaded  into  CRAM
    from  a  file  to  be  verified.  Up to 3 verify errors are printed.
    Example:

    |  DEBUG> FVERFY
    |  
    |  3040. CRAM locations loaded - 74. verify errors:
    |   Addr           Correct                  Actual
    |   0000   0002 0000 1631 6702 0060   0000 0000 0100 0000 0000 
    |   0001   0002 0000 7510 0002 0060   0000 0000 0300 0000 0002 
    |   0002   0007 2000 4315 6002 0060   0000 0000 0500 0000 0004 
    |  
    |  DEBUG>


       FLIST

       List microcode in file in field format.  The  file  used  is  the
    default  file  name  KLIPA.ULD or the file last specified by the SET
    FNAME command.  DIAMON or D20MON or MAGMON must be loaded  in  order
    to  obtain  the  microcode  from  the  selected  load  device.   The
    diagnostic prints an error message if it cannot access the microcode
    file.  Example:

    |  DEBUG> FLIST
    |
    |  ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK
    |     0/    2  0   0    0  1   6   3   0  0  16 16  2  0   0  CJP   0  0  0 
    |     1/    2  1   0    0  7   5   1   0  0   0  0  2  0   0  CJP   0  0  0 
    |     2/    7  0   1    0  4   3   1   1  0  16  0  2  0   0  CJP   0  0  0 
    |     ...


       FEXAM

       List microcode in file in MICRO2 format.  The file  used  is  the
    default  file  name  KLIPA.ULD or the file last specified by the SET
    FNAME command.  DIAMON or D20MON or MAGMON must be loaded  in  order
    to  obtain  the  microcode  from  the  selected  load  device.   The
    diagnostic prints an error message if it cannot access the microcode
    file.  Example:

    | DEBUG> FEXAM
    |
    |  0000 / 0001 0000 1631 6702 0060
    |  0001 / 0025 6000 4315 6542 0060
    |  0007 / 0004 4000 7510 7542 0060
    |  ...
MAINDEC-10-DFCIA-A-D                                             Page 65
TEST DESCRIPTIONS                                                                                                          SEQ 0069


    10.5.3.10  Statistics Commands

       STATIS

       This command prints accumulated statistics.  Statistics are  kept
    only  on  packets  sent and packets received and various information
    connected with each.  See the Section 6.9.1  'Statistics  Printouts'
    for more details.

       ZSTATS

       This   command   clears   statistics.    Statistics   are    also
    automatically cleared whenever the diagnostic is restarted via a STM
    command.



    10.5.3.11  CI Configuration Commands

       CONFIG

       This command is identical to  running  TST61  'REQID  Test'.   It
    loads  operational  microcode  if  necessary,  then sends Request-ID
    packets to all possible nodes.  A configuration table is  built  and
    the configuration is then printed.  For example:

    |  What test - CONFIG
    |  
    |  ***** CI Configuration *****
    |   Port   Port       Dual  Maint  Port
    |  Number  Type       Path  State  State
    |  ------  ---------  ----  -----  -------
    |     1    KL10-Self  Yes   No     Initialized
    |     5    HSC-50     Yes   No     Initialized


       CONPNT

       This command prints the configuration last determined.



    10.5.3.12  CI Commands

       PINIT

       This command initializes the port control block and  all  of  the
    queues specified in it.

       SIDLE

       This command  sets  up  the  3  word  data  transfer  giving  the
    initialization  data  used by the microcode at start up.  It ensures
    that EPT location 34 contains a jump CCW word to the CCW in the PCB.
    Then  the diagnostic starts up the IPA and waits up to 2 seconds for
    the microcode to enter the idle loop.  If it does not, a message  to
MAINDEC-10-DFCIA-A-D                                             Page 66
TEST DESCRIPTIONS                                                                                                          SEQ 0070


    that effect is printed.

       BPACK opcode

       This command builds a packet  which  can  then  be  placed  on  a
    command  queue.   A  packet  is  built  based  on opcode and program
    options.

       It  is  assumed  that  the  PCB  and  queues  have  already  been
    initialized.  The microcode need not have been started however.

       A list of opcodes may be obtained by typing BPACK ?  as follows:

    |  DEBUG> BP ?
    |  BPACK opcode (CR), where opcode:
    |  1-SndDg    7-SndStrt  15-SndLb    22-SntMdat  33-RdCnt
    |  2-SndMsg  10-ReqDat0  16-ReqMdat  30-ClsBuf   36-WrReg
    |  5-ReqId   11-ReqDat1  20-SndDat   31-SetCkt   37-RdReg
    |  6-SndRst  12-ReqDat2  21-RetDat   32-SetCnt
    |
    |  DEBUG>


       IQUEUE queue

       This command places a packet that has already been built  on  the
    specified command queue.

       PQUEUE queue1,queue2

       This command prints specified queue(s).  If only one queue number
    is  given, only that queue will be printed.  If a range of queues is
    given all of the queues specified will be printed.

       The queues are printed in the following format:

    |  DEBUG> PQUEUE 0,6
    |  
    |  CmdQ3 (PCB+3):   Flink = PCB+3       Blink = PCB+3
    |   Queue is empty
    |  
    |  CmdQ2 (PCB+6):   Flink = PCB+6       Blink = PCB+6
    |   Queue is empty
    |  
    |  CmdQ1 (PCB+11):  Flink = PCB+11      Blink = PCB+11
    |   Queue is empty
    |  
    |  CmdQ0 (PCB+14):  Flink = PCB+14      Blink = PCB+14
    |   Queue is empty
    |  
    |  RspQ (PCB+17):   Flink = PCB+17      Blink = PCB+17
    |   Queue is empty
    |  
    |  MsgFQ (PCB+22):  Flink = BUFF+400    Blink = BUFF+2000
    |   BUFF+400/   Flink = BUFF+1000       Blink = PCB+22
    |   BUFF+1000/  Flink = BUFF+1400       Blink = BUFF+400
MAINDEC-10-DFCIA-A-D                                             Page 67
TEST DESCRIPTIONS                                                                                                          SEQ 0071


    |   BUFF+1400/  Flink = BUFF+2000       Blink = BUFF+1000
    |   BUFF+2000/  Flink = PCB+22          Blink = BUFF+1400
    |  
    |  DgmFQ (PCB+25):  Flink = BUFF+2400   Blink = BUFF+7000
    |   BUFF+2400/  Flink = BUFF+3000       Blink = PCB+25
    |   BUFF+3000/  Flink = BUFF+3400       Blink = BUFF+2400
    |   BUFF+3400/  Flink = BUFF+4000       Blink = BUFF+3000
    |   BUFF+4000/  Flink = BUFF+4400       Blink = BUFF+3400
    |   BUFF+4400/  Flink = BUFF+5000       Blink = BUFF+4000
    |   BUFF+5000/  Flink = BUFF+5400       Blink = BUFF+4400
    |   BUFF+5400/  Flink = BUFF+6000       Blink = BUFF+5000
    |   BUFF+6000/  Flink = BUFF+6400       Blink = BUFF+5400
    |   BUFF+6400/  Flink = BUFF+7000       Blink = BUFF+6000
    |   BUFF+7000/  Flink = PCB+25          Blink = BUFF+6400


       PPCB

       This command prints the current state of the PCB, as follows:

    |  DEBUG> PPCB
    |  
    |  PCB:
    |   BHD Base Addr:    70034
    |   Queue Length:       400
    ;   Reserved Word:        0
    ;   Port Err Wd1: 000000 000000 
    ;   Port Err Wd2: 000000 000000 
    |   PCB Base Addr:    67000
    |   PI Level:             0
    |   Int Vector:           0
    |   CCW:          000000 000000 
    |   Reserved Word:        0
    |   #  Queue   PCB Addr    Interlock    Flink    Blink
    |   -  -----   --------    ---------    -----    -----
    |   0  CmdQ3    PCB+2       -1       PCB+3       PCB+3
    |   1  CmdQ2    PCB+5       -1       PCB+6       PCB+6
    |   2  CmdQ1    PCB+10      -1       PCB+11      PCB+11
    |   3  CmdQ0    PCB+13      -1       PCB+14      PCB+14
    |   4  RspQ     PCB+16      -1       PCB+17      PCB+17
    |   5  MsgFQ    PCB+21      -1       BUFF+400    BUFF+2000
    |   6  DgmFQ    PCB+24      -1       BUFF+2400   BUFF+7000


       WATCH

       This command allows one to watch the port and print  events  that
    occur.   If a command packet has previously been built, one may also
    place the packet again and again on the command queue.

       The diagnostic checks the CSR register periodically and prints it
    out whenever it changes.  It also looks for entries appearing on the
    response queue - if any are found they are removed from the response
    queue,  printed  out,  and  placed  back  on  the  free  queue.  The
    diagnostic also sets 'CmdQ Avail' bit in the CSR register  if  there
    is a command queue entry which has not yet been processed.
MAINDEC-10-DFCIA-A-D                                             Page 68
TEST DESCRIPTIONS                                                                                                          SEQ 0072


       While watching the port, 7 characters  may  be  typed  to  obtain
    information or to perform some action:

     o  S - Insert another packet on the command queue (same  packet  as
        the last one built).

     o  O - Insert packets on the command queue (same packet as the last
        one  built).   Insert them at the interval specified by the 'SET
        INTERV' command or 10 seconds  if  the  interval  has  not  been
        explicitly defined.

     o  0 - Turn off echoing of packets sent and received.

     o  1 - Turn on echoing of packets sent and received.

     o  2 - Print CSR register.

     o  3 - Print PCB contents.

     o  4 - Print statistics

     o  $ (altmode) - Exit (back to DEBUG> prompt).


       DEPPAK offset,data

       Data can be initialized in a packet by using the BPACK command or
    by  going  into  DDT  and  physically  inserting the desired data at
    location PACKET.  To make this easier,  the  DEPPAK  command  allows
    data  to  be inserted in PACKET by giving the offset into PACKET and
    the data, without going into DDT.  This is then useful if a  command
    file  is  created  with a string of DEPPAK commands.  Then a TAKE of
    the command file is done to load the packet data.



    10.5.3.13  PLI Register Commands

       DPLI lnk,data,rep

       This command allows one to write 8 bits  of  data  over  the  PLI
    interface.   The  link  control  bits  specifying  the  register  is
    specified, as well as the 8 bit data.  Also, a repeat count  can  be
    given to repeat the deposit more than once.

       This can be used to write data into the transmit  buffer,  as  in
    the following example:

    |  DEBUG> DPLI ?
    |  DPLI lnkctrl,data,repcount (CR) where lnkctrl is:
    |   0-Unused   4-Unused  10-LdXBuf  14-Xmit
    |   1-RdRSta   5-RdBuff  11-RdXSta  15-RdNode
    |   2-RsXSta   6-EnaLnk  12-AboXmt  16-DsaLnk
    |   3-RdPRev   7-SelBuf  13-SetMod  17-Sync
    |  
    |  DEBUG> DPLI 7,2               ; Select transmit buffer A
MAINDEC-10-DFCIA-A-D                                             Page 69
TEST DESCRIPTIONS                                                                                                          SEQ 0073


    |  
    |  DEBUG> DPLI 10,1              ; Write 1 to location 0
    |  
    |  DEBUG> DPLI 10,2              ; Write 2 to location 1
    |  
    |  DEBUG> DPLI 10,3              ; Write 3 to location 2
    |  
    |  DEBUG> DPLI 10,0,1000         ; Write 0's to next 1000 bytes
    |  
    |  DEBUG>


       EPLI lnk,rep Examine PLI data

       This command reads 8 bit data over the PLI interface.   The  link
    control  bits  are  specified  to indicate what register to read.  A
    repeat count is given to allow reading the register more than  once,
    which is useful when reading one of the transmit or receive buffers.

       An example follows:

    |  DEBUG> EPLI ?
    |  EPLI lnkctrl,repcount (CR) where lnkctrl is:
    |   0-Unused   4-Unused  10-LdXBuf  14-Xmit
    |   1-RdRSta   5-RdBuff  11-RdXSta  15-RdNode
    |   2-RsXSta   6-EnaLnk  12-AboXmt  16-DsaLnk
    |   3-RdPRev   7-SelBuf  13-SetMod  17-Sync
    |  
    |  DEBUG> DPLI 7,6               ; Select transmit buffer A
    |  
    |  DEBUG> EPLI 5,10              ; Read first 10 locations
    |  
    |  5-RdBuff:
    |   0/ 000 
    |   1/ 000 
    |   2/ 000 
    |   3/ 000 
    |   4/ 000 
    |   5/ 000 
    |   6/ 000 
    |   7/ 000 
    |  
    |  DEBUG>


       IPLI

       This command loads special microcode into the  CRAM,  saving  the
    original  contents,  and resets the PILA and Link modules.  Then the
    CRAM locations are restored.
MAINDEC-10-DFCIA-A-D                                             Page 70
TEST DESCRIPTIONS                                                                                                          SEQ 0074


    10.5.3.14  Miscellaneous Commands

       TRANSL dat

       This is used if a description of the CSR register is not at hand.
    The data (36 bits) is translated into English.  Example:

    |  DEBUG> TRANSL 3000
    |
    |  CSR: 000000 003000 FQErr  MVErr  


       FILLNX dat

       This command fills all of CRAM with special data 'J=.+1,CTL=dat'.
    The  argument specified is the control field for the microsequencer.
    This  may  be  useful  when   testing   out   dispatching   of   the
    microsequencer.

       If the port is running or halted with  an  error  condition,  the
    diagnostic  stops  the  port  and clears any error condition.  If it
    changes the state of the port, the diagnostic prints  a  message  to
    that effect.

       Example:  Fill CRAM with JMAP (unconditional jump) instructions:

    |  DEBUG> FILLNX 2
    |
    |  [Number of CRAM locations loaded = 4096.]
    |
    |  Cram now contains:
    |
    |  0000/ JMAP J=1
    |  0001/ JMAP J=2
    |  ...
    |  7776/ JMAP J=7777
    |  7777/ JMAP J=0


       FILLPC dat

       This command fills all of CRAM with special  data  'J=.,CTL=dat'.
    The  argument specified is the control field for the microsequencer.
    This  may  be  useful  when   testing   out   dispatching   of   the
    microsequencer.

       If the port is running or halted with  an  error  condition,  the
    diagnostic  stops  the  port  and clears any error condition.  If it
    changes the state of the port, the diagnostic prints  a  message  to
    that effect.

       Example:  Fill CRAM with JMAP (unconditional jump) instructions:

    |  DEBUG> FILLPC 2
    |
    |  [Number of CRAM locations loaded = 4096.]
MAINDEC-10-DFCIA-A-D                                             Page 71
TEST DESCRIPTIONS                                                                                                          SEQ 0075


    |
    |  Cram now contains:
    |
    |  0000/ JMAP J=0
    |  0001/ JMAP J=1
    |  ...
    |  7776/ JMAP J=7776
    |  7777/ JMAP J=7777


       CCODE

       This command determines the setting of each  condition  code  and
    prints  it  out.  It loads special microcode to do this but restores
    the original contents afterwards.

       Some condition codes cannot be seen in their proper  state  since
    this  command  may change them.  These are 'CSR Changed', 'MB Sign',
    and 'F Eql Zero', but they are printed anyway.  For example:

    |  What test - CCODE
    |
    |  CC On:   CBAV FEQ0 CSRC MVRP PLPE CBLW
    |  CC Off:  GCSR EBPE AFUL BFUL XATN ERQS IACT MSGN CBPE CHER


       ESTACK

       This  command  determines  the  contents  of  the  internal  2910
    microsequencer  stack.   It  loads  special microcode to do this but
    restores the original contents afterwards.  For example:

    |  What test - ESTACK
    |
    |  2910 Stack:
    |   Location   Contents (addr)
    |     Top        3042
    |      -1         733
    |      -2         140
    |      -3        5732
    |      -4          10


       ENEXT

       ENEXT does an  'examine  next'  function.   Whatever  examine  or
    deposit operation was previously done, the next location or register
    is examined.  The commands which set up for  an  examine  next  are:
    ECRAM,  DCRAM,  BCRAM,  ACRAM,  ZCRAM,  LCRAM,  E2901, D2901, Z2901,
    ELOCS, DLOCS, ZLOCS, EPLI, and DPLI.

       DNEXT arg

       DNEXT does an  'deposit  next'  function.   Whatever  examine  or
    deposit  operation  was previously done, the data given is deposited
    into the next location or register.  No argument is expected on  the
MAINDEC-10-DFCIA-A-D                                             Page 72
TEST DESCRIPTIONS                                                                                                          SEQ 0076


    BCRAM  or  ACRAM  type  of  deposit,  the data for each field of the
    microword will be queried.  The commands which set up for an examine
    next  are:   ECRAM, DCRAM, BCRAM, ACRAM, ZCRAM, LCRAM, E2901, D2901,
    Z2901, ELOCS, DLOCS, ZLOCS, EPLI, and DPLI.

       DUMP

       This command prints the complete state of the  port.   It  prints
    the following data:

     o  CSR data

     o  EBUF contents

     o  LAR contents

     o  2901 register contents

     o  2910 stack contents

     o  PCB

     o  Queues

     o  Local storage contents

     o  Transmit and receive buffers contents

     o  Channel logout data


       IPRINT

       This command prints accumulated interrupt activity.  The data for
    up  to 20 interrupts are held in an interrupt data table.  This data
    can be printed with this command.

       Printing can be aborted by typing an  altmode  or  suppressed  by
    typing a Control-O.

       ICLEAR

       This  command  clears   the   accumulated   interrupt   activity.
    Subsequent interrupts are numbered 1,2,...

       IINIT

       In the event the PI system  got  shut  off  in  exec  mode,  this
    command  may  be given to initialize the interrupt system and set up
    40+2n addresses.  This may be useful in  the  event  the  diagnostic
    shuts off the PI system because of too many interrupts - this occurs
    after 8192 interrupts.
MAINDEC-10-DFCIA-A-D                                             Page 73
TEST DESCRIPTIONS                                                                                                          SEQ 0077


    10.5.3.15  Data Transfer Commands

       CCWPNT

       This command prints the CCW list last generated which is kept  in
    PCB+27.  Example:

    |  DEBUG> CCWPNT
    |
    |  CCW (PCB+32):  000000 000000   OP=Halt WC=0. Adr=00000000 


       LOGPNT

       This command prints the logout data last stored  by  the  channel
    upon  receipt  of  the 'store' command issued by the microprocessor.
    Example:

    |  DEBUG> LOGPNT
    |
    |  Channel-7 Logout Data
    |  Loc   Contents
    |   1    ICW: 000000 000000 
    |   2    SW1:   CLP points to: 0
    |   3    Last Updated CCW: 000000 000000    WC=0.  ADR=0




    10.5.3.16  Switches

       SWITCH

       Enter switch information.  Switches can  be  entered  as  in  the
    following  example.   Usually, though, it is easier just to type the
    switch name to turn on or off a switch.

    |  DEBUG> SWITCH
    |
    |  Print the selectable pgm switches? (Y or N) - Y
    |
    |  ----Left Side Switches--------   ----Right Side Switches--------
    |
    |  SW    KL10     11    Function     SW   Value  Function
    |  --    ----    ----   --------     --   -----  --------
    |   0   400000  100000  Abort        18  400000  Program trace
    |   ...
    |
    |  Switches = 020010 004000 
    |
    |  20010  LH Switches <# or ?> - ?
    |
    |  Type  Y,N,^,CR,^Z
    |
    |  N ABORT - 
    |  N RSTART - 
MAINDEC-10-DFCIA-A-D                                             Page 74
TEST DESCRIPTIONS                                                                                                          SEQ 0078


    |  ...
    |
    |  4000  RH Switches <# or ?> - ?
    |
    |  Type  Y,N,^,CR,^Z
    |
    |  N TRACE - 
    |  N INHFLT - 
    |  ...


       SWPRIN

       Print current switch settings.  Example:

    |  DEBUG> SWPRIN
    |
    |  Switches:  020010 002000   PNTLPT OPRSEL UDEBUG 


    NOPNT    PALERS   TRACE    LOOPTS   MDEBUG   EDEBUG
    PNTLPT   RELIAB   INHFLT   RUNALL   SDEBUG
    DING     TXTINH   INHMSG   DSPEAR   LDEBUG
    ERSTOP   OPRSEL   LOOPGM   UDEBUG   DDEBUG

       The name of each of these switches can be typed.  The  result  is
    to  complement  the switch setting.  If left hand switches are typed
    in exec mode an error message is printed.
MAINDEC-10-DFCIA-A-D                                             Page 75
PROGRAM RUN TIME                                                                                                           SEQ 0079


11.0  PROGRAM RUN TIME

       The run time varies according to the sequence  of  tests  chosen,
    the  test options selected, and the program switch options selected.
    In default mode the run time is approximately 4  minutes,  excluding
    any time taken to print error messages.

       Running all of the tests with 'RELIAB'  switch  set  extends  the
    time by a factor of 4 - to 16 minutes.
MAINDEC-10-DFCIA-A-D                                             Page 76
APPENDIX                                                                                                                   SEQ 0080


12.0  APPENDIX

    12.1  Special Configurations

    12.1.1  DMT Configuration

       There are several features of the diagnostic which enable  it  to
    be used for DMT.  The DMT configuration is as follows:

     o  One KL10

     o  Four  ports  and  link/packet  module  sets,  all  connected  to
        separate sections of a fully configured STAR Coupler so that all
        are independent

     o  TOPS-20 Release 5.0 or later (modified so that the  system  does
        not know about RH's 1,3,5,7)

     o  DFCIA being run under PTYCON (4 copies)




    12.1.2  Creating the Modified Diagnostics

       The diagnostic must be modified to create 4 different copies each
    for a different RH20 slot.  The changes are:

     o  DIAG 'Request device' and 'Release device'  are  replaced  by  a
        SKIPA (to noop the action)

     o  Port number (MBC number) is changed to  reflect  the  particular
        port

     o  Switches are set to 10,,140 which are 'OPRSEL',  'DDUMP'  (which
        can  cause  a  complete  dump  of  the port to be printed (where
        appropriate)), and 'EDEBUG' (which prints port number, date, and
        time with each error message)

     o  The  diagnostics  are   renamed   to   DFCIA1.EXE,   DFCIA3.EXE,
        DFCIA5.EXE, and DFCIA7.EXE to reflect the port number


       To create the 4 copies, the following steps are done:  Note  that
    the  diagnostic  is  modified  by  the  EXEN$G (which eliminates the
    DIAG's) and the P7$G ...  (which changes the port number).

            @RUN D20MON
            
            * D20MON [DDQDH] - DECSYSTEM20 DIAGNOSTIC MONITOR - VER 0.3 *
            
            D20MON CMD - DFCIA
            
            DFCIA CI Port Functional Diagnostic
            VERSION 1.1, SV=0.15, TOPS-20, KL10, CPU#=2263
            
MAINDEC-10-DFCIA-A-D                                             Page 77
APPENDIX                                                                                                                   SEQ 0081


            TTY SWITCH CONTROL ? - 0,S, Y OR N <CR> - ^D
            DDT
            EXEN$G
            DDT
            P7$G
            DDT
            ^Z
            @CSAVE DFCIA7.EXE
             DFCIA7.EXE.1 Saved
            @DDT
            DDT
            P5$G
            DDT
            ^Z
            @CSAVE DFCIA5.EXE
             DFCIA5.EXE.1 Saved
            @DDT
            DDT
            P3$G
            DDT
            ^Z
            @CSAVE DFCIA5.EXE
             DFCIA3.EXE.1 Saved
            @DDT
            DDT
            P1$G
            DDT
            ^Z
            @CSAVE DFCIA5.EXE
             DFCIA1.EXE.1 Saved




    12.1.3  Modifying the System

       To run  a  modified  non-DIAG  diagnostic,  the  system  must  be
    modified  so  that it does not know about the channel with which the
    diagnostic is to be run.  This  is  done  by  going  into  MDDT  and
    modifying the channel table (CHNTAB) as follows:

            @ENABLE               ; must have privileges
            $SDDT                 ; DDT from anyplace will do
            DDT

            JSYS 777$X            ; to get into MDDT
            MDDT

            CHNTAB+7/ address 0   ; replace whatever is there by a zero
            MRETN$G<>             ; get out of MDDT
            ^Z
MAINDEC-10-DFCIA-A-D                                             Page 78
APPENDIX                                                                                                                   SEQ 0082


    12.1.4  Other configurations

       This has been described particular to DMT of the CI20, but  there
    may  be  other  applications that may need to do the above, possibly
    only 2 copies.  One configuration which is  possible  is  running  a
    copy  of  DFCIA  which uses DIAG's and one which doesn't.  To create
    the one without DIAG's, the prior steps are done.  To create the one
    with DIAG's, instead of doing an EXEN$G, an EXE$G must be done.
------------------------------------------------------------------------
                                                                                                                           SEQ 0083
VERSION:	MAINDEC-10-DFCIA-A	Version 0.1

AUTHOR:		Richard Stockdale

DATE:		December 31, 1983

REASON:		Original release.

------------------------------------------------------------------------
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 1             
                                                                                                                           SEQ 0084




















				   DOCUMENT
				**************
				  DFCIA  LST
				**************

















		    COPYRIGHT 1984
		    DIGITAL EQUIPMENT CORPORATION
		    MAYNARD, MASS. 01754
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 2             
                                                                                                                           SEQ 0085

				 TABLE OF CONTENTS
				*******************


	1	

	993	*PARAM*	CONSOLE DATA SWITCH ASSIGNMENTS, SEPT 18,1979

	1028	*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979

	1234	ERROR HANDLING UUO DEFINITIONS, SEPT 18,1979

	1272	*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979

	3	Externs / Entrys

	105	Initialization

	275	Test/Command Selection

	1020	Test Dispatching

	1406	Port Debugger

	7021	Program Utility Routines

	7582	Statistics Handling Routines

	8049	Microcode Handling Routines

	8736	CI Initialization Routines

	9037	Packet Handling Routines

	9968	Queue Print Routines

	10873	Port Control Block and Data Areas

	11027	SPEAR Reporting

	11215	Test Execute Routines

	12161	Miscellaneous Test Variables

	1	Test Module DFCIA2.MAC

	37	Port Modules
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 3             
                                                                                                                           SEQ 0086

				 TABLE OF CONTENTS
				*******************


	1795	Register Tests

	2269	Miscellaneous Routines

	1	Test Module DFCIA3.MAC

	43	PB Transmit Buffer Tests

	1507	PB Receive Buffer Tests

	3584	Link Node Address Tests

	1	Test Module DFCIA4.MAC

	41	Transmit Tests

	1097	Receive Tests

	1503	Parity Tests

	1	Test Module DFCIA5.MAC

	38	CRC Tests

	546	Microcode Functional Tests

	896	Loopback Tests

	2424	Miscellanous Tests

	2916	Miscellaneous Routines

	1	Port Controller Utility Package

	59	Port Register Read/Write Routines

	390	Port Specific Utility Routines

	799	PI System Routines

	1205	Channel Handling Routines

	1574	User Mode Support Routines
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 4             
                                                                                                                           SEQ 0087

				 TABLE OF CONTENTS
				*******************


	2032	Miscellaneous Routines

	1	UTILITY Routines Module

	62	Printout/Typin Routines

	423	Clock Handling Routines

	696	TOPS10/20 Related Routines

	775	File Handling Routines

	918	Data Pattern Generator/Compare Routines

	1058	Data Patterns

	1336	Switch Handling Routines

	1862	Miscellaneous Routines

	2584	Scope Looping And Error Reporting Routine
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 5             
                                                                                                                           SEQ 0088
		*****************************************************************
	1	DFCIA TITLE FILE
		*****************************************************************

		22		Copyright (C) 1983
				DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
				
				This software is furnished under a license  for  use  only
				on a single computer system and  may  be  copied only with
				the inclusion of the of the above copyright  notice.  This
				software, or any other copies thereof, may not be provided
				or otherwise made available to any other person except for
				use  on such system and to one who agrees to these license
				terms. Title to and ownership of the software shall at all
				times remain in DEC.
				
				The information in this  document  is  subject  to  change
				without notice and should not be construed as a commitment
				by Digital Equipment Corporation.
				
				DEC assumes no responsibility for the use or reliability
				of its software on equipment which is not supplied by DEC.
			
				Author:		Dick Stockdale
				Maintainer:	36-Bit Diagnostic Engineering

		46	 Program Parameters

		61	 Assembly Parameters

		95	 Channel Logout Status Bits

		111	 Right Hand Switches

		129	 OP Code definitions (for operational microcode)

		182	 Macro Definitions

		186	 Text macros

		213	 ASCII text macro

		219	 RPUT/RGET - Multiple put/get

		257	 TTABLE - Test execute table entry generator macro

		293	 Bit Definitions For Test executer routine (TEXEC)

		311	 Test Dispatch Table Definitions
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 6             
                                                                                                                           SEQ 0089
		323	 Port CONI/CONO CSR Bit Assignments

		359	 OPDEF/UUO Definitions

		385	 Bit Definitions For "SCOPE" UUO Handler - Error Message Printer

		397	 Microword Field Definitions

		797	 Microword Macros (Note: If ADDR not specified, 'ADDR'+1 is used).

		843	 PLI/Link Microword Macros

		*****************************************************************
	993	*PARAM*	CONSOLE DATA SWITCH ASSIGNMENTS, SEPT 18,1979
		*****************************************************************

		998	DATA SWITCHES (READ FROM CONSOLE IN EXEC MODE OR TYPED IN IN USER MODE)
			LEFT HALF SWITCHES ARE PRE-ASSIGNED FOR SUBROUTINE PACKAGE USE
			AND CONTROL LOOPING, PRINTING (TTY OR OTHER DEVICE) AND MISC. FUNCTIONS

		*****************************************************************
	1028	*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979
		*****************************************************************

		1031	SPECIAL SUBPROGRAM LINKAGES

		1042	SPECIAL SUBROUTINE FATAL HALTS
			USED TO REPORT ERRORS THAT CAUSE THE SUBROUTINES TO BE UNUSABLE

		*****************************************************************
	1234	ERROR HANDLING UUO DEFINITIONS, SEPT 18,1979
		*****************************************************************

		*****************************************************************
	1272	*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979
		*****************************************************************

		*****************************************************************
	3	Externs / Entrys
		*****************************************************************
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 7             
                                                                                                                           SEQ 0090
		*****************************************************************
	105	Initialization
		*****************************************************************

		*****************************************************************
	275	Test/Command Selection
		*****************************************************************

		278	 DISPAT - Routine to dispatch to proper test as typed by the operator
				   in response to the 'WHAT TEST' prompt.

		505	 DISLIS -- List of all valid test names that can be typed

		566	 DISGO - Test dispatch addresses

		625	 ALL    Execute all tests
			 PORT   Execute Port modules related tests
			 PBUFF  Execute PB module related tests
			 LINK   Execute Link module related tests
			 LOOP   Execute Loopback tests
			 FUNCT  Execute Functional tests

		652	 TSTLIS - List test description for either single test or range of tests.

		717	 TSTDIA - Return to DIAMON

		728	 TSTDDT - Enter DDT

		742	 TSTHLT - Program halts - CONTINUE will start it back up.

		757	 TSTZER - Clear statistics

		768	 TSTCON - Determine/print configuration
			 TSTCPN - Print configuration

		786	 TSTHLP - Help for 'WHAT TEST' question.

		859	 TSTDSA - Disable a test.
			 TSTENA - Enable a test.

		902	 TSTDSL - List disabled tests

		929	 TSTPRI - Print statistics

		939	 TSTSWI/TSTSWP - Input switches / Print switch selections

		956	 TSTSSW - Switch complement commands

		968	 TSTTAK - Take commands from a file
			 TSTTAN - Take commands from a file without echoing results
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 8             
                                                                                                                           SEQ 0091
		*****************************************************************
	1020	Test Dispatching
		*****************************************************************

		1023	 TSTSPC - Run only one test

		1049	 RANGEN - Random number generator

		1104	 TSTDIS - Dispatch to the tests

		*****************************************************************
	1406	Port Debugger
		*****************************************************************

		1409	 TSTDEB - Console command utility for the port.

		1717	 .DBCMD - List of acceptable commands

		1875	 .DBDIS - List of dispatch addresses

		2028	 DHELP - Print DEBUG> help message

		2209	 DSET - Set/clear/print options

		2278	 DSETAD - Set start address for START/SSTEP/CONT commands

		2303	 DSETCS - Set start CSR data for START/CONT commands

		2323	 DSETPR - Set/clear automatic parity generation for load cram command

		2346	 DSETEB - Set/clear preserve EBUF for single stepping

		2370	 DSETLN - Set length of text portion of packet

		2394	 DSETDA - Set data pattern to insert in buffer

		2436	 DSETPC - Set/clear PCB CCW list made up for START command

		2459	 DSETFN - Set default microcode file name

		2490	 DSETRE - Set/clr forced response

		2514	 DSETFO - Set format (COMPAT,HIDEN)

		2541	 DSETPA - Set path (Auto,A,B)

		2572	 DSETPO - Set destination port number

		2616	 DSETCN - Set current port number
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 9             
                                                                                                                           SEQ 0092
		2662	 DSETXC - Set XCT-ID

		2696	 DSETPT - Set length of text portion to print

		2721	 DSETIG - Set/clr ignore other port SNDDG packets

		2744	 DSETSU - Set summary interval (seconds)

		2764	 DSETIN - Set interval (seconds)

		2783	 DSETWH - Print all selected options

		2812	 DSETPL - List data patterns

		2857	 DSETHE - Set help message

		2896	 Program Flags

		2931	 DECSR - Examine CSR register

		2945	 DDCSR - Deposit CSR register

		2960	 DZCSR - Zero CSR register

		2972	 DRESET - Issue an EBUS Reset

		2982	 DCLEAR - Issue a 'Port Clear'

		2993	 DSINIT - Set up start addr/data/history prior to single step command

		3010	 DSTART - Start the port

		3059	 DSTOP - Stop the port

		3089	 DSSTEP - Single step the port
			 DTRACE - Single step the port and trace progress

		3189	 DSSPNT - Print single step history

		3213	 DSSCLR - Clear single step history data

		3234	 PNTHST - Print a single step history entry

		3257	 SAVHST - Save single step history data

		3282	 DCONT - Continue the port

		3309	 DEEBUF - Examine EBUF register
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 10            
                                                                                                                           SEQ 0093
		3331	 DDEBUF - Deposit EBUF register
			 DZEBUF - Zero EBUF register

		3358	 DELAR - Examine LAR register

		3379	 DDRAR - Deposit RAR register

		3397	 DZRAR - Zero RAR register

		3410	 DECRAM - Examine CRAM locations specified by "PARG1" and "PARG2".

		3418	 DDCRAM - Change CRAM locations.

		3426	 DBCRAM - Change CRAM locations by field

		3434	 DACRAM - Alter CRAM locations.

		3442	 DZCRAM -- Zero CRAM addresses specified.

		3450	 DLCRAM -- List CRAM addresses specified.

		4040	 DEALU - Examine 2901 registers

		4142	 DDALU - Deposit register 

		4219	 DZALU - Zero 2901 registers

		4337	 DELOCS - Examine local storage 

		4440	 DDLOCS - Deposit local storage 

		4512	 DZLOCS - Zero local storage 

		4629	 DMARK - Set mark bit in CRAM locations

		4672	 DRMARK - Remove mark bit in CRAM locations

		4715	 DCMARK - Clear all mark bits

		4788	 DLMARK - List locations with mark bit set

		4874	 DDPLI - Deposit data to PLI

		4972	 DEPLI - Examine PLI registers

		5102	 DIPLI - Initialize PILA/Link modules

		5201	 DETBUF - Read transmit buffers
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 11            
                                                                                                                           SEQ 0094
		5225	 DERBUF - Read receive buffers

		5248	 DDUMP - Dump port state

		5361	 RDBUFS - Read and print a buffer

		5387	 PLOG - Obtain EPT logout data

		5519	 DENEXT - Examine next

		5593	 DDNEXT - Deposit next

		5652	 DDPPAK - Deposit into packet

		5683	 DESTAK - examine 2910 stack

		5737	 DBREAK - Set breakpoint

		5788	 DRBRK - Remove breakpoint

		5827	 DCBRK - Clear all breakpoints 

		5895	 DLBRK - List breakpoints

		5984	 DLOAD - Load microcode into CRAM from a test.

		6015	 DLIST - List microcode from test

		6040	 DFLOAD - Load microcode from file into CRAM

		6083	 DFVERF - Verify microcode from file versus CRAM

		6106	 DFLIST - List microcode in file

		6141	 DFEXAM - Examine microcode in file

		6177	 DTRANS - Translate CSR bits to English

		6192	 DCCODE - Print condition codes

		6289	 DFILLN - Fill CRAM with special data (J=PC+1,OPCode)

		6317	 DFILLP - Fill CRAM with special data (J=PC,OPCode)

		6342	 DCWPNT - Print CCW list

		6354	 DLGPNT - Print logout data

		6366	 DSWIT - Switch complement commands
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 12            
                                                                                                                           SEQ 0095
		6380	 IPRINT - Print interrupt history

		6438	 IINIT - Initialize interrupt system

		6450	 DPINIT - Initialize PCB and queues

		6461	 DSIDLE - Start port and wait for IDLE loop

		6472	 DBPACK - Build packet

		6551	 DIQUEU - Insert a packet on a command queue

		6583	 DPPCB - Print PCB

		6594	 DPQUEU - Print specified queue

		6635	 DWATCH - Watch port and print events that occur

		6898	 PNTRSP - Print a response queue entry

		6940	 DCONF - Determine and print CI configuration

		6950	 SETENA - Ensure the port is in the enabled state

		6997	 SETDSA - Disable the port

		*****************************************************************
	7021	Program Utility Routines
		*****************************************************************

		7024	 TRACE - Program Trace Routine

		7064	 TSTEND - Do end of test processing

		7072	 TSTPNT - Print test name/number

		7095	 PNTCRM - Print CRAM word

		7180	 PNTWD - Print a CRAM word (xxxx xxxx xxxx xxxx xxxx)

		7206	 CALPAR - Calculate parity for a CRAM location

		7257	 CSRPNT - Print CSR register as 'CSR: xxxxxx,,xxxxxx' followed by
			          English translation.

		7278	 CSRENG - Print CSR data in English

		7312	 CSRENB - CSR bits
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 13            
                                                                                                                           SEQ 0096
		7359	 SAVCRM - Save specified CRAM locations in a buffer

		7379	 RESCRM - Restore CRAM locations

		7405	 CONFIG - Determine/print configuration

		7531	 CONPNT - Print configuration data

		*****************************************************************
	7582	Statistics Handling Routines
		*****************************************************************

		7585	 SUPDAT - Update statistics for datagrams sent

		7669	 RUPDAT - Update statistics for datagrams received

		7814	 SREPOR - Report statistics

		7992	 SZERO - Clear statistics

		8001	 Statistics data areas

		*****************************************************************
	8049	Microcode Handling Routines
		*****************************************************************

		8072	 TFLOAD - Load operational microcode for a test

		8149	 FLOADB - Load operational microcode into buffer

		8237	 FLOADC - Load microcode buffer contents into the port

		8307	 FVERFC - Verify port microcode against buffer contents

		8396	 FUERR -  Print verify error data

		8464	 MLOADN - Load microcode and verify it (do not print errors)
			 MLOADY - Load microcode and verify it (print errors)

		8612	 MVPNT - Print verify error data

		8663	 MLIST - List microcode of a test

		8701	 TLOAD - Load microcode/verify it for a test
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 14            
                                                                                                                           SEQ 0097
		*****************************************************************
	8736	CI Initialization Routines
		*****************************************************************

		8739	 TPCB - Set up initial PCB

		8927	 TIDLE - Start the port and wait for IDLE bit to set in CSR

		8959	 RDNODE - Read our node number

		*****************************************************************
	9037	Packet Handling Routines
		*****************************************************************

		9084	 BPACK - Build a packet

		9172	 ITEXT - get text length + text

		9238	 ICRC - get text len + text + CRC

		9364	 CRCCAL - Calculate CRC (cumulative) for 8 bits

		9387	 CRCFIX - Adjust properly

		9407	 IREGR - Set up to read a register

		9436	 IREGW - Set up to write a register

		9480	 RWAIT - Wait for a response (by CSR bit 'RspQAvail' bit being set.

		9499	 CHKINT - Check/set up interlock for queue

		9571	 CONVIR - Convert physical address to virtual

		9608	 INSQUE - Insert a packet into a queue

		9718	 GETQUE - Remove a queue entry from the beginning of a queue

		9769	 CHKRSP - Check if a response queue entry

		9911	 CHKQUE - Determine which queue to insert entry back on

		9955	 SHUTRQ - Turn off response queue available
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 15            
                                                                                                                           SEQ 0098
		*****************************************************************
	9968	Queue Print Routines
		*****************************************************************

		9971	 PQUEUE - Print a set of queue entries

		10034	 PPAKC - Print a command queue entry

		10110	 PPAKR - Print a response queue entry

		10129	 PPAKF - Print a free queue entry

		10153	 PACK1 - Print a packet - SNDDG command / DGSNT response

		10165	 PACK5 - Print a packet - REQID command / IDREQ response

		10176	 PACK13 - Print a packet - ID response

		10242	 PACK15 - Print a packet - SNDLB command / LBSNT response

		10270	 PACK33 - Print a packet - RDCNT command / CNTRD response

		10285	 PACK36 - Print a packet - RDREG command / REGRD response

		10304	 PACK37 - Print a packet - WRREG command / REGWR response

		10322	 PACKG - Print a general type packet

		10351	 PSTATS - Print status field

		10432	 PMISC - Print miscellaneous data at the end of a packet

		10457	 PFLAGS - Print flags field (AC1 contains status byte (right justified))

		10491	 OPCPNT - Print opcode of command packet

		10598	 DECOPC - Decode op code

		10680	 PXCTID - Print 2 word XCT ID in words 4/5

		10697	 PHEAD - Print header info of a packet

		10717	 PPORTO - Print opcode and port in packet printout

		10733	 PTEXT - Print text of a command packet

		10772	 LINKP - Print FLINK/BLINK data as PCB+n or BUFF+n

		10793	 PPCB - Print current data in the PCB
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 16            
                                                                                                                           SEQ 0099
		*****************************************************************
	10873	Port Control Block and Data Areas
		*****************************************************************

		10876	 IPCB - PCB initial data

		10920	 PCB - Port Control Block

		10976	 Datagram and Message free queues

		*****************************************************************
	11027	SPEAR Reporting
		*****************************************************************

		11030	 SPREP1 - Print initial SPEAR report 'diagnostic started'

		11083	 SPREP2 - Print error or successful completion SPEAR report

		11201	 GETPPN - Find out PPN number

		*****************************************************************
	11215	Test Execute Routines
		*****************************************************************

		11218	 TEXEC - Test execute routine

		11842	 TTPNT - Print error data

		11859	 PNTSTR - Print out error data (when failed to start the port)

		11876	 PNTWRT - Print out error data (when failed to write a register)

		11895	 PNTRD - Print out error data (when failed to read a register)

		11944	 PNTPAK - Print out error data (when couldn't put entry on cmd queue)

		11956	 PNTWAI - Print out error data (when failed to receive proper responses)

		*****************************************************************
	12161	Miscellaneous Test Variables
		*****************************************************************

		12192	 Special code to test SPEAR entries

		12235	 Special code to produce an EXE version
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 17            
                                                                                                                           SEQ 0100
		*****************************************************************
	1	Test Module DFCIA2.MAC
		*****************************************************************

		*****************************************************************
	37	Port Modules
		*****************************************************************

		40	 TEST 1 - Port Hardware Test 1

		444	 TEST 2 - Port Hardware Test 2

		1360	 TEST 3 - Port Hardware Test 3

		*****************************************************************
	1795	Register Tests
		*****************************************************************

		1798	 TEST 4 - PB Register Test 1

		1999	 TEST 5 - Link Register Test 1

		2114	 TEST 6 - PB Register Test 2

		2195	 TEST 7 - Link Register Test 2

		*****************************************************************
	2269	Miscellaneous Routines
		*****************************************************************

		2272	 MWAIT - Routine to wait for test completion and determine test results

		2319	 MSTART - Start the port at location 5777

		2334	 MPRINT - Print test completion data for a test

		*****************************************************************
	1	Test Module DFCIA3.MAC
		*****************************************************************
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 18            
                                                                                                                           SEQ 0101
		*****************************************************************
	43	PB Transmit Buffer Tests
		*****************************************************************

		46	 TEST 10 - Transmit Buffer Load Test

		243	 TEST 11 - Tranmit Buffer A Test

		430	 TEST 12 - Transmit Buffer B Test

		617	 TEST 13 - Transmit Buffer Addressing Test

		819	 TEST 14 - PB Address Counter Test (Transmit)

		1045	 TEST 15 - PB Address Offset Test (Transmit Read)

		1315	 TEST 16 - PB Address Offset Test (Transmit Write)

		*****************************************************************
	1507	PB Receive Buffer Tests
		*****************************************************************

		1510	 TEST 17 - Receive Buffer A Test

		1765	 TEST 20 - Receive Buffer B Test

		2020	 TEST 21 - Receive Buffer Addressing Test

		2336	 TEST 22 - Retransmit Buffer A Test

		2563	 TEST 23 - Retransmit Buffer B Test

		2790	 TEST 24 - Transmit Xmt Buffer A to Rcv Buffer B

		3018	 TEST 25 - Transmit Xmt Buffer B to Rcv Buffer A

		3246	 TEST 26 - PB Address Offset Test (Receive Read)

		*****************************************************************
	3584	Link Node Address Tests
		*****************************************************************

		3587	 TEST 27 - Addressing Test 1

		3910	 TEST 30 - Addressing Test 2

		4224	 TEST 31 - Addressing Test 3

		4532	 TEST 32 - Node Address Test
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 19            
                                                                                                                           SEQ 0102
		*****************************************************************
	1	Test Module DFCIA4.MAC
		*****************************************************************

		*****************************************************************
	41	Transmit Tests
		*****************************************************************

		44	 TEST 33 - 'Transmit Status'

		630	 TEST 34 - 'Abort Transmission' Function (Active)

		851	 TEST 35 - 'Abort Transmission' Function (Inactive)

		*****************************************************************
	1097	Receive Tests
		*****************************************************************

		1100	 TEST 36 - Receiver Status

		*****************************************************************
	1503	Parity Tests
		*****************************************************************

		1506	 TEST 37 - PLI Parity Test

		1919	 TEST 40 - LINK Parity Test

		*****************************************************************
	1	Test Module DFCIA5.MAC
		*****************************************************************

		*****************************************************************
	38	CRC Tests
		*****************************************************************

		41	 TEST 41 - CRC Test 1

		297	 TEST 42 - CRC Test 2
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 20            
                                                                                                                           SEQ 0103
		*****************************************************************
	546	Microcode Functional Tests
		*****************************************************************

		549	 TEST 43 - Idle Loop Test

		682	 TEST 44 - Queue Handling Test

		*****************************************************************
	896	Loopback Tests
		*****************************************************************

		899	 TEST 45 - CI Loopback Test (AutoPath/Compat)

		1220	 CRCINI - Special routine to clear a CRC table used by TST45-51

		1236	 TEST 46 - CI Loopback Test (Auto Path/Hiden)

		1558	 TEST 47 - CI Loopback Test (Path A/Compat)

		1852	 TEST 50 - CI Loopback Test (Path B/Compat)

		2146	 TEST 51 - Link Loopback Test

		*****************************************************************
	2424	Miscellanous Tests
		*****************************************************************

		2427	 TEST 52 - Crossed CI Cables Test

		2720	 TEST 53 - REQID Test

		2896	 TEST 54 - Statistics Test

		*****************************************************************
	2916	Miscellaneous Routines
		*****************************************************************

		2919	 MPACK - Build a packet based on parameters in AC1

		2938	 MPACKN - Build a packet based on parameters in AC1

		2956	 MCOMP - Do data compare of a packet received

		3003	 HCOMP - Do data compare of a packet received (Hiden mode)

		3048	 MCOMP2 - Compare RSPONS against contents of PACKET

		3076	 MCHECK - Check results
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 21            
                                                                                                                           SEQ 0104
		3114	 CHKRQV - Check for response queue available

		3131	 SAVPK1 - Save packet data (status error packet)
			 SAVPK2 - Save packet data (data error packet)

		3179	 PKPNT - Print special saved packet data

		3197	 LODERR - Print ucode load error

		*****************************************************************
	1	Port Controller Utility Package
		*****************************************************************

		*****************************************************************
	59	Port Register Read/Write Routines
		*****************************************************************

		62	 Notes On I/O Routine Design

		111	 Port Register Load Routines

		123	 LDEBUF - Load EBUF

		140	 LDCSR - Load CSR (This is simply a CONO).

		154	 LDRAR - Load RAR

		180	 LDCRAM - Load CRAM

		201	 Port Register Read Routines

		218	 RDEBUF - Read EBUF

		234	 RDCSR - Read CSR

		258	 RDLAR - Read LAR

		281	 RDCRAM - Read CRAM

		300	 .CONI - Do a simple CONI (no error checking)

		319	 .CONO - Do a simple CONO

		340	 .DATAI - Do a simple DATAI (no error checking)

		359	 .DATAO - Do a simple DATAO

		379	 ERESET - Issue an EBUS reset
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 22            
                                                                                                                           SEQ 0105
		*****************************************************************
	390	Port Specific Utility Routines
		*****************************************************************

		393	 ISTOP - Stop IPA either by a port clear or by clearing the CSR register

		440	 IPACLR - Issue a port clear

		451	 SETEBU - Check that 'Diag Test EBUF' bit is set in CSR and set if not.

		473	 SETLAR - Check that 'Diag Sel LAR' bit is set in CSR and set if not.

		494	 CLREBU - Check that 'Diag Test EBUF' is not set in CSR and clear if is.

		515	 CHKCSR - Check if error bits are set in the CSR register

		544	 IPASRT - Start the port at the address given in 'SADDR' and with
			          initial parameters given in 'SDATA'.

		626	 IPASTP - Stop the port

		692	 IPASST - Single step the port at the address given in 'SNEXT' and
			          with initial parameters given in 'SDATA'.

		*****************************************************************
	799	PI System Routines
		*****************************************************************

		802	 INITPI - Initialize and Turn On PI System

		843	 .PIOFF - Detach port from PI system 

		859	 .PION - Attach port to PI system (Channel 4)

		877	 PISYOF - Turn PI system off

		886	 PISYON - Turn PI system on

		894	 SETVEC - Set up interrupt vectors for an port under test

		918	 SET2N - Set up 40 + 2N locations with interrupt dispatch instruction

		940	 VIINT - Vectored interrupt (Port)

		1007	 NVIINx - Non-Vectored interrupt (Port)

		1156	 .INPNT - Print special interrupt data
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 23            
                                                                                                                           SEQ 0106
		*****************************************************************
	1205	Channel Handling Routines
		*****************************************************************

		1208	 Routines To Interface With A Channel

		1257	 CHINIT - Channel Initialization Routine

		1409	 GETLOG - Snapshot The Channel Logout Area

		1446	 CCWPNT - Prints CCW word currently in PCB+45.

		1475	 LOGPNT - Channel Logout Printer

		1551	 DIAGER - Report Monitor Call Error In User Mode

		*****************************************************************
	1574	User Mode Support Routines
		*****************************************************************

		1577	 DSETUP - Setup Routine For Diagnostic Function

		1664	 CPUTST - Determine Which Of 2 CPU's To Run On

		1707	 DEVREL - User Mode Release Routine

		1760	 DEVREQ - User Mode Request Routine

		1821	 ENDIAG - Enable the NI/CI port

		1839	 DGEPNT - Decode and print DIAG error

		1920	 LOCPHY - Lock part of the diagnostic

		1946	 UNLOCK - Unlock part of the diagnostic

		1969	 USRION/USRIOF - Turn User I/O Privileges On/Off

		2011	 ENABLE - Enable Capabilities of This Process
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 24            
                                                                                                                           SEQ 0107
		*****************************************************************
	2032	Miscellaneous Routines
		*****************************************************************

		2035	 FFF - Routine To Handle Fatals

		*****************************************************************
	1	UTILITY Routines Module
		*****************************************************************

		*****************************************************************
	62	Printout/Typin Routines
		*****************************************************************

		65	 CONVSX - Convert sixbit to octal

		108	 ALTCHH - Handle altmode intercept

		133	 CLRBUF - Clear input buffer

		150	 TTYYES - Answer yes or no question

		180	 PSDN - Prints signed decimal numbers

		205	 .PNTOC - Print n digit octal number with leading zeros suppressed

		252	 .PNTDC - Print n digit decimal number with leading zeros suppressed

		299	 .PNTDP - Print n digit decimal number with leading zeros suppressed

		346	 PPDEC - Print decimal number in a field of size x.

		385	 PPDECF - Force print decimal number in a field of size x.

		*****************************************************************
	423	Clock Handling Routines
		*****************************************************************

		426	 STCLOK - Initialize program runtime clock

		468	 MONTIM - Read program runtime from monitor

		502	 PTIME - Print time of day

		520	 RUNTME - Calculate and print program runtime

		628	 PSTAMP - Check for an 'S' typed.

		664	 .DELAY - Delay a specified amount of time (in milliseconds)
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 25            
                                                                                                                           SEQ 0108
		*****************************************************************
	696	TOPS10/20 Related Routines
		*****************************************************************

		699	 .RESET - Subroutine to issue a RESET JSYS/UUO

		718	 .CLOSE - Subroutine to close opened files

		746	 .EXIT - Subroutine to exit job in user mode

		*****************************************************************
	775	File Handling Routines
		*****************************************************************

		778	 CHRIN - Routine to read an ASCII character from the selected file.

		789	 CHRINS - Routine to read an ASCII character from the selected file.

		815	 FGETW - Get microword entry from file

		863	 FGETA - Obtain microcode load address 'ADDR:' from file

		890	 FGETD - Obtain microcode data entry from file (4 digits).

		*****************************************************************
	918	Data Pattern Generator/Compare Routines
		*****************************************************************

		921	 BUFGEN - Generate the specified data pattern in the data buffer.
			 BUFCOM - Compare the data buffer with expected data

		1016	 DATMES - A data comparison error has been found.  Report the error,
			 printing a maximum of three lines of errors.

		*****************************************************************
	1058	Data Patterns
		*****************************************************************

		1061	 Data Patterns

		1244	 PATPNT - Translate pattern number to description
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 26            
                                                                                                                           SEQ 0109
		*****************************************************************
	1336	Switch Handling Routines
		*****************************************************************

		1339	 .SWCHP - Print switch settings in English

		1407	 SWITT - Get value of switches

		1420	 .ISWT - Complete switch handling

		1517	 .SLEFT - Input left hand switches

		1582	 .SRIGT - Enter right hand switches

		1754	 SWCHPT - Prints current state of switches

		1766	 SWCOM - Switch complement routine

		*****************************************************************
	1862	Miscellaneous Routines
		*****************************************************************

		1865	 PARSER - Additional CPU parity error service

		1913	 .COMM - Match a command entered against a command table.

		1964	 .COMM2 - Compare command typed to table to see if valid

		2000	 .SARG - Obtain SIXBIT argument

		2088	 .OARG - Obtain octal argument

		2179	 DECYN - Decode an argument which should be NO or YES

		2207	 .DARG - Obtain octal/decimal argument

		2301	 CHKARG - Check for argument when there shouldn't be any

		2348	 LASARG - Check for last argument when there shouldn't be any more

		2391	 FIOFF - Routine to turn off the 'file input' switch

		2409	 FINCMD - Input a sixbit command from a file

		2459	 FSARG - Input a sixbit argument from a file

		2509	 FOARG - Input a octal argument from a file

		2573	 FEOL - Skip characters until end of line is reached
DFCIA  LST                                                              DECDOC VER  00.25   29-OCT-84 19:10:32   PAGE 27            
                                                                                                                           SEQ 0110
		*****************************************************************
	2584	Scope Looping And Error Reporting Routine
		*****************************************************************

		2587	 SCOPE1 - Error reporter and scope loop controller
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 1
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0111

     1						SUBTTL	DFCIA TITLE FILE
     2
     3						SALL
     4
     5						UNIVERSAL DFCIA
     6						SEARCH	MONSYM
     7
     8						EXTERN	START,STARTA,PGMNAM,SCOPE1
     9						EXTERN	PPDEC,PPDECF,ALTCHH,.PNTOC,.PNTDC,.PNTDP,.DELAY
    10
    11						.REQUIRE DFCIA1
    12						.REQUIRE DFCIA2
    13						.REQUIRE DFCIA3
    14						.REQUIRE DFCIA4
    15						.REQUIRE DFCIA5
    16						.REQUIRE DFCIAI
    17						.REQUIRE DFCIAU
    18
    19			000003			MCNVER==3			; patch level
    20			000000			DECVER==0			; release version
    21
    22					;*	Copyright (C) 1983
    23					;*	DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
    24					;*	
    25					;*	This software is furnished under a license  for  use  only
    26					;*	on a single computer system and  may  be  copied only with
    27					;*	the inclusion of the of the above copyright  notice.  This
    28					;*	software, or any other copies thereof, may not be provided
    29					;*	or otherwise made available to any other person except for
    30					;*	use  on such system and to one who agrees to these license
    31					;*	terms. Title to and ownership of the software shall at all
    32					;*	times remain in DEC.
    33					;*	
    34					;*	The information in this  document  is  subject  to  change
    35					;*	without notice and should not be construed as a commitment
    36					;*	by Digital Equipment Corporation.
    37					;*	
    38					;*	DEC assumes no responsibility for the use or reliability
    39					;*	of its software on equipment which is not supplied by DEC.
    40					;*
    41					;*	Author:		Dick Stockdale
    42					;*	Maintainer:	36-Bit Diagnostic Engineering
    43
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 2
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0112

    44
    45					;#********************************************************************
    46					;* Program Parameters
    47					;#********************************************************************
    48
    49					; AC Assignments.
    50
    51			000011			OP=11				; op code
    52			000012			PK=12				; packet address
    53			000013			Q=13				; queue number
    54			000014			PAT=14				; data pattern in use
    55			000015			ERFLG=15			; error flag (gets cleared by SCOPER)
    56			000016			MBCN=16				; channel 54000,,0 to 57400,,0
    57			000017			P=17				; stack pointer
    58
    59
    60					;#********************************************************************
    61					;* Assembly Parameters
    62					;#********************************************************************
    63
    64			000005			ITERAT==5			; default to 5 passes
    65			000001			KL10==1				; assemble for KL10
    66			000001			EXCASB==1			; assemble for exec mode
    67			000001			USRASB==1			; assemble for user mode
    68			000001			MEMMAP==1			; allow memory to be mapped
    69
    70			000017			MAXPOR==17			; maximum number of ports on the CI
    71
    72
    73			000001			$LPAPER==1			; don't list literals
    74
    75			030000			SADR1=BEGIN
    76			030000			SADR2=BEGIN
    77			030000			SADR3=BEGIN
    78			030007			SADR4=SRTDDT
    79			000000*			SADR5=START			; ^C restart
    80			030007			SADR6=SRTDDT
    81		254200	000000*			SADR7=HALT START
    82		254200	000000*			SADR8=HALT START
    83		254200	000000*			SADR9=HALT START
    84		254200	000000*			SADR10=HALT START
    85		254200	000000*			SADR11=HALT START
    86
    87		711523	655207			PAREA1==711523,,655207		; random number base
    88			000000			PAREA2==0
    89		444643	514100			PAREA3==SIXBIT/DFCIA/
    90		605664	000000			PAREA4==SIXBIT/PNT/
    91			000000			PAREA5==0
    92			000000			PAREA6==0
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 3
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0113

    93
    94					;#************************************************************
    95					;* Channel Logout Status Bits
    96					;#************************************************************
    97
    98		400000	000000			LOGO==1B0			; channel log out bit
    99		200000	000000			MPER==1B1			; memory parity error
   100		100000	000000			ADRPE==1B2			; set when no address parity error
   101		040000	000000			NOTWC0==1B3			; not word count zero
   102		020000	000000			NEXM==1B4			; non-existant memory
   103		000400	000000			LAXER==1B9			; last xfer error
   104		000200	000000			IPAER==1B10			; IPA20 error
   105		000100	000000			LGWC==1B11			; long word count
   106		000040	000000			SHWC==1B12			; short word count
   107		000020	000000			OVN==1B13			; overrrun
   108
   109
   110					;#********************************************************************
   111					;* Right Hand Switches
   112					;#********************************************************************
   113
   114			400000			TRACET==1B18			; program test # trace feature
   115			200000			INHFLT==1B19			; inhibit fault isolation
   116			100000			INHMSG==1B20			; inhibit error message printout
   117			040000			LOOPGM==1B21			; loop on program
   118			020000			LOOPTS==1B22			; loop on test
   119			010000			RUNALL==1B23			; run all segments of a test	
   120			004000			DSPEAR==1B24			; disable SPEAR switch
   121			002000			DEBUG1==1B25			; debug mode (debug without an IPA)
   122			001000			DEBUG2==1B26			; debug mode (print error messages)
   123			000400			DEBUG3==1B27			; debug mode (test debug switch)
   124			000200			DEBUG4==1B28			; debug mode (don't load test ucode)
   125			000100			DEBUG5==1B29			; debug mode (dump on error)
   126			000040			DEBUG6==1B30			; debug mode (expanded error message)
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 4
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0114

   127
   128					;#********************************************************************
   129					;* OP Code definitions (for operational microcode)
   130					;#********************************************************************
   131
   132					; Op code sent
   133
   134			000001			SNDDG==1
   135			000002			SNDMSG==2
   136			000005			REQID==5
   137			000006			SNDRST==6
   138			000007			SNDSTR==7
   139			000010			REQDT0==10
   140			000011			REQDT1==11
   141			000012			REQDT2==12
   142			000015			SNDLB==15
   143			000016			REQMDT==16
   144			000020			SNDDAT==20
   145			000021			RETDAT==21
   146			000022			SNDMDT==22
   147			000030			CLSBUF==30
   148			000200			SETCKT==200
   149			000201			SETCNT==201
   150			000202			RDCNT==202
   151			000203			RDREG==203
   152			000204			WRREG==204
   153
   154					; Op code received
   155
   156			000001			DGSNT==SNDDG
   157			000002			MSGSNT==SNDMSG
   158			000003			CNFRET==3
   159			000004			MCNF==4
   160			000005			IDREQ==REQID
   161			000006			RSTSNT==SNDRST
   162			000007			STRSNT==SNDSTR
   163			000010			DATRQ0==REQDT0
   164			000011			DATRQ1==REQDT1
   165			000012			DATRQ2==REQDT2
   166			000013			IDREC==13
   167			000014			DATREC==14
   168			000015			LBSNT==SNDLB
   169			000016			MDATRQ==REQMDT
   170			000020			DATSNT==SNDDAT
   171			000021			DATRET==RETDAT
   172			000022			MDTSNT==SNDMDT
   173			000023			RTMDAT==23
   174			000030			BUFCLS==CLSBUF
   175			000200			CKTSET==SETCKT
   176			000201			CNTSET==SETCNT
   177			000202			CNTRD==RDCNT
   178			000203			REGRD==RDREG
   179			000204			REGWR==WRREG
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 5
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0115

   180
   181					;#*********************************************************************
   182					;* Macro Definitions
   183					;#*********************************************************************
   184
   185					;#********************************************************************
   186					;* Text macros
   187					;#********************************************************************
   188
   189						DEFINE	TMSG(TEXT),<PNTMSG	[ASCIZ ^TEXT^]>
   190
   191						DEFINE	TMSGC(TEXT),<PNTMSG	[ASCIZ ^
   192					TEXT^]>
   193
   194						DEFINE	TMSGD(TEXT),<PNTMSG	[ASCIZ ^TEXT
   195					^]>
   196
   197						DEFINE	TMSGCD(TEXT),<PNTMSG	[ASCIZ ^
   198					TEXT
   199					^]>
   200						DEFINE	FMSG(TEXT),<PNTMSF	[ASCIZ ^TEXT^]>
   201
   202						DEFINE	FMSGC(TEXT),<PNTMSF	[ASCIZ ^
   203					TEXT^]>
   204
   205						DEFINE	FMSGD(TEXT),<PNTMSF	[ASCIZ ^TEXT
   206					^]>
   207
   208						DEFINE	FMSGCD(TEXT),<PNTMSF	[ASCIZ ^
   209					TEXT
   210					^]>
   211
   212					;#********************************************************************
   213					;* ASCII text macro
   214					;#********************************************************************
   215
   216						DEFINE	TASCIZ (TEXT)<[ASCIZ /TEXT/]>
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 6
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0116

   217
   218					;#********************************************************************
   219					;* RPUT/RGET - Multiple put/get
   220					;#********************************************************************
   221
   222						DEFINE	RPUT (R0,R1<-1>,R2<-1>,R3<-1>,R4<-1>,R5<-1>,R6<-1>,R7<-1>,R8<-1>,R9<-1>)<
   223						PUT	R0
   224						XLIST
   225						IFGE R1,<PUT	R1>
   226						IFGE R2,<PUT	R2>
   227						IFGE R3,<PUT	R3>
   228						IFGE R4,<PUT	R4>
   229						IFGE R5,<PUT	R5>
   230						IFGE R6,<PUT	R6>
   231						IFGE R7,<PUT	R7>
   232						IFGE R8,<PUT	R8>
   233						IFGE R9,<PUT	R9>
   234						LIST>
   235
   236						DEFINE	RGET (R0,R1<-1>,R2<-1>,R3<-1>,R4<-1>,R5<-1>,R6<-1>,R7<-1>,R8<-1>,R9<-1>)<
   237						GET	R0
   238						XLIST
   239						IFGE R1,<GET	R1>
   240						IFGE R2,<GET	R2>
   241						IFGE R3,<GET	R3>
   242						IFGE R4,<GET	R4>
   243						IFGE R5,<GET	R5>
   244						IFGE R6,<GET	R6>
   245						IFGE R7,<GET	R7>
   246						IFGE R8,<GET	R8>
   247						IFGE R9,<GET	R9>
   248						LIST>
   249
   250					; Microword table macro
   251
   252						DEFINE	SUBTAB(ADDR)<
   253						-2
   254						ADDR>
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 7
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0117

   255
   256					;#********************************************************************
   257					;* TTABLE - Test execute table entry generator macro
   258					;
   259					; TLAST -  No arguments used
   260					; TSTART - Arg1 - Start address
   261					; TCALL -  Arg1 - Routine address
   262					; TCALLC - Arg1 - Routine address
   263					; TWAIT -  Arg1 - Time to wait
   264					;	   Arg2 - Routine address to determine status error
   265					; TPACK -  Arg1 - Command queue
   266					;	   Arg2 - Op code of packet
   267					;	   Arg3 - Address of packet construct table
   268					; TWRITE - Arg1 - Register number
   269					;	   Arg2 - Register data
   270					; TREAD -  Arg1 - Register number
   271					;	   Arg2 - Data compare flag
   272					;	   Arg3 - Register data
   273					; TJRST -  Arg1 - Table address
   274					; TINIT -  No Arguments used
   275					; TEXIT -  No Arguments used
   276					;#********************************************************************
   277
   278						DEFINE	TTABLE	(CMD,ARG1,ARG2<0>,ARG3<0>)<
   279						IFE CMD,<0>				; TLAST
   280						IFE CMD-1,<1B3!ARG1>			; TSTART
   281						IFE CMD-2,<2B3!ARG1>			; TCALL
   282						IFE CMD-3,<3B3!ARG1>			; TCALLC
   283						IFE CMD-4,<4B3!ARG1_^D18!ARG2> 		; TWAIT
   284						IFE CMD-5,<5B3!ARG1_^D21!ARG2_^D18!ARG3>; TPACK
   285						IFE CMD-6,<6B3!ARG1_^D18!ARG2>		; TWRITE
   286						IFE CMD-7,<7B3!ARG1_^D18!ARG2_^D17!ARG3>; TREAD
   287						IFE CMD-10,<10B3!ARG1>			; TJRST
   288						IFE CMD-11,<11B3>			; TINIT
   289						IFE CMD-12,<12B3>>			; TEXIT
   290
   291
   292					;#*********************************************************************
   293					;* Bit Definitions For Test executer routine (TEXEC)
   294					;#*********************************************************************
   295
   296			000000			TLAST==0			; last entry
   297			000001			TSTART==1			; start IPA at a particular address
   298			000002			TCALL==2			; call routine
   299			000003			TCALLC==3			; call routine and conditionally
   300										;   exit test 
   301			000004			TWAIT==4			; wait for completion
   302			000005			TPACK==5			; build a packet
   303			000006			TWRITE==6			; write a register
   304			000007			TREAD==7			; read a register
   305			000010			TJRST==10			; go to new table location
   306			000011			TINIT==11			; initialize packet data
   307			000012			TEXIT==12			; exit test (if any error yet)
   308
   309
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 7-1
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0118

   310					;#********************************************************************
   311					;* Test Dispatch Table Definitions
   312					;#********************************************************************
   313
   314		400000	000000			PORT==1B0			; PORT tests
   315		200000	000000			PBUFF==1B1			; Packet Buffer tests
   316		100000	000000			LINK==1B2			; LINK tests
   317		040000	000000			LOOP==1B3			; Loopback tests
   318		020000	000000			FUNCT==1B4			; Functional tests
   319		760000	000000			ALL==37B4			; All tests
   320		000100	000000			TDENA==1B11			; test dispatch enable (0-yes,1-no)
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 8
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0119

   321
   322					;#*********************************************************************
   323					;* Port CONI/CONO CSR Bit Assignments
   324					;#*********************************************************************
   325
   326		400000	000000			PORTP==1B0			; port present
   327		200000	000000			CSRRQS==1B1			; diag request CSR
   328		100000	000000			CSRCHN==1B2			; diag CSR changed
   329		040000	000000			DINIT==1B3			; diag initialized
   330		020000	000000			PI00RQ==1B4			; PI Level 0 interrupt in progress
   331		010000	000000			RQINT==1B5			; request interrupt
   332		004000	000000			CRAMPE==1B6			; CRAM parity error
   333		002000	000000			MBERR==1B7			; MBUS error
   334		000100	000000			IDLE==1B11			; IDLE loop
   335		000040	000000			DCOMP==1B12			; disable complete
   336		000020	000000			ECOMP==1B13			; enable complete
   337			400000			PCLEAR==1B18			; port clear
   338			200000			TSTEBF==1B19			; diag test EBUF
   339			100000			GENEPE==1B20			; diag generate EBUS parity error
   340			040000			SELLAR==1B21			; diag select LAR/SQR
   341			020000			SINCYC==1B22			; diag single cycle
   342			010000			SPARE1==1B23			; spare bit
   343			004000			EBUSPE==1B24			; EBUS parity error
   344			002000			FQUERR==1B25			; free queue error
   345			001000			MVRERR==1B26			; data mover error
   346			000400			CMDQAV==1B27			; command queue available
   347			000200			RESQAV==1B28			; response queue available
   348			000100			SPARE2==1B29			; spare bit
   349			000040			PDSABL==1B30			; disable
   350			000020			PENABL==1B31			; enable
   351			000010			MPRUN==1B32			; mproc run
   352			000004			PIA00==1B33			; PIA field bit 0
   353			000002			PIA01==1B34			; PIA field bit 1
   354			000001			PIA02==1B35			; PIA field bit 2
   355
   356			002000			TCOMP==1B25			; test completed bit
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 9
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0120

   357
   358					;#*********************************************************************
   359					;* OPDEF/UUO Definitions
   360					;#*********************************************************************
   361
   362		104000	000000			OPDEF	JSYS	[104000,,0]	; TOPS-20 command
   363		104000	000100			OPDEF	CFIBF	[JSYS 100]	; clear TOPS-20 input buffer
   364
   365		001000	000000			OPDEF	PNTOCC	[1B8]		; print n digits leading 0's suppressed
   366		002000	000000			OPDEF	PDECF   [2B8]		; force print decimal number
   367		003000	000000			OPDEF	PNTDCC	[3B8]		; print n digits leading 0's suppressed
   368		004000	000000			OPDEF	PNTDCP	[4B8]		; print n digits leading 0's suppressed
   369		005000	000000			OPDEF	DELAY	[5B8]		; delay for n milliseconds
   370		006000	000000			OPDEF	PDEC    [6B8]		; print decimal number
   371		007000	000000			OPDEF	ALTCHK  [7B8]		; check for altmode character typed
   372		027000	000000			OPDEF	SCOPER	[27B8]		; error handler UUO
   373
   374			000000*			LUUO1==.PNTOC			; service routine for n digit octal
   375			000000*			LUUO2==PPDECF			; force print decimal number
   376			000000*			LUUO3==.PNTDC			; service routine for n digit decimal
   377			000000*			LUUO4==.PNTDP			; service routine for n digit decimal
   378			000000*			LUUO5==.DELAY			; delay routine (n milliseconds)
   379			000000*			LUUO6==PPDEC			; print decimal number
   380			000000*			LUUO7==ALTCHH			; check if an altmode was typed
   381			000000*			LUUO27==SCOPE1			; error print routine
   382
   383
   384					;#*********************************************************************
   385					;* Bit Definitions For "SCOPE" UUO Handler - Error Message Printer
   386					;#*********************************************************************
   387
   388		100000	000000			MSG==1B2			; ASCIZ message
   389		200000	000000			CALL==2B2			; call special print routine
   390		300000	000000			GOTO==3B2			; goto (new address of error table)
   391		040000	000000			TXNOT==1B3			; print/call entry if TXTINH not set
   392		020000	000000			TXYES==1B4			; print/call entry if TXTINH set
   393		060000	000000			TXALL==3B4			; print/call entry always
   394		010000	000000			LAST==1B5			; last table entry
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 10
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0121

   395
   396					;#********************************************************************
   397					;* Microword Field Definitions
   398					;
   399					;  These definitions are arranged for the macro which generates pairs
   400					;  of microwords as (addr & parity flags & left 20 bits,right 36 bits).
   401					;  These are of the form:
   402					;
   403					;  Word 1:  Bits 00-11 - Microword load address (0000-7777)
   404					;		 12-35 - Bits 0-23 of microword to load
   405					;  Word 2:  Bits 00-34 - Bits 24-57,59 of microword to load
   406					;	         35 ---- Force Bad Parity flag
   407					;
   408					;  In detail:
   409					;
   410					;  Word 1:  Bits 00-11 - Microword load address
   411					;		 12-23 - MWJMPFLD
   412					;		 24    - MWPAR
   413					;		 25    - MWOUTPUTENA
   414					;		 26-35 - MWMGCFLD
   415					;
   416					;  Word 2:  Bits 00-02 - MWSORCEFLD
   417					;		 03-05 - MWFUNCTFLD
   418					;		 06-08 - MWDESTFLD
   419					;		 09    - MWCCENA
   420					;		 10    - MWRAMODE
   421					;		 11-14 - MWPORTAFLD
   422					;		 15-18 - MWPORTBFLD
   423					;		 19-23 - MWSKIPFLD
   424					;		 24-26 - MWBUSCTLFLD
   425					;		 27    - MWCARRY
   426					;		 28-31 - MWCTRLFLD
   427					;		 32    - MWTIMEFLD
   428					;		 33    - MWSPARE00
   429					;		 34    - MWMARKBIT
   430					;
   431					;		 35    - Force bad parity flag
   432					;
   433					;  The microwords are generated using a set of field  definitions
   434					;  describing how the two words are to be constructed. Each field
   435					;  is defined as a bit position in the first word, a bit position
   436					;  in the right word, and a magnitude describing the size  of the
   437					;  field.  These are defined as follows:
   438					;
   439					;      .Lxxxx - Specifies the rightmost bit position of the field
   440					;		in the left word. If the field does not appear in
   441					;		left word, this will be zero.
   442					;
   443					;      .Rxxxx - Specifies the rightmost bit position of the field
   444					;		in the right word.  If the field  does not appear
   445					;		in right word, this will be zero.
   446					;
   447					;      .Mxxxx - Specifies the maximum magnitude of the  field  in
   448					;		the word.
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 11
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0122

   449
   450					;  The microwords are generated as follows:
   451					;
   452					;  Left word = ((value AND .Mxxxx) times .Lxxxx) ! next field ...
   453					;  Right word = ((value AND .Mxxxx) times .Rxxxx) ! next field ...
   454					;
   455					;  Parity is calculated prior to loading into the CRAM.  The parity
   456					;  bit  may be specified explicitly by specifying EVEN or ODD.  The
   457					;  microcode  loader  will  ensure  that the word has the specified
   458					;  parity.  If not specified, the correct parity will be calculated.
   459					;
   460					;  Sample microword definitions:
   461					;
   462					;  (a) Specify:  J 1000, OUTENA, SORCE fld = 2, DEST fld = 3
   463					;		 load address = 120
   464					;
   465					;      Type:     MWORD	<ADDR=120,J=1000,OENA,SORC=2,DEST=3>
   466					;#********************************************************************
   467
   468		000100	000000			.LADDR==1B11			; MW load address
   469			000000			.RADDR==0
   470			007777			.MADDR==7777
   471
   472			010000			.LJ==1B23			; MW jump field         (00:11)
   473			000000			.RJ==0
   474			007777			.MJ==7777
   475
   476			004000			.LPAR==1B24			; MW parity		(12:12)
   477			000000			.RPAR==0
   478			000001			.MPAR==1
   479
   480			002000			.LOENA==1B25			; MW output enable      (13:13)
   481			000000			.ROENA==0
   482			000001			.MOENA==1
   483
   484			000001			.LMGC==1B35			; MW magic number field (14:23)
   485			000000			.RMGC==0
   486			001777			.MMGC==1777
   487
   488			000000			.LSORC==0			; MW source field       (24:26)
   489		100000	000000			.RSORC==1B2
   490			000007			.MSORC==7
   491
   492			000000				.LSAQ==0		; Source = AQ
   493			000000				.RSAQ==0B2
   494			000007				.MSAQ==7
   495
   496			000000				.LSAB==0		; Source = AB
   497		100000	000000				.RSAB==1B2
   498			000007				.MSAB==7
   499
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 12
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0123

   500			000000				.LS0Q==0		; Source = 0Q
   501		200000	000000				.RS0Q==2B2
   502			000007				.MS0Q==7
   503
   504			000000				.LS0B==0		; Source = 0B
   505		300000	000000				.RS0B==3B2
   506			000007				.MS0B==7
   507
   508			000000				.LS0A==0		; Source = 0A
   509		400000	000000				.RS0A==4B2
   510			000007				.MS0A==7
   511
   512			000000				.LSDA==0		; Source = DA
   513		500000	000000				.RSDA==5B2
   514			000007				.MSDA==7
   515
   516			000000				.LSDQ==0		; Source = DQ
   517		600000	000000				.RSDQ==6B2
   518			000007				.MSDQ==7
   519
   520			000000				.LSD0==0		; Source = D0
   521		700000	000000				.RSD0==7B2
   522			000007				.MSD0==7
   523
   524			000000			.LFUNC==0			; MW function field     (27:29)
   525		010000	000000			.RFUNC==1B5
   526			000007			.MFUNC==7
   527
   528			000000				.LPLUS==0		; R PLUS S function
   529			000000				.RPLUS==0B5
   530			000007				.MPLUS==7
   531
   532			000000				.LSMIN==0		; R MINUS S function
   533		010000	000000				.RSMIN==1B5
   534			000007				.MSMIN==7
   535
   536			000000				.LRMIN==0		; R MINUS S function
   537		020000	000000				.RRMIN==2B5
   538			000007				.MRMIN==7
   539
   540			000000				.LOR==0			; R OR S function
   541		030000	000000				.ROR==3B5
   542			000007				.MOR==7
   543
   544			000000				.LAND==0		; R AND S function
   545		040000	000000				.RAND==4B5
   546			000007				.MAND==7
   547
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 13
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0124

   548			000000				.LNAND==0		; NOT R AND S function
   549		050000	000000				.RNAND==5B5
   550			000007				.MNAND==7
   551
   552			000000				.LXOR==0		; R XOR S function
   553		060000	000000				.RXOR==6B5
   554			000007				.MXOR==7
   555
   556			000000				.LXNOR==0		; R XNOR S function
   557		070000	000000				.RXNOR==7B5
   558			000007				.MXNOR==7
   559
   560			000000			.LD==0				; MW destination field  (30:32)
   561		001000	000000			.RD==1B8
   562			000007			.MD==7
   563
   564			000000			.LCENA==0			; MW CC enable          (33:33)
   565		000400	000000			.RCENA==1B9
   566			000001			.MCENA==1
   567
   568			000000				.LDISA==0		; MW CC disable
   569			000000				.RDISA==0B9
   570			000001				.MDISA==1
   571
   572			000000				.LENA==0		; MW CC enable
   573		000400	000000				.RENA==1B9
   574			000001				.MENA==1
   575
   576			000000			.LRAM==0			; MW RAM mode           (34:34)
   577		000200	000000			.RRAM==1B10
   578			000001			.MRAM==1
   579
   580			000000			.LA==0				; MW Port A field       (35:38)
   581		000010	000000			.RA==1B14
   582			000017			.MA==17
   583
   584			000000			.LB==0				; MW Port B field       (39:42)
   585			400000			.RB==1B18
   586			000017			.MB==17
   587
   588			000000			.LSK==0				; MW skip field         (43:47)
   589			010000			.RSK==1B23
   590			000037			.MSK==37
   591
   592			000000				.LCCON==0		; Select CC 'on' (CCCSRCHNG)
   593			030000				.RCCON==03B23
   594			000037				.MCCON==37
   595
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 14
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0125

   596			000000				.LCCOF==0		; Select CC 'off' (CCGRNTCSR)
   597			010000				.RCCOF==01B23
   598			000037				.MCCOF==37
   599
   600			000000				.LCCCA==0		; Select CCCBUSAVAIL
   601			000000				.RCCCA==0B23
   602			000037				.MCCCA==37
   603
   604			000000				.LCCGC==0		; Select CCGRNTCSR
   605			010000				.RCCGC==01B23
   606			000037				.MCCGC==37
   607
   608			000000				.LCCFZ==0		; Select CCFEQ0
   609			020000				.RCCFZ==02B23
   610			000037				.MCCFZ==37
   611
   612			000000				.LCCCC==0		; Select CCCSRCHNG
   613			030000				.RCCCC==03B23
   614			000037				.MCCCC==37
   615
   616			000000				.LCCEB==0		; Select CCEBPARERR
   617			040000				.RCCEB==4B23
   618			000037				.MCCEB==37
   619
   620			000000				.LCCAF==0		; Select CCRCVRBUFAFUL
   621			050000				.RCCAF==5B23
   622			000037				.MCCAF==37
   623
   624			000000				.LCCBF==0		; Select CCRCVRBUFBFUL
   625			060000				.RCCBF==6B23
   626			000037				.MCCBF==37
   627
   628			000000				.LCCXA==0		; Select CCXMTRATTN
   629			070000				.RCCXA==7B23
   630			000037				.MCCXA==37
   631
   632			000000				.LCCER==0		; Select CCEBUSRQST
   633			100000				.RCCER==10B23
   634			000037				.MCCER==37
   635
   636			000000				.LCCIA==0		; Select CCINTRACTIVE
   637			110000				.RCCIA==11B23
   638			000037				.MCCIA==37
   639
   640			000000				.LCCMB==0		; Select CCMBSIGN
   641			120000				.RCCMB==12B23
   642			000037				.MCCMB==37
   643
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 15
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0126

   644			000000				.LCCMP==0		; Select CCMVRPARCHK
   645			130000				.RCCMP==13B23
   646			000037				.MCCMP==37
   647
   648			000000				.LCCCP==0		; Select CCCBUSPARERR
   649			140000				.RCCCP==14B23
   650			000037				.MCCCP==37
   651
   652			000000				.LCCPP==0		; Select CCPLIPARERR
   653			150000				.RCCPP==15B23
   654			000037				.MCCPP==37
   655
   656			000000				.LCCCE==0		; Select CCCHANERR
   657			160000				.RCCCE==16B23
   658			000037				.MCCCE==37
   659
   660			000000				.LCCLW==0		; Select CCCBLSTWD
   661			170000				.RCCLW==17B23
   662			000037				.MCCLW==37
   663
   664			000000				.LLSAD==0		; Load SAD Reg
   665			200000				.RLSAD==20B23
   666			000037				.MLSAD==37
   667
   668			000000				.LSKMB==0		; Select MBUS field
   669			210000				.RSKMB==21B23
   670			000037				.MSKMB==37
   671
   672			000000				.LLDLM==0		; Load Local Mem
   673			230000				.RLDLM==23B23
   674			000037				.MLDLM==37
   675
   676			000000				.LRDLM==0		; Read Local Mem
   677			220000				.RRDLM==22B23
   678			000037				.MRDLM==37
   679
   680			000000				.LSKCN==0		; Select constant field
   681			240000				.RSKCN==24B23
   682			000037				.MSKCN==37
   683
   684			000000			.LBUS==0			; MW bus control field  (48:50)
   685			001000			.RBUS==1B26
   686			000007			.MBUS==7
   687
   688			000000				.LSELP==0		; Select PLI field
   689			001000				.RSELP==1B26
   690			000007				.MSELP==7
   691
   692			000000				.LSELM==0		; Select Mbus field
   693			002000				.RSELM==2B26
   694			000007				.MSELM==7
   695
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 16
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0127

   696			000000				.LSELF==0		; Select Fmtr field
   697			003000				.RSELF==3B26
   698			000007				.MSELF==7
   699
   700			000000				.LSELC==0		; Select Cbus field
   701			004000				.RSELC==4B26
   702			000007				.MSELC==7
   703
   704			000000				.LSELE==0		; Select Ebus field
   705			005000				.RSELE==5B26
   706			000007				.MSELE==7
   707
   708			000000			.LCRY==0			; MW carry              (51:51)
   709			000400			.RCRY==1B27
   710			000001			.MCRY==1
   711
   712			000000			.LOP==0				; MW control field      (52:55)
   713			000020			.ROP==1B31
   714			000017			.MOP==17
   715
   716			000000				.LJZ==0			; Jump zero instruction
   717			000000				.RJZ==00B31
   718			000017				.MJZ==17
   719
   720			000000				.LCJS==0		; Conditional JSB pipeline instruction
   721			000020				.RCJS==01B31
   722			000017				.MCJS==17
   723
   724			000000				.LJMAP==0		; Jump MAP instruction
   725			000040				.RJMAP==02B31
   726			000017				.MJMAP==17
   727
   728			000000				.LCJP==0		; Conditional jump pipeline instruction
   729			000060				.RCJP==03B31
   730			000017				.MCJP==17
   731
   732			000000				.LPUSH==0		; Push/cond load counter instruction
   733			000100				.RPUSH==04B31
   734			000017				.MPUSH==17
   735
   736			000000				.LJSRP==0		; Cond JSB R/Pipeline instruction
   737			000120				.RJSRP==05B31
   738			000017				.MJSRP==17
   739
   740			000000				.LCJV==0		; Conditional jump vector instruction
   741			000140				.RCJV==06B31
   742			000017				.MCJV==17
   743
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 17
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0128

   744			000000				.LJRP==0		; Cond jump R/Pipeline instruction
   745			000160				.RJRP==07B31
   746			000017				.MJRP==17
   747
   748			000000				.LRFCT==0		; Repeat loop, counter#0 instruction
   749			000200				.RRFCT==10B31
   750			000017				.MRFCT==17
   751
   752			000000				.LRPCT==0		; Repeat pipeline, counter#0 instr
   753			000220				.RRPCT==11B31
   754			000017				.MRPCT==17
   755
   756			000000				.LCRTN==0		; Conditional RTN instruction
   757			000240				.RCRTN==12B31
   758			000017				.MCRTN==17
   759
   760			000000				.LCJPP==0		; Cond jump pipeline and pop instr
   761			000260				.RCJPP==13B31
   762			000017				.MCJPP==17
   763
   764			000000				.LLDCT==0		; Load counter and continue instruction
   765			000300				.RLDCT==14B31
   766			000017				.MLDCT==17
   767
   768			000000				.LLOOP==0		; Test end loop instruction
   769			000320				.RLOOP==15B31
   770			000017				.MLOOP==17
   771
   772			000000				.LCONT==0		; Continue instruction
   773			000340				.RCONT==16B31
   774			000017				.MCONT==17
   775
   776			000000				.LTWB==0		; Three way branch instruction
   777			000360				.RTWB==17B31
   778			000017				.MTWB==17
   779
   780			000000			.LTIM==0			; time field
   781			000010			.RTIM==1B32
   782			000001			.MTIM==1
   783
   784			000000			.LSPAR==0			; 1st spare bit
   785			000004			.RSPAR==1B33
   786			000001			.MSPAR==1
   787
   788			000000			.LMARK==0			; mark bit
   789			000002			.RMARK==1B34
   790			000001			.MMARK==1
   791
   792			000000			.LBAD==0			; force bad parity
   793			000001			.RBAD==1B35
   794			000001			.MBAD==1
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 18
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0129

   795
   796					;#********************************************************************
   797					;* Microword Macros (Note: If ADDR not specified, 'ADDR'+1 is used).
   798					;
   799					;  Left word = ((value AND .Mxxxx) times .Lxxxx) ! next field ...
   800					;  Right word = ((value AND .Mxxxx) times .Rxxxx) ! next field ...
   801					;
   802					;  Samples:	MWORD	<J=1000,OENA,SORC=2,DEST=3>
   803					;		MWORD	<J=0,OENA,SORC=2,DEST=3>
   804					;#********************************************************************
   805
   806					; CALC - Insert field value into the microwords under construction
   807
   808						DEFINE	CALC($ARG1)<
   809						IFE .L'$ARG1-1B11,<%ADDR==$ARG2>
   810						IFN .L'$ARG1-1B11,<%ML=%ML!<<$ARG2&.M'$ARG1>*.L'$ARG1>
   811								   %MR=%MR!<<$ARG2&.M'$ARG1>*.R'$ARG1>>>
   812
   813					; CONCAT - Build string argument
   814
   815						DEFINE	CONCAT($A)<
   816						$B=<SIXBIT /$A/>_-36		; get right justified character in
   817						$CHR=$CHR_6+$B>			;   octal and accumulate in string
   818
   819					; FIELD - Decode argument in the form XXXX=NNNN into XXXX and NNNN
   820
   821						DEFINE	FIELD($ARG)<
   822						$CHR=0				; init string argument
   823						$GARG=0				; init numeric argument
   824						IRPC $ARG,<IFN $GARG,<$ARG2=$ARG2*8+$ARG>
   825							  IFIDN "=",$ARG,<$GARG=1
   826									 $ARG2=0>
   827							  IFE $GARG,<CONCAT $ARG>
   828							  IFE $GARG,<$ARG2=1>>
   829						CALC \'$CHR>			; enter into microword
   830
   831					; MWORD - Build microwords
   832
   833						DEFINE	MWORD ($FLD)<
   834						%ML==0				; init left word
   835						%MR==0				; init right word
   836						IRP $FLD,<DEFINE MFLD($A)<FIELD $A>
   837							 MFLD	$FLD>
   838						%ML==%ML!%ADDR_^D24
   839						%ADDR==%ADDR+1
   840						EXP	%ML,%MR>		; done
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 19
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0130

   841
   842					;#********************************************************************
   843					;* PLI/Link Microword Macros
   844					;
   845					; R0 - Scratch AC, also contains any arguments/data required
   846					; R15 - Contains the result of any read
   847					;#********************************************************************
   848
   849					; Issue a 'Load Transmit Buffer' function
   850
   851						DEFINE	LDXBUF <
   852						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   853						MWORD	<CONT,SELP,MGC=214>>
   854
   855					; Issue a 'Transmit' function
   856
   857						DEFINE	TXMIT (X)<
   858						MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=X>
   859						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   860						MWORD	<CONT,SELP,MGC=314>>
   861
   862					; Issue a 'Reset Transmit Status' function
   863
   864						DEFINE	RSXSTA <
   865						MWORD	<CONT,SELP,MGC=50>>
   866
   867					; Issue a 'Enable Link Control' function
   868
   869						DEFINE	ELINK (X)<
   870						MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=X>
   871						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   872						MWORD	<CONT,SELP,MGC=154>>
   873
   874					; Issue a 'Disable Link Control' function
   875
   876						DEFINE	DLINK (X)<
   877						MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=X>
   878						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   879						MWORD	<CONT,SELP,MGC=354>>
   880
   881					; Issue a 'Read Receiver Status' function
   882
   883						DEFINE	RDRSTA <
   884						MWORD	<CONT,S0B,AND,B=15,D=2,SELP,MGC=32>
   885						MWORD	<CONT,SD0,OR,B=15,D=2,SELM,MGC=300>>
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 20
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0131

   886
   887					; Issue a 'Read Transmit Status' function
   888
   889						DEFINE	RDXSTA <
   890						MWORD	<CONT,S0B,AND,B=15,D=2,SELP,MGC=232>
   891						MWORD	<CONT,SD0,OR,B=15,D=2,SELM,MGC=300>>
   892
   893					; Issue a 'Read Buffer' function
   894
   895						DEFINE	RDBUFF <
   896						MWORD	<CONT,S0B,AND,B=15,D=2,SELP,MGC=132>
   897						MWORD	<CONT,SD0,OR,B=15,D=2,SELM,MGC=300>>
   898
   899					; Issue a 'Read Node Address' function
   900
   901						DEFINE	RDNADR <
   902						MWORD	<CONT,S0B,AND,B=15,D=2,SELP,MGC=332>
   903						MWORD	<CONT,SD0,OR,B=15,D=2,SELM,MGC=300>>
   904
   905					; Issue a 'Set Mode' function
   906
   907						DEFINE	SETMOD (X)<
   908						MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=X>
   909						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   910						MWORD	<CONT,SELP,MGC=274>>
   911
   912					; Issue a 'Select Buffer' function
   913
   914						DEFINE	SELBUF (X)<
   915						MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=X>
   916						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   917						MWORD	<CONT,SELP,MGC=174>
   918						MWORD	<CONT,D=1>>
   919
   920					; Issue a 'Read PILA Revision Level' function
   921
   922						DEFINE	RDPILA <
   923						MWORD	<CONT,S0B,AND,B=15,D=2,SELP,MGC=72>
   924						MWORD	<CONT,SD0,OR,B=15,D=2,SELM,MGC=300>>
   925
   926					; Issue an 'Abort Transmission' function
   927
   928						DEFINE	ABOXMT <
   929						MWORD	<CONT,SELP,MGC=250>>
   930
   931					; Issue a 'Sync' function
   932
   933						DEFINE	SYNC <
   934						MWORD	<CONT,SELP,MGC=370>>
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 21
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0132

   935
   936					; Other macros (variations on the prior macros)
   937
   938					; Issue a 'Transmit' function with transmit data from LS2
   939
   940						DEFINE	LTXMIT <
   941						MWORD	<CONT,SD0,OR,D=2,RDLM,MGC=2>
   942						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   943						MWORD	<CONT,SELP,MGC=314>>
   944
   945					; Issue a 'Set Mode' function with data in LS1
   946
   947						DEFINE	LSMOD1 <
   948						MWORD	<CONT,SD0,OR,D=2,RDLM,MGC=1>
   949						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   950						MWORD	<CONT,SELP,MGC=274>>
   951
   952					; Issue a 'Select Buffer' function - write transmit buffer selected by LS0
   953
   954						DEFINE	LSBWR <
   955						MWORD	<CONT,SD0,OR,D=2,RDLM,MGC=0>
   956						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   957						MWORD	<CONT,SELP,MGC=174>
   958						MWORD	<CONT,D=1>>
   959
   960					; Issue a 'Select Buffer' function - read transmit buffer selected by LS0
   961
   962						DEFINE	LSBRT <
   963						MWORD	<CONT,SDA,AND,A=14,D=2,SKCN,MGC=4>
   964						MWORD	<CONT,SDA,OR,D=2,RDLM,MGC=0>
   965						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   966						MWORD	<CONT,SELP,MGC=174>
   967						MWORD	<CONT,D=1>>
   968
   969					; Issue a 'Select Buffer' function - read receive buffer selected by LS0
   970
   971						DEFINE	LSBRR <
   972						MWORD	<CONT,SDA,AND,A=14,D=2,SKCN,MGC=2>
   973						MWORD	<CONT,SDA,PLUS,D=2,RDLM,MGC=0>
   974						MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>
   975						MWORD	<CONT,SELP,MGC=174>
   976						MWORD	<CONT,D=1>>
   977
   978					; Write local storage (8 bit data only)
   979
   980						DEFINE	WRLS (X,Y)<
   981						MWORD	<CONT,SDA,A=14,AND,D=2,SKCN,MGC=Y>
   982						MWORD	<CONT,S0A,OR,D=1,OENA,OENA,LDLM,MGC=X>>
   983
   984					; Read local storage into Rx
   985
   986						DEFINE	RDLS (X,Y)<
   987						MWORD	<CONT,SD0,OR,B=X,D=2,RDLM,MGC=Y>>
   988
   989					; Delay
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 21-1
DFCIAT	MAC	 6-Jun-83 13:51		DFCIA TITLE FILE                                                                   SEQ 0133

   990
   991						DEFINE	MDELAY (X)<
   992						MWORD	<CJS,J=5500,SDA,A=14,AND,D=2,SKCN,MGC=X>>
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 1
PARAM	KLM	18-Sep-79 17:16		*PARAM*	CONSOLE DATA SWITCH ASSIGNMENTS, SEPT 18,1979                              SEQ 0134

   993					SUBTTL	*PARAM*	CONSOLE DATA SWITCH ASSIGNMENTS, SEPT 18,1979
   994
   995					DEFINE	S,<; *********************************************************************>
   996
   997					; **********************************************************************
   998					;*DATA SWITCHES (READ FROM CONSOLE IN EXEC MODE OR TYPED IN IN USER MODE)
   999					;*LEFT HALF SWITCHES ARE PRE-ASSIGNED FOR SUBROUTINE PACKAGE USE
  1000					;*AND CONTROL LOOPING, PRINTING (TTY OR OTHER DEVICE) AND MISC. FUNCTIONS
  1001					; **********************************************************************
  1002
  1003			400000		ABORT==	400000			;ABORT PROGRAM ON PASS COMPLETION
  1004			200000		RSTART==200000			;RESTART TEST, PRINT TOTALS
  1005			100000		TOTALS==100000			;PRINT TOTALS, CONTINUE
  1006
  1007			040000		NOPNT==	040000			;INHIBIT ALL PRINT/TYPE OUT (EXCEPT FORCED)
  1008			020000		PNTLPT==020000			;PRINT ALL DATA ON LPT (LOGICAL DEVICE, USER MODE)
  1009			010000		DING==	010000			;RING BELL ON ERROR
  1010
  1011			004000		LOOPER==004000			;ENTER EXERCISE/CHECK LOOP ON ERROR
  1012			002000		ERSTOP==002000			;HALT ON TEST ERROR
  1013			001000		PALERS==001000			;PRINT ALL ERRORS
  1014
  1015			000400		RELIAB==000400			;RELIABILITY MODE
  1016			000200		TXTINH==000200			;INHIBIT ERROR TEXT
  1017			000100		INHPAG==000100			;INHIBIT PAGING
  1018
  1019			000040		MODDVC==000040			;MODIFY DEVICE CODE
  1020			000020		INHCSH==000020			;INHIBIT CACHE
  1021			000010		OPRSEL==000010			;OPERATOR SELECTION
  1022
  1023			000004		CHAIN==	000004			;CHAIN CONTROL SWITCH
  1024
  1025			000002		KAHZ50==000002			;KA10 50 HERTZ POWER
  1026
  1027									;SWITCH 17 RESERVED !!!
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 2
PARAM	KLM	18-Sep-79 17:16		*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979                                SEQ 0135

  1028					SUBTTL	*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979
  1029
  1030					; **********************************************************************
  1031					;*SPECIAL SUBPROGRAM LINKAGES
  1032					; **********************************************************************
  1033
  1034			027772		FSELNK=	27772	;FILE SELECT LINK
  1035			027773		FRDLNK=	27773	;FILE READ LINK
  1036			027774		LDLNK=	27774	;LOAD LINKAGE ADDRESS
  1037			027775		DDTLNK=	27775	;DDT LINKAGE ADDRESS
  1038			027776		MODLNK=	27776	;OPERATIONAL MODE CHECK LINKAGE ADDRESS
  1039			027777		SUBLNK=	27777	;SUBROUTINE LINKAGE ADDRESS
  1040
  1041					; **********************************************************************
  1042					;*SPECIAL SUBROUTINE FATAL HALTS
  1043					;*USED TO REPORT ERRORS THAT CAUSE THE SUBROUTINES TO BE UNUSABLE
  1044					; **********************************************************************
  1045
  1046					;ADDRESS   TAG	REASON
  1047					;---------------------
  1048
  1049					; 1010 	NOEXEC	;PROGRAM NOT CODED FOR EXEC MODE OPERATION
  1050					; 1011  PLERR	;FATAL PUSH LIST POINTER ERROR
  1051					; 1012  PLERR1	;INITIAL PUSH LIST POINTER ERROR
  1052					; 1013  MUOERR	;MUUO WITH LUUO HANDLER WIPED OUT
  1053					; 1014  DTEBER	;DTE20 INTERRUPT WITHOUT DOORBELL
  1054					; 1015  DTECER	;DTE20 CLOCK INTERRUPT WITHOUT FLAG SET
  1055					; 1016  CPIERR	;CPU INITIALIZATION ERROR
  1056					; 1017  EOPERR	;END OF PROGRAM ERROR
  1057					; 1020  LUOERR	;INTERRUPT WITH LUUO HANDLER WIPED OUT
  1058
  1059					; **********************************************************************
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 3
PARAM	KLM	18-Sep-79 17:16		*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979                                SEQ 0136

  1060					; **********************************************************************
  1061					;OPERATOR DEFINITIONS (NON-UUO'S)
  1062					; **********************************************************************
  1063
  1064		260740	000000		OPDEF	GO	[PUSHJ	P,]	;SUBROUTINE CALL
  1065		263740	000000		OPDEF	RTN	[POPJ	P,]	;SUBROUTINE RETURN 
  1066		261740	000000		OPDEF	PUT	[PUSH	P,]	;PUT DATA ON PUSH LIST
  1067		262740	000000		OPDEF	GET	[POP	P,]	;GET DATA FROM PUSH LIST 
  1068		254000	000000		OPDEF	PJRST	[JRST	]	;JRST TO ROUTINE THAT RTN'S
  1069		254200	000000		OPDEF	HALT	[JRST	4,]	;DEFINITION FOR DDT
  1070		254100	000000		OPDEF	JRSTF	[JRST	2,]	;DEFINITION FOR DDT
  1071		254500	000000		OPDEF	JEN	[JRST	12,]	;DEFINITION FOR DDT
  1072
  1073					; **********************************************************************
  1074					;SUBROUTINE INITIALIZATION CALL
  1075					; **********************************************************************
  1076
  1077		265000	030011		OPDEF	PGMINT	[JSP	0,SBINIT]	;SUBROUTINE INITIALIZATION
  1078
  1079					; **********************************************************************
  1080					;HALTING UUO'S (A MORE GRACEFUL HALT THAN SIMPLY USING THE HALT INSTRUCTION).
  1081					; **********************************************************************
  1082
  1083		037640	000004		OPDEF	FATAL	[37B8!15B12!4]	;FATAL PROGRAMMING HALT
  1084		037600	000004		OPDEF	ERRHLT	[37B8!14B12!4]	;PROGRAM ERROR HALT
  1085
  1086					; **********************************************************************
  1087					;TERMINAL INPUT UUO'S
  1088					;ALWAYS COME FROM THE CONSOLE TERMINAL IN EXEC MODE OR THE
  1089					;CONTROLLING TERMINAL (REAL TERMINAL OR PTY) IN USER MODE.
  1090					; **********************************************************************
  1091
  1092		037000	000003		OPDEF	TTICHR 	[37B8!0B12!3]	;TTY, INPUT ANY CHARACTER
  1093		037040	000003		OPDEF	TTIYES	[37B8!1B12!3]	;TTY, NORMAL RETURN Y
  1094		037100	000003		OPDEF	TTINO	[37B8!2B12!3]	;TTY, NORMAL RETURN N
  1095		037140	000003		OPDEF	TTIOCT	[37B8!3B12!3]	;TTY, INPUT OCTAL WORD
  1096		037200	000003		OPDEF	TTIDEC	[37B8!4B12!3]	;TTY, INPUT DECIMAL WORD
  1097		037240	000003		OPDEF	TTICNV	[37B8!5B12!3]	;TTY, INPUT CONVERTABLE WORD
  1098		037300	000003		OPDEF	TTLOOK	[37B8!6B12!3]	;TTY, KEYBOARD CHECK
  1099		037340	000003		OPDEF	TTALTM	[37B8!7B12!3]	;TTY, ALT-MODE CHECK
  1100		037400	000003		OPDEF	TTSIXB	[37B8!10B12!3]	;TTY, INPUT SIXBIT WORD
  1101		037440	000003		OPDEF	TTYINP	[37B8!11B12!3]	;TTY, IMAGE MODE INPUT
  1102		037500	000003		OPDEF	TTICLR	[37B8!12B12!3]	;TTY, CLEAR INPUT
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 4
PARAM	KLM	18-Sep-79 17:16		*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979                                SEQ 0137

  1103					;TERMINAL OUTPUT UUO'S.
  1104
  1105		037000	000000		OPDEF	PNTA	[37B8!0B12!0]	;PRINT ASCII WORD
  1106		037000	000001		OPDEF	PNTAF	[37B8!0B12!1]	;PRINT ASCII WORD FORCED
  1107		037740	000000		OPDEF	PNTAL	[37B8!17B12!0]	;PRINT ASCIZ LINE
  1108		037740	000001		OPDEF	PNTALF	[37B8!17B12!1]	;PRINT ASCIZ LINE FORCED
  1109		037600	000003		OPDEF	PSIXL	[37B8!14B12!3]	;PRINT SIXBIT'Z LINE
  1110		037640	000003		OPDEF	PSIXLF	[37B8!15B12!3]	;PRINT SIXBIT'Z LINE FORCED
  1111		037000	000000		OPDEF	PNTMSG	[37B8!0B12!0]	;PRINT MESSAGE IMMEDIATE
  1112		037040	000000		OPDEF	PNTMSF	[37B8!1B12!0]	;PRINT MESSAGE IMMEDIATE FORCED
  1113		037100	000000		OPDEF	PSIXM	[37B8!2B12!0]	;PRINT SIXBIT'Z MSG IMMEDIATE
  1114		037200	000000		OPDEF	PSIXMF	[37B8!4B12!0]	;PRINT SIXBIT'Z MSG IMM FORCED
  1115		037000	000000		OPDEF	PNTCI	[37B8!0B12!0]	;PRINT CHARACTER IMMEDIATE
  1116		037040	000000		OPDEF	PNTCIF	[37B8!1B12!0]	;PRINT CHARACTER IMMEDIATE FORCED
  1117		037500	000000		OPDEF	PNTCHR	[37B8!12B12!0]	;PRINT CHARACTER
  1118		037500	000001		OPDEF	PNTCHF	[37B8!12B12!1]	;PRINT CHARACTER FORCED
  1119		037040	000000		OPDEF	PNT1	[37B8!1B12!0]	;PRINT ONE OCTAL DIGIT
  1120		037040	000001		OPDEF	PNT1F	[37B8!1B12!1]	;PRINT 1 OCTAL DIGIT FORCED	
  1121		037100	000000		OPDEF	PNT2	[37B8!2B12!0]	;PRINT TWO OCTAL DIGITS
  1122		037100	000001		OPDEF	PNT2F	[37B8!2B12!1]	;PRINT 2 OCTAL DIGITS FORCED	
  1123		037140	000000		OPDEF	PNT3	[37B8!3B12!0]	;PRINT THREE OCTAL DIGITS
  1124		037140	000001		OPDEF	PNT3F	[37B8!3B12!1]	;PRINT THREE OCTAL DIGITS FORCED	
  1125		037200	000000		OPDEF	PNT4	[37B8!4B12!0]	;PRINT FOUR OCTAL DIGITS
  1126		037200	000001		OPDEF	PNT4F	[37B8!4B12!1]	;PRINT FOUR OCTAL DIGITS FORCED
  1127		037240	000000		OPDEF	PNT5	[37B8!5B12!0]	;PRINT FIVE OCTAL DIGITS
  1128		037240	000001		OPDEF	PNT5F	[37B8!5B12!1]	;PRINT FIVE OCTAL DIGITS FORCED
  1129		037300	000000		OPDEF	PNT6	[37B8!6B12!0]	;PRINT SIX OCTAL DIGITS
  1130		037300	000001		OPDEF	PNT6F	[37B8!6B12!1]	;PRINT SIX OCTAL DIGITS FORCED
  1131		037340	000000		OPDEF	PNT7	[37B8!7B12!0]	;PRINT 7 OCTAL DIGITS
  1132		037340	000001		OPDEF	PNT7F	[37B8!7B12!1]	;PRINT 7 OCTAL DIGITS FORCED
  1133		037440	000000		OPDEF	PNT11	[37B8!11B12!0]	;PRINT 11 OCTAL DIGITS
  1134		037440	000001		OPDEF	PNT11F	[37B8!11B12!1]	;PRINT 11 OCTAL DIGITS FORCED.
  1135		037400	000000		OPDEF	PNTADR	[37B8!10B12!0]	;PRINT PHYSICAL ADDRESS
  1136		037400	000001		OPDEF	PNTADF	[37B8!10B12!1]	;PRINT PHYSICAL ADDRESS FORCED
  1137		037600	000000		OPDEF	PNTOCT  [37B8!14B12!0]	;PRINT FULL WORD OCTAL
  1138		037600	000001		OPDEF	PNTOTF	[37B8!14B12!1]	;PRINT FULL WORD OCTAL FORCED
  1139		037540	000000		OPDEF	PNTHW	[37B8!13B12!0]	;PRINT OCTAL HALF WORDS, 6 SP 6
  1140		037540	000001		OPDEF	PNTHWF	[37B8!13B12!1]	;PRINT OCTAL HALF WORDS, 6 SP 6 FORCED
  1141		037700	000003		OPDEF	PNTOCS	[37B8!16B12!3]	;PRINT OCTAL, SUPPRESS LEADING 0'S
  1142		037740	000003		OPDEF	PNTOCF	[37B8!17B12!3]	;PRINT OCTAL, SUPPRESS LEADING 0'S FORCED
  1143		037640	000000		OPDEF	PNTDEC	[37B8!15B12!0]	;PRINT DECIMAL, SUPRESS LEADING 0'S
  1144		037640	000001		OPDEF	PNTDCF	[37B8!15B12!1]	;PRINT DECIMAL, SUPRESS LEADING 0'S FORCED
  1145		037700	000000		OPDEF	PNTDS	[37B8!16B12!0]	;PRINT DECIMAL, SPACES FOR LD 0'S
  1146		037700	000001		OPDEF	PNTDSF	[37B8!16B12!1]	;PRINT DECIMAL, SPACES FOR LD 0'S FORCED
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 5
PARAM	KLM	18-Sep-79 17:16		*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979                                SEQ 0138

  1147		037200	000002		OPDEF	PNTNM	[37B8!4B12!2]	;PRINT PROGRAM NAME
  1148		037000	000002		OPDEF	PNTSIX	[37B8!0B12!2]	;PRINT SIXBIT WORD
  1149		037040	000002		OPDEF	PNTSXF	[37B8!1B12!2]	;PRINT SIXBIT WORD FORCED
  1150		037240	000002		OPDEF	DROPDV	[37B8!5B12!2]	;CLOSE LOGICAL FILE, USER MODE
  1151		037100	000002		OPDEF	PNTCW	[37B8!2B12!2]	;PRINT DF10 CONTROL WORD
  1152		037140	000002		OPDEF	PNTCWF	[37B8!3B12!2]	;PRINT DF10 CONTROL WORD FORCED
  1153		037000	030242		OPDEF	PCRL	[37B8!0B12!CRLF] ;PRINT CARRIAGE RETURN/LINE FEED
  1154		037040	030242		OPDEF	PCRLF	[37B8!1B12!CRLF] ;PRINT CARRIAGE RETURN/LINE FEED FORCED
  1155		037000	000040		OPDEF	PSP	[37B8!0B12!40]	;PRINT SPACE
  1156		037040	000040		OPDEF	PSPF	[37B8!1B12!40]	;PRINT SPACE FORCED
  1157		037000	030243		OPDEF	PCRL2	[37B8!0B12!CRLF2] ;PRINT CARRIAGE RETURN/LINE FEED (TWICE)
  1158		037040	030243		OPDEF	PCRL2F	[37B8!1B12!CRLF2] ;PRINT CARRIAGE RETURN/LINE FEED (TWICE) FORCED
  1159		037040	000007		OPDEF	PBELL	[37B8!1B12!7]	;PRINT TTY BELL
  1160
  1161		037040	000026		OPDEF	PFORCE	[37B8!1B12!26]	;PRINT FORCE, CONTROL O OVERRIDE
  1162
  1163					DEFINE	PMSG	(ARG),<
  1164						PSIXM	[SIXBIT\ARG'_\]>
  1165
  1166					DEFINE	PMSGF	(ARG),<
  1167						PSIXMF	[SIXBIT\ARG'_\]>
  1168
  1169					;SIXBTZ -- MACRO TO GENERATE SIXBIT DATA FOR PRINTING
  1170					;	CONSERVES CORE OVER ASCIZ
  1171
  1172					DEFINE	SIXBTZ	(ARG),<	[SIXBIT\ARG'_\]>
  1173
  1174					;CONSOLE SWITCH INPUT UUO.
  1175					;READS CONSOLE SWITCHES IF IN EXEC MODE OR ASKS FOR THEM IF
  1176					; USER MODE.
  1177
  1178		037400	000002		OPDEF	SWITCH	[37B8!10B12!2]	;INPUT CONSOLE SWITCHES
  1179
  1180					;CLOCK INITIALIZATION UUO - TO SET DESIRED CLOCK OPERATION
  1181					;EITHER IGNORE CLOCK, ONLY LET IT TICK OR CAUSE INTERRUPT TO OCCUR.
  1182
  1183		037540	000004		OPDEF	CLOKOP	[37B8!13B12!4]	;CLOCK OPERATION UUO - PDP-11 CLOCK
  1184		037200	000004		OPDEF	MTROP	[37B8!4B12!4]	;CLOCK OPERATION UUO - DK20 METER
  1185
  1186					;KL10 ONLY CACHE OPERATION UUO'S
  1187
  1188		037040	000004		OPDEF	CINVAL	[37B8!1B12!4]	;CACHE INVALIDATE
  1189		037100	000004		OPDEF	CFLUSH	[37B8!2B12!4]	;CACHE FLUSH
  1190		037140	000004		OPDEF	CWRTBI	[37B8!3B12!4]	;CACHE WRITE-BACK & INVALIDATE
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 6
PARAM	KLM	18-Sep-79 17:16		*PARAM* PROGRAM/SUBROUTINE PARAMETERS, SEPT 18,1979                                SEQ 0139

  1191					;END OF PASS/PROGRAM UUOS
  1192
  1193					;PERFORMS THE END OF PASS FUNCTIONS. INCREMENT PASS COUNT,
  1194					;DECREMENT ITERATION COUNT, CHECK IF FINISHED WITH THIS PROGRAM ETC.
  1195
  1196		037500	000004		OPDEF	ENDUUO	[37B8!12B12!4]	;UUO TO DISPLAY LIGHTS
  1197		037700	000004		OPDEF	EOPUUO	[37B8!16B12!4]	;END OF PROGRAM UUO
  1198
  1199					;MEMORY MANAGEMENT UUO'S
  1200					;UUO'S TO PERFORM VARIOUS MEMORY FUNCTIONS. MAPPING, ZEROING, PAGING,
  1201					;ADDRESS CONVERSION, ETC...
  1202
  1203		037000	000004		OPDEF	MAPMEM	[37B8!0B12!4]	;MAP MEMORY
  1204		037500	000002		OPDEF	MEMZRO	[37B8!12B12!2]	;ZERO MEMORY
  1205		037440	000002		OPDEF	MEMSEG	[37B8!11B12!2]	;SETUP MEMORY SEGMENT
  1206		037540	000002		OPDEF	MAPADR	[37B8!13B12!2]	;VIRTUAL TO PHYSICAL ADR CONVERT
  1207		037640	000002		OPDEF	MAPCNK	[37B8!15B12!2]	;MAP MEMORY CHUNK
  1208		037600	000002		OPDEF	MAPSET	[37B8!14B12!2]	;SET KI10 EXEC PAGE MAP
  1209		037740	000002		OPDEF	MAPPNT	[37B8!17B12!2]	;PRINT MEMORY MAP
  1210
  1211					;DEVICE CODE MODIFICATION UUO
  1212					;ALLOWS THE MODIFICATION OF IOT'S TO ONE DEVICE TO BE CHANGED TO
  1213					;IOT'S TO A DIFFERENT DEVICE CODE.
  1214
  1215		037340	000002		OPDEF	MODPCU	[37B8!7B12!2]	;MODIFY PERHIPERAL CODE, USER
  1216		037300	000002		OPDEF	MODPCP	[37B8!6B12!2]	;MODIFY PERHIPERAL CODE, PROGRAM
  1217
  1218			030000			IFNDEF	MODDVL,<MODDVL==BEGIN>
  1219			030000			IFNDEF	MODDVU,<MODDVU==BEGIN>
  1220
  1221					;"DIAMON" FILE SELECTION AND READ UUOS
  1222
  1223		037240	000004		OPDEF	FSELECT	[37B8!5B12!4]	;FILE SELECTION
  1224		037300	000004		OPDEF	FREAD	[37B8!6B12!4]	;FILE READ - ASCII DATA
  1225		037340	000004		OPDEF	FRD36	[37B8!7B12!4]	;FILE READ - 36 BIT DATA
  1226		037400	000004		OPDEF	FRD8	[37B8!10B12!4]	;FILE READ - 8 BIT DATA
  1227
  1228					;KI10 ONLY UUO FOR PRINTING MARGIN VALUES
  1229
  1230		037700	000002		OPDEF	PNTMGN	[37B8!16B12!2]	;PRINT MARGIN VALUE
  1231
  1232						XLIST
  1233					IFNDEF	KLOLD,<LIST
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 7
PARAM	KLM	18-Sep-79 17:16		ERROR HANDLING UUO DEFINITIONS, SEPT 18,1979                                       SEQ 0140

  1234					SUBTTL	ERROR HANDLING UUO DEFINITIONS, SEPT 18,1979
  1235
  1236					; **********************************************************************
  1237					;ERROR HANDLER PARAMETERS
  1238					; **********************************************************************
  1239
  1240		036000	000000		OPDEF	ERUUO	[36B8]		;ERROR CALL UUO
  1241		035000	000000		OPDEF	ERLOOP	[35B8]		;ERROR LOOP, CHECKS PC,REPT,REPT1,ERROR
  1242		035040	000000		OPDEF	ERLP1	[35B8!1B12]	;ERROR LOOP IF PC'S MATCH
  1243		035100	000000		OPDEF	ERLP2	[35B8!2B12]	;ERROR LOOP IF ANY ERROR
  1244		034000	000000		OPDEF	REPTUO	[34B8]		;REPEAT LOOP UUO
  1245
  1246					;THE ERROR HANDLER MACROS
  1247
  1248					;A MACRO TO REPORT AN ERROR AND LOOP
  1249
  1250						DEFINE	ERROR	(ADR,FORMAT,CORECT,ACTUAL,F,D,ERR)<
  1251												SALL
  1252						ERUUO	FORMAT,[T,,[SIXBIT\F'_\]
  1253							   CORECT,,ACTUAL
  1254							   [SIXBIT\D'_\],,ERR]
  1255												XALL
  1256						ERLOOP	ADR		;IF ERROR, LOOP TO ADR
  1257					>
  1258
  1259					;A MACRO TO REPORT AN ERROR AND NOT LOOP
  1260
  1261						DEFINE	ERROR1	(FORMAT,CORECT,ACTUAL,F,D,ERR)<
  1262												SALL
  1263						ERUUO	FORMAT,[T,,[SIXBIT\F'_\]
  1264							   CORECT,,ACTUAL
  1265							   [SIXBIT\D'_\],,ERR]
  1266												XALL>
  1267
  1268					>;END OF KLOLD CONDITIONAL
  1269
  1270						XLIST
  1271						LIST
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 1
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0141

  1272					SUBTTL	*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979
  1273
  1274	030000					LOC	30000
  1275
  1276					; **********************************************************************
  1277					;PROGRAM STARTING ADDRESSES
  1278					;THESE ADDRESSES CALL VARIOUS SPECIAL START ROUTINES AND OR OPTIONS
  1279					;NORMAL START ADDRESS IS 30000 ALL OTHERS ARE SPECIAL. INVOKED BECAUSE
  1280					;OF END OF PASS, POWER FAILURE, DDT START, RE-ENTERING(TYPICALLY USER
  1281					;MODE), OR ANY NUMBER OF SPECIAL FEATURE TESTS.
  1282					; **********************************************************************
  1283
  1284	030000	254 00 1 00 027776 	BEGIN:	JRST	@MODLNK		;STAND-ALONE START
  1285	030001	254 00 0 00 000000*	$START:	JRST	START		;MODE CHECK STARTING ADDRESS
  1286
  1287	030002	254 00 1 00 027774 	DIAGMN:	JRST	@LDLNK		;DIAGNOSTIC MONITOR START
  1288
  1289	030003	254 00 1 00 027774 	SYSEXR:	JRST	@LDLNK		;SYSTEM EXERCISER START
  1290
  1291	030004	254 00 0 00 030000 	SFSTRT:	JRST	SADR1		;SPECIAL FEATURE START
  1292
  1293	030005	254 00 0 00 030000 	PFSTRT:	JRST	SADR2		;POWER FAIL RESTART
  1294
  1295	030006	254 00 0 00 030000 	REENTR:	JRST	SADR3		;REENTER START(USUALLY USER MODE ONLY)
  1296
  1297	030007				SRTDDT:				;COMMONLY MISTAKEN NAME FOR "DDTSRT"
  1298	030007	254 00 1 00 027775 	DDTSRT:	JRST	@DDTLNK		;DDT START
  1299
  1300	030010	254 00 0 00 000000*	BEGIN1:	JRST	STARTA		;LOOP START(END OF PASS COMES HERE)
  1301	030011	254 00 1 00 027777 	SBINIT:	JRST	@SUBLNK		;PMGINT LINKAGE
  1302	030012	000000	000000		RETURN:	0			;RETURN ADDRESS STORAGE
  1303
  1304	030013	254200	030001*		START1:	SADR7			;OPTIONAL STARTING ADR/INSTRUCTIONS
  1305	030014	254200	030013*		START2:	SADR8			; "
  1306	030015	254200	030014*		START3:	SADR9			; "
  1307	030016	254200	030015*		START4:	SADR10			; "
  1308	030017	254200	030016*		START5:	SADR11			; "
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 2
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0142

  1309					; **********************************************************************
  1310					;PROGRAM FIXED PARAMETER AREA
  1311					; **********************************************************************
  1312
  1313	030020	444643	514100		PNTNAM:	PAREA3		;SIXBIT PROGRAM NAME
  1314	030021	605664	000000		PNTEXT:	PAREA4		;SIXBIT PROGRAM EXTENSION
  1315	030022	711523	655207		RANDBS:	PAREA1		;RANDOM BASE NUMBER
  1316	030023	000000	000000		SWTEXR:	PAREA2		;SYSTEM EXERCISER SWITCHES
  1317	030024	000000	000005		ITRCNT:	ITERAT		;PROGRAM ITERATIONS
  1318	030025	000000000000#		$PNAME:	PGMNAM		;POINTER TO PROGRAMS NAME
  1319	030026	000003	000000		$PVER:	MCNVER,,DECVER	;MCN & DEC VERSION LEVEL
  1320	030027	000000	030000		$MODVL:	MODDVL		;DEVICE CODE CHANGE LOWER LIMIT
  1321	030030	000000	030000		$MODVU:	MODDVU		;DEVICE CODE CHANGE UPPER LIMIT
  1322	030031	777777	777777		$EMODE:	IFNDEF EXCASB,<0> IFDEF EXCASB,<-1>	;EXEC ALLOWED
  1323	030032	777777	777777		$UMODE:	IFNDEF USRASB,<0> IFDEF USRASB,<-1>	;USER ALLOWED
  1324	030033	000000	000000		$DSKUP:	IFNDEF DSKUPD,<0> IFDEF DSKUPD,<-1>	;DISK UPDATE MODE
  1325	030034	777777	777777		$MMAP:	IFNDEF MEMMAP,<0> IFDEF MEMMAP,<-1>	;ALLOW MEMORY RTNS
  1326	030035	000000	000000		PAREA7:	PAREA5		;OPTIONAL PARAMETER
  1327	030036	000000	000000		PAREA8:	PAREA6		;OPTIONAL PARAMETER
  1328
  1329					; **********************************************************************
  1330					;PROGRAM VARIABLE PARAMETER AREA
  1331					; **********************************************************************
  1332
  1333	030037	000000	000000		USER:	0		; 0 = EXEC, -1 = USER MODE FLAG
  1334	030040	000000	000000		KAIFLG:	0		;PROCESSOR TYPE, 0 = KA10, -1 = KI10
  1335	030041	000000	000000		KLFLG:	0		;PROCESSOR TYPE, 0 = KA/KI, -1 = KL10
  1336	030042	777777	777777		MONFLG:	-1		;DIAG MONITOR SPECIAL USER FLAG
  1337	030043	000000	000000		MONCTL:	0		;DIAG MON/SYS EXR FLAG
  1338	030044	000000	000000		MONTEN:	0		;-1= LOADED BY 10
  1339	030045	000000	000000		CLOCKF:	0		;CLOCK TICKED FLAG
  1340	030046	000000	000000		CONSW:	0		;CONSOLE SWITCH SETTINGS
  1341	030047	000000	000000		PASCNT:	0		;PROGRAM PASS COUNT
  1342	030050	000000	000000		RUNFLG:	0		;PROGRAM RUN FLAG
  1343	030051	000000	000000		TESTPC:	0		;SUBTEST PC
  1344	030052	000000	000000		ERRPC:	0		;ERROR PC
  1345	030053	000000	000000		ERRTLS:	0		;ERROR TOTALS
  1346	030054	000000	000000		TICKS:	0		;PROGRAM RUNNING TIME
  1347	030055	000000	000000		MARGIN:	0		;KI10 MARGIN WORD VALUE
  1348	030056	000000	000000		$ONETM:	0		;SUBROUTINE INITIALIZATION FLAG
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 3
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0143

  1349					; **********************************************************************
  1350					;SPECIAL PROGRAM DISPATCH ADDRESSES
  1351					; **********************************************************************
  1352
  1353	030057	037 12 0 00 000004 	BEGEND:	ENDUUO		;END OF PASS
  1354	030060	254 00 0 00 030010 	$BEND1:	JRST	BEGIN1	;KEEP RUNNING PROGRAM
  1355	030061	037 16 0 00 000004 	$BEND2:	EOPUUO		;END OF PROGRAM - NO RETURN
  1356	030062	000000000000#		CNTLC:	SADR5		;CONTROL C XFER ADDRESS
  1357	030063	000000	030007		ALTMGO:	SADR6		;ALTMODE XFER ADDRESS
  1358	030064				CPOPJ1:			;SKIP RETURN
  1359	030064	350 00 0 17 000000 	UUOSKP:	AOS	(P)	;SKIP RETURN FROM UUO
  1360	030065				CPOPJ:			;NON-SKIP REGULAR RETURN
  1361	030065	263 17 0 00 000000 	UUOEXT:	RTN		;UUO RETURN
  1362	030066	255 00 0 00 000000 	UUORTN:	JFCL		;ADDITIONAL USERS UUO ROUTINE
  1363	030067	255 00 0 00 000000 	$UORTX:	JFCL		;ADDITIONAL UUO LINKAGE
  1364	030070	255 00 0 00 000000 	$UUOER:	JFCL		;INITED AS (JRST $UOERX)
  1365	030071	255 00 0 00 000000 	$ITRHL:	JFCL		;ADDITIONAL INTERRUPT LINKAGE
  1366	030072	255 00 0 00 000000 	$ITRX1:	JFCL		; "
  1367	030073	255 00 0 00 000000 	$USRHL:	JFCL		; "
  1368	030074	255 00 0 00 000000 	$RSRTX:	JFCL		;ADDITIONAL POWER FAIL LINKAGE
  1369	030075	255 00 0 00 000000 	$RSRTY:	JFCL		; "
  1370	030076	255 00 0 00 000000 	RESRT1:	JFCL		; INITED AS (JRST RESRTX)
  1371	030077	255 00 0 00 000000 	RESRT2:	JFCL		; "
  1372	030100	255 00 0 00 000000 	$PARER:	JFCL		;ADDITIONAL PARITY ERROR LINKAGE
  1373	030101	255 00 0 00 000000 	ERMORE:	JFCL		;ADDITIONAL ERROR HANDLER LINKAGE
  1374	030102	254 04 0 00 030102 		HALT	.	;IMPROPER TRANSFER HALT
  1375
  1376	030103	000000	000000		$PSHER:	0		;INITED AS (JRST PSHERR)
  1377	030104	000000	000000		ITRCH1:	0		;PC & FLAGS OF CURRENT INTERRUPT
  1378	030105	000000	000000			0		;INITED AS (JRST $ITRC1)
  1379
  1380					; **********************************************************************
  1381					;PROCESSOR CONTROL STORAGE
  1382					; **********************************************************************
  1383
  1384	030106	000000	000000		$ACC0:	0		;INTERRUPT SAVED AC0
  1385	030107	000000	000000		$SVPI:	0		;INTERRUPT SAVED PI
  1386	030110	000000	000000		$SVAPR:	0		;INTERRUPT SAVED APR
  1387	030111	000000	000000		$SVPAG:	0		;INTERRUPT SAVED PAG (DATAI)
  1388	030112	000000	000000		$SPAG1:	0		;INTERRUPT SAVED PAG (CONI)
  1389
  1390	030113	000000	000000		$SVUUO:	0		;CURRENT USERS UUO
  1391	030114	000000	000000		$SVUPC:	0		;PC OF CURRENT USERS UUO
  1392
  1393	030115	000000	000000		REPTU:	0		;REPEAT UUO ITERATIONS
  1394	030116	000000	000000		SCOPE:	0		;ERROR HANDLER SCOPE LOOP FLAG
  1395	030117	000000	000000		%CORFLG:0		; " CORRECT FLAG
  1396	030120	000000	000000		%COREC:	0		; " CORRECT DATA
  1397	030121	000000	000000		%ACTFL:	0		; " ACTUAL FLAG
  1398	030122	000000	000000		%ACTUL:	0		; " ACTUAL DATA
  1399	030123	000000	000000		%DISCR:	0		; " DISCREPENCY DATA
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 4
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0144

  1400					; **********************************************************************
  1401					;UUO DISPATCH TABLE
  1402					; **********************************************************************
  1403						XLIST
  1404						LIST
  1405	030124	000000*	030070		UUODIS:	LUUO1,,$UUOER
  1406	030125	000000*	000000*			LUUO3,,LUUO2
  1407	030126	000000*	000000*			LUUO5,,LUUO4
  1408	030127	000000*	000000*			LUUO7,,LUUO6
  1409	030130	030070	030070			LUUO11,,LUUO10
  1410	030131	030070	030070			LUUO13,,LUUO12
  1411	030132	030070	030070			LUUO15,,LUUO14
  1412	030133	030070	030070			LUUO17,,LUUO16
  1413	030134	030070	030070			LUUO21,,LUUO20
  1414	030135	030070	030070			LUUO23,,LUUO22
  1415	030136	030070	030070			LUUO25,,LUUO24
  1416	030137	000000*	030070			LUUO27,,LUUO26
  1417	030140	030070	030070			LUUO31,,LUUO30
  1418	030141	030070	030070			LUUO33,,LUUO32
  1419
  1420					; **********************************************************************
  1421					;MEMORY MANAGMENT STORAGE
  1422					; **********************************************************************
  1423
  1424	030142	000000	000000		DF22F:	0		;DF10 CONTROL FLAG, 0 = 18, -1 = 22 BIT
  1425	030143	000000	000000		MAPNEW:	0		;MEMORY MAPPING CONTROL FLAG, -1 = 4096K MAPPING
  1426	030144	000000	000000		MEMTOT:	0		;TOTAL MEMORY SIZE IN K (1024.)
  1427	030145	000000	000000		MEMLOW:	0		;LOWEST USABLE MEMORY
  1428	030146				MEMSIZ:	BLOCK ^D41	;MEMORY SEGMENT POINTER TABLE
  1429
  1430					; **********************************************************************
  1431					;PRINT CONTROL STORAGE
  1432					; **********************************************************************
  1433
  1434	030217	000000	000000		PNTFLG:	0		;PRINT FLAG, -1 WHILE IN PRINT ROUTINE
  1435	030220	000000	000000		PNTENB:	0		;PRINT ENABLE
  1436	030221	000000	000000		PDISF:	0		;PRINT DISABLED FLAG
  1437	030222	000000	000000		PNTINH:	0		;INHIBIT PRINT INPUT CHECKS
  1438	030223	000000	000000		PNTSPC:	0		;PRINT SPACE CONTROL
  1439	030224	000000	000000		OPTIME:	0		;TYPE-IN WAIT TIME
  1440	030225	000000	000000		$TWCNT:	0		;TIME WAITED
  1441	030226	000000	000000		$DVOFF:	0		;LOGICAL DEVICE INITED FLAG
  1442	030227	000000	000000		TTYFIL:	0		;TTY EXEC FILLERS FLAG
  1443	030230	000000	000000		TTYSPD:	0		;TTY EXEC BAUD RATE
  1444	030231	000000	000000		$TTCHR:	0		;ACTUAL TYPED IN CHAR
  1445	030232	000000	000000		$CHRIN:	0		;UPPER CASED & PARITY STRIPPED CHAR
  1446	030233	000000	000000		$TYPNB:	0		;TYPED IN NUMBER
  1447	030234	000000	000000		$CRLF:	0		;FREE CR/LF FLAG
  1448	030235	000000	000000		$TABF:	0		;TAB CONVERSION FLAG
  1449	030236	000000	000000		$FFF:	0		;FORM FEED CONVERSION FLAG
  1450	030237	000000	000000		$VTF:	0		;VERTICAL TAB CONVERSION FLAG
  1451	030240	000000	000000		USRLFF:	0		;USER LF FILLERS
  1452	030241	000000	000000		USRCRF:	0		;USER CR FILLERS
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 5
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0145

  1453					; **********************************************************************
  1454					;THE FOLLOWING MISCELLANEOUS PRINT CHARACTERS ARE INCLUDED
  1455					;TO FACILITATE PRINTING AND ARE CALLED AS FOLLOWS:
  1456					;	MOVEI	NAME
  1457					;	PNTA		;OR PNTAF
  1458					; **********************************************************************
  1459
  1460	030242				CRLF:	ASCII/
  1461	030242	015 012 000 000 000 	/
  1462	030243				CRLF2:	ASCII/
  1463
  1464	030243	015 012 015 012 000 	/
  1465	030244	054 000 000 000 000 	COMMA:	ASCII/,/
  1466	030245	056 000 000 000 000 	PERIOD:	ASCII/./
  1467	030246	040 000 000 000 000 	SPACE:	ASCII/ /
  1468	030247	011 000 000 000 000 	TAB:	ASCII/	/
  1469	030250				MINUS:
  1470	030250	055 000 000 000 000 	HYPEN:	ASCII/-/
  1471	030251	053 000 000 000 000 	PLUS:	ASCII/+/
  1472	030252	052 000 000 000 000 	AST:	ASCII/*/
  1473	030253	100 000 000 000 000 	ATSIN:	ASCII/@/
  1474	030254	050 000 000 000 000 	LFP:	ASCII/(/
  1475	030255	051 000 000 000 000 	RTP:	ASCII/)/
  1476	030256	007 0000000000 		BELL:	BYTE (7) 007
  1477	030257	077 000 000 000 000 	QUEST:	ASCII/?/
  1478	030260	057 000 000 000 000 	SLASH:	ASCII!/!
  1479	030261	044 000 000 000 000 	DOLLAR:	ASCII/$/
  1480	030262	000000	000012		RADIX:	^D10			;DECIMAL PRINT RADIX
  1481	030263	000000	000040		RADLSP:	40			;DECIMAL PRINT LEADING CHAR
  1482	030264	000000	000012		RADLSC:	^D10			;DECIMAL PRINT LEADING CHAR COUNT
  1483
  1484					; **********************************************************************
  1485					;USER MODE OUTPUT FILE INFORMATION
  1486					; **********************************************************************
  1487
  1488	030265				$OBUF:	BLOCK	3		;LOGICAL FILE OUTPUT BUFFER HEADER
  1489	030270	60 62 51 56 64 00 	$OUTNM:	SIXBIT	/PRINT/		;FILE NAME
  1490	030271	60 56 64 00 00 00 	$OUTEX:	SIXBIT	/PNT/		;FILE NAME EXTENSION
  1491	030272					BLOCK	2
  1492
  1493					; **********************************************************************
  1494					;DISK UPDATE MODE FILE INFORMATION
  1495					; **********************************************************************
  1496
  1497	030274				$IBUF:	BLOCK	3
  1498	030277	60 62 51 56 64 00 	$INNM:	SIXBIT	/PRINT/
  1499	030300	60 56 64 00 00 00 	$INEXT:	SIXBIT	/PNT/
  1500	030301					BLOCK	2
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 6
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0146

  1501					; **********************************************************************
  1502					;PUSHDOWN LIST CONTROL INFORMATION
  1503					; **********************************************************************
  1504
  1505	030303	777577	030303		PLIST:	PLIST-PLISTE,,PLIST
  1506	030304				PLISTS:	BLOCK	200
  1507	030504	000000	000000		PLISTE:	0		;END OF PUSHDOWN LIST
  1508
  1509					; **********************************************************************
  1510					;POWER LINE CLOCK FREQUENCY FLAG
  1511					; **********************************************************************
  1512
  1513	030505	000000	000000		CYCL60:	0	;0 = 60, -1 = 50 CYCLE
  1514
  1515					; **********************************************************************
  1516					;KL10 CACHE CONTROL FLAGS
  1517					; **********************************************************************
  1518
  1519	030506	000000	000000		CSHFLG:	0	;ALLOW CACHE IF 0
  1520	030507	000000	000000		CSHMEM:	0	;CACHE MEMORY SEGMENTS IF 0
  1521
  1522					; **********************************************************************
  1523					;NUMBER INPUT DIGIT FLAG
  1524					; **********************************************************************
  1525
  1526	030510	000000	000000		TTNBRF:	0	;-1 IF ANY DIGIT TYPED
  1527
  1528					; **********************************************************************
  1529					;KL10 & KI10 "INHPAG" SWITCH PAGING PREVENTION
  1530					; **********************************************************************
  1531
  1532	030511	000000	000000		PVPAGI:	0	;IF NON-ZERO, OVERRIDE "INHPAG" SWITCH ACTION
  1533
  1534					; **********************************************************************
  1535					;ERROR REPORTING ROUTINE ADDITIONAL USERS CONTROL INSTRUCTIONS
  1536					; **********************************************************************
  1537
  1538	030512	000000	000000		%ERHI1:	0	;IF NON-ZERO, XCT'D AT START OF %ERUUO
  1539	030513	000000	000000		%ERHI2:	0	;IF NON-ZERO, XCT'D AT END OF %ERUUO
  1540	030514	000000	000000		%ERHI3:	0	;IF NON-ZERO, XCT'D AFTER "PC" OF %ERUUO
  1541
  1542					; **********************************************************************
  1543					;SPECIAL USERS UUO INTERCEPT INSTRUCTION
  1544					; **********************************************************************
  1545
  1546	030515	000000	000000		$$UUO:	0	;IF NON-ZERO, XCT'D AT START OF $UORTN
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 7
FIXED	KLM	18-Sep-79 17:18		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0147

  1547					; **********************************************************************
  1548					;USER MODE MONITOR TYPE FLAG
  1549					; **********************************************************************
  1550
  1551	030516	000000	000000		MONTYP:	0	;0 = TOPS10, -1 = TOPS20
  1552
  1553					; **********************************************************************
  1554					;SPECIAL USERS MUUO INTERCEPT INSTRUCTION
  1555					; **********************************************************************
  1556
  1557	030517	000000	000000		$$MUUO:	0	;IF NON-ZERO, XCT'D AT START OF MUUOER
  1558
  1559					; **********************************************************************
  1560					;SPECIAL USERS USER MODE OUTPUT ERROR INTERCEPT INSTUCTION
  1561					; **********************************************************************
  1562
  1563	030520	000000	000000		$$OUTER:0	;IF NON-ZERO, XCT'D AT END OF USER MODE ERROR
  1564
  1565					; **********************************************************************
  1566					;"SWITCH" CALL USAGE CONTROL
  1567					; **********************************************************************
  1568
  1569	030521	000000	000000		$$TOGGLE:0	;IF NON-ZERO, USE C(CONSW) FOR SWITCHES
  1570
  1571					; **********************************************************************
  1572					;SPECIAL USERS ALTMODE SWITCH CALL INTERCEPT INSTRUCTIONS
  1573					; **********************************************************************
  1574
  1575	030522	000000	000000		$$TAX1:	0	;IF NON-ZERO, XCT'D AT START OF ALTMODE SWITCH CALL
  1576	030523	000000	000000		$$TAX2:	0	;IF NON-ZERO, XCT'D AT END OF ALTMODE SWITCH CALL
  1577
  1578					; **********************************************************************
  1579					;SM10 (KS-10) PROCESSOR TYPE FLAG
  1580					; **********************************************************************
  1581
  1582	030524	000000	000000		SM10:	0	;IF -1 THIS IS A KS-10
  1583
  1584					; **********************************************************************
  1585					;RIGHT HALF SWITCHES PROMPT TABLE ADDRESS
  1586					; **********************************************************************
  1587
  1588	030525	000000	000000		SWPTAB:	0	;0 = NO PROMPT, ADR = ADR OF SIXBIT PROMPT TABLE
  1589
  1590					; **********************************************************************
  1591					;SPECIAL FUTURE EXPANSION ROOM
  1592					; **********************************************************************
  1593
  1594					; **********************************************************************
  1595					;END OF FIXED STORAGE
  1596					; **********************************************************************
  1597
  1598	030577					LOC	30577
  1599	030577	000000	000000		ENDFIX:	0		;END OF FIXED STORAGE
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page 1
DFCIAE	MAC	20-Sep-82 09:51		*FIXED* FIXED CONTROL AND DISPATCH STORAGE, SEPT 18,1979                           SEQ 0148

  1600					;#********************************************************************
  1601					; End of DFCIAT,PARAM,FIXED,DFCIA files
  1602					;#********************************************************************
  1603
  1604						XLIST
  1605
NO ERRORS DETECTED

PROGRAM BREAK IS 030601
ABSOLUTE BREAK IS 030600
CPU TIME USED 00:06.453

71P CORE USED
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page S-1
DFCIAE	MAC	20-Sep-82 09:51		SYMBOL TABLE                                                                       SEQ 0149

ABORT		400000	spd	DATRET		000021	spd	GET	262740	000000		LCASWD		000020	spd	
ADRPE	100000	000000	spd	DATRQ0		000010	spd	GO	260740	000000		LCCASD		020020	spd	
ALL	760000	000000	spd	DATRQ1		000011	spd	GOTO	300000	000000	spd	LCHNOF		001000	spd	
ALTCHH		000000	ext	DATRQ2		000012	spd	HALT	254200	000000		LCHNON		002000		
ALTCHK	007000	000000		DATSNT		000020	spd	HYPEN		030250		LCIOPF		020400	spd	
ALTMGO		030063		DCK		000040	spd	IDLE	000100	000000	spd	LCNTRP		000434	spd	
ANXM		010000	spd	DCOMP	000040	000000	spd	IDREC		000013	spd	LCNXER		022000	spd	
AROV		400000	spd	DDTLNK		027775		IDREQ		000005	spd	LCPAER		021000	spd	
AROVU		000010	spd	DDTSRT		030007		INHCSH		000020	spd	LCPWRF		020100	spd	
AST		030252		DEBUG1		002000	spd	INHFLT		200000	spd	LCSBER		024000	spd	
ATSIN		030253		DEBUG2		001000	spd	INHMSG		100000	spd	LCSLOA		200000	spd	
BEGEND		030057		DEBUG3		000400	spd	INHPAG		000100	spd	LCSLOO		400000	spd	
BEGIN		030000		DEBUG4		000200	spd	INXM		000100	spd	LCTRP		000435	spd	
BEGIN1		030010		DEBUG5		000100	spd	IOCLR		200000	spd	LCWSX		000040	spd	
BELL		030256		DEBUG6		000040	spd	IPAER	000200	000000	spd	LDATAF		000200	spd	
BIS		020000	spd	DECVER		000000	spd	ITERAT		000005	spd	LDCASD		040020	spd	
BUFCLS		000030	spd	DELAY	005000	000000		ITRCH1		030104		LDIOPF		040400	spd	
CALL	200000	000000	spd	DF22F		030142		ITRCNT		030024		LDLNK		027774		
CCA		000014	spd	DGSNT		000001	spd	JEN	254500	000000		LDNXER		042000	spd	
CFIBF	104000	000100		DIAGMN		030002		JOB41		000041	spd	LDPAER		041000	spd	
CFLUSH	037100	000004		DING		010000	spd	JOBAPR		000125	spd	LDPWRF		040100	spd	
CHAIN		000004	spd	DINIT	040000	000000	spd	JOBCNI		000126	spd	LDSBER		044000	spd	
CHNOFF		001000	spd	DOLLAR		030261		JOBDDT		000074	spd	LECASD		100020	spd	
CHNON		002000	spd	DROPDV	037240	000002		JOBFF		000121	spd	LEIOPF		100400	spd	
CINVAL	037040	000004		DSPEAR		004000	spd	JOBOPC		000130	spd	LENXER		102000	spd	
CKTSET		000200	spd	EBUSPE		004000	spd	JOBREL		000044	spd	LEPAER		101000	spd	
CLK		001000	spd	ECOMP	000020	000000	spd	JOBREN		000124	spd	LEPWRF		100100	spd	
CLKCLR		001000	spd	ENDFIX		030577		JOBSA		000120	spd	LESBER		104000	spd	
CLKDIS		004000	spd	ENDUUO	037500	000004		JOBSYM		000116	spd	LEUPFW		000420	spd	
CLKENB		002000	spd	EOPUUO	037700	000004		JOBTPC		000127	spd	LEVNCD		100000	spd	
CLKU		001000	spd	ERFLG		000015		JOBUSY		000117	spd	LEVNPA		400000	spd	
CLOCKF		030045		ERLOOP	035000	000000		JOBUUO		000040	spd	LEVNPD		200000	spd	
CLOKOP	037540	000004		ERLP1	035040	000000		JOBVER		000137	spd	LEXCMP		000000	spd	
CLSBUF		000030	spd	ERLP2	035100	000000		JRSTF	254100	000000		LFLGCL		020000	spd	
CMDQAV		000400	spd	ERMORE		030101		JSYS	104000	000000		LFLGDS		040000	spd	
CNFRET		000003	spd	ERRHLT	037600	000004		KAHZ50		000002	spd	LFLGEN		100000	spd	
CNTLC		030062		ERRPC		030052		KAIFLG		030040		LFLGST		010000	spd	
CNTRD		000202	spd	ERRTLS		030053		KL10		000001	spd	LFP		030254		
CNTSET		000201	spd	ERSTOP		002000	spd	KLFLG		030041		LGWC	000100	000000	spd	
COMMA		030244		ERUUO	036000	000000		LAPRAL		127520	spd	LINK	100000	000000	spd	
CONSW		030046		EXCASB		000001	spd	LAPRP1		000001	spd	LINSTF		000400	spd	
CPOPJ		030065		EXIOT		004000	spd	LAPRP2		000002	spd	LINT		000010	spd	
CPOPJ1		030064		FATAL	037640	000004		LAPRP3		000003	spd	LIOCLR		200000	spd	
CRAMPE	004000	000000	spd	FOV		040000	spd	LAPRP4		000004	spd	LIOPFE		000400	spd	
CRLF		030242		FOVU		000100	spd	LAPRP5		000005	spd	LKNTRP		000430	spd	
CRLF2		030243		FQUERR		002000	spd	LAPRP6		000006	spd	LKTRP		000431	spd	
CRY0		200000	spd	FRD36	037340	000004		LAPRP7		000007	spd	LLACBL		400000	spd	
CRY1		100000	spd	FRD8	037400	000004		LAROVT		000421	spd	LLDUSB		100000	spd	
CSHFLG		030506		FRDLNK		027773		LAST	010000	000000	spd	LLPRCN		200000	spd	
CSHMEM		030507		FREAD	037300	000004		LAXER	000400	000000	spd	LMUUO		000424	spd	
CSRCHN	100000	000000	spd	FSELEC	037240	000004		LBSNT		000015	spd	LMUUOP		000425	spd	
CSRRQS	200000	000000	spd	FSELNK		027772		LCASDE		000020	spd	LNXMEN		002000	spd	
CWRTBI	037140	000004		FUNCT	020000	000000	spd	LCASLD		200000	spd	LNXMER		002000	spd	
CYCL60		030505		FXU		000100	spd	LCASLO		400000	spd	LOGO	400000	000000	spd	
DATREC		000014	spd	GENEPE		100000	spd	LCASWB		200000	spd	LOOP	040000	000000	spd	
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page S-2
DFCIAE	MAC	20-Sep-82 09:51		SYMBOL TABLE                                                                       SEQ 0150

LOOPER		004000	spd	LUUO		000040	spd	MODPCP	037300	000002		PGMNAM		000000	ext	
LOOPGM		040000	spd	LUUO1		000000*	spd	MODPCU	037340	000002		PI00RQ	020000	000000	spd	
LOOPTS		020000	spd	LUUO10		030070		MONCTL		030043		PIA00		000004	spd	
LPAREN		001000	spd	LUUO11		030070		MONFLG		030042		PIA01		000002	spd	
LPARER		001000	spd	LUUO12		030070		MONTEN		030044		PIA02		000001	spd	
LPDOVT		000422	spd	LUUO13		030070		MONTYP		030516		PICHN1		000100	spd	
LPFWPC		000426	spd	LUUO14		030070		MPER	200000	000000	spd	PICHN2		000040	spd	
LPGFTR		000427	spd	LUUO15		030070		MPRUN		000010	spd	PICHN3		000020	spd	
LPICH1		000100	spd	LUUO16		030070		MPVU		020000	spd	PICHN4		000010	spd	
LPICH2		000040	spd	LUUO17		030070		MSG	100000	000000	spd	PICHN5		000004	spd	
LPICH3		000020	spd	LUUO2		000000*	spd	MSGSNT		000002	spd	PICHN6		000002	spd	
LPICH4		000010	spd	LUUO20		030070		MTROP	037200	000004		PICHN7		000001	spd	
LPICH5		000004	spd	LUUO21		030070		MVRERR		001000	spd	PICHNA		000177	spd	
LPICH6		000002	spd	LUUO22		030070		NEXM	020000	000000	spd	PICLR		010000	spd	
LPICH7		000001	spd	LUUO23		030070		NOPNT		040000	spd	PIOFF		000400	spd	
LPICHA		000177	spd	LUUO24		030070		NOTWC0	040000	000000	spd	PION		000200	spd	
LPICLR		010000	spd	LUUO25		030070		NXMU		010000	spd	PJRST	254000	000000		
LPIIP1		040000	spd	LUUO26		030070		OP		000011		PK		000012		
LPIIP2		020000	spd	LUUO27		000000*	spd	OPRSEL		000010	spd	PLIST		030303		
LPIIP3		010000	spd	LUUO3		000000*	spd	OPTIME		030224		PLISTE		030504		
LPIIP4		004000	spd	LUUO30		030070		OVN	000020	000000	spd	PLISTS		030304		
LPIIP5		002000	spd	LUUO31		030070		P		000017		PLUS		030251		
LPIIP6		001000	spd	LUUO32		030070		PAG		000010	spd	PNT1	037040	000000		
LPIIP7		000400	spd	LUUO33		030070		PALERS		001000	spd	PNT11	037440	000000		
LPIOFF		000400	spd	LUUO4		000000*	spd	PARCLR		200000	spd	PNT11F	037440	000001		
LPION		000200	spd	LUUO5		000000*	spd	PARDIS		100000	spd	PNT1F	037040	000001		
LPNTRP		000436	spd	LUUO6		000000*	spd	PAREA1	711523	655207	spd	PNT2	037100	000000		
LPRCH1		000100	spd	LUUO7		000000*	spd	PAREA2		000000	spd	PNT2F	037100	000001		
LPRCH2		000040	spd	LUUOI		000041	spd	PAREA3	444643	514100	spd	PNT3	037140	000000		
LPRCH3		000020	spd	LWRITE		000100	spd	PAREA4	605664	000000	spd	PNT3F	037140	000001		
LPRCH4		000010	spd	MAPADR	037540	000002		PAREA5		000000	spd	PNT4	037200	000000		
LPRCH5		000004	spd	MAPCNK	037640	000002		PAREA6		000000	spd	PNT4F	037200	000001		
LPRCH6		000002	spd	MAPMEM	037000	000004		PAREA7		030035		PNT5	037240	000000		
LPRCH7		000001	spd	MAPNEW		030143		PAREA8		030036		PNT5F	037240	000001		
LPTRP		000437	spd	MAPPNT	037740	000002		PARENB		040000	spd	PNT6	037300	000000		
LPWRFE		000100	spd	MAPSET	037600	000002		PARU		004000	spd	PNT6F	037300	000001		
LPWRFL		000100	spd	MARGIN		030055		PASCNT		030047		PNT7	037340	000000		
LREQSE		004000	spd	MAXPOR		000017	spd	PAT		000014		PNT7F	037340	000001		
LRQCLR		020000	spd	MBCN		000016		PBELL	037040	000007		PNTA	037000	000000		
LSBSEN		004000	spd	MBERR	002000	000000	spd	PBUFF	200000	000000	spd	PNTADF	037400	000001		
LSBUSE		004000	spd	MCNF		000004	spd	PCLEAR		400000	spd	PNTADR	037400	000000		
LSCASD		010020	spd	MCNVER		000003	spd	PCRL	037000	030242		PNTAF	037000	000001		
LSECMO		040000	spd	MDATRQ		000016	spd	PCRL2	037000	030243		PNTAL	037740	000000		
LSIOPF		010400	spd	MDTSNT		000022	spd	PCRL2F	037040	030243		PNTALF	037740	000001		
LSMODE		040000	spd	MEMLOW		030145		PCRLF	037040	030242		PNTCHF	037500	000001		
LSNTRP		000432	spd	MEMMAP		000001	spd	PDEC	006000	000000		PNTCHR	037500	000000		
LSNXER		012000	spd	MEMSEG	037440	000002		PDECF	002000	000000		PNTCI	037000	000000		
LSPAER		011000	spd	MEMSIZ		030146		PDISF		030221		PNTCIF	037040	000000		
LSPWRF		010100	spd	MEMTOT		030144		PDLOVU		200000	spd	PNTCW	037100	000002		
LSSBER		014000	spd	MEMZRO	037500	000002		PDSABL		000040	spd	PNTCWF	037140	000002		
LSTRP		000433	spd	MINUS		030250		PENABL		000020	spd	PNTDCC	003000	000000		
LTRP3T		000423	spd	MODDVC		000040	spd	PERIOD		030245		PNTDCF	037640	000001		
LTRPAE		020000	spd	MODDVL		030000	spd	PFORCE	037040	000026		PNTDCP	004000	000000		
LTRPEN		020000	spd	MODDVU		030000	spd	PFSTRT		030005		PNTDEC	037640	000000		
LUSCMP		000040	spd	MODLNK		027776		PGMINT	265000	030011		PNTDS	037700	000000		
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page S-3
DFCIAE	MAC	20-Sep-82 09:51		SYMBOL TABLE                                                                       SEQ 0151

PNTDSF	037700	000001		REQSET		004000	spd	STRSNT		000007	spd	$$TAX1		030522		
PNTENB		030220		RESQAV		000200	spd	SUBLNK		027777		$$TAX2		030523		
PNTEXT		030021		RESRT1		030076		SWITCH	037400	000002		$$TOGG		030521		
PNTFLG		030217		RESRT2		030077		SWPTAB		030525		$$UUO		030515		
PNTHW	037540	000000		RETDAT		000021	spd	SWTEXR		030023		$ACC0		030106		
PNTHWF	037540	000001		RETURN		030012		SYSEXR		030003		$BEND1		030060		
PNTINH		030222		RQINT	010000	000000	spd	TAB		030247		$BEND2		030061		
PNTLPT		020000	spd	RSTART		200000	spd	TCALL		000002	spd	$CHRIN		030232		
PNTMGN	037700	000002		RSTSNT		000006	spd	TCALLC		000003	spd	$CRLF		030234		
PNTMSF	037040	000000		RTMDAT		000023	spd	TCOMP		002000	spd	$DEVCH		000017	spd	
PNTMSG	037000	000000		RTN	263740	000000		TDENA	000100	000000	spd	$DSKUP		030033		
PNTNAM		030020		RTP		030255		TESTPC		030051		$DVCH1		000016	spd	
PNTNM	037200	000002		RUNALL		010000	spd	TEXIT		000012	spd	$DVOFF		030226		
PNTOCC	001000	000000		RUNFLG		030050		TICKS		030054		$EMODE		030031		
PNTOCF	037740	000003		SADR1		030000		TINIT		000011	spd	$FFF		030236		
PNTOCS	037700	000003		SADR10	254200	000000*		TJRST		000010	spd	$IBUF		030274		
PNTOCT	037600	000000		SADR11	254200	000000*		TLAST		000000	spd	$INEXT		030300		
PNTOTF	037600	000001		SADR2		030000		TOTALS		100000	spd	$INNM		030277		
PNTSIX	037000	000002		SADR3		030000		TPACK		000005	spd	$ITRHL		030071		
PNTSPC		030223		SADR4		030007		TRACET		400000	spd	$ITRX1		030072		
PNTSXF	037040	000002		SADR5		000000*		TREAD		000007	spd	$LPAPE		000001	spd	
PORT	400000	000000	spd	SADR6		030007		TSTART		000001	spd	$MMAP		030034		
PORTP	400000	000000	spd	SADR7	254200	000000*		TSTEBF		200000	spd	$MODVL		030027		
PPDEC		030127	ext	SADR8	254200	000000*		TTALTM	037340	000003		$MODVU		030030		
PPDECF		030125	ext	SADR9	254200	000000*		TTICHR	037000	000003		$OBUF		030265		
PSIXL	037600	000003		SBINIT		030011		TTICLR	037500	000003		$ONETM		030056		
PSIXLF	037640	000003		SCOPE		030116		TTICNV	037240	000003		$OUTEX		030271		
PSIXM	037100	000000		SCOPE1		000000	ext	TTIDEC	037200	000003		$OUTNM		030270		
PSIXMF	037200	000000		SCOPER	027000	000000		TTINO	037100	000003		$PARER		030100		
PSP	037000	000040		SELLAR		040000	spd	TTIOCT	037140	000003		$PNAME		030025		
PSPF	037040	000040		SETCKT		000200	spd	TTIYES	037040	000003		$PSHER		030103		
PUT	261740	000000		SETCNT		000201	spd	TTLOOK	037300	000003		$PVER		030026		
PVPAGI		030511		SFSTRT		030004		TTNBRF		030510		$RSRTX		030074		
PWFCLR		400000	spd	SHWC	000040	000000	spd	TTSIXB	037400	000003		$RSRTY		030075		
Q		000013		SINCYC		020000	spd	TTYFIL		030227		$SPAG1		030112		
QUEST		030257		SLASH		030260		TTYINP	037440	000003		$START		030001		
RADIX		030262		SM10		030524		TTYSPD		030230		$SVAPR		030110		
RADLSC		030264		SNDDAT		000020	spd	TWAIT		000004	spd	$SVPAG		030111		
RADLSP		030263		SNDDG		000001	spd	TWRITE		000006	spd	$SVPI		030107		
RANDBS		030022		SNDLB		000015	spd	TXALL	060000	000000	spd	$SVUPC		030114		
RDCNT		000202	spd	SNDMDT		000022	spd	TXNOT	040000	000000	spd	$SVUUO		030113		
RDREG		000203	spd	SNDMSG		000002	spd	TXTINH		000200	spd	$TABF		030235		
REENTR		030006		SNDRST		000006	spd	TXYES	020000	000000	spd	$TTCHR		030231		
REGRD		000203	spd	SNDSTR		000007	spd	USER		030037		$TWCNT		030225		
REGWR		000204	spd	SPACE		030246		USERF		010000	spd	$TYPNB		030233		
RELIAB		000400	spd	SPARE1		010000	spd	USRASB		000001	spd	$UMODE		030032		
REPT		000015	spd	SPARE2		000100	spd	USRCRF		030241		$UORTX		030067		
REPT1		000016	spd	SRTDDT		030007		USRLFF		030240		$USRHL		030073		
REPTU		030115		START		030017	ext	UUODIS		030124		$UUOER		030070		
REPTUO	034000	000000		START1		030013		UUOEXT		030065		$VTF		030237		
REQDT0		000010	spd	START2		030014		UUORTN		030066		%ACTFL		030121		
REQDT1		000011	spd	START3		030015		UUOSKP		030064		%ACTUL		030122		
REQDT2		000012	spd	START4		030016		WRREG		000204	spd	%COREC		030120		
REQID		000005	spd	START5		030017		$$MUUO		030517		%CORFL		030117		
REQMDT		000016	spd	STARTA		030010	ext	$$OUTE		030520		%DISCR		030123		
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page S-4
DFCIAE	MAC	20-Sep-82 09:51		SYMBOL TABLE                                                                       SEQ 0152

%ERHI1		030512		.LJMAP		000000	spd	.MCCCE		000037	spd	.MSDA		000007	spd	
%ERHI2		030513		.LJRP		000000	spd	.MCCCP		000037	spd	.MSDQ		000007	spd	
%ERHI3		030514		.LJSRP		000000	spd	.MCCEB		000037	spd	.MSELC		000007	spd	
.DELAY		000000	ext	.LJZ		000000	spd	.MCCER		000037	spd	.MSELE		000007	spd	
.JB41		000041	spd	.LLDCT		000000	spd	.MCCFZ		000037	spd	.MSELF		000007	spd	
.JBAPR		000125	spd	.LLDLM		000000	spd	.MCCGC		000037	spd	.MSELM		000007	spd	
.JBCNI		000126	spd	.LLOOP		000000	spd	.MCCIA		000037	spd	.MSELP		000007	spd	
.JBDDT		000074	spd	.LLSAD		000000	spd	.MCCLW		000037	spd	.MSK		000037	spd	
.JBFF		000121	spd	.LMARK		000000	spd	.MCCMB		000037	spd	.MSKCN		000037	spd	
.JBOPC		000130	spd	.LMGC		000001	spd	.MCCMP		000037	spd	.MSKMB		000037	spd	
.JBREL		000044	spd	.LNAND		000000	spd	.MCCOF		000037	spd	.MSMIN		000007	spd	
.JBREN		000124	spd	.LOENA		002000	spd	.MCCON		000037	spd	.MSORC		000007	spd	
.JBSA		000120	spd	.LOP		000000	spd	.MCCPP		000037	spd	.MSPAR		000001	spd	
.JBSYM		000116	spd	.LOR		000000	spd	.MCCXA		000037	spd	.MTIM		000001	spd	
.JBTPC		000127	spd	.LPAR		004000	spd	.MCENA		000001	spd	.MTWB		000017	spd	
.JBUSY		000117	spd	.LPLUS		000000	spd	.MCJP		000017	spd	.MXNOR		000007	spd	
.JBUUO		000040	spd	.LPUSH		000000	spd	.MCJPP		000017	spd	.MXOR		000007	spd	
.JBVER		000137	spd	.LRAM		000000	spd	.MCJS		000017	spd	.PNTDC		000000	ext	
.LA		000000	spd	.LRDLM		000000	spd	.MCJV		000017	spd	.PNTDP		030126	ext	
.LADDR	000100	000000	spd	.LRFCT		000000	spd	.MCONT		000017	spd	.PNTOC		000000	ext	
.LAND		000000	spd	.LRMIN		000000	spd	.MCRTN		000017	spd	.RA	000010	000000	spd	
.LB		000000	spd	.LRPCT		000000	spd	.MCRY		000001	spd	.RADDR		000000	spd	
.LBAD		000000	spd	.LS0A		000000	spd	.MD		000007	spd	.RAND	040000	000000	spd	
.LBUS		000000	spd	.LS0B		000000	spd	.MDISA		000001	spd	.RB		400000	spd	
.LCCAF		000000	spd	.LS0Q		000000	spd	.MENA		000001	spd	.RBAD		000001	spd	
.LCCBF		000000	spd	.LSAB		000000	spd	.MFUNC		000007	spd	.RBUS		001000	spd	
.LCCCA		000000	spd	.LSAQ		000000	spd	.MJ		007777	spd	.RCCAF		050000	spd	
.LCCCC		000000	spd	.LSD0		000000	spd	.MJMAP		000017	spd	.RCCBF		060000	spd	
.LCCCE		000000	spd	.LSDA		000000	spd	.MJRP		000017	spd	.RCCCA		000000	spd	
.LCCCP		000000	spd	.LSDQ		000000	spd	.MJSRP		000017	spd	.RCCCC		030000	spd	
.LCCEB		000000	spd	.LSELC		000000	spd	.MJZ		000017	spd	.RCCCE		160000	spd	
.LCCER		000000	spd	.LSELE		000000	spd	.MLDCT		000017	spd	.RCCCP		140000	spd	
.LCCFZ		000000	spd	.LSELF		000000	spd	.MLDLM		000037	spd	.RCCEB		040000	spd	
.LCCGC		000000	spd	.LSELM		000000	spd	.MLOOP		000017	spd	.RCCER		100000	spd	
.LCCIA		000000	spd	.LSELP		000000	spd	.MLSAD		000037	spd	.RCCFZ		020000	spd	
.LCCLW		000000	spd	.LSK		000000	spd	.MMARK		000001	spd	.RCCGC		010000	spd	
.LCCMB		000000	spd	.LSKCN		000000	spd	.MMGC		001777	spd	.RCCIA		110000	spd	
.LCCMP		000000	spd	.LSKMB		000000	spd	.MNAND		000007	spd	.RCCLW		170000	spd	
.LCCOF		000000	spd	.LSMIN		000000	spd	.MOENA		000001	spd	.RCCMB		120000	spd	
.LCCON		000000	spd	.LSORC		000000	spd	.MOP		000017	spd	.RCCMP		130000	spd	
.LCCPP		000000	spd	.LSPAR		000000	spd	.MOR		000007	spd	.RCCOF		010000	spd	
.LCCXA		000000	spd	.LTIM		000000	spd	.MPAR		000001	spd	.RCCON		030000	spd	
.LCENA		000000	spd	.LTWB		000000	spd	.MPLUS		000007	spd	.RCCPP		150000	spd	
.LCJP		000000	spd	.LXNOR		000000	spd	.MPUSH		000017	spd	.RCCXA		070000	spd	
.LCJPP		000000	spd	.LXOR		000000	spd	.MRAM		000001	spd	.RCENA	000400	000000	spd	
.LCJS		000000	spd	.MA		000017	spd	.MRDLM		000037	spd	.RCJP		000060	spd	
.LCJV		000000	spd	.MADDR		007777	spd	.MRFCT		000017	spd	.RCJPP		000260	spd	
.LCONT		000000	spd	.MAND		000007	spd	.MRMIN		000007	spd	.RCJS		000020	spd	
.LCRTN		000000	spd	.MB		000017	spd	.MRPCT		000017	spd	.RCJV		000140	spd	
.LCRY		000000	spd	.MBAD		000001	spd	.MS0A		000007	spd	.RCONT		000340	spd	
.LD		000000	spd	.MBUS		000007	spd	.MS0B		000007	spd	.RCRTN		000240	spd	
.LDISA		000000	spd	.MCCAF		000037	spd	.MS0Q		000007	spd	.RCRY		000400	spd	
.LENA		000000	spd	.MCCBF		000037	spd	.MSAB		000007	spd	.RD	001000	000000	spd	
.LFUNC		000000	spd	.MCCCA		000037	spd	.MSAQ		000007	spd	.RDISA		000000	spd	
.LJ		010000	spd	.MCCCC		000037	spd	.MSD0		000007	spd	.RENA	000400	000000	spd	
DFCIA	MACRO %53A(1152) 18:44 29-Oct-84 Page S-5
DFCIAE	MAC	20-Sep-82 09:51		SYMBOL TABLE                                                                       SEQ 0153

.RFUNC	010000	000000	spd	
.RJ		000000	spd	
.RJMAP		000040	spd	
.RJRP		000160	spd	
.RJSRP		000120	spd	
.RJZ		000000	spd	
.RLDCT		000300	spd	
.RLDLM		230000	spd	
.RLOOP		000320	spd	
.RLSAD		200000	spd	
.RMARK		000002	spd	
.RMGC		000000	spd	
.RNAND	050000	000000	spd	
.ROENA		000000	spd	
.ROP		000020	spd	
.ROR	030000	000000	spd	
.RPAR		000000	spd	
.RPLUS		000000	spd	
.RPUSH		000100	spd	
.RRAM	000200	000000	spd	
.RRDLM		220000	spd	
.RRFCT		000200	spd	
.RRMIN	020000	000000	spd	
.RRPCT		000220	spd	
.RS0A	400000	000000	spd	
.RS0B	300000	000000	spd	
.RS0Q	200000	000000	spd	
.RSAB	100000	000000	spd	
.RSAQ		000000	spd	
.RSD0	700000	000000	spd	
.RSDA	500000	000000	spd	
.RSDQ	600000	000000	spd	
.RSELC		004000	spd	
.RSELE		005000	spd	
.RSELF		003000	spd	
.RSELM		002000	spd	
.RSELP		001000	spd	
.RSK		010000	spd	
.RSKCN		240000	spd	
.RSKMB		210000	spd	
.RSMIN	010000	000000	spd	
.RSORC	100000	000000	spd	
.RSPAR		000004	spd	
.RTIM		000010	spd	
.RTWB		000360	spd	
.RXNOR	070000	000000	spd	
.RXOR	060000	000000	spd	
ABORT	  1003#
ADRPE	   100#                                                                                                            SEQ 0154
ALL	   319#
ALTCHH	     9#	   380
ALTMGO	  1357#
ANXM	  1271#
AROV	  1271#
AROVU	  1271#
AST	  1472#
ATSIN	  1473#
BEGEND	  1353#
BEGIN	    75	    76	    77	  1218	  1219	  1284#
BEGIN1	  1300#	  1354
BELL	  1476#
BIS	  1271#
BUFCLS	   174#
CALL	   389#
CCA	  1271#
CHAIN	  1023#
CHNOFF	  1271#
CHNON	  1271#
CKTSET	   175#
CLK	  1271#
CLKCLR	  1271#
CLKDIS	  1271#
CLKENB	  1271#
CLKU	  1271#
CLOCKF	  1339#
CLSBUF	   147#	   174
CMDQAV	   346#
CNFRET	   158#
CNTLC	  1356#
CNTRD	   177#
CNTSET	   176#
COMMA	  1465#
CONSW	  1340#
CPOPJ	  1360#
CPOPJ1	  1358#
CRAMPE	   332#
CRLF	  1153	  1154	  1460#
CRLF2	  1157	  1158	  1462#
CRY0	  1271#
CRY1	  1271#
CSHFLG	  1519#
CSHMEM	  1520#
CSRCHN	   328#
CSRRQS	   327#
CYCL60	  1513#
DATREC	   167#
DATRET	   171#
DATRQ0	   163#
DATRQ1	   164#
DATRQ2	   165#
DATSNT	   170#
DCK	  1271#                                                                                                            SEQ 0155
DCOMP	   335#
DDTLNK	  1037#	  1298
DDTSRT	  1298#
DEBUG1	   121#
DEBUG2	   122#
DEBUG3	   123#
DEBUG4	   124#
DEBUG5	   125#
DEBUG6	   126#
DECVER	    20#	  1319
DF22F	  1424#
DGSNT	   156#
DIAGMN	  1287#
DING	  1009#
DINIT	   329#
DOLLAR	  1479#
DSKUPD	  1324
DSPEAR	   120#
EBUSPE	   343#
ECOMP	   336#
ENDFIX	  1599#
ERFLG	    55#
ERMORE	  1373#
ERRPC	  1344#
ERRTLS	  1345#
ERSTOP	  1012#
EXCASB	    66#	  1322
EXIOT	  1271#
FOV	  1271#
FOVU	  1271#
FQUERR	   344#
FRDLNK	  1035#
FSELNK	  1034#
FUNCT	   318#
FXU	  1271#
GENEPE	   339#
GOTO	   390#
HYPEN	  1470#
IDLE	   334#
IDREC	   166#
IDREQ	   160#
INHCSH	  1020#
INHFLT	   115#
INHMSG	   116#
INHPAG	  1017#
INXM	  1271#
IOCLR	  1271#
IPAER	   104#
ITERAT	    64#	  1317
ITRCH1	  1377#
ITRCNT	  1317#
JOB41	  1271#
JOBAPR	  1271#                                                                                                            SEQ 0156
JOBCNI	  1271#
JOBDDT	  1271#
JOBFF	  1271#
JOBOPC	  1271#
JOBREL	  1271#
JOBREN	  1271#
JOBSA	  1271#
JOBSYM	  1271#
JOBTPC	  1271#
JOBUSY	  1271#
JOBUUO	  1271#
JOBVER	  1271#
KA10	  1271
KAHZ50	  1025#
KAIFLG	  1334#
KI10	  1271
KL10	    65#	  1271
KL10P0	  1271
KLFLG	  1335#
KLOLD	  1233
LAPRAL	  1271#
LAPRP1	  1271#
LAPRP2	  1271#
LAPRP3	  1271#
LAPRP4	  1271#
LAPRP5	  1271#
LAPRP6	  1271#
LAPRP7	  1271#
LAROVT	  1271#
LAST	   394#
LAXER	   103#
LBSNT	   168#
LCASDE	  1271#
LCASLD	  1271#
LCASLO	  1271#
LCASWB	  1271#
LCASWD	  1271#
LCCASD	  1271#
LCHNOF	  1271#
LCHNON	  1271#
LCIOPF	  1271#
LCNTRP	  1271#
LCNXER	  1271#
LCPAER	  1271#
LCPWRF	  1271#
LCSBER	  1271#
LCSLOA	  1271#
LCSLOO	  1271#
LCTRP	  1271#
LCWSX	  1271#
LDATAF	  1271#
LDCASD	  1271#
LDIOPF	  1271#                                                                                                            SEQ 0157
LDLNK	  1036#	  1287	  1289
LDNXER	  1271#
LDPAER	  1271#
LDPWRF	  1271#
LDSBER	  1271#
LECASD	  1271#
LEIOPF	  1271#
LENXER	  1271#
LEPAER	  1271#
LEPWRF	  1271#
LESBER	  1271#
LEUPFW	  1271#
LEVNCD	  1271#
LEVNPA	  1271#
LEVNPD	  1271#
LEXCMP	  1271#
LFLGCL	  1271#
LFLGDS	  1271#
LFLGEN	  1271#
LFLGST	  1271#
LFP	  1474#
LGWC	   105#
LINK	   316#
LINSTF	  1271#
LINT	  1271#
LIOCLR	  1271#
LIOPFE	  1271#
LKNTRP	  1271#
LKTRP	  1271#
LLACBL	  1271#
LLDUSB	  1271#
LLPRCN	  1271#
LMUUO	  1271#
LMUUOP	  1271#
LNXMEN	  1271#
LNXMER	  1271#
LOGO	    98#
LOOP	   317#
LOOPER	  1011#
LOOPGM	   117#
LOOPTS	   118#
LPAREN	  1271#
LPARER	  1271#
LPDOVT	  1271#
LPFWPC	  1271#
LPGFTR	  1271#
LPICH1	  1271#
LPICH2	  1271#
LPICH3	  1271#
LPICH4	  1271#
LPICH5	  1271#
LPICH6	  1271#
LPICH7	  1271#                                                                                                            SEQ 0158
LPICHA	  1271#
LPICLR	  1271#
LPIIP1	  1271#
LPIIP2	  1271#
LPIIP3	  1271#
LPIIP4	  1271#
LPIIP5	  1271#
LPIIP6	  1271#
LPIIP7	  1271#
LPIOFF	  1271#
LPION	  1271#
LPNTRP	  1271#
LPRCH1	  1271#
LPRCH2	  1271#
LPRCH3	  1271#
LPRCH4	  1271#
LPRCH5	  1271#
LPRCH6	  1271#
LPRCH7	  1271#
LPTRP	  1271#
LPWRFE	  1271#
LPWRFL	  1271#
LREQSE	  1271#
LRQCLR	  1271#
LSBSEN	  1271#
LSBUSE	  1271#
LSCASD	  1271#
LSECMO	  1271#
LSIOPF	  1271#
LSMODE	  1271#
LSNTRP	  1271#
LSNXER	  1271#
LSPAER	  1271#
LSPWRF	  1271#
LSSBER	  1271#
LSTRP	  1271#
LTRP3T	  1271#
LTRPAE	  1271#
LTRPEN	  1271#
LUSCMP	  1271#
LUUO	  1271#
LUUO1	   374#	  1404	  1405
LUUO10	  1404	  1409
LUUO11	  1404	  1409
LUUO12	  1404	  1410
LUUO13	  1404	  1410
LUUO14	  1404	  1411
LUUO15	  1404	  1411
LUUO16	  1404	  1412
LUUO17	  1404	  1412
LUUO2	   375#	  1404	  1406
LUUO20	  1404	  1413
LUUO21	  1404	  1413                                                                                                     SEQ 0159
LUUO22	  1404	  1414
LUUO23	  1404	  1414
LUUO24	  1404	  1415
LUUO25	  1404	  1415
LUUO26	  1404	  1416
LUUO27	   381#	  1404	  1416
LUUO3	   376#	  1404	  1406
LUUO30	  1404	  1417
LUUO31	  1404	  1417
LUUO32	  1404	  1418
LUUO33	  1404	  1418
LUUO4	   377#	  1404	  1407
LUUO5	   378#	  1404	  1407
LUUO6	   379#	  1404	  1408
LUUO7	   380#	  1404	  1408
LUUOI	  1271#
LWRITE	  1271#
MAPNEW	  1425#
MARGIN	  1347#
MAXPOR	    70#
MBCN	    56#
MBERR	   333#
MCNF	   159#
MCNVER	    19#	  1319
MDATRQ	   169#
MDTSNT	   172#
MEMLOW	  1427#
MEMMAP	    68#	  1325
MEMSIZ	  1428#
MEMTOT	  1426#
MINUS	  1469#
MODDVC	  1019#
MODDVL	  1218	  1218#	  1320
MODDVU	  1219	  1219#	  1321
MODLNK	  1038#	  1284
MONCTL	  1337#
MONFLG	  1336#
MONTEN	  1338#
MONTYP	  1551#
MPER	    99#
MPRUN	   351#
MPVU	  1271#
MSG	   388#
MSGSNT	   157#
MVRERR	   345#
NEXM	   102#
NOPNT	  1007#
NOTWC0	   101#
NXMU	  1271#
OP	    51#
OPRSEL	  1021#
OPTIME	  1439#
OVN	   107#                                                                                                            SEQ 0160
P	    57#	  1064	  1065	  1066	  1067	  1271#	  1359
PAG	  1271#
PALERS	  1013#
PARCLR	  1271#
PARDIS	  1271#
PAREA1	    87#	  1315
PAREA2	    88#	  1316
PAREA3	    89#	  1313
PAREA4	    90#	  1314
PAREA5	    91#	  1326
PAREA6	    92#	  1327
PAREA7	  1326#
PAREA8	  1327#
PARENB	  1271#
PARU	  1271#
PASCNT	  1341#
PAT	    54#
PBUFF	   315#
PCLEAR	   337#
PDISF	  1436#
PDLOVU	  1271#
PDSABL	   349#
PENABL	   350#
PERIOD	  1466#
PFSTRT	  1293#
PGMNAM	     8#	  1318
PI00RQ	   330#
PIA00	   352#
PIA01	   353#
PIA02	   354#
PICHN1	  1271#
PICHN2	  1271#
PICHN3	  1271#
PICHN4	  1271#
PICHN5	  1271#
PICHN6	  1271#
PICHN7	  1271#
PICHNA	  1271#
PICLR	  1271#
PIOFF	  1271#
PION	  1271#
PK	    52#
PLIST	  1505#	  1505
PLISTE	  1505	  1507#
PLISTS	  1506#
PLUS	  1471#
PNTENB	  1435#
PNTEXT	  1314#
PNTFLG	  1434#
PNTINH	  1437#
PNTLPT	  1008#
PNTNAM	  1313#
PNTSPC	  1438#                                                                                                            SEQ 0161
PORT	   314#
PORTP	   326#
PPDEC	     9#	   379
PPDECF	     9#	   375
PVPAGI	  1532#
PWFCLR	  1271#
Q	    53#
QUEST	  1477#
RADIX	  1480#
RADLSC	  1482#
RADLSP	  1481#
RANDBS	  1315#
RDCNT	   150#	   177
RDREG	   151#	   178
REENTR	  1295#
REGRD	   178#
REGWR	   179#
RELIAB	  1015#
REPT	  1271#
REPT1	  1271#
REPTU	  1393#
REQDT0	   139#	   163
REQDT1	   140#	   164
REQDT2	   141#	   165
REQID	   136#	   160
REQMDT	   143#	   169
REQSET	  1271#
RESQAV	   347#
RESRT1	  1370#
RESRT2	  1371#
RETDAT	   145#	   171
RETURN	  1302#
RQINT	   331#
RSTART	  1004#
RSTSNT	   161#
RTMDAT	   173#
RTP	  1475#
RUNALL	   119#
RUNFLG	  1342#
SADR1	    75#	  1291
SADR10	    84#	  1307
SADR11	    85#	  1308
SADR2	    76#	  1293
SADR3	    77#	  1295
SADR4	    78#
SADR5	    79#	  1356
SADR6	    80#	  1357
SADR7	    81#	  1304
SADR8	    82#	  1305
SADR9	    83#	  1306
SBINIT	  1077	  1301#
SCOPE	  1394#
SCOPE1	     8#	   381                                                                                                     SEQ 0162
SELLAR	   340#
SETCKT	   148#	   175
SETCNT	   149#	   176
SFSTRT	  1291#
SHWC	   106#
SINCYC	   341#
SLASH	  1478#
SM10	  1582#
SNDDAT	   144#	   170
SNDDG	   134#	   156
SNDLB	   142#	   168
SNDMDT	   146#	   172
SNDMSG	   135#	   157
SNDRST	   137#	   161
SNDSTR	   138#	   162
SPACE	  1467#
SPARE1	   342#
SPARE2	   348#
SRTDDT	    78	    80	  1297#
START	     8#	    79	    81	    82	    83	    84	    85	  1285
START1	  1304#
START2	  1305#
START3	  1306#
START4	  1307#
START5	  1308#
STARTA	     8#	  1300
STRSNT	   162#
SUBLNK	  1039#	  1301
SWPTAB	  1588#
SWTEXR	  1316#
SYSEXR	  1289#
TAB	  1468#
TCALL	   298#
TCALLC	   299#
TCOMP	   356#
TDENA	   320#
TESTPC	  1343#
TEXIT	   307#
TICKS	  1346#
TINIT	   306#
TJRST	   305#
TLAST	   296#
TOTALS	  1005#
TPACK	   302#
TRACET	   114#
TREAD	   304#
TSTART	   297#
TSTEBF	   338#
TTNBRF	  1526#
TTYFIL	  1442#
TTYSPD	  1443#
TWAIT	   301#
TWRITE	   303#                                                                                                            SEQ 0163
TXALL	   393#
TXNOT	   391#
TXTINH	  1016#
TXYES	   392#
USER	  1333#
USERF	  1271#
USRASB	    67#	  1323
USRCRF	  1452#
USRLFF	  1451#
UUODIS	  1405#
UUOEXT	  1361#
UUORTN	  1362#
UUOSKP	  1359#
WRREG	   152#	   179
$$MUUO	  1557#
$$OUTE	  1563#
$$TAX1	  1575#
$$TAX2	  1576#
$$TOGG	  1569#
$$UUO	  1546#
$ACC0	  1384#
$BEND1	  1354#
$BEND2	  1355#
$CHRIN	  1445#
$CRLF	  1447#
$DEVCH	  1271#
$DSKUP	  1324#
$DVCH1	  1271#
$DVOFF	  1441#
$EMODE	  1322#
$FFF	  1449#
$IBUF	  1497#
$INEXT	  1499#
$INNM	  1498#
$ITRHL	  1365#
$ITRX1	  1366#
$LPAPE	    73#
$MMAP	  1325#
$MODVL	  1320#
$MODVU	  1321#
$OBUF	  1488#
$ONETM	  1348#
$OUTEX	  1490#
$OUTNM	  1489#
$PAPER	  1271
$PARER	  1372#
$PNAME	  1318#
$PSHER	  1376#
$PVER	  1319#
$RSRTX	  1368#
$RSRTY	  1369#
$SPAG1	  1388#
$START	  1285#                                                                                                            SEQ 0164
$SVAPR	  1386#
$SVPAG	  1387#
$SVPI	  1385#
$SVUPC	  1391#
$SVUUO	  1390#
$TABF	  1448#
$TTCHR	  1444#
$TWCNT	  1440#
$TYPNB	  1446#
$UMODE	  1323#
$UORTX	  1363#
$USRHL	  1367#
$UUOER	  1364#	  1405
$VTF	  1450#
%ACTFL	  1397#
%ACTUL	  1398#
%COREC	  1396#
%CORFL	  1395#
%DISCR	  1399#
%ERHI1	  1538#
%ERHI2	  1539#
%ERHI3	  1540#
.DELAY	     9#	   378
.JB41	  1271#
.JBAPR	  1271#
.JBCNI	  1271#
.JBDDT	  1271#
.JBFF	  1271#
.JBOPC	  1271#
.JBREL	  1271#
.JBREN	  1271#
.JBSA	  1271#
.JBSYM	  1271#
.JBTPC	  1271#
.JBUSY	  1271#
.JBUUO	  1271#
.JBVER	  1271#
.LA	   580#
.LADDR	   468#
.LAND	   544#
.LB	   584#
.LBAD	   792#
.LBUS	   684#
.LCCAF	   620#
.LCCBF	   624#
.LCCCA	   600#
.LCCCC	   612#
.LCCCE	   656#
.LCCCP	   648#
.LCCEB	   616#
.LCCER	   632#
.LCCFZ	   608#
.LCCGC	   604#                                                                                                            SEQ 0165
.LCCIA	   636#
.LCCLW	   660#
.LCCMB	   640#
.LCCMP	   644#
.LCCOF	   596#
.LCCON	   592#
.LCCPP	   652#
.LCCXA	   628#
.LCENA	   564#
.LCJP	   728#
.LCJPP	   760#
.LCJS	   720#
.LCJV	   740#
.LCONT	   772#
.LCRTN	   756#
.LCRY	   708#
.LD	   560#
.LDISA	   568#
.LENA	   572#
.LFUNC	   524#
.LJ	   472#
.LJMAP	   724#
.LJRP	   744#
.LJSRP	   736#
.LJZ	   716#
.LLDCT	   764#
.LLDLM	   672#
.LLOOP	   768#
.LLSAD	   664#
.LMARK	   788#
.LMGC	   484#
.LNAND	   548#
.LOENA	   480#
.LOP	   712#
.LOR	   540#
.LPAR	   476#
.LPLUS	   528#
.LPUSH	   732#
.LRAM	   576#
.LRDLM	   676#
.LRFCT	   748#
.LRMIN	   536#
.LRPCT	   752#
.LS0A	   508#
.LS0B	   504#
.LS0Q	   500#
.LSAB	   496#
.LSAQ	   492#
.LSD0	   520#
.LSDA	   512#
.LSDQ	   516#
.LSELC	   700#
.LSELE	   704#                                                                                                            SEQ 0166
.LSELF	   696#
.LSELM	   692#
.LSELP	   688#
.LSK	   588#
.LSKCN	   680#
.LSKMB	   668#
.LSMIN	   532#
.LSORC	   488#
.LSPAR	   784#
.LTIM	   780#
.LTWB	   776#
.LXNOR	   556#
.LXOR	   552#
.MA	   582#
.MADDR	   470#
.MAND	   546#
.MB	   586#
.MBAD	   794#
.MBUS	   686#
.MCCAF	   622#
.MCCBF	   626#
.MCCCA	   602#
.MCCCC	   614#
.MCCCE	   658#
.MCCCP	   650#
.MCCEB	   618#
.MCCER	   634#
.MCCFZ	   610#
.MCCGC	   606#
.MCCIA	   638#
.MCCLW	   662#
.MCCMB	   642#
.MCCMP	   646#
.MCCOF	   598#
.MCCON	   594#
.MCCPP	   654#
.MCCXA	   630#
.MCENA	   566#
.MCJP	   730#
.MCJPP	   762#
.MCJS	   722#
.MCJV	   742#
.MCONT	   774#
.MCRTN	   758#
.MCRY	   710#
.MD	   562#
.MDISA	   570#
.MENA	   574#
.MFUNC	   526#
.MJ	   474#
.MJMAP	   726#
.MJRP	   746#
.MJSRP	   738#                                                                                                            SEQ 0167
.MJZ	   718#
.MLDCT	   766#
.MLDLM	   674#
.MLOOP	   770#
.MLSAD	   666#
.MMARK	   790#
.MMGC	   486#
.MNAND	   550#
.MOENA	   482#
.MOP	   714#
.MOR	   542#
.MPAR	   478#
.MPLUS	   530#
.MPUSH	   734#
.MRAM	   578#
.MRDLM	   678#
.MRFCT	   750#
.MRMIN	   538#
.MRPCT	   754#
.MS0A	   510#
.MS0B	   506#
.MS0Q	   502#
.MSAB	   498#
.MSAQ	   494#
.MSD0	   522#
.MSDA	   514#
.MSDQ	   518#
.MSELC	   702#
.MSELE	   706#
.MSELF	   698#
.MSELM	   694#
.MSELP	   690#
.MSK	   590#
.MSKCN	   682#
.MSKMB	   670#
.MSMIN	   534#
.MSORC	   490#
.MSPAR	   786#
.MTIM	   782#
.MTWB	   778#
.MXNOR	   558#
.MXOR	   554#
.PNTDC	     9#	   376
.PNTDP	     9#	   377
.PNTOC	     9#	   374
.RA	   581#
.RADDR	   469#
.RAND	   545#
.RB	   585#
.RBAD	   793#
.RBUS	   685#
.RCCAF	   621#
.RCCBF	   625#                                                                                                            SEQ 0168
.RCCCA	   601#
.RCCCC	   613#
.RCCCE	   657#
.RCCCP	   649#
.RCCEB	   617#
.RCCER	   633#
.RCCFZ	   609#
.RCCGC	   605#
.RCCIA	   637#
.RCCLW	   661#
.RCCMB	   641#
.RCCMP	   645#
.RCCOF	   597#
.RCCON	   593#
.RCCPP	   653#
.RCCXA	   629#
.RCENA	   565#
.RCJP	   729#
.RCJPP	   761#
.RCJS	   721#
.RCJV	   741#
.RCONT	   773#
.RCRTN	   757#
.RCRY	   709#
.RD	   561#
.RDISA	   569#
.RENA	   573#
.RFUNC	   525#
.RJ	   473#
.RJMAP	   725#
.RJRP	   745#
.RJSRP	   737#
.RJZ	   717#
.RLDCT	   765#
.RLDLM	   673#
.RLOOP	   769#
.RLSAD	   665#
.RMARK	   789#
.RMGC	   485#
.RNAND	   549#
.ROENA	   481#
.ROP	   713#
.ROR	   541#
.RPAR	   477#
.RPLUS	   529#
.RPUSH	   733#
.RRAM	   577#
.RRDLM	   677#
.RRFCT	   749#
.RRMIN	   537#
.RRPCT	   753#
.RS0A	   509#
.RS0B	   505#                                                                                                            SEQ 0169
.RS0Q	   501#
.RSAB	   497#
.RSAQ	   493#
.RSD0	   521#
.RSDA	   513#
.RSDQ	   517#
.RSELC	   701#
.RSELE	   705#
.RSELF	   697#
.RSELM	   693#
.RSELP	   689#
.RSK	   589#
.RSKCN	   681#
.RSKMB	   669#
.RSMIN	   533#
.RSORC	   489#
.RSPAR	   785#
.RTIM	   781#
.RTWB	   777#
.RXNOR	   557#
.RXOR	   553#
ABOXMT	   928#
ALTCHK	   371#                                                                                                            SEQ 0170
CALC	   808#
CFIBF	   363#
CFLUSH	  1189#
CINVAL	  1188#
CLOKOP	  1183#
CONCAT	   815#
CWRTBI	  1190#
DELAY	   369#
DLINK	   876#
DROPDV	  1150#
ELINK	   869#
ENDUUO	  1196#	  1353
EOPUUO	  1197#	  1355
ERLOOP	  1241#
ERLP1	  1242#
ERLP2	  1243#
ERRHLT	  1084#
ERROR	  1250#
ERROR1	  1261#
ERUUO	  1240#
FATAL	  1083#
FIELD	   821#
FMSG	   200#
FMSGC	   202#
FMSGCD	   208#
FMSGD	   205#
FRD36	  1225#
FRD8	  1226#
FREAD	  1224#
FSELEC	  1223#
GET	  1067#
GO	  1064#
HALT	    81	    82	    83	    84	    85	  1069#	  1374
JEN	  1071#
JRSTF	  1070#
JSYS	   362#	   363
LDXBUF	   851#
LSBRR	   971#
LSBRT	   962#
LSBWR	   954#
LSMOD1	   947#
LTXMIT	   940#
MAPADR	  1206#
MAPCNK	  1207#
MAPMEM	  1203#
MAPPNT	  1209#
MAPSET	  1208#
MDELAY	   991#
MEMSEG	  1205#
MEMZRO	  1204#
MODPCP	  1216#
MODPCU	  1215#
MTROP	  1184#                                                                                                            SEQ 0171
MWORD	   833#
PBELL	  1159#
PCRL	  1153#
PCRL2	  1157#
PCRL2F	  1158#
PCRLF	  1154#
PDEC	   370#
PDECF	   366#
PFORCE	  1161#
PGMINT	  1077#
PJRST	  1068#
PMSG	  1163#
PMSGF	  1166#
PNT1	  1119#
PNT11	  1133#
PNT11F	  1134#
PNT1F	  1120#
PNT2	  1121#
PNT2F	  1122#
PNT3	  1123#
PNT3F	  1124#
PNT4	  1125#
PNT4F	  1126#
PNT5	  1127#
PNT5F	  1128#
PNT6	  1129#
PNT6F	  1130#
PNT7	  1131#
PNT7F	  1132#
PNTA	  1105#
PNTADF	  1136#
PNTADR	  1135#
PNTAF	  1106#
PNTAL	  1107#
PNTALF	  1108#
PNTCHF	  1118#
PNTCHR	  1117#
PNTCI	  1115#
PNTCIF	  1116#
PNTCW	  1151#
PNTCWF	  1152#
PNTDCC	   367#
PNTDCF	  1144#
PNTDCP	   368#
PNTDEC	  1143#
PNTDS	  1145#
PNTDSF	  1146#
PNTHW	  1139#
PNTHWF	  1140#
PNTMGN	  1230#
PNTMSF	  1112#
PNTMSG	  1111#
PNTNM	  1147#                                                                                                            SEQ 0172
PNTOCC	   365#
PNTOCF	  1142#
PNTOCS	  1141#
PNTOCT	  1137#
PNTOTF	  1138#
PNTSIX	  1148#
PNTSXF	  1149#
PSIXL	  1109#
PSIXLF	  1110#
PSIXM	  1113#
PSIXMF	  1114#
PSP	  1155#
PSPF	  1156#
PUT	  1066#
RDBUFF	   895#
RDLS	   986#
RDNADR	   901#
RDPILA	   922#
RDRSTA	   883#
RDXSTA	   889#
REPTUO	  1244#
RGET	   236#
RPUT	   222#
RSXSTA	   864#
RTN	  1065#	  1361
S	   995#
SCOPER	   372#
SELBUF	   914#
SETMOD	   907#
SIXBTZ	  1172#
SUBTAB	   252#
SWITCH	  1178#
SYNC	   933#
TASCIZ	   216#
TMSG	   189#
TMSGC	   191#
TMSGCD	   197#
TMSGD	   194#
TTABLE	   278#
TTALTM	  1099#
TTICHR	  1092#
TTICLR	  1102#
TTICNV	  1097#
TTIDEC	  1096#
TTINO	  1094#
TTIOCT	  1095#
TTIYES	  1093#
TTLOOK	  1098#
TTSIXB	  1100#
TTYINP	  1101#
TXMIT	   857#
WRLS	   980#
                                                                                                                           SEQ 0173
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 1
DFCIA1	MAC	27-Oct-84 19:00		Externs / Entrys                                                                   SEQ 0174

     1						TITLE	DFCIA (Port Functional Diagnostic)
     2
     3						SUBTTL	Externs / Entrys
     4
     5						SALL
     6
     7						SEARCH	DFCIA,MONSYM
     8	000137					LOC	137
     9	000137	000000	000003			DECVER,,MCNVER
    10	030600					LOC	ENDFIX+1
    11
    12					; Miscellaneous stuff
    13
    14						INTERN	UDEBUG			; no-IPA user mode debug switch
    15						INTERN	MDEBUG			; error message debug switch
    16						INTERN	SDEBUG			; test debug switch
    17						INTERN	LDEBUG			; ucode load debug switch
    18						INTERN	DDEBUG,DDUMP		; dump on error debug switch
    19						INTERN	EDEBUG			; expanded error message mode switch
    20						INTERN	PGMNAM			; program name
    21						INTERN	TXADDL			; additional text routine address
    22						ENTRY	START,STARTA		; start addresses
    23
    24					; Microcode routines
    25
    26						ENTRY	CALPAR,DWCRAM,DRCRAM,MLOADN,MLOADY,TLOAD,TFLOAD,MVPNT
    27						INTERN	CADDR,CWORDL,CWORDR,PARFLG,UVERSN,MLNUM
    28
    29					; Miscellaneous routines
    30
    31						ENTRY	CSRPNT,CSRENG,TRACE,RUPDAT,SUPDAT,SETENA,SETDSA,SREPOR
    32						INTERN	FINPUT,FINECH,SPORT,IGNFLG,DSPRIN
    33
    34					; Test variables
    35
    36						ENTRY	TSTPNT,TSTEND
    37						INTERN	TSTNAM,TSTNUM,TSTSUB,TSTPC,TSTFLG,TSTMSK,TSTREP,TSTOFF
    38						INTERN	ALTF,TSLOAD,TAKFIL,SPEAR2,SPREP2,PMODE,TSTTAB
    39
    40					; Interrupt activity print routines
    41
    42						ENTRY	IPRINT
    43
    44					; Packet Handling Routines
    45
    46						ENTRY	BPACK,BPACKN,RWAIT,CHKINT,INSQUE,CHKRSP,PNTRSP
    47						ENTRY	CMDOPC,OPCPNT,TPCB,TIDLE,RDNODE,CONFIG,CONPNT,CONVIR
    48						INTERN	CVALID,CTABLE,CTYPE,NUMENT
    49						INTERN	PACKET,RSPONS,BUFF,TBYTE,TPAT,TWORD,CPORT
    50						INTERN	TFMFLG,TRSFLG,TPTFLG,TXCTID,TDPORT,TBYTE,TWORD
    51						INTERN	TPAT,TREGN,TREGD
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 2
DFCIA1	MAC	27-Oct-84 19:00		Externs / Entrys                                                                   SEQ 0175

    52
    53					; Queue Print Routines
    54
    55						ENTRY	PQUEUE,PPAKC,PPAKR,PPAKF,PPCB,PPCBD
    56						INTERN	PCB,QFDG10,QFDG7
    57
    58					; Statistics
    59
    60						INTERN	STASNT,.SREXP,STARCA,STARCB,.RREXP
    61
    62					; Test execute routine
    63
    64						ENTRY	TEXEC,TTPNT
    65						INTERN	TCSR,TCMD,TRESPC,TRESPA,DCRESP,TSTATC,TSTATA
    66
    67					; Tests 1-50
    68
    69						EXTERN	TST1,TST2,TST3,TST4,TST5,TST6,TST7,TST10
    70						EXTERN	TST11,TST12,TST13,TST14,TST15,TST16,TST17,TST20
    71						EXTERN	TST21,TST22,TST23,TST24,TST25,TST26,TST27,TST30
    72						EXTERN	TST31,TST32,TST33,TST34,TST35,TST36,TST37,TST40
    73						EXTERN	TST41,TST42,TST43,TST44,TST45,TST46,TST47,TST50
    74						EXTERN	TST51,TST52,TST53,TST54
    75
    76					; Microcode Tests 2-40
    77
    78						EXTERN	T2M,T3M,T4M,T5M,T10M,T11M,T12M,T13M,T14M,T15M
    79						EXTERN	T16M,T17M,T20M,T21M,T22M,T23M,T24M,T25M,T26M
    80						EXTERN	T27M,T30M,T31M,T32M,T33M,T34M,T35M,T36M,T37M,T40M
    81
    82					; EXTERN's located in DFCIA5.MAC
    83
    84						EXTERN	CRCSAV,CRCOFF,CRCTAB,CHKRQV,RQAFLG
    85
    86					; EXTERN's located in DFCIAI.MAC (Port Handling Routines module)
    87
    88						EXTERN	LDEBUF,LDRAR,LDCRAM,LDCSR,RDEBUF,RDLAR,RDCRAM,RDCSR
    89						EXTERN	SETEBU,SETLAR,CLREBU,CHKCSR,ERESET,IPACLR,ISTOP
    90						EXTERN	IPASRT,IPASTP,IPASST,SLAST,SNEXT,EADDR,AADDR,SDATA
    91						EXTERN	INITPI,INITPD,SETVEC,.CONI,.CONO,.DATAI,.DATAO,USRION
    92						EXTERN	INTNUM,INTPC,INTTYP,INTCON,INTAPR,INTTIM,INTUSE,INTCSR,INTEND
    93						EXTERN	CHINIT,GETLOG,CCWPNT,LOGPNT,CBASE,.INPNT,.INWD1,ICWA0,ENABLE
    94						EXTERN	DSETUP,DEVREQ,DEVREL,SNARKF,FFF,HAVIPA,REQ1,REQ2,REL
    95						EXTERN	LOCPHY,LOCDON
    96
    97					; EXTERN's located in DFCIAU.MAC (Utility Routines module)
    98
    99						EXTERN	CLRBUF,TTYYES,STCLOK,PTIME,RUNTME,CURTIM,.CLOSE
   100						EXTERN	DEBTIM,FORPNT,CONVSX,FGETW,FINCMD,FIOFF,FOARG,.RESET
   101						EXTERN	.SWCHP,SWITT,.ISWT,SWCHPT,.RSWIT,.LSWIT,SWRGT,SWCOM,SCOSW
   102						EXTERN	.COMM,.CGOT,.SARG,.OARG,.DARG,ARGFLG,ARGUM,CHKARG,LASARG,DECYN
   103						EXTERN	SCOPE1,SCOOFF,BUFGEN,BUFCOM,WRDERR,PATPNT
   104
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 3
DFCIA1	MAC	27-Oct-84 19:00		Initialization                                                                     SEQ 0176

   105						SUBTTL	Initialization
   106
   107						SALL
   108
   109	030600				PGMNAM:	ASCIZ	$
   110	030600	015 012 104 106 103 	DFCIA CI Port Functional Diagnostic
   111	030601	111 101 040 103 111 
   112	030602	040 120 157 162 164 
   113	030603	040 106 165 156 143 
   114	030604	164 151 157 156 141 
   115	030605	154 040 104 151 141 
   116	030606	147 156 157 163 164 
   117	030607	151 143 015 012 000 	$
   118
   119	030610	402 00 0 00 030056 	SB:	SETZM	$ONETM			; reinit everything
   120	030611				START:
   121
   122					; First clear debug switches and set up PGMINT variables - MAPNEW, PVPAGI
   123
   124	030611	402 00 0 00 121012'		SETZM	UDEBUG#			; no-IPA user mode debug switch
   125	030612	402 00 0 00 120741'		SETZM	MDEBUG#			; error message debug switch
   126	030613	402 00 0 00 120777'		SETZM	SDEBUG#			; test debug switch
   127	030614	402 00 0 00 120737'		SETZM	LDEBUG#			; ucode load debug switch
   128	030615	402 00 0 00 120722'		SETZM	DDEBUG#			; dump on error debug switch
   129	030616	402 00 0 00 120727'		SETZM	EDEBUG#			; expanded error message switch
   130	030617	476 00 0 00 030143 		SETOM	MAPNEW			; map all memory
   131	030620	476 00 0 00 030511 		SETOM	PVPAGI			; always use paging
   132
   133					; MCPUS - Multiple cpu print switch - If this flag is cleared, the multiple
   134					; cpu message is printed in full, if set, only the question asking which
   135					; cpu to run on is asked.
   136
   137	030621	336 00 0 00 030056 		SKIPN	$ONETM			; first time through here?
   138	030622	402 00 0 00 120740'		SETZM	MCPUS#			; yes - clear the flag
   139
   140					; Set up cache usage
   141
   142	030623	402 00 0 00 030506 		SETZM	CSHFLG			; allow pgm and any buffer space 
   143	030624	402 00 0 00 030507 		SETZM	CSHMEM			;   to be in cache
   144
   145					; Init file input switch
   146
   147	030625	402 00 0 00 120733'		SETZM	FINPUT#			; initialize 'file input' switch
   148	030626	476 00 0 00 120732'		SETOM	FINECH#			; set echo switch
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 4
DFCIA1	MAC	27-Oct-84 19:00		Initialization                                                                     SEQ 0177

   149
   150					; Init flags/switches
   151
   152	030627	402 00 0 00 120734'		SETZM	FMTTYP#			; allow all data formats
   153	030630	402 00 0 00 120714'		SETZM	BONETM#			; clear $ONETM flag
   154	030631	336 00 0 00 030056 		SKIPN	$ONETM			; 1st time pgm init?
   155	030632	476 00 0 00 120714'		SETOM	BONETM			; yes - set $ONETM flag
   156	030633	332 00 0 00 030056 		SKIPE	$ONETM			; 1st time pgm init?
   157	030634	254 00 0 00 030647 		JRST	STRT1			; no - skip next bit of code
   158
   159					; First time only code
   160
   161	030635	402 00 0 00 000000*		SETZM	SWRGT			; yes - clear right hand switches
   162	030636	201 00 0 00 000000*		MOVEI	.RSWIT			; get start addr of prompt table
   163	030637	202 00 0 00 030525 		MOVEM	SWPTAB			; setup for switch prompting
   164
   165					; Init print enable, forced print switch, and statistics, and SPEAR flags
   166
   167	030640	211 00 0 00 303240 		MOVNI	^D100000		; set the printout limit
   168	030641	202 00 0 00 030220 		MOVEM	PNTENB			; so won't die too soon
   169	030642	402 00 0 00 000000*		SETZM	FORPNT			; clear forced print switch
   170	030643	402 00 0 00 030521 		SETZM	$$TOGGLE		; enable switches
   171	030644	260 17 0 00 043470 		GO	SZERO			; clear statistics
   172	030645	402 00 0 00 121001'		SETZM	SPEAR1#			; clear 'SPEAR initial msg prnted' flag
   173	030646	402 00 0 00 121002'		SETZM	SPEAR2#			; clear 'SPEAR err/fin msg prnted' flag
   174
   175					; Standard startup and handle paging and clock
   176
   177	030647	260 17 0 00 000000*	STRT1:	GO	.RESET			; reset everything
   178	030650	265 00 0 00 030011 		PGMINT				; init the program
   179	030651	476 00 0 00 030516 		SETOM	MONTYP			; force to be TOPS-20
   180	030652	205 00 0 00 500000 		MOVSI	500000			; access bits for the page table
   181	030653	502 00 0 00 000400 		HLLM	400			; maps 340000 to physical 0
   182	030654	201 00 0 00 340000 		MOVEI	340000			; causes paging when E is calculated
   183	030655	202 00 0 00 000000*		MOVEM	CBASE			; channel routines now page correctly
   184	030656	260 17 0 00 000000*		GO	STCLOK			; start the clock...
   185	030657	402 00 0 00 030047 		SETZM	PASCNT			; clear pass count
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 5
DFCIA1	MAC	27-Oct-84 19:00		Initialization                                                                     SEQ 0178

   186
   187					; Set/clear debug switches
   188
   189	030660	402 00 0 00 121012'		SETZM	UDEBUG			; clear no-IPA user mode debug switch
   190	030661	402 00 0 00 120741'		SETZM	MDEBUG			; clear error message debug switch
   191	030662	402 00 0 00 120777'		SETZM	SDEBUG			; clear test debug switch
   192	030663	402 00 0 00 120737'		SETZM	LDEBUG			; clear ucode load debug switch
   193	030664	402 00 0 00 120722'		SETZM	DDEBUG			; clear dump on error debug switch
   194	030665	402 00 0 00 120727'		SETZM	EDEBUG			; clear expanded error message switch
   195	030666	260 17 0 00 000000*		GO	SWITT			; get switches
   196	030667	602 00 0 00 002000 		TRNE	DEBUG1			; debug switch set?
   197	030670	476 00 0 00 121012'		SETOM	UDEBUG			; set no-IPA user mode debug switch
   198	030671	602 00 0 00 001000 		TRNE	DEBUG2			; debug switch set?
   199	030672	476 00 0 00 120741'		SETOM	MDEBUG			; set error message debug switch
   200	030673	602 00 0 00 000400 		TRNE	DEBUG3			; test debug switch set?
   201	030674	476 00 0 00 120777'		SETOM	SDEBUG			; set test debug switch
   202	030675	602 00 0 00 000200 		TRNE	DEBUG4			; debug switch set?
   203	030676	476 00 0 00 120737'		SETOM	LDEBUG			; set ucode load debug switch
   204	030677	602 00 0 00 000100 		TRNE	DEBUG5			; debug switch set?
   205	030700	476 00 0 00 120722'		SETOM	DDEBUG			; set dump on error debug switch
   206	030701	602 00 0 00 000040 		TRNE	DEBUG6			; debug switch set?
   207	030702	476 00 0 00 120727'		SETOM	EDEBUG			; set expanded error message switch
   208	030703	201 00 0 00 000005 		MOVEI	ITERAT			; get default pass count
   209	030704	202 00 0 00 030024 		MOVEM	ITRCNT			; save in FIXED area location
   210	030705	402 00 0 00 103310 		SETZM	PMODE			; set program mode to 'no test'
   211
   212					; Request device, ...
   213
   214	030706	200 16 0 00 103311 		MOVE	MBCN,CIPORT		; set up MBCN register
   215	030707	260 17 0 00 000000*		GO	DSETUP			; set up DIAG JSYS
   216	030710	260 17 0 00 000000*		GO	LOCPHY			; lock part of the diagnostic
   217	030711	260 17 0 00 000000*		GO	ENABLE			; enable privileges
   218	030712	260 17 0 00 000000*		GO	USRION			; set USRIOT bit
   219	030713	260 17 0 00 000000*		GO	RDCSR			; read CSR
   220	030714	400 01 0 00 000000 		SETZ	1,			; error
   221	030715	404 01 0 00 103522 		AND	1,[400003,,0]		; mask out all but hardwired bits
   222	030716	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
   223	030717	316 01 0 00 103522 		CAMN	1,[400003,,0]		; no - a CI20 here?
   224	030720	260 17 0 00 000000*		GO	DEVREQ			; yes - request the device
   225						JRST	[FMSGCD	<? CI port not found>
   226							 SKIPE	20000
   227							 JRST	20000
   228							 HALT	.+1
   229	030721	254 00 0 00 103530 			 JRST	START]
   230
   231					; Handle SPEAR reporting
   232
   233	030722	260 17 0 00 100447 		GO	SPREP1			; do initial SPEAR report
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 6
DFCIA1	MAC	27-Oct-84 19:00		Initialization                                                                     SEQ 0179

   234
   235					; Go do a test
   236
   237	030723	260 17 0 00 000000*	STARTA:	GO	INITPI			; initialize PI system
   238	030724	260 17 0 00 000000*		GO	SETVEC			; set up vector addresses
   239	030725	260 17 0 00 030765 		GO	DISPAT			; do a test
   240	030726	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
   241	030727	254 00 0 00 030745 		JRST	STARTB			; yes - exit
   242	030730	260 17 0 00 030666*		GO	SWITT			; get switches
   243	030731	607 00 0 00 000010 		TLNN	OPRSEL			; OPRSEL switch set?
   244	030732	260 17 0 00 030746 		GO	PASPNT			; no - print end of pass
   245	030733	260 17 0 00 030730*		GO	SWITT			; get switches
   246	030734	336 00 0 00 030037 		SKIPN	USER			; user mode?
   247	030735	607 00 0 00 400000 		TLNN	ABORT			; abort switch set?
   248	030736	334 00 0 00 000000 		SKIPA				; no (or user mode) - continue
   249	030737	254 00 0 00 030745 		JRST	STARTB			; yes - exit
   250	030740	037 12 0 00 000004 		ENDUUO				; end of pass handling
   251	030741	254 00 0 00 030723 		JRST	STARTA			; ITRCNT not exhausted - continue
   252	030742	260 17 0 00 030733*		GO	SWITT			; get switches
   253	030743	602 00 0 00 040000 		TRNE	LOOPGM			; loop on program switch set?
   254	030744	254 00 0 00 030723 		JRST	STARTA			; yes - loop forever
   255	030745	037 16 0 00 000004 	STARTB:	EOPUUO				; ITRCNT exhausted - exit pgm
   256
   257					; Print pass count
   258
   259	030746	200 00 0 00 030047 	PASPNT:	MOVE	PASCNT			; get pass count
   260	030747	350 00 0 00 000000 		AOS				; increment by 1
   261	030750	231 00 0 00 000012 		IDIVI	^D10			; divide by 10
   262	030751	332 00 0 00 000000 		SKIPE				; print pass number only for passes
   263	030752	326 01 0 00 103535 		JUMPN	1,[RTN]			;    1,2..7,10,20,30,40 ...
   264	030753	037 00 0 00 103536 		TMSGC	<End pass >		; print it
   265	030754	200 00 0 00 030047 		MOVE	PASCNT
   266	030755	350 00 0 00 000000 		AOS
   267	030756	037 15 0 00 000000 		PNTDEC
   268	030757	037 00 0 00 103541 		TMSG	<. at >
   269	030760	402 00 0 00 030642*		SETZM	FORPNT			; clear force print
   270	030761	200 03 0 00 103543 		MOVE	3,[JFCL]		; set up timer routine
   271	030762	260 17 0 00 000000*		GO	RUNTME			; print current time
   272	030763	037 00 0 00 030242 		PCRL
   273	030764	263 17 0 00 000000 		RTN				; return
   274
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 7
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0180

   275						SUBTTL	Test/Command Selection
   276
   277					;#*********************************************************************
   278					;* DISPAT - Routine to dispatch to proper test as typed by the operator
   279					;*	   in response to the 'WHAT TEST' prompt.
   280					;
   281					; COMMAND	DEFINITION
   282					; -------	----------
   283					; ALL	n	All tests
   284					; PORT	n	Port modules related tests
   285					; PBUFF	n	Packet Buffer module related tests
   286					; LINK	n	LINK module related tests
   287					; LOOP  n	Loopback tests
   288					; FUNCT n	Functional tests (including loopback)
   289					; n	n	Test n
   290					;
   291					; Other tests:
   292					;
   293					; DEBUG		Enter debugger
   294					;
   295					; DIAMON	Enter DIAMON
   296					; DDT   	Enter DDT
   297					; HELP  	Print this text
   298					; EXIT  	Exit program 
   299					;
   300					; TAKE		Take commands from a file
   301					; NTAKE		Take commands from a file (without echoing them)
   302					;
   303					; CONFIG	Collect/print current configuration
   304					; CONPNT	Print current configuration
   305					;
   306					; ENABLE	Enable execution of a test
   307					; DISABL	Disable execution of a test
   308					; DISLIS	List disabled tests
   309					;
   310					; LIST n	List all tests
   311					;
   312					; Switches:  To complement switch, type switch name
   313					;
   314					; SWITCH	Enter switches
   315					; SWPRIN	Print current switches
   316					;
   317					; NOPNT   ERSTOP  TXTINH  TRACE   LOOPGM  DSPEAR  SDEBUG  EDEBUG
   318					; PNTLPT  PALERS  OPRSEL  INHMSG  LOOPTS  UDEBUG  LDEBUG
   319					; DING    RELIAB	  INHFLT  RUNALL  MDEBUG  DDEBUG
   320					;#********************************************************************
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 8
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0181

   321
   322	030765	402 00 0 00 120713'	DISPAT:	SETZM	ALTF#			; clear 'altmode typed' flag
   323
   324	030766	260 17 0 00 030742*		GO	SWITT			; get switches
   325	030767	603 00 0 00 000010 		TLNE	OPRSEL			; OPRSEL switch set?
   326	030770	037 01 0 00 103544 		FMSGCD	<Type ? for help>	; yes - print this
   327
   328					; Do a little initialization - first set up altmode transfer address
   329
   330	030771	260 17 0 00 030766*	DISP0:	GO	SWITT			; get switches
   331	030772	603 00 0 00 000010 		TLNE	OPRSEL			; OPRSEL switch set?
   332						MOVEI	1,[PCRLF		; yes - set $ addr to print blank line
   333	030773	201 01 0 00 103550 			   JRST	DISP0]		;  line and continue at 'What test'
   334	030774	607 00 0 00 000010 		TLNN	OPRSEL			; OPRSEL switch set?
   335						MOVEI	1,[SETZM ALTF		; no - set up $ xfr addr to exit pass
   336							   GO	 FIOFF
   337	030775	201 01 0 00 103552 			   RTN]
   338	030776	202 01 0 00 030063 		MOVEM	1,ALTMGO		; store it
   339	030777	402 00 0 00 120713'		SETZM	ALTF			; clear 'altmode typed' flag
   340
   341					; Set up print limit, clear error flag, clear input buffer, set up MBCN
   342
   343	031000	201 00 0 00 303240 		MOVEI	^D100000		; re-set up print limit just in case
   344	031001	212 00 0 00 030220 		MOVNM	PNTENB			;   the last test exceeded it
   345	031002	400 15 0 00 000000 		SETZ	ERFLG,			; clear error flag
   346	031003	260 17 0 00 000000*		GO	CLRBUF			; clear input buffer
   347	031004	200 16 0 00 103311 		MOVE	MBCN,CIPORT		; set up MBCN register properly
   348	031005	476 00 0 00 121005'		SETOM	TSLOAD#			; initialize ucode loaded flag
   349
   350					; Set/clear debug switches
   351
   352	031006	402 00 0 00 121012'		SETZM	UDEBUG			; clear no-IPA user mode debug switch
   353	031007	402 00 0 00 120741'		SETZM	MDEBUG			; clear error message debug switch
   354	031010	402 00 0 00 120777'		SETZM	SDEBUG			; clear test debug switch
   355	031011	402 00 0 00 120737'		SETZM	LDEBUG			; clear ucode load debug switch
   356	031012	402 00 0 00 120722'		SETZM	DDEBUG			; clear dump on error debug switch
   357	031013	402 00 0 00 120727'		SETZM	EDEBUG			; clear expanded error message switch
   358	031014	260 17 0 00 030771*		GO	SWITT			; get switches
   359	031015	602 00 0 00 002000 		TRNE	DEBUG1			; debug switch set?
   360	031016	476 00 0 00 121012'		SETOM	UDEBUG			; set no-IPA user mode debug switch
   361	031017	602 00 0 00 001000 		TRNE	DEBUG2			; debug switch set?
   362	031020	476 00 0 00 120741'		SETOM	MDEBUG			; set error message debug switch
   363	031021	602 00 0 00 000400 		TRNE	DEBUG3			; test debug switch set?
   364	031022	476 00 0 00 120777'		SETOM	SDEBUG			; set test debug switch
   365	031023	602 00 0 00 000200 		TRNE	DEBUG4			; debug switch set?
   366	031024	476 00 0 00 120737'		SETOM	LDEBUG			; set ucode load debug switch
   367	031025	602 00 0 00 000100 		TRNE	DEBUG5			; debug switch set?
   368	031026	476 00 0 00 120722'		SETOM	DDEBUG			; set dump on error debug switch
   369	031027	602 00 0 00 000040 		TRNE	DEBUG6			; debug switch set?
   370	031030	476 00 0 00 120727'		SETOM	EDEBUG			; set expanded error message switch
   371	031031	402 00 0 00 103310 		SETZM	PMODE			; set program mode to 'no test'
   372	031032	402 00 0 00 120743'		SETZM	MULFLG#			; clear 'multiple examine' flag
   373	031033	476 00 0 00 120744'		SETOM	MULINI#			; set 'initial examine' flag
   374	031034	402 00 0 00 121011'		SETZM	TXADDL#			; clear 'addl text' routine address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 9
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0182

   375
   376					; Set up PI system in case any interrupts occur
   377
   378	031035	260 17 0 00 030723*		GO	INITPI			; init PI system
   379	031036	260 17 0 00 030724*		GO	SETVEC			; set up vector addresses
   380
   381					; Do ALL test automatically if OPRSEL switch is not set
   382
   383	031037	201 01 0 00 000001 		MOVEI	1,1			; set to ALL test
   384	031040	607 00 0 00 000010 		TLNN	OPRSEL			; OPRSEL switch set?
   385	031041	254 00 0 00 031120 		JRST	DISP2			; no - go do test
   386	031042	402 00 0 00 030047 		SETZM	PASCNT			; clear pass count
   387
   388					; Now handle a normal command
   389
   390	031043	402 00 0 00 000000*		SETZM	.INWD1			; clear special interrupt data
   391	031044	476 00 0 00 120714'		SETOM	BONETM			; set 'not first time' flag
   392	031045	336 00 0 00 120733'		SKIPN	FINPUT			; file input?
   393	031046	476 00 0 00 120732'		SETOM	FINECH			; no - ensure echo flag set
   394	031047	332 00 0 00 120732'		SKIPE	FINECH			; echo flag set?
   395						GO	[PFORCE			; no - print all this
   396							 PCRLF
   397							 FMSG	<What test - >
   398	031050	260 17 0 00 103560 			 RTN]
   399	031051	332 00 0 00 120733'		SKIPE	FINPUT			; file input?
   400						JRST	[GO	FINCMD		; yes - input sixbit cmd
   401							 JRST	DISP0		; error or EOF
   402	031052	254 00 0 00 103564 			 JRST	DISP0B]		; continue
   403	031053	037 10 0 00 000003 	DISP0A:	TTSIXB				; get the name in sixbit
   404						ALTCHK	[GET	XXW#		; adjust stack properly
   405							 SKIPN	$TWCNT		; did a timeout occur?
   406							 JRST	DISP0		; yes - keep looking for input
   407							 MOVE	1,$TTCHR	; no - get character typed
   408							 CAIN	1,40		; space (delimiter) typed?
   409							 JRST	.+1		; yes - continue (no error condition)
   410							 CAIN	1,77		; was a question mark typed?
   411							 JRST	DISQUE		; yes - handle
   412	031054	007 00 0 00 103567 			 JRST	DISPE]		; no - error - reask question
   413					DISP0B:	JUMPE	[MOVE	$TTCHR		; anything typed?  if a space, keep
   414							 CAIN	40		;   looking for an argument, if not
   415							 JRST	DISP0A		;   exit
   416	031055	322 00 0 00 103600 			 JRST	DISP0]
   417	031056	202 00 0 00 121010'		MOVEM	TSTSAV#			; save the typed name
   418	031057	402 00 0 00 000000*		SETZM	ARGFLG			; clear 'argument given' flag
   419	031060	200 01 0 00 030231 		MOVE	1,$TTCHR		; get last character typed
   420	031061	302 01 0 00 000015 		CAIE	1,15			; CR? (end of line)
   421	031062	476 00 0 00 031057*		SETOM	ARGFLG			; set 'argument given' flag
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 10
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0183

   422
   423					; Process command
   424
   425	031063	200 01 0 00 121010'	DISP1:	MOVE	1,TSTSAV		; get command into AC1
   426	031064	201 02 0 00 031132 		MOVEI	2,DISLIS		; get address of cmd list
   427	031065	260 17 0 00 000000*		GO	.COMM			; handle command decoding
   428	031066	334 00 0 00 000000 		 SKIPA				; error return
   429	031067	254 00 0 00 031120 		JRST	DISP2			; dispatch to test
   430
   431					; Now check to see if a test number was selected in the form 'n r'
   432					; where 'n' is the test number and 'r' is the repeat count.
   433
   434			000054			MAXTST==TSTMAX-TSTTAB-1
   435
   436	031070	260 17 0 00 000000*		GO	CONVSX			; convert to octal test number
   437	031071	254 00 0 00 031107 		 JRST	DISPD			; error return (unrecognizable)
   438	031072	333 00 0 00 000001 		SKIPLE	1			; out of range?
   439	031073	303 01 0 00 000054 		CAILE	1,MAXTST		; out of range?
   440	031074	254 00 0 00 031101 		JRST	DISPR			; yes - handle
   441	031075	370 00 0 00 000001 		SOS	1			; normalize to 0..n
   442	031076	202 01 0 00 103275 		MOVEM	1,TSTNUM		; save test number
   443	031077	260 17 0 00 031600 		GO	TSTSPC			; execute it
   444	031100	254 00 0 00 031121 		JRST	DISPX			; end of test
   445
   446					; Range error
   447
   448	031101	037 01 0 00 103604 	DISPR:	FMSGC	<? Test selected is not in range 1->
   449	031102	201 00 0 00 000054 		MOVEI	MAXTST			; get range
   450	031103	037 17 0 00 000003 		PNTOCF				; print it
   451	031104	037 01 0 00 030242 		PCRLF
   452	031105	260 17 0 00 000000*		GO	FIOFF			; turn off file input
   453	031106	254 00 0 00 030771 		JRST	DISP0			; continue
   454
   455					; Possibly a DEBUG command was typed - check for this and handle
   456
   457	031107	200 01 0 00 121010'	DISPD:	MOVE	1,TSTSAV		; get command into AC1
   458	031110	201 02 0 00 032435 		MOVEI	2,.DBCMD		; get address of cmd list
   459	031111	260 17 0 00 031065*		GO	.COMM			; handle command decoding
   460	031112	254 00 0 00 031115 		 JRST	DISPE			; unrecognizable
   461	031113	260 17 1 01 032607 		GO	@.DBDIS(1)		; dispatch to test
   462	031114	254 00 0 00 030771 		JRST	DISP0			; return to 'DEBUG>' prompt
   463
   464					; Unrecognized command
   465
   466	031115	037 01 0 00 103614 	DISPE:	FMSGCD	<? Unrecognizable - Type ? for help>
   467	031116	260 17 0 00 031105*		GO	FIOFF			; turn off file input
   468	031117	254 00 0 00 030771 		JRST	DISP0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 11
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0184

   469
   470					; Dispatch to test
   471
   472	031120	260 17 1 01 031211 	DISP2:	GO	@DISGO(1)		; dispatch to test
   473
   474					; End of command - if OPRSEL switch set, ask for command
   475					;		   if OPRSEL switch not set, it is end of pass
   476
   477	031121	260 17 0 00 031014*	DISPX:	GO	SWITT			; get program switches
   478	031122	603 00 0 00 000010 		TLNE	OPRSEL			; OPRSEL set?
   479	031123	254 00 0 00 030771 		JRST	DISP0			; yes - not really end of pass
   480	031124	263 17 0 00 000000 		RTN				; no - end of pass
   481
   482					; Handle ? typed
   483
   484	031125	037 01 0 00 000026 	DISQUE:	PFORCE				; handle Control-O
   485	031126	037 00 1 00 031130 		PNTMSG	@DISQUU			; print text
   486	031127	254 00 0 00 030771 		JRST	DISP0			; continue
   487
   488	031130				DISQUU:	[ASCII	/
   489					Tests       Other         Switches
   490					-----   --------------  ----------------------
   491					ALL    DIAMON  ENABLE  NOPNT   TRACE   UDEBUG
   492					PORT   DDT     DISABL  PNTLPT  INHFLT  MDEBUG
   493					PBUFF  HELP    DISLIS  DING    INHMSG  SDEBUG
   494					LINK   EXIT    LIST    ERSTOP  LOOPGM  LDEBUG
   495					LOOP   TAKE            PALERS  LOOPTS  DDEBUG
   496	031130	000000	103624		FUNCT  NTAKE   STATIS  RELIAB  RUNALL  EDEBUG    /]
   497						[ASCIZ	/
   498					       CONFIG  ZSTATS  TXTINH  DSPEAR  SWITCH
   499					DEBUG  CONPNT          OPRSEL          SWPRIN
   500					(Or 'n' where n
   501					 is the test #).
   502	031131	000000	103736		/]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 12
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0185

   503
   504					;#*********************************************************************
   505					;* DISLIS -- List of all valid test names that can be typed
   506					;#*********************************************************************
   507
   508	031132	777777	777655		DISLIS:	-123				; ignore
   509	031133	41 54 54 00 00 00 		SIXBIT	/ALL/			; execute ALL tests
   510	031134	60 57 62 64 00 00 		SIXBIT	/PORT/			; execute Port tests
   511	031135	60 42 65 46 46 00 		SIXBIT	/PBUFF/			; execute PBuffer tests
   512	031136	54 51 56 53 00 00 		SIXBIT	/LINK/			; execute Link tests
   513	031137	54 57 57 60 00 00 		SIXBIT	/LOOP/			; execute Loopback tests
   514	031140	46 65 56 43 64 00 		SIXBIT	/FUNCT/			; execute Functional tests
   515	031141	62 41 56 44 57 55 		SIXBIT	/RANDOM/		; execute tests randomly
   516
   517					; Other
   518			
   519	031142	63 64 41 64 51 63 		SIXBIT	/STATIS/		; print collected statistics
   520	031143	72 63 64 41 64 63 		SIXBIT	/ZSTATS/		; clear statistics areas
   521	031144	43 57 56 46 51 47 		SIXBIT	/CONFIG/		; collect/print current configuration
   522	031145	43 57 56 60 56 64 		SIXBIT	/CONPNT/		; print current configuration
   523
   524	031146	45 56 41 42 54 45 		SIXBIT	/ENABLE/		; enable specified tests
   525	031147	44 51 63 41 42 54 		SIXBIT	/DISABL/		; disable specified tests
   526	031150	44 51 63 54 51 63 		SIXBIT	/DISLIS/		; list disabled tests
   527	031151	54 51 63 64 00 00 		SIXBIT	/LIST/			; list test descriptions
   528
   529	031152	64 41 53 45 00 00 		SIXBIT	/TAKE/			; take commands from a file
   530	031153	56 64 41 53 45 00 		SIXBIT	/NTAKE/			; take commands from a file
   531	031154	44 45 42 65 47 00 		SIXBIT	/DEBUG/			; execute debugger test
   532	031155	44 51 41 55 57 56 		SIXBIT	/DIAMON/		; exit to DIAMON
   533	031156	44 44 64 00 00 00 		SIXBIT	/DDT/			; enter DDT
   534	031157	45 70 51 64 00 00 		SIXBIT	/EXIT/			; exit pgm
   535	031160	50 45 54 60 00 00 		SIXBIT	/HELP/			; help
   536
   537					; Switches
   538
   539	031161	63 67 51 64 43 50 		SIXBIT	/SWITCH/		; input switches
   540	031162	63 67 60 62 51 56 		SIXBIT	/SWPRIN/		; print switch selections
   541	031163	56 57 60 56 64 00 		SIXBIT	/NOPNT/			; don't print anything
   542	031164	60 56 64 54 60 64 		SIXBIT	/PNTLPT/		; print on printer
   543	031165	44 51 56 47 00 00 		SIXBIT	/DING/			; ding on error
   544	031166	45 62 63 64 57 60 		SIXBIT	/ERSTOP/		; halt on error
   545	031167	60 41 54 45 62 63 		SIXBIT	/PALERS/		; print all errors
   546	031170	62 45 54 51 41 42 		SIXBIT	/RELIAB/		; reliability testing
   547	031171	64 70 64 51 56 50 		SIXBIT	/TXTINH/		; shorten printing
   548	031172	57 60 62 63 45 54 		SIXBIT	/OPRSEL/		; operator select
   549	031173	64 62 41 43 45 00 		SIXBIT	/TRACE/			; trace pgm flow
   550	031174	51 56 50 46 54 64 		SIXBIT	/INHFLT/		; inhibit fault isolation
   551	031175	51 56 50 55 63 47 		SIXBIT	/INHMSG/		; inhibit error messages
   552	031176	54 57 57 60 47 55 		SIXBIT	/LOOPGM/		; loop on program
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 13
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0186

   553	031177	54 57 57 60 64 63 		SIXBIT	/LOOPTS/		; loop on test
   554	031200	62 65 56 41 54 54 		SIXBIT	/RUNALL/		; run all test segments
   555	031201	44 63 60 45 41 62 		SIXBIT	/DSPEAR/		; disable SPEAR reporting
   556	031202	65 44 45 42 65 47 		SIXBIT	/UDEBUG/		; no-IPA user mode debug switch
   557	031203	55 44 45 42 65 47 		SIXBIT	/MDEBUG/		; error message debug switch
   558	031204	63 44 45 42 65 47 		SIXBIT	/SDEBUG/		; test debug switch
   559	031205	54 44 45 42 65 47 		SIXBIT	/LDEBUG/		; load microcode debug switch
   560	031206	44 44 45 42 65 47 		SIXBIT	/DDEBUG/		; dump on error debug switch
   561	031207	45 44 45 42 65 47 		SIXBIT	/EDEBUG/		; expanded error msg switch
   562	031210	000 00 0 00 000000 		Z
   563
   564
   565					;#********************************************************************
   566					;* DISGO - Test dispatch addresses
   567					;#********************************************************************
   568
   569	031211	000000	103535		DISGO:	[RTN]				; ignore
   570	031212	000000	031267			TSTEXE				; ALL - execute all tests
   571	031213	000000	031267			TSTEXE				; PORT - execute PORT modules tests
   572	031214	000000	031267			TSTEXE				; PBUFF - execute PB module tests
   573	031215	000000	031267			TSTEXE				; LINK - execute LINK module tests
   574	031216	000000	031267			TSTEXE				; LOOP - execute Loopback tests
   575	031217	000000	031267			TSTEXE				; FUNCT - execute Functional tests
   576	031220	000000	031643			TSTRAN				; RANDOM - execute tests randomly
   577
   578	031221	000000	031514			TSTPRI				; STATIS - Print statistics
   579	031222	000000	031370			TSTZER				; ZSTATS - Zero statistics
   580	031223	000000	031375			TSTCON				; CONFIG - Look at/print configuration
   581	031224	000000	031403			TSTCPN				; CONPNT - Print configuration
   582
   583	031225	000000	031446			TSTENA				; ENABLE - enable specified tests
   584	031226	000000	031442			TSTDSA				; DISABL - disable specified tests
   585	031227	000000	031472			TSTDSL				; DISLIS - list disabled tests
   586	031230	000000	031275			TSTLIS				; LIST - list test descriptions
   587
   588	031231	000000	031544			TSTTAK				; TAKE - take commands from a file
   589	031232	000000	031542			TSTTAN				; NTAKE - take commands from a file
   590	031233	000000	032341			TSTDEB				; DEBUG - execute debugger test
   591	031234	000000	031341			TSTDIA				; DIAMON - re-enter DIAMON
   592	031235	000000	031346			TSTDDT				; DDT - enter DDT
   593	031236	000000	031357			TSTHLT				; EXIT - exit
   594	031237	000000	031410			TSTHLP				; HELP - help
   595
   596	031240	000000	031521			TSTSWI				; SWITCH - input switches
   597	031241	000000	031526			TSTSWP				; SWPRIN - print switch selections
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 14
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0187

   598
   599			000031		SWSTT==.-DISGO
   600
   601	031242	000000	031533			TSTSSW				; NOPNT
   602	031243	000000	031533			TSTSSW				; PNTLPT
   603	031244	000000	031533			TSTSSW				; DING
   604	031245	000000	031533			TSTSSW				; ERSTOP
   605	031246	000000	031533			TSTSSW				; PALERS
   606	031247	000000	031533			TSTSSW				; RELIAB
   607	031250	000000	031533			TSTSSW				; TXTINH
   608	031251	000000	031533			TSTSSW				; OPRSEL
   609	031252	000000	031533			TSTSSW				; TRACE
   610	031253	000000	031533			TSTSSW				; INHFLT
   611	031254	000000	031533			TSTSSW				; INHMSG
   612	031255	000000	031533			TSTSSW				; LOOPGM
   613	031256	000000	031533			TSTSSW				; LOOPTS
   614	031257	000000	031533			TSTSSW				; RUNALL
   615	031260	000000	031533			TSTSSW				; DSPEAR
   616	031261	000000	031533			TSTSSW				; UDEBUG
   617	031262	000000	031533			TSTSSW				; MDEBUG
   618	031263	000000	031533			TSTSSW				; SDEBUG
   619	031264	000000	031533			TSTSSW				; LDEBUG
   620	031265	000000	031533			TSTSSW				; DDEBUG
   621	031266	000000	031533			TSTSSW				; EDEBUG
   622
   623
   624					;#********************************************************************
   625					;* ALL    Execute all tests
   626					;* PORT   Execute Port modules related tests
   627					;* PBUFF  Execute PB module related tests
   628					;* LINK   Execute Link module related tests
   629					;* LOOP   Execute Loopback tests
   630					;* FUNCT  Execute Functional tests
   631					;
   632					; All of these commands dispatch to TSTEXE which sets up test mask
   633					; and does dispatch to tests.
   634					;#********************************************************************
   635
   636					TSTEXE:	MOVE	[ALL			; get test mask
   637							 PORT
   638							 PBUFF
   639							 LINK
   640							 LOOP
   641	031267	200 00 0 01 103770 			 FUNCT]-1(1)
   642	031270	202 00 0 00 103301 		MOVEM	TSTMSK			; save test mask
   643	031271	260 17 0 00 031672 		GO	TSTDIS			; go dispatch to tests
   644
   645					; Handle SPEAR reporting
   646
   647	031272	400 15 0 00 000000 		SETZ	ERFLG,			; clear error flag
   648	031273	260 17 0 00 100510 		GO	SPREP2			; do final SPEAR report
   649	031274	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 15
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0188

   650
   651					;#********************************************************************
   652					;* TSTLIS - List test description for either single test or range of tests.
   653					;
   654					; Argument(s):  n - list only one test
   655					;		n,m - list range of tests
   656					;	        none - list all tests
   657					;#********************************************************************
   658
   659	031275	402 00 0 00 103276 	TSTLIS:	SETZM	TSTSUB			; clear subtest number
   660	031276	402 00 0 00 121006'		SETZM	TSTL1#			; set up start test number
   661	031277	350 00 0 00 121006'		AOS	TSTL1			; set to 1
   662	031300	201 00 0 00 000054 		MOVEI	MAXTST			; set up final test number
   663	031301	202 00 0 00 121007'		MOVEM	TSTL2#			; set to MAXTST
   664
   665					; Check for argument(s)
   666
   667	031302	200 01 0 00 104010 		MOVE	1,[FMSGCD <LIST test# (CR) or LIST test#,test# (CR)>]
   668	031303	260 17 0 00 000000*		GO	.OARG			; get test number
   669	031304	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   670	031305	254 00 0 00 031317 		 JRST	TSTLI0			; no argument given
   671	031306	200 01 0 00 000000*		MOVE	1,ARGUM			; get argument
   672	031307	202 01 0 00 121006'		MOVEM	1,TSTL1			; save first test number
   673	031310	202 01 0 00 121007'		MOVEM	1,TSTL2			; save second test number
   674	031311	210 01 0 00 104010 		MOVN	1,[FMSGCD <LIST test# (CR) or LIST test#,test# (CR)>]
   675	031312	260 17 0 00 031303*		GO	.OARG			; get test number
   676	031313	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   677	031314	254 00 0 00 031317 		 JRST	TSTLI0			; no 2nd argument given
   678	031315	200 01 0 00 031306*		MOVE	1,ARGUM			; get argument
   679	031316	202 01 0 00 121007'		MOVEM	1,TSTL2			; save second test number
   680
   681					; Range check the arguments
   682
   683	031317	333 01 0 00 121006'	TSTLI0:	SKIPLE	1,TSTL1			; first argument in range
   684	031320	303 01 0 00 000054 		CAILE	1,MAXTST		;   1-MAXTST?
   685						JRST	[FMSGCD	<? Range of test numbers is 1->
   686							 MOVEI	MAXTST		; get range
   687							 PNTOCF			; print it
   688							 PCRLF
   689							 GO	FIOFF		; turn off file input
   690	031321	254 00 0 00 104020 			 RTN]
   691	031322	200 02 0 00 121007'		MOVE	2,TSTL2			; get 2nd argument
   692	031323	311 02 0 00 000001 		CAML	2,1			; 2nd argument in range
   693	031324	303 02 0 00 000054 		CAILE	2,MAXTST		;   1st arg-MAXTST?
   694						JRST	[FMSGC	<? Range of test numbers is 1->
   695							 MOVEI	MAXTST		; get range
   696							 PNTOCF			; print it
   697							 PCRLF
   698							 GO	FIOFF		; turn off file input
   699	031325	254 00 0 00 104035 			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 16
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0189

   700
   701					; Print the test descriptions
   702
   703	031326	200 02 0 00 121006'	TSTLI1:	MOVE	2,TSTL1			; get test number
   704	031327	202 02 0 00 103275 		MOVEM	2,TSTNUM		; set up for TSTPNT
   705	031330	037 00 0 00 030242 		PCRL				; skip a line
   706	031331	260 17 0 00 042247 		GO	TSTPNT			; no - print it
   707	031332	350 02 0 00 121006'		AOS	2,TSTL1			; point to next test
   708	031333	313 02 0 00 121007'		CAMLE	2,TSTL2			; reach end of range?
   709	031334	254 00 0 00 031337 		JRST	TSTLIX			; yes - exit
   710	031335	037 07 0 00 000003 		TTALTM				; no - altmode typed?
   711	031336	254 00 0 00 031326 		JRST	TSTLI1			; no - do next test
   712	031337	037 00 0 00 030242 	TSTLIX:	PCRL				; final CRLF
   713	031340	263 17 0 00 000000 		RTN				; return
   714
   715
   716					;#********************************************************************
   717					;* TSTDIA - Return to DIAMON
   718					;#********************************************************************
   719
   720	031341	200 01 0 00 104047 	TSTDIA:	MOVE	1,[FMSGCD (DIAMON <CR>)]
   721	031342	260 17 0 00 000000*		GO	CHKARG			; check for argument
   722	031343	263 17 0 00 000000 		RTN				; error - exit
   723	031344	260 17 0 00 000000*		GO	DEVREL			; release the device
   724	031345	254 00 0 00 020000 		JRST	20000			; enter DIAMON
   725
   726
   727					;#********************************************************************
   728					;* TSTDDT - Enter DDT
   729					;#********************************************************************
   730
   731	031346	200 01 0 00 104053 	TSTDDT:	MOVE	1,[FMSGCD (DDT <CR>)]
   732	031347	260 17 0 00 031342*		GO	CHKARG			; check for argument
   733	031350	263 17 0 00 000000 		RTN				; error - exit
   734	031351	037 01 0 00 104054 		FMSGCD	<Type RTN$X to continue>
   735	031352	260 17 0 00 030007 		GO	SRTDDT			; enter DDT
   736	031353	260 17 0 00 000000*		GO	INITPD			; init PI system
   737	031354	260 17 0 00 031036*		GO	SETVEC			; set up vector addresses
   738	031355	400 01 0 00 000000 		SETZ	1,			; clear AC1
   739	031356	263 17 0 00 000000 		RTN				; ask for a test
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 17
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0190

   740
   741					;#********************************************************************
   742					;* TSTHLT - Program halts - CONTINUE will start it back up.
   743					;#********************************************************************
   744
   745	031357	200 01 0 00 104065 	TSTHLT:	MOVE	1,[FMSGCD (EXIT <CR>)]
   746	031360	260 17 0 00 031347*		GO	CHKARG			; check for argument
   747	031361	263 17 0 00 000000 		RTN				; error - exit
   748	031362	260 17 0 00 031344*		GO	DEVREL			; release the device
   749	031363	260 17 0 00 000000*		GO	.CLOSE			; close any open files
   750	031364	332 00 0 00 020000 		SKIPE	20000			; DIAMON loaded?
   751	031365	254 00 0 00 020000 		JRST	20000			; yes - return there
   752	031366	254 04 0 00 031367 		HALT	.+1			; no - halt
   753	031367	254 00 0 00 030611 		JRST	START			; continue
   754
   755
   756					;#********************************************************************
   757					;* TSTZER - Clear statistics
   758					;#********************************************************************
   759
   760	031370	200 01 0 00 104071 	TSTZER:	MOVE	1,[FMSGCD (ZERO <CR>)]
   761	031371	260 17 0 00 031360*		GO	CHKARG			; check for argument
   762	031372	263 17 0 00 000000 		RTN				; error - exit
   763	031373	260 17 0 00 043470 		GO	SZERO			; clear statistics
   764	031374	263 17 0 00 000000 		RTN				; done
   765
   766
   767					;#********************************************************************
   768					;* TSTCON - Determine/print configuration
   769					;* TSTCPN - Print configuration
   770					;#********************************************************************
   771
   772	031375	200 01 0 00 104076 	TSTCON:	MOVE	1,[FMSGCD (CONFIG <CR>)]
   773	031376	260 17 0 00 031371*		GO	CHKARG			; check for argument
   774	031377	263 17 0 00 000000 		RTN				; error - exit
   775	031400	260 17 0 00 042731 		GO	CONFIG			; determine configuration
   776	031401	260 17 0 00 043041 		GO	CONPNT			; print configuration
   777	031402	263 17 0 00 000000 		RTN				; done
   778
   779	031403	200 01 0 00 104103 	TSTCPN:	MOVE	1,[FMSGCD (CONPNT <CR>)]
   780	031404	260 17 0 00 031376*		GO	CHKARG			; check for argument
   781	031405	263 17 0 00 000000 		RTN				; error - exit
   782	031406	260 17 0 00 043041 		GO	CONPNT			; print configuration
   783	031407	263 17 0 00 000000 		RTN				; done
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 18
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0191

   784
   785					;#*********************************************************************
   786					;* TSTHLP - Help for 'WHAT TEST' question.
   787					;#*********************************************************************
   788
   789					TSTHLP:	MOVN	1,[FMSGD <
   790					HELP ALL     MISC
   791	031410	210 01 0 00 104115 	     TESTS   SWITCH>]
   792	031411	260 17 0 00 000000*		GO	.SARG			; get SIXBIT argument
   793	031412	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   794						 GO	[MOVE	[SIXBIT /ALL/]	; no argument - assume all
   795							 MOVEM	ARGUM
   796	031413	260 17 0 00 104117 			 RTN]
   797	031414	200 01 0 00 031315*		MOVE	1,ARGUM			; get sixbit command
   798	031415	201 02 0 00 031430 		MOVEI	2,TSTHLC		; get address of cmd list
   799	031416	260 17 0 00 031111*		GO	.COMM			; handle command decoding
   800						 JRST	[FMSGCD	<? Unrecognizable - Type ? for help>
   801							 GO	FIOFF
   802	031417	254 00 0 00 104122 			 RTN]			; error return
   803	031420	037 01 0 00 000026 		PFORCE				; handle Control-O
   804	031421	200 02 0 00 000001 		MOVE	2,1			; get AC1
   805	031422	336 03 0 01 031435 	TSTHL0:	SKIPN	3,TSTHLL(1)		; get address of TMSG
   806	031423	263 17 0 00 000000 		RTN				; all done - exit
   807	031424	256 00 0 00 000003 		XCT	3			; print it
   808	031425	350 00 0 00 000001 		AOS	1			; point to next address
   809	031426	322 02 0 00 031422 		JUMPE	2,TSTHL0		; loop till done
   810	031427	263 17 0 00 000000 		RTN				; exit
   811
   812	031430	41 54 54 00 00 00 	TSTHLC:	SIXBIT	/ALL/			; print all help info
   813	031431	64 45 63 64 63 00 		SIXBIT	/TESTS/			; print test commands
   814	031432	55 51 63 43 00 00 		SIXBIT	/MISC/			; print miscellaneous commands
   815	031433	63 67 51 64 43 50 		SIXBIT	/SWITCH/		; print switch commands
   816	031434	000000	000000			0				; end of list
   817
   818	031435	037 00 0 00 104125 	TSTHLL:	TMSGCD	<Tests Available:>
   819
   820						TMSGD	<
   821					ALL n   Execute ALL tests (n times)
   822					PORT n  Execute Port modules tests
   823					PBUFF n Execute PBuff module tests
   824					LINK n  Execute Link module tests
   825					LOOP n  Execute Loopback tests
   826					FUNCT n Execute Functional tests
   827	031436	037 00 0 00 104132 	m n     Test m>
   828
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 19
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0192

   829						TMSGD	<
   830					TAKE    Take cmds from file
   831					NTAKE   Take cmds from file (not echoed)
   832					DEBUG   Enter port debugger
   833					DIAMON  Enter DIAMON
   834					DDT     Enter DDT
   835					HELP    Print this
   836					EXIT    Exit program   
   837					
   838					STATIS  Print statistics
   839					ZSTATS  Clear statistics
   840					CONFIG  Determine/print configuration   
   841					CONPNT  Print configuration   
   842					ENABLE  Enable specified tests
   843					DISABL  Disable specified tests
   844					DISLIS  List disabled tests
   845	031437	037 00 0 00 104210 	LIST    List test descriptions>
   846
   847						TMSGD	<
   848					Switches:  To complement switch, type switch name
   849					
   850					SWITCH  Enter switches
   851					SWPRIN  Print current switches
   852					
   853					NOPNT   ERSTOP  TXTINH  TRACE   LOOPGM  DSPEAR  SDEBUG  EDEBUG
   854					PNTLPT  PALERS  OPRSEL  INHFLT  LOOPTS  UDEBUG  LDEBUG
   855	031440	037 00 0 00 104341 	DING    RELIAB          INHMSG  RUNALL  MDEBUG  DDEBUG>
   856	031441	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 20
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0193

   857
   858					;#********************************************************************
   859					;* TSTDSA - Disable a test.
   860					;* TSTENA - Enable a test.
   861					;#********************************************************************
   862
   863	031442	402 00 0 00 120730'	TSTDSA:	SETZM	ENATST#			; clear 'enable' flag
   864	031443	200 00 0 00 104436 		MOVE	[FMSGCD (DISABL n1,n2, ... <CR>)]
   865	031444	202 00 0 00 121004'		MOVEM	TMP1#
   866	031445	254 00 0 00 031451 		JRST	TSTEN0			; continue
   867	031446	476 00 0 00 120730'	TSTENA:	SETOM	ENATST#			; set 'enable' flag
   868	031447	200 00 0 00 104442 		MOVE	[FMSGCD (ENABLE n1,n2, ... <CR>)]
   869	031450	202 00 0 00 121004'		MOVEM	TMP1#
   870	031451	336 00 0 00 031062*	TSTEN0:	SKIPN	ARGFLG			; argument given?
   871						JRST	[FMSGCD	<? Missing argument>
   872							 GO	FIOFF
   873	031452	254 00 0 00 104450 			 RTN]
   874
   875					; Get an argument
   876
   877	031453	200 01 0 00 121004'	TSTDS0:	MOVE	1,TMP1			; get help string
   878	031454	260 17 0 00 031312*		GO	.OARG			; yes - get octal argument
   879	031455	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   880	031456	263 17 0 00 000000 		 RTN				; no more arguments
   881	031457	333 01 0 00 031414*		SKIPLE	1,ARGUM			; get argument
   882	031460	303 01 0 00 000054 		CAILE	1,MAXTST		; out of range?
   883						JRST	[FMSGC	<? Test selected is not in range 1->
   884							 MOVEI	MAXTST		; get range
   885							 PNTOCF			; print it
   886							 PCRLF
   887							 GO	FIOFF
   888	031461	254 00 0 00 104453 			 RTN]
   889	031462	202 01 0 00 103275 		MOVEM	1,TSTNUM		; save test number
   890
   891					; Now perform the specified function
   892
   893	031463	200 02 0 01 032050 		MOVE	2,TSTTAB(1)		; get test dispatch word
   894	031464	332 00 0 00 120730'		SKIPE	ENATST			; 'enable' flag set?
   895	031465	621 02 0 00 000100 		TLZ	2,(TDENA)		; yes - clear 'disable' bit
   896	031466	336 00 0 00 120730'		SKIPN	ENATST			; 'enable' flag set?
   897	031467	661 02 0 00 000100 		TLO	2,(TDENA)		; no - set 'disable' bit
   898	031470	202 02 0 01 032050 		MOVEM	2,TSTTAB(1)		; save test dispatch word
   899	031471	254 00 0 00 031453 		JRST	TSTDS0			; get next argument
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 21
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0194

   900
   901					;#********************************************************************
   902					;* TSTDSL - List disabled tests
   903					;#********************************************************************
   904
   905	031472	200 01 0 00 104465 	TSTDSL:	MOVE	1,[FMSGCD (DISLIS <CR>)]
   906	031473	260 17 0 00 031404*		GO	CHKARG			; check for argument
   907	031474	263 17 0 00 000000 		RTN				; error - exit
   908	031475	402 00 0 00 103275 		SETZM	TSTNUM			; initialize test number
   909	031476	400 06 0 00 000000 		SETZ	6,			; count of tests printed
   910	031477	350 01 0 00 103275 	TSTDL0:	AOS	1,TSTNUM		; point to next test
   911	031500	303 01 0 00 000054 		CAILE	1,MAXTST		; done yet?
   912						JRST	[PCRL			; yes - return
   913	031501	254 00 0 00 104466 			 RTN]
   914	031502	200 00 0 01 032050 		MOVE	TSTTAB(1)		; get test dispatch word
   915	031503	607 00 0 00 000100 		TLNN	(TDENA)			; disabled?
   916	031504	254 00 0 00 031477 		JRST	TSTDL0			; no - try next test
   917	031505	377 00 0 00 000006 		SOSG	6			; done with line yet?
   918						GO	[MOVEI	6,12		; yes - reset counter and
   919							 PCRL			;   print a blank line
   920	031506	260 17 0 00 104470 			 RTN]
   921	031507	037 00 0 00 104473 		TMSG	<TST>
   922	031510	200 00 0 00 103275 		MOVE	TSTNUM			; get test number
   923	031511	037 16 0 00 000003 		PNTOCS				; print it
   924	031512	037 00 0 00 000040 		PSP
   925	031513	254 00 0 00 031477 		JRST	TSTDL0			; continue
   926
   927
   928					;#********************************************************************
   929					;* TSTPRI - Print statistics
   930					;#********************************************************************
   931
   932	031514	200 01 0 00 104500 	TSTPRI:	MOVE	1,[FMSGCD (STATIS <CR>)]
   933	031515	260 17 0 00 031473*		GO	CHKARG			; check for argument
   934	031516	263 17 0 00 000000 		RTN				; error - exit
   935	031517	260 17 0 00 043272 		GO	SREPOR			; go print statistics
   936	031520	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 22
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0195

   937
   938					;#********************************************************************
   939					;* TSTSWI/TSTSWP - Input switches / Print switch selections
   940					;#********************************************************************
   941
   942	031521	200 01 0 00 104505 	TSTSWI:	MOVE	1,[FMSGCD (SWITCH <CR>)]
   943	031522	260 17 0 00 031515*		GO	CHKARG			; check for argument
   944	031523	263 17 0 00 000000 		RTN				; error - exit
   945	031524	260 17 0 00 000000*		GO	.ISWT			; input switches
   946	031525	263 17 0 00 000000 		RTN				; ask for a test
   947
   948	031526	200 01 0 00 104512 	TSTSWP:	MOVE	1,[FMSGCD (SWPRIN <CR>)]
   949	031527	260 17 0 00 031522*		GO	CHKARG			; check for argument
   950	031530	263 17 0 00 000000 		RTN				; error - exit
   951	031531	260 17 0 00 000000*		GO	.SWCHP			; print switches
   952	031532	263 17 0 00 000000 		RTN				; ask for a test
   953
   954
   955					;#********************************************************************
   956					;* TSTSSW - Switch complement commands
   957					;#********************************************************************
   958
   959	031533	200 01 0 00 104520 	TSTSSW:	MOVE	1,[FMSGCD (Switch Name <CR>)]
   960	031534	260 17 0 00 031527*		GO	CHKARG			; check for argument
   961	031535	263 17 0 00 000000 		RTN				; error - exit
   962	031536	200 01 0 00 000000*		MOVE	1,.CGOT			; get dispatch number
   963	031537	275 01 0 00 000031 		SUBI	1,SWSTT			; normalize to 0..
   964	031540	260 17 0 00 000000*		GO	SWCOM			; complement switch
   965	031541	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 23
DFCIA1	MAC	27-Oct-84 19:00		Test/Command Selection                                                             SEQ 0196

   966
   967					;#********************************************************************
   968					;* TSTTAK - Take commands from a file
   969					;* TSTTAN - Take commands from a file without echoing results
   970					;
   971					; This works by reading commands from a file as if they were being
   972					; typed to the diagnostic directly.  Either end of file or the first
   973					; occurrence of an error halts this procedure.
   974					;#********************************************************************
   975
   976	031542	402 00 0 00 120732'	TSTTAN:	SETZM	FINECH			; clear echo switch
   977	031543	334 00 0 00 000000 		SKIPA				; continue
   978	031544	476 00 0 00 120732'	TSTTAK:	SETOM	FINECH			; set echo switch
   979	031545	200 01 0 00 104531 		MOVE	1,[FMSGCD (TAKE <CR> or TAKE Fname Ext <CR>)]
   980	031546	260 17 0 00 031411*		GO	.SARG			; get SIXBIT argument
   981	031547	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   982	031550	254 00 0 00 031561 		 JRST	TSTTA0			; no more arguments
   983	031551	200 01 0 00 031457*		MOVE	1,ARGUM			; get argument
   984	031552	202 01 0 00 031576 		MOVEM	1,TAKFIL		; save file name
   985	031553	210 01 0 00 104531 		MOVN	1,[FMSGCD (TAKE <CR> or TAKE Fname Ext <CR>)]
   986	031554	260 17 0 00 031546*		GO	.SARG			; get SIXBIT argument
   987	031555	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
   988	031556	254 00 0 00 031561 		 JRST	TSTTA0			; no more arguments
   989	031557	200 01 0 00 031551*		MOVE	1,ARGUM			; get argument
   990	031560	202 01 0 00 031577 		MOVEM	1,TAKFIL+1		; save file name extension
   991
   992					; Now start reading the file specified
   993
   994	031561	260 17 0 00 031116*	TSTTA0:	GO	FIOFF			; shut off previous file input
   995	031562	201 00 0 00 031576 		MOVEI	TAKFIL			; point to file name buffer
   996	031563	037 05 0 00 000004 		FSELECT				; init the file
   997						JRST	[FMSGC	<Can't access ">
   998							 MOVE	TAKFIL			; get file name
   999							 PNTSXF				; print it
  1000							 PNTCIF	"."
  1001							 MOVE	TAKFIL+1		; get extension
  1002							 PNTSXF				; print it
  1003							 FMSGD	<" on selected load device.>
  1004	031564	254 00 0 00 104544 			 RTN]
  1005	031565	037 01 0 00 104554 		FMSGC	<[File input from: >
  1006	031566	200 00 0 00 031576 		MOVE	TAKFIL			; get the selected file name
  1007	031567	037 01 0 00 000002 		PNTSXF				; print it
  1008	031570	037 01 0 00 000056 		PNTCIF	"."
  1009	031571	200 00 0 00 031577 		MOVE	TAKFIL+1		; get the extension of file
  1010	031572	037 01 0 00 000002 		PNTSXF				; print it
  1011	031573	037 01 0 00 104561 		FMSGD	<]>
  1012	031574	476 00 0 00 120733'		SETOM	FINPUT			; set 'file input' flag
  1013	031575	263 17 0 00 000000 		RTN				; exit
  1014
  1015					; File name
  1016
  1017	031576	44 46 43 51 41 00 	TAKFIL:	SIXBIT	/DFCIA/
  1018	031577	43 55 44 00 00 00 		SIXBIT	/CMD/
  1019
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 24
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0197

  1020						SUBTTL	Test Dispatching
  1021
  1022					;#********************************************************************
  1023					;* TSTSPC - Run only one test
  1024					;#********************************************************************
  1025
  1026	031600	201 00 0 00 032014 	TSTSPC:	MOVEI	TSTALT			; set up altmode transfer address
  1027	031601	202 00 0 00 030063 		MOVEM	ALTMGO			;   to exit IPA testing
  1028	031602	402 00 0 00 103302 		SETZM	TSTREP			; clear pass count
  1029	031603	260 17 0 00 031121*		GO	SWITT			; get program switches
  1030	031604	602 00 0 00 020000 		TRNE	LOOPTS			; loop on test?
  1031						JRST	[HRLEI	377777		; yes - get 'infinite' repeat count
  1032	031605	254 00 0 00 104562 			 JRST	.+2]
  1033	031606	201 00 0 00 000001 		MOVEI	1			; no - set repeat count requested
  1034	031607	202 00 0 00 103303 		MOVEM	TSTREQ			;   to 1 pass
  1035	031610	402 00 0 00 103304 		SETZM	TSTMUL			; clear multiple test flag
  1036	031611	336 00 0 00 031451*		SKIPN	ARGFLG			; argument given?
  1037	031612	254 00 0 00 031621 		JRST	TSTSP0			; no - do the test
  1038	031613	210 01 0 00 104571 		MOVN	1,[FMSGCD (n RepeatCount <CR>)]
  1039	031614	260 17 0 00 000000*		GO	.DARG			; yes - get repeat count argument
  1040	031615	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  1041	031616	334 00 0 00 000000 		 SKIPA				; no argument given
  1042	031617	200 00 0 00 031557*		MOVE	ARGUM			; get argument
  1043	031620	202 00 0 00 103303 		MOVEM	TSTREQ			; save it
  1044	031621	476 00 0 00 031611*	TSTSP0:	SETOM	ARGFLG			; remember that we had an argument
  1045	031622	254 00 0 00 031733 		JRST	TSTD3			; do the test
  1046
  1047
  1048					;#********************************************************************
  1049					;* RANGEN - Random number generator
  1050					;#********************************************************************
  1051
  1052	031623	261 17 0 00 000001 	RANGEN:	RPUT	(1,2)			; save AC's
  1053
  1054	031625	200 01 0 00 120767'		MOVE	1,RANNUM#		; get base number
  1055	031626	270 01 0 00 030022 		ADD	1,RANDBS		; modify number in AC1
  1056	031627	241 01 0 00 777774 		ROT	1,-4			; to create a new number
  1057	031630	447 01 0 00 120767'		EQVB	1,RANNUM		; put result in AC1 and RANNUM
  1058	031631	405 01 0 00 007777 		ANDI	1,7777			; save only 4 digits
  1059	031632	220 01 0 17 777777 		IMUL	1,-1(P)			; obtain (0..n-1)*10000
  1060	031633	242 01 0 00 777764 		LSH	1,-^D12			; obtain 0..n-1
  1061	031634	350 00 0 00 000001 		AOS	1			; obtain 1..n
  1062	031635	313 01 0 17 777777 		CAMLE	1,-1(P)			; in range?
  1063	031636	200 01 0 17 777777 		MOVE	1,-1(P)			; no - force it to be
  1064	031637	250 01 0 17 777777 		EXCH	1,-1(P)			; set up returned argument
  1065	031640	262 17 0 00 000002 		RGET	(2,1)			; restore AC's
  1066
  1067	031642	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 25
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0198

  1068
  1069					;#********************************************************************
  1070					; TSTRAN - Run tests randomly
  1071					;#********************************************************************
  1072
  1073	031643	201 00 0 00 031664 	TSTRAN:	MOVEI	TSTRAA			; set up altmode transfer address
  1074	031644	202 00 0 00 030063 		MOVEM	ALTMGO			;   to exit port testing
  1075	031645	402 00 0 00 103302 		SETZM	TSTREP			; clear pass count
  1076	031646	201 00 0 00 000001 		MOVEI	1			; set repeat count requested
  1077	031647	202 00 0 00 103303 		MOVEM	TSTREQ			;   to 1 pass
  1078	031650	402 00 0 00 103304 		SETZM	TSTMUL			; clear multiple test flag
  1079	031651	402 00 0 00 120766'		SETZM	RANCNT#			; initialize test count
  1080	031652	400 03 0 00 000000 		SETZ	3,			; set a a base number using the
  1081	031653	260 17 0 00 030762*		GO	RUNTME			;   program run time and save
  1082	031654	200 00 0 00 000000*		MOVE	CURTIM			;   it in RANNUM
  1083	031655	202 00 0 00 120767'		MOVEM	RANNUM
  1084
  1085					; Determine test to run
  1086
  1087	031656	201 01 0 00 000054 	TSTRA0:	MOVEI	1,MAXTST		; get range 1..MAXTST
  1088	031657	260 17 0 00 031623 		GO	RANGEN			; get a random number (in AC1)
  1089	031660	202 01 0 00 103275 		MOVEM	1,TSTNUM		; save test number
  1090	031661	260 17 0 00 031733 		GO	TSTD3			; do the test
  1091	031662	350 01 0 00 120766'		AOS	1,RANCNT		; increment test count
  1092	031663	254 00 0 00 031656 		JRST	TSTRA0			; keep looping
  1093
  1094					; Altmode exit
  1095
  1096	031664	037 01 0 00 104572 	TSTRAA:	FMSGC	<[Testing aborted after >
  1097	031665	200 00 0 00 120766'		MOVE	RANCNT			; get test count
  1098	031666	037 15 0 00 000001 		PNTDCF				; print it
  1099	031667	037 01 0 00 104600 		FMSGD	< tests]>
  1100	031670	262 17 0 00 121017'		GET	XXX#			; pop off extra item
  1101	031671	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 26
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0199

  1102
  1103					;#********************************************************************
  1104					;* TSTDIS - Dispatch to the tests
  1105					;#********************************************************************
  1106
  1107					; Set up flags, defaults, etc.
  1108
  1109	031672	201 00 0 00 032014 	TSTDIS:	MOVEI	TSTALT			; set up altmode transfer address
  1110	031673	202 00 0 00 030063 		MOVEM	ALTMGO			;   to exit port testing
  1111	031674	402 00 0 00 103302 		SETZM	TSTREP			; clear pass count
  1112	031675	402 00 0 00 103303 		SETZM	TSTREQ			; set repeat count requested to 1
  1113	031676	350 00 0 00 103303 		AOS	TSTREQ			;   pass
  1114	031677	476 00 0 00 103304 		SETOM	TSTMUL			; set multiple test flag
  1115	031700	402 00 0 00 103275 		SETZM	TSTNUM			; initialize test number
  1116	031701	336 00 0 00 031621*		SKIPN	ARGFLG			; argument given?
  1117	031702	254 00 0 00 031712 		JRST	TSTD0			; no - do the tests
  1118	031703	210 01 0 00 104607 		MOVN	1,[FMSGCD (CMD RepeatCount <CR>)]
  1119	031704	260 17 0 00 031614*		GO	.DARG			; yes - get repeat count argument
  1120	031705	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  1121	031706	334 00 0 00 000000 		 SKIPA				; no argument given
  1122	031707	200 00 0 00 031617*		MOVE	ARGUM			; get argument
  1123	031710	202 00 0 00 103303 		MOVEM	TSTREQ			; save it
  1124	031711	476 00 0 00 031701*		SETOM	ARGFLG			; remember that we had an argument
  1125
  1126					; If OPRSEL switch is not set then all tests are run.
  1127
  1128	031712	402 00 0 00 032261 	TSTD0:	SETZM	TSTRES			; clear first word
  1129	031713	200 00 0 00 104610 		MOVE	[TSTRES,,TSTRES+1]	; build BLT pointer
  1130	031714	251 00 0 00 032340 		BLT	TSTRES+57		; clear the results
  1131	031715	260 17 0 00 031603*		GO	SWITT			; get the pgm switches
  1132	031716	607 00 0 00 000010 		TLNN	OPRSEL			; OPRSEL set?
  1133	031717	254 00 0 00 031733 		JRST	TSTD3			; no - go run all of them
  1134
  1135					; Handle pass count
  1136
  1137	031720	200 00 0 00 103303 	TSTD1:	MOVE	TSTREQ			; get argument typed
  1138	031721	332 00 0 00 031711*		SKIPE	ARGFLG			; any argument given?
  1139	031722	254 00 0 00 031732 		JRST	TSTD2			; yes - skip over this question
  1140	031723	332 00 0 00 120733'		SKIPE	FINPUT			; file input switch set?
  1141						JRST	[MOVEI	1		; yes - default to 1 iteration
  1142	031724	254 00 0 00 104611 			 JRST	TSTD2]
  1143	031725	037 01 0 00 104613 		FMSGC	<How many passes? (CR to loop forever) - >
  1144	031726	037 04 0 00 000003 		TTIDEC
  1145	031727	007 00 0 00 031720 		ALTCHK	TSTD1
  1146	031730	336 00 0 00 030510 		SKIPN	TTNBRF			; CR typed?
  1147	031731	200 00 0 00 104624 		MOVE	[377777,,777777]	; yes - loop forever
  1148	031732	202 00 0 00 103303 	TSTD2:	MOVEM	TSTREQ			; save count
  1149
  1150					; Save test number selection for multiple pass use
  1151
  1152	031733	200 00 0 00 103275 	TSTD3:	MOVE	TSTNUM			; get test number
  1153	031734	202 00 0 00 120775'		MOVEM	SAVNUM#			; save test number
  1154	031735	476 00 0 00 103310 		SETOM	PMODE			; set program mode to 'test'
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 27
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0200

  1155
  1156					; Initialize test number at beginning of pass
  1157
  1158	031736	200 00 0 00 120775'	TSTD4:	MOVE	SAVNUM			; get test number
  1159	031737	202 00 0 00 103275 		MOVEM	TSTNUM			; save test number
  1160	031740	260 17 0 00 031715*		GO	SWITT			; get the pgm switches
  1161	031741	201 01 0 00 000001 		MOVEI	1,1			; initialize repeat count
  1162	031742	603 00 0 00 000400 		TLNE	RELIAB			; reliability switch set?
  1163	031743	201 01 0 00 000004 		MOVEI	1,4			; yes - set up count of 4
  1164	031744	202 01 0 00 103306 		MOVEM	1,TSTREL		; save it
  1165
  1166					; Now actually do the tests
  1167
  1168	031745	200 00 0 00 103306 	TSTD5:	MOVE	TSTREL			; get reliability count
  1169	031746	202 00 0 00 103307 		MOVEM	TSTCNT			; save it
  1170	031747	350 01 0 00 103275 		AOS	1,TSTNUM		; point to next test
  1171	031750	303 01 0 00 000054 		CAILE	1,MAXTST		; end of tests?
  1172	031751	254 00 0 00 032001 		JRST	TSTD9			; yes - handle
  1173	031752	200 16 0 00 103311 	TSTD6:	MOVE	MBCN,CIPORT		; valid test - set up MBCN
  1174	031753	200 02 0 01 032050 		MOVE	2,TSTTAB(1)		; get test dispatch word
  1175	031754	512 02 0 00 103300 		HLLZM	2,TSTFLG		; set up test flags
  1176	031755	552 02 0 00 103277 		HRRZM	2,TSTPC			; set up test PC
  1177	031756	402 00 0 00 121011'		SETZM	TXADDL			; clear 'addl text' routine address
  1178
  1179					; Verify that test should be run
  1180
  1181	031757	200 02 0 00 103301 		MOVE	2,TSTMSK		; get test mask
  1182	031760	332 00 0 00 103304 		SKIPE	TSTMUL			; multiple passes?
  1183	031761	612 02 0 00 103300 		TDNE	2,TSTFLG		; valid test to execute?
  1184	031762	260 17 1 00 103277 		GO	@TSTPC			; yes - dispatch to test
  1185
  1186					; Dispatch is done - now check altmode
  1187
  1188	031763	332 00 0 00 120713'		SKIPE	ALTF			; 'altmode typed' flag set?
  1189	031764	254 00 1 00 030063 		JRST	@ALTMGO			; yes - exit
  1190	031765	037 07 0 00 000003 		TTALTM				; altmode typed?
  1191	031766	334 00 0 00 000000 		SKIPA				; no - continue
  1192	031767	254 00 1 00 030063 		JRST	@ALTMGO			; yes - exit thru $ transfer address
  1193
  1194					; Loop till reliability count expired
  1195
  1196	031770	373 00 0 00 103307 		SOSLE	TSTCNT			; decrement reliability count
  1197	031771	254 00 0 00 031752 		JRST	TSTD6			; loop till done
  1198	031772	332 00 0 00 030037 	TSTD8:	SKIPE	USER			; user mode?
  1199	031773	254 00 0 00 031777 		JRST	.+4			; yes - continue
  1200	031774	260 17 0 00 031740*		GO	SWITT			; get switches
  1201	031775	603 00 0 00 200000 		TLNE	RSTART			; RSTART switch set?
  1202	031776	254 00 0 00 030611 		JRST	START			; yes - restart the diagnostic
  1203	031777	332 00 0 00 103304 		SKIPE	TSTMUL			; multiple tests being done?
  1204	032000	254 00 0 00 031745 		JRST	TSTD5			; yes - do next test
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 28
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0201

  1205
  1206					; Now bump pass count
  1207
  1208	032001	350 01 0 00 103302 	TSTD9:	AOS	1,TSTREP		; increment pass count
  1209	032002	332 00 0 00 103304 		SKIPE	TSTMUL			; multiple test flag set?
  1210	032003	260 17 0 00 032032 		GO	TSTEOP			; yes - print end of pass message
  1211	032004	260 17 0 00 031774*		GO	SWITT			; get switches
  1212	032005	336 00 0 00 030037 		SKIPN	USER			; user mode?
  1213	032006	607 00 0 00 400000 	 	TLNN	ABORT			; abort switch set?
  1214	032007	334 00 0 00 000000 		SKIPA				; no - continue (or user mode)
  1215	032010	263 17 0 00 000000 		RTN				; exit
  1216	032011	373 00 0 00 103303 		SOSLE	TSTREQ			; passes all done?
  1217	032012	254 00 0 00 031736 		JRST	TSTD4			; no - keep looping
  1218	032013	263 17 0 00 000000 		RTN				; exit
  1219
  1220					; Altmode transfer code
  1221
  1222	032014	037 01 0 00 104625 	TSTALT:	FMSGC	<[Testing aborted>
  1223	032015	336 00 0 00 103302 		SKIPN	TSTREP			; zero passes?
  1224	032016	254 00 0 00 032023 		JRST	TSTAL0			; yes - don't print how many
  1225	032017	037 01 0 00 104631 		FMSG	< after >
  1226	032020	200 00 0 00 103302 		MOVE	TSTREP			; get pass count
  1227	032021	037 15 0 00 000001 		PNTDCF				; print it
  1228	032022	037 01 0 00 104633 		FMSG	< passes>
  1229	032023	037 01 0 00 104561 	TSTAL0:	FMSGD	<]>
  1230	032024	260 17 0 00 031561*		GO	 FIOFF			; clear 'file input' switch
  1231	032025	476 00 0 00 120713'		SETOM	ALTF			; set altmode typed flag
  1232	032026	260 17 0 00 032004*		GO	SWITT			; get program switches
  1233	032027	607 00 0 00 000010 		TLNN	OPRSEL			; OPRSEL switch set?
  1234	032030	254 00 0 00 031341 		JRST	TSTDIA			; no - exit to DIAMON
  1235	032031	263 17 0 00 000000 		RTN				; exit
  1236
  1237					; End of pass message
  1238
  1239	032032	260 17 0 00 032026*	TSTEOP:	GO	SWITT			; get switches
  1240	032033	607 00 0 00 000010 		TLNN	OPRSEL			; operator select?
  1241	032034	263 17 0 00 000000 		RTN				; no - don't print end of pass
  1242	032035	332 00 0 00 120727'		SKIPE	EDEBUG			; expanded data switch set?
  1243						GO	[TMSG	<Port->		; yes - print what port
  1244							 LDB	[POINT 3,MBCN,9];   this is
  1245							 PNT2
  1246							 PSP
  1247	032036	260 17 0 00 104640 			 RTN]
  1248	032037	037 00 0 00 104645 		TMSG	<End Pass >		; print pass count
  1249	032040	200 00 0 00 103302 		MOVE	TSTREP
  1250	032041	037 15 0 00 000000 		PNTDEC
  1251	032042	037 00 0 00 103541 		TMSG	<. at >
  1252	032043	402 00 0 00 030760*		SETZM	FORPNT			; clear force print
  1253	032044	200 03 0 00 103543 		MOVE	3,[JFCL]		; set up timer routine
  1254	032045	260 17 0 00 031653*		GO	RUNTME			; print current time
  1255	032046	037 00 0 00 030242 		PCRL
  1256	032047	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 29
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0202

  1257
  1258					; Table of test names and flags
  1259
  1260	032050	000000	000000		TSTTAB:	0
  1261	032051	000000000000#			PORT!TST1			; 1
  1262	032052	000000000000#			PORT!TST2			; 2
  1263	032053	000000000000#			PORT!TST3			; 3
  1264	032054	000000000000#			PBUFF!TST4			; 4
  1265	032055	000000000000#			LINK!TST5			; 5
  1266	032056	000000000000#			PBUFF!FUNCT!TST6		; 6
  1267	032057	000000000000#			LINK!FUNCT!TST7			; 7
  1268	032060	000000000000#			PBUFF!TST10			; 10
  1269	032061	000000000000#			PBUFF!TST11			; 11
  1270	032062	000000000000#			PBUFF!TST12			; 12
  1271	032063	000000000000#			PBUFF!TST13			; 13
  1272	032064	000000000000#			PBUFF!TST14			; 14
  1273	032065	000000000000#			PBUFF!TST15			; 15
  1274	032066	000000000000#			PBUFF!TST16			; 16
  1275	032067	000000000000#			PBUFF!TST17			; 17
  1276	032070	000000000000#			PBUFF!TST20			; 20
  1277	032071	000000000000#			PBUFF!TST21			; 21
  1278	032072	000000000000#			PBUFF!TST22			; 22
  1279	032073	000000000000#			PBUFF!TST23			; 23
  1280	032074	000000000000#			PBUFF!TST24			; 24
  1281	032075	000000000000#			PBUFF!TST25			; 25
  1282	032076	000000000000#			PBUFF!TST26			; 26
  1283	032077	000000000000#			LINK!TST27			; 27
  1284	032100	000000000000#			LINK!TST30			; 30
  1285	032101	000000000000#			LINK!TST31			; 31
  1286	032102	000000000000#			LINK!TST32			; 32
  1287	032103	000000000000#			LINK!TST33			; 33
  1288	032104	000000000000#			LINK!TST34			; 34
  1289	032105	000000000000#			LINK!TST35			; 35
  1290	032106	000000000000#			LINK!TST36			; 36
  1291	032107	000000000000#			PBUFF!TST37			; 37
  1292	032110	000000000000#			LINK!TST40			; 40
  1293	032111	000000000000#			LINK!FUNCT!TST41		; 41
  1294	032112	000000000000#			LINK!FUNCT!TST42		; 42
  1295	032113	000000000000#			FUNCT!TST43			; 43
  1296	032114	000000000000#			FUNCT!TST44			; 44
  1297	032115	000000000000#			LOOP!FUNCT!TST45		; 45
  1298	032116	000000000000#			LOOP!FUNCT!TST46		; 46
  1299	032117	000000000000#			LOOP!FUNCT!TST47		; 47
  1300	032120	000000000000#			LOOP!FUNCT!TST50		; 50
  1301	032121	000000000000#			LOOP!FUNCT!TDENA!TST51		; 51
  1302	032122	000000000000#			LINK!FUNCT!TST52		; 52
  1303	032123	000000000000#			FUNCT!TST53			; 53
  1304	032124	000000000000#			LOOP!FUNCT!TST54		; 54
  1305	032125	000000	000000		TSTMAX:	0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 30
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0203

  1306
  1307					; Table of address of test microcode
  1308
  1309	032126	000000	000000		TSTMIC:	0
  1310	032127	000000	000000			0				; 1
  1311	032130	000000000000#			T2M				; 2
  1312	032131	000000000000#			T3M				; 3
  1313	032132	000000000000#			T4M				; 4
  1314	032133	000000000000#			T5M				; 5
  1315	032134	000000	000000			0				; 6
  1316	032135	000000	000000			0				; 7
  1317	032136	000000000000#			T10M				; 10
  1318	032137	000000000000#			T11M				; 11
  1319	032140	000000000000#			T12M				; 12
  1320	032141	000000000000#			T13M				; 13
  1321	032142	000000000000#			T14M				; 14
  1322	032143	000000000000#			T15M				; 15
  1323	032144	000000000000#			T16M				; 16
  1324	032145	000000000000#			T17M				; 17
  1325	032146	000000000000#			T20M				; 20
  1326	032147	000000000000#			T21M				; 21
  1327	032150	000000000000#			T22M				; 22
  1328	032151	000000000000#			T23M				; 23
  1329	032152	000000000000#			T24M				; 24
  1330	032153	000000000000#			T25M				; 25
  1331	032154	000000000000#			T26M				; 26
  1332	032155	000000000000#			T27M				; 27
  1333	032156	000000000000#			T30M				; 30
  1334	032157	000000000000#			T31M				; 31
  1335	032160	000000000000#			T32M				; 32
  1336	032161	000000000000#			T33M				; 33
  1337	032162	000000000000#			T34M				; 34
  1338	032163	000000000000#			T35M				; 35
  1339	032164	000000000000#			T36M				; 36
  1340	032165	000000000000#			T37M				; 37
  1341	032166	000000000000#			T40M				; 40
  1342	032167	000000	000000			0				; 41
  1343	032170	000000	000000			0				; 42
  1344	032171	000000	000000			0				; 43
  1345	032172	000000	000000			0				; 44
  1346	032173	000000	000000			0				; 45
  1347	032174	000000	000000			0				; 46
  1348	032175	000000	000000			0				; 47
  1349	032176	000000	000000			0				; 50
  1350	032177	000000	000000			0				; 51
  1351	032200	000000	000000			0				; 52
  1352	032201	000000	000000			0				; 53
  1353	032202	000000	000000			0				; 54
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 31
DFCIA1	MAC	27-Oct-84 19:00		Test Dispatching                                                                   SEQ 0204

  1354
  1355					; Test names
  1356
  1357	032203	000000	000000		TSTNAM:	0
  1358	032204	037 00 0 00 104647 		TMSG	<Port Hardware Test 1>				; 1
  1359	032205	037 00 0 00 104654 		TMSG	<Port Hardware Test 2>				; 2
  1360	032206	037 00 0 00 104661 		TMSG	<Port Hardware Test 3>				; 3
  1361	032207	037 00 0 00 104666 		TMSG	<PB Register Test 1>				; 4
  1362	032210	037 00 0 00 104672 		TMSG	<Link Register Test 1>				; 5
  1363	032211	037 00 0 00 104677 		TMSG	<PB Register Test 2>				; 6
  1364	032212	037 00 0 00 104703 		TMSG	<Link Register Test 2>				; 7
  1365	032213	037 00 0 00 104710 		TMSG	<Transmit Buffer Load Test>			; 10
  1366	032214	037 00 0 00 104716 		TMSG	<Tranmit Buffer A Test>				; 11
  1367	032215	037 00 0 00 104723 		TMSG	<Transmit Buffer B Test>			; 12
  1368	032216	037 00 0 00 104730 		TMSG	<Transmit Buffer Addressing Test>		; 13
  1369	032217	037 00 0 00 104737 		TMSG	<PB Address Counter Test (Transmit)>		; 14
  1370	032220	037 00 0 00 104746 		TMSG	<PB Address Offset Test (Transmit Read)>	; 15
  1371	032221	037 00 0 00 104756 		TMSG	<PB Address Offset Test (Transmit Write)> 	; 16
  1372	032222	037 00 0 00 104766 		TMSG	<Receive Buffer A Test>				; 17
  1373	032223	037 00 0 00 104773 		TMSG	<Receive Buffer B Test>				; 20
  1374	032224	037 00 0 00 105000 		TMSG	<Receive Buffer Addressing Test>		; 21
  1375	032225	037 00 0 00 105007 		TMSG	<Retransmit Buffer A Test>			; 22
  1376	032226	037 00 0 00 105014 		TMSG	<Retransmit Buffer B Test>			; 23
  1377	032227	037 00 0 00 105021 		TMSG	<Transmit Xmt Buffer A to Rcv Buffer B>		; 24
  1378	032230	037 00 0 00 105031 		TMSG	<Transmit Xmt Buffer B to Rcv Buffer A>		; 25
  1379	032231	037 00 0 00 105041 		TMSG	<PB Address Offset Test (Receive Read)>		; 26
  1380	032232	037 00 0 00 105051 		TMSG	<Addressing Test 1>				; 27
  1381	032233	037 00 0 00 105055 		TMSG	<Addressing Test 2>				; 30
  1382	032234	037 00 0 00 105061 		TMSG	<Addressing Test 3>				; 31
  1383	032235	037 00 0 00 105065 		TMSG	<Node Address Test>				; 32
  1384	032236	037 00 0 00 105071 		TMSG	<Transmit Status>				; 33
  1385	032237	037 00 0 00 105075 		TMSG	<'Abort Transmission' Function (Active)>	; 34
  1386	032240	037 00 0 00 105105 		TMSG	<'Abort Transmission' Function (Inactive)>	; 35
  1387	032241	037 00 0 00 105116 		TMSG	<Receiver Status>				; 36
  1388	032242	037 00 0 00 105122 		TMSG	<PLI Parity Test>				; 37
  1389	032243	037 00 0 00 105126 		TMSG	<LINK Parity Test>				; 40
  1390	032244	037 00 0 00 105132 		TMSG	<CRC Test 1>					; 41
  1391	032245	037 00 0 00 105135 		TMSG	<CRC Test 2>					; 42
  1392	032246	037 00 0 00 105140 		TMSG	<Idle Loop Test>				; 43
  1393	032247	037 00 0 00 105143 		TMSG	<Queue Handling Test>				; 44
  1394	032250	037 00 0 00 105147 		TMSG	<CI Loopback Test (AutoPath/Compat)> 		; 45
  1395	032251	037 00 0 00 105156 		TMSG	<CI Loopback Test (Auto Path/Hiden)> 		; 46
  1396	032252	037 00 0 00 105165 		TMSG	<CI Loopback Test (Path A/Compat)> 		; 47
  1397	032253	037 00 0 00 105174 		TMSG	<CI Loopback Test (Path B/Compat)> 		; 50
  1398	032254	037 00 0 00 105203 		TMSG	<Link Loopback Test>				; 51
  1399	032255	037 00 0 00 105207 		TMSG	<Crossed Cables Test>				; 52
  1400	032256	037 00 0 00 105213 		TMSG	<REQID Test>					; 53
  1401	032257	037 00 0 00 105216 		TMSG	<Statistics Test>				; 54
  1402	032260	000000	000000			0
  1403
  1404	032261				TSTRES:	BLOCK	60			; test results
  1405
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 32
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0205

  1406						SUBTTL	Port Debugger
  1407
  1408					;#*********************************************************************
  1409					;* TSTDEB - Console command utility for the port.
  1410					;
  1411					; Command		Action
  1412					; -------		------
  1413					;  ?		   Print list of commands available.
  1414					;
  1415					;  HELP		   Print list of commands and description.
  1416					;  EXIT		   Exit debugger mode and go back to 'What Test' level.
  1417					;  DDT		   Enter DDT.
  1418					;
  1419					;  TAKE		   Take commands from specified file
  1420					;  NTAKE	   Take commands from specified file (unechoed)
  1421					;
  1422					;  SET ADDR adr		Set start address
  1423					;      CSR data		Set start CSR data
  1424					;      PARITY arg	Set/clr auto par generation
  1425					;      EBUF arg		Set/clr preserve EBUF flag
  1426					;      LENGTH len	Set buffer length
  1427					;      PAT n		Set data pattern
  1428					;      PATLIS arg	List data patterns
  1429					;      PCB arg		Set/clear PCB CCW list for START
  1430					;      FNAME name ext 	Set default ucode file name
  1431					;      RESPON		Set/clr forced packet response
  1432					;      PATH		Set path select
  1433					;      PORT		Set destination port
  1434					;      XCTID		Set XCT-ID
  1435					;      PRINT		Set word count for text printing
  1436					;      IGNORE		Set/clear discard other port SNDDG packets
  1437					;      SUMMAR		Set summary interval (seconds)
  1438					;      INTERV		Set interval (seconds)
  1439					;      WHAT		Print options
  1440					;      HELP		Print this
  1441					;
  1442					;  ECSR		   Print contents of the CSR register (in octal).
  1443					;  DCSR	arg	   Change the contents of the CSR registers.
  1444					;  ZCSR		   Clear CSR register.
  1445					;
  1446					;  RESET	   Issue an EBUS reset.
  1447					;  CLEAR	   Issue a 'Clear Port'.
  1448					;
  1449					;  START adr	   Start port microcode by setting CSR Bit 21 'MPROC Run'.
  1450					;		   If address is supplied, start at that address; if no
  1451					;		   address is supplied, start at location 0.
  1452					;
  1453					;  STOP		   Stop port microcode by clearing CSR Bit 21 'MPROC Run'.
  1454					;		   Report the last CRAM address also.
  1455					;
  1456					;  CONT		   Clear the single step bit and set 'MPROC Run' in the port.
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 33
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0206

  1457
  1458					;  Response		Action
  1459					;  --------		------
  1460					;  SSTEP arg	   Single step the port microcode 'ARG' times.  Report 
  1461					;		   final CRAM address.
  1462					;
  1463					;  STRACE arg	   Single step the port microcode 'ARG' times.  Report 
  1464					;		   the CRAM address and CSR register contents after each
  1465					;		   micro-instruction.
  1466					;
  1467					;  SPRINT arg	   Print single step history data, 'ARG' entries.
  1468					;  SCLEAR	   Clear single step history data.
  1469					;  SSINIT	   Initialize single step data
  1470					;
  1471					;  EEBUF	   Print contents of EBUF register.
  1472					;  DEBUF arg	   Deposit data to EBUF register.
  1473					;  ZEBUF	   Zero EBUF register.
  1474					;
  1475					;  ELAR		   Print contents of LAR register.
  1476					;  DRAR	arg	   Deposit data to RAR register.
  1477					;  ZRAR		   Zero RAR register.
  1478					;
  1479					;  DCRAM adr,adr   Deposit data into port CRAM addresses specified by 'adr1'
  1480					;		   and 'adr2'.  The data will be queried for each address.
  1481					;		   The port microcode must be stopped.
  1482					;
  1483					;  BCRAM adr,adr   Deposit data as above, data is queried by bit field.
  1484					;
  1485					;  ACRAM adr,adr   Alter CRAM locations, addresses selected as above.
  1486					;
  1487					;  ECRAM adr,adr   Examine port CRAM addresses.  'Adr1' and 'adr2' specify
  1488					;		   examine limits.  The port microcode must be stopped.
  1489					;
  1490					;  LCRAM adr,adr   List port CRAM addresses.  'Adr1' and 'adr2' specify
  1491					;		   examine limits.  The port microcode must be stopped.
  1492					;
  1493					;  ZCRAM adr,adr   Zero port CRAM addresses.  'Adr1' and 'adr2' specify
  1494					;		   examine limits.  The port microcode must be stopped.
  1495					;
  1496					;  ELOCS adr,adr   Examine local storage contents
  1497					;  DLOCS adr,adr   Deposit local storage contents
  1498					;  ZLOCS adr,adr   Zero local storage contents
  1499					;
  1500					;  E2901 adr,adr   Examine 2901 registers
  1501					;  D2901 adr,data  Deposit 2901 registers
  1502					;  Z2901 adr,adr   Zero 2901 registers
  1503					;
  1504					;  MARK adr..      Set mark bit in CRAM locations
  1505					;  RMARK adr..	   Remove mark bit at CRAM address 'adr'
  1506					;  CMARK adr,adr   Clear mark bit in CRAM locations
  1507					;  LMARK	   List locations with mark bit set
  1508					;
  1509					;  BREAK adr..	  Set a breakpoint at port CRAM address
  1510					;  RBREAK adr..	  Remove breakpoint at port CRAM address 'adr'
  1511					;  CBREAK adr,adr Clear all breakpoints
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 33-1
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0207

  1512					;  LBREAK adr,adr List breakpoints
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 34
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0208

  1513
  1514					;  Response		Action
  1515					;  --------		------
  1516					;  LOAD	arg	  Load microcode into CRAM from a test.  'Arg' specifies
  1517					;		  the test number.
  1518					;  LIST arg	  List microcode of a test.  'Arg' specifies the test
  1519					;		  number.
  1520					;
  1521					;  FLOAD 	  Load microcode from disk file into CRAM.
  1522					;  FVERFY	  Verify microcode loaded.
  1523					;  FLIST	  List microcode on disk file.
  1524					;  FEXAM	  Examine microcode on disk file.
  1525					;
  1526					;  TRANSL arg     Translate given CSR bits to English.
  1527					;  CCODE	  Print current status of condition codes.
  1528					;  ESTACK	  Examine 2910 stack contents
  1529					;
  1530					;  FILLNX arg	  Fill CRAM with data as 'J=.+1,CTL=x', where 'x' is given.
  1531					;  FILLPC arg	  Fill CRAM with data as 'J=.,CTL=x', where 'x' is given.
  1532					;
  1533					;  IPRINT	  Print interrupt history
  1534					;  ICLEAR	  Clear interrupt history
  1535					;  IINIT	  Initialize interrupt system
  1536					;
  1537					;  STATIS	  Print statistics
  1538					;  ZSTATS	  Clear statistics
  1539					;  CONFIG	  Determine/print system configuration
  1540					;  CONPNT	  Print current configuration
  1541					;
  1542					;  CCWPNT	  Print CCW list
  1543					;  LOGPNT	  Print logout data
  1544					;
  1545					;  PINIT	  Initialize PCB
  1546					;  SIDLE	  Start port until reach IDLE loop
  1547					;  BPACK	  Build a packet
  1548					;  IQUEUE	  Put packet on cmd queue
  1549					;  PQUEUE	  Print contents of a queue
  1550					;  PPCB		  Print PCB
  1551					;  WATCH	  Watch port and print events
  1552					;  DEPPAK	  Deposit into packet
  1553					;
  1554					;  DPLI lnk,data  Deposit data to PLI
  1555					;  EPLI lnk,reg   Read PLI data
  1556					;  IPLI		  Initialize PILA/Link modules
  1557					;
  1558					;  ETBUFF	  Read transmit buffers
  1559					;  ERBUFF	  Read receive buffers
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 35
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0209

  1560
  1561					;  Switches:  To complement switch, type switch name
  1562					;
  1563					;  SWITCH	   Enter switches
  1564					;  SWPRIN	   Print current switches
  1565					;
  1566					;  NOPNT   LOOPER  RELIAB   TRACE   LOOPGM  DSPEAR  SDEBUG  EDEBUG
  1567					;  PNTLPT  ERSTOP  TXTINH   INHFLT  LOOPTS  UDEBUG  LDEBUG
  1568					;  DING    PALERS  OPRSEL   INHMSG  RUNALL  MDEBUG  DDEBUG
  1569					;
  1570					; Common Error Messages For 'DEBUG' Mode:
  1571					;
  1572					; "? Missing argument" - Response to "DEBUG>" prompt expects a command
  1573					;	plus an argument.
  1574					;
  1575					; "? Argument Error" - An attempt was made to decode an octal or decimal
  1576					;	argument.  It was undecipherable.
  1577					;
  1578					; "? Range nonsensical" - The beginning address is greater than ending
  1579					;	address.
  1580					;
  1581					; "? Range of CRAM locations is 0000-7777" - Argument(s) typed were not
  1582					;	in range.
  1583					;
  1584					; "? Port not stopped" - An operation requiring the port to be stopped
  1585					;	was issued when 'MPROC Run' was set.
  1586					;
  1587					; "? Port not running" - A function was issued to the port when it was
  1588					;	stopped.  It should have been running.
  1589					;
  1590					; "? Error accessing CSR registers" - A read of CSR register failed.
  1591					;
  1592					; "? Test specified does not have microcode" - An attempt to load ucode
  1593					;	from this test failed because the test doesn't have any.
  1594					;
  1595					; "? Unrecognized command" - Unrecognized command entered.
  1596					;#********************************************************************
  1597
  1598	032341	200 01 0 00 105225 	TSTDEB:	MOVE	1,[FMSGCD (DEBUG <CR>)]
  1599	032342	260 17 0 00 031534*		GO	CHKARG			; check for argument
  1600	032343	263 17 0 00 000000 		RTN				; error - exit
  1601	032344	202 17 0 00 120773'		MOVEM	P,SAVCMD#		; save PC
  1602
  1603					; Initialize things
  1604
  1605	032345	402 00 0 00 120760'	CMD0:	SETZM	PCMD#			; clear the command storage
  1606	032346	400 15 0 00 000000 		SETZ	ERFLG,			; clear error flag
  1607	032347	201 00 0 00 303240 		MOVEI	^D100000		; re-set up print limit just in case
  1608	032350	212 00 0 00 030220 		MOVNM	PNTENB			;   the last test exceeded it
  1609	032351	200 16 0 00 103311 		MOVE	MBCN,CIPORT		; set up MBCN register properly
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 36
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0210

  1610
  1611					; Set/clear debug switches
  1612
  1613	032352	402 00 0 00 121012'		SETZM	UDEBUG			; clear no-IPA user mode debug switch
  1614	032353	402 00 0 00 120741'		SETZM	MDEBUG			; clear error message debug switch
  1615	032354	402 00 0 00 120777'		SETZM	SDEBUG			; clear test debug switch
  1616	032355	402 00 0 00 120737'		SETZM	LDEBUG			; clear ucode load debug switch
  1617	032356	402 00 0 00 120722'		SETZM	DDEBUG			; clear dump on error debug switch
  1618	032357	260 17 0 00 032032*		GO	SWITT			; get switches
  1619	032360	602 00 0 00 002000 		TRNE	DEBUG1			; debug switch set?
  1620	032361	476 00 0 00 121012'		SETOM	UDEBUG			; set no-IPA user mode debug switch
  1621	032362	602 00 0 00 001000 		TRNE	DEBUG2			; debug switch set?
  1622	032363	476 00 0 00 120741'		SETOM	MDEBUG			; set error message debug switch
  1623	032364	602 00 0 00 000400 		TRNE	DEBUG3			; debug switch set?
  1624	032365	476 00 0 00 120777'		SETOM	SDEBUG			; set test debug switch
  1625	032366	602 00 0 00 000200 		TRNE	DEBUG4			; debug switch set?
  1626	032367	476 00 0 00 120737'		SETOM	LDEBUG			; set ucode load debug switch
  1627	032370	602 00 0 00 000100 		TRNE	DEBUG5			; debug switch set?
  1628	032371	476 00 0 00 120722'		SETOM	DDEBUG			; set dump on error debug switch
  1629	032372	402 00 0 00 103310 		SETZM	PMODE			; set program mode to 'no test'
  1630	032373	402 00 0 00 120743'		SETZM	MULFLG			; clear 'multiple examine' flag
  1631	032374	476 00 0 00 120744'		SETOM	MULINI			; set 'initial examine' flag
  1632	032375	402 00 0 00 121011'		SETZM	TXADDL			; clear 'addl text' routine address
  1633
  1634					; Input command
  1635
  1636	032376	260 17 0 00 031003*		GO	CLRBUF			; clear input buffer
  1637	032377	260 17 0 00 000000*	CMD1:	GO	.INPNT			; print interrupt fielded (if any)
  1638						MOVEI	[PCRL			; set up $ transfer address
  1639							 SETZM	ALTF
  1640							 GO	FIOFF
  1641	032400	201 00 0 00 105226 			 JRST	CMD0]
  1642	032401	202 00 0 00 030063 		MOVEM	ALTMGO
  1643	032402	402 00 0 00 120713'		SETZM	ALTF			; clear 'altmode typed' flag
  1644	032403	336 00 0 00 120733'		SKIPN	FINPUT			; file input?
  1645	032404	476 00 0 00 120732'		SETOM	FINECH			; no - ensure echo flag set
  1646	032405	332 00 0 00 120732'		SKIPE	FINECH			; echo flag set?
  1647						GO	[PFORCE			; no - print all this
  1648							 PCRLF
  1649							 FMSG	(DEBUG> )
  1650	032406	260 17 0 00 105234 			 RTN]
  1651	032407	332 00 0 00 120733'		SKIPE	FINPUT			; file input?
  1652						JRST	[GO	FINCMD		; yes - input sixbit cmd
  1653							 JRST	CMD1		; error or EOF
  1654	032410	254 00 0 00 105240 			 JRST	CMD2]		; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 37
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0211

  1655
  1656	032411	037 10 0 00 000003 	CMD1A:	TTSIXB				; get operator input
  1657						ALTCHK	[GET	XXW#		; adjust stack properly
  1658							 SKIPN	$TWCNT		; did a timeout occur?
  1659							 JRST	CMD1		; yes - keep looking for input
  1660							 MOVE	1,$TTCHR	; no - get character typed
  1661							 CAIN	1,77		; was a question mark typed?
  1662							 JRST	CMDQUE		; yes - handle
  1663							 CAIN	1,40		; space (delimiter character) typed?
  1664							 JRST	.+1		; yes - continue (no error occurred)
  1665							 FMSGCD	<? Unrecognizable - Type ? for help>
  1666							 GO	FIOFF		; turn off file input
  1667	032412	007 00 0 00 105243 			 JRST	CMD0]		; error - reask question
  1668
  1669					CMD2:	JUMPE	[MOVE	$TTCHR		; anything typed?  if a space, keep
  1670							 CAIN	40		;   looking for an argument, if not
  1671							 JRST	CMD1A		;   exit
  1672	032413	322 00 0 00 105256 			 JRST	CMD1]
  1673	032414	202 00 0 00 120760'		MOVEM	PCMD			; save command typed
  1674	032415	402 00 0 00 031721*		SETZM	ARGFLG			; clear 'argument given' flag
  1675	032416	200 01 0 00 030231 		MOVE	1,$TTCHR		; get last character typed
  1676	032417	302 01 0 00 000015 		CAIE	1,15			; CR? (end of line)
  1677	032420	476 00 0 00 032415*		SETOM	ARGFLG			; set 'argument given' flag
  1678
  1679					; Decode the command
  1680
  1681	032421	200 01 0 00 120760'		MOVE	1,PCMD			; get sixbit command
  1682	032422	201 02 0 00 032435 		MOVEI	2,.DBCMD		; get address of cmd list
  1683	032423	260 17 0 00 031416*		GO	.COMM			; handle command decoding
  1684						 JRST	[FMSGCD	<? Unrecognizable - Type ? for help>
  1685							 GO	FIOFF
  1686	032424	254 00 0 00 105253 			 JRST	CMD0]		; error return
  1687	032425	260 17 1 01 032607 		GO	@.DBDIS(1)		; dispatch to test
  1688	032426	254 00 0 00 032345 		JRST	CMD0			; return to 'DEBUG>' prompt
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 38
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0212

  1689
  1690					; Question mark typed
  1691
  1692	032427	037 01 0 00 000026 	CMDQUE:	PFORCE				; handle Control-O
  1693	032430	037 00 1 00 032432 		PNTMSG	@CMDQUU			; print text
  1694	032431	254 00 0 00 032345 		JRST	CMD0			; look for new command
  1695
  1696	032432				CMDQUU:	[ASCII	/
  1697					-------- Miscellaneous ---------------------   - CI -  -- Switches --
  1698					HELP    IPRINT  START   EEBUF  ECRAM   MARK    PINIT   NOPNT   TRACE
  1699					EXIT    ICLEAR  STOP    DEBUF  LCRAM   RMARK   SIDLE   PNTLPT  INHFLT
  1700					DDT     IINIT   CONT    ZEBUF  BCRAM   CMARK   WATCH   DING    INHMSG
  1701	032432	000000	105262		                SSTEP          ACRAM   LMARK           ERSTOP  LOOPGM /]
  1702						[ASCII	/
  1703					SET     CCWPNT  STRACE  ELAR   ZCRAM           BPACK   PALERS  LOOPTS
  1704					TAKE    LOGPNT  SPRINT  DRAR           BREAK   IQUEUE  RELIAB  RUNALL
  1705					NTAKE   STATIS  SCLEAR  ZRAR   FLOAD   RBREAK  PPCB    TXTINH  DSPEAR
  1706					TRANSL  ZSTATS  SSINIT         FVERFY  CBREAK  PQUEUE  OPRSEL  UDEBUG
  1707	032433	000000	105371		FILLNX  CONFIG          E2901  FLIST   LBREAK                  MDEBUG/]
  1708						[ASCIZ	/
  1709					FILLPC  CONPNT  ELOCS   D2901  FEXAM           DEPPAK  SWITCH  SDEBUG
  1710					                DLOCS   Z2901          EPLI            SWPRIN  LDEBUG
  1711					RESET   ECSR    ZLOCS          ENEXT   DPLI    ETBUFF          DDEBUG
  1712					CLEAR   DCSR            CCODE  DNEXT   IPLI    EXBUFF          EDEBUG
  1713					        ZCSR    ESTACK
  1714	032434	000000	105500		/]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 39
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0213

  1715
  1716					;#********************************************************************
  1717					;* .DBCMD - List of acceptable commands
  1718					;#********************************************************************
  1719
  1720					; Miscellaneous commands
  1721
  1722	032435	777777	777655		.DBCMD:	-123				; ignore
  1723	032436	50 45 54 60 00 00 		SIXBIT	/HELP/			; print help message
  1724	032437	45 70 51 64 00 00 		SIXBIT	/EXIT/			; exit DEBUG mode
  1725	032440	44 44 64 00 00 00 		SIXBIT	/DDT/			; enter DDT
  1726
  1727	032441	63 45 64 00 00 00 		SIXBIT	/SET/			; set/print options
  1728	032442	64 41 53 45 00 00 		SIXBIT	/TAKE/			; take commands from a file
  1729	032443	56 64 41 53 45 00 		SIXBIT	/NTAKE/			; take commands from a file
  1730	032444	45 56 45 70 64 00 		SIXBIT	/ENEXT/			; examine next location
  1731	032445	44 56 45 70 64 00 		SIXBIT	/DNEXT/			; examine next location
  1732
  1733					; CSR commands
  1734
  1735	032446	45 43 63 62 00 00 		SIXBIT	/ECSR/			; examine CSR register
  1736	032447	44 43 63 62 00 00 		SIXBIT	/DCSR/			; deposit CSR register
  1737	032450	72 43 63 62 00 00 		SIXBIT	/ZCSR/			; zero CSR register
  1738
  1739	032451	62 45 63 45 64 00 		SIXBIT	/RESET/			; issue an EBUS Reset
  1740	032452	43 54 45 41 62 00 		SIXBIT	/CLEAR/			; issue a 'Port Clear'
  1741
  1742					; Start/stop/single step commands
  1743
  1744	032453	63 64 41 62 64 00 		SIXBIT	/START/			; start the port
  1745	032454	63 64 57 60 00 00 		SIXBIT	/STOP/			; stop the port
  1746	032455	43 57 56 64 00 00 		SIXBIT	/CONT/			; continue the port
  1747	032456	63 63 64 45 60 00 		SIXBIT	/SSTEP/			; single step the port
  1748	032457	63 64 62 41 43 45 		SIXBIT	/STRACE/		; single step the port while tracing
  1749	032460	63 60 62 51 56 64 		SIXBIT	/SPRINT/		; print single step history
  1750	032461	63 43 54 45 41 62 		SIXBIT	/SCLEAR/		; clear single step history data
  1751	032462	63 63 51 56 51 64 		SIXBIT	/SSINIT/		; set up ss start addr/data/history
  1752
  1753					; EBUF commands
  1754
  1755	032463	45 45 42 65 46 00 		SIXBIT	/EEBUF/			; examine EBUF register
  1756	032464	44 45 42 65 46 00 		SIXBIT	/DEBUF/			; deposit EBUF register
  1757	032465	72 45 42 65 46 00 		SIXBIT	/ZEBUF/			; zero EBUF register
  1758
  1759					; RAR/LAR commands
  1760
  1761	032466	45 54 41 62 00 00 		SIXBIT	/ELAR/			; examine LAR register
  1762	032467	44 62 41 62 00 00 		SIXBIT	/DRAR/			; deposit RAR register
  1763	032470	72 62 41 62 00 00 		SIXBIT	/ZRAR/			; zero RAR register
  1764
  1765					; CRAM commands
  1766
  1767	032471	44 43 62 41 55 00 		SIXBIT	/DCRAM/			; deposit into port CRAM
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 40
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0214

  1768	032472	42 43 62 41 55 00 		SIXBIT	/BCRAM/			; deposit into port CRAM by bit field
  1769	032473	41 43 62 41 55 00 		SIXBIT	/ACRAM/			; alter port CRAM
  1770	032474	45 43 62 41 55 00 		SIXBIT	/ECRAM/			; examine port CRAM
  1771	032475	54 43 62 41 55 00 		SIXBIT	/LCRAM/			; list port CRAM
  1772	032476	72 43 62 41 55 00 		SIXBIT	/ZCRAM/			; zero port CRAM
  1773
  1774					; 2901 commands
  1775
  1776	032477	45 22 31 20 21 00 		SIXBIT	/E2901/			; examine 2901 registers
  1777	032500	44 22 31 20 21 00 		SIXBIT	/D2901/			; deposit 2901 registers
  1778	032501	72 22 31 20 21 00 		SIXBIT	/Z2901/			; zero 2901 registers
  1779
  1780					; Local storage commmands
  1781
  1782	032502	45 54 57 43 63 00 		SIXBIT	/ELOCS/			; examine local storage
  1783	032503	44 54 57 43 63 00 		SIXBIT	/DLOCS/			; deposit local storage
  1784	032504	72 54 57 43 63 00 		SIXBIT	/ZLOCS/			; zero local storage
  1785
  1786					; Mark bit commands
  1787
  1788	032505	55 41 62 53 00 00 		SIXBIT	/MARK/			; set mark bit in locations
  1789	032506	62 55 41 62 53 00 		SIXBIT	/RMARK/			; remove mark bit in locations
  1790	032507	43 55 41 62 53 00 		SIXBIT	/CMARK/			; clear mark bit in locations
  1791	032510	54 55 41 62 53 00 		SIXBIT	/LMARK/			; list locations with mark bit set
  1792
  1793					; Breakpoint commands
  1794
  1795	032511	42 62 45 41 53 00 		SIXBIT	/BREAK/			; set breakpoint
  1796	032512	62 42 62 45 41 53 		SIXBIT	/RBREAK/		; remove breakpoint
  1797	032513	43 42 62 45 41 53 		SIXBIT	/CBREAK/		; clear all breakpoints
  1798	032514	54 42 62 45 41 53 		SIXBIT	/LBREAK/		; list breakpoints
  1799
  1800					; Microcode file commands
  1801
  1802	032515	54 57 41 44 00 00 		SIXBIT	/LOAD/			; load microcode from test into CRAM
  1803	032516	54 51 63 64 00 00 		SIXBIT	/LIST/			; list microcode from test
  1804	032517	46 54 57 41 44 00 		SIXBIT	/FLOAD/			; load microcode from file into CRAM
  1805	032520	46 66 45 62 46 71 		SIXBIT	/FVERFY/		; verify microcode loaded
  1806	032521	46 54 51 63 64 00 		SIXBIT	/FLIST/			; list microcode in file
  1807	032522	46 45 70 41 55 00 		SIXBIT	/FEXAM/			; examine microcode in file
  1808
  1809					; Miscellaneous commands
  1810
  1811	032523	64 62 41 56 63 54 		SIXBIT	/TRANSL/		; translate CSR bits
  1812	032524	43 43 57 44 45 00 		SIXBIT	/CCODE/			; print condition codes
  1813	032525	45 63 64 41 43 53 		SIXBIT	/ESTACK/		; examine 2910 stack contents
  1814	032526	46 51 54 54 56 70 		SIXBIT	/FILLNX/		; fill CRAM with special data
  1815	032527	46 51 54 54 60 43 		SIXBIT	/FILLPC/		; fill CRAM with special data
  1816	032530	51 60 62 51 56 64 		SIXBIT	/IPRINT/		; print interrupt history
  1817	032531	51 43 54 45 41 62 		SIXBIT	/ICLEAR/		; clear interrupt history
  1818	032532	51 51 56 51 64 00 		SIXBIT	/IINIT/			; initialize interrupt system
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 41
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0215

  1819
  1820	032533	63 64 41 64 51 63 		SIXBIT	/STATIS/		; print collected statistics
  1821	032534	72 63 64 41 64 63 		SIXBIT	/ZSTATS/		; clear statistics areas
  1822	032535	43 57 56 46 51 47 		SIXBIT	/CONFIG/		; collect/print current configuration
  1823	032536	43 57 56 60 56 64 		SIXBIT	/CONPNT/		; print current configuration
  1824	032537	44 65 55 60 00 00 		SIXBIT	/DUMP/			; dump entire port status
  1825
  1826					; Data transfer routines
  1827
  1828	032540	43 43 67 60 56 64 		SIXBIT	/CCWPNT/		; print CCW list
  1829	032541	54 57 47 60 56 64 		SIXBIT	/LOGPNT/		; print logout data
  1830
  1831					; CI related commands
  1832
  1833	032542	60 51 56 51 64 00 		SIXBIT	/PINIT/			; initialize PCB and queues
  1834	032543	63 51 44 54 45 00 		SIXBIT	/SIDLE/			; start port and wait for IDLE loop
  1835	032544	42 60 41 43 53 00 		SIXBIT	/BPACK/			; build a packet
  1836	032545	51 61 65 45 65 45 		SIXBIT	/IQUEUE/		; put packet on cmd queue
  1837	032546	60 61 65 45 65 45 		SIXBIT	/PQUEUE/		; print specified queue
  1838	032547	60 60 43 42 00 00 		SIXBIT	/PPCB/			; print PCB
  1839	032550	67 41 64 43 50 00 		SIXBIT	/WATCH/			; watch port and print events
  1840	032551	44 60 54 51 00 00 		SIXBIT	/DPLI/			; deposit data to PLI
  1841	032552	45 60 54 51 00 00 		SIXBIT	/EPLI/			; examine PLI
  1842	032553	51 60 54 51 00 00 		SIXBIT	/IPLI/			; initialize PILA/Link modules
  1843	032554	44 45 60 60 41 53 		SIXBIT	/DEPPAK/		; deposit packet data
  1844	032555	45 64 42 65 46 46 		SIXBIT	/ETBUFF/		; read transmit buffers
  1845	032556	45 62 42 65 46 46 		SIXBIT	/ERBUFF/		; read receive buffers
  1846
  1847					; Switches
  1848
  1849	032557	63 67 51 64 43 50 		SIXBIT	/SWITCH/		; input switches
  1850	032560	63 67 60 62 51 56 		SIXBIT	/SWPRIN/		; print switch selections
  1851	032561	56 57 60 56 64 00 		SIXBIT	/NOPNT/			; don't print anything
  1852	032562	60 56 64 54 60 64 		SIXBIT	/PNTLPT/		; print on printer
  1853	032563	44 51 56 47 00 00 		SIXBIT	/DING/			; ding on error
  1854	032564	45 62 63 64 57 60 		SIXBIT	/ERSTOP/		; halt on error
  1855	032565	60 41 54 45 62 63 		SIXBIT	/PALERS/		; print all errors
  1856	032566	62 45 54 51 41 42 		SIXBIT	/RELIAB/		; reliability testing
  1857	032567	64 70 64 51 56 50 		SIXBIT	/TXTINH/		; shorten printing
  1858	032570	57 60 62 63 45 54 		SIXBIT	/OPRSEL/		; operator select
  1859	032571	64 62 41 43 45 00 		SIXBIT	/TRACE/			; trace pgm flow
  1860	032572	51 56 50 46 54 64 		SIXBIT	/INHFLT/		; inhibit fault isolation
  1861	032573	51 56 50 55 63 47 		SIXBIT	/INHMSG/		; inhibit error messages
  1862	032574	54 57 57 60 47 55 		SIXBIT	/LOOPGM/		; loop on program
  1863	032575	54 57 57 60 64 63 		SIXBIT	/LOOPTS/		; loop on test
  1864	032576	62 65 56 41 54 54 		SIXBIT	/RUNALL/		; run all test segments
  1865	032577	44 63 60 45 41 62 		SIXBIT	/DSPEAR/		; disable SPEAR reporting
  1866	032600	65 44 45 42 65 47 		SIXBIT	/UDEBUG/		; no-IPA user mode debug switch
  1867	032601	55 44 45 42 65 47 		SIXBIT	/MDEBUG/		; error message debug switch
  1868	032602	63 44 45 42 65 47 		SIXBIT	/SDEBUG/		; test debug switch
  1869	032603	54 44 45 42 65 47 		SIXBIT	/LDEBUG/		; load microcode debug switch
  1870	032604	44 44 45 42 65 47 		SIXBIT	/DDEBUG/		; dump on error debug switch
  1871	032605	45 44 45 42 65 47 		SIXBIT	/EDEBUG/		; expanded error msg switch
  1872	032606	000 00 0 00 000000 		Z				; list terminator
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 42
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0216

  1873
  1874					;#********************************************************************
  1875					;* .DBDIS - List of dispatch addresses
  1876					;#********************************************************************
  1877
  1878	032607	000000	103535		.DBDIS:	[RTN]				; ignore
  1879	032610	000000	032760			DHELP				; HELP - print help message
  1880						[MOVE	1,[FMSGCD (EXIT <CR>)]	; EXIT - exit DEBUG mode
  1881						 GO	CHKARG
  1882						 RTN
  1883						 GET	XXX#
  1884	032611	000000	105577			 RTN]
  1885	032612	000000	031346			TSTDDT				; DDT - enter DDT
  1886
  1887	032613	000000	033052			DSET				; SET - set/clear/print options
  1888	032614	000000	031544			TSTTAK				; TAKE - take commands from file
  1889	032615	000000	031542			TSTTAN				; NTAKE - take commands from a file
  1890	032616	000000	040304			DENEXT				; ENEXT - examine next location
  1891	032617	000000	040366			DDNEXT				; DNEXT - deposit next location
  1892
  1893	032620	000000	034022			DECSR				; ECSR - examine CSR register
  1894	032621	000000	034032			DDCSR				; DCSR - deposit CSR register
  1895	032622	000000	034041			DZCSR				; ZCSR - zero CSR register
  1896
  1897	032623	000000	034047			DRESET				; RESET - issue an EBUS Reset
  1898	032624	000000	034054			DCLEAR				; CLEAR - issue a 'Port Clear'
  1899
  1900	032625	000000	034074			DSTART				; START - start the port
  1901	032626	000000	034123			DSTOP				; STOP - stop the port
  1902	032627	000000	035514			DCONT				; CONT - continue the port
  1903	032630	000000	034146			DSSTEP				; SSTEP - single step the port
  1904	032631	000000	034143			DTRACE				; STRACE - sstep the port while tracing
  1905	032632	000000	034215			DSSPNT				; SPRINT - print single step history
  1906	032633	000000	034237			DSSCLR				; SCLEAR - clear single step history
  1907	032634	000000	034061			DSINIT				; SSINIT - set up ss addr/data/history
  1908
  1909	032635	000000	035531			DEEBUF				; EEBUF - examine EBUF register
  1910	032636	000000	035552			DDEBUF				; DEBUF - deposit EBUF register
  1911	032637	000000	035545			DZEBUF				; ZEBUF - zero EBUF register
  1912
  1913	032640	000000	035564			DELAR				; ELAR - examine LAR register
  1914	032641	000000	035604			DDRAR				; DRAR - deposit RAR register
  1915	032642	000000	035616			DZRAR				; ZRAR - zero RAR register
  1916
  1917	032643	000000	035631			DDCRAM				; DCRAM - deposit CRAM
  1918	032644	000000	035634			DBCRAM				; BCRAM - deposit CRAM by bit field
  1919	032645	000000	035637			DACRAM				; ACRAM - alter port CRAM
  1920	032646	000000	035626			DECRAM				; ECRAM - examine port CRAM
  1921	032647	000000	035645			DLCRAM				; LCRAM - list port CRAM
  1922	032650	000000	035642			DZCRAM				; ZCRAM - zero port CRAM
  1923
  1924	032651	000000	036413			DEALU				; E2901 - examine 2901 registers
  1925	032652	000000	036521			DDALU				; D2901 - deposit 2901 registers
  1926	032653	000000	036602			DZALU				; Z2901 - zero 2901 registers
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 43
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0217

  1927
  1928	032654	000000	036717			DELOCS				; ELOCS - examine local storage
  1929	032655	000000	037022			DDLOCS				; DLOCS - deposit local storage
  1930	032656	000000	037076			DZLOCS				; ZLOCS - zero local storage
  1931
  1932	032657	000000	037212			DMARK				; MARK - set mark bits
  1933	032660	000000	037241			DRMARK				; RMARK - remove mark bits
  1934	032661	000000	037270			DCMARK				; CMARK - clear mark bits
  1935	032662	000000	037341			DLMARK				; LMARK - list mark bits
  1936
  1937	032663	000000	040514			DBREAK				; BREAK - set breakpoint
  1938	032664	000000	040547			DRBRK				; RBREAK - remove breakpoint
  1939	032665	000000	040572			DCBRK				; CBREAK - clear all breakpoints
  1940	032666	000000	040636			DLBRK				; LBREAK - list breakpoints
  1941
  1942	032667	000000	040717			DLOAD				; LOAD - load test microcode into CRAM
  1943	032670	000000	040740			DLIST				; LIST - list test microcode
  1944	032671	000000	040753			DFLOAD				; FLOAD - load ucode from file to CRAM
  1945	032672	000000	040776			DFVERF				; FVERFY - verify microcode loaded
  1946	032673	000000	041012			DFLIST				; FLIST - list microcode in file
  1947	032674	000000	041047			DFEXAM				; FEXAM - examine microcode in file
  1948
  1949	032675	000000	041104			DTRANS				; TRANSL - translate CSR bits
  1950	032676	000000	041114			DCCODE				; CCODE - print condition codes
  1951	032677	000000	040454			DESTAK				; ESTACK - examine 2910 stack
  1952	032700	000000	041243			DFILLN				; FILLNX - fill CRAM with special data
  1953	032701	000000	041267			DFILLP				; FILLPC - fill CRAM with special data
  1954	032702	000000	041336			DIPRIN				; IPRINT - print interrupt history
  1955						[MOVE	1,[FMSGCD (ICLEAR <CR>)]; ICLEAR - clear interrupt history
  1956						 GO	CHKARG
  1957						 RTN
  1958						 SETZM	INTNUM
  1959						 MOVE	[INTNUM,,INTNUM+1]
  1960						 BLT	INTEND
  1961						 SETOM	INTNUM
  1962	032703	000000	105612			 RTN]
  1963	032704	000000	041412			DIINIT				; IINIT - initialize interrupt system
  1964
  1965	032705	000000	031514			TSTPRI				; STATIS - print statistics
  1966	032706	000000	031370			TSTZER				; ZSTATS - clear statistics
  1967	032707	000000	031375			TSTCON				; CONFIG - determine/pnt configuration
  1968	032710	000000	031403			TSTCPN				; CONPNT - print configuration
  1969	032711	000000	037752			DDUMP				; DUMP - dump entire port state
  1970
  1971	032712	000000	041311			DCWPNT				; CCWPNT - print CCW list
  1972	032713	000000	041317			DLGPNT				; LOGPNT - print logout area data
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 44
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0218

  1973
  1974					; CI related commands
  1975
  1976	032714	000000	041420			DPINIT				; PINIT - initialize PCB and queues
  1977	032715	000000	041425			DSIDLE				; SIDLE - start port/wait for IDLE loop
  1978	032716	000000	041433			DBPACK				; BPACK - build packet
  1979	032717	000000	041506			DIQUEU				; IQUEUE - put packet on cmd queue
  1980	032720	000000	041530			DPQUEU				; PQUEUE - print specified queue
  1981	032721	000000	041522			DPPCB				; PPCB - print PCB
  1982	032722	000000	041562			DWATCH				; WATCH - watch port and print events
  1983	032723	000000	037417			DDPLI				; DPLI - deposit data to PLI
  1984	032724	000000	037507			DEPLI				; EPLI - examine PLI
  1985	032725	000000	037612			DIPLI				; IPLI - initialize PILA/Link modules
  1986	032726	000000	040435			DDPPAK				; DEPPAK - deposit into packet
  1987	032727	000000	037722			DETBUF				; ETBUFF - read transmit buffers
  1988	032730	000000	037736			DERBUF				; ERBUFF - read receive buffers
  1989
  1990					; Switches
  1991
  1992						[MOVE	1,[FMSGCD (SWITCH <CR>)]; SWITCH - input switches
  1993						 GO	CHKARG
  1994						 RTN
  1995						 GO	.ISWT
  1996	032731	000000	105622			 RTN]
  1997						[MOVE	1,[FMSGCD (SWPRIN <CR>)]; SWPRIN - print switches
  1998						 GO	CHKARG
  1999						 RTN
  2000						 GO	.SWCHP
  2001	032732	000000	105627			 RTN]
  2002
  2003			000124		SWSTP==.-.DBDIS
  2004
  2005	032733	000000	041325			DSWIT				; NOPNT
  2006	032734	000000	041325			DSWIT				; PNTLPT
  2007	032735	000000	041325			DSWIT				; DING
  2008	032736	000000	041325			DSWIT				; ERSTOP
  2009	032737	000000	041325			DSWIT				; PALERS
  2010	032740	000000	041325			DSWIT				; RELIAB
  2011	032741	000000	041325			DSWIT				; TXTINH
  2012	032742	000000	041325			DSWIT				; OPRSEL
  2013	032743	000000	041325			DSWIT				; TRACE
  2014	032744	000000	041325			DSWIT				; INHFLT
  2015	032745	000000	041325			DSWIT				; INHMSG
  2016	032746	000000	041325			DSWIT				; LOOPGM
  2017	032747	000000	041325			DSWIT				; LOOPTS
  2018	032750	000000	041325			DSWIT				; RUNALL
  2019	032751	000000	041325			DSWIT				; DSPEAR
  2020	032752	000000	041325			DSWIT				; UDEBUG
  2021	032753	000000	041325			DSWIT				; MDEBUG
  2022	032754	000000	041325			DSWIT				; SDEBUG
  2023	032755	000000	041325			DSWIT				; LDEBUG
  2024	032756	000000	041325			DSWIT				; DDEBUG
  2025	032757	000000	041325			DSWIT				; EDEBUG
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 45
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0219

  2026
  2027					;#*********************************************************************
  2028					;* DHELP - Print DEBUG> help message
  2029					;#*********************************************************************
  2030
  2031					DHELP:	MOVN	1,[FMSGD <
  2032					HELP ALL     START  CRAM  BREAK   DTXFR
  2033					     MISC    CSR    2901  UCODE   CI
  2034					     INTRPT  EBUF   LOCS  STATIS  PLI
  2035	032760	210 01 0 00 105675 	     RESET   LAR    MARK  CONFIG  SWITCH>]
  2036	032761	260 17 0 00 031554*		GO	.SARG			; get SIXBIT argument
  2037	032762	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2038						 GO	[MOVE	[SIXBIT /ALL/]	; no argument - assume all
  2039							 MOVEM	ARGUM
  2040	032763	260 17 0 00 104117 			 RTN]
  2041	032764	200 01 0 00 031707*		MOVE	1,ARGUM			; get sixbit command
  2042	032765	201 02 0 00 033000 		MOVEI	2,.HLCMD		; get address of cmd list
  2043	032766	260 17 0 00 032423*		GO	.COMM			; handle command decoding
  2044						 JRST	[FMSGCD	<? Unrecognizable - Type ? for help>
  2045							 GO	FIOFF
  2046	032767	254 00 0 00 104122 			 RTN]			; error return
  2047	032770	037 01 0 00 000026 		PFORCE				; handle Control-O
  2048	032771	200 02 0 00 000001 		MOVE	2,1			; get AC1
  2049	032772	336 03 0 01 033025 	DHELP0:	SKIPN	3,DHELP1(1)		; get address of TMSG
  2050	032773	263 17 0 00 000000 		RTN				; all done - exit
  2051	032774	256 00 0 00 000003 		XCT	3			; print it
  2052	032775	350 00 0 00 000001 		AOS	1			; point to next address
  2053	032776	322 02 0 00 032772 		JUMPE	2,DHELP0		; loop till done
  2054	032777	263 17 0 00 000000 		RTN				; exit
  2055
  2056	033000	41 54 54 00 00 00 	.HLCMD:	SIXBIT	/ALL/			; print all help info
  2057	033001	55 51 63 43 00 00 		SIXBIT	/MISC/			; print miscellaneous commands
  2058	033002	51 56 64 62 60 64 		SIXBIT	/INTRPT/		; print interrupt commands
  2059	033003	62 45 63 45 64 00 		SIXBIT	/RESET/			; print reset commands
  2060	033004	63 64 41 62 64 00 		SIXBIT	/START/			; print start... commands
  2061	033005	43 63 62 00 00 00 		SIXBIT	/CSR/			; print CSR commands
  2062	033006	45 42 65 46 00 00 		SIXBIT	/EBUF/			; print EBUF commands
  2063	033007	54 41 62 00 00 00 		SIXBIT	/LAR/			; print LAR commands
  2064	033010	43 62 41 55 00 00 		SIXBIT	/CRAM/			; print CRAM commands
  2065	033011	22 31 20 21 00 00 		SIXBIT	/2901/			; print 2901 commands
  2066	033012	54 57 43 63 00 00 		SIXBIT	/LOCS/			; print local storage commands
  2067	033013	55 41 62 53 00 00 		SIXBIT	/MARK/			; print mark commands
  2068	033014	42 62 45 41 53 00 		SIXBIT	/BREAK/			; print breakpoint commands
  2069	033015	65 43 57 44 45 00 		SIXBIT	/UCODE/			; print microcode commands
  2070	033016	63 64 41 64 51 63 		SIXBIT	/STATIS/		; print statisitics commands
  2071	033017	43 57 56 46 51 47 		SIXBIT	/CONFIG/		; print configuration commands
  2072	033020	44 64 70 46 62 00 		SIXBIT	/DTXFR/			; print data transfer commands
  2073	033021	43 51 00 00 00 00 		SIXBIT	/CI/			; print CI related commands
  2074	033022	60 54 51 00 00 00 		SIXBIT	/PLI/			; print PLI commands
  2075	033023	63 67 51 64 43 50 		SIXBIT	/SWITCH/		; print switch commands
  2076	033024	000000	000000			0				; end of list
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 46
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0220

  2077
  2078	033025	037 00 0 00 105676 	DHELP1:	TMSGCD	<DEBUG Commands:>
  2079
  2080						TMSGD	<
  2081					HELP arg    Print help
  2082					EXIT        Exit DEBUG mode
  2083					DDT         Enter DDT
  2084					SET opt arg    Set/clear/print options
  2085					TAKE file ext  Take commands from file
  2086					NTAKE file ext Take commands from file (unechoed)
  2087					TRANSL dat  Translate CSR data
  2088					CCODE       Print condition codes
  2089					ESTACK      Examine 2910 stack contents
  2090					FILLNX dat  Fill CRAM with 'J=.+1,CTL=dat'
  2091					FILLPC dat  Fill CRAM with 'J=.,CTL=dat'
  2092					ENEXT cnt   Examine next
  2093	033026	037 00 0 00 105702 	DNEXT arg   Deposit next>
  2094
  2095						TMSGD	<
  2096					IPRINT      Print accumulated interrupt activity
  2097					ICLEAR      Clear accumulated interrupt activity
  2098	033027	037 00 0 00 106036 	IINIT       Init interrupt system>
  2099
  2100						TMSGD	<
  2101					RESET       Issue EBUS Reset
  2102	033030	037 00 0 00 106072 	CLEAR       Issue a 'Port Clear'>
  2103
  2104						TMSGD	<
  2105					START adr   Start the port microsequencer
  2106					STOP        Stop the port microsequencer
  2107					CONT        Continue the port microsequencer
  2108					SSTEP cnt   Single step the port microsequencer
  2109					STRACE cnt  Single step and trace execution
  2110					SPRINT cnt  Print single step history data
  2111					SCLEAR      Clear single step history data
  2112	033031	037 00 0 00 106110 	SSINIT      Set up ss addr/data/history>
  2113
  2114						TMSGD	<
  2115					ECSR        Examine CSR Register
  2116					DCSR dat    Deposit CSR Register
  2117	033032	037 00 0 00 106220 	ZCSR        Zero CSR Register>
  2118
  2119						TMSGD	<
  2120					EEBUF       Examine EBUF register
  2121					DEBUF dat   Deposit EBUF register
  2122	033033	037 00 0 00 106245 	ZEBUF       Zero EBUF register>
  2123
  2124						TMSGD	<
  2125					ELAR        Examine LAR register
  2126					DRAR dat    Deposit RAR register
  2127	033034	037 00 0 00 106272 	ZRAR        Zero RAR register>
  2128
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 47
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0221

  2129						TMSGD	<
  2130					DCRAM adr,adr  Deposit into CRAM
  2131					BCRAM adr,adr  Deposit into CRAM by fields
  2132					ACRAM adr,adr  Alter CRAM
  2133					ECRAM adr,adr  Examine CRAM
  2134					LCRAM adr,adr  List CRAM
  2135	033035	037 00 0 00 106317 	ZCRAM adr,adr  Zero CRAM>
  2136
  2137						TMSGD	<
  2138					E2901 reg,reg  Examine 2901 registers
  2139					D2901 reg,dat  Deposit 2901 register
  2140	033036	037 00 0 00 106365 	Z2901 reg,reg  Zero 2901 registers>
  2141
  2142						TMSGD	<
  2143					ELOCS adr,adr  Examine local storage
  2144					DLOCS adr,dat  Deposit local storage
  2145	033037	037 00 0 00 106415 	ZLOCS adr,adr  Zero local storage>
  2146
  2147						TMSGD	<
  2148					MARK adr,adr    Set mark bit
  2149					RMARK adr,adr   Remove mark bit
  2150					CMARK adr,adr   Clear all mark bits
  2151	033040	037 00 0 00 106444 	LMARK adr,adr   List mark bits>
  2152
  2153						TMSGD	<
  2154					BREAK adr,adr   Set breakpoint
  2155					RBREAK adr,adr  Remove breakpoint
  2156					CBREAK adr,adr  Clear all breakpoints
  2157	033041	037 00 0 00 106477 	LBREAK adr,adr  List breakpoints>
  2158
  2159						TMSGD	<
  2160					LOAD tst    Load microcode from Test 'tst' into CRAM
  2161					LIST tst    List microcode from Test 'tst'
  2162					FLOAD       Load microcode from file into CRAM
  2163					FVERFY      Verify microcode loaded from file
  2164					FLIST       List microcode in file
  2165	033042	037 00 0 00 106534 	FEXAM       Examine microcode in file>
  2166
  2167						TMSGD	<
  2168					STATIS    Print statistics
  2169	033043	037 00 0 00 106623 	ZSTATS    Clear statistics>
  2170
  2171						TMSGD	<
  2172					CONFIG    Determine/print configuration
  2173	033044	037 00 0 00 106637 	CONPNT    Print configuration>
  2174
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 48
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0222

  2175						TMSGD	<
  2176					CCWPNT    Print CCW list
  2177	033045	037 00 0 00 106656 	LOGPNT    Print logout data>
  2178
  2179						TMSGD	<
  2180					PINIT     Initialize PCB and queues
  2181					SIDLE     Start port/wait for IDLE loop
  2182					BPACK     Build packet
  2183					IQUEUE    Put packet on cmd queue
  2184					PQUEUE n  Print specified queue
  2185					PPCB      Print PCB
  2186					WATCH     Watch port and print events
  2187	033046	037 00 0 00 106672 	DEPPAK    Deposit into packet>
  2188
  2189						TMSGD	<
  2190					DPLI lnk,data,rep  Deposit PLI data
  2191					EPLI lnk,rep       Examine PLI data
  2192					IPLI               Initialize PILA/Link modules
  2193					
  2194					ETBUFF    Examine transmit buffers
  2195	033047	037 00 0 00 106757 	ERBUFF    Examine receive buffers>
  2196
  2197						TMSGD	<
  2198					SWITCH  Enter switch information
  2199					SWPRIN  Print current switch settings   
  2200					
  2201					(To complement switch setting, type switch name).
  2202					
  2203					NOPNT   ERSTOP  TXTINH  TRACE   LOOPGM  DSPEAR  SDEBUG  EDEBUG
  2204					PNTLPT  PALERS  OPRSEL  INHFLT  LOOPTS  UDEBUG  LDEBUG
  2205	033050	037 00 0 00 107027 	DING    RELIAB          INHMSG  RUNALL  MDEBUG  DDEBUG>
  2206	033051	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 49
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0223

  2207
  2208					;#********************************************************************
  2209					;* DSET - Set/clear/print options
  2210					;#********************************************************************
  2211
  2212					DSET:	MOVE	1,[FMSGD <
  2213					SET ADDR    LENGTH  PATH    DPORT   INTERV  WHAT
  2214					    CSR     PAT     RESPON  PORT    SUMMAR  HELP
  2215					    PARITY  PCB     FORMAT  IGNORE  PATLIS
  2216	033052	200 01 0 00 107172 	    EBUF    FNAME   XCTID   PRINT>]
  2217	033053	260 17 0 00 032761*		GO	.SARG			; get SIXBIT argument
  2218	033054	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2219						 JRST	[FMSGCD	<? Missing argument>
  2220							 GO	FIOFF
  2221	033055	254 00 0 00 104450 			 RTN]
  2222	033056	200 01 0 00 032764*		MOVE	1,ARGUM			; get sixbit command
  2223	033057	201 02 0 00 033064 		MOVEI	2,.STCMD		; get address of cmd list
  2224	033060	260 17 0 00 032766*		GO	.COMM			; handle command decoding
  2225						 JRST	[FMSGCD	<? Unrecognizable - Type ? for help>
  2226							 GO	FIOFF
  2227	033061	254 00 0 00 104122 			 RTN]			; error return
  2228	033062	260 17 1 01 033112 		GO	@.STDIS(1)		; dispatch to test
  2229	033063	263 17 0 00 000000 		RTN				; return to 'DEBUG>' prompt
  2230
  2231	033064	41 44 44 62 00 00 	.STCMD:	SIXBIT	/ADDR/			; set start address
  2232	033065	43 63 62 00 00 00 		SIXBIT	/CSR/			; set start data for CSR
  2233	033066	60 41 62 51 64 71 		SIXBIT	/PARITY/		; set/clr auto parity generation
  2234	033067	45 42 65 46 00 00 		SIXBIT	/EBUF/			; set/clr preserve EBUF
  2235	033070	54 45 56 47 64 50 		SIXBIT	/LENGTH/		; set length of text portion of packet
  2236	033071	60 41 64 00 00 00 		SIXBIT	/PAT/			; set data pattern
  2237	033072	60 43 42 00 00 00 		SIXBIT	/PCB/			; set/clr PCB CCW list in use by START
  2238	033073	46 56 41 55 45 00 		SIXBIT	/FNAME/			; set file name
  2239	033074	62 45 63 60 57 56 		SIXBIT	/RESPON/		; set/clr forced response
  2240	033075	46 57 62 55 41 64 		SIXBIT	/FORMAT/		; set format (COMPAT or HIDEN)
  2241	033076	60 41 64 50 00 00 		SIXBIT	/PATH/			; set path (Auto,0,1)
  2242	033077	44 60 57 62 64 00 		SIXBIT	/DPORT/			; set destination port number
  2243	033100	60 57 62 64 00 00 		SIXBIT	/PORT/			; set current port number
  2244	033101	70 43 64 51 44 00 		SIXBIT	/XCTID/			; set XCT-ID
  2245	033102	60 62 51 56 64 00 		SIXBIT	/PRINT/			; set text length to print
  2246	033103	51 47 56 57 62 45 		SIXBIT	/IGNORE/		; set/clr ignore SNDDG packets
  2247	033104	63 65 55 55 41 62 		SIXBIT	/SUMMAR/		; summary interval (seconds)
  2248	033105	51 56 64 45 62 66 		SIXBIT	/INTERV/		; interval (seconds)
  2249	033106	60 41 64 54 51 63 		SIXBIT	/PATLIS/		; list data patterns
  2250	033107	67 50 41 64 00 00 		SIXBIT	/WHAT/			; print options
  2251	033110	50 45 54 60 00 00 		SIXBIT	/HELP/			; set help message
  2252	033111	000 00 0 00 000000 		Z
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 50
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0224

  2253
  2254	033112	000000	033137		.STDIS:	DSETAD				; ADDR - set start address
  2255	033113	000000	033160			DSETCS				; CSR - set start CSR data
  2256	033114	000000	033175			DSETPR				; PARITY - set/clr auto par generation
  2257	033115	000000	033215			DSETEB				; EBUF - set/clr preserve EBUF flag
  2258	033116	000000	033235			DSETLN				; LENGTH - set text length
  2259	033117	000000	033255			DSETDA				; PAT - set data pattern
  2260	033120	000000	033315			DSETPC				; PCB - set/clr PCB CCW list for START
  2261	033121	000000	033335			DSETFN				; FNAME - set default ucode file name
  2262	033122	000000	033366			DSETRE				; RESPON - set/clr forced response
  2263	033123	000000	033406			DSETFO				; FORMAT - set compat/hiden format
  2264	033124	000000	033430			DSETPA				; PATH - set path (Auto,0,1)
  2265	033125	000000	033455			DSETPO				; DPORT - set destination port
  2266	033126	000000	033514			DSETCN				; PORT - set current port
  2267	033127	000000	033555			DSETXC				; XCTID - set XCT-ID
  2268	033130	000000	033607			DSETPT				; PRINT - set text length to print
  2269	033131	000000	033627			DSETIG				; IGNORE - set/clr ignore SNDDG packets
  2270	033132	000000	033647			DSETSU				; SUMMAR - summary interval (seconds)
  2271	033133	000000	033664			DSETIN				; INTERV - interval (seconds)
  2272	033134	000000	033730			DSETPL				; PATLIS - list data patterns
  2273	033135	000000	033701			DSETWH				; WHAT - print options
  2274	033136	000000	033765			DSETHE				; HELP - set help message
  2275
  2276
  2277					;#********************************************************************
  2278					;* DSETAD - Set start address for START/SSTEP/CONT commands
  2279					;#********************************************************************
  2280
  2281	033137	210 01 0 00 107205 	DSETAD:	MOVN	1,[FMSGCD (SET ADDR addr (0-7777) <CR> or SET ADDR <CR>)]
  2282	033140	260 17 0 00 031454*		GO	.OARG			; get argument
  2283	033141	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2284	033142	254 00 0 00 033152 		 JRST	DSADD1			; no argument given
  2285	033143	200 00 0 00 033056*		MOVE	ARGUM			; get argument
  2286	033144	202 00 0 00 033776 		MOVEM	DSADDR			; save it
  2287	033145	301 00 0 00 000000 		CAIL	0			; out of range?
  2288	033146	301 00 0 00 007777 		CAIL	7777
  2289						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  2290							 GO	FIOFF
  2291	033147	254 00 0 00 107217 			 RTN]
  2292	033150	202 00 0 00 033776 		MOVEM	DSADDR			; no - save it
  2293	033151	263 17 0 00 000000 		RTN				; exit
  2294
  2295	033152	037 00 0 00 030242 	DSADD1:	PCRL
  2296	033153	037 00 0 00 107222 	DSADD2:	TMSG	<Start address ............ >
  2297	033154	200 00 0 00 033776 		MOVE	DSADDR
  2298	033155	037 16 0 00 000003 		PNTOCS
  2299	033156	037 00 0 00 030242 		PCRL
  2300	033157	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 51
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0225

  2301
  2302					;#********************************************************************
  2303					;* DSETCS - Set start CSR data for START/CONT commands
  2304					;#********************************************************************
  2305
  2306	033160	210 01 0 00 107240 	DSETCS:	MOVN	1,[FMSGCD (SET CSR xxxxxx <CR> or SET CSR <CR>)]
  2307	033161	260 17 0 00 033140*		GO	.OARG			; get argument
  2308	033162	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2309	033163	254 00 0 00 033167 		 JRST	DSCSR1			; no argument given
  2310	033164	200 00 0 00 033143*		MOVE	ARGUM			; get argument
  2311	033165	202 00 0 00 033777 		MOVEM	DSDATA			; save it
  2312	033166	263 17 0 00 000000 		RTN				; exit
  2313
  2314	033167	037 00 0 00 030242 	DSCSR1:	PCRL
  2315	033170	037 00 0 00 107241 	DSCSR2:	TMSG	<Start CSR data ........... >
  2316	033171	200 00 0 00 033777 		MOVE	DSDATA
  2317	033172	037 16 0 00 000003 		PNTOCS
  2318	033173	037 00 0 00 030242 		PCRL
  2319	033174	263 17 0 00 000000 		RTN				; exit
  2320
  2321
  2322					;#********************************************************************
  2323					;* DSETPR - Set/clear automatic parity generation for load cram command
  2324					;#********************************************************************
  2325
  2326	033175	210 01 0 00 107257 	DSETPR:	MOVN	1,[FMSGCD (SET PAR NO or YES or SET PAR <CR>)]
  2327	033176	260 17 0 00 033053*		GO	.SARG			; get argument
  2328	033177	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2329	033200	254 00 0 00 033206 		 JRST	DSPAR1			; no argument given
  2330	033201	260 17 0 00 000000*		GO	DECYN			; decode argument Y or N
  2331	033202	263 17 0 00 000000 		 RTN				; error - unrecognized
  2332						JRST	[SETZM	PARFLG		; no - clear the flag
  2333	033203	254 00 0 00 107260 			 RTN]
  2334	033204	476 00 0 00 034000 		SETOM	PARFLG			; yes - set it
  2335	033205	263 17 0 00 000000 		RTN				; exit
  2336
  2337	033206	037 00 0 00 030242 	DSPAR1:	PCRL
  2338	033207	037 00 0 00 107262 	DSPAR2:	TMSG	<Auto parity generation ... >
  2339	033210	332 00 0 00 034000 		SKIPE	PARFLG			; set?
  2340	033211	037 00 0 00 107270 		TMSGD	<YES>
  2341	033212	336 00 0 00 034000 		SKIPN	PARFLG			; set?
  2342	033213	037 00 0 00 107272 		TMSGD	<NO>
  2343	033214	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 52
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0226

  2344
  2345					;#********************************************************************
  2346					;* DSETEB - Set/clear preserve EBUF for single stepping
  2347					;#********************************************************************
  2348
  2349	033215	210 01 0 00 107303 	DSETEB:	MOVN	1,[FMSGCD (SET EBUF NO or YES or SET EBUF <CR>)]
  2350	033216	260 17 0 00 033176*		GO	.SARG			; get argument
  2351	033217	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2352	033220	254 00 0 00 033226 		 JRST	DSEBU1			; no argument given
  2353	033221	260 17 0 00 033201*		GO	DECYN			; decode argument Y or N
  2354	033222	263 17 0 00 000000 		 RTN				; error - unrecognized
  2355						JRST	[SETZM	PRSFLG		; no - clear the flag
  2356	033223	254 00 0 00 107304 			 RTN]
  2357	033224	476 00 0 00 034001 		SETOM	PRSFLG			; yes - set it
  2358	033225	263 17 0 00 000000 		RTN				; exit
  2359
  2360	033226	037 00 0 00 030242 	DSEBU1:	PCRL
  2361	033227	037 00 0 00 107306 	DSEBU2:	TMSG	<EBUF preserved in sstep .. >
  2362	033230	332 00 0 00 034001 		SKIPE	PRSFLG			; set?
  2363	033231	037 00 0 00 107270 		TMSGD	<YES>
  2364	033232	336 00 0 00 034001 		SKIPN	PRSFLG			; set?
  2365	033233	037 00 0 00 107272 		TMSGD	<NO>
  2366	033234	263 17 0 00 000000 		RTN				; return
  2367
  2368
  2369					;#********************************************************************
  2370					;* DSETLN - Set length of text portion of packet
  2371					;#********************************************************************
  2372
  2373	033235	210 01 0 00 107327 	DSETLN:	MOVN	1,[FMSGCD (SET LEN length (1-1000. bytes) or SET LEN <CR>)]
  2374	033236	260 17 0 00 031704*		GO	.DARG			; get argument
  2375	033237	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2376	033240	254 00 0 00 033247 		 JRST	DSLEN1			; no argument given
  2377	033241	200 00 0 00 033164*		MOVE	ARGUM			; get argument
  2378	033242	301 00 0 00 000000 		CAIL	0			; argument in range 0-1000?
  2379	033243	303 00 0 00 001750 		CAILE	^D1000
  2380						JRST	[FMSGCD	<? Out of range 0-1000. bytes>
  2381							 GO	FIOFF
  2382	033244	254 00 0 00 107337 			 RTN]
  2383	033245	202 00 0 00 034002 		MOVEM	DSBYTE			; save it
  2384	033246	263 17 0 00 000000 		RTN				; exit
  2385
  2386	033247	037 00 0 00 030242 	DSLEN1:	PCRL
  2387	033250	037 00 0 00 107342 	DSLEN2:	TMSG	<Text length (bytes) ...... >
  2388	033251	200 00 0 00 034002 		MOVE	DSBYTE
  2389	033252	037 15 0 00 000000 		PNTDEC
  2390	033253	037 00 0 00 104543 		TMSGD	<.>
  2391	033254	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 53
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0227

  2392
  2393					;#********************************************************************
  2394					;* DSETDA - Set data pattern to insert in buffer
  2395					;#********************************************************************
  2396
  2397	033255	200 01 0 00 107365 	DSETDA:	MOVE	1,[FMSGCD (SET PAT number (1-126 octal)(126=opr sel) or SET PAT <CR>)]
  2398	033256	260 17 0 00 033161*		GO	.OARG			; get argument
  2399	033257	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2400	033260	254 00 0 00 033302 		 JRST	DSDAT1			; no argument given
  2401	033261	200 00 0 00 033241*		MOVE	ARGUM			; get argument
  2402	033262	301 00 0 00 000001 		CAIL	1			; in range?
  2403	033263	303 00 0 00 000126 		CAILE	126
  2404						JRST	[FMSGCD	<? Out of range 1-126 octal>
  2405							 GO	FIOFF
  2406	033264	254 00 0 00 107375 			 RTN]
  2407	033265	202 00 0 00 034003 		MOVEM	DSPAT			; save it
  2408	033266	302 00 0 00 000126 		CAIE	126			; operator selected pattern?
  2409	033267	254 00 0 00 033276 		JRST	DSDATX			; no - exit
  2410	033270	200 01 0 00 107406 		MOVE	1,[FMSGCD <SET PAT 126,data (CR)>]
  2411	033271	260 17 0 00 033256*		GO	.OARG			; get argument
  2412	033272	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2413						 JRST	[FMSGCD	<? Missing argument>
  2414							 GO	FIOFF
  2415	033273	254 00 0 00 104450 			 RTN]
  2416	033274	200 00 0 00 033261*		MOVE	ARGUM			; get argument
  2417	033275	202 00 0 00 034004 		MOVEM	DSTPAT			; save it
  2418	033276	260 17 0 00 000000*	DSDATX:	GO	LASARG			; check for last argument
  2419	033277	263 17 0 00 000000 		RTN				; exit
  2420	033300	037 01 0 00 107400 		FMSGCD	<SET PAT 126,data (CR)>
  2421	033301	263 17 0 00 000000 		RTN				; exit
  2422
  2423	033302	037 00 0 00 030242 	DSDAT1:	PCRL
  2424	033303	037 00 0 00 107407 	DSDAT2:	TMSG	<Data pattern (#) ......... >
  2425	033304	200 01 0 00 034003 		MOVE	1,DSPAT			; get pattern
  2426	033305	256 00 0 01 000000*		XCT	PATPNT(1)		;  ...
  2427	033306	302 01 0 00 000126 		CAIE	1,126			; operator selected pattern?
  2428	033307	254 00 0 00 033313 		JRST	DSDAT3			; no - continue
  2429	033310	037 00 0 00 107415 		TMSG	< - >			; yes - print it out
  2430	033311	200 00 0 00 034004 		MOVE	DSTPAT
  2431	033312	037 13 0 00 000000 		PNTHW
  2432	033313	037 00 0 00 030242 	DSDAT3:	PCRL
  2433	033314	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 54
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0228

  2434
  2435					;#********************************************************************
  2436					;* DSETPC - Set/clear PCB CCW list made up for START command
  2437					;#********************************************************************
  2438
  2439	033315	210 01 0 00 107426 	DSETPC:	MOVN	1,[FMSGCD (SET PCB NO or YES or SET PCB <CR>)]
  2440	033316	260 17 0 00 033216*		GO	.SARG			; get argument
  2441	033317	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2442	033320	254 00 0 00 033326 		 JRST	DSPCB1			; no argument given
  2443	033321	260 17 0 00 033221*		GO	DECYN			; decode argument Y or N
  2444	033322	263 17 0 00 000000 		 RTN				; error - unrecognized
  2445						JRST	[SETZM	PCBFLG		; no - clear the flag
  2446	033323	254 00 0 00 107427 			 RTN]
  2447	033324	476 00 0 00 034005 		SETOM	PCBFLG			; yes - set it
  2448	033325	263 17 0 00 000000 		RTN				; exit
  2449
  2450	033326	037 00 0 00 030242 	DSPCB1:	PCRL
  2451	033327	037 00 0 00 107431 	DSPCB2:	TMSG	<Setup PCB CCW on START cmd >
  2452	033330	332 00 0 00 034005 		SKIPE	PCBFLG			; set?
  2453	033331	037 00 0 00 107270 		TMSGD	<YES>
  2454	033332	336 00 0 00 034005 		SKIPN	PCBFLG			; set?
  2455	033333	037 00 0 00 107272 		TMSGD	<NO>
  2456	033334	263 17 0 00 000000 		RTN				; return
  2457
  2458					;#********************************************************************
  2459					;* DSETFN - Set default microcode file name
  2460					;#********************************************************************
  2461
  2462	033335	200 01 0 00 107451 	DSETFN:	MOVE	1,[FMSGCD (SET FNAME file ext <CR> or SET FNAME <CR>)]
  2463	033336	260 17 0 00 033316*		GO	.SARG			; get argument (file name)
  2464	033337	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2465	033340	254 00 0 00 033355 		 JRST	DSFNM1			; no argument - print it out
  2466	033341	200 00 0 00 033274*		MOVE	ARGUM			; get argument
  2467	033342	202 00 0 00 121004'		MOVEM	TMP1#			; save it
  2468	033343	210 01 0 00 107451 		MOVN	1,[FMSGCD (SET FNAME file ext <CR> or SET FNAME <CR>)]
  2469	033344	260 17 0 00 033336*		GO	.SARG			; get argument (extension)
  2470	033345	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2471	033346	254 00 0 00 033351 		 JRST	DSFNM0			; no extension given - exit
  2472	033347	200 00 0 00 033341*		MOVE	ARGUM			; get 2nd argument
  2473	033350	202 00 0 00 044226 		MOVEM	FNAME+1			; save it
  2474	033351	200 00 0 00 121004'	DSFNM0:	MOVE	TMP1			; get first argument
  2475	033352	202 00 0 00 044225 		MOVEM	FNAME			; save it
  2476	033353	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  2477	033354	263 17 0 00 000000 		RTN				; return
  2478
  2479	033355	037 00 0 00 030242 	DSFNM1:	PCRL
  2480	033356	037 00 0 00 107452 	DSFNM2:	TMSG	<Microcode file name ...... >
  2481	033357	200 00 0 00 044225 		MOVE	FNAME			; get name
  2482	033360	037 00 0 00 000002 		PNTSIX				; print it
  2483	033361	037 00 0 00 107460 		TMSG	<.>
  2484	033362	200 00 0 00 044226 		MOVE	FNAME+1			; get extension
  2485	033363	037 00 0 00 000002 		PNTSIX				; print it
  2486	033364	037 00 0 00 030242 		PCRL
  2487	033365	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 55
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0229

  2488
  2489					;#********************************************************************
  2490					;* DSETRE - Set/clr forced response
  2491					;#********************************************************************
  2492
  2493	033366	210 01 0 00 107472 	DSETRE:	MOVN	1,[FMSGCD (SET RESPON NO or YES or SET RESPON <CR>)]
  2494	033367	260 17 0 00 033344*		GO	.SARG			; get argument
  2495	033370	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2496	033371	254 00 0 00 033377 		 JRST	DSRES1			; no argument given
  2497	033372	260 17 0 00 033321*		GO	DECYN			; decode argument Y or N
  2498	033373	263 17 0 00 000000 		 RTN				; error - unrecognized
  2499						JRST	[SETZM	RSPFLG		; no - clear the flag
  2500	033374	254 00 0 00 107473 			 RTN]
  2501	033375	476 00 0 00 034006 		SETOM	RSPFLG			; yes - set it
  2502	033376	263 17 0 00 000000 		RTN				; exit
  2503
  2504	033377	037 00 0 00 030242 	DSRES1:	PCRL
  2505	033400	037 00 0 00 107475 	DSRES2:	TMSG	<Request Packet Response .. >
  2506	033401	332 00 0 00 034006 		SKIPE	RSPFLG			; set?
  2507	033402	037 00 0 00 107270 		TMSGD	<YES>
  2508	033403	336 00 0 00 034006 		SKIPN	RSPFLG			; set?
  2509	033404	037 00 0 00 107272 		TMSGD	<NO>
  2510	033405	263 17 0 00 000000 		RTN				; return
  2511
  2512
  2513					;#********************************************************************
  2514					;* DSETFO - Set format (COMPAT,HIDEN)
  2515					;#********************************************************************
  2516
  2517	033406	210 01 0 00 107515 	DSETFO:	MOVN	1,[FMSGCD (SET FORMAT COMPAT or HIDEN or SET FORMAT <CR>)]
  2518	033407	260 17 0 00 033367*		GO	.SARG			; get argument
  2519	033410	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2520	033411	254 00 0 00 033420 		 JRST	DSFOR1			; no argument given
  2521	033412	200 01 0 00 033347*		MOVE	1,ARGUM			; get command into AC1
  2522	033413	201 02 0 00 033425 		MOVEI	2,DSFORL		; get address of cmd list
  2523	033414	260 17 0 00 033060*		GO	.COMM			; handle command decoding
  2524						 JRST	[FMSGCD	<? Unrecognized argument>
  2525	033415	254 00 0 00 107524 			 RTN]
  2526	033416	202 01 0 00 034007 		MOVEM	1,FORSEL		; save value
  2527	033417	263 17 0 00 000000 		RTN				; return
  2528
  2529	033420	037 00 0 00 030242 	DSFOR1:	PCRL
  2530	033421	037 00 0 00 107526 	DSFOR2:	TMSG	<Datagram Format .......... >
  2531	033422	200 01 0 00 034007 		MOVE	1,FORSEL		; get path select value
  2532						XCT	[TMSGD	<COMPAT>	; print it
  2533	033423	256 00 0 01 107540 			 TMSGD	<HIDEN>](1)
  2534	033424	263 17 0 00 000000 		RTN				; return
  2535
  2536	033425	43 57 55 60 41 64 	DSFORL:	SIXBIT	/COMPAT/
  2537	033426	50 51 44 45 56 00 		SIXBIT	/HIDEN/
  2538	033427	000 00 0 00 000000 		Z
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 56
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0230

  2539
  2540					;#********************************************************************
  2541					;* DSETPA - Set path (Auto,A,B)
  2542					;#********************************************************************
  2543
  2544	033430	210 01 0 00 107553 	DSETPA:	MOVN	1,[FMSGCD (SET PATH AUTO or A or B or SET PATH <CR>)]
  2545	033431	260 17 0 00 033407*		GO	.SARG			; get argument
  2546	033432	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2547	033433	254 00 0 00 033444 		 JRST	DSPTH1			; no argument given
  2548	033434	200 01 0 00 033412*		MOVE	1,ARGUM			; get command into AC1
  2549	033435	201 02 0 00 033451 		MOVEI	2,DSPTHL		; get address of cmd list
  2550	033436	260 17 0 00 033414*		GO	.COMM			; handle command decoding
  2551						 JRST	[FMSGCD	<? Unrecognized argument>
  2552	033437	254 00 0 00 107524 			 RTN]
  2553	033440	202 01 0 00 034010 		MOVEM	1,PATSEL		; save value
  2554	033441	201 01 0 00 000002 		MOVEI	1,2			; invert from 2-0 to 0-2
  2555	033442	276 01 0 00 034010 		SUBM	1,PATSEL		;   and save it
  2556	033443	263 17 0 00 000000 		RTN				; return
  2557
  2558	033444	037 00 0 00 030242 	DSPTH1:	PCRL
  2559	033445	037 00 0 00 107554 	DSPTH2:	TMSG	<Path Select .............. >
  2560	033446	200 01 0 00 034010 		MOVE	1,PATSEL		; get path select value
  2561						XCT	[TMSGD	<AUTO>		; print it
  2562							 TMSGD	<A>
  2563	033447	256 00 0 01 107566 			 TMSGD	<B>](1)
  2564	033450	263 17 0 00 000000 		RTN				; return
  2565
  2566	033451	42 00 00 00 00 00 	DSPTHL:	SIXBIT	/B/
  2567	033452	41 00 00 00 00 00 		SIXBIT	/A/
  2568	033453	41 65 64 57 00 00 		SIXBIT	/AUTO/
  2569	033454	000 00 0 00 000000 		Z
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 57
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0231

  2570
  2571					;#********************************************************************
  2572					;* DSETPO - Set destination port number
  2573					;#********************************************************************
  2574
  2575	033455	210 01 0 00 107604 	DSETPO:	MOVN	1,[FMSGCD <SET DPORT n or SET DPORT SELF or SET DPORT (CR)>]
  2576	033456	260 17 0 00 033431*		GO	.SARG			; get argument
  2577	033457	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2578	033460	254 00 0 00 033506 		 JRST	DSPOR1			; no argument given
  2579	033461	200 01 0 00 033434*		MOVE	1,ARGUM			; get argument
  2580	033462	260 17 0 00 031070*		GO	CONVSX			; convert to octal if possible
  2581	033463	254 00 0 00 033471 		JRST	DSPOR0			; failed - check if typed SELF
  2582	033464	301 01 0 00 000000 		CAIL	1,0			; argument in range 0-377?
  2583	033465	303 01 0 00 000377 		CAILE	1,377
  2584						JRST	[FMSGCD	<? Out of range 0-377>
  2585							 GO	FIOFF
  2586	033466	254 00 0 00 107612 			 RTN]
  2587	033467	202 01 0 00 034011 		MOVEM	1,DPORT			; save it
  2588	033470	263 17 0 00 000000 		RTN				; exit
  2589
  2590					; Check for typed SELF
  2591
  2592	033471	200 00 0 00 033461*	DSPOR0:	MOVE	ARGUM			; get argument
  2593	033472	312 00 0 00 107615 		CAME	[SIXBIT	/SELF/]		; match?
  2594	033473	316 00 0 00 107616 		CAMN	[SIXBIT	/SEL/]		; match?
  2595	033474	254 00 0 00 033503 		JRST	DSPOR3			; yes - continue
  2596	033475	312 00 0 00 107617 		CAME	[SIXBIT	/SE/]		; match?
  2597	033476	316 00 0 00 107620 		CAMN	[SIXBIT	/S/]		; match?
  2598	033477	254 00 0 00 033503 		JRST	DSPOR3			; yes - continue
  2599	033500	037 00 0 00 107621 		TMSGCD	<? Unrecognized input>	; no - error - print out such
  2600	033501	260 17 0 00 032024*		GO	FIOFF			;   then shut off file input
  2601	033502	263 17 0 00 000000 		RTN				;   and exit
  2602	033503	260 17 0 00 065076 	DSPOR3:	GO	RDNODE			; read node address
  2603						GO	[TMSGCD	<? Could not read our node address>
  2604							 GO	FIOFF
  2605	033504	260 17 0 00 107636 			 RTN]
  2606	033505	202 01 0 00 034011 		MOVEM	1,DPORT			; save it
  2607
  2608	033506	037 00 0 00 030242 	DSPOR1:	PCRL
  2609	033507	037 00 0 00 107641 	DSPOR2:	TMSG	<Destination port number .. >
  2610	033510	200 00 0 00 034011 		MOVE	DPORT
  2611	033511	037 16 0 00 000003 		PNTOCS
  2612	033512	037 00 0 00 030242 		PCRL
  2613	033513	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 58
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0232

  2614
  2615					;#********************************************************************
  2616					;* DSETCN - Set current port number
  2617					;#********************************************************************
  2618
  2619	033514	210 01 0 00 107661 	DSETCN:	MOVN	1,[FMSGCD <SET PORT n or SET PORT SELF or SET PORT (CR)>]
  2620	033515	260 17 0 00 033456*		GO	.SARG			; get argument
  2621	033516	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2622	033517	254 00 0 00 033547 		 JRST	DSCPO1			; no argument given
  2623	033520	200 01 0 00 033471*		MOVE	1,ARGUM			; get argument
  2624	033521	260 17 0 00 033462*		GO	CONVSX			; convert to octal if possible
  2625	033522	254 00 0 00 033531 		JRST	DSCPO0			; failed - check if typed SELF
  2626	033523	301 01 0 00 000000 		CAIL	1,0			; argument in range 0-377?
  2627	033524	303 01 0 00 000377 		CAILE	1,377
  2628						JRST	[FMSGCD	<? Out of range 0-377>
  2629							 GO	FIOFF
  2630	033525	254 00 0 00 107612 			 RTN]
  2631	033526	202 01 0 00 034013 		MOVEM	1,CPORT			; save it
  2632	033527	202 01 0 00 034012 		MOVEM	1,SPORT			; save it
  2633	033530	263 17 0 00 000000 		RTN				; exit
  2634
  2635					; Check for typed SELF
  2636
  2637	033531	200 00 0 00 033520*	DSCPO0:	MOVE	ARGUM			; get argument
  2638	033532	312 00 0 00 107615 		CAME	[SIXBIT	/SELF/]		; match?
  2639	033533	316 00 0 00 107616 		CAMN	[SIXBIT	/SEL/]		; match?
  2640	033534	254 00 0 00 033543 		JRST	DSCPO3			; yes - continue
  2641	033535	312 00 0 00 107617 		CAME	[SIXBIT	/SE/]		; match?
  2642	033536	316 00 0 00 107620 		CAMN	[SIXBIT	/S/]		; match?
  2643	033537	254 00 0 00 033543 		JRST	DSCPO3			; yes - continue
  2644	033540	037 00 0 00 107621 		TMSGCD	<? Unrecognized input>	; no - error - print out such
  2645	033541	260 17 0 00 033501*		GO	FIOFF			;   then shut off file input
  2646	033542	263 17 0 00 000000 		RTN				;   and exit
  2647	033543	260 17 0 00 065076 	DSCPO3:	GO	RDNODE			; read node address
  2648						GO	[TMSGCD	<? Could not read our node address>
  2649							 GO	FIOFF
  2650	033544	260 17 0 00 107636 			 RTN]
  2651	033545	202 01 0 00 034012 		MOVEM	1,SPORT			; save it
  2652	033546	202 01 0 00 034013 		MOVEM	1,CPORT
  2653
  2654	033547	037 00 0 00 030242 	DSCPO1:	PCRL
  2655	033550	037 00 0 00 107662 	DSCPO2:	TMSG	<Current port number ...... >
  2656	033551	200 00 0 00 034013 		MOVE	CPORT
  2657	033552	037 16 0 00 000003 		PNTOCS
  2658	033553	037 00 0 00 030242 		PCRL
  2659	033554	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 59
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0233

  2660
  2661					;#********************************************************************
  2662					;* DSETXC - Set XCT-ID
  2663					;#********************************************************************
  2664
  2665	033555	200 01 0 00 107674 	DSETXC:	MOVE	1,[FMSGCD (SET XCTID n,n or SET XCTID <CR>)]
  2666	033556	260 17 0 00 033271*		GO	.OARG			; get argument
  2667	033557	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2668	033560	254 00 0 00 033574 		 JRST	DSXCT1			; no argument given
  2669	033561	200 00 0 00 033531*		MOVE	ARGUM			; get argument
  2670	033562	242 00 0 00 000004 		LSH	4			; position properly
  2671	033563	202 00 0 00 034014 		MOVEM	DXCTID			; save it
  2672	033564	210 01 0 00 107674 		MOVN	1,[FMSGCD (SET XCTID n,n or SET XCTID <CR>)]
  2673	033565	260 17 0 00 033556*		GO	.OARG			; get argument
  2674	033566	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2675						 JRST	[FMSGCD	<? Missing 2nd argument>
  2676							 GO	FIOFF
  2677	033567	254 00 0 00 107703 			 RTN]
  2678	033570	200 00 0 00 033561*		MOVE	ARGUM			; get argument
  2679	033571	242 00 0 00 000004 		LSH	4			; position properly
  2680	033572	202 00 0 00 034015 		MOVEM	DXCTID+1		; save it
  2681	033573	263 17 0 00 000000 		RTN				; exit
  2682
  2683	033574	037 00 0 00 030242 	DSXCT1:	PCRL
  2684	033575	037 00 0 00 107706 	DSXCT2:	TMSG	<XCT-ID ................... >
  2685	033576	200 00 0 00 034014 		MOVE	DXCTID
  2686	033577	242 00 0 00 777774 		LSH	-4
  2687	033600	037 16 0 00 000003 		PNTOCS
  2688	033601	037 00 0 00 000040 		PSP
  2689	033602	200 00 0 00 034015 		MOVE	DXCTID+1
  2690	033603	242 00 0 00 777774 		LSH	-4
  2691	033604	037 16 0 00 000003 		PNTOCS
  2692	033605	037 00 0 00 030242 		PCRL
  2693	033606	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 60
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0234

  2694
  2695					;#********************************************************************
  2696					;* DSETPT - Set length of text portion to print
  2697					;#********************************************************************
  2698
  2699	033607	210 01 0 00 107726 	DSETPT:	MOVN	1,[FMSGCD (SET PRINT nwords (1-250.) or SET PRINT <CR>)]
  2700	033610	260 17 0 00 033236*		GO	.DARG			; get argument
  2701	033611	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2702	033612	254 00 0 00 033621 		 JRST	DSPNT1			; no argument given
  2703	033613	200 00 0 00 033570*		MOVE	ARGUM			; get argument
  2704	033614	303 00 0 00 000000 		CAILE	0			; argument in range 1-1000?
  2705	033615	303 00 0 00 000372 		CAILE	^D250
  2706						JRST	[FMSGCD	<? Out of range 1-250. words>
  2707							 GO	FIOFF
  2708	033616	254 00 0 00 107736 			 RTN]
  2709	033617	202 00 0 00 034016 		MOVEM	DSPRIN			; save it
  2710	033620	263 17 0 00 000000 		RTN				; exit
  2711
  2712	033621	037 00 0 00 030242 	DSPNT1:	PCRL
  2713	033622	037 00 0 00 107741 	DSPNT2:	TMSG	<Text to print (words) .... >
  2714	033623	200 00 0 00 034016 		MOVE	DSPRIN
  2715	033624	037 15 0 00 000000 		PNTDEC
  2716	033625	037 00 0 00 104543 		TMSGD	<.>
  2717	033626	263 17 0 00 000000 		RTN				; exit
  2718
  2719
  2720					;#********************************************************************
  2721					;* DSETIG - Set/clr ignore other port SNDDG packets
  2722					;#********************************************************************
  2723
  2724	033627	210 01 0 00 107760 	DSETIG:	MOVN	1,[FMSGCD (SET IGNORE NO or YES or SET IGNORE <CR>)]
  2725	033630	260 17 0 00 033515*		GO	.SARG			; get argument
  2726	033631	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2727	033632	254 00 0 00 033640 		 JRST	DSIGN1			; no argument given
  2728	033633	260 17 0 00 033372*		GO	DECYN			; decode argument Y or N
  2729	033634	263 17 0 00 000000 		 RTN				; error - unrecognized
  2730						JRST	[SETZM	IGNFLG		; no - clear the flag
  2731	033635	254 00 0 00 107761 			 RTN]
  2732	033636	476 00 0 00 034017 		SETOM	IGNFLG			; yes - set it
  2733	033637	263 17 0 00 000000 		RTN				; exit
  2734
  2735	033640	037 00 0 00 030242 	DSIGN1:	PCRL
  2736	033641	037 00 0 00 107763 	DSIGN2:	TMSG	<Ignore other SNDDG packets >
  2737	033642	332 00 0 00 034017 		SKIPE	IGNFLG			; set?
  2738	033643	037 00 0 00 107270 		TMSGD	<YES>
  2739	033644	336 00 0 00 034017 		SKIPN	IGNFLG			; set?
  2740	033645	037 00 0 00 107272 		TMSGD	<NO>
  2741	033646	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 61
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0235

  2742
  2743					;#********************************************************************
  2744					;* DSETSU - Set summary interval (seconds)
  2745					;#********************************************************************
  2746
  2747	033647	210 01 0 00 110002 	DSETSU:	MOVN	1,[FMSGCD (SET SUMMAR seconds or SET SUMMAR <CR>)]
  2748	033650	260 17 0 00 033610*		GO	.DARG			; get argument
  2749	033651	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2750	033652	254 00 0 00 033656 		 JRST	DSSUM1			; no argument given
  2751	033653	200 00 0 00 033613*		MOVE	ARGUM			; get argument
  2752	033654	202 00 0 00 034020 		MOVEM	DSSUM			; save it
  2753	033655	263 17 0 00 000000 		RTN				; exit
  2754
  2755	033656	037 00 0 00 030242 	DSSUM1:	PCRL
  2756	033657	037 00 0 00 110003 	DSSUM2:	TMSG	<Summary interval (seconds) >
  2757	033660	200 00 0 00 034020 		MOVE	DSSUM
  2758	033661	037 15 0 00 000000 		PNTDEC
  2759	033662	037 00 0 00 104543 		TMSGD	<.>
  2760	033663	263 17 0 00 000000 		RTN				; exit
  2761
  2762
  2763					;#********************************************************************
  2764					;* DSETIN - Set interval (seconds)
  2765					;#********************************************************************
  2766
  2767	033664	210 01 0 00 110023 	DSETIN:	MOVN	1,[FMSGCD (SET INTERV milliseconds or SET INTERV <CR>)]
  2768	033665	260 17 0 00 033650*		GO	.DARG			; get argument
  2769	033666	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2770	033667	254 00 0 00 033673 		 JRST	DSINT1			; no argument given
  2771	033670	200 00 0 00 033653*		MOVE	ARGUM			; get argument
  2772	033671	202 00 0 00 034021 		MOVEM	DSINT			; save it
  2773	033672	263 17 0 00 000000 		RTN				; exit
  2774
  2775	033673	037 00 0 00 030242 	DSINT1:	PCRL
  2776	033674	037 00 0 00 110024 	DSINT2:	TMSG	<Interval (milliseconds) .. >
  2777	033675	200 00 0 00 034021 		MOVE	DSINT
  2778	033676	037 15 0 00 000000 		PNTDEC
  2779	033677	037 00 0 00 104543 		TMSGD	<.>
  2780	033700	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 62
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0236

  2781
  2782					;#********************************************************************
  2783					;* DSETWH - Print all selected options
  2784					;#********************************************************************
  2785
  2786	033701	260 17 0 00 033276*	DSETWH:	GO	LASARG			; check for last argument
  2787	033702	263 17 0 00 000000 		RTN				; error - exit
  2788						JRST	[FMSGCD	(SET WHAT <CR>)	; ? typed - print msg and
  2789	033703	254 00 0 00 110036 			 RTN]			;   return
  2790	033704	037 00 0 00 110040 		TMSGCD	<Options:>
  2791	033705	260 17 0 00 033152 		GO	DSADD1			; print address
  2792	033706	260 17 0 00 033170 		GO	DSCSR2			; print CSR data
  2793	033707	260 17 0 00 033207 		GO	DSPAR2			; print parity flag
  2794	033710	260 17 0 00 033227 		GO	DSEBU2			; print EBUF flag
  2795	033711	260 17 0 00 033250 		GO	DSLEN2			; print length
  2796	033712	260 17 0 00 033303 		GO	DSDAT2			; print data pattern
  2797	033713	260 17 0 00 033327 		GO	DSPCB2			; print PCB flag
  2798	033714	260 17 0 00 033356 		GO	DSFNM2			; print file name selected
  2799	033715	260 17 0 00 033400 		GO	DSRES2			; print response flag
  2800	033716	260 17 0 00 033421 		GO	DSFOR2			; print format select
  2801	033717	260 17 0 00 033445 		GO	DSPTH2			; print path select
  2802	033720	260 17 0 00 033507 		GO	DSPOR2			; print destination port
  2803	033721	260 17 0 00 033550 		GO	DSCPO2			; print current port
  2804	033722	260 17 0 00 033575 		GO	DSXCT2			; print XCT-ID
  2805	033723	260 17 0 00 033622 		GO	DSPNT2			; print length to print
  2806	033724	260 17 0 00 033641 		GO	DSIGN2			; print ignore flag
  2807	033725	260 17 0 00 033657 		GO	DSSUM2			; print summary interval
  2808	033726	260 17 0 00 033674 		GO	DSINT2			; print interval
  2809	033727	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 63
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0237

  2810
  2811					;#********************************************************************
  2812					;* DSETPL - List data patterns
  2813					;#********************************************************************
  2814
  2815	033730	200 01 0 00 110054 	DSETPL:	MOVE	1,[FMSGCD <SET PATLIS num1,num2 or SET PATLIS (CR)>]
  2816	033731	260 17 0 00 033565*		GO	.OARG			; get argument
  2817	033732	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2818						 JRST	[MOVE	PAT,DSPAT	; no argument - just print
  2819							 MOVEM	PAT,PAT1#	;   current selection
  2820							 MOVEM	PAT,PAT2#
  2821	033733	254 00 0 00 110055 			 JRST	DSETPP]
  2822	033734	200 00 0 00 033670*		MOVE	ARGUM			; get argument
  2823	033735	202 00 0 00 120756'		MOVEM	PAT1#			; save it
  2824
  2825	033736	200 01 0 00 110054 		MOVE	1,[FMSGCD <SET PATLIS num1,num2 or SET PATLIS (CR)>]
  2826	033737	260 17 0 00 033731*		GO	.OARG			; get argument
  2827	033740	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2828						 JRST	[MOVE	PAT,PAT1	; no 2nd argument - just print
  2829							 MOVEM	PAT,PAT2	;   one translation
  2830	033741	254 00 0 00 110061 			 JRST	DSETPP]
  2831	033742	200 00 0 00 033734*		MOVE	ARGUM			; get argument
  2832	033743	202 00 0 00 120757'		MOVEM	PAT2			; save it
  2833	033744	200 01 0 00 120757'		MOVE	1,PAT2			; get argument
  2834	033745	274 01 0 00 120756'		SUB	1,PAT1			; see if range ok
  2835						JUMPL	1,[FMSGCD <? Range nonsensical>
  2836							 GO	FIOFF
  2837	033746	321 01 0 00 110071 			 RTN]
  2838
  2839	033747	200 14 0 00 120756'	DSETPP:	MOVE	PAT,PAT1		; get pattern
  2840	033750	301 14 0 00 000001 		CAIL	PAT,1			; in range?
  2841	033751	303 14 0 00 000126 		CAILE	PAT,126
  2842						JRST	[FMSGCD	<? Out of range 1-126 octal>
  2843							 GO	FIOFF
  2844	033752	254 00 0 00 107375 			 RTN]
  2845	033753	037 00 0 00 030242 		PCRL
  2846	033754	256 00 0 14 033305*		XCT	PATPNT(PAT)		; print it
  2847	033755	350 00 0 00 000014 		AOS	PAT			; increment pattern number
  2848	033756	037 07 0 00 000003 		TTALTM				; altmode typed?
  2849	033757	334 00 0 00 000000 		SKIPA				; no - continue
  2850	033760	254 00 0 00 033763 		JRST	DSETPX			; yes - return
  2851	033761	317 14 0 00 120757'		CAMG	PAT,PAT2		; done yet?
  2852	033762	254 00 0 00 033750 		JRST	DSETPP+1		; no - loop till done
  2853	033763	037 00 0 00 030243 	DSETPX:	PCRL2				; final CRLF
  2854	033764	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 64
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0238

  2855
  2856					;#********************************************************************
  2857					;* DSETHE - Set help message
  2858					;#********************************************************************
  2859
  2860	033765	200 01 0 00 110100 	DSETHE:	MOVE	1,[FMSGCD (SET HELP <CR>)]
  2861	033766	260 17 0 00 032342*		GO	CHKARG			; check for argument
  2862	033767	263 17 0 00 000000 		RTN				; error - exit
  2863	033770	037 01 0 00 000026 		PFORCE				; handle Control-O
  2864	033771	037 00 1 00 033773 		PNTMSG	@DSETHL			; print text
  2865	033772	263 17 0 00 000000 		RTN				; ask for a test
  2866
  2867	033773				DSETHL:	[ASCII	^
  2868					SET Command:   (* Arg - YES or NO)
  2869
  2870					SET ADDR adr    - set start address
  2871					SET CSR data    - set start CSR data
  2872					SET PARITY arg* - set/clr auto par generation
  2873					SET EBUF arg*   - set/clr preserve EBUF flag
  2874					SET LENGTH len  - set datagram length in bytes
  2875					SET PAT n       - set data pattern
  2876	033773	000000	110101		SET PCB arg*    - set/clear PCB CCW list for START   ^]
  2877						[ASCII	^
  2878					SET FNAME name ext - set default ucode file name
  2879					SET RESPON arg* - set/clr forced packet response
  2880					SET FORMAT arg  - set compat/hiden format of datagrams
  2881					SET PATH        - set path select
  2882					SET PORT        - set our port #
  2883					SET DPORT       - set destination port #
  2884					SET XCTID       - set XCT-ID
  2885	033774	000000	110206		SET PRINT       - set length of text to print ^]
  2886						[ASCIZ	^
  2887					SET IGNORE arg* - set/clr ignore SNDDG packets flag
  2888					SET SUMMAR      - set summary interval (seconds)
  2889					SET INTERV      - set interval (seconds)
  2890					SET PATLIS arg  - list data patterns
  2891					SET WHAT        - print options
  2892					SET HELP        - print this
  2893	033775	000000	110313		^]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 65
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0239

  2894
  2895					;#********************************************************************
  2896					;* Program Flags
  2897					;#********************************************************************
  2898
  2899	033776	000000	000000		DSADDR:	0				; start address initially zero
  2900	033777	000000	000000		DSDATA:	0				; start data initially zero
  2901
  2902	034000	777777	777777		PARFLG:	-1				; 'automatic parity generation' flag
  2903	034001	777777	777777		PRSFLG:	-1				; 'preserve EBUF' flag
  2904
  2905	034002	000000	000040		DSBYTE:	40				; text length
  2906
  2907	034003	000000	000001		DSPAT:	1				; data pattern
  2908	034004	000000	000000		DSTPAT:	0				; operator select pattern
  2909
  2910	034005	000000	000000		PCBFLG:	0				; don't auto generate CCW list
  2911
  2912	034006	000000	000000		RSPFLG:	0				; generate response flag
  2913	034007	000000	000000		FORSEL:	0				; format select
  2914	034010	000000	000000		PATSEL:	0				; path select
  2915
  2916	034011	000000	000000		DPORT:	0				; destination port number
  2917	034012	777777	777777		SPORT:	-1				; current port number (as set)
  2918	034013	777777	777777		CPORT:	-1				; current port number (actual)
  2919
  2920	034014	000000	000012		DXCTID:	12				; XCT-ID
  2921	034015	000000	000034			34
  2922
  2923	034016	000000	000003		DSPRIN:	3				; default length to print
  2924
  2925	034017	777777	777777		IGNFLG:	-1				; default to ignore
  2926
  2927	034020	000000	000036		DSSUM:	^D30				; default to 30 seconds
  2928	034021	000000	000000		DSINT:	0				; default to 0 milliseconds
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 66
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0240

  2929
  2930					;#*********************************************************************
  2931					;* DECSR - Examine CSR register
  2932					;#*********************************************************************
  2933
  2934	034022	200 01 0 00 110400 	DECSR:	MOVE	1,[FMSGCD (ECSR <CR>)]
  2935	034023	260 17 0 00 033766*		GO	CHKARG			; check for argument
  2936	034024	263 17 0 00 000000 		RTN				; error - exit
  2937	034025	260 17 0 00 030713*		GO	RDCSR			; read the CSR register
  2938	034026	037 00 0 00 110401 		 TMSGC	<[Rdcsr failed]>	; error return
  2939	034027	260 17 0 00 042443 		GO	CSRPNT			; print CSR data
  2940	034030	037 00 0 00 030242 		PCRL				; end of line
  2941	034031	263 17 0 00 000000 		RTN				; return
  2942
  2943
  2944					;#*********************************************************************
  2945					;* DDCSR - Deposit CSR register
  2946					;#*********************************************************************
  2947
  2948	034032	210 01 0 00 110412 	DDCSR:	MOVN	1,[FMSGCD (DCSR xxxxxx <CR>)]
  2949	034033	260 17 0 00 033737*		GO	.OARG			; get argument
  2950	034034	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  2951						 JRST	[FMSGCD	<? Missing argument>
  2952							 GO	FIOFF
  2953	034035	254 00 0 00 104450 			 RTN]
  2954	034036	200 01 0 00 033742*		MOVE	1,ARGUM			; get argument
  2955	034037	260 17 0 00 000000*		GO	LDCSR			; write it
  2956	034040	263 17 0 00 000000 		RTN				; return
  2957
  2958
  2959					;#*********************************************************************
  2960					;* DZCSR - Zero CSR register
  2961					;#*********************************************************************
  2962
  2963	034041	200 01 0 00 110416 	DZCSR:	MOVE	1,[FMSGCD (ZCSR <CR>)]
  2964	034042	260 17 0 00 034023*		GO	CHKARG			; check for argument
  2965	034043	263 17 0 00 000000 		RTN				; error - exit
  2966	034044	400 01 0 00 000000 		SETZ	1,			; clear data
  2967	034045	260 17 0 00 034037*		GO	LDCSR			; write it
  2968	034046	263 17 0 00 000000 		RTN				; return
  2969
  2970
  2971					;#********************************************************************
  2972					;* DRESET - Issue an EBUS Reset
  2973					;#********************************************************************
  2974
  2975	034047	200 01 0 00 110422 	DRESET:	MOVE	1,[FMSGCD (RESET <CR>)]
  2976	034050	260 17 0 00 034042*		GO	CHKARG			; check for argument
  2977	034051	263 17 0 00 000000 		RTN				; error - exit
  2978	034052	260 17 0 00 000000*		GO	ERESET
  2979	034053	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 67
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0241

  2980
  2981					;#********************************************************************
  2982					;* DCLEAR - Issue a 'Port Clear'
  2983					;#********************************************************************
  2984
  2985	034054	200 01 0 00 110426 	DCLEAR:	MOVE	1,[FMSGCD (CLEAR <CR>)]
  2986	034055	260 17 0 00 034050*		GO	CHKARG			; check for argument
  2987	034056	263 17 0 00 000000 		RTN				; error - exit
  2988	034057	260 17 0 00 000000*		GO	IPACLR			; do a 'port clear'
  2989	034060	263 17 0 00 000000 		RTN				; return
  2990
  2991
  2992					;#********************************************************************
  2993					;* DSINIT - Set up start addr/data/history prior to single step command
  2994					;#********************************************************************
  2995
  2996	034061	200 01 0 00 110433 	DSINIT:	MOVE	1,[FMSGCD (SSINIT <CR>)]
  2997	034062	260 17 0 00 034055*		GO	CHKARG			; check for argument
  2998	034063	263 17 0 00 000000 		RTN				; error - exit
  2999	034064	200 00 0 00 033776 		MOVE	DSADDR			; get start address
  3000	034065	202 00 0 00 000000*		MOVEM	SNEXT			; save it for IPASST
  3001	034066	200 00 0 00 033777 		MOVE	DSDATA			; get start CSR data
  3002	034067	202 00 0 00 000000*		MOVEM	SDATA			; save it for IPASST
  3003	034070	260 17 0 00 033152 		GO	DSADD1			; print start address
  3004	034071	260 17 0 00 033170 		GO	DSCSR2			; print start data
  3005	034072	260 17 0 00 034237 		GO	DSSCLR			; clear sstep history
  3006	034073	263 17 0 00 000000 		RTN
  3007
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 68
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0242

  3008
  3009					;#********************************************************************
  3010					;* DSTART - Start the port
  3011					;
  3012					; Arguments set up:
  3013					;
  3014					; DSADDR - Current start address which has been specified by either a
  3015					;	   'SETADD' command, or as an argument to the 'START' command.
  3016					; DSDATA - Current start CSR data specified by a 'SETCSR' command.
  3017					; PCBFLG - Set up 3-Word CCW list automatically flag
  3018					;
  3019					; Arguments set up for IPASST:  SNEXT - Contents of DSADDR is used.
  3020					;				SLAST - Contents of DSADDR is used.
  3021					;				SDATA - Contents of DSDATA is used.
  3022					;#********************************************************************
  3023
  3024	034074	210 01 0 00 110443 	DSTART:	MOVN	1,[FMSGCD (START addr <CR> or START <CR>)]
  3025	034075	260 17 0 00 034033*		GO	.OARG			; get start address
  3026	034076	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3027	034077	334 01 0 00 033776 		 SKIPA	1,DSADDR		; no argument given
  3028
  3029					; Check for PCB handling generation
  3030
  3031	034100	332 00 0 00 034005 		SKIPE	PCBFLG			; PCB flag set?
  3032	034101	260 17 0 00 000000*		GO	CHINIT			; yes - initialize software
  3033
  3034					; Start it up
  3035
  3036	034102	260 17 0 00 000000*	DSTAR0:	GO	ISTOP			; stop the port
  3037	034103	200 01 0 00 034036*		MOVE	1,ARGUM			; get argument
  3038	034104	202 01 0 00 034065*		MOVEM	1,SNEXT			; set it up
  3039	034105	202 00 0 00 000000*		MOVEM	SLAST			; set it up
  3040	034106	200 00 0 00 033777 		MOVE	DSDATA			; get start data
  3041	034107	202 00 0 00 034067*		MOVEM	SDATA			; set it up
  3042	034110	260 17 0 00 000000*		GO	IPASRT			; start it up
  3043						 JRST	[FMSGCD	<? Error accessing CSR register>
  3044							 GO	FIOFF
  3045	034111	254 00 0 00 110453 			 RTN]
  3046						 JRST	[FMSGCD	<? Port not stopped>
  3047							 GO	FIOFF
  3048	034112	254 00 0 00 110463 			 RTN]
  3049	034113	334 00 0 00 000000 		 SKIPA				; error - Error bits set in CSR
  3050	034114	263 17 0 00 000000 		RTN				; exit
  3051	034115	037 01 0 00 110466 		FMSGCD	<? START failed - Error bits set in CSR>
  3052	034116	260 17 0 00 034025*		GO	RDCSR			; read CSR register
  3053	034117	255 00 0 00 000000 		JFCL				; ignore error
  3054	034120	260 17 0 00 042443 		GO	CSRPNT			; print CSR register
  3055	034121	037 00 0 00 030242 		PCRL				; end of line
  3056	034122	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 69
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0243

  3057
  3058					;#********************************************************************
  3059					;* DSTOP - Stop the port
  3060					;
  3061					; Arguments set by IPASTP:
  3062					;
  3063					; SNEXT - Set to stopping address.
  3064					; SDATA - Set to contents of CSR register.
  3065					;#********************************************************************
  3066
  3067	034123	200 01 0 00 110502 	DSTOP:	MOVE	1,[FMSGCD (STOP <CR>)]
  3068	034124	260 17 0 00 034062*		GO	CHKARG			; check for argument
  3069	034125	263 17 0 00 000000 		RTN				; error - exit
  3070	034126	260 17 0 00 000000*		GO	IPASTP			; stop it and get final address
  3071						 JRST	[FMSGCD	<? Error accessing CSR register>
  3072							 GO	FIOFF
  3073	034127	254 00 0 00 110453 			 RTN]
  3074						 JRST	[FMSGCD	<? Port not running>
  3075							 GO	FIOFF
  3076	034130	254 00 0 00 110510 			 RTN]
  3077	034131	254 00 0 00 034136 		 JRST	DSTOP1			; error - Error bits set in CSR
  3078	034132	037 00 0 00 110513 		TMSGC	<Port stopped.  Last Adr = >
  3079	034133	200 00 0 00 034104*		MOVE	SNEXT			; print it out
  3080	034134	037 04 0 00 000000 		PNT4
  3081	034135	334 00 0 00 000000 		SKIPA
  3082	034136	037 01 0 00 110521 	DSTOP1:	FMSGCD	<? Stop failed - Error bits set in CSR>
  3083	034137	200 01 0 00 034107*		MOVE	1,SDATA			; get CSR data
  3084	034140	260 17 0 00 042443 		GO	CSRPNT			; print CSR register
  3085	034141	037 00 0 00 030242 		PCRL				; end of line
  3086	034142	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 70
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0244

  3087
  3088					;#********************************************************************
  3089					;* DSSTEP - Single step the port
  3090					;* DTRACE - Single step the port and trace progress
  3091					;
  3092					; Arguments set up for IPASST:
  3093					;
  3094					; SNEXT - This is the address last set up by another single step
  3095					;	  command or by a SETSTR (set up start data) command.
  3096					;	  After each single step the LAR is read.  The contents
  3097					;	  of the LAR are put in SNEXT.
  3098					;
  3099					; SLAST - This is the address last executed.  SNEXT is put in this
  3100					;	  location before each single step
  3101					;
  3102					; SDATA - This is the data last set up by another single step
  3103					;	  command or by a SETSTR (set up start data) command.
  3104					;
  3105					; Both of these routines store single step data in a ring buffer which
  3106					; can be examined with a SPRINT command.  This is useful in debugging
  3107					; a microcode routine and instead of single stepping and tracing, you
  3108					; single step 500 times or until an error occurs, then examine last x
  3109					; locations to see what happened.
  3110					;#********************************************************************
  3111
  3112	034143	210 01 0 00 110543 	DTRACE:	MOVN	1,[FMSGCD (STRACE RepeatCount <CR> or STRACE <CR>)]
  3113	034144	476 00 0 00 120724'		SETOM	DTRFLG			; set trace flag
  3114	034145	254 00 0 00 034150 		JRST	DTRAC0			; continue
  3115
  3116	034146	402 00 0 00 120724'	DSSTEP:	SETZM	DTRFLG#			; clear trace flag
  3117	034147	210 01 0 00 110555 		MOVN	1,[FMSGCD (SSTEP RepeatCount <CR> or SSTEP <CR>)]
  3118
  3119	034150	402 00 0 00 034103*	DTRAC0:	SETZM	ARGUM			; set default argument
  3120	034151	350 00 0 00 034150*		AOS	ARGUM			;   to 1 single step
  3121	034152	260 17 0 00 033665*		GO	.DARG			; get argument
  3122	034153	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3123	034154	255 00 0 00 000000 		 JFCL				; no argument given
  3124	034155	260 17 0 00 034102*		GO	ISTOP			; stop the port
  3125	034156	200 02 0 00 034151*		MOVE	2,ARGUM			; get argument
  3126	034157	400 04 0 00 000000 		SETZ	4,			; clear count of single steps
  3127	034160	332 00 0 00 120724'		SKIPE	DTRFLG			; trace flag set?
  3128	034161	037 00 0 00 110556 		TMSGCD	< RAR   LAR   CSR (final)  SS#>
  3129
  3130					; Single step
  3131
  3132	034162	350 00 0 00 000004 	DSST0:	AOS	4			; increment count
  3133	034163	200 01 0 00 034001 		MOVE	1,PRSFLG		; get preserve EBUF flag
  3134	034164	200 00 0 00 034137*		MOVE	SDATA			; get initial CSR data
  3135	034165	202 00 0 00 121000'		MOVEM	SLDATA#			; save initial CSR data
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 71
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0245

  3136	034166	260 17 0 00 000000*		GO	IPASST			; single step once
  3137						 JRST	[FMSGCD	<? Error accessing CSR register>
  3138							 GO	FIOFF
  3139	034167	254 00 0 00 110453 			 RTN]
  3140						 JRST	[FMSGCD	<? Port not stopped>
  3141							 GO	FIOFF
  3142	034170	254 00 0 00 110463 			 RTN]
  3143						 JRST	[GO	SAVHST
  3144							 TMSGC	<[Error bits set in CSR]> 
  3145							 SKIPE	DTRFLG
  3146							 JRST	DSSTX
  3147							 TMSGC	<[>
  3148							 MOVE	4
  3149							 PNTOCS
  3150							 TMSGD	< ssteps done]>
  3151	034171	254 00 0 00 110600 			 JRST	DSSTX]
  3152	034172	260 17 0 00 035466 		GO	SAVHST			; save data for sstep history
  3153
  3154					; If tracing is being done
  3155
  3156	034173	200 01 0 00 034246 		MOVE	1,SSLOC			; get history location
  3157	034174	332 00 0 00 120724'		SKIPE	DTRFLG			; tracing being done?
  3158	034175	260 17 0 00 035447 		GO	PNTHST			; yes - print it
  3159
  3160					; Altmode and exit checking
  3161
  3162	034176	037 07 0 00 000003 	DSST1:	TTALTM				; altmode key struck?
  3163	034177	334 00 0 00 000000 		SKIPA				; no - proceed
  3164						JRST	[PCRL			; yes - print some final
  3165							 SKIPE	DTRFLG		;    data and exit
  3166							 RTN
  3167							 TMSG	<[>
  3168							 MOVE	4
  3169							 PNTOCS
  3170							 TMSGD	< ssteps done]>
  3171	034200	254 00 0 00 110612 			 JRST	DSSTX]
  3172	034201	367 02 0 00 034162 		SOJG	2,DSST0			; loop till done
  3173
  3174					; Exit
  3175
  3176	034202	037 00 0 00 110622 	DSSTX:	TMSGC	<LAR Last/>		; print LAR data
  3177	034203	200 00 0 00 034105*		MOVE	SLAST			; get last address
  3178	034204	037 04 0 00 000000 		PNT4				; print it
  3179	034205	037 00 0 00 110625 		TMSG	<  Next/>
  3180	034206	200 00 0 00 034133*		MOVE	SNEXT			; get next address
  3181	034207	037 04 0 00 000000 		PNT4				; print it
  3182	034210	037 00 0 00 110627 		TMSG	<  CSR/>		; print CSR data
  3183	034211	200 00 0 00 034164*		MOVE	SDATA			; get it
  3184	034212	037 13 0 00 000000 		PNTHW				; print it
  3185	034213	037 00 0 00 030242 		PCRL				; end of line
  3186	034214	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 72
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0246

  3187
  3188					;#********************************************************************
  3189					;* DSSPNT - Print single step history
  3190					;#********************************************************************
  3191
  3192	034215	201 00 0 00 000024 	DSSPNT:	MOVEI	^D20			; set default number of ssteps
  3193	034216	202 00 0 00 034156*		MOVEM	ARGUM			;   to print to 20
  3194	034217	210 01 0 00 110641 		MOVN	1,[FMSGCD (SPRINT EntryCount or SPRINT <CR>)]
  3195	034220	260 17 0 00 034152*		GO	.DARG			; get argument
  3196	034221	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3197	034222	255 00 0 00 000000 		 JFCL				; no argument given
  3198	034223	200 03 0 00 034216*		MOVE	3,ARGUM			; get argument
  3199	034224	200 01 0 00 034246 		MOVE	1,SSLOC			; get current location
  3200	034225	037 00 0 00 110556 		TMSGCD	< RAR   LAR   CSR (final)  SS#>
  3201	034226	260 17 0 00 035447 	DSSPN0:	GO	PNTHST			; print an item
  3202	034227	037 07 0 00 000003 		TTALTM				; altmode typed?
  3203	034230	334 00 0 00 000000 		SKIPA				; no - continue
  3204	034231	263 17 0 00 000000 		RTN				; yes - exit
  3205	034232	375 00 0 00 000001 		SOSGE	1			; decrement pointer - at start of list?
  3206	034233	201 01 0 00 000177 		MOVEI	1,177			; yes - point to end now
  3207	034234	333 00 0 01 034247 		SKIPLE	SSNUM(1)		; valid entry?
  3208	034235	367 03 0 00 034226 		SOJG	3,DSSPN0		; yes - loop till done
  3209	034236	263 17 0 00 000000 		RTN				; no - return
  3210
  3211
  3212					;#********************************************************************
  3213					;* DSSCLR - Clear single step history data
  3214					;#********************************************************************
  3215
  3216	034237	200 01 0 00 110646 	DSSCLR:	MOVE	1,[FMSGCD (SCLEAR <CR>)]
  3217	034240	260 17 0 00 034124*		GO	CHKARG			; check for argument
  3218	034241	263 17 0 00 000000 		RTN				; error - exit
  3219	034242	402 00 0 00 034246 		SETZM	SSLOC			; clear first word
  3220	034243	200 00 0 00 110647 		MOVE	[SSLOC,,SSLOC+1]	; build BLT pointer
  3221	034244	251 00 0 00 035446 		BLT	SSCSRN+177		; clear it
  3222	034245	263 17 0 00 000000 		RTN				; return
  3223
  3224					; Ring buffer and miscellaneous data
  3225
  3226	034246	000000	000000		SSLOC:	0				; pointer to single step entry
  3227	034247				SSNUM:	BLOCK	200			; latest single step number
  3228	034447				SSADRL:	BLOCK	200			; initial address
  3229	034647				SSADRN:	BLOCK	200			; final address
  3230	035047				SSCSRL:	BLOCK	200			; initial CSR
  3231	035247				SSCSRN:	BLOCK	200			; final CSR
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 73
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0247

  3232
  3233					;#********************************************************************
  3234					;* PNTHST - Print a single step history entry
  3235					;
  3236					; Argument:	AC1 - location to print (offset into tables)
  3237					;#********************************************************************
  3238
  3239	035447	261 17 0 00 000000 	PNTHST:	PUT	0			; save AC0
  3240	035450	200 00 0 01 034447 		MOVE	SSADRL(1)		; print LAR (last) contents
  3241	035451	037 04 0 00 000000 		PNT4
  3242	035452	037 00 0 00 103540 		TMSG	< >
  3243	035453	200 00 0 01 034647 		MOVE	SSADRN(1)		; print LAR (next) contents
  3244	035454	037 04 0 00 000000 		PNT4
  3245	035455	037 00 0 00 103540 		TMSG	< >
  3246	035456	200 00 0 01 035247 		MOVE	SSCSRN(1)		; get CSR (final) data
  3247	035457	037 13 0 00 000000 		PNTHW				; print it
  3248	035460	037 00 0 00 103540 		TMSG	< >
  3249	035461	200 00 0 01 034247 		MOVE	SSNUM(1)		; get sstep number
  3250	035462	037 16 0 00 000003 		PNTOCS				; print it
  3251	035463	037 00 0 00 030242 		PCRL
  3252	035464	262 17 0 00 000000 		GET	0			; restore AC0
  3253	035465	263 17 0 00 000000 		RTN				; return
  3254
  3255
  3256					;#********************************************************************
  3257					;* SAVHST - Save single step history data
  3258					;#********************************************************************
  3259
  3260	035466	261 17 0 00 000000 	SAVHST:	RPUT	(0,1,2)			; save AC's
  3261
  3262	035471	200 02 0 00 034246 		MOVE	2,SSLOC			; get last offset
  3263	035472	200 02 0 02 034247 		MOVE	2,SSNUM(2)		; get last number
  3264	035473	350 01 0 00 034246 		AOS	1,SSLOC			; get/increment offset
  3265	035474	301 01 0 00 000200 		CAIL	1,200			; overflow ring buffer yet?
  3266	035475	403 01 0 00 034246 		SETZB	1,SSLOC			; yes - reinitialize pointer
  3267	035476	350 00 0 00 000002 		AOS	2			; increment ss number
  3268	035477	202 02 0 01 034247 		MOVEM	2,SSNUM(1)		; save it
  3269	035500	200 00 0 00 034203*		MOVE	SLAST			; get initial address
  3270	035501	202 00 0 01 034447 		MOVEM	SSADRL(1)		; save it
  3271	035502	200 00 0 00 034206*		MOVE	SNEXT			; get final address
  3272	035503	202 00 0 01 034647 		MOVEM	SSADRN(1)		; save it
  3273	035504	200 00 0 00 121000'		MOVE	SLDATA			; get initial CSR data
  3274	035505	202 00 0 01 035047 		MOVEM	SSCSRL(1)		; save it
  3275	035506	200 00 0 00 034211*		MOVE	SDATA			; get final CSR data
  3276	035507	202 00 0 01 035247 		MOVEM	SSCSRN(1)		; save it
  3277	035510	262 17 0 00 000002 		RGET	(2,1,0)			; restore AC's
  3278
  3279	035513	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 74
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0248

  3280
  3281					;#********************************************************************
  3282					;* DCONT - Continue the port
  3283					;
  3284					; Arguments set up for IPASRT:
  3285					;
  3286					; SNEXT - Points to next address, from IPASTP or IPASST
  3287					; SDATA - Defaults to current contents of SDATA last set up by IPASTP.
  3288					;#********************************************************************
  3289
  3290	035514	200 01 0 00 110653 	DCONT:	MOVE	1,[FMSGCD (CONT <CR>)]
  3291	035515	260 17 0 00 034240*		GO	CHKARG			; check for argument
  3292	035516	263 17 0 00 000000 		RTN				; error - exit
  3293	035517	260 17 0 00 034110*		GO	IPASRT			; start it up
  3294						 JRST	[FMSGCD	<? Error accessing CSR register>
  3295							 GO	FIOFF
  3296	035520	254 00 0 00 110453 			 RTN]
  3297						 JRST	[FMSGCD	<? Port not stopped>
  3298							 GO	FIOFF
  3299	035521	254 00 0 00 110463 			 RTN]
  3300	035522	334 00 0 00 000000 		 SKIPA				; error - Error bits set in CSR
  3301	035523	263 17 0 00 000000 		RTN				; exit
  3302	035524	037 01 0 00 110654 		FMSGCD	<? CONT failed - Error bits set in CSR>
  3303	035525	200 01 0 00 035506*		MOVE	1,SDATA			; get CSR data
  3304	035526	260 17 0 00 042443 		GO	CSRPNT			; print CSR register
  3305	035527	037 01 0 00 030242 		PCRLF				; end of line
  3306	035530	263 17 0 00 000000 		RTN				; continue
  3307
  3308					;#********************************************************************
  3309					;* DEEBUF - Examine EBUF register
  3310					;#********************************************************************
  3311
  3312	035531	200 01 0 00 110670 	DEEBUF:	MOVE	1,[FMSGCD (EEBUF <CR>)]
  3313	035532	260 17 0 00 035515*		GO	CHKARG			; check for argument
  3314	035533	263 17 0 00 000000 		RTN				; error - exit
  3315	035534	260 17 0 00 034155*	DEBEBU:	GO	ISTOP			; stop the port
  3316	035535	260 17 0 00 000000*		GO	SETEBU			; ensure 'Test EBUF' bit is set
  3317						 JRST	[FMSGCD	<? Error accessing CSR register>
  3318							 GO	FIOFF
  3319	035536	254 00 0 00 110453 			 RTN]
  3320
  3321					; Now read the data
  3322
  3323	035537	260 17 0 00 000000*		GO	RDEBUF			; read EBUF
  3324	035540	037 00 0 00 110671 		TMSGC	<EBUF/ >		; print out the data
  3325	035541	200 00 0 00 000001 		MOVE	1
  3326	035542	037 13 0 00 000000 		PNTHW
  3327	035543	037 00 0 00 030242 		PCRL
  3328	035544	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 75
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0249

  3329
  3330					;#********************************************************************
  3331					;* DDEBUF - Deposit EBUF register
  3332					;* DZEBUF - Zero EBUF register
  3333					;#********************************************************************
  3334
  3335	035545	200 01 0 00 110676 	DZEBUF:	MOVE	1,[FMSGCD (ZEBUF <CR>)]
  3336	035546	260 17 0 00 035532*		GO	CHKARG			; check for argument
  3337	035547	263 17 0 00 000000 		RTN				; error - exit
  3338	035550	402 00 0 00 034223*		SETZM	ARGUM			; clear data
  3339	035551	254 00 0 00 035556 		JRST	DDEBU1			; continue
  3340
  3341	035552	210 01 0 00 110705 	DDEBUF:	MOVN	1,[FMSGCD (DEBUF xxxxxxxxxxxx <CR>)]
  3342	035553	260 17 0 00 034075*		GO	.OARG			; get argument
  3343	035554	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3344						 JRST	[FMSGCD	<? Missing argument>
  3345							 GO	FIOFF
  3346	035555	254 00 0 00 104450 			 RTN]
  3347	035556	260 17 0 00 035534*	DDEBU1:	GO	ISTOP			; stop the port
  3348	035557	260 17 0 00 035535*		GO	SETEBU			; ensure 'Test EBUF' bit is set
  3349						 JRST	[FMSGCD	<? Error accessing CSR register>
  3350							 GO	FIOFF
  3351	035560	254 00 0 00 110453 			 RTN]
  3352	035561	200 01 0 00 035550*		MOVE	1,ARGUM			; get argument
  3353	035562	260 17 0 00 000000*		GO	LDEBUF			; write it
  3354	035563	263 17 0 00 000000 		RTN				; continue
  3355
  3356
  3357					;#********************************************************************
  3358					;* DELAR - Examine LAR register
  3359					;#********************************************************************
  3360
  3361	035564	200 01 0 00 110711 	DELAR:	MOVE	1,[FMSGCD (ELAR <CR>)]
  3362	035565	260 17 0 00 035546*		GO	CHKARG			; check for argument
  3363	035566	263 17 0 00 000000 		RTN				; error - exit
  3364	035567	260 17 0 00 035556*	DEBLAR:	GO	ISTOP			; stop the port
  3365	035570	201 01 0 00 040000 		MOVEI	1,SELLAR		; get 'DIAG Sel LAR' bit
  3366	035571	260 17 0 00 034045*		GO	LDCSR			; write to CSR register
  3367	035572	260 17 0 00 000000*		GO	RDLAR			; read LAR
  3368	035573	037 00 0 00 110712 		TMSGC	<LAR: >			; print out the data
  3369	035574	200 00 0 00 000001 		MOVE	1
  3370	035575	037 16 0 00 000003 		PNTOCS
  3371	035576	037 00 0 00 110714 		TMSG	< (Adr: >
  3372	035577	242 01 0 00 777777 		LSH	1,-1			; don't print out RAR bit
  3373	035600	200 00 0 00 000001 		MOVE	1
  3374	035601	037 16 0 00 000003 		PNTOCS
  3375	035602	037 00 0 00 107660 		TMSGD	<)>
  3376	035603	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 76
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0250

  3377
  3378					;#********************************************************************
  3379					;* DDRAR - Deposit RAR register
  3380					;#********************************************************************
  3381
  3382	035604	210 01 0 00 110722 	DDRAR:	MOVN	1,[FMSGCD (DRAR addr <CR>)]
  3383	035605	260 17 0 00 035553*		GO	.OARG			; get test number
  3384	035606	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3385						 JRST	[FMSGCD	<? Missing argument>
  3386							 GO	FIOFF
  3387	035607	254 00 0 00 104450 			 RTN]
  3388	035610	260 17 0 00 035567*		GO	ISTOP			; stop the port
  3389	035611	400 01 0 00 000000 		SETZ	1,			; ensure we can write the RAR
  3390	035612	260 17 0 00 035571*		GO	LDCSR			;   by clearing CSR register
  3391	035613	200 01 0 00 035561*		MOVE	1,ARGUM			; get argument
  3392	035614	260 17 0 00 000000*		GO	LDRAR			; write it
  3393	035615	263 17 0 00 000000 		RTN				; continue
  3394
  3395
  3396					;#********************************************************************
  3397					;* DZRAR - Zero RAR register
  3398					;#********************************************************************
  3399
  3400	035616	200 01 0 00 110726 	DZRAR:	MOVE	1,[FMSGCD (ZRAR <CR>)]
  3401	035617	260 17 0 00 035565*		GO	CHKARG			; check for argument
  3402	035620	263 17 0 00 000000 		RTN				; error - exit
  3403	035621	260 17 0 00 035610*		GO	ISTOP			; stop the port
  3404	035622	400 01 0 00 000000 		SETZ	1,			; clear data
  3405	035623	260 17 0 00 035612*		GO	LDCSR			; clear CSR first
  3406	035624	260 17 0 00 035614*		GO	LDRAR			; write it
  3407	035625	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 77
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0251

  3408
  3409					;#*********************************************************************
  3410					;* DECRAM - Examine CRAM locations specified by "PARG1" and "PARG2".
  3411					;#*********************************************************************
  3412
  3413	035626	201 00 0 00 000000 	DECRAM:	MOVEI	0			; set the 'EDZL' flag
  3414	035627	202 00 0 00 120723'		MOVEM	DFLAG#			;   to 0 (Examine)
  3415	035630	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
  3416
  3417					;#*********************************************************************
  3418					;* DDCRAM - Change CRAM locations.
  3419					;#*********************************************************************
  3420
  3421	035631	201 00 0 00 000001 	DDCRAM:	MOVEI	1			; set the 'EDZL' flag
  3422	035632	202 00 0 00 120723'		MOVEM	DFLAG			;   to 1 (Deposit)
  3423	035633	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
  3424
  3425					;#*********************************************************************
  3426					;* DBCRAM - Change CRAM locations by field
  3427					;#*********************************************************************
  3428
  3429	035634	201 00 0 00 000002 	DBCRAM:	MOVEI	2			; set the 'EDZL' flag
  3430	035635	202 00 0 00 120723'		MOVEM	DFLAG			;   to 1 (Deposit)
  3431	035636	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
  3432
  3433					;#*********************************************************************
  3434					;* DACRAM - Alter CRAM locations.
  3435					;#*********************************************************************
  3436
  3437	035637	201 00 0 00 000003 	DACRAM:	MOVEI	3			; set the 'EDZL' flag
  3438	035640	202 00 0 00 120723'		MOVEM	DFLAG			;   to 1 (Deposit)
  3439	035641	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
  3440
  3441					;#*********************************************************************
  3442					;* DZCRAM -- Zero CRAM addresses specified.
  3443					;#*********************************************************************
  3444
  3445	035642	201 00 0 00 000004 	DZCRAM:	MOVEI	4			; set the 'EDZL' flag
  3446	035643	202 00 0 00 120723'		MOVEM	DFLAG			;   to 2 (Zero)
  3447	035644	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
  3448
  3449					;#*********************************************************************
  3450					;* DLCRAM -- List CRAM addresses specified.
  3451					;#*********************************************************************
  3452
  3453	035645	201 00 0 00 000005 	DLCRAM:	MOVEI	5			; set the 'EDZL' flag
  3454	035646	202 00 0 00 120723'		MOVEM	DFLAG			;   to 3 (List)
  3455	035647	254 00 0 00 035650 		JRST	DCOMGO			; process arguments
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 78
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0252

  3456
  3457					; Start to process the arguments typed - both should be CRAM
  3458					; addresses in octal.
  3459
  3460	035650	200 00 0 00 035716 	DCOMGO:	MOVE	RTO			; set up default range of CRAM locs
  3461	035651	202 00 0 00 035712 		MOVEM	CRAMTO			;   to be whatever typed before or
  3462	035652	200 00 0 00 035717 		MOVE	RFROM			;   if nothing typed, then 0-0
  3463	035653	202 00 0 00 035711 		MOVEM	CRAMFR
  3464
  3465					; Get first address
  3466
  3467	035654	200 01 0 00 110734 		MOVE	1,[FMSGCD <xCRAM addr,addr (CR)>]
  3468	035655	260 17 0 00 035605*		GO	.OARG			; get first address
  3469	035656	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3470	035657	254 00 0 00 035671 		 JRST	DCOM0			; no arguments given - continue
  3471	035660	200 00 0 00 035613*		MOVE	ARGUM			; get argument
  3472	035661	202 00 0 00 035711 		MOVEM	CRAMFR			; save in 'from' location
  3473	035662	202 00 0 00 035712 		MOVEM	CRAMTO			; save in 'to' location
  3474
  3475					; Get 2nd address
  3476
  3477	035663	210 01 0 00 110734 		MOVN	1,[FMSGCD <xCRAM addr,addr (CR)>]
  3478	035664	260 17 0 00 035655*		GO	.OARG			; get first address
  3479	035665	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3480	035666	254 00 0 00 035671 		 JRST	DCOM0			; no arguments given - continue
  3481	035667	200 00 0 00 035660*		MOVE	ARGUM			; get argument
  3482	035670	202 00 0 00 035712 		MOVEM	CRAMTO			; save in 'to' location
  3483
  3484					; Now range check the arguments
  3485
  3486	035671	331 01 0 00 035711 	DCOM0:	SKIPL	1,CRAMFR		; 1st argument in range?
  3487	035672	303 01 0 00 007777 		CAILE	1,7777		
  3488						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  3489							 SETOM	ALTF
  3490							 GO	FIOFF
  3491	035673	254 00 0 00 110735 			 RTN]
  3492	035674	331 01 0 00 035712 		SKIPL	1,CRAMTO		; 2nd argument in range?
  3493	035675	303 01 0 00 007777 		CAILE	1,7777		
  3494						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  3495							 GO	FIOFF
  3496	035676	254 00 0 00 107217 			 RTN]
  3497	035677	274 01 0 00 035711 		SUB	1,CRAMFR		; see if range ok
  3498						JUMPL	1,[FMSGCD <? Range nonsensical>
  3499							   GO	FIOFF
  3500	035700	321 01 0 00 110071 			   RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 79
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0253

  3501
  3502					;#*********************************************************************
  3503					; Process the command - examine, deposit, or zero
  3504					;#*********************************************************************
  3505
  3506					; Save default arguments
  3507
  3508	035701	200 00 0 00 035711 		MOVE	CRAMFR			; set up the new default range
  3509	035702	202 00 0 00 035717 		MOVEM	RFROM			;   selected, for later EXAM, 
  3510	035703	200 00 0 00 035712 		MOVE	CRAMTO			;   DEPOS, or ZEROs
  3511	035704	202 00 0 00 035716 		MOVEM	RTO
  3512
  3513					; Then ensure the port is stopped
  3514
  3515	035705	260 17 0 00 035621*		GO	ISTOP			; stop the port
  3516
  3517					; Now do it
  3518
  3519	035706	476 00 0 00 120721'	DCOM1:	SETOM	DC1ST#			; init 'first location' flag
  3520	035707	200 01 0 00 120723'		MOVE	1,DFLAG			; get type of command
  3521						JRST	@[DCOMEX		; dispatch to proper routine
  3522							  DCOMDE
  3523							  DCOMDB
  3524							  DCOMAL
  3525							  DCOMZE
  3526	035710	254 00 1 01 110741 			  DCOMLI](1)
  3527
  3528					; Default CRAM locations, CRAM data, and Misc
  3529
  3530	035711	000000	000000		CRAMFR:	0				; range is from CRAMFR to
  3531	035712	000000	000000		CRAMTO:	0				;   CRAMTO
  3532	035713	000000	000000		CADDR:	0				; current address
  3533
  3534	035714	000000	000000		CWORDL:	0				; left 30 bits
  3535	035715	000000	000000		CWORDR:	0				; right 30 bits
  3536
  3537	035716	000000	000000		RTO:	0				; start address (default)
  3538	035717	000000	000000		RFROM:	0				; end address (default)
  3539
  3540	035720	000000	000000		ANEXT:	0				; next address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 80
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0254

  3541
  3542					;#*********************************************************************
  3543					; Deposit into CRAM locations.
  3544					;#*********************************************************************
  3545
  3546					DCOMDE:	MOVEI	[SETZM	ALTF		; set up altmode transfer address
  3547							 GO	FIOFF		;   to exit this command
  3548	035721	201 00 0 00 103552 			 RTN]
  3549	035722	202 00 0 00 030063 		MOVEM	ALTMGO
  3550	035723	335 00 0 00 120721'		SKIPGE	DC1ST			; first location?
  3551	035724	037 01 0 00 110747 		FMSGC	<Type xxxx,xxxx,xxxx,xxxx,xxxx>
  3552	035725	402 00 0 00 120721'		SETZM	DC1ST			; clear 'first location' flag
  3553	035726	037 01 0 00 030242 		PCRLF
  3554	035727	476 00 0 00 035714 		SETOM	CWORDL			; initialize left 30 bits
  3555	035730	476 00 0 00 035715 		SETOM	CWORDR			; initialize right 30 bits
  3556	035731	200 00 0 00 035711 		MOVE	CRAMFR			; get the address to modify
  3557	035732	202 00 0 00 035713 		MOVEM	CADDR			; save address for writing
  3558	035733	037 04 0 00 000001 		PNT4F				; print it
  3559	035734	037 01 0 00 110756 		FMSG	<::   >
  3560	035735	403 04 0 00 000005 		SETZB	4,5			; clear data input locations
  3561	035736	476 00 0 00 032420*		SETOM	ARGFLG			; ensure that an argument is expected
  3562	035737	200 01 0 00 110767 		MOVE	1,[FMSGCD <xxxx,xxxx,xxxx,xxxx,xxxx (CR)>]
  3563	035740	260 17 0 00 035664*		GO	.OARG			; get first address
  3564	035741	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3565						 JRST	[FMSGCD	<? Missing arguments>
  3566							 GO	FIOFF
  3567	035742	254 00 0 00 110775 			 RTN]
  3568	035743	200 00 0 00 035667*		MOVE	ARGUM			; get argument
  3569	035744	137 00 0 00 111000 		DPB	[POINT 12,4,11]		; save it
  3570	035745	200 01 0 00 110767 		MOVE	1,[FMSGCD <xxxx,xxxx,xxxx,xxxx,xxxx (CR)>]
  3571	035746	260 17 0 00 035740*		GO	.OARG			; get first address
  3572	035747	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3573						 JRST	[FMSGCD	<? Missing arguments>
  3574							 GO	FIOFF
  3575	035750	254 00 0 00 110775 			 RTN]
  3576	035751	200 00 0 00 035743*		MOVE	ARGUM			; get argument
  3577	035752	137 00 0 00 111001 		DPB	[POINT 12,4,23]		; save it
  3578	035753	200 01 0 00 110767 		MOVE	1,[FMSGCD <xxxx,xxxx,xxxx,xxxx,xxxx (CR)>]
  3579	035754	260 17 0 00 035746*		GO	.OARG			; get first address
  3580	035755	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3581						 JRST	[FMSGCD	<? Missing arguments>
  3582							 GO	FIOFF
  3583	035756	254 00 0 00 110775 			 RTN]
  3584	035757	200 00 0 00 035751*		MOVE	ARGUM			; get argument
  3585	035760	137 00 0 00 111002 		DPB	[POINT 12,4,35]		; save it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 81
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0255

  3586	035761	200 01 0 00 110767 		MOVE	1,[FMSGCD <xxxx,xxxx,xxxx,xxxx,xxxx (CR)>]
  3587	035762	260 17 0 00 035754*		GO	.OARG			; get first address
  3588	035763	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3589						 JRST	[FMSGCD	<? Missing arguments>
  3590							 GO	FIOFF
  3591	035764	254 00 0 00 110775 			 RTN]
  3592	035765	200 00 0 00 035757*		MOVE	ARGUM			; get argument
  3593	035766	137 00 0 00 111003 		DPB	[POINT 12,5,11]		; save it
  3594	035767	210 01 0 00 110767 		MOVN	1,[FMSGCD <xxxx,xxxx,xxxx,xxxx,xxxx (CR)>]
  3595	035770	260 17 0 00 035762*		GO	.OARG			; get first address
  3596	035771	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  3597						 JRST	[FMSGCD	<? Missing argument>
  3598							 GO	FIOFF
  3599	035772	254 00 0 00 104450 			 RTN]
  3600	035773	200 00 0 00 035765*		MOVE	ARGUM			; get argument
  3601	035774	137 00 0 00 111004 		DPB	[POINT 12,5,23]		; save it
  3602	035775	135 00 0 00 111005 		LDB	[POINT 30,4,29]		; get left 30 bits
  3603	035776	202 00 0 00 035714 		MOVEM	CWORDL			; save them
  3604	035777	246 04 0 00 777772 		LSHC	4,-^D6			; position right 30 bits properly
  3605	036000	135 00 0 00 111006 		LDB	[POINT 30,5,29]		; get right 30 bits
  3606	036001	202 00 0 00 035715 		MOVEM	CWORDR			; save them
  3607	036002	260 17 0 00 036340 		GO	DWCRAM			; go write CRAM location
  3608	036003	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  3609	036004	350 01 0 00 035711 		AOS	1,CRAMFR		; update the specified address
  3610	036005	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next address
  3611	036006	317 01 0 00 035712 		CAMG	1,CRAMTO		; reach end yet?
  3612	036007	254 00 0 00 035721 		JRST	DCOMDE			; no - loop till done
  3613	036010	263 17 0 00 000000 		RTN				; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 82
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0256

  3614
  3615					;#*********************************************************************
  3616					; Deposit into CRAM locations (by bit field)
  3617					;#*********************************************************************
  3618
  3619	036011	402 00 0 00 035714 	DCOMDB:	SETZM	CWORDL			; initialize left 30 bits
  3620	036012	402 00 0 00 035715 		SETZM	CWORDR			; initialize right 30 bits
  3621	036013	200 00 0 00 035711 		MOVE	CRAMFR			; get the address to modify
  3622	036014	202 00 0 00 035713 		MOVEM	CADDR			; save address for writing
  3623	036015	254 00 0 00 036021 		JRST	DCOMAG
  3624
  3625	036016	200 00 0 00 035711 	DCOMAL:	MOVE	CRAMFR			; get the address to modify
  3626	036017	202 00 0 00 035713 		MOVEM	CADDR			; save address for writing
  3627	036020	260 17 0 00 036372 		GO	DRCRAM			; read CRAM (init both words)
  3628
  3629					; Set up initial data
  3630
  3631	036021	335 00 0 00 120721'	DCOMAG:	SKIPGE	DC1ST			; first location?
  3632						PNTMSF	[ASCIZ /
  3633	036022	037 01 0 00 111007 	Type  value,value... or ^,CR,^Z,field name/]
  3634	036023	402 00 0 00 120721'		SETZM	DC1ST			; clear 'first location' flag
  3635	036024	037 01 0 00 030242 		PCRLF
  3636						MOVEI	[SETZM	ALTF		; set up altmode transfer address
  3637							 GO	FIOFF		;   to exit this command
  3638							 PCRLF
  3639	036025	201 00 0 00 111020 			 RTN]
  3640	036026	202 00 0 00 030063 		MOVEM	ALTMGO
  3641	036027	200 00 0 00 035711 		MOVE	CRAMFR			; get the address to modify
  3642	036030	037 04 0 00 000001 		PNT4F				; print it
  3643	036031	037 01 0 00 111024 		FMSGD	<::>
  3644	036032	260 17 0 00 032376*		GO	CLRBUF			; clear input buffer
  3645	036033	402 00 0 00 030231 		SETZM	$TTCHR			; clear last character typed
  3646
  3647					; Select an entry from the bit table
  3648
  3649	036034	201 06 0 00 000001 		MOVEI	6,1			; init bit pointer
  3650	036035	275 06 0 00 000002 	DCOMA0:	SUBI	6,2			; decrement entry pointer
  3651	036036	315 06 0 00 111025 		CAMGE	6,[-1]			; backed up too far?
  3652	036037	474 06 0 00 000000 		SETO	6,			; force to start at beginning
  3653	036040	350 00 0 00 000006 	DCOMA1:	AOS	6			; point to next entry
  3654	036041	303 06 0 00 000021 		CAILE	6,^D17			; done with microword?
  3655	036042	254 00 0 00 036104 		JRST	DCOMAX			; yes - exit (write location)
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 83
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0257

  3656	
  3657					; Have an entry - now get input/dispatch data
  3658
  3659	036043	200 00 0 00 030231 		MOVE	$TTCHR			; get last character typed
  3660	036044	302 00 0 00 000054 		CAIE	","			; was it a comma
  3661	036045	306 00 0 00 000040 		CAIN	" "			;   or a blank?
  3662	036046	254 00 0 00 036060 		JRST	DCOMA3			; yes - continue
  3663	036047	332 00 0 00 120733'	DCOMAA:	SKIPE	FINPUT			; file input?
  3664						JRST	[GO	FINCMD		; yes - input sixbit cmd
  3665							 JRST	.+1		; error or EOF
  3666	036050	254 00 0 00 111026 			 JRST	DCOM3A]		; continue
  3667	036051	200 00 0 00 120723'		MOVE	DFLAG			; get dispatch flag
  3668	036052	306 00 0 00 000002 		CAIN	2			; alter?
  3669	036053	254 00 0 00 036057 		JRST	DCOMA2			; no - continue
  3670	036054	260 17 1 06 036140 		GO	@DCOLDB(6)		; yes - get data byte
  3671	036055	037 17 0 00 000003 		PNTOCF
  3672	036056	037 01 0 00 000040 		PSPF
  3673
  3674	036057	256 00 0 06 036116 	DCOMA2:	XCT	DCOMSG(6)		; no - print field name
  3675	036060	037 10 0 00 000003 	DCOMA3:	TTSIXB				; get input
  3676						ALTCHK	[GET	XXW#		; adjust stack properly
  3677							 SKIPN	$TWCNT		; did a timeout occur?
  3678							 JRST	DCOMA3		; yes - keep looking for input
  3679							 MOVE	$TTCHR		; get character typed
  3680							 CAIN	"^"		; backup character?
  3681							 JRST	DCOMA0		; yes - backup
  3682							 CAIN	32		; control-Z?
  3683							 PCRLF			; yes - a final blank line
  3684							 CAIN	32		; control-Z?
  3685							 JRST	DCOMAX		; yes - exit - done
  3686							 CAIN	"?"		; question mark?
  3687							 JRST	[XCT	MWDQUE(6); yes - handle 
  3688								 PCRLF
  3689								 JRST	DCOMAA]
  3690							 FMSGCD	<? Argument error>
  3691							 GO	CLRBUF
  3692							 PCRLF
  3693							 GO	FIOFF
  3694	036061	007 00 0 00 111041 			 JRST	DCOMA2]		; no - error - reask question
  3695
  3696					DCOM3A:	JUMPE	[MOVE	$TTCHR		; anything typed?  if a space, keep
  3697							 CAIN	40		;   looking for an argument, if not
  3698							 JRST	DCOMA3		;   exit
  3699	036062	322 00 0 00 111062 			 JRST	DCOMA5]
  3700	036063	202 00 0 00 120774'		MOVEM	SAVFLD#			; save argument
  3701	036064	200 01 0 00 120774'		MOVE	1,SAVFLD		; get into AC1
  3702	036065	260 17 0 00 033521*		GO	CONVSX			; convert to octal
  3703	036066	334 00 0 00 000000 		SKIPA
  3704	036067	254 00 0 00 036077 		JRST	DCOMA4			; ok - insert into data
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 84
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0258

  3705
  3706					; Unrecognizable - check if a field was specified
  3707
  3708	036070	200 01 0 00 120774'		MOVE	1,SAVFLD		; get command into AC1
  3709	036071	201 02 0 00 036204 		MOVEI	2,FLDLIS		; get address of field list
  3710	036072	260 17 0 00 033436*		GO	.COMM			; handle command decoding
  3711						 JRST	[FMSGCD	<? Argument error>
  3712							 GO	CLRBUF
  3713							 PCRLF
  3714							 GO	FIOFF
  3715	036073	254 00 0 00 111055 			 JRST	DCOMA2]		; no - error - reask question
  3716	036074	370 00 0 00 000001 		SOS	1			; normalize to -1..12
  3717	036075	200 06 0 00 000001 		MOVE	6,1			; put into AC6
  3718	036076	254 00 0 00 036040 		JRST	DCOMA1			; go handle the field
  3719
  3720					; Insert field entry
  3721
  3722	036077	200 00 0 00 000001 	DCOMA4:	MOVE	1			; get number
  3723	036100	260 17 1 06 036162 		GO	@DCODPB(6)		; yes - insert it
  3724	036101	200 00 0 00 030231 	DCOMA5:	MOVE	$TTCHR			; get last character typed
  3725	036102	312 00 0 00 000015 		CAME	15			; CRLF?
  3726	036103	254 00 0 00 036040 		JRST	DCOMA1			; no - get next entry
  3727
  3728					; Finally, write the location
  3729
  3730	036104	260 17 0 00 036340 	DCOMAX:	GO	DWCRAM			; go write CRAM location
  3731	036105	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  3732	036106	350 01 0 00 035711 		AOS	1,CRAMFR		; update the specified address
  3733	036107	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next address
  3734	036110	313 01 0 00 035712 		CAMLE	1,CRAMTO		; reach end yet?
  3735	036111	263 17 0 00 000000 		RTN				; yes - exit
  3736	036112	200 00 0 00 120723'		MOVE	DFLAG			; get dispatch flag
  3737	036113	302 00 0 00 000003 		CAIE	3			; alter?
  3738	036114	254 00 0 00 036011 		JRST	DCOMDB			; no - deposit by bit field
  3739	036115	254 00 0 00 036016 		JRST	DCOMAL			; yes - alter by bit field
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 85
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0259

  3740
  3741					; Input message table
  3742
  3743	036116	037 01 0 00 111066 	DCOMSG:	FMSG	<J - >
  3744	036117	037 01 0 00 111067 		FMSG	<PAR - >
  3745	036120	037 01 0 00 111071 		FMSG	<OENA - >
  3746	036121	037 01 0 00 111073 		FMSG	<MGC - >
  3747	036122	037 01 0 00 111075 		FMSG	<SORC - >
  3748	036123	037 01 0 00 111077 		FMSG	<FUNC - >
  3749	036124	037 01 0 00 111101 		FMSG	<DEST - >
  3750	036125	037 01 0 00 111103 		FMSG	<CENA - >
  3751	036126	037 01 0 00 111105 		FMSG	<RAM - >
  3752	036127	037 01 0 00 111107 		FMSG	<A - >
  3753	036130	037 01 0 00 111110 		FMSG	<B - >
  3754	036131	037 01 0 00 111111 		FMSG	<SK - >
  3755	036132	037 01 0 00 111113 		FMSG	<BUS - >
  3756	036133	037 01 0 00 111115 		FMSG	<CRY - >
  3757	036134	037 01 0 00 111117 		FMSG	<CTL - >
  3758	036135	037 01 0 00 111121 		FMSG	<TIME - >
  3759	036136	037 01 0 00 111123 		FMSG	<SPARE - >
  3760	036137	037 01 0 00 111125 		FMSG	<MARK - >
  3761
  3762					; Microword load byte pointer table
  3763
  3764					DCOLDB:	[LDB	[POINT 12,CWORDL,17]	; J - Bits 6-17
  3765	036140	000000	111130			 RTN]
  3766						[LDB	[POINT 1,CWORDL,18]	; PAR - Bit 18 
  3767	036141	000000	111133			 RTN]
  3768						[LDB	[POINT 1,CWORDL,19]	; OENA - Bit 19
  3769	036142	000000	111136			 RTN]
  3770						[LDB	[POINT 10,CWORDL,29]	; MGC - Bits 20-29
  3771	036143	000000	111141			 RTN]
  3772						[LDB	[POINT 3,CWORDL,32]	; SORC - Bits 30-32
  3773	036144	000000	111144			 RTN]
  3774						[LDB	[POINT 3,CWORDL,35]	; FUNC - Bits 33-35
  3775	036145	000000	111147			 RTN]
  3776						[LDB	[POINT 3,CWORDR,8]	; DEST - Bits 6-8
  3777	036146	000000	111152			 RTN]
  3778						[LDB	[POINT 1,CWORDR,9]	; CENA - Bit 9
  3779	036147	000000	111155			 RTN]
  3780						[LDB	[POINT 1,CWORDR,10]	; RAM - Bit 10
  3781	036150	000000	111160			 RTN]
  3782						[LDB	[POINT 4,CWORDR,14]	; A - Bits 11-14
  3783	036151	000000	111163			 RTN]
  3784						[LDB	[POINT 4,CWORDR,18]	; B - Bits 15-18
  3785	036152	000000	111166			 RTN]
  3786						[LDB	[POINT 5,CWORDR,23]	; SK - Bits 19-23
  3787	036153	000000	111171			 RTN]
  3788						[LDB	[POINT 3,CWORDR,26]	; BUS - Bits 24-26
  3789	036154	000000	111174			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 86
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0260

  3790						[LDB	[POINT 1,CWORDR,27]	; CRY - Bits 27
  3791	036155	000000	111177			 RTN]
  3792						[LDB	[POINT 4,CWORDR,31]	; OP - Bits 28-31
  3793	036156	000000	111202			 RTN]
  3794						[LDB	[POINT 1,CWORDR,32]	; TIME - Bit 32
  3795	036157	000000	111205			 RTN]
  3796						[LDB	[POINT 2,CWORDR,34]	; SPARE - Bits 33-34
  3797	036160	000000	111210			 RTN]
  3798						[LDB	[POINT 1,CWORDR,35]	; MARK - Bit 35
  3799	036161	000000	111213			 RTN]
  3800
  3801					; Microword deposit byte pointer table
  3802
  3803					DCODPB:	[DPB	[POINT 12,CWORDL,17]	; J - Bits 6-17
  3804	036162	000000	111215			 RTN]
  3805						[DPB	[POINT 1,CWORDL,18]	; PAR - Bit 18 
  3806	036163	000000	111217			 RTN]
  3807						[DPB	[POINT 1,CWORDL,19]	; OENA - Bit 19
  3808	036164	000000	111221			 RTN]
  3809						[DPB	[POINT 10,CWORDL,29]	; MGC - Bits 20-29
  3810	036165	000000	111223			 RTN]
  3811						[DPB	[POINT 3,CWORDL,32]	; SORC - Bits 30-32
  3812	036166	000000	111225			 RTN]
  3813						[DPB	[POINT 3,CWORDL,35]	; FUNC - Bits 33-35
  3814	036167	000000	111227			 RTN]
  3815						[DPB	[POINT 3,CWORDR,8]	; DEST - Bits 6-8
  3816	036170	000000	111231			 RTN]
  3817						[DPB	[POINT 1,CWORDR,9]	; CENA - Bit 9
  3818	036171	000000	111233			 RTN]
  3819						[DPB	[POINT 1,CWORDR,10]	; RAM - Bit 10
  3820	036172	000000	111235			 RTN]
  3821						[DPB	[POINT 4,CWORDR,14]	; A - Bits 11-14
  3822	036173	000000	111237			 RTN]
  3823						[DPB	[POINT 4,CWORDR,18]	; B - Bits 15-18
  3824	036174	000000	111241			 RTN]
  3825						[DPB	[POINT 5,CWORDR,23]	; SK - Bits 19-23
  3826	036175	000000	111243			 RTN]
  3827						[DPB	[POINT 3,CWORDR,26]	; BUS - Bits 24-26
  3828	036176	000000	111245			 RTN]
  3829						[DPB	[POINT 1,CWORDR,27]	; CRY - Bits 27
  3830	036177	000000	111247			 RTN]
  3831						[DPB	[POINT 4,CWORDR,31]	; OP - Bits 28-31
  3832	036200	000000	111251			 RTN]
  3833						[DPB	[POINT 1,CWORDR,32]	; TIME - Bit 32
  3834	036201	000000	111253			 RTN]
  3835						[DPB	[POINT 2,CWORDR,34]	; SPARE - Bits 33-34
  3836	036202	000000	111255			 RTN]
  3837						[DPB	[POINT 1,CWORDR,35]	; MARK - Bit 35
  3838	036203	000000	111257			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 87
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0261

  3839
  3840					; Field command table
  3841
  3842	036204	52 00 00 00 00 00 	FLDLIS:	SIXBIT	/J/
  3843	036205	60 41 62 00 00 00 		SIXBIT	/PAR/
  3844	036206	57 45 56 41 00 00 		SIXBIT	/OENA/
  3845	036207	55 47 43 00 00 00 		SIXBIT	/MGC/
  3846	036210	63 57 62 43 00 00 		SIXBIT	/SORC/
  3847	036211	46 65 56 43 00 00 		SIXBIT	/FUNC/
  3848	036212	44 45 63 64 00 00 		SIXBIT	/DEST/
  3849	036213	43 45 56 41 00 00 		SIXBIT	/CENA/
  3850	036214	62 41 55 00 00 00 		SIXBIT	/RAM/
  3851	036215	41 00 00 00 00 00 		SIXBIT	/A/
  3852	036216	42 00 00 00 00 00 		SIXBIT	/B/
  3853	036217	63 53 00 00 00 00 		SIXBIT	/SK/
  3854	036220	42 65 63 00 00 00 		SIXBIT	/BUS/
  3855	036221	43 62 71 00 00 00 		SIXBIT	/CRY/
  3856	036222	43 64 54 00 00 00 		SIXBIT	/CTL/
  3857	036223	64 51 55 45 00 00 		SIXBIT	/TIME/
  3858	036224	63 60 41 62 45 00 		SIXBIT	/SPARE/
  3859	036225	55 41 62 53 00 00 		SIXBIT	/MARK/
  3860	036226	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 88
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0262

  3861
  3862					; Help text
  3863
  3864	036227	037 01 0 00 111261 	MWDQUE:	FMSGCD	<Jump field>
  3865	036230	037 01 0 00 111264 		FMSGCD	<Parity bit - Pgm calculates it unless SET PAR is off>
  3866	036231	037 01 0 00 111300 		FMSGCD	<Ouput enable>
  3867	036232	037 01 0 00 111304 		FMSGCD	<Magic # field>
  3868						FMSGD	<
  3869					Source field:
  3870					 0-AQ  2-0Q  4-0A  6-DQ
  3871	036233	037 01 0 00 111310 	 1-AB  3-0B  5-DA  7-D0>
  3872						FMSGD	<
  3873					ALU Function:
  3874					 0-Plus  2-Rmin  4-And   6-Xor
  3875	036234	037 01 0 00 111326 	 1-Smin  3-Or    5-Nand  7-Xnor>
  3876						FMSGD	<
  3877					Destination field:
  3878					 0-QF  2-BA  4-/2BQF  6-*2BQF
  3879	036235	037 01 0 00 111347 	 1-F   3-BF  5-/2BF   7-*2BF>
  3880	036236	037 01 0 00 111370 		FMSGCD	<CC Enable>
  3881	036237	037 01 0 00 111373 		FMSGCD	<RAM Mode>
  3882	036240	037 01 0 00 111376 		FMSGCD	<Port A 0-17>
  3883	036241	037 01 0 00 111402 		FMSGCD	<Port B 0-17>
  3884						FMSGD	<
  3885					Skip field - Select:
  3886					 00/20-CCCbusAvail  10/30-CCEbusRqst
  3887					 01/21-CCGrntCsr    11/31-CCOverflow
  3888					 02/22-CCFeq0	    12/32-CCMbSign
  3889					 03/23-CCCsrChng    13/33-CCMVParChk
  3890					 04/24-CCEbParerr   14/34-CCCbusParErr
  3891					 05/25-CCRcvBufAFul 15/35-CCPliParErr
  3892					 06/26-CCRcvBufBFul 16/36-CCChanErr
  3893					 07/27-CCXmtrAttn   17/37-CCCbLstWd
  3894					
  3895					 20/30-LoadSadReg   23/33-LdLocalMem
  3896					 21/31-SelMbusFld   24/34-SelCnstFld
  3897	036242	037 01 0 00 111406 	 22/32-RdLocalMem>
  3898						FMSGD	<
  3899					Bus Ctl field - Select:
  3900					 0-Nul  2-Mbus  4-Cbus
  3901	036243	037 01 0 00 111533 	 1-Pli  3-Fmtr  5-Ebus>
  3902	036244	037 01 0 00 111553 		FMSGCD	<Carry input>
  3903						FMSGD	<
  3904					2910 Control field:
  3905					 00-JZ    04-PUSH  10-RFCT  14-LDCT
  3906					 01-CJS   05-JSRP  11-RPCT  15-LOOP
  3907					 02-JMAP  06-CJV   12-CRTN  16-CONT
  3908	036245	037 01 0 00 111557 	 03-CJP   07-JRP   13-CJPP  17-TWB>
  3909	036246	037 01 0 00 111622 		FMSGCD	<Time field>
  3910	036247	037 01 0 00 111625 		FMSGCD	<Spare bits>
  3911	036250	037 01 0 00 111630 		FMSGCD	<Mark bit>
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 89
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0263

  3912
  3913					;#*********************************************************************
  3914					; Zero CRAM addresses specified by "PARG1" and "PARG2"
  3915					;#*********************************************************************
  3916
  3917	036251	402 00 0 00 035714 	DCOMZE:	SETZM	CWORDL			; clear CRAM words left and
  3918	036252	402 00 0 00 035715 		SETZM	CWORDR			;   right
  3919	036253	200 00 0 00 035711 		MOVE	CRAMFR			; get the address to modify
  3920	036254	202 00 0 00 035713 		MOVEM	CADDR			; save address for writing
  3921	036255	260 17 0 00 036340 		GO	DWCRAM			; go write CRAM location
  3922	036256	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  3923	036257	037 07 0 00 000003 		TTALTM				; altmode key struck?
  3924	036260	334 00 0 00 000000 		SKIPA				; no - proceed
  3925	036261	263 17 0 00 000000 		RTN				; yes - exit
  3926	036262	350 01 0 00 035711 		AOS	1,CRAMFR		; update the specified address
  3927	036263	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next address
  3928	036264	317 01 0 00 035712 		CAMG	1,CRAMTO		; reach end yet?
  3929	036265	254 00 0 00 036251 		JRST	DCOMZE			; no - loop till done
  3930	036266	263 17 0 00 000000 		RTN				; yes - exit
  3931
  3932
  3933					;#*********************************************************************
  3934					; Examine CRAM locations
  3935					;#*********************************************************************
  3936
  3937	036267	200 00 0 00 035711 	DCOMEX:	MOVE	CRAMFR			; get the address to modify
  3938	036270	202 00 0 00 035713 		MOVEM	CADDR			; save address
  3939	036271	037 00 0 00 030242 		PCRL
  3940	036272	037 04 0 00 000000 		PNT4				; print it
  3941	036273	037 00 0 00 111633 		TMSG	</ >
  3942	036274	260 17 0 00 036372 		GO	DRCRAM			; read CRAM location
  3943	036275	255 00 0 00 000000 		JFCL				; error return
  3944	036276	200 02 0 00 035714 		MOVE	2,CWORDL		; get left half
  3945	036277	200 03 0 00 035715 		MOVE	3,CWORDR		; get right half
  3946	036300	260 17 0 00 042365 		GO	PNTWD			; print it
  3947	036301	037 07 0 00 000003 		TTALTM				; altmode key struck?
  3948	036302	334 00 0 00 000000 		SKIPA				; no - proceed
  3949						JRST	[SETOM	ALTF		; yes - set altmode typed flag 
  3950							 SETZM	MULFLG		;   and clear 'examine next' flag
  3951	036303	254 00 0 00 111634 			 JRST	DCOMEZ]		;   and exit
  3952	036304	350 01 0 00 035711 		AOS	1,CRAMFR		; update the specified address
  3953	036305	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next address
  3954	036306	317 01 0 00 035712 		CAMG	1,CRAMTO		; reach end yet?
  3955	036307	254 00 0 00 036267 		JRST	DCOMEX			; no - loop till done
  3956	036310	336 00 0 00 120743'	DCOMEZ:	SKIPN	MULFLG			; in 'examine next'?
  3957	036311	037 00 0 00 030242 		PCRL				; no - print a blank line
  3958	036312	263 17 0 00 000000 		RTN				; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 90
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0264

  3959
  3960					;#*********************************************************************
  3961					; List CRAM locations
  3962					;#*********************************************************************
  3963
  3964					; Print this CRAM entry
  3965
  3966	036313	332 00 0 00 120744'	DCOMLI:	SKIPE	MULINI			; in 'examine next'?
  3967	036314	037 00 0 00 111637 		TMSGC	<ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK>
  3968	036315	200 00 0 00 035711 	DCOML0:	MOVE	CRAMFR			; get the address to list
  3969	036316	202 00 0 00 035713 		MOVEM	CADDR			; save address
  3970	036317	260 17 0 00 036372 		GO	DRCRAM			; read CRAM location
  3971	036320	255 00 0 00 000000 		JFCL				; error return
  3972	036321	037 00 0 00 030242 		PCRL				; start a new line
  3973	036322	001 04 0 00 035713 		PNTOCC	4,CADDR			; print cram address
  3974	036323	037 00 0 00 111633 		TMSG	</ >
  3975	036324	200 02 0 00 035714 		MOVE	2,CWORDL		; get left word
  3976	036325	200 03 0 00 035715 		MOVE	3,CWORDR		; get right word
  3977	036326	260 17 0 00 042271 		GO	PNTCRM			; go print it
  3978	036327	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  3979	036330	254 00 0 00 036335 		JRST	DCOMLX			; yes - return
  3980	036331	350 01 0 00 035711 		AOS	1,CRAMFR		; no - update the specified address
  3981	036332	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next address
  3982	036333	317 01 0 00 035712 		CAMG	1,CRAMTO		; reach end yet?
  3983	036334	254 00 0 00 036315 		JRST	DCOML0			; no - loop till done
  3984	036335	336 00 0 00 120743'	DCOMLX:	SKIPN	MULFLG			; in 'examine next'?
  3985	036336	037 00 0 00 030242 		PCRL				; no - print blank line
  3986	036337	263 17 0 00 000000 		RTN				; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 91
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0265

  3987
  3988					;#********************************************************************
  3989					; DWCRAM - Load CRAM word at 'CADDR' with data in 'CWORDL' and 'CWORDR'
  3990					;#********************************************************************
  3991
  3992	036340	261 17 0 00 000000 	DWCRAM:	RPUT	(0,1,2,3)		; save AC's
  3993
  3994	036344	200 01 0 00 035713 		MOVE	1,CADDR			; get actual CRAM load address
  3995	036345	242 01 0 00 000001 		LSH	1,1			; convert to address for RAR
  3996	036346	660 01 0 00 000001 		TRO	1,1			; set bit 12 (for left 30 bits)
  3997	036347	260 17 0 00 035624*		GO	LDRAR			; load RAR with it
  3998	036350	200 02 0 00 035714 		MOVE	2,CWORDL		; get left 30 bits
  3999	036351	200 03 0 00 035715 		MOVE	3,CWORDR		; get right 30 bits
  4000	036352	400 01 0 00 000000 		SETZ	1,			; ignore 'bad parity' bit
  4001	036353	332 00 0 00 034000 		SKIPE	PARFLG			; calculate parity?
  4002	036354	260 17 0 00 042407 		GO	CALPAR			; yes - do so
  4003	036355	200 01 0 00 000002 		MOVE	1,2			; get left 30 bits
  4004	036356	260 17 0 00 000000*		GO	LDCRAM			; load it
  4005
  4006	036357	200 01 0 00 035713 		MOVE	1,CADDR			; get actual CRAM load address
  4007	036360	242 01 0 00 000001 		LSH	1,1			; convert to address for RAR
  4008	036361	620 01 0 00 000001 		TRZ	1,1			; clear bit 12 (for right 30 bits)
  4009	036362	260 17 0 00 036347*		GO	LDRAR			; load address
  4010	036363	200 01 0 00 000003 		MOVE	1,3			; get right 30 bits
  4011	036364	260 17 0 00 036356*		GO	LDCRAM			; load it
  4012	036365	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
  4013
  4014	036371	263 17 0 00 000000 		RTN
  4015
  4016					;#********************************************************************
  4017					; DRCRAM - Read CRAM word at 'CADDR' into 'CWORDL' and 'CWORDR'
  4018					;#********************************************************************
  4019
  4020	036372	261 17 0 00 000000 	DRCRAM:	RPUT	(0,1)			; save AC's
  4021
  4022	036374	200 01 0 00 035713 		MOVE	1,CADDR			; get actual CRAM address
  4023	036375	242 01 0 00 000001 		LSH	1,1			; convert to address for RAR
  4024	036376	660 01 0 00 000001 		TRO	1,1			; set bit 12 (for left 30 bits)
  4025	036377	260 17 0 00 036362*		GO	LDRAR			; load RAR with it
  4026	036400	260 17 0 00 000000*		GO	RDCRAM			; load it
  4027	036401	202 01 0 00 035714 		MOVEM	1,CWORDL		; save it
  4028
  4029	036402	200 01 0 00 035713 		MOVE	1,CADDR			; get actual CRAM load address
  4030	036403	242 01 0 00 000001 		LSH	1,1			; convert to address for RAR
  4031	036404	620 01 0 00 000001 		TRZ	1,1			; clear bit 12 (for right 30 bits)
  4032	036405	260 17 0 00 036377*		GO	LDRAR			; load address
  4033	036406	260 17 0 00 036400*		GO	RDCRAM			; load it
  4034	036407	202 01 0 00 035715 		MOVEM	1,CWORDR		; save it
  4035	036410	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
  4036
  4037	036412	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 92
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0266

  4038
  4039					;#********************************************************************
  4040					;* DEALU - Examine 2901 registers
  4041					;
  4042					; Arguments:  Reg1,Reg2
  4043					;#********************************************************************
  4044
  4045	036413	200 00 0 00 036715 	DEALU:	MOVE	ALUFR			; set up default of register range
  4046	036414	202 00 0 00 120764'		MOVEM	RALUB#			;   to be whatever was typed before
  4047	036415	200 00 0 00 036716 		MOVE	ALUTO			;   or if nothing typed, then 0-20
  4048	036416	202 00 0 00 120765'		MOVEM	RALUE#
  4049
  4050					; Get arguments
  4051
  4052	036417	200 01 0 00 111665 		MOVE	1,[FMSGCD <E2901 reg1,reg2 (CR) (20=QReg)>]
  4053	036420	260 17 0 00 035770*		GO	.OARG			; get first argument
  4054	036421	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4055	036422	254 00 0 00 036434 		 JRST	DEALU0			; no arguments given - continue
  4056	036423	200 00 0 00 035773*		MOVE	ARGUM			; get argument
  4057	036424	202 00 0 00 120764'		MOVEM	RALUB			; save in 'from' location
  4058	036425	202 00 0 00 120765'		MOVEM	RALUE			; save in 'to' location
  4059
  4060	036426	210 01 0 00 111673 		MOVN	1,[FMSGCD <E2901 reg1,reg2 (CR)>]
  4061	036427	260 17 0 00 036420*		GO	.OARG			; get 2nd argument
  4062	036430	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4063	036431	254 00 0 00 036434 		 JRST	DEALU0			; no arguments given - continue
  4064	036432	200 00 0 00 036423*		MOVE	ARGUM			; get argument
  4065	036433	202 00 0 00 120765'		MOVEM	RALUE			; save in 'to' location
  4066
  4067					; Now range check the arguments
  4068
  4069	036434	331 01 0 00 120764'	DEALU0:	SKIPL	1,RALUB			; 1st argument in range?
  4070	036435	303 01 0 00 000020 		CAILE	1,20		
  4071						JRST	[FMSGCD	<? Range of 2901 registers is 0-20 (20=QReg)>
  4072							 SETOM	ALTF
  4073							 GO	FIOFF
  4074	036436	254 00 0 00 111706 			 RTN]
  4075	036437	331 01 0 00 120765'		SKIPL	1,RALUE			; 2nd argument in range?
  4076	036440	303 01 0 00 000020 		CAILE	1,20		
  4077						JRST	[FMSGCD	<? Range of 2901 registers is 0-20 (20=QReg)>
  4078							 GO	FIOFF
  4079	036441	254 00 0 00 111712 			 RTN]
  4080	036442	274 01 0 00 120764'		SUB	1,RALUB			; see if range ok
  4081						JUMPL	1,[FMSGCD <? Range nonsensical>
  4082							   GO	FIOFF
  4083	036443	321 01 0 00 110071 			   RTN]
  4084	036444	200 00 0 00 120764'		MOVE	RALUB			; get 'from' argument
  4085	036445	202 00 0 00 036715 		MOVEM	ALUFR			; save it
  4086	036446	200 00 0 00 120765'		MOVE	RALUE			; get 'to' argument
  4087	036447	202 00 0 00 036716 		MOVEM	ALUTO			; save it
  4088	036450	201 00 0 00 000006 		MOVEI	6			; get E2901 flag
  4089	036451	202 00 0 00 120723'		MOVEM	DFLAG			; save it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 93
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0267

  4090
  4091					; Save CRAM location
  4092
  4093	036452	200 01 0 00 111715 	DEBALU:	MOVE	1,[-1,,7750]		; set up AOBJN word
  4094	036453	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  4095
  4096					; Now do each register
  4097
  4098	036454	037 00 0 00 111716 	DEALU1:	TMSGC	<R>			; start a new line
  4099	036455	200 02 0 00 120764'		MOVE	2,RALUB			; get register number
  4100	036456	200 00 0 00 000002 		MOVE	2			; get register number
  4101	036457	137 02 0 00 111717 		DPB	2,[POINT 4,DEALUM+1,14]	; save it in microword
  4102	036460	306 02 0 00 000020 		CAIN	2,20			; Q-Register?
  4103	036461	037 00 0 00 111720 		TMSG	<Q>			; yes - print Q
  4104	036462	302 02 0 00 000020 		CAIE	2,20			; Q-Register?
  4105	036463	037 16 0 00 000003 		PNTOCS				; no - print register number
  4106	036464	037 00 0 00 111633 		TMSG	</ >
  4107	036465	201 00 0 00 000004 		MOVEI	4			; get source field of 4 (0A)
  4108	036466	306 02 0 00 000020 		CAIN	2,20			; Q-Register?
  4109	036467	201 00 0 00 000002 		MOVEI	2			; yes - use source of 2 (0Q)
  4110	036470	137 00 0 00 111721 		DPB	[POINT 3,DEALUM+1,2]	; set up source field
  4111	036471	201 01 0 00 036674 		MOVEI	1,DEALUM		; set up microcode address
  4112	036472	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4113	036473	255 00 0 00 000000 		JFCL				; ignore error
  4114	036474	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4115	036475	242 01 0 00 000001 		LSH	1,1			; position correctly
  4116	036476	260 17 0 00 036405*		GO	LDRAR			; load the RAR
  4117	036477	201 01 0 00 220010 		MOVEI	1,SINCYC!MPRUN!TSTEBF	; single step once
  4118	036500	260 17 0 00 035623*		GO	LDCSR
  4119	036501	260 17 0 00 035537*		GO	RDEBUF			; read EBUF contents
  4120	036502	200 00 0 00 000001 		MOVE	1			; get register data
  4121	036503	037 13 0 00 000000 		PNTHW				; print it
  4122	036504	350 00 0 00 000002 		AOS	2			; point to next register
  4123	036505	202 02 0 00 035720 		MOVEM	2,ANEXT			; save next register
  4124	036506	037 07 0 00 000003 		TTALTM				; altmode key struck?
  4125	036507	334 00 0 00 000000 		SKIPA				; no - proceed
  4126						JRST	[SETOM	ALTF		; yes - set altmode typed flag 
  4127							 SETZM	MULFLG		;   and clear 'examine next' flag
  4128	036510	254 00 0 00 111722 			 JRST	DEALUX]		;   and exit
  4129	036511	350 01 0 00 120764'		AOS	1,RALUB			; point to next register
  4130	036512	317 01 0 00 120765'		CAMG	1,RALUE			; done yet?
  4131	036513	254 00 0 00 036454 		JRST	DEALU1			; no - loop till done
  4132
  4133					; Restore CRAM location and exit
  4134
  4135	036514	336 00 0 00 120743'	DEALUX:	SKIPN	MULFLG			; in 'examine next'?
  4136	036515	037 00 0 00 030242 		PCRL				; no - print blank line
  4137	036516	200 01 0 00 111715 		MOVE	1,[-1,,7750]		; set up AOBJN word
  4138	036517	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4139	036520	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 94
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0268

  4140
  4141					;#********************************************************************
  4142					;* DDALU - Deposit register 
  4143					;
  4144					; Format:  DALU reg,data
  4145					;#********************************************************************
  4146
  4147	036521	200 01 0 00 111732 	DDALU:	MOVE	1,[FMSGCD <DALU reg,data (CR)>]
  4148	036522	260 17 0 00 036427*		GO	.OARG			; get register number
  4149	036523	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4150						 JRST	[FMSGCD	<? Missing argument>
  4151							 GO	FIOFF
  4152	036524	254 00 0 00 104450 			 RTN]
  4153	036525	331 01 0 00 036432*	DDALU0:	SKIPL	1,ARGUM			; argument in range?
  4154	036526	303 01 0 00 000020 		CAILE	1,20		
  4155						JRST	[FMSGCD	<? Range of 2901 registers is 0-20 (20=QReg)>
  4156							 GO	FIOFF
  4157	036527	254 00 0 00 111712 			 RTN]
  4158	036530	202 01 0 00 120764'		MOVEM	1,RALUB			; get 'from' argument
  4159	036531	202 01 0 00 036715 		MOVEM	1,ALUFR			; save it
  4160	036532	202 01 0 00 120765'		MOVEM	1,RALUE			; get 'to' argument
  4161	036533	202 01 0 00 036716 		MOVEM	1,ALUTO			; save it
  4162	036534	200 01 0 00 111732 		MOVE	1,[FMSGCD <DALU reg,data (CR)>]
  4163	036535	260 17 0 00 036522*		GO	.OARG			; get data
  4164	036536	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4165						 JRST	[FMSGCD	<? Missing argument>
  4166							 GO	FIOFF
  4167	036537	254 00 0 00 104450 			 RTN]
  4168	036540	200 00 0 00 036525*		MOVE	ARGUM			; get argument
  4169	036541	202 00 0 00 120736'		MOVEM	LARG2			; save it
  4170	036542	201 00 0 00 000007 		MOVEI	7			; get D2901 flag
  4171	036543	202 00 0 00 120723'		MOVEM	DFLAG			; save it
  4172
  4173					; Save CRAM locations
  4174
  4175	036544	200 01 0 00 111733 		MOVE	1,[-5,,7750]		; set up AOBJN word
  4176	036545	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  4177
  4178					; Load microcode
  4179
  4180	036546	200 02 0 00 120764'		MOVE	2,RALUB			; get location to write
  4181	036547	137 02 0 00 111734 		DPB	2,[POINT 4,DDALUM+7,18]	; set up 2901 register
  4182	036550	201 00 0 00 000002 		MOVEI	2			; get destination field of 2 (BA)
  4183	036551	306 02 0 00 000020 		CAIN	2,20			; Q-Register?
  4184	036552	201 00 0 00 000000 		MOVEI	0			; yes - use destination of 0 (QF)
  4185	036553	137 00 0 00 111735 		DPB	[POINT 3,DDALUM+7,8]	; set up source field
  4186	036554	201 01 0 00 036677 		MOVEI	1,DDALUM		; set up microcode address
  4187	036555	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4188	036556	255 00 0 00 000000 		JFCL				; ignore error
  4189	036557	350 00 0 00 000002 		AOS	2			; point to next register
  4190	036560	202 02 0 00 035720 		MOVEM	2,ANEXT			; save next register
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 95
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0269

  4191
  4192					; Now do the deposit
  4193
  4194	036561	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4195	036562	242 01 0 00 000001 		LSH	1,1			; position correctly
  4196	036563	260 17 0 00 036476*		GO	LDRAR			; load the RAR
  4197	036564	201 01 0 00 000010 		MOVEI	1,MPRUN			; set initial data
  4198	036565	260 17 0 00 036500*		GO	LDCSR			; start the port
  4199	036566	200 01 0 00 120736'		MOVE	1,LARG2			; get data to write
  4200	036567	260 17 0 00 000000*		GO	.DATAO			; give to port
  4201	036570	400 01 0 00 000000 		SETZ	1,			; stop the port
  4202	036571	260 17 0 00 036565*		GO	LDCSR
  4203
  4204					; Check if additional arguments
  4205
  4206	036572	336 00 0 00 035736*		SKIPN	ARGFLG			; any more arguments
  4207	036573	254 00 0 00 036577 		JRST	DDALUX			; no - exit
  4208	036574	200 00 0 00 035720 		MOVE	ANEXT			; get register number
  4209	036575	202 00 0 00 036540*		MOVEM	ARGUM			; save it
  4210	036576	254 00 0 00 036525 		JRST	DDALU0			; loop till done
  4211
  4212					; Restore CRAM locations and exit
  4213
  4214	036577	200 01 0 00 111733 	DDALUX:	MOVE	1,[-5,,7750]		; set up AOBJN word
  4215	036600	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4216	036601	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 96
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0270

  4217
  4218					;#********************************************************************
  4219					;* DZALU - Zero 2901 registers
  4220					;
  4221					; Format:  ZALU reg1,reg2
  4222					;#********************************************************************
  4223
  4224	036602	200 00 0 00 036715 	DZALU:	MOVE	ALUFR			; set up default of register range
  4225	036603	202 00 0 00 120764'		MOVEM	RALUB			;   to be whatever was typed before
  4226	036604	200 00 0 00 036716 		MOVE	ALUTO			;   or if nothing typed, then 0-0
  4227	036605	202 00 0 00 120765'		MOVEM	RALUE
  4228
  4229					; Get arguments
  4230
  4231	036606	200 01 0 00 111743 		MOVE	1,[FMSGCD <ZALU reg1,reg2 (CR)>]
  4232	036607	260 17 0 00 036535*		GO	.OARG			; get first argument
  4233	036610	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4234	036611	254 00 0 00 036623 		 JRST	DZALU0			; no arguments given - continue
  4235	036612	200 00 0 00 036575*		MOVE	ARGUM			; get argument
  4236	036613	202 00 0 00 120764'		MOVEM	RALUB			; save in 'from' location
  4237	036614	202 00 0 00 120765'		MOVEM	RALUE			; save in 'to' location
  4238
  4239	036615	210 01 0 00 111743 		MOVN	1,[FMSGCD <ZALU reg1,reg2 (CR)>]
  4240	036616	260 17 0 00 036607*		GO	.OARG			; get 2nd argument
  4241	036617	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4242	036620	254 00 0 00 036623 		 JRST	DZALU0			; no arguments given - continue
  4243	036621	200 00 0 00 036612*		MOVE	ARGUM			; get argument
  4244	036622	202 00 0 00 120765'		MOVEM	RALUE			; save in 'to' location
  4245
  4246					; Now range check the arguments
  4247
  4248	036623	331 01 0 00 120764'	DZALU0:	SKIPL	1,RALUB			; 1st argument in range?
  4249	036624	303 01 0 00 000020 		CAILE	1,20		
  4250						JRST	[FMSGCD	<? Range of 2901 registers is 0-20 (20=QReg)>
  4251							 GO	FIOFF
  4252	036625	254 00 0 00 111712 			 RTN]
  4253	036626	331 01 0 00 120765'		SKIPL	1,RALUE			; 2nd argument in range?
  4254	036627	303 01 0 00 000020 		CAILE	1,20		
  4255						JRST	[FMSGCD	<? Range of 2901 registers is 0-20 (20=QReg)>
  4256							 GO	FIOFF
  4257	036630	254 00 0 00 111712 			 RTN]
  4258	036631	274 01 0 00 120764'		SUB	1,RALUB			; see if range ok
  4259						JUMPL	1,[FMSGCD <? Range nonsensical>
  4260							   GO	FIOFF
  4261	036632	321 01 0 00 110071 			   RTN]
  4262	036633	200 00 0 00 120764'		MOVE	RALUB			; get 'from' argument
  4263	036634	202 00 0 00 036715 		MOVEM	ALUFR			; save it
  4264	036635	200 00 0 00 120765'		MOVE	RALUE			; get 'to' argument
  4265	036636	202 00 0 00 036716 		MOVEM	ALUTO			; save it
  4266	036637	201 00 0 00 000010 		MOVEI	8			; get Z2901 flag
  4267	036640	202 00 0 00 120723'		MOVEM	DFLAG			; save it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 97
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0271

  4268
  4269					; Save CRAM location
  4270
  4271	036641	200 01 0 00 111715 		MOVE	1,[-1,,7750]		; set up AOBJN word
  4272	036642	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM location
  4273
  4274					; Now do each location
  4275
  4276	036643	200 02 0 00 120764'	DZALU1:	MOVE	2,RALUB			; get location to write
  4277	036644	137 02 0 00 111744 		DPB	2,[POINT 4,DZALUM+1,18]	; set up register number
  4278	036645	201 00 0 00 000002 		MOVEI	2			; get destination field of 2 (BA)
  4279	036646	306 02 0 00 000020 		CAIN	2,20			; Q-Register?
  4280	036647	201 00 0 00 000000 		MOVEI	0			; yes - use destination of 0 (QF)
  4281	036650	137 00 0 00 111745 		DPB	[POINT 3,DZALUM+1,8]	; set up destination field
  4282	036651	201 01 0 00 036712 		MOVEI	1,DZALUM		; set up microcode address
  4283	036652	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4284	036653	255 00 0 00 000000 		JFCL				; ignore error
  4285	036654	350 00 0 00 000002 		AOS	2			; point to next register
  4286	036655	202 02 0 00 035720 		MOVEM	2,ANEXT			; save next register
  4287	036656	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4288	036657	242 01 0 00 000001 		LSH	1,1			; position correctly
  4289	036660	260 17 0 00 036563*		GO	LDRAR			; load the RAR
  4290	036661	201 01 0 00 020010 		MOVEI	1,MPRUN!SINCYC		; start it up
  4291	036662	260 17 0 00 036571*		GO	LDCSR
  4292	036663	037 07 0 00 000003 		TTALTM				; altmode key struck?
  4293	036664	334 00 0 00 000000 		SKIPA				; no - proceed
  4294	036665	254 00 0 00 036671 		JRST	DZALUX			; yes - exit
  4295	036666	350 01 0 00 120764'		AOS	1,RALUB			; point to next location
  4296	036667	317 01 0 00 120765'		CAMG	1,RALUE			; done yet?
  4297	036670	254 00 0 00 036643 		JRST	DZALU1			; no - loop till done
  4298
  4299					; Restore CRAM location and exit
  4300
  4301	036671	200 01 0 00 111715 	DZALUX:	MOVE	1,[-1,,7750]		; set up AOBJN word
  4302	036672	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4303	036673	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 98
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0272

  4304
  4305					; Microcode to examine 2901's
  4306
  4307	036674	775077	502004		DEALUM:	MWORD	<ADDR=7750,JMAP,J=7750,S0A,OR,D=1,OENA,SELE,MGC=4>
  4308	036675	431000	005040
  4309	036676	777777	777777			-1
  4310
  4311					; Microcode to deposit 2901's
  4312
  4313	036677	775077	510000		DDALUM:	MWORD	<ADDR=7750,JMAP,J=7751,D=1>		; 7750
  4314	036700	001000	000040
  4315	036701	775177	530000			MWORD	<CJP,J=7753,D=1,CENA,CCER>		; 7751
  4316	036702	001400	100060
  4317	036703	775277	510000			MWORD	<JMAP,J=7751,D=1>			; 7752
  4318	036704	001000	000040
  4319	036705	775300	000010			MWORD	<CONT,SD0,OR,D=2,SELE,MGC=10>		; 7753
  4320	036706	732000	005340
  4321	036707	775477	540000			MWORD	<JMAP,J=7754,D=1>			; 7754
  4322	036710	001000	000040
  4323	036711	777777	777777			-1
  4324
  4325					; Microcode to zero 2901's
  4326
  4327	036712	775077	500000		DZALUM:	MWORD	<ADDR=7750,JMAP,J=7750,S0A,AND,D=2>
  4328	036713	442000	000040
  4329	036714	777777	777777			-1
  4330
  4331					; Arguments
  4332
  4333	036715	000000	000000		ALUFR:	0				; default range of 
  4334	036716	000000	000020		ALUTO:	20				;   registers
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 99
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0273

  4335
  4336					;#********************************************************************
  4337					;* DELOCS - Examine local storage 
  4338					;
  4339					; Format:  ELOCS adr1,adr2
  4340					;#********************************************************************
  4341
  4342	036717	200 00 0 00 037210 	DELOCS:	MOVE	LOCFR			; set up default of local storage range
  4343	036720	202 00 0 00 120770'		MOVEM	RLOCB#			;   to be whatever was typed before
  4344	036721	200 00 0 00 037211 		MOVE	LOCTO			;   or if nothing typed, then 0-0
  4345	036722	202 00 0 00 120771'		MOVEM	RLOCE#
  4346
  4347					; Get arguments
  4348
  4349	036723	200 01 0 00 111754 		MOVE	1,[FMSGCD <ELOCS addr1,addr2 (CR)>]
  4350	036724	260 17 0 00 036616*		GO	.OARG			; get first address
  4351	036725	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4352	036726	254 00 0 00 036740 		 JRST	DELOC0			; no arguments given - continue
  4353	036727	200 00 0 00 036621*		MOVE	ARGUM			; get argument
  4354	036730	202 00 0 00 120770'		MOVEM	RLOCB			; save in 'from' location
  4355	036731	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  4356
  4357	036732	210 01 0 00 111754 		MOVN	1,[FMSGCD <ELOCS addr1,addr2 (CR)>]
  4358	036733	260 17 0 00 036724*		GO	.OARG			; get 2nd address
  4359	036734	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4360	036735	254 00 0 00 036740 		 JRST	DELOC0			; no arguments given - continue
  4361	036736	200 00 0 00 036727*		MOVE	ARGUM			; get argument
  4362	036737	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  4363
  4364					; Now range check the arguments
  4365
  4366	036740	331 01 0 00 120770'	DELOC0:	SKIPL	1,RLOCB			; 1st argument in range?
  4367	036741	303 01 0 00 001777 		CAILE	1,1777
  4368						JRST	[FMSGCD	<? Range of local storage locations is 0-1777>
  4369							 SETOM	ALTF
  4370							 GO	FIOFF
  4371	036742	254 00 0 00 111767 			 RTN]
  4372	036743	331 01 0 00 120771'		SKIPL	1,RLOCE			; 2nd argument in range?
  4373	036744	303 01 0 00 001777 		CAILE	1,1777
  4374						JRST	[FMSGCD	<? Range of local storage locations is 0-1777>
  4375							 GO	FIOFF
  4376	036745	254 00 0 00 111773 			 RTN]
  4377	036746	274 01 0 00 120770'		SUB	1,RLOCB			; see if range ok
  4378						JUMPL	1,[FMSGCD <? Range nonsensical>
  4379							   GO	FIOFF
  4380	036747	321 01 0 00 110071 			   RTN]
  4381	036750	200 00 0 00 120770'		MOVE	RLOCB			; get 'from' argument
  4382	036751	202 00 0 00 037210 		MOVEM	LOCFR			; save it
  4383	036752	200 00 0 00 120771'		MOVE	RLOCE			; get 'to' argument
  4384	036753	202 00 0 00 037211 		MOVEM	LOCTO			; save it
  4385	036754	201 00 0 00 000011 		MOVEI	9			; get ELOCS flag
  4386	036755	202 00 0 00 120723'		MOVEM	DFLAG			; save it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 100
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0274

  4387
  4388					; Save CRAM locations
  4389
  4390	036756	200 01 0 00 111776 	DEBELO:	MOVE	1,[-2,,7750]		; set up AOBJN word
  4391	036757	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  4392	036760	200 07 0 00 120770'		MOVE	7,RLOCB			; get initial address
  4393
  4394					; Now do each location
  4395
  4396	036761	200 06 0 00 120770'	DELOC1:	MOVE	6,RLOCB			; get current address
  4397	036762	274 06 0 00 000007 		SUB	6,7			; calculate word # (0..n)
  4398	036763	602 06 0 00 000003 		TRNE	6,3			; multiple of 4?
  4399	036764	037 00 0 00 103540 		TMSG	< >			; no - print a few spaces
  4400	036765	606 06 0 00 000003 		TRNN	6,3			; multiple of 4?
  4401						GO	[TMSGC	<LS>		; yes - start a new line
  4402							 MOVE	RLOCB
  4403							 PNTOCS
  4404							 TMSG	</ >
  4405	036766	260 17 0 00 112000 			 RTN]
  4406	036767	200 00 0 00 120770'		MOVE	RLOCB			;  get local storage address
  4407	036770	137 00 0 00 112005 		DPB	[POINT 10,DELOCM,35]	; save it in microword
  4408	036771	201 01 0 00 037165 		MOVEI	1,DELOCM		; set up microcode address
  4409	036772	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4410	036773	255 00 0 00 000000 		JFCL				; ignore error
  4411	036774	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4412	036775	242 01 0 00 000001 		LSH	1,1			; position correctly
  4413	036776	260 17 0 00 036660*		GO	LDRAR			; load the RAR
  4414	036777	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  4415	037000	260 17 0 00 036662*		GO	LDCSR			; write to CSR register
  4416	037001	201 01 0 00 200000 		MOVEI	1,TSTEBF		; set up to read EBUF data
  4417	037002	260 17 0 00 037000*		GO	LDCSR			; write to CSR register
  4418	037003	260 17 0 00 036501*		GO	RDEBUF			; read EBUF contents
  4419	037004	200 00 0 00 000001 		MOVE	1			; get register data
  4420	037005	037 13 0 00 000000 		PNTHW				; print it
  4421	037006	037 07 0 00 000003 		TTALTM				; altmode key struck?
  4422	037007	334 00 0 00 000000 		SKIPA				; no - proceed
  4423						JRST	[SETOM	ALTF		; yes - set altmode typed flag 
  4424							 SETZM	MULFLG		;   and clear 'examine next' flag
  4425	037010	254 00 0 00 112006 			 JRST	DELOCX]		;   and exit
  4426	037011	350 01 0 00 120770'		AOS	1,RLOCB			; point to next location
  4427	037012	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next location
  4428	037013	317 01 0 00 120771'		CAMG	1,RLOCE			; done yet?
  4429	037014	254 00 0 00 036761 		JRST	DELOC1			; no - loop till done
  4430
  4431					; Restore CRAM locations and exit
  4432
  4433	037015	336 00 0 00 120743'	DELOCX:	SKIPN	MULFLG			; in 'examine next'?
  4434	037016	037 00 0 00 030242 		PCRL				; no - print blank line
  4435	037017	200 01 0 00 111776 		MOVE	1,[-2,,7750]		; set up AOBJN word
  4436	037020	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4437	037021	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 101
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0275

  4438
  4439					;#********************************************************************
  4440					;* DDLOCS - Deposit local storage 
  4441					;
  4442					; Format:  DLOCS adr,data
  4443					;#********************************************************************
  4444
  4445	037022	200 01 0 00 112016 	DDLOCS:	MOVE	1,[FMSGCD <DLOCS addr,data (CR)>]
  4446	037023	260 17 0 00 036733*		GO	.OARG			; get address
  4447	037024	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4448						 JRST	[FMSGCD	<? Missing argument>
  4449							 GO	FIOFF
  4450	037025	254 00 0 00 104450 			 RTN]
  4451	037026	200 00 0 00 036736*	DDLOC0:	MOVE	ARGUM			; get argument
  4452	037027	301 00 0 00 000000 		CAIL	0			; in range 0-1777?
  4453	037030	303 00 0 00 001777 		CAILE	1777
  4454						JRST	[FMSGCD	<? Range of Local Storage addresses is 0-1777>
  4455							 GO	FIOFF
  4456	037031	254 00 0 00 112031 			 RTN]
  4457	037032	202 00 0 00 037210 		MOVEM	LOCFR			; save 'from' argument
  4458	037033	202 00 0 00 037211 		MOVEM	LOCTO			; save 'to' argument
  4459	037034	200 01 0 00 112016 		MOVE	1,[FMSGCD <DLOCS addr,data (CR)>]
  4460	037035	260 17 0 00 037023*		GO	.OARG			; get data
  4461	037036	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4462						 JRST	[FMSGCD	<? Missing argument>
  4463							 GO	FIOFF
  4464	037037	254 00 0 00 104450 			 RTN]
  4465	037040	200 00 0 00 037026*		MOVE	ARGUM			; get argument
  4466	037041	202 00 0 00 120736'		MOVEM	LARG2#			; save it
  4467	037042	201 00 0 00 000012 		MOVEI	^D10			; get DLOCS flag
  4468	037043	202 00 0 00 120723'		MOVEM	DFLAG			; save it
  4469
  4470					; Save CRAM locations
  4471
  4472	037044	200 01 0 00 111733 		MOVE	1,[-5,,7750]		; set up AOBJN word
  4473	037045	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  4474
  4475					; Load microcode
  4476
  4477	037046	200 00 0 00 037210 		MOVE	LOCFR			; get location to write
  4478	037047	137 00 0 00 112034 		DPB	[POINT 10,DDLOCM+8,35]	; set up local storage address
  4479	037050	202 00 0 00 035720 		MOVEM	ANEXT			; save address
  4480	037051	350 00 0 00 035720 		AOS	ANEXT			; set to next address
  4481	037052	201 01 0 00 037172 		MOVEI	1,DDLOCM		; set up microcode address
  4482	037053	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4483	037054	255 00 0 00 000000 		JFCL				; ignore error
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 102
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0276

  4484
  4485					; Now do the deposit
  4486
  4487	037055	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4488	037056	242 01 0 00 000001 		LSH	1,1			; position correctly
  4489	037057	260 17 0 00 036776*		GO	LDRAR			; load the register
  4490	037060	201 01 0 00 000010 		MOVEI	1,MPRUN			; no - set initial data
  4491	037061	260 17 0 00 037002*		GO	LDCSR
  4492	037062	200 01 0 00 120736'		MOVE	1,LARG2			; get data to write
  4493	037063	260 17 0 00 036567*		GO	.DATAO			; give to port
  4494	037064	400 01 0 00 000000 		SETZ	1,			; stop the port
  4495	037065	260 17 0 00 037061*		GO	LDCSR
  4496
  4497					; Check if additional arguments
  4498
  4499	037066	336 00 0 00 036572*		SKIPN	ARGFLG			; any more arguments
  4500	037067	254 00 0 00 037073 		JRST	DDLOCX			; no - exit
  4501	037070	200 00 0 00 035720 		MOVE	ANEXT			; get register number
  4502	037071	202 00 0 00 037040*		MOVEM	ARGUM			; save it
  4503	037072	254 00 0 00 037026 		JRST	DDLOC0			; loop till done
  4504
  4505					; Restore CRAM locations and exit
  4506
  4507	037073	200 01 0 00 111733 	DDLOCX:	MOVE	1,[-5,,7750]		; set up AOBJN word
  4508	037074	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4509	037075	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 103
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0277

  4510
  4511					;#********************************************************************
  4512					;* DZLOCS - Zero local storage 
  4513					;
  4514					; Format:  ZLOCS adr1,adr2
  4515					;#********************************************************************
  4516
  4517	037076	200 00 0 00 037210 	DZLOCS:	MOVE	LOCFR			; set up default of local storage range
  4518	037077	202 00 0 00 120770'		MOVEM	RLOCB			;   to be whatever was typed before
  4519	037100	200 00 0 00 037211 		MOVE	LOCTO			;   or if nothing typed, then 0-0
  4520	037101	202 00 0 00 120771'		MOVEM	RLOCE
  4521
  4522					; Get arguments
  4523
  4524	037102	200 01 0 00 112043 		MOVE	1,[FMSGCD <ZLOCS addr1,addr2 (CR)>]
  4525	037103	260 17 0 00 037035*		GO	.OARG			; get first address
  4526	037104	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4527	037105	254 00 0 00 037117 		 JRST	DZLOC0			; no arguments given - continue
  4528	037106	200 00 0 00 037071*		MOVE	ARGUM			; get argument
  4529	037107	202 00 0 00 120770'		MOVEM	RLOCB			; save in 'from' location
  4530	037110	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  4531
  4532	037111	210 01 0 00 112043 		MOVN	1,[FMSGCD <ZLOCS addr1,addr2 (CR)>]
  4533	037112	260 17 0 00 037103*		GO	.OARG			; get 2nd address
  4534	037113	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4535	037114	254 00 0 00 037117 		 JRST	DZLOC0			; no arguments given - continue
  4536	037115	200 00 0 00 037106*		MOVE	ARGUM			; get argument
  4537	037116	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  4538
  4539					; Now range check the arguments
  4540
  4541	037117	331 01 0 00 120770'	DZLOC0:	SKIPL	1,RLOCB			; 1st argument in range?
  4542	037120	303 01 0 00 001777 		CAILE	1,1777
  4543						JRST	[FMSGCD	<? Range of local storage locations is 0-1777>
  4544							 GO	FIOFF
  4545	037121	254 00 0 00 111773 			 RTN]
  4546	037122	331 01 0 00 120771'		SKIPL	1,RLOCE			; 2nd argument in range?
  4547	037123	303 01 0 00 001777 		CAILE	1,1777
  4548						JRST	[FMSGCD	<? Range of local storage locations is 0-1777>
  4549							 GO	FIOFF
  4550	037124	254 00 0 00 111773 			 RTN]
  4551	037125	274 01 0 00 120770'		SUB	1,RLOCB			; see if range ok
  4552						JUMPL	1,[FMSGCD <? Range nonsensical>
  4553							   GO	FIOFF
  4554	037126	321 01 0 00 110071 			   RTN]
  4555	037127	200 00 0 00 120770'		MOVE	RLOCB			; get 'from' argument
  4556	037130	202 00 0 00 037210 		MOVEM	LOCFR			; save it
  4557	037131	200 00 0 00 120771'		MOVE	RLOCE			; get 'to' argument
  4558	037132	202 00 0 00 037211 		MOVEM	LOCTO			; save it
  4559	037133	201 00 0 00 000013 		MOVEI	^D11			; get ZLOCS flag
  4560	037134	202 00 0 00 120723'		MOVEM	DFLAG			; save it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 104
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0278

  4561
  4562					; Save CRAM location
  4563
  4564	037135	200 01 0 00 111715 		MOVE	1,[-1,,7750]		; set up AOBJN word
  4565	037136	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  4566
  4567					; Now do each location
  4568
  4569	037137	200 00 0 00 120770'	DZLOC1:	MOVE	RLOCB			; get local storage address
  4570	037140	137 00 0 00 112044 		DPB	[POINT 10,DZLOCM,35]	; set up local storage address
  4571	037141	201 01 0 00 037205 		MOVEI	1,DZLOCM		; set up microcode address
  4572	037142	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4573	037143	255 00 0 00 000000 		JFCL				; ignore error
  4574	037144	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  4575	037145	242 01 0 00 000001 		LSH	1,1			; position correctly
  4576	037146	260 17 0 00 037057*		GO	LDRAR			; load the RAR
  4577	037147	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  4578	037150	260 17 0 00 037065*		GO	LDCSR
  4579	037151	400 01 0 00 000000 		SETZ	1,			; stop the port
  4580	037152	260 17 0 00 037150*		GO	LDCSR
  4581	037153	037 07 0 00 000003 		TTALTM				; altmode key struck?
  4582	037154	334 00 0 00 000000 		SKIPA				; no - proceed
  4583	037155	254 00 0 00 037162 		JRST	DZLOCX			; yes - exit
  4584	037156	350 01 0 00 120770'		AOS	1,RLOCB			; point to next register
  4585	037157	202 01 0 00 035720 		MOVEM	1,ANEXT			; save next location
  4586	037160	317 01 0 00 120771'		CAMG	1,RLOCE			; done yet?
  4587	037161	254 00 0 00 037137 		JRST	DZLOC1			; no - loop till done
  4588
  4589					; Restore CRAM location and exit
  4590
  4591	037162	200 01 0 00 111715 	DZLOCX:	MOVE	1,[-1,,7750]		; set up AOBJN word
  4592	037163	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4593	037164	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 105
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0279

  4594
  4595					; Microcode to examine local storage
  4596
  4597	037165	775077	510000		DELOCM:	MWORD	<ADDR=7750,JMAP,J=7751,SD0,OR,D=2,RDLM>
  4598	037166	732000	220040
  4599	037167	775177	512004			MWORD	<JMAP,J=7751,S0A,OR,D=1,OENA,SELE,MGC=4>
  4600	037170	431000	005040
  4601	037171	777777	777777			-1
  4602
  4603					; Microcode to deposit local storage
  4604
  4605	037172	775077	510000		DDLOCM:	MWORD	<ADDR=7750,JMAP,J=7751,D=1>		; 7750
  4606	037173	001000	000040
  4607	037174	775177	530000			MWORD	<CJP,J=7753,D=1,CENA,CCER>		; 7751
  4608	037175	001400	100060
  4609	037176	775277	510000			MWORD	<JMAP,J=7751,D=1>			; 7752
  4610	037177	001000	000040
  4611	037200	775300	000010			MWORD	<CONT,SD0,OR,D=2,SELE,MGC=10>		; 7753
  4612	037201	732000	005340
  4613	037202	775477	542000			MWORD	<JMAP,J=7754,S0A,OR,D=1,OENA,LDLM,MGC=0>; 7754
  4614	037203	431000	230040
  4615	037204	777777	777777			-1
  4616
  4617					; Microcode to zero local storage
  4618
  4619	037205	775077	502000		DZLOCM:	MWORD	<ADDR=7750,JMAP,J=7750,S0A,AND,D=1,LDLM,OENA>
  4620	037206	441000	230040
  4621	037207	777777	777777			-1
  4622
  4623					; Arguments
  4624
  4625	037210	000000	000000		LOCFR:	0				; default range of 
  4626	037211	000000	000000		LOCTO:	0				;   locations
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 106
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0280

  4627
  4628					;#********************************************************************
  4629					;* DMARK - Set mark bit in CRAM locations
  4630					;#********************************************************************
  4631
  4632					; First check for any argument
  4633
  4634	037212	336 00 0 00 037066*	DMARK:	SKIPN	ARGFLG			; argument given?
  4635						JRST	[FMSGCD	<? Missing argument>
  4636							 GO	FIOFF
  4637	037213	254 00 0 00 104450 			 RTN]
  4638
  4639					; Obtain argument
  4640
  4641	037214	200 01 0 00 112053 	DMARK0:	MOVE	1,[FMSGCD <MARK addr,addr,... (CR)>]
  4642	037215	260 17 0 00 037112*		GO	.OARG			; get argument
  4643	037216	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4644	037217	263 17 0 00 000000 		 RTN				; done - no more arguments
  4645	037220	331 01 0 00 037115*		SKIPL	1,ARGUM			; argument out of range?
  4646	037221	303 01 0 00 007777 		CAILE	1,7777			;   (0-7777)
  4647						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4648							 GO	FIOFF
  4649	037222	254 00 0 00 107217 			 RTN]
  4650
  4651					; Then ensure the port is stopped
  4652
  4653	037223	260 17 0 00 035705*		GO	ISTOP			; stop the port
  4654
  4655					; Now obtain CRAM data and set MARK bit
  4656
  4657	037224	202 01 0 00 035713 		MOVEM	1,CADDR			; set up address to load
  4658	037225	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  4659	037226	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  4660	037227	260 17 0 00 036372 		GO	DRCRAM			; read the data
  4661	037230	200 02 0 00 035714 		MOVE	2,CWORDL		; get left half
  4662	037231	200 03 0 00 035715 		MOVE	3,CWORDR		; get right half
  4663	037232	660 03 0 00 000001 		TRO	3,1			; set mark bit
  4664	037233	202 03 0 00 035715 		MOVEM	3,CWORDR		; save data
  4665	037234	261 17 0 00 034000 		PUT	PARFLG			; save state of parity flag
  4666	037235	402 00 0 00 034000 		SETZM	PARFLG			; clear parity flag
  4667	037236	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data
  4668	037237	262 17 0 00 034000 		GET	PARFLG			; restore state of parity flag
  4669	037240	254 00 0 00 037214 		JRST	DMARK0			; get next address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 107
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0281

  4670
  4671					;#********************************************************************
  4672					;* DRMARK - Remove mark bit in CRAM locations
  4673					;#********************************************************************
  4674
  4675					; First check for any argument
  4676
  4677	037241	336 00 0 00 037212*	DRMARK:	SKIPN	ARGFLG			; argument given?
  4678						JRST	[FMSGCD	<? Missing argument>
  4679							 GO	FIOFF
  4680	037242	254 00 0 00 104450 			 RTN]
  4681
  4682					; Obtain argument
  4683
  4684	037243	200 01 0 00 112062 	DRMAR0:	MOVE	1,[FMSGCD <RMARK addr,addr,... (CR)>]
  4685	037244	260 17 0 00 037215*		GO	.OARG			; get argument
  4686	037245	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4687	037246	263 17 0 00 000000 		 RTN				; done - no more arguments
  4688	037247	331 01 0 00 037220*		SKIPL	1,ARGUM			; argument out of range?
  4689	037250	303 01 0 00 007777 		CAILE	1,7777			;   (0-7777)
  4690						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4691							 GO	FIOFF
  4692	037251	254 00 0 00 107217 			 RTN]
  4693
  4694					; Then ensure the port is stopped
  4695
  4696	037252	260 17 0 00 037223*		GO	ISTOP			; stop the port
  4697
  4698					; Now obtain CRAM data and set MARK bit
  4699
  4700	037253	202 01 0 00 035713 		MOVEM	1,CADDR			; set up address to load
  4701	037254	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  4702	037255	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  4703	037256	260 17 0 00 036372 		GO	DRCRAM			; read the data
  4704	037257	200 02 0 00 035714 		MOVE	2,CWORDL		; get left half
  4705	037260	200 03 0 00 035715 		MOVE	3,CWORDR		; get right half
  4706	037261	620 03 0 00 000001 		TRZ	3,1			; clear mark bit
  4707	037262	202 03 0 00 035715 		MOVEM	3,CWORDR		; save data
  4708	037263	261 17 0 00 034000 		PUT	PARFLG			; save state of parity flag
  4709	037264	402 00 0 00 034000 		SETZM	PARFLG			; clear parity flag
  4710	037265	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data
  4711	037266	262 17 0 00 034000 		GET	PARFLG			; restore state of parity flag
  4712	037267	254 00 0 00 037243 		JRST	DRMAR0			; get next address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 108
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0282

  4713
  4714					;#********************************************************************
  4715					;* DCMARK - Clear all mark bits
  4716					;
  4717					; If arguments are given, they are assumed to the the locations between
  4718					; which all mark bits are to be removed.
  4719					;#********************************************************************
  4720
  4721					; Start to process the arguments typed - both should be CRAM
  4722					; addresses in octal.
  4723
  4724	037270	400 05 0 00 000000 	DCMARK:	SETZ	5,			; init range of addresses
  4725	037271	201 06 0 00 007777 		MOVEI	6,7777			;   to 0-7777
  4726
  4727					; Get first address
  4728
  4729	037272	200 01 0 00 112071 		MOVE	1,[FMSGCD <CMARK addr1,addr2 (CR)>]
  4730	037273	260 17 0 00 037244*		GO	.OARG			; get first address
  4731	037274	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4732	037275	254 00 0 00 037307 		 JRST	DCMAR0			; no arguments given - continue
  4733	037276	200 00 0 00 037247*		MOVE	ARGUM			; get argument
  4734	037277	202 00 0 00 000005 		MOVEM	5			; save in 'from' location
  4735	037300	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  4736
  4737					; Get 2nd address
  4738
  4739	037301	210 01 0 00 112071 		MOVN	1,[FMSGCD <CMARK addr1,addr2 (CR)>]
  4740	037302	260 17 0 00 037273*		GO	.OARG			; get first address
  4741	037303	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4742	037304	254 00 0 00 037307 		 JRST	DCMAR0			; no arguments given - continue
  4743	037305	200 00 0 00 037276*		MOVE	ARGUM			; get argument
  4744	037306	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  4745
  4746					; Now range check the arguments
  4747
  4748	037307	331 00 0 00 000005 	DCMAR0:	SKIPL	5			; 1st argument in range?
  4749	037310	303 05 0 00 007777 		CAILE	5,7777		
  4750						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4751							 GO	FIOFF
  4752	037311	254 00 0 00 107217 			 RTN]
  4753	037312	331 01 0 00 000006 		SKIPL	1,6			; 2nd argument in range?
  4754	037313	303 06 0 00 007777 		CAILE	6,7777		
  4755						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4756							 GO	FIOFF
  4757	037314	254 00 0 00 107217 			 RTN]
  4758	037315	274 01 0 00 000005 		SUB	1,5			; see if range ok
  4759						JUMPL	1,[FMSGCD <? Range nonsensical>
  4760							   GO	FIOFF
  4761	037316	321 01 0 00 110071 			   RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 109
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0283

  4762
  4763					; Then ensure the port is stopped
  4764
  4765	037317	260 17 0 00 037252*		GO	ISTOP			; stop the port
  4766
  4767					; Now obtain CRAM data and load back into CRAM without MARK bit set
  4768
  4769	037320	202 05 0 00 035713 	DCMAR1:	MOVEM	5,CADDR			; set up address to load
  4770	037321	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  4771	037322	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  4772	037323	260 17 0 00 036372 		GO	DRCRAM			; read the data
  4773	037324	200 02 0 00 035714 		MOVE	2,CWORDL		; get left half
  4774	037325	200 03 0 00 035715 		MOVE	3,CWORDR		; get right half
  4775	037326	626 03 0 00 000001 		TRZN	3,1			; clear mark bit - set?
  4776	037327	254 00 0 00 037335 		JRST	DCMAR2			; no - continue
  4777	037330	202 03 0 00 035715 		MOVEM	3,CWORDR		; save data
  4778	037331	261 17 0 00 034000 		PUT	PARFLG			; save state of parity flag
  4779	037332	402 00 0 00 034000 		SETZM	PARFLG			; clear parity flag
  4780	037333	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data
  4781	037334	262 17 0 00 034000 		GET	PARFLG			; restore state of parity flag
  4782	037335	350 00 0 00 000005 	DCMAR2:	AOS	5			; increment 'from' address
  4783	037336	317 05 0 00 000006 		CAMG	5,6			; exceed 'to' address?
  4784	037337	254 00 0 00 037320 		JRST	DCMAR1			; no - get next address
  4785	037340	263 17 0 00 000000 		RTN				; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 110
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0284

  4786
  4787					;#********************************************************************
  4788					;* DLMARK - List locations with mark bit set
  4789					;
  4790					; If arguments are given, they are assumed to the the locations between
  4791					; which all mark bits are to be listed.
  4792					;#********************************************************************
  4793
  4794					; Start to process the arguments typed - both should be CRAM
  4795					; addresses in octal.
  4796
  4797	037341	400 05 0 00 000000 	DLMARK:	SETZ	5,			; init range of addresses
  4798	037342	201 06 0 00 007777 		MOVEI	6,7777			;   to 0-7777
  4799
  4800					; Get first address
  4801
  4802	037343	200 01 0 00 112100 		MOVE	1,[FMSGCD <LMARK addr1,addr2 (CR)>]
  4803	037344	260 17 0 00 037302*		GO	.OARG			; get first address
  4804	037345	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4805	037346	254 00 0 00 037360 		 JRST	DLMAR0			; no arguments given - continue
  4806	037347	200 00 0 00 037305*		MOVE	ARGUM			; get argument
  4807	037350	202 00 0 00 000005 		MOVEM	5			; save in 'from' location
  4808	037351	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  4809
  4810					; Get 2nd address
  4811
  4812	037352	210 01 0 00 112100 		MOVN	1,[FMSGCD <LMARK addr1,addr2 (CR)>]
  4813	037353	260 17 0 00 037344*		GO	.OARG			; get first address
  4814	037354	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4815	037355	254 00 0 00 037360 		 JRST	DLMAR0			; no arguments given - continue
  4816	037356	200 00 0 00 037347*		MOVE	ARGUM			; get argument
  4817	037357	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  4818
  4819					; Now range check the arguments
  4820
  4821	037360	331 00 0 00 000005 	DLMAR0:	SKIPL	5			; 1st argument in range?
  4822	037361	303 05 0 00 007777 		CAILE	5,7777		
  4823						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4824							 GO	FIOFF
  4825	037362	254 00 0 00 107217 			 RTN]
  4826	037363	331 01 0 00 000006 		SKIPL	1,6			; 2nd argument in range?
  4827	037364	303 06 0 00 007777 		CAILE	6,7777		
  4828						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  4829							 GO	FIOFF
  4830	037365	254 00 0 00 107217 			 RTN]
  4831	037366	274 01 0 00 000005 		SUB	1,5			; see if range ok
  4832						JUMPL	1,[FMSGCD <? Range nonsensical>
  4833							   GO	FIOFF
  4834	037367	321 01 0 00 110071 			   RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 111
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0285

  4835
  4836					; Then ensure the port is stopped
  4837
  4838	037370	260 17 0 00 037317*		GO	ISTOP			; stop the port
  4839	037371	200 07 0 00 112101 		MOVE	7,[-2]			; initialize mark bit count
  4840	037372	037 00 0 00 112102 		TMSGC	<Mark bit set at:  >
  4841
  4842					; Now obtain CRAM data and check mark bit
  4843
  4844	037373	202 05 0 00 035713 	DLMAR1:	MOVEM	5,CADDR			; set up address to load
  4845	037374	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  4846	037375	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  4847	037376	260 17 0 00 036372 		GO	DRCRAM			; read the data
  4848	037377	200 03 0 00 035715 		MOVE	3,CWORDR		; get right word
  4849	037400	606 03 0 00 000001 		TRNN	3,1			; mark bit set?
  4850	037401	254 00 0 00 037407 		JRST	DLMAR2			; no - continue
  4851
  4852					; Print location
  4853
  4854	037402	350 00 0 00 000007 		AOS	7			; next 5 characters
  4855	037403	303 07 0 00 000007 		CAILE	7,7			; done with line?
  4856						GO	[SETO	7,		; yes - init counter
  4857							 TMSGC	<                  >
  4858	037404	260 17 0 00 112114 			 RTN]
  4859	037405	001 04 0 00 000005 		PNTOCC	4,5			; print address
  4860	037406	037 00 0 00 000040 		PSP				; print a space
  4861
  4862					; Increment to next location
  4863
  4864	037407	037 07 0 00 000003 	DLMAR2:	TTALTM				; altmode key struck?
  4865	037410	334 00 0 00 000000 		SKIPA				; no - proceed
  4866	037411	254 00 0 00 037415 		JRST	DLMARX			; yes - exit
  4867	037412	350 00 0 00 000005 		AOS	5			; increment 'from' address
  4868	037413	317 05 0 00 000006 		CAMG	5,6			; exceed 'to' address?
  4869	037414	254 00 0 00 037373 		JRST	DLMAR1			; no - get next address
  4870	037415	037 00 0 00 030242 	DLMARX:	PCRL				; yes - print blank line
  4871	037416	263 17 0 00 000000 		RTN				;   and exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 112
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0286

  4872
  4873					;#********************************************************************
  4874					;* DDPLI - Deposit data to PLI
  4875					;
  4876					; Format:  DPLI lnkctl,data,repcount
  4877					;#********************************************************************
  4878
  4879					; Get first argument - link control bits
  4880
  4881	037417	200 01 0 00 037610 	DDPLI:	MOVE	1,DPLIH			; get help text
  4882	037420	260 17 0 00 037353*		GO	.OARG			; get address
  4883	037421	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4884						 JRST	[FMSGCD	<? Missing argument>
  4885							 GO	FIOFF
  4886	037422	254 00 0 00 104450 			 RTN]
  4887	037423	331 01 0 00 037356*	DDPLI0:	SKIPL	1,ARGUM			; get argument
  4888	037424	303 01 0 00 000017 		CAILE	1,17			; in range 0-17?
  4889						JRST	[FMSGCD	<? Range of PLI link control bits is 0-17>
  4890							 GO	FIOFF
  4891	037425	254 00 0 00 112130 			 RTN]
  4892	037426	202 01 0 00 037605 		MOVEM	1,PLILNK		; save link control bits
  4893
  4894					; Get second argument - data
  4895
  4896	037427	200 01 0 00 037610 		MOVE	1,DPLIH			; get help text
  4897	037430	260 17 0 00 037420*		GO	.OARG			; get data
  4898	037431	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4899						 JRST	[FMSGCD	<? Missing argument>
  4900							 GO	FIOFF
  4901	037432	254 00 0 00 104450 			 RTN]
  4902	037433	200 00 0 00 037423*		MOVE	ARGUM			; get argument
  4903	037434	202 00 0 00 037606 		MOVEM	PLIDAT			; save it
  4904
  4905					; Get third argument - repeat count
  4906
  4907	037435	210 01 0 00 037610 		MOVN	1,DPLIH			; get help text
  4908	037436	260 17 0 00 037430*		GO	.OARG			; get data
  4909	037437	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4910	037440	402 00 0 00 037433*		 SETZM	ARGUM			; no argument - set to 0
  4911	037441	200 00 0 00 037440*		MOVE	ARGUM			; get argument
  4912	037442	202 00 0 00 037607 		MOVEM	PLIREP			; save it
  4913	037443	201 00 0 00 000014 		MOVEI	^D12			; get DPLI flag
  4914	037444	202 00 0 00 120723'		MOVEM	DFLAG			; save it
  4915
  4916					; Save CRAM locations
  4917
  4918	037445	200 01 0 00 112133 		MOVE	1,[-4,,7750]		; set up AOBJN word
  4919	037446	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 113
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0287

  4920
  4921					; Insert data into appropriate microwords
  4922
  4923	037447	200 00 0 00 037605 		MOVE	PLILNK			; get link control bits
  4924	037450	202 00 0 00 035720 		MOVEM	ANEXT			; save location
  4925	037451	137 00 0 00 112134 		DPB	[POINT 6,DDPLM2,31]	; save link control bits
  4926	037452	200 00 0 00 037606 		MOVE	PLIDAT			; get PLI data bits
  4927	037453	137 00 0 00 112135 		DPB	[POINT 10,DDPLIM,35]	; save it in microword
  4928
  4929					; Load microcode
  4930
  4931	037454	201 01 0 00 037476 		MOVEI	1,DDPLIM		; set up microcode address
  4932	037455	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  4933	037456	255 00 0 00 000000 		JFCL				; ignore error
  4934
  4935					; Do the deposit
  4936
  4937	037457	201 01 0 00 007750 	DDPLI1:	MOVEI	1,7750			; get start address
  4938	037460	242 01 0 00 000001 		LSH	1,1			; position correctly
  4939	037461	260 17 0 00 037146*		GO	LDRAR			; load the RAR
  4940	037462	201 01 0 00 000010 		MOVEI	1,MPRUN			; set up initial data
  4941	037463	260 17 0 00 037152*		GO	LDCSR			; start the port
  4942	037464	400 01 0 00 000000 		SETZ	1,			; clear AC1
  4943	037465	260 17 0 00 037463*		GO	LDCSR			; stop the port
  4944
  4945					; Check altmode and decrement repeat count
  4946
  4947	037466	037 07 0 00 000003 		TTALTM				; altmode key struck?
  4948	037467	334 00 0 00 000000 		SKIPA				; no - proceed
  4949	037470	254 00 0 00 037473 		JRST	DDPLIX			; yes - exit
  4950	037471	373 00 0 00 037607 		SOSLE	PLIREP			; decrement repeat count - expired?
  4951	037472	254 00 0 00 037457 		JRST	DDPLI1			; no - loop till done
  4952
  4953					; Restore CRAM locations and exit
  4954
  4955	037473	200 01 0 00 112133 	DDPLIX:	MOVE	1,[-^D4,,7750]		; set up AOBJN word
  4956	037474	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  4957	037475	263 17 0 00 000000 		RTN				; return
  4958
  4959					; Microword to use to load PLI data
  4960
  4961	037476	775077	510000		DDPLIM:	MWORD	<ADDR=7750,JMAP,J=7751,SD0,OR,D=2,MGC=0,SKCN>	; 7750
  4962	037477	732000	240040
  4963	037500	775100	002040			MWORD	<CONT,S0A,OR,D=1,OENA,MGC=40,SELM>		; 7751
  4964	037501	431000	002340
  4965	037502	775200	000014		DDPLM2:	MWORD	<CONT,D=1,SELP,MGC=14>				; 7752
  4966	037503	001000	001340
  4967	037504	775377	530000			MWORD	<JMAP,J=7753,D=1>				; 7753
  4968	037505	001000	000040
  4969	037506	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 114
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0288

  4970
  4971					;#********************************************************************
  4972					;* DEPLI - Examine PLI registers
  4973					;
  4974					; Format:  EPLI lnkctrl,repcount
  4975					;#********************************************************************
  4976
  4977	037507	201 00 0 00 000015 	DEPLI:	MOVEI	^D13			; get EPLI flag
  4978	037510	202 00 0 00 120723'		MOVEM	DFLAG			; save it
  4979	037511	402 00 0 00 037607 		SETZM	PLIREP			; initialize repeat count
  4980	037512	200 00 0 00 037605 		MOVE	PLILNK			; get link control bits
  4981	037513	202 00 0 00 037441*		MOVEM	ARGUM			; save in argument location
  4982
  4983					; Get link control bits
  4984
  4985	037514	200 01 0 00 037611 		MOVE	1,EPLIH			; get help text
  4986	037515	260 17 0 00 037436*		GO	.OARG			; get link control bits
  4987	037516	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  4988	037517	255 00 0 00 000000 		 JFCL				; no arguments given - continue
  4989	037520	331 01 0 00 037513*	DEPLI0:	SKIPL	1,ARGUM			; get argument
  4990	037521	303 01 0 00 000017 		CAILE	1,17			; in range 0-17?
  4991						JRST	[FMSGCD	<? Range of PLI link control bits is 0-17>
  4992							 GO	FIOFF
  4993	037522	254 00 0 00 112130 			 RTN]
  4994	037523	202 01 0 00 037605 		MOVEM	1,PLILNK		; save link control bits
  4995
  4996					; Get 2nd argument - repeat count
  4997
  4998	037524	210 01 0 00 037611 		MOVN	1,EPLIH			; get help text
  4999	037525	260 17 0 00 037515*		GO	.OARG			; get data
  5000	037526	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5001	037527	402 00 0 00 037520*		SETZM	ARGUM			; no argument - set to 0
  5002	037530	200 00 0 00 037527*		MOVE	ARGUM			; get argument
  5003	037531	202 00 0 00 037607 		MOVEM	PLIREP			; save it
  5004	037532	200 00 0 00 037605 		MOVE	PLILNK			; get link control bits
  5005	037533	202 00 0 00 035720 		MOVEM	ANEXT			; save location
  5006
  5007					; Save CRAM locations
  5008
  5009	037534	200 01 0 00 112136 		MOVE	1,[-3,,7750]		; set up AOBJN word
  5010	037535	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5011
  5012					; Set up location and load microcode
  5013
  5014	037536	200 00 0 00 037605 		MOVE	PLILNK			; get link control bits
  5015	037537	137 00 0 00 112137 		DPB	[POINT 6,DEPLIM,31]	; save it in microword
  5016	037540	201 01 0 00 037576 		MOVEI	1,DEPLIM		; set up microcode address
  5017	037541	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5018	037542	255 00 0 00 000000 		JFCL				; ignore error
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 115
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0289

  5019
  5020					; Print header
  5021
  5022	037543	200 01 0 00 037605 		MOVE	1,PLILNK		; get link control bits
  5023						XCT	[TMSGC	<0-Unused:>	; print it
  5024							 TMSGC	<1-RdRSta:>
  5025							 TMSGC	<2-RsXSta:>
  5026							 TMSGC	<3-RdPRev:>
  5027							 TMSGC	<4-Unused:>
  5028							 TMSGC	<5-RdBuff:>
  5029							 TMSGC	<6-EnaLnk:>
  5030							 TMSGC	<7-SelBuf:>
  5031							 TMSGC	<10-LdXBuf:>
  5032							 TMSGC	<11-RdXSta:>
  5033							 TMSGC	<12-AboXmt:>
  5034							 TMSGC	<13-SetMod:>
  5035							 TMSGC	<14-Xmit:>
  5036							 TMSGC	<15-RdNode:>
  5037							 TMSGC	<16-DsaLnk:>
  5038	037544	256 00 0 01 112220 			 TMSGC	<17-Sync:>](1)
  5039	037545	476 00 0 00 120761'		SETOM	PLINUM#			; clear print count
  5040
  5041					; Do the examine and print results
  5042
  5043	037546	201 01 0 00 007750 	DEPLI1:	MOVEI	1,7750			; get start address
  5044	037547	242 01 0 00 000001 		LSH	1,1			; position correctly
  5045	037550	260 17 0 00 037461*		GO	LDRAR			; load the RAR
  5046	037551	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  5047	037552	260 17 0 00 037465*		GO	LDCSR			; write to CSR register
  5048	037553	201 01 0 00 200000 		MOVEI	1,TSTEBF		; set up to read EBUF data
  5049	037554	260 17 0 00 037552*		GO	LDCSR			; write to CSR register
  5050	037555	260 17 0 00 037003*		GO	RDEBUF			; read EBUF contents
  5051	037556	350 00 0 00 120761'		AOS	PLINUM			; increment print count
  5052	037557	037 00 0 00 112240 		TMSGC	< >			; start a new line
  5053	037560	200 00 0 00 120761'		MOVE	PLINUM			; get print count
  5054	037561	037 16 0 00 000003 		PNTOCS				; print it
  5055	037562	037 00 0 00 111633 		TMSG	</ >
  5056	037563	135 00 0 00 112241 		LDB	[POINT 8,1,35]		; get PLI data
  5057	037564	037 03 0 00 000000 		PNT3				; print it
  5058	037565	037 07 0 00 000003 		TTALTM				; altmode key struck?
  5059	037566	334 00 0 00 000000 		SKIPA				; no - proceed
  5060	037567	254 00 0 00 037572 		JRST	DEPLIX			; yes - exit
  5061	037570	373 00 0 00 037607 		SOSLE	PLIREP			; decrement count - expired?
  5062	037571	254 00 0 00 037546 		JRST	DEPLI1			; no - loop til done
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 116
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0290

  5063
  5064					; Restore CRAM locations and exit
  5065
  5066	037572	037 00 0 00 030242 	DEPLIX:	PCRL				; print a final CRLF
  5067	037573	200 01 0 00 112136 		MOVE	1,[-^D3,,7750]		; set up AOBJN word
  5068	037574	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  5069	037575	263 17 0 00 000000 		RTN				; return
  5070
  5071					; Microwords to use to get PLI data
  5072
  5073	037576	775077	510012		DEPLIM:	MWORD	<ADDR=7750,JMAP,J=7751,D=1,MGC=12,SELP>		; 7750
  5074	037577	001000	001040
  5075	037600	775100	000300			MWORD	<CONT,SD0,OR,D=2,SELM,MGC=300>			; 7751
  5076	037601	732000	002340
  5077	037602	775277	522004			MWORD	<JMAP,J=7752,S0A,OR,D=1,OENA,SELE,MGC=4>	; 7752
  5078	037603	431000	005040
  5079	037604	777777	777777			-1
  5080
  5081					; Arguments
  5082
  5083	037605	000000	000000		PLILNK:	0				; default link control bits
  5084	037606	000000	000000		PLIDAT:	0				; PLI data to write
  5085	037607	000000	000000		PLIREP:	0				; repeat count
  5086
  5087					; Help text
  5088
  5089					DPLIH:	FMSGCD <DPLI lnkctrl,data,repcount (CR) where lnkctrl is:
  5090					 0-Unused   4-Unused  10-LdXBuf  14-Xmit
  5091					 1-RdRSta   5-RdBuff  11-RdXSta  15-RdNode
  5092					 2-RsXSta   6-EnaLnk  12-AboXmt  16-DsaLnk
  5093	037610	037 01 0 00 112242 	 3-RdPRev   7-SelBuf  13-SetMod  17-Sync>
  5094
  5095					EPLIH:	FMSGCD <EPLI lnkctrl,repcount (CR) where lnkctrl is:
  5096					 0-Unused   4-Unused  10-LdXBuf  14-Xmit
  5097					 1-RdRSta   5-RdBuff  11-RdXSta  15-RdNode
  5098					 2-RsXSta   6-EnaLnk  12-AboXmt  16-DsaLnk
  5099	037611	037 01 0 00 112320 	 3-RdPRev   7-SelBuf  13-SetMod  17-Sync>
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 117
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0291

  5100
  5101					;#********************************************************************
  5102					;* DIPLI - Initialize PILA/Link modules
  5103					;#********************************************************************
  5104
  5105	037612	200 01 0 00 112400 	DIPLI:	MOVE	1,[FMSGCD (IPLI <CR>)]
  5106	037613	260 17 0 00 035617*		GO	CHKARG			; check for argument
  5107	037614	263 17 0 00 000000 		RTN				; error - exit
  5108
  5109					; Save CRAM locations
  5110
  5111	037615	200 01 0 00 112401 		MOVE	1,[-^D26,,4000]		; set up AOBJN word
  5112	037616	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5113
  5114					; Load microcode
  5115
  5116	037617	201 01 0 00 037635 		MOVEI	1,DIPLIM		; set up microcode address
  5117	037620	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5118	037621	255 00 0 00 000000 		JFCL				; ignore error
  5119
  5120					; Do the init
  5121
  5122	037622	201 01 0 00 004000 		MOVEI	1,4000			; get start address
  5123	037623	242 01 0 00 000001 		LSH	1,1			; position correctly
  5124	037624	260 17 0 00 037550*		GO	LDRAR			; load the RAR
  5125	037625	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  5126	037626	260 17 0 00 037554*		GO	LDCSR			; write to CSR register
  5127	037627	005 00 0 00 000001 		DELAY	1			; wait 1 millisecond
  5128	037630	400 01 0 00 000000 		SETZ	1,			; stop the port
  5129	037631	260 17 0 00 037626*		GO	LDCSR
  5130
  5131					; Restore CRAM locations and exit
  5132
  5133	037632	200 01 0 00 112401 		MOVE	1,[-^D26,,4000]		; set up AOBJN word
  5134	037633	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  5135	037634	263 17 0 00 000000 		RTN				; return
  5136
  5137					; Microcode to initialize the PILA/Link modules
  5138
  5139	037635	400040	010000		DIPLIM:	MWORD	<ADDR=4000,JMAP,J=4001,D=1>	     ; 4000  Start.
  5140	037636	001000	000040
  5141	037637	400140	020000			MWORD	<CJPP,J=4002,D=1>		     ; 4001  Initialize stack
  5142	037640	001000	000260
  5143	037641	400240	030000			MWORD	<CJPP,J=4003,D=1>		     ; 4002  pointer.
  5144	037642	001000	000260
  5145
  5146	037643	400300	000240			MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=240>	     ; 4003  Set MMode, Release
  5147	037644	732000	240340
  5148	037645	400400	002040			MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>   ; 4004  Rcv Buffer A, Turn
  5149	037646	431000	002340
  5150	037647	400540	270274			MWORD	<CJS,J=4027,SELP,MGC=274,D=1>	     ; 4005  on Green LED.
  5151	037650	001000	001020
  5152
  5153	037651	400600	000241			MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=241>	     ; 4006  Set MMode, Release
  5154	037652	732000	240340
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 117-1
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0292

  5155	037653	400700	002040			MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>   ; 4007  Rcv Buffer B, Turn
  5156	037654	431000	002340
  5157	037655	401040	270274			MWORD	<CJS,J=4027,SELP,MGC=274,D=1>	     ; 4010  on Green LED.
  5158	037656	001000	001020
  5159
  5160	037657	401100	000000			MWORD	<CONT,S0A,AND,D=2>		     ; 4011  Disable link
  5161	037660	442000	000340
  5162	037661	401200	000000			MWORD	<CONT,S0A,XNOR,D=2>		     ; 4012  control logic.
  5163	037662	472000	000340
  5164	037663	401300	002040			MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>   ; 4013
  5165	037664	431000	002340
  5166	037665	401440	270354			MWORD	<CJS,J=4027,SELP,MGC=354,D=1>	     ; 4014
  5167	037666	001000	001020
  5168
  5169	037667	401500	000040			MWORD	<CONT,SD0,OR,D=2,SKCN,MGC=40>	     ; 4015  Enable link
  5170	037670	732000	240340
  5171	037671	401600	002040			MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>   ; 4016  control logic.
  5172	037672	431000	002340
  5173	037673	401740	270354			MWORD	<CJS,J=4027,SELP,MGC=354,D=1>	     ; 4017
  5174	037674	001000	001020
  5175
  5176	037675	402040	270332			MWORD	<CJS,J=4027,SD0,OR,D=2,SELP,MGC=332> ; 4020  Read node address
  5177	037676	732000	001020
  5178	037677	402100	002010			MWORD	<CONT,S0A,OR,D=1,OENA,LDLM,MGC=10>   ; 4021  into R0 and LS10
  5179	037700	431000	230340
  5180
  5181	037701	402240	252040			MWORD	<CJS,J=4025,S0A,AND,OENA,SELM,MGC=40>; 4022  Reset xmit
  5182	037702	440000	002020
  5183	037703	402340	252040			MWORD	<CJS,J=4025,S0A,AND,OENA,SELM,MGC=40>; 4023  status
  5184	037704	440000	002020
  5185	037705	402440	240000			MWORD	<JMAP,J=4024>			     ; 4024  twice, then
  5186	037706	000000	000040
  5187	037707	402540	270050			MWORD	<CJS,J=4027,SELP,MGC=50,D=1>	     ; 4025  stop.
  5188	037710	001000	001020
  5189	037711	402600	000030			MWORD	<CRTN,D=1,SELM,MGC=30>		     ; 4026
  5190	037712	001000	002240
  5191
  5192	037713	402700	070000			MWORD	<LDCT,J=7,D=1>			     ; 4027  Subroutine to
  5193	037714	001000	000300
  5194	037715	403040	300000			MWORD	<RPCT,J=4030,D=1>		     ; 4030  do a short
  5195	037716	001000	000220
  5196	037717	403100	000000			MWORD	<CRTN,D=1>			     ; 4031  delay.
  5197	037720	001000	000240
  5198	037721	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 118
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0293

  5199
  5200					;#********************************************************************
  5201					;* DETBUF - Read transmit buffers
  5202					;#********************************************************************
  5203
  5204	037722	200 01 0 00 112406 	DETBUF:	MOVE	1,[FMSGCD (ETBUFF <CR>)]
  5205	037723	260 17 0 00 037613*		GO	CHKARG			; check for argument
  5206	037724	263 17 0 00 000000 		RTN				; error - exit
  5207
  5208					; Read/print buffer A
  5209
  5210	037725	037 00 0 00 112407 		TMSGC	<Transmit Buffer A:  >
  5211	037726	201 02 0 00 000006 		MOVEI	2,6			; get buffer number
  5212	037727	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5213	037730	037 00 0 00 030242 		PCRL
  5214
  5215					; Read/print buffer B
  5216
  5217	037731	037 00 0 00 112414 		TMSGC	<Transmit Buffer B:  >
  5218	037732	201 02 0 00 000007 		MOVEI	2,7			; get buffer number
  5219	037733	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5220	037734	037 00 0 00 030242 		PCRL
  5221	037735	263 17 0 00 000000 		RTN				; exit
  5222
  5223
  5224					;#********************************************************************
  5225					;* DERBUF - Read receive buffers
  5226					;#********************************************************************
  5227
  5228	037736	200 01 0 00 112425 	DERBUF:	MOVE	1,[FMSGCD (ERBUFF <CR>)]
  5229	037737	260 17 0 00 037723*		GO	CHKARG			; check for argument
  5230	037740	263 17 0 00 000000 		RTN				; error - exit
  5231
  5232					; Read/print buffer A
  5233
  5234	037741	037 00 0 00 112426 		TMSGC	<Receive Buffer A:   >
  5235	037742	201 02 0 00 000004 		MOVEI	2,4			; get buffer number
  5236	037743	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5237	037744	037 00 0 00 030242 		PCRL
  5238
  5239					; Read/print buffer B
  5240
  5241	037745	037 00 0 00 112433 		TMSGC	<Receive Buffer B:   >
  5242	037746	201 02 0 00 000005 		MOVEI	2,5			; get buffer number
  5243	037747	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5244	037750	037 00 0 00 030242 		PCRL
  5245	037751	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 119
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0294

  5246
  5247					;#********************************************************************
  5248					;* DDUMP - Dump port state
  5249					;#********************************************************************
  5250
  5251	037752	261 17 0 00 000000 	DDUMP:	RPUT	(0,1,2,3,4)		; save AC's
  5252
  5253	037757	476 00 0 00 121005'		SETOM	TSLOAD			; invalidate microcode loaded
  5254
  5255					; Print CSR, EBUF, LAR, 2901 registers, stack
  5256
  5257	037760	037 00 0 00 112440 		TMSGC	<+++++++++++++++ KLIPA DUMP +++++++++++++++>
  5258	037761	260 17 0 00 034116*		GO	RDCSR			; read CSR
  5259	037762	255 00 0 00 000000 		JFCL				; error - ignore
  5260	037763	260 17 0 00 042443 		GO	CSRPNT			; print data
  5261	037764	260 17 0 00 035534 		GO	DEBEBU			; print EBUF
  5262	037765	260 17 0 00 035567 		GO	DEBLAR			; print LAR data
  5263	037766	037 00 0 00 112451 		TMSG	<+++++++++++++++ 2901 Registers +++++++++++++++>
  5264	037767	402 00 0 00 120764'		SETZM	RALUB			; set up 'from' location
  5265	037770	201 00 0 00 000020 		MOVEI	20
  5266	037771	202 00 0 00 120765'		MOVEM	RALUE			; set up 'to' location
  5267	037772	260 17 0 00 036452 		GO	DEBALU			; print 2901 registers
  5268	037773	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5269	037774	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
  5270	037775	037 00 0 00 112463 		TMSG	<+++++++++++++++ 2910 Stack +++++++++++++++>
  5271	037776	260 17 0 00 040457 		GO	DEBSTK			; print stack contents
  5272
  5273					; Print PCB
  5274
  5275	037777	037 00 0 00 112474 		TMSG	<+++++++++++++++ PCB +++++++++++++++>
  5276	040000	260 17 0 00 067434 		GO	PPCB			; print PCB
  5277	040001	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5278	040002	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
  5279
  5280					; Print queues
  5281
  5282	040003	037 00 0 00 112504 		TMSGC	<+++++++++++++++ Queues +++++++++++++++>
  5283	040004	201 13 0 00 000000 		MOVEI	Q,0			; set up queue number
  5284	040005	260 17 0 00 066353 	DDUMP0:	GO	PQUEUE			; print this queue
  5285	040006	037 00 0 00 030242 		PCRL				; final CRLF
  5286	040007	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5287	040010	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
  5288	040011	350 00 0 00 000013 		AOS	Q			; point to next queue
  5289	040012	307 13 0 00 000006 		CAIG	Q,6			; done yet?
  5290	040013	254 00 0 00 040005 		JRST	DDUMP0			; no - loop till done
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 120
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0295

  5291
  5292					; Print local storage
  5293
  5294	040014	037 00 0 00 112515 		TMSG	<+++++++++++++++ Local Storage +++++++++++++++>
  5295	040015	402 00 0 00 120770'		SETZM	RLOCB			; set range of locations
  5296	040016	201 00 0 00 001777 		MOVEI	1777			;   to 0-1777
  5297	040017	202 00 0 00 120771'		MOVEM	RLOCE
  5298	040020	260 17 0 00 036756 		GO	DEBELO			; print local storage
  5299	040021	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5300	040022	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
  5301
  5302					; Print transmit and receive buffers
  5303
  5304	040023	037 00 0 00 112527 		TMSG	<+++++++++++++++ PILA Buffers +++++++++++++++>
  5305	040024	037 00 0 00 112407 		TMSGC	<Transmit Buffer A:  >
  5306	040025	201 02 0 00 000006 		MOVEI	2,6			; get buffer number
  5307	040026	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5308	040027	037 00 0 00 112414 		TMSGC	<Transmit Buffer B:  >
  5309	040030	201 02 0 00 000007 		MOVEI	2,7			; get buffer number
  5310	040031	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5311	040032	037 00 0 00 112426 		TMSGC	<Receive Buffer A:   >
  5312	040033	201 02 0 00 000004 		MOVEI	2,4			; get buffer number
  5313	040034	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5314	040035	037 00 0 00 112433 		TMSGC	<Receive Buffer B:   >
  5315	040036	201 02 0 00 000005 		MOVEI	2,5			; get buffer number
  5316	040037	260 17 0 00 040104 		GO	RDBUFS			; read/print it
  5317	040040	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5318	040041	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
  5319
  5320					; Print logout data (before STORE)
  5321
  5322	040042	037 00 0 00 112540 		TMSGC	<+++++++++++++++ EPT Data +++++++++++++++>
  5323	040043	037 00 0 00 112551 		TMSGC	<Logout data before STOP and STORE:>
  5324	040044	260 17 0 00 040127 		GO	PLOG			; get/print EPT
  5325	040045	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  5326	040046	254 00 0 00 040071 		JRST	DDUMPX			; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 121
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0296

  5327
  5328					; Print logout data (after STORE)
  5329
  5330	040047	037 00 0 00 112540 		TMSGC	<+++++++++++++++ EPT Data +++++++++++++++>
  5331	040050	037 00 0 00 112561 		TMSGC	<After loading special ucode to do a STOP and STORE:>
  5332	040051	200 01 0 00 111776 		MOVE	1,[-2,,7750]		; set up AOBJN word
  5333	040052	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5334	040053	201 01 0 00 040077 		MOVEI	1,DDUMPM		; set up microcode address
  5335	040054	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5336	040055	255 00 0 00 000000 		JFCL				; ignore error
  5337	040056	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  5338	040057	242 01 0 00 000001 		LSH	1,1			; position correctly
  5339	040060	260 17 0 00 037624*		GO	LDRAR			; load the RAR
  5340	040061	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  5341	040062	260 17 0 00 037631*		GO	LDCSR			; write to CSR register
  5342	040063	400 01 0 00 000000 		SETZ	1,			; stop the port
  5343	040064	260 17 0 00 040062*		GO	LDCSR
  5344	040065	200 01 0 00 111776 		MOVE	1,[-2,,7750]		; set up AOBJN word
  5345	040066	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  5346	040067	260 17 0 00 040127 		GO	PLOG			; get/print EPT
  5347	040070	037 00 0 00 112574 		TMSGCD	<+++++++++++++++ End of KLIPA DUMP +++++++++++++++>
  5348	040071	262 17 0 00 000004 	DDUMPX:	RGET	(4,3,2,1,0)		; restore AC's
  5349
  5350	040076	263 17 0 00 000000 		RTN				; return
  5351
  5352					; Microcode to do a STORE
  5353
  5354	040077	775077	510140		DDUMPM:	MWORD	<ADDR=7750,JMAP,J=7751,SELC,MGC=140>	; 7750
  5355	040100	000000	004040
  5356	040101	775177	510000			MWORD	<JMAP,J=7751>				; 7751
  5357	040102	000000	000040
  5358	040103	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 122
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0297

  5359
  5360					;#********************************************************************
  5361					;* RDBUFS - Read and print a buffer
  5362					;
  5363					; AC2 - Contains buffer number 4-7
  5364					;#********************************************************************
  5365
  5366	040104	261 17 0 00 000000 	RDBUFS:	RPUT	(0,1,2,3)		; save AC's
  5367
  5368	040110	260 17 0 00 034057*		GO	IPACLR			; do a port clear
  5369
  5370					; Print buffer contents
  5371
  5372	040111	201 01 0 00 000007 		MOVEI	1,7			; get code for select buffer
  5373	040112	260 17 0 00 040253 		GO	WRPLI			; write over PLI
  5374	040113	201 03 0 00 000036 		MOVEI	3,^D30			; print only 30 bytes
  5375	040114	260 17 0 00 040226 	RDBUF1:	GO	RDBF			; read length byte 1
  5376	040115	200 00 0 00 000001 		MOVE	1			; get into AC0
  5377	040116	037 03 0 00 000000 		PNT3				; print it out
  5378	040117	306 03 0 00 000020 		CAIN	3,^D16			; done with 15 bytes?
  5379	040120	037 00 0 00 112607 		TMSGC	<                    >
  5380	040121	367 03 0 00 040114 		SOJG	3,RDBUF1		; loop till done
  5381
  5382	040122	262 17 0 00 000003 	RDBUFX:	RGET	(3,2,1,0)		; restore AC's
  5383
  5384	040126	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 123
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0298

  5385
  5386					;#********************************************************************
  5387					;* PLOG - Obtain EPT logout data
  5388					;#********************************************************************
  5389
  5390	040127	200 01 0 00 112614 	PLOG:	MOVE	1,[-^D14,,0]		; set up AOBJN word
  5391	040130	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5392	040131	201 01 0 00 040171 		MOVEI	1,PLOGM			; get microcode address
  5393	040132	260 17 0 00 064254 		GO	MLOADN			; load the microcode
  5394	040133	255 00 0 00 000000 		JFCL
  5395
  5396					; Start it up and give the port the address to read
  5397
  5398	040134	400 01 0 00 000000 		SETZ	1,			; get start address
  5399	040135	260 17 0 00 040060*		GO	LDRAR			; load the register
  5400	040136	201 01 0 00 000010 		MOVEI	1,MPRUN			; set initial data
  5401	040137	260 17 0 00 040064*		GO	LDCSR
  5402	040140	135 01 0 00 104637 		LDB	1,[POINT 3,MBCN,9]	; get channel number
  5403	040141	200 01 0 01 000000*		MOVE	1,ICWA0(1)		; get ICWA for channel
  5404	040142	200 03 0 00 000001 		MOVE	3,1			; get into AC3 also
  5405	040143	336 00 0 00 121012'		SKIPN	UDEBUG			; user mode?
  5406	040144	7 010 24 0 00 000002 		CONI	PAG,2			; no - get page number of EPT
  5407	040145	242 02 0 00 000011 		LSH	2,9			; position correctly
  5408	040146	621 02 0 00 777777 		TLZ	2,777777		; clear left half
  5409	040147	270 01 0 00 000002 		ADD	1,2			; add in EPT offset
  5410	040150	434 01 0 00 112615 		IOR	1,[440000,,0]		; include IOP function
  5411	040151	260 17 0 00 037063*		GO	.DATAO			; do the first DATAO
  5412	040152	201 02 0 00 000004 		MOVEI	2,4			; number of locations to read
  5413	040153	037 00 0 00 112616 	PLOG0:	TMSGC	<EPT+>
  5414	040154	200 00 0 00 000003 		MOVE	3			; get offset
  5415	040155	037 02 0 00 000000 		PNT2				; print it
  5416	040156	260 17 0 00 000000*		GO	.DATAI			; get the data
  5417	040157	200 00 0 00 000001 		MOVE	1			; get into AC0
  5418	040160	037 13 0 00 000000 		PNTHW				; print it
  5419	040161	005 00 0 00 000001 		DELAY	1			; wait 1 millisecond
  5420	040162	350 00 0 00 000003 		AOS	3			; point to next offset
  5421	040163	367 02 0 00 040153 		SOJG	2,PLOG0			; done yet - no - loop till done
  5422	040164	400 01 0 00 000000 		SETZ	1,
  5423	040165	260 17 0 00 040137*		GO	LDCSR			; stop the port
  5424
  5425					; Done
  5426
  5427	040166	200 01 0 00 112614 		MOVE	1,[-^D14,,0]		; set up AOBJN word
  5428	040167	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  5429	040170	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 124
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0299

  5430
  5431					; Microcode
  5432
  5433	040171	000000	010000		PLOGM:	MWORD	<ADDR=0,JMAP,J=1>			; 0
  5434	040172	000000	000040
  5435	040173	000100	030000			MWORD	<CJP,J=3,CENA,CCER>			; 1
  5436	040174	000400	100060
  5437	040175	000200	010000			MWORD	<JMAP,J=1>				; 2
  5438	040176	000000	000040
  5439	040177	000301	000010			MWORD	<LDCT,J=100,SD0,B=16,OR,D=2,SELE,MGC=10>; 3
  5440	040200	732007	005300
  5441
  5442	040201	000400	042004			MWORD	<RPCT,J=4,S0A,A=16,OR,D=1,OENA,SELE,MGC=4>
  5443	040202	431160	005220
  5444	040203	000501	000001			MWORD	<LDCT,J=100,SELE,MGC=1>			; 5 (Ex/Dep int)
  5445	040204	000000	005300
  5446	040205	000600	100000			MWORD	<CJP,J=10,D=1,CENA,CCER>		; 6
  5447	040206	001400	100060
  5448	040207	000700	060000			MWORD	<JMAP,J=6,D=1>				; 7
  5449	040210	001000	000040
  5450	040211	001000	000010			MWORD	<CONT,SD0,B=17,OR,D=2,SELE,MGC=10>	; 10
  5451	040212	732007	405340
  5452	040213	001100	112004			MWORD	<RPCT,J=11,S0A,OR,A=17,D=2,OENA,SELE,MGC=4>
  5453	040214	432170	005220
  5454	040215	001200	140000			MWORD	<CJP,J=14,D=1,CENA,CCER>		; 12
  5455	040216	001400	100060
  5456	040217	001300	120000			MWORD	<JMAP,J=12,D=1>				; 13
  5457	040220	001000	000040
  5458	040221	001401	000020			MWORD	<LDCT,J=100,SELE,MGC=20> 		; 14
  5459	040222	000000	005300
  5460	040223	001500	040000			MWORD	<JMAP,J=4,S0B,PLUS,D=2,B=16,CRY>	; 15
  5461	040224	302007	000440
  5462	040225	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 125
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0300

  5463
  5464					;#********************************************************************
  5465					; RDBF - Read a buffer location (AC1 contains data)
  5466					;#********************************************************************
  5467
  5468	040226	200 01 0 00 112136 	RDBF:	MOVE	1,[-3,,7750]		; set up AOBJN word
  5469	040227	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5470	040230	201 01 0 00 000005 		MOVEI	1,5			; get link control bits (RDBUFF)
  5471	040231	137 01 0 00 112137 		DPB	1,[POINT 6,DEPLIM,31]	; save it in microword
  5472	040232	201 01 0 00 037576 		MOVEI	1,DEPLIM		; set up microcode address
  5473	040233	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5474	040234	255 00 0 00 000000 		JFCL				; ignore error
  5475	040235	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  5476	040236	242 01 0 00 000001 		LSH	1,1			; position correctly
  5477	040237	260 17 0 00 040135*		GO	LDRAR			; load the RAR
  5478	040240	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  5479	040241	260 17 0 00 040165*		GO	LDCSR			; write to CSR register
  5480	040242	201 01 0 00 200000 		MOVEI	1,TSTEBF		; set up to read EBUF data
  5481	040243	260 17 0 00 040241*		GO	LDCSR			; write to CSR register
  5482	040244	260 17 0 00 037555*		GO	RDEBUF			; read EBUF contents
  5483	040245	404 01 0 00 112620 		AND	1,[377]			; get rid of misc bits
  5484	040246	261 17 0 00 000001 		PUT	1			; save data
  5485	040247	200 01 0 00 112136 		MOVE	1,[-3,,7750]		; set up AOBJN word
  5486	040250	260 17 0 00 042610 		GO	RESCRM			; save the CRAM locations
  5487	040251	262 17 0 00 000001 		GET	1			; restore data
  5488	040252	263 17 0 00 000000 		RTN				; return
  5489
  5490					;#********************************************************************
  5491					; WRPLI - Deposit PLI (AC1,2 contain Control/Data bits)
  5492					;#********************************************************************
  5493
  5494	040253	261 17 0 00 000000 	WRPLI:	RPUT	(0,1,2)			; save AC's
  5495
  5496	040256	200 01 0 00 112133 		MOVE	1,[-4,,7750]		; set up AOBJN word
  5497	040257	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5498	040260	200 00 0 17 777777 		MOVE	-1(P)			; get link control bits
  5499	040261	137 00 0 00 112134 		DPB	[POINT 6,DDPLM2,31]	; save link control bits
  5500	040262	200 00 0 17 000000 		MOVE	(P)			; get PLI data bits
  5501	040263	137 00 0 00 112135 		DPB	[POINT 10,DDPLIM,35]	; save it in microword
  5502	040264	201 01 0 00 037476 		MOVEI	1,DDPLIM		; set up microcode address
  5503	040265	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5504	040266	255 00 0 00 000000 		JFCL				; ignore error
  5505	040267	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  5506	040270	242 01 0 00 000001 		LSH	1,1			; position correctly
  5507	040271	260 17 0 00 040237*		GO	LDRAR			; load the RAR
  5508	040272	201 01 0 00 000010 		MOVEI	1,MPRUN			; set up initial data
  5509	040273	260 17 0 00 040243*		GO	LDCSR			; start the port
  5510	040274	400 01 0 00 000000 		SETZ	1,			; clear AC1
  5511	040275	260 17 0 00 040273*		GO	LDCSR			; stop the port
  5512	040276	200 01 0 00 112133 		MOVE	1,[-4,,7750]		; set up AOBJN word
  5513	040277	260 17 0 00 042610 		GO	RESCRM			; restore the CRAM locations
  5514	040300	262 17 0 00 000002 		RGET	(2,1,0)			; restore AC's
  5515
  5516	040303	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 126
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0301

  5517
  5518					;#********************************************************************
  5519					;* DENEXT - Examine next
  5520					;#********************************************************************
  5521
  5522	040304	402 00 0 00 037530*	DENEXT:	SETZM	ARGUM			; default to repeat count
  5523	040305	350 00 0 00 040304*		AOS	ARGUM			;   of 1
  5524	040306	200 01 0 00 112631 		MOVE	1,[FMSGCD (ENEXT repcount <CR> or ENEXT <CR>)]
  5525	040307	260 17 0 00 034220*		GO	.DARG			; get repeat count
  5526	040310	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5527	040311	255 00 0 00 000000 		 JFCL				; no argument given
  5528	040312	200 00 0 00 040305*		MOVE	ARGUM			; get argument
  5529
  5530					; Do the examine
  5531
  5532	040313	476 00 0 00 120743'	DENE0:	SETOM	MULFLG			; set 'multiple examine' flag
  5533	040314	200 00 0 00 040312*		MOlace the file system on the system structure? 
[This procedure removes all existing directories and files and creates
the minimum directories needed to bring up the system.]
!(BHx!(GHx x1$,~+h
Do you want to define the system structure? 
[This will cause the home blocks to be rewritten.  It should be done
only if the answer to the previous question was yes.]

WARNING: This is a dangerous procedure.  It may cause inconsistency
in the structure.

How many packs are in this structure: 
[Enter the decimal number of disk packs that compose this structure]
? The answer must be greater than zero!
\"l>,jL+h#? The monitor is not assembled to handle that many units!
\"lD,jL+h#H
On which "CHANNEL,CONTROLLER,UNIT" is logical pack # HlL mounted? HlR? Can't find specified unit? Illegal channel number? No such channel? Illegal controller number? No such controller? Illegal unit number? No such unit? Not a disk device? All disk units in a single structure must be the same size.
\"lg,jL+h(? You are attempting to define a structure which has more space than is supported.
\"lo,jL+h? That drive was already assigned
\"ly,jL+h(
Do you want the default swapping space?  %+hT
How many pages for swapping? 
[Enter the decimal number of pages to be allocated for the entire structure]

? Invalid number of swapping pages for this type of disk.

Do you want the default size front end file system? 
[The default is 950 pages]
 "[+hb
How many pages for the front end file system? 
[Enter the decimal number of pages for the front end file system]

Do you want the default size bootstrap area? 
[The default is 64 pages]
 " +hi
How many pages for the bootstrap file? 
[Enter the decimal number of pages for the bootstrap file]

? Invalid number of pages for the bootstrap file

What is the name of this structure? 
Enter 6 or fewer characters

[Structure "" successfully defined]
\"jh+jL      ;Type=, Offline, Dual port, Write locked% Copying secondary BAT block to primary on % Copying primary BAT block to secondary on  has no BAT blocks.
Do you want to write a set of prototype BAT blocks? x0? Failed to write BAT blocks for  "t,~4Bj+j,+j ",~,jJ+j? Answer "Y" or "N"  H,jJ+j&? Illegal character, retype answer again: H,jJ+j:7`~+jG 6@}le local storage
  5579
  5580	040357	200 00 0 00 035720 	DENEX2:	MOVE	ANEXT			; get address
  5581	040360	202 00 0 00 120770'		MOVEM	RLOCB			; save in 'from' location
  5582	040361	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  5583	040362	254 00 0 00 036740 		PJRST	DELOC0			; go handle
  5584
  5585					; To handle PLI registers
  5586
  5587	040363	200 00 0 00 035720 	DENEX3:	MOVE	ANEXT			; get register number
  5588	040364	202 00 0 00 040325*		MOVEM	ARGUM			; save in argument location
  5589	040365	254 00 0 00 037520 		PJRST	DEPLI0			; go handle
  5590
  5591
  5592					;#********************************************************************
  5593					;* DDNEXT - Deposit next
  5594					;#********************************************************************
  5595
  5596	040366	200 01 0 00 120723'	DDNEXT:	MOVE	1,DFLAG			; get last operation done
  5597	040367	554 00 0 01 040373 		HLRZ	DDTAB(1)		; get new value of DFLAG
  5598	040370	202 00 0 00 120723'		MOVEM	DFLAG			; save it
  5599	040371	550 02 0 01 040373 		HRRZ	2,DDTAB(1)		; get dispatch address
  5600	040372	254 00 0 02 000000 		JRST	(2)			; dispatch
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 128
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0303

  5601
  5602					; Dispatch table
  5603
  5604	040373	000001	040411		DDTAB:	1,,DDNEX0			; ECRAM
  5605	040374	000001	040411			1,,DDNEX0			; DCRAM
  5606	040375	000002	040411			2,,DDNEX0			; BCRAM
  5607	040376	000003	040411			3,,DDNEX0			; ACRAM
  5608	040377	000003	040411			3,,DDNEX0			; ZCRAM
  5609	040400	000003	040411			3,,DDNEX0			; LCRAM
  5610	040401	000007	040420			7,,DDNEX1			; E2901
  5611	040402	000007	040420			7,,DDNEX1			; D2901
  5612	040403	000007	040420			7,,DDNEX1			; Z2901
  5613	040404	000012	040425			^D10,,DDNEX2			; ELOCS
  5614	040405	000012	040425			^D10,,DDNEX2			; DLOCS
  5615	040406	000012	040425			^D10,,DDNEX2			; ZLOCS
  5616	040407	000014	040432			^D12,,DDNEX3			; DPLI
  5617	040410	000014	040432			^D12,,DDNEX3			; EPLI
  5618	
  5619					; To handle CRAM deposit ...
  5620
  5621	040411	200 01 0 00 112635 	DDNEX0:	MOVE	1,[FMSGCD (DNEXT <CR>)]
  5622	040412	260 17 0 00 037737*		GO	CHKARG			; check for argument
  5623	040413	263 17 0 00 000000 		RTN				; error - exit
  5624	040414	200 00 0 00 035720 		MOVE	ANEXT			; get address
  5625	040415	202 00 0 00 035712 		MOVEM	CRAMTO			; set up 'to' and 'from'
  5626	040416	202 00 0 00 035711 		MOVEM	CRAMFR			;   addresses
  5627	040417	254 00 0 00 035671 		PJRST	DCOM0			; go handle
  5628
  5629					; To handle 2901 registers
  5630
  5631	040420	200 00 0 00 035720 	DDNEX1:	MOVE	ANEXT			; get register number
  5632	040421	202 00 0 00 120764'		MOVEM	RALUB			; save in 'from' location
  5633	040422	202 00 0 00 120765'		MOVEM	RALUE			; save in 'to' location
  5634	040423	202 00 0 00 040364*		MOVEM	ARGUM			; save it
  5635	040424	254 00 0 00 036525 		PJRST	DDALU0			; go handle
  5636
  5637					; To handle local storage
  5638
  5639	040425	200 00 0 00 035720 	DDNEX2:	MOVE	ANEXT			; get address
  5640	040426	202 00 0 00 120770'		MOVEM	RLOCB			; save in 'from' location
  5641	040427	202 00 0 00 120771'		MOVEM	RLOCE			; save in 'to' location
  5642	040430	202 00 0 00 040423*		MOVEM	ARGUM			; save it
  5643	040431	254 00 0 00 037026 		PJRST	DDLOC0			; go handle
  5644
  5645					; To handle PLI registers
  5646
  5647	040432	200 00 0 00 035720 	DDNEX3:	MOVE	ANEXT			; get register number
  5648	040433	202 00 0 00 040430*		MOVEM	ARGUM			; save in argument location
  5649	040434	254 00 0 00 037423 		PJRST	DDPLI0			; go handle
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 129
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0304

  5650
  5651					;#********************************************************************
  5652					;* DDPPAK - Deposit into packet
  5653					;
  5654					; Format:  DEPPAK adr,data
  5655					;#********************************************************************
  5656
  5657	040435	200 01 0 00 112644 	DDPPAK:	MOVE	1,[FMSGCD <DEPPAK offset,data (CR)>]
  5658	040436	260 17 0 00 040307*		GO	.DARG			; get address
  5659	040437	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5660						 JRST	[FMSGCD	<? Missing argument>
  5661							 GO	FIOFF
  5662	040440	254 00 0 00 104450 			 RTN]
  5663	040441	200 02 0 00 040433*		MOVE	2,ARGUM			; get argument
  5664	040442	301 02 0 00 000000 		CAIL	2,0			; in range 0-99.?
  5665	040443	303 02 0 00 000377 		CAILE	2,^D255
  5666						JRST	[FMSGCD	<? Range of PACKET locations is 0-255.>
  5667							 GO	FIOFF
  5668	040444	254 00 0 00 112656 			 RTN]
  5669	040445	210 01 0 00 112644 		MOVN	1,[FMSGCD <DEPPAK offset,data (CR)>]
  5670	040446	260 17 0 00 037525*		GO	.OARG			; get data
  5671	040447	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5672						 JRST	[FMSGCD	<? Missing argument>
  5673							 GO	FIOFF
  5674	040450	254 00 0 00 104450 			 RTN]
  5675
  5676					; Do the deposit
  5677
  5678	040451	200 00 0 00 040441*		MOVE	ARGUM			; get argument
  5679	040452	202 00 0 02 070047 		MOVEM	PACKET(2)		; save the data
  5680	040453	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 130
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0305

  5681
  5682					;#********************************************************************
  5683					;* DESTAK - examine 2910 stack
  5684					;#********************************************************************
  5685
  5686	040454	200 01 0 00 112665 	DESTAK:	MOVE	1,[FMSGCD (ESTACK <CR>)]
  5687	040455	260 17 0 00 040412*		GO	CHKARG			; check for argument
  5688	040456	263 17 0 00 000000 		RTN				; error - exit
  5689	040457	200 01 0 00 111715 	DEBSTK:	MOVE	1,[-1,,7750]		; set up AOBJN word
  5690	040460	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  5691	040461	201 01 0 00 040511 		MOVEI	1,DESTKM		; set up microcode address
  5692	040462	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  5693	040463	255 00 0 00 000000 		JFCL				; ignore error
  5694
  5695					; Do the task
  5696
  5697	040464	260 17 0 00 037370*		GO	ISTOP			; stop the port
  5698	040465	037 00 0 00 112666 		TMSGC	<2910 Stack:>
  5699	040466	037 00 0 00 112671 		TMSGC	< Location   Contents (addr)>
  5700	040467	474 04 0 00 000000 		SETO	4,			; initialize location pointer
  5701	040470	350 00 0 00 000004 	DESTA0:	AOS	4			; point to next location
  5702	040471	303 04 0 00 000004 		CAILE	4,4			; done yet?
  5703	040472	254 00 0 00 040505 		JRST	DESTAX			; yes - exit
  5704	040473	402 00 0 00 035525*		SETZM	SDATA			; get initial CSR data
  5705	040474	201 00 0 00 007750 		MOVEI	7750			; set up next address
  5706	040475	202 00 0 00 035502*		MOVEM	SNEXT			;   for IPASST
  5707	040476	260 17 0 00 034166*		GO	IPASST			; single step once
  5708						 JRST	[FMSGCD	<? Error accessing CSR register>
  5709							 GO	FIOFF
  5710	040477	254 00 0 00 112677 			 JRST	DESTAY]
  5711						 JRST	[FMSGCD	<? Port not stopped>
  5712							 GO	FIOFF
  5713	040500	254 00 0 00 112702 			 JRST	DESTAY]
  5714	040501	255 00 0 00 000000 		 JFCL				; error bits set in CSR
  5715						XCT	[TMSGC	<   Top  >
  5716							 TMSGC	<    -1  >
  5717							 TMSGC	<    -2  >
  5718							 TMSGC	<    -3  >
  5719	040502	256 00 0 04 112724 			 TMSGC	<    -4  >](4)
  5720	040503	001 12 0 00 040475*		PNTOCC	12,SNEXT		; print address
  5721	040504	254 00 0 00 040470 		JRST	DESTA0			; loop till done
  5722
  5723					; Restore CRAM location/exit
  5724
  5725	040505	037 00 0 00 030242 	DESTAX:	PCRL
  5726	040506	200 01 0 00 111715 	DESTAY:	MOVE	1,[-1,,7750]		; set up AOBJN word
  5727	040507	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  5728	040510	263 17 0 00 000000 		RTN				; return
  5729
  5730					; Microcode
  5731
  5732	040511	775000	000000		DESTKM:	MWORD	<ADDR=7750,CRTN,D=1>	; 7750
  5733	040512	001000	000240
  5734	040513	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 131
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0306

  5735
  5736					;#********************************************************************
  5737					;* DBREAK - Set breakpoint
  5738					;
  5739					; A breakpoint is set by reading the particular CRAM location  and
  5740					; rewriting it with bad parity.  Nothing can be done at the break-
  5741					; point except read the CSR register.
  5742					;#********************************************************************
  5743
  5744					; First check for any argument
  5745
  5746	040514	336 00 0 00 037241*	DBREAK:	SKIPN	ARGFLG			; argument given?
  5747						JRST	[FMSGCD	<? Missing argument>
  5748							 GO	FIOFF
  5749	040515	254 00 0 00 104450 			 RTN]
  5750
  5751					; Obtain argument
  5752
  5753	040516	200 01 0 00 112737 	DBREA0:	MOVE	1,[FMSGCD <BREAK addr,addr,... (CR)>]
  5754	040517	260 17 0 00 040446*		GO	.OARG			; get argument
  5755	040520	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5756	040521	263 17 0 00 000000 		 RTN				; done - no more arguments
  5757	040522	331 01 0 00 040451*		SKIPL	1,ARGUM			; argument out of range?
  5758	040523	303 01 0 00 007777 		CAILE	1,7777			;   (0-7777)
  5759						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5760							 GO	FIOFF
  5761	040524	254 00 0 00 107217 			 RTN]
  5762
  5763					; Then ensure the port is stopped
  5764
  5765	040525	260 17 0 00 040464*		GO	ISTOP			; stop the port
  5766
  5767					; Now obtain CRAM data and give it bad parity
  5768
  5769	040526	202 01 0 00 035713 		MOVEM	1,CADDR			; set up address to load
  5770	040527	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  5771	040530	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  5772	040531	260 17 0 00 036372 		GO	DRCRAM			; read the data
  5773	040532	261 17 0 00 000001 		PUT	1			; save AC1
  5774	040533	474 01 0 00 000000 		SETO	1,			; set 'force bad parity' flag
  5775	040534	200 02 0 00 035714 		MOVE	2,CWORDL		; get left half
  5776	040535	200 03 0 00 035715 		MOVE	3,CWORDR		; get right half
  5777	040536	260 17 0 00 042407 		GO	CALPAR			; insert parity
  5778	040537	202 02 0 00 035714 		MOVEM	2,CWORDL		; save left half
  5779	040540	202 03 0 00 035715 		MOVEM	3,CWORDR		; save right half
  5780	040541	262 17 0 00 000001 		GET	1			; restore AC1
  5781	040542	261 17 0 00 034000 		PUT	PARFLG			; save 'calculate parity' flag
  5782	040543	402 00 0 00 034000 		SETZM	PARFLG			; clear 'calculate parity' flag
  5783	040544	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data (now with bad parity)
  5784	040545	262 17 0 00 034000 		GET	PARFLG			; restore 'calculate parity' flag
  5785	040546	254 00 0 00 040516 		JRST	DBREA0			; get next address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 132
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0307

  5786
  5787					;#********************************************************************
  5788					;* DRBRK - Remove breakpoint
  5789					;#********************************************************************
  5790
  5791					; First check for any argument
  5792
  5793	040547	336 00 0 00 040514*	DRBRK:	SKIPN	ARGFLG			; argument given?
  5794						JRST	[FMSGCD	<? Missing argument>
  5795							 GO	FIOFF
  5796	040550	254 00 0 00 104450 			 RTN]
  5797
  5798					; Obtain argument
  5799
  5800	040551	200 01 0 00 112746 	DRBR0:	MOVE	1,[FMSGCD <RBREAK addr,addr,... (CR)>]
  5801	040552	260 17 0 00 040517*		GO	.OARG			; get argument
  5802	040553	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5803	040554	263 17 0 00 000000 		 RTN				; done - no more arguments
  5804	040555	331 01 0 00 040522*		SKIPL	1,ARGUM			; argument out of range?
  5805	040556	303 01 0 00 007777 		CAILE	1,7777			;   (0-7777)
  5806						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5807							 GO	FIOFF
  5808	040557	254 00 0 00 107217 			 RTN]
  5809
  5810					; Then ensure the port is stopped
  5811
  5812	040560	260 17 0 00 040525*		GO	ISTOP			; stop the port
  5813
  5814					; Now obtain CRAM data and load back into CRAM with good parity
  5815
  5816	040561	202 01 0 00 035713 		MOVEM	1,CADDR			; set up address to load
  5817	040562	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  5818	040563	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  5819	040564	260 17 0 00 036372 		GO	DRCRAM			; read the data
  5820	040565	261 17 0 00 034000 		PUT	PARFLG			; save 'calculate parity' flag
  5821	040566	476 00 0 00 034000 		SETOM	PARFLG			; set 'calculate parity' flag
  5822	040567	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data (now with good parity)
  5823	040570	262 17 0 00 034000 		GET	PARFLG			; restore 'calculate parity' flag
  5824	040571	254 00 0 00 040551 		JRST	DRBR0			; get next address
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 133
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0308

  5825
  5826					;#********************************************************************
  5827					;* DCBRK - Clear all breakpoints 
  5828					;
  5829					; If arguments are given, they are assumed to the the locations between
  5830					; which all breakpoints are to be removed.
  5831					;#********************************************************************
  5832
  5833					; Start to process the arguments typed - both should be CRAM
  5834					; addresses in octal.
  5835
  5836	040572	400 05 0 00 000000 	DCBRK:	SETZ	5,			; init range of addresses
  5837	040573	201 06 0 00 007777 		MOVEI	6,7777			;   to 0-7777
  5838
  5839					; Get first address
  5840
  5841	040574	200 01 0 00 112755 		MOVE	1,[FMSGCD <CBREAK addr1,addr2 (CR)>]
  5842	040575	260 17 0 00 040552*		GO	.OARG			; get first address
  5843	040576	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5844	040577	254 00 0 00 040611 		 JRST	DCBR0			; no arguments given - continue
  5845	040600	200 00 0 00 040555*		MOVE	ARGUM			; get argument
  5846	040601	202 00 0 00 000005 		MOVEM	5			; save in 'from' location
  5847	040602	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  5848
  5849					; Get 2nd address
  5850
  5851	040603	210 01 0 00 112755 		MOVN	1,[FMSGCD <CBREAK addr1,addr2 (CR)>]
  5852	040604	260 17 0 00 040575*		GO	.OARG			; get first address
  5853	040605	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5854	040606	254 00 0 00 040611 		 JRST	DCBR0			; no arguments given - continue
  5855	040607	200 00 0 00 040600*		MOVE	ARGUM			; get argument
  5856	040610	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  5857
  5858					; Now range check the arguments
  5859
  5860	040611	331 00 0 00 000005 	DCBR0:	SKIPL	5			; 1st argument in range?
  5861	040612	303 05 0 00 007777 		CAILE	5,7777
  5862						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5863							 GO	FIOFF
  5864	040613	254 00 0 00 107217 			 RTN]
  5865	040614	331 01 0 00 000006 		SKIPL	1,6			; 2nd argument in range?
  5866	040615	303 06 0 00 007777 		CAILE	6,7777
  5867						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5868							 GO	FIOFF
  5869	040616	254 00 0 00 107217 			 RTN]
  5870	040617	274 01 0 00 000005 		SUB	1,5			; see if range ok
  5871						JUMPL	1,[FMSGCD <? Range nonsensical>
  5872							   GO	FIOFF
  5873	040620	321 01 0 00 110071 			   RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 134
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0309

  5874
  5875					; Then ensure the port is stopped
  5876
  5877	040621	260 17 0 00 040560*		GO	ISTOP			; stop the port
  5878
  5879					; Now obtain CRAM data and load back into CRAM with good parity
  5880
  5881	040622	202 05 0 00 035713 	DCBR1:	MOVEM	5,CADDR			; set up address to load
  5882	040623	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  5883	040624	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  5884	040625	260 17 0 00 036372 		GO	DRCRAM			; read the data
  5885	040626	261 17 0 00 034000 		PUT	PARFLG			; save 'calculate parity' flag
  5886	040627	476 00 0 00 034000 		SETOM	PARFLG			; set 'calculate parity' flag
  5887	040630	260 17 0 00 036340 		GO	DWCRAM			; load CRAM data (now with good parity)
  5888	040631	262 17 0 00 034000 		GET	PARFLG			; restore 'calculate parity' flag
  5889	040632	350 00 0 00 000005 		AOS	5			; increment 'from' address
  5890	040633	317 05 0 00 000006 		CAMG	5,6			; exceed 'to' address?
  5891	040634	254 00 0 00 040622 		JRST	DCBR1			; no - get next address
  5892	040635	263 17 0 00 000000 		RTN				; yes - exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 135
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0310

  5893
  5894					;#********************************************************************
  5895					;* DLBRK - List breakpoints
  5896					;
  5897					; If arguments are given, they are assumed to be the locations between
  5898					; which all breakpoints are to be listed.
  5899					;#********************************************************************
  5900
  5901					; Start to process the arguments typed - both should be CRAM
  5902					; addresses in octal.
  5903
  5904	040636	400 05 0 00 000000 	DLBRK:	SETZ	5,			; init range of addresses
  5905	040637	201 06 0 00 007777 		MOVEI	6,7777			;   to 0-7777
  5906
  5907					; Get first address
  5908
  5909	040640	200 01 0 00 112764 		MOVE	1,[FMSGCD <LBREAK addr1,addr2 (CR)>]
  5910	040641	260 17 0 00 040604*		GO	.OARG			; get first address
  5911	040642	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5912	040643	254 00 0 00 040655 		 JRST	DLBR0			; no arguments given - continue
  5913	040644	200 00 0 00 040607*		MOVE	ARGUM			; get argument
  5914	040645	202 00 0 00 000005 		MOVEM	5			; save in 'from' location
  5915	040646	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  5916
  5917					; Get 2nd address
  5918
  5919	040647	210 01 0 00 112764 		MOVN	1,[FMSGCD <LBREAK addr1,addr2 (CR)>]
  5920	040650	260 17 0 00 040641*		GO	.OARG			; get first address
  5921	040651	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5922	040652	254 00 0 00 040655 		 JRST	DLBR0			; no arguments given - continue
  5923	040653	200 00 0 00 040644*		MOVE	ARGUM			; get argument
  5924	040654	202 00 0 00 000006 		MOVEM	6			; save in 'to' location
  5925
  5926					; Now range check the arguments
  5927
  5928	040655	331 00 0 00 000005 	DLBR0:	SKIPL	5			; 1st argument in range?
  5929	040656	303 05 0 00 007777 		CAILE	5,7777
  5930						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5931							 GO	FIOFF
  5932	040657	254 00 0 00 107217 			 RTN]
  5933	040660	331 01 0 00 000006 		SKIPL	1,6			; 2nd argument in range?
  5934	040661	303 06 0 00 007777 		CAILE	6,7777
  5935						JRST	[FMSGCD	<? Range of CRAM locations is 0000-7777>
  5936							 GO	FIOFF
  5937	040662	254 00 0 00 107217 			 RTN]
  5938	040663	274 01 0 00 000005 		SUB	1,5			; see if range ok
  5939						JUMPL	1,[FMSGCD <? Range nonsensical>
  5940							   GO	FIOFF
  5941	040664	321 01 0 00 110071 			   RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 136
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0311

  5942
  5943					; Then ensure the port is stopped
  5944
  5945	040665	260 17 0 00 040621*		GO	ISTOP			; stop the port
  5946	040666	200 07 0 00 112101 		MOVE	7,[-2]			; initialize breakpoint count
  5947	040667	037 00 0 00 112765 		TMSGC	<Breakpoints:  >
  5948
  5949					; Now obtain CRAM data and load back into CRAM with good parity
  5950
  5951	040670	202 05 0 00 035713 	DLBR1:	MOVEM	5,CADDR			; set up address to load
  5952	040671	476 00 0 00 035714 		SETOM	CWORDL			; initialize left half
  5953	040672	476 00 0 00 035715 		SETOM	CWORDR			; initialize right half
  5954	040673	260 17 0 00 036372 		GO	DRCRAM			; read the data
  5955	040674	400 01 0 00 000000 		SETZ	1,			; clear 'bad' parity flag
  5956	040675	200 02 0 00 035714 		MOVE	2,CWORDL		; get left word
  5957	040676	200 03 0 00 035715 		MOVE	3,CWORDR		; get right word
  5958	040677	260 17 0 00 042407 		GO	CALPAR			; calculate parity
  5959	040700	316 02 0 00 035714 		CAMN	2,CWORDL		; same as before?
  5960	040701	254 00 0 00 040707 		JRST	DLBR2			; yes - good parity
  5961
  5962					; Print location
  5963
  5964	040702	350 00 0 00 000007 		AOS	7			; next 5 characters
  5965	040703	303 07 0 00 000007 		CAILE	7,7			; done with line?
  5966						GO	[SETO	7,		; yes - init counter
  5967							 TMSGC	<              >
  5968	040704	260 17 0 00 112775 			 RTN]
  5969	040705	001 04 0 00 000005 		PNTOCC	4,5			; print address
  5970	040706	037 00 0 00 000040 		PSP				; print a space
  5971
  5972					; Increment to next location
  5973
  5974	040707	037 07 0 00 000003 	DLBR2:	TTALTM				; altmode key struck?
  5975	040710	334 00 0 00 000000 		SKIPA				; no - proceed
  5976	040711	254 00 0 00 040715 		JRST	DLBRX			; yes - exit
  5977	040712	350 00 0 00 000005 		AOS	5			; increment 'from' address
  5978	040713	317 05 0 00 000006 		CAMG	5,6			; exceed 'to' address?
  5979	040714	254 00 0 00 040670 		JRST	DLBR1			; no - get next address
  5980	040715	037 00 0 00 030242 	DLBRX:	PCRL				; yes - print blank line
  5981	040716	263 17 0 00 000000 		RTN				;   and exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 137
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0312

  5982
  5983					;#********************************************************************
  5984					;* DLOAD - Load microcode into CRAM from a test.
  5985					;#********************************************************************
  5986
  5987	040717	210 01 0 00 113004 	DLOAD:	MOVN	1,[FMSGCD (LOAD n <CR>)]
  5988	040720	260 17 0 00 040650*		GO	.OARG			; get argument
  5989	040721	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  5990						 JRST	[FMSGCD	<? Missing argument>
  5991							 GO	FIOFF
  5992	040722	254 00 0 00 104450 			 RTN]
  5993	040723	333 01 0 00 040653*		SKIPLE	1,ARGUM			; get argument - out of range
  5994	040724	303 01 0 00 000054 		CAILE	1,MAXTST		;   1-MAXTST?
  5995						JRST	[FMSGC	<? Test number out of range 1 - >
  5996							 MOVEI	MAXTST
  5997							 PNTOCF
  5998							 PCRLF
  5999							 GO	FIOFF
  6000	040725	254 00 0 00 113014 			 RTN]
  6001	040726	337 01 0 01 032126 		SKIPG	1,TSTMIC(1)		; get test microcode address
  6002						JRST	[FMSGCD <? Test specified does not have microcode>
  6003							 GO	FIOFF
  6004	040727	254 00 0 00 113033 			 RTN]
  6005	040730	260 17 0 00 040665*		GO	ISTOP			; stop the port
  6006	040731	260 17 0 00 064256 		GO	MLOADY			; load it
  6007	040732	255 00 0 00 000000 		 JFCL				; failed
  6008	040733	037 00 0 00 113036 		TMSGC	<[Number of CRAM locations loaded/verified = >
  6009	040734	200 00 0 00 120742'		MOVE	MLNUM			; get number of words loaded/verified
  6010	040735	037 15 0 00 000000 		PNTDEC	
  6011	040736	037 00 0 00 113050 		TMSGD	<.]>
  6012	040737	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 138
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0313

  6013
  6014					;#********************************************************************
  6015					;* DLIST - List microcode from test
  6016					;#********************************************************************
  6017
  6018	040740	210 01 0 00 113055 	DLIST:	MOVN	1,[FMSGCD (LIST n <CR>)]
  6019	040741	260 17 0 00 040720*		GO	.OARG			; get argument
  6020	040742	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6021						 JRST	[FMSGCD	<? Missing argument>
  6022							 GO	FIOFF
  6023	040743	254 00 0 00 104450 			 RTN]
  6024	040744	333 01 0 00 040723*		SKIPLE	1,ARGUM			; get argument - out of range
  6025	040745	303 01 0 00 000054 		CAILE	1,MAXTST		;   1-MAXTST?
  6026						JRST	[FMSGC	<? Test number out of range 1 - >
  6027							 MOVEI	MAXTST
  6028							 PNTOCF
  6029							 PCRLF
  6030							 GO	FIOFF
  6031	040746	254 00 0 00 113014 			 RTN]
  6032	040747	337 01 0 01 032126 		SKIPG	1,TSTMIC(1)		; get test microcode address
  6033						JRST	[FMSGCD <? Test specified does not have microcode>
  6034							 GO	FIOFF
  6035	040750	254 00 0 00 113033 			 RTN]
  6036	040751	260 17 0 00 064526 		GO	MLIST			; list it
  6037	040752	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 139
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0314

  6038
  6039					;#********************************************************************
  6040					;* DFLOAD - Load microcode from file into CRAM
  6041					;#********************************************************************
  6042
  6043	040753	200 01 0 00 113061 	DFLOAD:	MOVE	1,[FMSGCD (FLOAD <CR>)]
  6044	040754	260 17 0 00 040455*		GO	CHKARG			; check for argument
  6045	040755	263 17 0 00 000000 		RTN				; error - exit
  6046	040756	476 00 0 00 044232 		SETOM	FFLAG			; set operator output flag
  6047	040757	260 17 0 00 043745 		GO	FLOADB			; load file into ucode buffer
  6048	040760	263 17 0 00 000000 		RTN				; error - exit
  6049
  6050					; Ensure the port is stopped
  6051
  6052	040761	260 17 0 00 040730*		GO	ISTOP			; stop the port
  6053	040762	400 01 0 00 000000 		SETZ	1,			; clear AC1
  6054	040763	260 17 0 00 040275*		GO	LDCSR			; clear CSR
  6055
  6056					; Check to see if it is already loaded
  6057
  6058	040764	200 00 0 00 044227 		MOVE	UNAME			; get microcode name desired
  6059	040765	316 00 0 00 044231 		CAMN	CNAME			; same as what is loaded?
  6060						GO	[TMSGC	<[>		; yes - print message
  6061							 MOVE	UNAME
  6062							 PNTSIX
  6063							 PNTCI	"."
  6064							 MOVE	UNAME+1
  6065							 PNTSIX
  6066							 TMSGD	< already loaded]>
  6067	040766	260 17 0 00 113066 			 RTN]
  6068
  6069					; Load microcode
  6070
  6071	040767	476 00 0 00 044231 		SETOM	CNAME			; ensure the microcode gets loaded
  6072	040770	260 17 0 00 044030 		GO	FLOADC			; load buffer into CRAM
  6073	040771	263 17 0 00 000000 		RTN				; error - return
  6074	040772	255 00 0 00 000000 		JFCL				; already loaded - return
  6075
  6076					; Verify microcode
  6077
  6078	040773	260 17 0 00 044100 		GO	FVERFC			; verify CRAM against buffer
  6079	040774	260 17 0 00 044155 		GO	FUERR			; print any errors
  6080	040775	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 140
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0315

  6081
  6082					;#********************************************************************
  6083					;* DFVERF - Verify microcode from file versus CRAM
  6084					;#********************************************************************
  6085
  6086	040776	200 01 0 00 113102 	DFVERF:	MOVE	1,[FMSGCD (FVERFY <CR>)]
  6087	040777	260 17 0 00 040754*		GO	CHKARG			; check for argument
  6088	041000	263 17 0 00 000000 		RTN				; error - exit
  6089	041001	476 00 0 00 044232 		SETOM	FFLAG			; set operator output flag
  6090	041002	260 17 0 00 043745 		GO	FLOADB			; load file into ucode buffer
  6091	041003	263 17 0 00 000000 		RTN				; error - exit
  6092
  6093					; Ensure the port is stopped
  6094
  6095	041004	260 17 0 00 040761*		GO	ISTOP			; stop the port
  6096	041005	400 01 0 00 000000 		SETZ	1,			; clear AC1
  6097	041006	260 17 0 00 040763*		GO	LDCSR			; clear CSR
  6098
  6099					; Now do the verify
  6100
  6101	041007	260 17 0 00 044100 		GO	FVERFC			; verify CRAM against buffer
  6102	041010	260 17 0 00 044155 		GO	FUERR			; print any errors
  6103	041011	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 141
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0316

  6104
  6105					;#********************************************************************
  6106					;* DFLIST - List microcode in file
  6107					;#********************************************************************
  6108
  6109	041012	200 01 0 00 113106 	DFLIST:	MOVE	1,[FMSGCD (FLIST <CR>)]
  6110	041013	260 17 0 00 040777*		GO	CHKARG			; check for argument
  6111	041014	263 17 0 00 000000 		RTN				; error - exit
  6112	041015	476 00 0 00 044232 		SETOM	FFLAG			; set operator output flag
  6113	041016	260 17 0 00 043745 		GO	FLOADB			; load file into ucode buffer
  6114	041017	263 17 0 00 000000 		RTN				; error - exit
  6115	041020	037 00 0 00 111637 		TMSGC	<ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK>
  6116	041021	200 03 0 00 044233 		MOVE	3,ULEN			; get length of ucode
  6117	041022	201 04 0 00 044232 		MOVEI	4,UCODE-2		; get address of ucode buffer
  6118	041023	361 03 0 00 041045 	DFLIS0:	SOJL	3,DFLISX		; done yet? yes - exit
  6119	041024	271 04 0 00 000002 		ADDI	4,2			; point to next microword entry
  6120	041025	120 01 0 04 000000 		DMOVE	1,(4)			; get microword entry
  6121	041026	135 00 0 00 113107 		LDB	[POINT 12,1,11]		; get CRAM address
  6122	041027	202 00 0 00 035713 		MOVEM	CADDR			; save it
  6123	041030	246 01 0 00 000006 		LSHC	1,6			; position correctly for 30 bits
  6124	041031	135 03 0 00 113110 		LDB	3,[POINT 30,2,29]	; get right 30 bits
  6125	041032	135 02 0 00 113111 		LDB	2,[POINT 30,1,35]	; get left 30 bits
  6126	041033	622 03 0 00 000002 		TRZE	3,2			; bit 59 set?
  6127	041034	660 03 0 00 000001 		TRO	3,1			; yes - set rightmost bit
  6128	041035	037 00 0 00 030242 		PCRL				; start a new line
  6129	041036	001 04 0 00 035713 		PNTOCC	4,CADDR			; print CRAM load address
  6130	041037	037 00 0 00 111633 		TMSG	</ >
  6131	041040	260 17 0 00 042271 		GO	PNTCRM			; print it
  6132	041041	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  6133	041042	254 00 0 00 041045 		JRST	DFLISX			; yes - exit
  6134	041043	037 07 0 00 000003 		TTALTM				; altmode key struck?
  6135	041044	254 00 0 00 041023 		JRST	DFLIS0			; no - loop till done
  6136
  6137	041045	037 00 0 00 030242 	DFLISX:	PCRL				; final CRLF
  6138	041046	263 17 0 00 000000 		RTN				; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 142
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0317

  6139
  6140					;#********************************************************************
  6141					;* DFEXAM - Examine microcode in file
  6142					;#********************************************************************
  6143
  6144	041047	200 01 0 00 113115 	DFEXAM:	MOVE	1,[FMSGCD (FEXAM <CR>)]
  6145	041050	260 17 0 00 041013*		GO	CHKARG			; check for argument
  6146	041051	263 17 0 00 000000 		RTN				; error - exit
  6147	041052	476 00 0 00 044232 		SETOM	FFLAG			; set operator output flag
  6148	041053	260 17 0 00 043745 		GO	FLOADB			; load file into ucode buffer
  6149	041054	263 17 0 00 000000 		RTN				; error - exit
  6150	041055	200 03 0 00 044233 		MOVE	3,ULEN			; get length of ucode
  6151	041056	201 04 0 00 044232 		MOVEI	4,UCODE-2		; get address of ucode buffer
  6152	041057	361 03 0 00 041102 	DFEXA0:	SOJL	3,DFEXAX		; done yet? yes - exit
  6153	041060	271 04 0 00 000002 		ADDI	4,2			; point to next microword entry
  6154	041061	120 01 0 04 000000 		DMOVE	1,(4)			; get microword entry
  6155	041062	135 00 0 00 113107 		LDB	[POINT 12,1,11]		; get CRAM address
  6156	041063	202 00 0 00 035713 		MOVEM	CADDR			; save it
  6157	041064	246 01 0 00 000006 		LSHC	1,6			; position correctly for 30 bits
  6158	041065	135 03 0 00 113110 		LDB	3,[POINT 30,2,29]	; get right 30 bits
  6159	041066	135 02 0 00 113111 		LDB	2,[POINT 30,1,35]	; get left 30 bits
  6160	041067	622 03 0 00 000002 		TRZE	3,2			; bit 59 set?
  6161	041070	660 03 0 00 000001 		TRO	3,1			; yes - set rightmost bit
  6162	041071	037 00 0 00 030242 		PCRL				; start a new line
  6163	041072	200 00 0 00 035713 		MOVE	CADDR			; get CRAM load address
  6164	041073	037 04 0 00 000000 		PNT4				; print it
  6165	041074	037 00 0 00 111633 		TMSG	</ >
  6166	041075	260 17 0 00 042365 		GO	PNTWD			; print it
  6167	041076	332 00 0 00 120713'		SKIPE	ALTF			; altmode typed?
  6168	041077	254 00 0 00 041102 		JRST	DFEXAX			; yes - exit
  6169	041100	037 07 0 00 000003 		TTALTM				; altmode key struck?
  6170	041101	254 00 0 00 041057 		JRST	DFEXA0			; no - loop till done
  6171
  6172	041102	037 00 0 00 030242 	DFEXAX:	PCRL				; final CRLF
  6173	041103	263 17 0 00 000000 		RTN				; exit
  6174
  6175
  6176					;#********************************************************************
  6177					;* DTRANS - Translate CSR bits to English
  6178					;#********************************************************************
  6179
  6180	041104	210 01 0 00 113123 	DTRANS:	MOVN	1,[FMSGCD (TRANSL data <CR>)]
  6181	041105	260 17 0 00 040741*		GO	.OARG			; get argument
  6182	041106	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6183						 JRST	[FMSGCD	<? Missing argument>
  6184							 GO	FIOFF
  6185	041107	254 00 0 00 104450 			 RTN]
  6186	041110	200 01 0 00 040744*		MOVE	1,ARGUM			; get argument
  6187	041111	260 17 0 00 042443 		GO	CSRPNT			; print CSR data in English
  6188	041112	037 00 0 00 030242 		PCRL				; end of line
  6189	041113	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 143
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0318

  6190
  6191					;#********************************************************************
  6192					;* DCCODE - Print condition codes
  6193					;#********************************************************************
  6194
  6195	041114	200 01 0 00 113127 	DCCODE:	MOVE	1,[FMSGCD (CCODE <CR>)]
  6196	041115	260 17 0 00 041050*		GO	CHKARG			; check for argument
  6197	041116	263 17 0 00 000000 		RTN				; error - exit
  6198
  6199					; Save CRAM locations
  6200
  6201	041117	200 01 0 00 112133 		MOVE	1,[-4,,7750]		; set up AOBJN word
  6202	041120	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  6203
  6204					; Loop on condition code
  6205
  6206	041121	474 07 0 00 000000 		SETO	7,			; initialize pointer
  6207	041122	350 00 0 00 000007 	DCCOD1:	AOS	7			; point to next condition code
  6208	041123	303 07 0 00 000017 		CAILE	7,17			; done yet?
  6209	041124	254 00 0 00 041146 		JRST	DCCOD2			; yes - go print results
  6210	041125	137 07 0 00 113130 		DPB	7,[POINT 4,CCMIC+3,23]	; no - set up microcode
  6211	041126	201 01 0 00 041232 		MOVEI	1,CCMIC			; set up microcode address
  6212	041127	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  6213	041130	255 00 0 00 000000 		JFCL				; ignore error
  6214	041131	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  6215	041132	242 01 0 00 000001 		LSH	1,1			; position correctly
  6216	041133	260 17 0 00 040271*		GO	LDRAR			; load the RAR
  6217	041134	201 01 0 00 000010 		MOVEI	1,MPRUN			; start it up
  6218	041135	260 17 0 00 041006*		GO	LDCSR			; write to CSR register
  6219	041136	201 01 0 00 040000 		MOVEI	1,SELLAR		; set up to read LAR
  6220	041137	260 17 0 00 041135*		GO	LDCSR			; stop the port
  6221	041140	260 17 0 00 035572*		GO	RDLAR			; read stopping address
  6222	041141	242 01 0 00 777777 		LSH	1,-1			; position correctly
  6223	041142	402 00 0 07 041212 		SETZM	CCTAB3(7)		; initialize result
  6224	041143	306 01 0 00 007753 		CAIN	1,7753			; was the cc set?
  6225	041144	476 00 0 07 041212 		SETOM	CCTAB3(7)		; yes - indicate such
  6226	041145	254 00 0 00 041122 		JRST	DCCOD1			; loop till done
  6227
  6228					; Print the results
  6229
  6230	041146	037 00 0 00 113131 	DCCOD2:	TMSGC	<CC On:  >
  6231	041147	474 07 0 00 000000 		SETO	7,			; initialize pointer
  6232	041150	350 00 0 00 000007 	DCCOD3:	AOS	7			; point to next entry
  6233	041151	303 07 0 00 000017 		CAILE	7,17			; done yet?
  6234	041152	254 00 0 00 041156 		JRST	DCCOD4			; yes - continue
  6235	041153	332 00 0 07 041212 		SKIPE	CCTAB3(7)		; no - cc on?
  6236	041154	256 00 0 07 041172 		XCT	CCTAB1(7)		; yes - print text
  6237	041155	254 00 0 00 041150 		JRST	DCCOD3
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 144
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0319

  6238
  6239	041156	037 00 0 00 113134 	DCCOD4:	TMSGC	<CC Off: >
  6240	041157	474 07 0 00 000000 		SETO	7,			; initialize pointer
  6241	041160	350 00 0 00 000007 	DCCOD5:	AOS	7			; point to next entry
  6242	041161	303 07 0 00 000017 		CAILE	7,17			; done yet?
  6243	041162	254 00 0 00 041166 		JRST	DCCOD6			; yes - continue
  6244	041163	336 00 0 07 041212 		SKIPN	CCTAB3(7)		; no - cc on?
  6245	041164	256 00 0 07 041172 		XCT	CCTAB1(7)		; yes - print text
  6246	041165	254 00 0 00 041160 		JRST	DCCOD5
  6247	041166	037 00 0 00 030242 	DCCOD6:	PCRL
  6248
  6249					; Restore CRAM locations and exit
  6250
  6251	041167	200 01 0 00 112133 		MOVE	1,[-4,,7750]		; set up AOBJN word
  6252	041170	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  6253	041171	263 17 0 00 000000 		RTN				; return
  6254
  6255					; Tables
  6256
  6257	041172	037 00 0 00 113137 	CCTAB1:	TMSG	< CBAV>			; 0 - CCCBUSAVAIL
  6258	041173	037 00 0 00 113141 		TMSG	< GCSR>			; 1 - CCGRNTCSR
  6259	041174	037 00 0 00 113143 		TMSG	< FEQ0>			; 2 - CCFEQ0
  6260	041175	037 00 0 00 113145 		TMSG	< CSRC>			; 3 - CCCSRCHNG
  6261	041176	037 00 0 00 113147 		TMSG	< EBPE>			; 4 - CCEBPARERR
  6262	041177	037 00 0 00 113151 		TMSG	< AFUL>			; 5 - CCRCVRBUFAFUL
  6263	041200	037 00 0 00 113153 		TMSG	< BFUL>			; 6 - CCRCVRBUFBFUL
  6264	041201	037 00 0 00 113155 		TMSG	< XATN>			; 7 - CCXMTRATTN
  6265	041202	037 00 0 00 113157 		TMSG	< ERQS>			; 10 - CCEBUSRQST
  6266	041203	037 00 0 00 113161 		TMSG	< IACT>			; 11 - CCINTRACTIVE
  6267	041204	037 00 0 00 113163 		TMSG	< MSGN>			; 12 - CCMBSIGN
  6268	041205	037 00 0 00 113165 		TMSG	< MVRP>			; 13 - CCMVRPARCHK
  6269	041206	037 00 0 00 113167 		TMSG	< CBPE>			; 14 - CCCBUSPARERR
  6270	041207	037 00 0 00 113171 		TMSG	< PLPE>			; 15 - CCPLIPARERR
  6271	041210	037 00 0 00 113173 		TMSG	< CHER>			; 16 - CCCHANERR
  6272	041211	037 00 0 00 113175 		TMSG	< CBLW>			; 17 - CCCBLSTWD
  6273
  6274	041212				CCTAB3:	BLOCK	^D16			; results
  6275
  6276					; Microcode
  6277
  6278	041232	775077	510000		CCMIC:	MWORD	<ADDR=7750,JMAP,J=7751,D=1> 	; 7750
  6279	041233	001000	000040
  6280	041234	775177	530000			MWORD	<CJP,J=7753,D=1,CENA>		; 7751
  6281	041235	001400	000060
  6282	041236	775277	520000			MWORD	<JMAP,J=7752,D=1>		; 7752
  6283	041237	001000	000040
  6284	041240	775377	530000			MWORD	<JMAP,J=7753,D=1>		; 7753
  6285	041241	001000	000040
  6286	041242	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 145
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0320

  6287
  6288					;#********************************************************************
  6289					;* DFILLN - Fill CRAM with special data (J=PC+1,OPCode)
  6290					;#********************************************************************
  6291
  6292	041243	210 01 0 00 113207 	DFILLN:	MOVN	1,[FMSGCD <FILLNX number (2910 Op code 0-17)>]
  6293	041244	260 17 0 00 041105*		GO	.OARG			; get argument
  6294	041245	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6295						 JRST	[FMSGCD	<? Missing argument>
  6296							 GO	FIOFF
  6297	041246	254 00 0 00 104450 			 RTN]
  6298	041247	260 17 0 00 041004*		GO	ISTOP			; stop the port
  6299	041250	200 01 0 00 041110*		MOVE	1,ARGUM			; get argument
  6300	041251	400 02 0 00 000000 		SETZ	2,			; initialize address
  6301	041252	402 00 0 00 035714 		SETZM	CWORDL			; initialize left half
  6302	041253	402 00 0 00 035715 		SETZM	CWORDR			; initialize right half
  6303	041254	202 02 0 00 035713 	DFILN0:	MOVEM	2,CADDR			; set up address
  6304	041255	350 00 0 00 000002 		AOS	2			; point to next address
  6305	041256	303 02 0 00 007777 		CAILE	2,7777			; at end yet?
  6306	041257	400 02 0 00 000000 		SETZ	2,			; yes - set back to zero
  6307	041260	137 02 0 00 111127 		DPB	2,[POINT 12,CWORDL,17]	; insert J field
  6308	041261	137 01 0 00 111201 		DPB	1,[POINT 4,CWORDR,31]	; insert CTL field
  6309	041262	260 17 0 00 036340 		GO	DWCRAM			; load it
  6310	041263	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  6311	041264	326 02 0 00 041254 		JUMPN	2,DFILN0		; loop till done
  6312	041265	037 00 0 00 113210 		TMSGCD	<[Number of CRAM locations loaded = 4096.]>
  6313	041266	263 17 0 00 000000 		RTN				; return
  6314
  6315
  6316					;#********************************************************************
  6317					;* DFILLP - Fill CRAM with special data (J=PC,OPCode)
  6318					;#********************************************************************
  6319
  6320	041267	210 01 0 00 113232 	DFILLP:	MOVN	1,[FMSGCD <FILLPC number (2910 Op code 0-17)>]
  6321	041270	260 17 0 00 041244*		GO	.OARG			; get argument
  6322	041271	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6323						 JRST	[FMSGCD	<? Missing argument>
  6324							 GO	FIOFF
  6325	041272	254 00 0 00 104450 			 RTN]
  6326	041273	260 17 0 00 041247*		GO	ISTOP			; stop the port
  6327	041274	200 01 0 00 041250*		MOVE	1,ARGUM			; get argument
  6328	041275	476 00 0 00 035713 		SETOM	CADDR			; initialize address
  6329	041276	402 00 0 00 035714 		SETZM	CWORDL			; initialize left half
  6330	041277	402 00 0 00 035715 		SETZM	CWORDR			; initialize right half
  6331	041300	350 02 0 00 035713 	DFILP0:	AOS	2,CADDR			; set up address
  6332	041301	137 02 0 00 111127 		DPB	2,[POINT 12,CWORDL,17]	; insert J field
  6333	041302	137 01 0 00 111201 		DPB	1,[POINT 4,CWORDR,31]	; insert CTL field
  6334	041303	260 17 0 00 036340 		GO	DWCRAM			; load it
  6335	041304	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  6336	041305	307 02 0 00 007777 		CAIG	2,7777			; done yet?
  6337	041306	254 00 0 00 041300 		JRST	DFILP0			; no - loop till done
  6338	041307	037 00 0 00 113210 		TMSGCD	<[Number of CRAM locations loaded = 4096.]>
  6339	041310	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 146
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0321

  6340
  6341					;#********************************************************************
  6342					;* DCWPNT - Print CCW list
  6343					;#********************************************************************
  6344
  6345	041311	200 01 0 00 113237 	DCWPNT:	MOVE	1,[FMSGCD (CCWPNT <CR>)]
  6346	041312	260 17 0 00 041115*		GO	CHKARG			; check for argument
  6347	041313	263 17 0 00 000000 		RTN				; error - exit
  6348	041314	260 17 0 00 000000*		GO	CCWPNT			; print CCW list
  6349	041315	037 00 0 00 030242 		PCRL
  6350	041316	263 17 0 00 000000 		RTN				; return
  6351
  6352
  6353					;#********************************************************************
  6354					;* DLGPNT - Print logout data
  6355					;#********************************************************************
  6356
  6357	041317	200 01 0 00 113244 	DLGPNT:	MOVE	1,[FMSGCD (LOGPNT <CR>)]
  6358	041320	260 17 0 00 041312*		GO	CHKARG			; check for argument
  6359	041321	263 17 0 00 000000 		RTN				; error - exit
  6360	041322	260 17 0 00 000000*		GO	GETLOG			; get logout data to a buffer area
  6361	041323	260 17 0 00 000000*		GO	LOGPNT			; print channel logout data
  6362	041324	263 17 0 00 000000 		RTN				; return
  6363
  6364
  6365					;#********************************************************************
  6366					;* DSWIT - Switch complement commands
  6367					;#********************************************************************
  6368
  6369	041325	200 01 0 00 104520 	DSWIT:	MOVE	1,[FMSGCD (Switch Name <CR>)]
  6370	041326	260 17 0 00 041320*		GO	CHKARG			; check for argument
  6371	041327	263 17 0 00 000000 		RTN				; error - exit
  6372	041330	261 17 0 00 000001 		PUT	1			; save AC1
  6373	041331	200 01 0 00 031536*		MOVE	1,.CGOT			; get dispatch number
  6374	041332	275 01 0 00 000124 		SUBI	1,SWSTP			; normalize to 0..
  6375	041333	260 17 0 00 031540*		GO	SWCOM			; complement switch
  6376	041334	262 17 0 00 000001 		GET	1			; restore AC1
  6377	041335	263 17 0 00 000000 		RTN				; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 147
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0322

  6378
  6379					;#********************************************************************
  6380					;* IPRINT - Print interrupt history
  6381					;#********************************************************************
  6382
  6383	041336	200 01 0 00 113251 	DIPRIN:	MOVE	1,[FMSGCD (IPRINT <CR>)]
  6384	041337	260 17 0 00 041326*		GO	CHKARG			; check for argument
  6385	041340	263 17 0 00 000000 		RTN				; error - exit
  6386	041341	261 17 0 00 000000 	IPRINT:	RPUT	(0,1,2)			; save AC's
  6387
  6388	041344	335 01 0 00 000000*	IPRIN0:	SKIPGE	1,INTNUM		; any interrupt yet?
  6389	041345	254 00 0 00 041351 		JRST	IPRINX
  6390	041346	260 17 0 00 041355 		GO	IPRINI			; yes - print the data
  6391	041347	037 07 0 00 000003 		TTALTM				; check for altmode typed
  6392	041350	254 00 0 00 041344 		JRST	IPRIN0			; no - keep looping
  6393	041351	262 17 0 00 000002 	IPRINX:	RGET	(2,1,0)			; yes - restore AC's
  6394
  6395	041354	263 17 0 00 000000 		RTN				; exit
  6396
  6397					; Print interrupt data
  6398
  6399	041355	370 01 0 00 041344*	IPRINI:	SOS	1,INTNUM		; point to previous interrupt
  6400	041356	303 01 0 00 000023 		CAILE	1,^D19			; overflow interrupt?
  6401	041357	201 01 0 00 000023 		MOVEI	1,^D19			; yes - limit to 20 interrupts
  6402	041360	202 01 0 00 041355*		MOVEM	1,INTNUM		; save number left
  6403	041361	037 00 0 00 113252 		TMSGC	<=====>
  6404	041362	550 02 0 01 000000*		HRRZ	2,INTTYP(1)		; get type
  6405						XCT	[TMSGC	<Vectored (PC = >	
  6406							 TMSGC	<NV Chn 1 (PC = >
  6407							 TMSGC	<NV Chn 2 (PC = >
  6408							 TMSGC	<NV Chn 3 (PC = >
  6409							 TMSGC	<NV Chn 4 (PC = >
  6410							 TMSGC	<NV Chn 5 (PC = >
  6411							 TMSGC	<NV Chn 6 (PC = >
  6412	041363	256 00 0 02 113314 			 TMSGC	<NV Chn 7 (PC = >](2)
  6413	041364	550 00 0 01 000000*		HRRZ	INTPC(1)		; get interrupt PC
  6414	041365	037 16 0 00 000003 		PNTOCS				; print it
  6415	041366	037 00 0 00 113324 		TMSG	<) at >
  6416	041367	200 00 0 01 000000*		MOVE	INTTIM(1)		; get milliseconds
  6417	041370	037 15 0 00 000000 		PNTDEC
  6418	041371	037 00 0 00 113326 		TMSG	<.ms + >
  6419	041372	200 00 0 01 000000*		MOVE	INTUSE(1)		; get microseconds
  6420	041373	037 15 0 00 000000 		PNTDEC
  6421	041374	037 00 0 00 113330 		TMSG	<.us>
  6422	041375	037 00 0 00 113331 		TMSGC	<CONI PI = >
  6423	041376	200 00 0 01 000000*		MOVE	INTCON(1)		; get CONI PI data
  6424	041377	037 13 0 00 000000 		PNTHW				; print it
  6425	041400	037 00 0 00 113334 		TMSG	<  CONI APR = >
  6426	041401	200 00 0 01 000000*		MOVE	INTAPR(1)		; get APR data
  6427	041402	037 13 0 00 000000 		PNTHW				; print it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 148
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0323

  6428	041403	037 00 0 00 113337 		TMSG	<  CSR = >
  6429	041404	200 00 0 01 000000*		MOVE	INTCSR(1)		; get CSR data
  6430	041405	037 13 0 00 000000 		PNTHW				; print it
  6431	041406	037 00 0 00 030242 		PCRL
  6432	041407	335 00 0 01 041362*		SKIPGE	INTTYP(1)
  6433	041410	037 00 0 00 113341 		TMSGCD	< ##### (Interrupts flushed) #####>
  6434	041411	263 17 0 00 000000 		RTN	
  6435
  6436
  6437					;#********************************************************************
  6438					;* IINIT - Initialize interrupt system
  6439					;#********************************************************************
  6440
  6441	041412	200 01 0 00 113354 	DIINIT:	MOVE	1,[FMSGCD (IINIT <CR>)]
  6442	041413	260 17 0 00 041337*		GO	CHKARG			; check for argument
  6443	041414	263 17 0 00 000000 		RTN				; error - exit
  6444	041415	260 17 0 00 031035*		GO	INITPI			; init PI system
  6445	041416	260 17 0 00 031354*		GO	SETVEC			; set up vector addresses
  6446	041417	263 17 0 00 000000 		RTN				; return
  6447
  6448
  6449					;#********************************************************************
  6450					;* DPINIT - Initialize PCB and queues
  6451					;#********************************************************************
  6452
  6453	041420	200 01 0 00 113360 	DPINIT:	MOVE	1,[FMSGCD (PINIT <CR>)]
  6454	041421	260 17 0 00 041413*		GO	CHKARG			; check for argument
  6455	041422	263 17 0 00 000000 		RTN				; error - exit
  6456	041423	260 17 0 00 064612 		GO	TPCB			; initialize the PCB
  6457	041424	263 17 0 00 000000 		RTN				; return
  6458
  6459
  6460					;#********************************************************************
  6461					;* DSIDLE - Start port and wait for IDLE loop
  6462					;#********************************************************************
  6463
  6464	041425	200 01 0 00 113364 	DSIDLE:	MOVE	1,[FMSGCD (SIDLE <CR>)]
  6465	041426	260 17 0 00 041421*		GO	CHKARG			; check for argument
  6466	041427	263 17 0 00 000000 		RTN				; error - exit
  6467	041430	260 17 0 00 065052 		GO	TIDLE			; start up port and wait for IDLE
  6468	041431	037 01 0 00 113365 		FMSGCD	<? Never got to idle loop>
  6469	041432	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 149
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0324

  6470
  6471					;#********************************************************************
  6472					;* DBPACK - Build packet
  6473					;#********************************************************************
  6474
  6475	041433	210 01 0 00 113373 	DBPACK:	MOVN	1,[GO	DBPACP]		; get help text
  6476	041434	260 17 0 00 041270*		GO	.OARG			; get argument
  6477	041435	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6478						 JRST	[FMSGCD	<? Missing argument - Opcode>
  6479							 GO	FIOFF
  6480	041436	254 00 0 00 113403 			 RTN]
  6481	041437	200 11 0 00 041274*		MOVE	OP,ARGUM		; get opcode
  6482	041440	260 17 0 00 067212 		GO	DECOPC			; decode the op code
  6483	041441	334 00 0 00 000000 		SKIPA				; error - print error
  6484	041442	332 00 0 00 000002 		SKIPE	2			; correct type?
  6485						JRST	[FMSGCD	<? Opcode illegal> ; no - print error
  6486							 GO	FIOFF
  6487	041443	254 00 0 00 113413 			 RTN]
  6488
  6489					; Set up arguments
  6490
  6491	041444	200 00 0 00 034006 		MOVE	RSPFLG			; get response flag
  6492	041445	202 00 0 00 065155 		MOVEM	TRSFLG			; save it
  6493	041446	200 00 0 00 034007 		MOVE	FORSEL			; get format select flag
  6494	041447	202 00 0 00 065154 		MOVEM	TFMFLG			; save it
  6495	041450	200 00 0 00 034010 		MOVE	PATSEL			; get path select flag
  6496	041451	202 00 0 00 065156 		MOVEM	TPTFLG			; save it
  6497	041452	120 00 0 00 034014 		DMOVE	DXCTID			; get transaction id
  6498	041453	124 00 0 00 065157 		DMOVEM	TXCTID			; save it
  6499	041454	200 00 0 00 034011 		MOVE	DPORT			; get destination port
  6500	041455	202 00 0 00 065161 		MOVEM	TDPORT			; save it
  6501	041456	200 00 0 00 034002 		MOVE	DSBYTE			; get byte count
  6502	041457	202 00 0 00 065162 		MOVEM	TBYTE			; save it
  6503	041460	402 00 0 00 065163 		SETZM	TWORD			; clear word count
  6504	041461	200 00 0 00 034003 		MOVE	DSPAT			; get data pattern
  6505	041462	202 00 0 00 065164 		MOVEM	TPAT			; save it
  6506	041463	260 17 0 00 065174 		GO	BPACK			; build the packet
  6507	041464	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 150
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0325

  6508
  6509					; Print help text
  6510
  6511	041465	037 01 0 00 113416 	DBPACP:	FMSGCD <BPACK opcode (CR), where opcode:>
  6512	041466	474 11 0 00 000000 		SETO	OP,			; initialize op code
  6513	041467	474 03 0 00 000000 		SETO	3,			; print count
  6514	041470	350 00 0 00 000011 	DBPAC0:	AOS	OP			; point to next one
  6515	041471	303 11 0 00 000377 		CAILE	OP,377			; done yet?
  6516						JRST	[PCRLF
  6517	041472	254 00 0 00 111022 			 RTN]
  6518	041473	260 17 0 00 067212 		GO	DECOPC			; decode op code
  6519	041474	254 00 0 00 041470 		JRST	DBPAC0			; error - keep looping
  6520	041475	332 00 0 00 000002 		SKIPE	2			; incorrect type?
  6521	041476	254 00 0 00 041470 		JRST	DBPAC0			; yes - keep looping
  6522	041477	350 00 0 00 000003 		AOS	3			; increment print count
  6523	041500	301 03 0 00 000006 		CAIL	3,6			; more than 6 on this line?
  6524						GO	[SETZ	3,		; yes - reinit everything
  6525							 PCRLF
  6526	041501	260 17 0 00 113426 			 RTN]
  6527	041502	037 00 0 00 103540 		TMSG	< >
  6528	041503	001 03 0 00 000011 		PNTOCC	3,OP			; print op code
  6529						XCT	[FMSG	<-SNDDG  >	; print in English
  6530							 FMSG	<-SNDMSG >
  6531							 FMSG	<-REQID  >
  6532							 FMSG	<-SNDRST >
  6533							 FMSG	<-SNDSTRT>
  6534							 FMSG	<-REQDAT0>
  6535							 FMSG	<-REQDAT1>
  6536							 FMSG	<-REQDAT2>
  6537							 FMSG	<-SNDLB  >
  6538							 FMSG	<-REQMDAT>
  6539							 FMSG	<-SNDDAT >
  6540							 FMSG	<-RETDAT >
  6541							 FMSG	<-SNDMDAT>
  6542							 FMSG	<-CLSBUF >
  6543							 FMSG	<-SETCKT >
  6544							 FMSG	<-SETCNT >
  6545							 FMSG	<-RDCNT  >
  6546							 FMSG	<-RDREG  >
  6547	041504	256 00 0 01 113477 			 FMSG	<-WRREG  >](1)
  6548	041505	254 00 0 00 041470 		JRST	DBPAC0			; loop till done
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 151
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0326

  6549
  6550					;#********************************************************************
  6551					;* DIQUEU - Insert a packet on a command queue
  6552					;#********************************************************************
  6553
  6554	041506	210 01 0 00 113530 	DIQUEU:	MOVN	1,[FMSGCD <IQUEUE queue (3-0) (CR)>]
  6555	041507	260 17 0 00 041434*		GO	.OARG			; get argument
  6556	041510	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6557						 JRST	[FMSGCD	<? Missing argument - CmdQueue 3-0>
  6558							 GO	FIOFF
  6559	041511	254 00 0 00 113541 			 RTN]
  6560	041512	331 13 0 00 041437*		SKIPL	Q,ARGUM			; get argument
  6561	041513	303 13 0 00 000003 		CAILE	Q,3			; in range?
  6562						JRST	[FMSGCD	<? CmdQueue out of range 3-0>
  6563							 GO	FIOFF
  6564	041514	254 00 0 00 113553 			 RTN]
  6565
  6566					; Check if a packet exists
  6567
  6568	041515	336 00 0 00 070052 		SKIPN	PACKET+3		; packet has been built?
  6569						JRST	[FMSGCD	<? Packet not built yet>
  6570							 GO	FIOFF
  6571	041516	254 00 0 00 113564 			 RTN]
  6572
  6573					; Insert onto the specified command queue
  6574
  6575	041517	260 17 0 00 065777 		GO	INSQUE			; insert into queue
  6576						JRST	[FMSGCD	<? No free queue entries available or interlock failed>
  6577							 GO	FIOFF
  6578	041520	254 00 0 00 113603 			 RTN]
  6579	041521	263 17 0 00 000000 		RTN				; return
  6580
  6581
  6582					;#********************************************************************
  6583					;* DPPCB - Print PCB
  6584					;#********************************************************************
  6585
  6586	041522	200 01 0 00 113611 	DPPCB:	MOVE	1,[FMSGCD (PPCB <CR>)]
  6587	041523	260 17 0 00 041426*		GO	CHKARG			; check for argument
  6588	041524	263 17 0 00 000000 		RTN				; error - exit
  6589	041525	260 17 0 00 067434 		GO	PPCB			; print PCB data
  6590	041526	037 00 0 00 030242 		PCRL
  6591	041527	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 152
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0327

  6592
  6593					;#********************************************************************
  6594					;* DPQUEU - Print specified queue
  6595					;#********************************************************************
  6596
  6597	041530	200 01 0 00 113615 	DPQUEU:	MOVE	1,[FMSGCD (PQUEUE n1,n2 <CR>)]
  6598	041531	260 17 0 00 041507*		GO	.OARG			; get argument
  6599	041532	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6600						 JRST	[FMSGCD	<? Missing argument>
  6601							 GO	FIOFF
  6602	041533	254 00 0 00 104450 			 RTN]
  6603	041534	331 01 0 00 041512*		SKIPL	1,ARGUM			; get argument, in range
  6604	041535	303 01 0 00 000006 		CAILE	1,6			;   0-6?
  6605						JRST	[FMSGCD	<? Queue number out of range 0-6>
  6606							 GO	FIOFF
  6607	041536	254 00 0 00 113626 			 RTN]
  6608	041537	202 01 0 00 120762'		MOVEM	1,QARG1#		; save queue number
  6609	041540	202 01 0 00 120763'		MOVEM	1,QARG2#		; save queue number
  6610
  6611	041541	210 01 0 00 113615 		MOVN	1,[FMSGCD (PQUEUE n1,n2 <CR>)]
  6612	041542	260 17 0 00 041531*		GO	.OARG			; get argument
  6613	041543	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6614	041544	254 00 0 00 041553 		JRST	DPQUE0
  6615	041545	331 01 0 00 041534*		SKIPL	1,ARGUM			; get argument, in range
  6616	041546	303 01 0 00 000006 		CAILE	1,6			;   0-6?
  6617						JRST	[FMSGCD	<? Queue number out of range 0-6>
  6618							 GO	FIOFF
  6619	041547	254 00 0 00 113626 			 RTN]
  6620	041550	202 01 0 00 120763'		MOVEM	1,QARG2#		; save queue number
  6621	041551	315 01 0 00 120762'		CAMGE	1,QARG1			; see if range ok?
  6622						JRST	[FMSGCD <? Range nonsensical>
  6623							 GO	FIOFF
  6624	041552	254 00 0 00 110071 			 RTN]
  6625
  6626	041553	200 13 0 00 120762'	DPQUE0:	MOVE	Q,QARG1			; get queue number
  6627	041554	260 17 0 00 066353 		GO	PQUEUE			; print this queue
  6628	041555	037 00 0 00 030242 		PCRL				; final CRLF
  6629	041556	350 13 0 00 120762'		AOS	Q,QARG1			; point to next queue
  6630	041557	317 13 0 00 120763'		CAMG	Q,QARG2			; done yet?
  6631	041560	254 00 0 00 041553 		JRST	DPQUE0			; no - loop till done
  6632	041561	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 153
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0328

  6633
  6634					;#********************************************************************
  6635					;* DWATCH - Watch port and print events that occur
  6636					;#********************************************************************
  6637
  6638	041562	402 00 0 00 041545*	DWATCH:	SETZM	ARGUM			; default to echo
  6639	041563	350 00 0 00 041562*		AOS	ARGUM			;  ...
  6640	041564	210 01 0 00 113641 		MOVN	1,[FMSGCD <WATCH arg 0-no echo,1-echo (CR)>]
  6641	041565	260 17 0 00 041542*		GO	.OARG			; get argument
  6642	041566	263 17 0 00 000000 		 RTN				; error/altmode/question - exit
  6643	041567	255 00 0 00 000000 		 JFCL				; no argument typed - continue
  6644	041570	261 17 0 00 000002 		RPUT	(2,3)			; save AC's
  6645
  6646	041572	260 17 0 00 065052 		GO	TIDLE			; ensure in idle loop
  6647						JRST	[SKIPE	UDEBUG
  6648							 JRST	.+1
  6649							 FMSGCD	<? Couldn't start port>
  6650							 RGET	(3,2)
  6651	041573	254 00 0 00 113650 			 RTN]
  6652	041574	260 17 0 00 042122 		GO	SETENA			; ensure the port is enabled
  6653						JRST	[SKIPE	UDEBUG
  6654							 JRST	.+1
  6655							 FMSGCD	<? Couldn't enable port>
  6656							 RGET	(3,2)
  6657	041575	254 00 0 00 113664 			 RTN]
  6658	041576	402 00 0 00 120720'		SETZM	CSRSAV#			; original CSR value
  6659	041577	402 00 0 00 120750'		SETZM	NCHAR#			; clear last character typed
  6660	041600	402 00 0 00 121014'		SETZM	WATFLG#			; initialize interval packet flag
  6661	041601	402 00 0 00 121015'		SETZM	WATTIM#			; initialize time to send next packet
  6662	041602	402 00 0 00 120753'		SETZM	NPACKS#			; initialize number of packets sent
  6663	041603	402 00 0 00 120752'		SETZM	NPACKR#			; initialize number of packets received
  6664	041604	400 03 0 00 000000 		SETZ	3,			; set up to read time
  6665	041605	260 17 0 00 032045*		GO	RUNTME			; get runtime so far
  6666	041606	200 00 0 00 031654*		MOVE	CURTIM			; get current time
  6667	041607	270 00 0 00 034020 		ADD	DSSUM			; point to interval away
  6668	041610	202 00 0 00 121003'		MOVEM	STIME#			; save statistics time
  6669	041611	402 00 0 00 000000*		SETZM	RQAFLG			; clear response queue available flag
  6670
  6671					; Start of idle loop
  6672
  6673	041612				DWATCQ:	TMSGCD	<[Type: S-SndPk O-SndPks 0-EchoOff 1-EchoOn 2-PntCSR 3-PntPCB 4-PntStats $-E
  6674	041612	037 00 0 00 113672 	xit]>
  6675
  6676	041613	037 07 0 00 000003 	DWATC0:	TTALTM				; altmode typed?
  6677	041614	334 00 0 00 000000 		SKIPA				; no - keep checking CSR, etc.
  6678	041615	254 00 0 00 042050 		JRST	DWATCX			; yes - exit
  6679	041616	332 00 0 00 120713'		SKIPE	ALTF			; altmode flagged?
  6680	041617	254 00 0 00 042050 		JRST	DWATCX			; yes - exit
  6681	041620	336 00 0 00 120750'		SKIPN	NCHAR			; prior character saved?
  6682	041621	202 00 0 00 120750'		MOVEM	NCHAR			; no - save this one
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 154
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0329

  6683
  6684					; Check on summary interval time
  6685
  6686	041622	400 03 0 00 000000 		SETZ	3,			; set up to read time
  6687	041623	260 17 0 00 041605*		GO	RUNTME			; get runtime so far
  6688	041624	200 00 0 00 041606*		MOVE	CURTIM			; get current time
  6689	041625	315 00 0 00 121003'		CAMGE	STIME			; time to print statistics?
  6690	041626	254 00 0 00 041650 		JRST	DWATCG			; no - continue
  6691	041627	037 00 0 00 113713 		TMSGC	<*** Statistics >
  6692	041630	332 00 0 00 120727'		SKIPE	EDEBUG			; expanded data switch set?
  6693						GO	[TMSG	<Port->		; yes - print what port
  6694							 LDB	[POINT 3,MBCN,9];   this is
  6695							 PNT2
  6696							 PSP
  6697	041631	260 17 0 00 104640 			 RTN]
  6698	041632	200 03 0 00 103543 		MOVE	3,[JFCL]		; set up to print time
  6699	041633	260 17 0 00 041623*		GO	RUNTME			; print elapsed time
  6700	041634	037 00 0 00 113717 		TMSG	< ***>
  6701	041635	037 00 0 00 113720 		TMSGC	< Packets sent:  >
  6702	041636	200 00 0 00 120753'		MOVE	NPACKS			; get packets sent
  6703	041637	037 15 0 00 000000 		PNTDEC				; print it
  6704	041640	037 00 0 00 107460 		TMSG	<.>
  6705	041641	037 00 0 00 113724 		TMSGC	< Packets rcvd:  >
  6706	041642	200 00 0 00 120752'		MOVE	NPACKR			; get packets received
  6707	041643	037 15 0 00 000000 		PNTDEC				; print it
  6708	041644	037 00 0 00 104543 		TMSGD	<.>
  6709	041645	200 00 0 00 121003'		MOVE	STIME			; get statistics time
  6710	041646	270 00 0 00 034020 		ADD	DSSUM			; point to interval away
  6711	041647	202 00 0 00 121003'		MOVEM	STIME			; save statistics time
  6712
  6713					; First check on changed CSR data
  6714
  6715	041650	332 00 0 00 121012'	DWATCG:	SKIPE	UDEBUG			; debug mode?
  6716	041651	254 00 0 00 041670 		JRST	DWATC1			; yes - ignore this
  6717	041652	260 17 0 00 037761*		GO	RDCSR			; go read CSR
  6718	041653	255 00 0 00 000000 		JFCL				; error - ignore
  6719	041654	621 01 0 00 220100 		TLZ	1,(PI00RQ!CSRRQS!IDLE) 	; ignore 'PI00Rq','CSR rqst','IDLE'
  6720	041655	620 01 0 00 000200 		TRZ	1,RESQAV		;   and 'ResQAv' bits
  6721	041656	316 01 0 00 120720'		CAMN	1,CSRSAV		; same as last value?
  6722	041657	254 00 0 00 041670 		JRST	DWATC1			; yes - continue
  6723	041660	336 00 0 00 041563*		SKIPN	ARGUM			; no - echo on?
  6724	041661	254 00 0 00 041670 		JRST	DWATC1			; no - continue
  6725	041662	202 01 0 00 120720'		MOVEM	1,CSRSAV		; yes - save new CSR data
  6726	041663	037 00 0 00 113730 		TMSGC	<***** >
  6727	041664	260 17 0 00 000000*		GO	PTIME			; print time
  6728	041665	037 00 0 00 113732 		TMSG	< ***** CSR Changed>
  6729	041666	260 17 0 00 042443 		GO	CSRPNT			; print CSR data in English
  6730	041667	037 00 0 00 030242 		PCRL				; end of line
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 155
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0330

  6731
  6732					; Then check on response queue entries
  6733
  6734	041670	260 17 0 00 000000*	DWATC1:	GO	CHKRQV			; check response queue available
  6735	041671	260 17 0 00 066134 		GO	CHKRSP			; check for RspQ entry
  6736						JRST	[SETZM	RQAFLG		; no entry found - continue
  6737							 MOVE	1,PCB+21	; get response queue FLINK
  6738							 GO	CONVIR		; convert to virtual
  6739							 CAIE	1,PCB+21	; queue really empty?
  6740							 SETOM	RQAFLG		; no - set rsp queue avail flag
  6741	041672	254 00 0 00 113736 			 JRST	.+4]
  6742	041673	350 00 0 00 120752'		AOS	NPACKR			; entry found - increment count
  6743	041674	332 00 0 00 041660*		SKIPE	ARGUM			; echo on?
  6744	041675	260 17 0 00 042056 		GO	PNTRSP			; yes - print it
  6745
  6746					; Check to see if we should put another packet on the command queue - if the
  6747					; interval time is expired and if this is enabled.
  6748
  6749	041676	400 03 0 00 000000 		SETZ	3,			; initialize to RUNTME
  6750	041677	260 17 0 00 041633*		GO	RUNTME			; get current time
  6751	041700	200 00 0 00 000000*		MOVE	DEBTIM			; get time in milliseconds
  6752	041701	315 00 0 00 121015'		CAMGE	WATTIM			; time to insert a packet?
  6753	041702	254 00 0 00 041710 		JRST	DWATC2			; no - continue
  6754	041703	336 00 0 00 121014'		SKIPN	WATFLG			; packet insertion enabled?
  6755	041704	254 00 0 00 041710 		JRST	DWATC2			; no - continue
  6756	041705	270 00 0 00 034021 		ADD	DSINT			; yes - adjust next time
  6757	041706	202 00 0 00 121015'		MOVEM	WATTIM			;    by DSINT seconds
  6758	041707	254 00 0 00 041743 		JRST	DWATC3			; go insert a packet
  6759
  6760					; Finally, check to see if a special character was typed - S,O,0,1,2,3,4?
  6761
  6762	041710	200 00 0 00 031043*	DWATC2:	MOVE	.INWD1			; get interrupt fielded
  6763	041711	620 00 0 00 000200 		TRZ	RESQAV			; clear response queue available
  6764	041712	202 00 0 00 041710*		MOVEM	.INWD1			; save interrupt fielded
  6765	041713	260 17 0 00 032377*		GO	.INPNT			; print interrupt fielded (if any)
  6766	041714	336 00 0 00 120750'		SKIPN	NCHAR			; any character pending?
  6767	041715	254 00 0 00 041613 		JRST	DWATC0			; no - keep looping
  6768	041716	200 00 0 00 120750'		MOVE	NCHAR			; get last character typed
  6769	041717	402 00 0 00 120750'		SETZM	NCHAR			; clear last character typed
  6770	041720	302 00 0 00 000123 		CAIE	123			; was it an 'S'?
  6771	041721	306 00 0 00 000163 		CAIN	163			;   or 's'?
  6772	041722	254 00 0 00 041743 		JRST	DWATC3			; yes - insert another packet
  6773	041723	302 00 0 00 000117 		CAIE	117			; was it a 'O'?
  6774	041724	306 00 0 00 000157 		CAIN	157			;   or 'o'?
  6775	041725	254 00 0 00 042036 		JRST	DWATC7			; yes - go complement flag
  6776	041726	306 00 0 00 000060 		CAIN	60			; was it a '0'?
  6777	041727	402 00 0 00 041674*		SETZM	ARGUM			; yes - set echo off
  6778	041730	306 00 0 00 000061 		CAIN	61			; was it a '1'?
  6779	041731	476 00 0 00 041727*		SETOM	ARGUM			; yes - set echo on
  6780	041732	306 00 0 00 000062 		CAIN	62			; was it a '2'?
  6781	041733	254 00 0 00 042026 		JRST	DWATC6			; yes - print CSR
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 156
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0331

  6782	041734	306 00 0 00 000063 		CAIN	63			; was it a '3'?
  6783	041735	254 00 0 00 042012 		JRST	DWATC4			; yes - print PCB data
  6784	041736	306 00 0 00 000064 		CAIN	64			; was it a '4'?
  6785	041737	254 00 0 00 042043 		JRST	DWATC8			; yes - print statistics
  6786	041740	306 00 0 00 000077 		CAIN	77			; was it a '?'?
  6787	041741	254 00 0 00 041612 		JRST	DWATCQ			; yes - print some help
  6788	041742	254 00 0 00 041613 		JRST	DWATC0			; keep looping
  6789
  6790					; An 'S' was typed, insert this same packet on the queue last used.
  6791
  6792	041743	200 01 0 00 070052 	DWATC3:	MOVE	1,PACKET+3		; get status word
  6793	041744	135 11 0 00 113744 		LDB	OP,[POINT 8,1,23]	; get op code
  6794						JUMPE	OP,[PCRL
  6795							    TMSGCD <? No prior packet - nothing put on queue>
  6796	041745	322 11 0 00 113756 			    JRST   DWATC2]
  6797	041746	261 17 0 00 000013 		PUT	Q			; save queue number
  6798	041747	201 13 0 00 000006 		MOVEI	Q,6			; get DGM free queue number
  6799	041750	260 17 0 00 065617 		GO	CHKINT			; get list of queue entries
  6800	041751	255 00 0 00 000000 		JFCL				; ignore error
  6801	041752	476 00 0 00 070026 		SETOM	PCB+26			; reset the interlock
  6802	041753	262 17 0 00 000013 		GET	Q			; restore queue number
  6803	041754	200 00 0 00 065751 		MOVE	NUMENT			; get entry count
  6804	041755	305 00 0 00 000002 		CAIGE	2			; 2 or more?
  6805	041756	254 00 0 00 041710 		JRST	DWATC2			; no - continue
  6806	041757	351 00 0 00 000013 		AOSL	Q			; point to next queue
  6807	041760	303 13 0 00 000003 		CAILE	Q,3			; between 0 and 3?
  6808	041761	400 13 0 00 000000 		SETZ	Q,			; no - set to 0
  6809	041762	260 17 0 00 065777 		GO	INSQUE			; insert into queue
  6810						JRST	[PCRL
  6811							 TMSGCD	<? No free queue entries available or interlock failed>
  6812	041763	254 00 0 00 113761 			 JRST	DWATC2]
  6813	041764	337 00 0 00 065751 		SKIPG	NUMENT			; was the queue empty?
  6814						GO	[GO	RDCSR		; yes - set 'CMDQAV'
  6815							 TMSGCD	<? Read CSR failed>
  6816							 TRO	1,CMDQAV
  6817							 TRZ	1,RESQAV
  6818							 GO	LDCSR
  6819	041765	260 17 0 00 113771 			 RTN]
  6820	041766	350 00 0 00 120753'		AOS	NPACKS			; increment sent count
  6821	041767	336 00 0 00 041731*		SKIPN	ARGUM			; echo on?
  6822	041770	254 00 0 00 041710 		JRST	DWATC2			; no - keep looping
  6823	041771	037 00 0 00 030242 		PCRL
  6824	041772	037 00 0 00 113730 		TMSGC	<***** >
  6825	041773	260 17 0 00 041664*		GO	PTIME			; print time
  6826	041774	037 00 0 00 113777 		TMSG	<** Packet (>
  6827	041775	260 17 0 00 067055 		GO	OPCPNT			; print op code
  6828	041776	037 00 0 00 114002 		TMSG	<) Inserted on CmdQ>
  6829	041777	200 00 0 00 000013 		MOVE	Q
  6830	042000	037 16 0 00 000003 		PNTOCS				; print queue number
  6831	042001	037 00 0 00 114006 		TMSGD	< **>
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 157
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0332

  6832
  6833					; Check if debug mode is set - if so insert entries on the response queue also
  6834
  6835	042002	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  6836	042003	254 00 0 00 041710 		JRST	DWATC2			; no - keep looping	
  6837	042004	261 17 0 00 000013 		PUT	Q			; save queue number
  6838	042005	201 13 0 00 000004 		MOVEI	Q,4			; get number of response queue
  6839	042006	260 17 0 00 065777 		GO	INSQUE			; insert into queue
  6840	042007	255 00 0 00 000000 		JFCL				; error - ignore
  6841	042010	262 17 0 00 000013 		GET	Q			; restore queue number
  6842	042011	254 00 0 00 041710 		JRST	DWATC2			; keep looping
  6843
  6844					; An '2' was typed, print PCB data
  6845
  6846	042012	260 17 0 00 042015 	DWATC4:	GO	DWATC5			; go print it
  6847	042013	037 00 0 00 030242 		PCRL				; end of line
  6848	042014	254 00 0 00 041613 		JRST	DWATC0			; keep looping
  6849
  6850	042015	261 17 0 00 000000 	DWATC5:	RPUT	(0,1,2,3,4)		; save AC's
  6851
  6852	042022	037 00 0 00 113730 		TMSGC	<***** >
  6853	042023	260 17 0 00 041773*		GO	PTIME			; print time
  6854	042024	037 00 0 00 114010 		TMSG	< ***** PCB>
  6855	042025	254 00 0 00 067504 		PJRST	PPCBD			; print the PCB data
  6856
  6857					; An '1' was typed, print CSR register
  6858
  6859	042026	260 17 0 00 041652*	DWATC6:	GO	RDCSR			; read CSR register
  6860	042027	037 00 0 00 113764 		TMSGCD	<? Read CSR failed>	; error - print message
  6861	042030	037 00 0 00 113730 		TMSGC	<***** >
  6862	042031	260 17 0 00 042023*		GO	PTIME			; print time
  6863	042032	037 00 0 00 114013 		TMSG	< ***** CSR>
  6864	042033	260 17 0 00 042443 		GO	CSRPNT			; print CSR data in English
  6865	042034	037 00 0 00 030242 		PCRL				; end of line
  6866	042035	254 00 0 00 041613 		JRST	DWATC0			; keep looping
  6867
  6868					; An 'O' was typed, complement interval flag
  6869
  6870	042036	462 00 0 00 121014'	DWATC7:	SETCMM	WATFLG			; complement interval flag
  6871	042037	332 00 0 00 121014'		SKIPE	WATFLG			; set?
  6872						JRST	[TMSGC	<*** Will send packets at a >
  6873							 MOVE	DSINT			; get interval time
  6874							 PNTDEC				; print it out
  6875							 TMSGD	<. millisecond interval ***>
  6876	042040	254 00 0 00 114032 			 JRST	DWATC0]
  6877	042041	037 00 0 00 114037 		TMSGCD	<*** Will not send packets ***>
  6878	042042	254 00 0 00 041613 		JRST	DWATC0			; keep looping
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 158
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0333

  6879
  6880					; An '3' was typed, print statistics
  6881
  6882	042043	400 03 0 00 000000 	DWATC8:	SETZ	3,			; set up to read time
  6883	042044	260 17 0 00 041677*		GO	RUNTME			; get runtime so far
  6884	042045	200 00 0 00 041624*		MOVE	CURTIM			; get current time
  6885	042046	202 00 0 00 121003'		MOVEM	STIME			; set time to print statistics
  6886	042047	254 00 0 00 041613 		JRST	DWATC0			; continue
  6887
  6888					; Exit
  6889	
  6890	042050	260 17 0 00 042162 	DWATCX:	GO	SETDSA			; disable the port
  6891	042051	260 17 0 00 041273*		GO	ISTOP			; stop the port
  6892	042052	037 00 0 00 030242 		PCRL
  6893	042053	262 17 0 00 000003 		RGET	(3,2)			; restore AC's
  6894
  6895	042055	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 159
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0334

  6896
  6897					;#********************************************************************
  6898					;* PNTRSP - Print a response queue entry
  6899					;
  6900					; Given:  RSPONS - Packet from the Response Queue
  6901					;#********************************************************************
  6902
  6903					; First, check to see if we can print it or if it is being ignored
  6904
  6905	042056	261 17 0 00 000000 	PNTRSP:	RPUT	(0,1,2,Q)		; save AC's
  6906
  6907	042062	135 11 0 00 114046 		LDB	OP,[POINT 8,RSPONS+3,23]; get op code
  6908	042063	336 00 0 00 034017 		SKIPN	IGNFLG			; ignore SNDDG packets?
  6909	042064	254 00 0 00 042072 		JRST	PNTRS0			; no - continue and print it
  6910	042065	135 02 0 00 114047 		LDB	2,[POINT 8,RSPONS+3,31]	; get port number
  6911	042066	306 11 0 00 000041 		CAIN	OP,SNDDG+40		; SNDDG packet?
  6912	042067	316 02 0 00 034013 		CAMN	2,CPORT			; from us?
  6913	042070	334 00 0 00 000000 		SKIPA				; yes - continue
  6914	042071	254 00 0 00 042110 		JRST	PNTRSX			; yes - exit without printing
  6915
  6916					; Print out the packet
  6917
  6918	042072	037 00 0 00 113730 	PNTRS0:	TMSGC	<***** >
  6919	042073	260 17 0 00 042031*		GO	PTIME			; print time
  6920	042074	037 00 0 00 114050 		TMSG	< ***** RspQ Entry Received (>
  6921	042075	260 17 0 00 067055 		GO	OPCPNT			; print op code
  6922	042076	037 00 0 00 114056 		TMSG	<)>
  6923	042077	201 12 0 00 070447 		MOVEI	PK,RSPONS		; get address of packet
  6924	042100	201 13 0 00 000004 		MOVEI	Q,4			; indicate response queue
  6925	042101	261 17 0 00 114057 		RPUT	([PNTRS1],0,1)		; save return address and AC's
  6926
  6927	042104	402 00 0 00 120716'		SETZM	CMDPAK			; clear command packet flag
  6928	042105	476 00 0 00 120772'		SETOM	RSPPAK			; set response packet flag
  6929	042106	254 00 0 00 066443 		JRST	PPAKCC			; go print it out
  6930	042107	037 00 0 00 030242 	PNTRS1:	PCRL
  6931
  6932					; Exit
  6933
  6934	042110	262 17 0 00 000013 	PNTRSX:	RGET	(Q,2,1,0)		; restore AC's
  6935
  6936	042114	263 17 0 00 000000 		RTN				; return
  6937
  6938
  6939					;#********************************************************************
  6940					;* DCONF - Determine and print CI configuration
  6941					;#********************************************************************
  6942
  6943	042115	200 01 0 00 104076 	DCONF:	MOVE	1,[FMSGCD (CONFIG <CR>)]
  6944	042116	260 17 0 00 041523*		GO	CHKARG			; check for argument
  6945	042117	260 17 0 00 042731 		GO	CONFIG			; do it
  6946	042120	260 17 0 00 043041 		GO	CONPNT			; print results
  6947	042121	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 160
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0335

  6948
  6949					;#********************************************************************
  6950					;* SETENA - Ensure the port is in the enabled state
  6951					;
  6952					; Return:  +1 - Failed
  6953					;	   +2 - Succeeded
  6954					;#********************************************************************
  6955
  6956	042122	261 17 0 00 000000 	SETENA:	RPUT	(0,1,2)			; save AC's
  6957
  6958
  6959					; First set DISABLE bit and wait for DISABLE COMPLETE
  6960
  6961	042125	201 01 0 00 000050 		MOVEI	1,PDSABL!MPRUN		; get DISABLE bit
  6962	042126	336 00 0 00 030037 		SKIPN	USER			; user mode?
  6963	042127	660 01 0 00 000004 		TRO	1,4			; no - set PIA bits
  6964	042130	260 17 0 00 041137*		GO	LDCSR			; write to CSR
  6965	042131	201 02 0 00 000144 		MOVEI	2,^D100			; check up to 100 times
  6966	042132	260 17 0 00 042026*	SETEN0:	GO	RDCSR			; read CSR
  6967	042133	254 00 0 00 042156 		JRST	SETENE			; error - exit
  6968	042134	603 01 0 00 000040 		TLNE	1,(DCOMP)		; DISABLE COMPLETE set?
  6969	042135	254 00 0 00 042141 		JRST	SETEN1			; yes - continue
  6970	042136	005 00 0 00 000005 		DELAY	5			; wait 5 milliseconds
  6971	042137	367 02 0 00 042132 		SOJG	2,SETEN0		; no - loop till done
  6972	042140	254 00 0 00 042156 		JRST	SETENE			; no - error - exit
  6973
  6974					; Now set ENABLE bit and wait for ENABLE COMPLETE
  6975
  6976	042141	201 01 0 00 000030 	SETEN1:	MOVEI	1,PENABL!MPRUN		; get ENABLE bit
  6977	042142	336 00 0 00 030037 		SKIPN	USER			; user mode?
  6978	042143	660 01 0 00 000004 		TRO	1,4			; no - set PIA bits
  6979	042144	260 17 0 00 042130*		GO	LDCSR			; write to CSR
  6980	042145	201 02 0 00 000144 		MOVEI	2,^D100			; check up to 100 times
  6981	042146	260 17 0 00 042132*	SETEN2:	GO	RDCSR			; read CSR
  6982	042147	254 00 0 00 042156 		JRST	SETENE			; error - exit
  6983	042150	603 01 0 00 000020 		TLNE	1,(ECOMP)		; ENABLE COMPLETE set?
  6984	042151	254 00 0 00 042155 		JRST	SETEN3			; yes - continue
  6985	042152	005 00 0 00 000005 		DELAY	5			; wait 5 milliseconds
  6986	042153	367 02 0 00 042146 		SOJG	2,SETEN2		; no - loop till done
  6987	042154	334 00 0 00 000000 		SKIPA				; failed - exit
  6988
  6989					; Exit
  6990
  6991	042155	350 00 0 17 777775 	SETEN3:	AOS	-3(P)			; set up proper return
  6992	042156	262 17 0 00 000002 	SETENE:	RGET	(2,1,0)			; restore AC's
  6993
  6994	042161	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 161
DFCIA1	MAC	27-Oct-84 19:00		Port Debugger                                                                      SEQ 0336

  6995
  6996					;#********************************************************************
  6997					;* SETDSA - Disable the port
  6998					;#********************************************************************
  6999
  7000	042162	261 17 0 00 000001 	SETDSA:	RPUT	(1,2)			; save AC's
  7001
  7002	042164	260 17 0 00 042146*		GO	RDCSR			; read CSR
  7003	042165	400 01 0 00 000000 		SETZ	1,			; error
  7004	042166	606 01 0 00 000010 		TRNN	1,MPRUN			; port actually running?
  7005	042167	254 00 0 00 042203 		JRST	SETDSX			; no - exit
  7006	042170	201 01 0 00 000050 		MOVEI	1,PDSABL!MPRUN		; get DISABLE bit
  7007	042171	336 00 0 00 030037 		SKIPN	USER			; user mode?
  7008	042172	660 01 0 00 000004 		TRO	1,4			; no - set PIA bits
  7009	042173	260 17 0 00 042144*		GO	LDCSR			; write to CSR
  7010	042174	201 02 0 00 000144 		MOVEI	2,^D100			; check up to 100 times
  7011	042175	260 17 0 00 042164*	SETDS0:	GO	RDCSR			; read CSR
  7012	042176	254 00 0 00 042203 		JRST	SETDSX			; error - exit
  7013	042177	603 01 0 00 000040 		TLNE	1,(DCOMP)		; DISABLE COMPLETE set?
  7014	042200	254 00 0 00 042203 		JRST	SETDSX			; yes - exit
  7015	042201	005 00 0 00 000005 		DELAY	5			; wait 5 milliseconds
  7016	042202	367 02 0 00 042175 		SOJG	2,SETDS0		; no - loop till done
  7017	042203	262 17 0 00 000002 	SETDSX:	RGET	(2,1)			; restore AC's
  7018
  7019	042205	263 17 0 00 000000 		RTN				; return
  7020
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 162
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0337

  7021						SUBTTL	Program Utility Routines
  7022
  7023					;#*********************************************************************
  7024					;* TRACE - Program Trace Routine
  7025					;
  7026					; This routine traces test execution if the TRACE switch is set.  This
  7027					; routine sets up TSTSUB, ERFLG, ERRPC for error reporting during  the
  7028					; test, and ERRNUM for interrupt handling.
  7029					;#********************************************************************
  7030
  7031	042206	261 17 0 00 000000 	TRACE:	RPUT	(0,1)			; save AC's
  7032
  7033	042210	202 00 0 00 103305 		MOVEM	TSTOFF			; save relocatable offset
  7034	042211	200 01 0 00 103275 		MOVE	1,TSTNUM		; get test number
  7035	042212	200 01 0 01 032050 		MOVE	1,TSTTAB(1)		; get test flags
  7036	042213	260 17 0 00 032357*		GO	SWITT			; get switches
  7037	042214	606 00 0 00 400000 		TRNN	TRACET			; want to trace?
  7038	042215	254 00 0 00 042224 		JRST	TREX			; no
  7039	042216	037 00 0 00 114060 		TMSG	<* Test >
  7040	042217	200 00 0 00 103275 		MOVE	TSTNUM			; get test number
  7041	042220	037 16 0 00 000003 		PNTOCS				; print it
  7042	042221	603 01 0 00 000100 		TLNE	1,(TDENA)		; disabled?
  7043	042222	037 00 0 00 114062 		TMSG	< (Disabled)>		; yes - print such
  7044	042223	037 00 0 00 030242 		PCRL
  7045	042224	402 00 0 00 000015 	TREX:	SETZM	ERFLG			; clear the error detected flag
  7046	042225	402 00 0 00 030052 		SETZM	ERRPC			; clear the error PC
  7047	042226	402 00 0 00 103276 		SETZM	TSTSUB			; clear subtest number
  7048	042227	402 00 0 00 000000*		SETZM	SCOOFF			; clear error offset
  7049	042230	476 00 0 00 041360*		SETOM	INTNUM			; initialize interrupt number
  7050	042231	402 00 0 00 040503*		SETZM	SNEXT			; initialize next address
  7051	042232	402 00 0 00 040473*		SETZM	SDATA			; initialize CSR data
  7052	042233	603 01 0 00 000100 		TLNE	1,(TDENA)		; test disabled?
  7053	042234	254 00 0 00 042240 		JRST	TREXX			; yes - exit test
  7054	042235	262 17 0 00 000001 		RGET	(1,0)			; no - restore AC's
  7055
  7056	042237	263 17 0 00 000000 		RTN				; exit normally
  7057
  7058	042240	262 17 0 00 000001 	TREXX:	RGET	(1,0,XXX)		; restore AC's
  7059
  7060	042243	263 17 0 00 000000 		RTN				; exit test
  7061
  7062
  7063					;#********************************************************************
  7064					;* TSTEND - Do end of test processing
  7065					;#********************************************************************
  7066
  7067	042244	200 01 0 00 103275 	TSTEND:	MOVE	1,TSTNUM		; get test number
  7068	042245	202 15 0 01 032261 		MOVEM	ERFLG,TSTRES(1)		; save results
  7069	042246	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 163
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0338

  7070
  7071					;#********************************************************************
  7072					;* TSTPNT - Print test name/number
  7073					;#********************************************************************
  7074
  7075	042247	261 17 0 00 000000 	TSTPNT:	RPUT	(0,1)			; save AC's
  7076
  7077	042251	037 00 0 00 104473 		TMSG	<TST>
  7078	042252	200 00 0 00 103275 		MOVE	TSTNUM			; get test number
  7079	042253	037 16 0 00 000003 		PNTOCS				; print it
  7080	042254	200 00 0 00 103276 		MOVE	TSTSUB			; get subtest number
  7081	042255	322 00 0 00 042260 		JUMPE	TSTPN0			; zero?  yes - continue
  7082	042256	037 00 0 00 103613 		TMSG	<->			; no - print it
  7083	042257	037 16 0 00 000003 		PNTOCS
  7084	042260	260 17 0 00 042213*	TSTPN0:	GO	SWITT			; get switches
  7085	042261	603 00 0 00 000200 		TLNE	TXTINH			; text inhibit set?
  7086	042262	254 00 0 00 042266 		JRST	TSTPNX			; yes - exit
  7087	042263	037 00 0 00 107415 		TMSG	< - >
  7088	042264	200 01 0 00 103275 		MOVE	1,TSTNUM		; get test number
  7089	042265	256 00 0 01 032203 		XCT	TSTNAM(1)		; print test description
  7090	042266	262 17 0 00 000001 	TSTPNX:	RGET	(1,0)			; restore AC's
  7091
  7092	042270	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 164
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0339

  7093
  7094					;#********************************************************************
  7095					;* PNTCRM - Print CRAM word
  7096					;
  7097					; Arguments:	AC2 - Left 30 bits
  7098					;		AC3 - Right 30 bits
  7099					;#********************************************************************
  7100
  7101	042271	261 17 0 00 000000 	PNTCRM:	RPUT	(0,1)			; save AC's
  7102
  7103	042273	135 00 0 00 114065 		LDB	[POINT 12,2,17]		; get MWJMPFLD
  7104	042274	001 04 0 00 000000 		PNTOCC	4,0			; print it
  7105	042275	037 00 0 00 112413 		TMSG	<  >
  7106	042276	135 00 0 00 114066 		LDB	[POINT 1,2,18]		; get MWPAR
  7107	042277	037 01 0 00 000000 		PNT1				; print it
  7108	042300	037 00 0 00 112413 		TMSG	<  >
  7109	042301	135 00 0 00 114067 		LDB	[POINT 1,2,19]		; get MWOUTPUTENA
  7110	042302	037 01 0 00 000000 		PNT1				; print it
  7111	042303	135 00 0 00 114070 		LDB	[POINT 10,2,29]		; get MWMGCFLD
  7112	042304	001 04 0 00 000000 		PNTOCC	4,0			; print it
  7113	042305	037 00 0 00 112413 		TMSG	<  >
  7114	042306	135 00 0 00 114071 		LDB	[POINT 3,2,32]		; get MWSORCEFLD
  7115	042307	037 01 0 00 000000 		PNT1				; print it
  7116	042310	037 00 0 00 112413 		TMSG	<  >
  7117	042311	135 00 0 00 114072 		LDB	[POINT 3,2,35]		; get MWFUNCTFLD
  7118	042312	037 01 0 00 000000 		PNT1				; print it
  7119	042313	037 00 0 00 112413 		TMSG	<  >
  7120	042314	135 00 0 00 114073 		LDB	[POINT 3,3,8]		; get MWDESTFLD
  7121	042315	037 01 0 00 000000 		PNT1				; print it
  7122	042316	037 00 0 00 112413 		TMSG	<  >
  7123	042317	135 00 0 00 114074 		LDB	[POINT 1,3,9]		; get MWCCENA
  7124	042320	037 01 0 00 000000 		PNT1				; print it
  7125	042321	037 00 0 00 000040 		PSP
  7126	042322	135 00 0 00 114075 		LDB	[POINT 1,3,10]		; get MWRAMODE
  7127	042323	037 01 0 00 000000 		PNT1				; print it
  7128	042324	037 00 0 00 000040 		PSP
  7129	042325	135 00 0 00 114076 		LDB	[POINT 4,3,14]		; get MWPORTAFLD
  7130	042326	001 02 0 00 000000 		PNTOCC	2,0			; print it
  7131	042327	037 00 0 00 000040 		PSP
  7132	042330	135 00 0 00 114077 		LDB	[POINT 4,3,18]		; get MWPORTBFLD
  7133	042331	001 02 0 00 000000 		PNTOCC	2,0			; print it
  7134	042332	037 00 0 00 000040 		PSP
  7135	042333	135 00 0 00 114100 		LDB	[POINT 5,3,23]		; get MWSKIPFLD
  7136	042334	001 02 0 00 000000 		PNTOCC	2,0			; print it
  7137	042335	037 00 0 00 112413 		TMSG	<  >
  7138	042336	135 00 0 00 114101 		LDB	[POINT 3,3,26]		; get MWBUSCTLFLD
  7139	042337	037 01 0 00 000000 		PNT1				; print it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 165
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0340

  7140	042340	037 00 0 00 112413 		TMSG	<  >
  7141	042341	135 00 0 00 114102 		LDB	[POINT 1,3,27]		; get MWCARRY
  7142	042342	037 01 0 00 000000 		PNT1				; print it
  7143	042343	037 00 0 00 000040 		PSP
  7144	042344	135 01 0 00 114103 		LDB	1,[POINT 4,3,31]	; get MWCTRLFLD
  7145						XCT	[TMSG	<JZ  >		; print in English
  7146							 TMSG	<CJS >
  7147							 TMSG	<JMAP>
  7148							 TMSG	<CJP >
  7149							 TMSG	<PUSH>
  7150							 TMSG	<JSRP>
  7151							 TMSG	<CJV >
  7152							 TMSG	<JRP >
  7153							 TMSG	<RFCT>
  7154							 TMSG	<RPCT>
  7155							 TMSG	<CRTN>
  7156							 TMSG	<CJPP>
  7157							 TMSG	<LDCT>
  7158							 TMSG	<LOOP>
  7159							 TMSG	<CONT>
  7160	042345	256 00 0 01 114124 			 TMSG	<TWB >](1)
  7161	042346	037 00 0 00 112413 		TMSG	<  >
  7162	042347	135 00 0 00 114144 		LDB	[POINT 1,3,32]		; get MWTIMEFLD
  7163	042350	037 01 0 00 000000 		PNT1				; print it
  7164	042351	037 00 0 00 000040 		PSP
  7165	042352	135 00 0 00 114145 		LDB	[POINT 2,3,34]		; get MWSPARE00-01
  7166	042353	037 01 0 00 000000 		PNT1				; print it
  7167	042354	037 00 0 00 000040 		PSP
  7168	042355	135 00 0 00 114146 		LDB	[POINT 1,3,35]		; get MWMARKBIT
  7169	042356	037 01 0 00 000000 		PNT1				; print it
  7170	042357	037 07 0 00 000003 		TTALTM				; altmode typed?
  7171	042360	334 00 0 00 000000 		SKIPA				; no - continue
  7172						GO	[SETOM	ALTF		; yes - set 'altmode typed' flag
  7173							 SETZM	MULFLG		;   and clear 'examine next' flag
  7174	042361	260 17 0 00 114147 			 RTN]
  7175	042362	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
  7176
  7177	042364	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 166
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0341

  7178
  7179					;#********************************************************************
  7180					;* PNTWD - Print a CRAM word (xxxx xxxx xxxx xxxx xxxx)
  7181					;
  7182					; Argument:	AC2 - Left half
  7183					;		AC3 - Right half
  7184					;#********************************************************************
  7185
  7186	042365	261 17 0 00 000000 	PNTWD:	RPUT	(0,1)			; save AC's
  7187
  7188	042367	135 00 0 00 114065 		LDB	[POINT 12,2,17]		; get 1st 4 digits
  7189	042370	037 04 0 00 000000 		PNT4				; print them
  7190	042371	135 00 0 00 114152 		LDB	[POINT 12,2,29]		; get 2nd 4 digits
  7191	042372	037 04 0 00 000000 		PNT4				; print them
  7192	042373	135 01 0 00 114153 		LDB	1,[POINT 6,2,35]	; get next 6 bits
  7193	042374	135 00 0 00 114154 		LDB	[POINT 6,3,11]		; get next 6 bits
  7194	042375	242 01 0 00 000006 		LSH	1,6			; position correctly
  7195	042376	434 00 0 00 000001 		IOR	1			; build 12 bits (3rd 4 digits)
  7196	042377	037 04 0 00 000000 		PNT4				; print them
  7197	042400	135 00 0 00 114155 		LDB	[POINT 12,3,23]		; get 1st 4 digits
  7198	042401	037 04 0 00 000000 		PNT4				; print them
  7199	042402	135 00 0 00 114156 		LDB	[POINT 12,3,35]		; get last 4 digits
  7200	042403	037 04 0 00 000000 		PNT4				; print them
  7201	042404	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
  7202
  7203	042406	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 167
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0342

  7204
  7205					;#********************************************************************
  7206					;* CALPAR - Calculate parity for a CRAM location
  7207					;
  7208					; Arguments:	AC1 - Contains 2nd word of microword as  put  together
  7209					;		      by the microword macro MWORD.  This is only used
  7210					;		      to look at bit 35 which is a flag specifying bad
  7211					;		      parity.
  7212					;		AC2 - Bits 0-29 (Right justified)
  7213					;		AC3 - Bits 30-59 (Right justified)
  7214					;
  7215					; Function:	Calculate good parity and insert into Bit 12  of  the
  7216					;		microword which is Bit 18 in AC2. Then if 'force bad
  7217					;		parity' flag is set, complement this bit.
  7218					;
  7219					; Return:	+1 always.  AC's are unmodified, except bit 18 of AC2.
  7220					;#********************************************************************
  7221
  7222	042407	261 17 0 00 000004 	CALPAR:	RPUT	(4,5,6,7)		; save AC's
  7223
  7224	042413	402 00 0 00 120715'		SETZM	CALMAR#			; clear MARK bit location
  7225	042414	602 03 0 00 000001 		TRNE	3,1			; MARK bit set?
  7226	042415	476 00 0 00 120715'		SETOM	CALMAR			; yes - note the fact
  7227	042416	620 03 0 00 000001 		TRZ	3,1			; ensure MARK bit is zero
  7228	042417	400 04 0 00 000000 		SETZ	4,			; clear count of number of 1's
  7229	042420	200 05 0 00 000002 		MOVE	5,2			; get left half
  7230	042421	210 06 0 00 000005 		MOVN	6,5			; calculate number of 1's
  7231	042422	632 05 0 00 000006 		TDZE	5,6			;  ...
  7232	042423	344 04 0 00 042421 		AOJA	4,.-2			;  ...
  7233	042424	200 05 0 00 000003 		MOVE	5,3			; get right half
  7234	042425	210 06 0 00 000005 		MOVN	6,5			; calculate number of 1's
  7235	042426	632 05 0 00 000006 		TDZE	5,6			;  ...
  7236	042427	344 04 0 00 042425 		AOJA	4,.-2			;  ...
  7237
  7238					; Now, the parity is even if bit 35 of AC4 is zero, and odd if bit 35 set
  7239
  7240	042430	606 04 0 00 000001 		TRNN	4,1			; bit 35 set?
  7241	042431	431 02 0 00 400000 		XORI	2,400000		; no - complement bit 18
  7242
  7243					; Also, handle force parity flag
  7244
  7245	042432	602 01 0 00 000001 		TRNE	1,1			; 'force bad parity' flag set?
  7246	042433	431 02 0 00 400000 		XORI	2,400000		; yes - complement bit 18
  7247
  7248					; Done - exit
  7249
  7250	042434	332 00 0 00 120715'		SKIPE	CALMAR			; MARK bit set initially?
  7251	042435	660 03 0 00 000001 		TRO	3,1			; yes - set it now
  7252	042436	262 17 0 00 000007 		RGET	(7,6,5,4)		; restore AC's
  7253
  7254	042442	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 168
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0343

  7255
  7256					;#********************************************************************
  7257					;* CSRPNT - Print CSR register as 'CSR: xxxxxx,,xxxxxx' followed by
  7258					;*          English translation.
  7259					;#********************************************************************
  7260
  7261	042443	261 17 0 00 000000 	CSRPNT:	RPUT	(0,1,2,3)		; save AC's
  7262
  7263	042447	037 00 0 00 114157 		TMSGC	<CSR: >			; print out the data
  7264	042450	200 00 0 00 000001 		MOVE	1
  7265	042451	037 13 0 00 000000 		PNTHW
  7266	042452	260 17 0 00 042260*		GO	SWITT			; get switches
  7267	042453	603 00 0 00 000200 		TLNE	TXTINH			; TXTINH set?
  7268	042454	254 00 0 00 042460 		JRST	CSRPNX			; yes - exit
  7269	042455	201 02 0 00 000023 		MOVEI	2,^D19			; character count so far
  7270	042456	201 03 0 00 000023 		MOVEI	3,^D19			; continuation line column number
  7271	042457	260 17 0 00 042465 		GO	CSRENG			; go print in English
  7272	042460	262 17 0 00 000003 	CSRPNX:	RGET	(3,2,1,0)		; restore AC's
  7273
  7274	042464	263 17 0 00 000000 		RTN				; return
  7275
  7276
  7277					;#********************************************************************
  7278					;* CSRENG - Print CSR data in English
  7279					;
  7280					; AC1 - Contains data to print
  7281					; AC2 - Contains character count on line so far
  7282					; AC3 - Contains column to start continuation lines
  7283					;#********************************************************************
  7284
  7285	042465	261 17 0 00 000000 	CSRENG:	RPUT	(0,1,4,5,6)		; save AC's
  7286
  7287	042472	202 01 0 00 120717'		MOVEM	1,CSRENS#		; save CSR data
  7288	042473	200 04 0 00 000001 		MOVE	4,1			; get data into AC1
  7289	042474	400 05 0 00 000000 		SETZ	5,			; clear bit index
  7290	042475	404 04 0 00 114161 		AND	4,[777770,,777770]	; clear port ID and PI bits
  7291	042476	434 04 0 00 114162 		IOR	4,[000004,,000004]	; set bits so both are printed
  7292	042477	322 04 0 00 042516 	CSREN0:	JUMPE	4,CSRENX		; zero? yes - exit
  7293	042500	607 04 0 00 400000 		TLNN	4,400000		; no - bit set?
  7294	042501	254 00 0 00 042514 		JRST	CSREN2			; no - continue
  7295	042502	271 02 0 00 000007 		ADDI	2,7			; increment character count
  7296	042503	305 02 0 00 000110 		CAIGE	2,^D72			; over 72 characters?
  7297	042504	254 00 0 00 042513 		JRST	CSREN1			; no - go print
  7298	042505	037 00 0 00 030242 		PCRL				; yes - print CRLF, then
  7299	042506	200 01 0 00 000003 		MOVE	1,3			;   print spaces to start
  7300	042507	037 00 0 00 103540 		TMSG	< >			;   in proper column, and
  7301	042510	367 01 0 00 042507 		SOJG	1,.-1			;   adjust character count
  7302	042511	200 02 0 00 000003 		MOVE	2,3			;   properly
  7303	042512	271 02 0 00 000007 		ADDI	2,7			; increment character count
  7304	042513	256 00 0 05 042524 	CSREN1:	XCT	CSRENB(5)		; yes - print it
  7305	042514	242 04 0 00 000001 	CSREN2:	LSH	4,1			; left shift one bit
  7306	042515	345 05 0 00 042477 		AOJGE	5,CSREN0		; increment and keep looping
  7307	042516	262 17 0 00 000006 	CSRENX:	RGET	(6,5,4,1,0)		; restore AC's
  7308
  7309	042523	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 169
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0344

  7310
  7311					;#********************************************************************
  7312					;* CSRENB - CSR bits
  7313					;#********************************************************************
  7314
  7315	042524	037 00 0 00 114163 	CSRENB:	TMSG	<PortP >		; 00
  7316	042525	037 00 0 00 114165 		TMSG	<CsrRqs >		; 01
  7317	042526	037 00 0 00 114167 		TMSG	<CsrChn >		; 02
  7318	042527	037 00 0 00 114171 		TMSG	<Dinit >		; 03
  7319	042530	037 00 0 00 114173 		TMSG	<PI00Rq >		; 04
  7320	042531	037 00 0 00 114175 		TMSG	<RqInt >		; 05
  7321	042532	037 00 0 00 114177 		TMSG	<CramPE >		; 06
  7322	042533	037 00 0 00 114201 		TMSG	<MBErr >		; 07
  7323	042534	037 00 0 00 114203 		TMSG	<Unused >		; 08
  7324	042535	037 00 0 00 114203 		TMSG	<Unused >		; 09
  7325	042536	037 00 0 00 114203 		TMSG	<Unused >		; 10
  7326	042537	037 00 0 00 114205 		TMSG	<Idle >			; 11
  7327	042540	037 00 0 00 114207 		TMSG	<Dcomp >		; 12
  7328	042541	037 00 0 00 114211 		TMSG	<Ecomp >		; 13
  7329	042542	037 00 0 00 114203 		TMSG	<Unused >		; 14
  7330						GO	[TMSG	<ID=>		; 15
  7331							 LDB	[POINT 3,CSRENS,17]
  7332							 PNT1
  7333	042543	260 17 0 00 114215 			 RTN]
  7334	042544	255 00 0 00 000000 		JFCL				; 16
  7335	042545	255 00 0 00 000000 		JFCL				; 17
  7336	042546	037 00 0 00 114221 		TMSG	<PClr >			; 18
  7337	042547	037 00 0 00 114223 		TMSG	<TEbuf >		; 19
  7338	042550	037 00 0 00 114225 		TMSG	<GenEPE >		; 20
  7339	042551	037 00 0 00 114227 		TMSG	<SelLAR >		; 21
  7340	042552	037 00 0 00 114231 		TMSG	<SinCyc >		; 22
  7341	042553	037 00 0 00 114233 		TMSG	<Spare1 >		; 23
  7342	042554	037 00 0 00 114235 		TMSG	<EbusPE >		; 24
  7343	042555	037 00 0 00 114237 		TMSG	<FQErr >		; 25
  7344	042556	037 00 0 00 114241 		TMSG	<MVErr >		; 26
  7345	042557	037 00 0 00 114243 		TMSG	<CmdQAV >		; 27
  7346	042560	037 00 0 00 114245 		TMSG	<ResQAV >		; 28
  7347	042561	037 00 0 00 114247 		TMSG	<Spare2 >		; 29
  7348	042562	037 00 0 00 114251 		TMSG	<Disabl >		; 30
  7349	042563	037 00 0 00 114253 		TMSG	<Enable >		; 31
  7350	042564	037 00 0 00 114255 		TMSG	<MPRun >		; 32
  7351						GO	[LDB	[POINT 3,CSRENS,35]
  7352							 SKIPN
  7353							 RTN
  7354							 TMSG	<Pia=>		; 33-35
  7355							 PNT1
  7356	042565	260 17 0 00 114261 			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 170
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0345

  7357
  7358					;#********************************************************************
  7359					;* SAVCRM - Save specified CRAM locations in a buffer
  7360					;#********************************************************************
  7361
  7362	042566	261 17 0 00 000000 	SAVCRM:	RPUT	(0,1,2,3)		; save AC's
  7363
  7364	042572	260 17 0 00 042051*		GO	ISTOP			; stop the port
  7365	042573	201 02 0 00 042635 		MOVEI	2,SAVCRL		; get address of storage area
  7366	042574	200 03 0 00 000001 		MOVE	3,1			; get AOBJN word
  7367	042575	552 03 0 00 035713 	SAVCR0:	HRRZM	3,CADDR			; set up CRAM address
  7368	042576	260 17 0 00 036372 		GO	DRCRAM			; read CRAM location
  7369	042577	120 00 0 00 035714 		DMOVE	CWORDL			; get location
  7370	042600	124 00 0 02 000000 		DMOVEM	(2)			; save it
  7371	042601	271 02 0 00 000002 		ADDI	2,2			; point to next location
  7372	042602	253 03 0 00 042575 		AOBJN	3,SAVCR0		; loop till done
  7373	042603	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
  7374
  7375	042607	263 17 0 00 000000 		RTN				; return
  7376
  7377
  7378					;#********************************************************************
  7379					;* RESCRM - Restore CRAM locations
  7380					;#********************************************************************
  7381
  7382	042610	261 17 0 00 000000 	RESCRM:	RPUT	(0,1,2,3)		; save AC's
  7383
  7384	042614	260 17 0 00 042572*		GO	ISTOP			; stop the port
  7385	042615	261 17 0 00 034000 		PUT	PARFLG			; save parity flag
  7386	042616	402 00 0 00 034000 		SETZM	PARFLG			; don't calculate parity
  7387	042617	201 02 0 00 042635 		MOVEI	2,SAVCRL		; get address of storage area
  7388	042620	200 03 0 00 000001 		MOVE	3,1			; get AOBJN word
  7389	042621	552 03 0 00 035713 	RESCR0:	HRRZM	3,CADDR			; set up CRAM address
  7390	042622	120 00 0 02 000000 		DMOVE	(2)			; save it
  7391	042623	124 00 0 00 035714 		DMOVEM	CWORDL			; get location
  7392	042624	260 17 0 00 036340 		GO	DWCRAM			; read CRAM location
  7393	042625	271 02 0 00 000002 		ADDI	2,2			; point to next location
  7394	042626	253 03 0 00 042621 		AOBJN	3,RESCR0		; loop till done
  7395	042627	262 17 0 00 034000 		GET	PARFLG			; restore parity flag
  7396	042630	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
  7397
  7398	042634	263 17 0 00 000000 		RTN				; return
  7399
  7400					; CRAM storage area
  7401
  7402	042635				SAVCRL:	BLOCK	^D60
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 171
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0346

  7403
  7404					;#********************************************************************
  7405					;* CONFIG - Determine/print configuration
  7406					;
  7407					; CTABLE entry:  Bit 0 - Dual path (0-no,1-yes)
  7408					;		     1 - Maintenance mode (0-no,1-yes)
  7409					;		   2-3 - Port state (0-Unitialized
  7410					;				     1-Disabled
  7411					;				     2-Enabled)
  7412					;		  4-11 - Port type (2-CI780  5-Jupiter
  7413					;				    3-CI750  6-KL10
  7414					;				    4-HSC50)
  7415					;		 18-35 - Address of text giving port type
  7416					;#********************************************************************
  7417
  7418	042731	261 17 0 00 000000 	CONFIG:	RPUT	(0,1,2,3)		; save AC's
  7419
  7420	042735	260 17 0 00 065076 		GO	RDNODE			; read node address
  7421						JRST	[TMSGCD	<? Could not read our node address>
  7422							 GO	FIOFF
  7423	042736	254 00 0 00 114267 			 JRST	CONFIX]
  7424	042737	202 01 0 00 034013 		MOVEM	1,CPORT			; save our port number
  7425
  7426					; Initialize configuration data
  7427
  7428	042740	402 00 0 00 043076 		SETZM	CVALID			; initialize config table valid flag
  7429	042741	402 00 0 00 043077 		SETZM	CTABLE			; clear existing configuration table
  7430	042742	200 00 0 00 114272 		MOVE	[CTABLE,,CTABLE+1]	;   ...
  7431	042743	251 00 0 00 043116 		BLT	CTABLE+MAXPOR		;   ...
  7432
  7433					; Initialize packet default data
  7434
  7435	042744	402 00 0 00 065154 		SETZM	TFMFLG			; initialize format flag to COMPAT
  7436	042745	402 00 0 00 065155 		SETZM	TRSFLG			; initialize to not request responses
  7437	042746	402 00 0 00 065156 		SETZM	TPTFLG			; initialize to auto path
  7438	042747	402 00 0 00 065157 		SETZM	TXCTID			; initialize both words of the
  7439	042750	402 00 0 00 065160 		SETZM	TXCTID+1		;   transaction ID
  7440	042751	476 00 0 00 065161 		SETOM	TDPORT			; initialize destination port number
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 172
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0347

  7441	
  7442					; Start up the port and set enabled bit
  7443
  7444	042752	260 17 0 00 043652 		GO	TFLOAD			; load operational microcode
  7445						JRST	[SKIPE	UDEBUG		; failed
  7446							 JRST	.+1
  7447							 PCRLF
  7448							 HLRZ
  7449							 GO	@0
  7450	042753	254 00 0 00 114273 			 JRST	CONFIX]
  7451	042754	260 17 0 00 065052 		GO	TIDLE			; ensure in idle loop
  7452						JRST	[SKIPE	UDEBUG		; failed
  7453							 JRST	.+1
  7454							 FMSGCD	<? Couldn't start port>
  7455	042755	254 00 0 00 114301 			 JRST	CONFIX]
  7456	042756	260 17 0 00 042122 		GO	SETENA			; ensure the port is enabled
  7457						JRST	[SKIPE	UDEBUG
  7458							 JRST	.+1
  7459							 FMSGCD	<? Couldn't enable port>
  7460	042757	254 00 0 00 114305 			 JRST	CONFIX]
  7461
  7462					; Now do the request ID's
  7463
  7464	042760	037 07 0 00 000003 	CONFI0:	TTALTM				; altmode typed?
  7465	042761	334 00 0 00 000000 		SKIPA				; no - continue
  7466	042762	254 00 0 00 043031 		JRST	CONFI2			; yes - exit
  7467	042763	350 01 0 00 065161 		AOS	1,TDPORT		; point to next port
  7468	042764	303 01 0 00 000017 		CAILE	1,MAXPOR		; done yet?
  7469	042765	254 00 0 00 043031 		JRST	CONFI2			; yes - exit
  7470
  7471					; Build the packet and put on command queue
  7472
  7473	042766	201 11 0 00 000005 		MOVEI	OP,REQID		; set up to do Request ID's
  7474	042767	260 17 0 00 065174 		GO	BPACK			; build a request ID packet
  7475	042770	201 13 0 00 000003 		MOVEI	Q,3			; place entries on cmd queue 0
  7476	042771	260 17 0 00 065777 		GO	INSQUE			; insert on command queue
  7477	042772	255 00 0 00 000000 		JFCL				; error - ignore
  7478	042773	260 17 0 00 042175*		GO	RDCSR			; read CSR
  7479	042774	255 00 0 00 000000 		JFCL				; error - ignore
  7480	042775	660 01 0 00 000400 		TRO	1,CMDQAV		; set the 'CMDQAV' bit
  7481	042776	260 17 0 00 042173*		GO	LDCSR			; write the CSR register
  7482
  7483					; Wait for a response
  7484
  7485	042777	260 17 0 00 065601 		GO	RWAIT			; wait for response
  7486	043000	260 17 0 00 066134 	CONFI1:	GO	CHKRSP			; check for response entry
  7487	043001	254 00 0 00 042760 		JRST	CONFI0			; no responses - try next port
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 173
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0348

  7488
  7489					; Got a response - now decode it
  7490
  7491	043002	135 02 0 00 114046 		LDB	2,[POINT 8,RSPONS+3,23]	; get opcode
  7492	043003	302 02 0 00 000053 		CAIE	2,IDREC+40		; 'ID Received' packet?
  7493	043004	254 00 0 00 043000 		JRST	CONFI1			; no - check next response
  7494	043005	135 02 0 00 114311 		LDB	2,[POINT 1,RSPONS+3,0] 	; get error status bit
  7495	043006	326 02 0 00 043000 		JUMPN	2,CONFI1		; error - yes - check next response
  7496	043007	135 01 0 00 114047 		LDB	1,[POINT 8,RSPONS+3,31]	; get port number which sent packet
  7497
  7498					; Build configuration table entry
  7499
  7500	043010	400 03 0 00 000000 		SETZ	3,			; clear status location
  7501	043011	335 00 0 00 070455 		SKIPGE	RSPONS+6		; dual path port?
  7502	043012	661 03 0 00 400000 		TLO	3,400000		; yes - set the flag
  7503	043013	135 02 0 00 114312 		LDB	2,[POINT 1,RSPONS+9,23]	; get maintenance mode bit
  7504	043014	332 00 0 00 000002 		SKIPE	2			; maintenance mode set?
  7505	043015	661 03 0 00 200000 		TLO	3,200000		; yes - set the flag
  7506	043016	135 02 0 00 114313 		LDB	2,[POINT 2,RSPONS+9,22]	; get port state
  7507	043017	137 02 0 00 114314 		DPB	2,[POINT 2,3,3]		; save it
  7508	043020	135 02 0 00 114315 		LDB	2,[POINT 6,RSPONS+6,31]	; get port type
  7509	043021	137 02 0 00 114316 		DPB	2,[POINT 8,3,11]	; save it
  7510	043022	303 02 0 00 000007 		CAILE	2,7			; between 0 and 7?
  7511	043023	201 02 0 00 000007 		MOVEI	2,7			; no - limit to 7
  7512	043024	316 01 0 00 034013 		CAMN	1,CPORT			; our port number?
  7513	043025	201 02 0 00 000010 		MOVEI	2,10			; yes - set to self
  7514	043026	541 03 0 02 043117 		HRRI	3,CTYPE(2)		; insert address of text
  7515	043027	202 03 0 01 043077 		MOVEM	3,CTABLE(1)		; save configuration data
  7516	043030	254 00 0 00 042760 		JRST	CONFI0			; loop till done
  7517
  7518					; All done - shut down the port
  7519
  7520	043031	260 17 0 00 042162 	CONFI2:	GO	SETDSA			; disable the port
  7521	043032	260 17 0 00 040110*		GO	IPACLR			; do a 'port clear'
  7522	043033	476 00 0 00 043076 		SETOM	CVALID			; set config table valid flag
  7523
  7524					; Exit
  7525
  7526	043034	262 17 0 00 000003 	CONFIX:	RGET	(3,2,1,0)		; restore AC's
  7527
  7528	043040	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 174
DFCIA1	MAC	27-Oct-84 19:00		Program Utility Routines                                                           SEQ 0349

  7529
  7530					;#********************************************************************
  7531					;* CONPNT - Print configuration data
  7532					;#********************************************************************
  7533
  7534	043041	261 17 0 00 000000 	CONPNT:	RPUT	(0,1,2,3)		; save AC's
  7535
  7536						TMSGD	<
  7537					***** CI Configuration *****
  7538					 Port   Port       Dual  Maint  Port
  7539					Number  Type       Path  State  State
  7540	043045	037 00 0 00 114317 	------  ---------  ----  -----  ------->
  7541	043046	200 02 0 00 114356 		MOVE	2,[-MAXPOR,,0]		; set up AOBJN pointer
  7542	043047	200 03 0 02 043077 	CONPN0:	MOVE	3,CTABLE(2)		; get port entry
  7543	043050	322 03 0 00 043070 		JUMPE	3,CONPN1		; nonexistent?
  7544	043051	550 00 0 00 000002 		HRRZ	2			; get into AC0
  7545	043052	001 04 0 00 000000 		PNTOCC	4,0			; print port number
  7546	043053	037 00 0 00 114357 		TMSG	<    > 
  7547	043054	550 01 0 02 043077 		HRRZ	1,CTABLE(2)		; get ASCIZ text address
  7548	043055	256 00 0 01 000000 		XCT	(1)			; print what type of port
  7549	043056	607 03 0 00 400000 		TLNN	3,400000		; dual path port?
  7550	043057	037 00 0 00 114360 		TMSG	< No >			; no - print such
  7551	043060	603 03 0 00 400000 		TLNE	3,400000		; dual path port?
  7552	043061	037 00 0 00 114361 		TMSG	< Yes>			; yes - print such
  7553	043062	607 03 0 00 200000 		TLNN	3,200000		; maintenance mode?
  7554	043063	037 00 0 00 114362 		TMSG	<   No     >		; no - print such
  7555	043064	603 03 0 00 200000 		TLNE	3,200000		; maintenance mode?
  7556	043065	037 00 0 00 114365 		TMSG	<   Yes    >		; yes - print such
  7557	043066	135 01 0 00 114314 		LDB	1,[POINT 2,3,3]		; get port state
  7558						XCT	[TMSGD	<Uninitialized>	; print it
  7559							 TMSGD	<Disabled>
  7560							 TMSGD	<Enabled>
  7561	043067	256 00 0 01 114404 			 TMSGD	<Undefined>](1)
  7562	043070	253 02 0 00 043047 	CONPN1:	AOBJN	2,CONPN0		; loop till done
  7563	043071	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
  7564
  7565	043075	263 17 0 00 000000 		RTN				; return
  7566
  7567					; Configuration data
  7568
  7569	043076	000000	000000		CVALID:	0				; config table valid flag
  7570	043077				CTABLE:	BLOCK	MAXPOR+1		; configuration table
  7571
  7572	043117	037 00 0 00 114410 	CTYPE:	TMSG	<Undefined >		; type 0
  7573	043120	037 00 0 00 114410 		TMSG	<Undefined >		; type 1
  7574	043121	037 00 0 00 114413 		TMSG	<CI780     >		; type 2
  7575	043122	037 00 0 00 114416 		TMSG	<CI750     >		; type 3
  7576	043123	037 00 0 00 114421 		TMSG	<HSC50     >		; type 4
  7577	043124	037 00 0 00 114424 		TMSG	<Jupiter   >		; type 5
  7578	043125	037 00 0 00 114427 		TMSG	<KL10      >		; type 6
  7579	043126	037 00 0 00 114410 		TMSG	<Undefined >		; type 7
  7580	043127	037 00 0 00 114432 		TMSG	<KL10(Self)>		; type 6 (special)
  7581
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 175
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0350

  7582						SUBTTL	Statistics Handling Routines
  7583
  7584					;#********************************************************************
  7585					;* SUPDAT - Update statistics for datagrams sent
  7586					;
  7587					; Given:  PACKET - Contains the packet data sent
  7588					;#********************************************************************
  7589
  7590	043130	261 17 0 00 000000 	SUPDAT:	RPUT	(0,1,2,3,OP)		; save AC's
  7591
  7592	043135	135 11 0 00 114435 		LDB	OP,[POINT 8,PACKET+3,23]; get op code
  7593	043136	201 02 0 00 000004 		MOVEI	2,4			; initialize to 'other'
  7594	043137	306 11 0 00 000015 		CAIN	OP,SNDLB		; external loopback?
  7595	043140	201 02 0 00 000001 		MOVEI	2,1			; yes - set up 'ext loopback'
  7596	043141	306 11 0 00 000001 		CAIN	OP,SNDDG		; datagram?
  7597						GO	[LDB	[POINT 8,PACKET+3,31]
  7598							 CAMN	CPORT		; internal loopback?
  7599							 MOVEI	2,0		; yes - set up 'int loopback'
  7600	043142	260 17 0 00 114437 			 RTN]
  7601	043143	306 11 0 00 000005 		CAIN	OP,REQID		; request id?
  7602						GO	[MOVEI	2,2		; yes - set up 'req id'
  7603	043144	260 17 0 00 114443 			 RTN]
  7604	043145	302 11 0 00 000203 		CAIE	OP,REGRD		; register read?
  7605	043146	306 11 0 00 000204 		CAIN	OP,REGWR		; register write?
  7606						GO	[MOVEI	2,3		; yes - set up 'reg r/w'
  7607	043147	260 17 0 00 114445 			 RTN]
  7608
  7609					; Increment packets sent
  7610
  7611	043150	221 02 0 00 000012 	SUPDA0:	IMULI	2,^D10			; calculate address of statistics
  7612	043151	271 02 0 00 043474 		ADDI	2,STASNT		;   ...
  7613	043152	350 00 0 02 000000 		AOS	.SPSNT(2)		; increment number of packets sent
  7614	043153	200 03 0 00 000002 		MOVE	3,2			; get into AC3
  7615	043154	260 17 0 00 067212 		GO	DECOPC			; decode op code
  7616	043155	201 01 0 00 000040 		MOVEI	1,40			; error - set to 'other'
  7617						XCT	[GO	[LDB	[POINT 20,PACKET+4,35]  ; 0-SNDDG
  7618								 ADDI	13
  7619								 RTN]
  7620							 GO	[LDB	[POINT 19,PACKET+4,35]	; 1-SNDMSG
  7621								 ADDI	13
  7622								 RTN]
  7623							 MOVEI	23				; 2-REQID
  7624							 MOVEI	23				; 3-SNDRST
  7625							 MOVEI	27				; 4-SNDSTRT
  7626							 GO	[LDB	[POINT 32,PACKET+6,31]	; 5-REQDAT0
  7627								 ADDI	41
  7628								 RTN]
  7629							 GO	[LDB	[POINT 32,PACKET+6,31]	; 6-REQDAT1
  7630								 ADDI	41
  7631								 RTN]
  7632							 GO	[LDB	[POINT 32,PACKET+6,31]	; 7-REQDAT2
  7633								 ADDI	41
  7634								 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 176
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0351

  7635  7636							 GO	[LDB	[POINT 16,PACKET+4,35]	; 10-LPBCK
  7637								 ADDI	17
  7638								 RTN]
  7639							 MOVEI	33				; 11-REQMDAT
  7640							 MOVEI	33				; 12-SNDDAT
  7641							 MOVEI	33				; 13-RETDAT
  7642							 MOVEI	33				; 14-SNDMDAT
  7643							 SETZ					; 15-CLSBUF
  7644							 SETZ					; 16-SETCKT
  7645							 SETZ					; 17-SETCNT
  7646							 SETZ					; 20-RDCNT
  7647							 SETZ					; 21-REGRD
  7648							 SETZ					; 22-REGWR
  7649							 SETZ					; 23-CNFRET
  7650							 SETZ					; 24-MCNF
  7651							 SETZ					; 25-IDREC
  7652							 SETZ					; 26-DATREC
  7653							 SETZ					; 27-RTMDAT
  7654							 SETZ					; 30
  7655							 SETZ					; 31
  7656							 SETZ					; 32
  7657							 SETZ					; 33
  7658							 SETZ					; 34
  7659							 SETZ					; 35
  7660							 SETZ					; 36
  7661							 SETZ					; 37
  7662	043156	256 00 0 01 114467 			 SETZ](1)				; 40
  7663	043157	272 00 0 03 000001 		ADDM	.SBSNT(3)		; add in byte count
  7664	043160	262 17 0 00 000011 		RGET	(OP,3,2,1,0)		; restore AC's
  7665
  7666	043165	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 177
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0352

  7667
  7668					;#********************************************************************
  7669					;* RUPDAT - Update statistics for datagrams received
  7670					;
  7671					; Given:  RSPONS - Contains the packet data received
  7672					;#********************************************************************
  7673
  7674	043166	261 17 0 00 000000 	RUPDAT:	RPUT	(0,1,2,3,OP)		; save AC's
  7675
  7676
  7677					; First determine what category
  7678
  7679	043173	135 11 0 00 114046 		LDB	OP,[POINT 8,RSPONS+3,23]; get op code
  7680	043174	260 17 0 00 067212 		GO	DECOPC			; decode opcode
  7681	043175	201 01 0 00 000040 		MOVEI	1,40			; error - use offset of 40
  7682	043176	202 01 0 00 120754'		MOVEM	1,PAKOFF#		; save packet offset
  7683	043177	202 02 0 00 120755'		MOVEM	2,PAKTYP#		; save packet type
  7684	043200	306 02 0 00 000002 		CAIN	2,2			; received from another port?
  7685	043201	275 11 0 00 000040 		SUBI	OP,40			; yes - normalize to 1..n
  7686	043202	201 03 0 00 000004 		MOVEI	3,4			; initialize to 'other'
  7687	043203	306 11 0 00 000015 		CAIN	OP,SNDLB		; external loopback?
  7688	043204	201 03 0 00 000001 		MOVEI	3,1			; yes - set up 'ext loopback'
  7689	043205	306 11 0 00 000001 		CAIN	OP,SNDDG		; datagram?
  7690						GO	[LDB	[POINT 8,RSPONS+3,31]
  7691							 CAMN	CPORT		; internal loopback?
  7692							 MOVEI	3,0		; yes - set up 'int loopback'
  7693	043206	260 17 0 00 114530 			 RTN]
  7694	043207	302 11 0 00 000005 		CAIE	OP,REQID		; request id - sent or
  7695	043210	306 11 0 00 000013 		CAIN	OP,IDREC		;   received?
  7696						GO	[MOVEI	3,2		; yes - set up 'req id'
  7697	043211	260 17 0 00 114534 			 RTN]
  7698	043212	302 11 0 00 000204 		CAIE	OP,REGWR		; register read?
  7699	043213	306 11 0 00 000203 		CAIN	OP,REGRD		; register write?
  7700						GO	[MOVEI	3,3		; yes - set up 'reg r/w'
  7701	043214	260 17 0 00 114536 			 RTN]
  7702
  7703					; Then determine which type it is - response requested, or packet received
  7704
  7705	043215	306 02 0 00 000002 		CAIN	2,2			; packet received?
  7706	043216	254 00 0 00 043245 		JRST	RUPDA2			; yes - go handle
  7707
  7708					; This is a packet received by dint of 'Rsp Requested' flag or error on
  7709					; transmission.
  7710
  7711	043217	221 03 0 00 000012 		IMULI	3,^D10			; calculate address of statistics
  7712	043220	271 03 0 00 043474 		ADDI	3,STASNT		;   ...
  7713	043221	200 02 0 00 070452 		MOVE	2,RSPONS+3		; get status word
  7714	043222	603 02 0 00 400000 		TLNE	2,400000		; error bit set?
  7715	043223	254 00 0 00 043242 		JRST	RUPDA1			; yes - go handle
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 178
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0353

  7716
  7717					; Status byte is in status byte format
  7718
  7719	043224	135 02 0 00 114540 		LDB	2,[POINT 8,RSPONS+3,7]	; get status bits
  7720	043225	602 02 0 00 000040 		TRNE	2,40			; Path A Acked?
  7721	043226	350 00 0 03 000002 		AOS	.SAACK(3)		; yes - increment
  7722	043227	602 02 0 00 000020 		TRNE	2,20			; Path A Naked?
  7723	043230	350 00 0 03 000003 		AOS	.SANAK(3)		; yes - increment
  7724	043231	602 02 0 00 000010 		TRNE	2,10			; Path A Nrsped?
  7725	043232	350 00 0 03 000004 		AOS	.SANSP(3)		; yes - increment
  7726	043233	602 02 0 00 000004 		TRNE	2,4			; Path B Acked?
  7727	043234	350 00 0 03 000005 		AOS	.SBACK(3)		; yes - increment
  7728	043235	602 02 0 00 000002 		TRNE	2,2			; Path B Naked?
  7729	043236	350 00 0 03 000006 		AOS	.SBNAK(3)		; yes - increment
  7730	043237	602 02 0 00 000001 		TRNE	2,1			; Path B Nrsped?
  7731	043240	350 00 0 03 000007 		AOS	.SBNSP(3)		; yes - increment
  7732	043241	254 00 0 00 043264 		JRST	RUPDAX			; exit
  7733
  7734					; Status byte is in error byte format
  7735	
  7736	043242	603 02 0 00 376000 	RUPDA1:	TLNE	2,376000		; any errors indicated?
  7737	043243	350 00 0 03 000010 		AOS	.SRERR(3)		; yes - increment receive error count
  7738	043244	254 00 0 00 043264 		JRST	RUPDAX			; exit
  7739
  7740					; This is a packet received from another port or from self (if destination
  7741					; port specified self).
  7742
  7743	043245	221 03 0 00 000006 	RUPDA2:	IMULI	3,6			; calculate address of statistics
  7744	043246	135 02 0 00 114541 		LDB	2,[POINT 2,RSPONS+3,14]	; get path select bits
  7745	043247	302 02 0 00 000002 		CAIE	2,2			; path 0?
  7746	043250	271 03 0 00 043556 		ADDI	3,STARCA		; yes - add in proper offset
  7747	043251	306 02 0 00 000002 		CAIN	2,2			; path 1?
  7748	043252	271 03 0 00 043614 		ADDI	3,STARCB		; yes - add in proper offset
  7749
  7750					; Increment packet counts
  7751
  7752	043253	350 00 0 03 000000 		AOS	.RPRCV(3)		; increment packet received count
  7753	043254	200 02 0 00 070452 		MOVE	2,RSPONS+3		; get status word
  7754	043255	607 02 0 00 400000 		TLNN	2,400000		; error word?
  7755	043256	254 00 0 00 043261 		JRST	RUPDA3			; no - continue
  7756	043257	603 02 0 00 376000 		TLNE	2,376000		; any error bits set?
  7757	043260	350 00 0 03 000002 		AOS	.RRERR(3)		; yes - increment receive error count
  7758	043261	200 01 0 00 120754'	RUPDA3:	MOVE	1,PAKOFF		; get offset
  7759						XCT	[GO	[LDB	[POINT 20,RSPONS+4,35] 	; 0-DGSNT
  7760								 ADDI	13
  7761								 RTN]
  7762							 GO	[LDB	[POINT 19,RSPONS+4,35]	; 1-MSGSNT
  7763								 ADDI	13
  7764								 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 179
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0354

  7765  7766							 MOVEI	23				; 2-IDREQ
  7767							 MOVEI	23				; 3-RSTSNT
  7768							 MOVEI	27				; 4-STRTSNT
  7769							 GO	[LDB	[POINT 32,RSPONS+6,31]	; 5-DATREQ0
  7770								 ADDI	41
  7771								 RTN]
  7772							 GO	[LDB	[POINT 32,RSPONS+6,31]	; 6-DATREQ1
  7773								 ADDI	41
  7774								 RTN]
  7775							 GO	[LDB	[POINT 32,RSPONS+6,31]	; 7-DATREQ2
  7776								 ADDI	41
  7777								 RTN]
  7778							 GO	[LDB	[POINT 16,RSPONS+4,35]	; 10-LPSNT
  7779								 ADDI	17
  7780								 RTN]
  7781							 SETZ					; 11-MDATREQ
  7782							 SETZ					; 12-DATSNT
  7783							 SETZ					; 13-DATRET
  7784							 MOVEI	33				; 14-MDATSNT
  7785							 SETZ					; 15-BUFCLS
  7786							 SETZ					; 16-CKTSET
  7787							 SETZ					; 17-CNTSET
  7788							 SETZ					; 20-CNTRD
  7789							 SETZ					; 21-RDREG
  7790							 SETZ					; 22-WRREG
  7791							 MOVEI	23				; 23-CNFRET
  7792							 SETZ					; 24-MCNF
  7793							 MOVEI	73				; 25-IDREC
  7794							 SETZ					; 26-RECDAT
  7795							 SETZ					; 27-MDATRET
  7796							 SETZ					; 30
  7797							 SETZ					; 31
  7798							 SETZ					; 32
  7799							 SETZ					; 33
  7800							 SETZ					; 34
  7801							 SETZ					; 35
  7802							 SETZ					; 36
  7803							 SETZ					; 37
  7804	043262	256 00 0 01 114562 			 SETZ](1)				; 40
  7805	043263	272 00 0 03 000001 		ADDM	.RBRCV(3)		; add in byte count
  7806
  7807					; Done - exit
  7808
  7809	043264	262 17 0 00 000011 	RUPDAX:	RGET	(OP,3,2,1,0)		; restore AC's
  7810
  7811	043271	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 180
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0355

  7812
  7813					;#********************************************************************
  7814					;* SREPOR - Report statistics
  7815					;#********************************************************************
  7816
  7817	043272	261 17 0 00 000000 	SREPOR:	RPUT	(0,1,2,3,4,5)		; save AC's
  7818
  7819
  7820					; Packets Sent statistics
  7821
  7822	043300	037 00 0 00 114623 		TMSGC	<*** STATISTICS - Packets Sent (>
  7823	043301	260 17 0 00 042073*		GO	PTIME
  7824						TMSG	<) ***
  7825					 (All numbers decimal)                                     Unexpctd  Expected
  7826					         Packets    Bytes    -Rsp Path A--   -Rsp Path B--    Resp     Resp
  7827					 Type     Sent      Sent     ACK  NAK/NRsp   ACK  NAK/NRsp   Errors   Errors
  7828	043302	037 00 0 00 114632 	 ----     ----      ----     ---  --------   ---  --------   ------   ------>
  7829	043303	474 05 0 00 000000 		SETO	5,			; initialize pointer to line number
  7830	043304	350 00 0 00 000005 	SREPO0:	AOS	5			; point to next line
  7831	043305	301 05 0 00 000005 		CAIL	5,5			; done yet?
  7832	043306	254 00 0 00 043352 		JRST	SREPO1			; yes - exit
  7833	043307	200 04 0 00 000005 		MOVE	4,5			; calculate beginning address
  7834	043310	221 04 0 00 000012 		IMULI	4,^D10			;   of statistics
  7835	043311	271 04 0 00 043474 		ADDI	4,STASNT		;   ...
  7836
  7837					; Check to see if there is anything here to print
  7838
  7839	043312	400 01 0 00 000000 		SETZ	1,			; clear totals
  7840	043313	270 01 0 04 000000 		ADD	1,.SPSNT(4)		; add in packets sent
  7841	043314	270 01 0 04 000001 		ADD	1,.SBSNT(4)		; add in bytes sent
  7842	043315	270 01 0 04 000002 		ADD	1,.SAACK(4)		; add in Path A ACKs
  7843	043316	270 01 0 04 000003 		ADD	1,.SANAK(4)		; add in Path A NAKs
  7844	043317	270 01 0 04 000004 		ADD	1,.SANSP(4)		; add in Path A NoRSPs
  7845	043320	270 01 0 04 000005 		ADD	1,.SBACK(4)		; add in Path B ACKs
  7846	043321	270 01 0 04 000006 		ADD	1,.SBNAK(4)		; add in Path B NAKs
  7847	043322	270 01 0 04 000007 		ADD	1,.SBNSP(4)		; add in Path B NoRSPs
  7848	043323	270 01 0 04 000010 		ADD	1,.SRERR(4)		; add in Receive Errors
  7849	043324	322 01 0 00 043304 		JUMPE	1,SREPO0		; zero? yes - try next category
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 181
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0356

  7850
  7851					; Print it
  7852
  7853						XCT	[TMSGC	<IntLnk>	; no - print type field
  7854							 TMSGC	<ExtLnk>
  7855							 TMSGC	<ReqID >
  7856							 TMSGC	<RegR/W>
  7857	043325	256 00 0 05 114744 			 TMSGC	<Other >](5)
  7858	043326	200 00 0 04 000000 		MOVE	.SPSNT(4)		; get packets sent
  7859	043327	003 12 0 00 000000 		PNTDCC	^D10,0			; print it
  7860	043330	200 00 0 04 000001 		MOVE	.SBSNT(4)		; get bytes sent
  7861	043331	003 12 0 00 000000 		PNTDCC	^D10,0			; print it
  7862	043332	200 00 0 04 000002 		MOVE	.SAACK(4)		; get Path A ACKs
  7863	043333	003 10 0 00 000000 		PNTDCC	8,0			; print it
  7864	043334	200 00 0 04 000003 		MOVE	.SANAK(4)		; get Path A NAKs
  7865	043335	270 00 0 04 000004 		ADD	.SANSP(4)		; get Path A NoRSPs
  7866	043336	003 10 0 00 000000 		PNTDCC	8,0			; print it
  7867	043337	200 00 0 04 000005 		MOVE	.SBACK(4)		; get Path B ACKs
  7868	043340	003 10 0 00 000000 		PNTDCC	8,0			; print it
  7869	043341	200 00 0 04 000006 		MOVE	.SBNAK(4)		; get Path B NAKs
  7870	043342	270 00 0 04 000007 		ADD	.SBNSP(4)		; get Path B NoRSPs
  7871	043343	003 10 0 00 000000 		PNTDCC	8,0			; print it
  7872	043344	200 00 0 04 000010 		MOVE	.SRERR(4)		; get unexpected Receive Errors
  7873	043345	274 00 0 04 000011 		SUB	.SREXP(4)		; subtract off expected errors
  7874	043346	003 11 0 00 000000 		PNTDCC	9,0			; print it
  7875	043347	200 00 0 04 000011 		MOVE	.SREXP(4)		; get expected Receive Errors
  7876	043350	003 11 0 00 000000 		PNTDCC	9,0			; print it
  7877	043351	254 00 0 00 043304 		JRST	SREPO0			; loop till done
  7878
  7879					; Packets Received Path A statistics
  7880
  7881	043352	037 00 0 00 030242 	SREPO1:	PCRL
  7882	043353	037 00 0 00 114751 		TMSGC	<*** STATISTICS - Packets Received Path A (>
  7883	043354	260 17 0 00 043301*		GO	PTIME
  7884						TMSG	<) ***
  7885					 (All numbers decimal)    Unexpected  Expected
  7886					        Packets    Bytes     Recv       Recv     Packets    Bytes
  7887					 Type     Rcvd      Recv    Errors     Errors    In Error  In Error
  7888	043355	037 00 0 00 114762 	 ----     ----      ----    ------     ------    --------  -------->
  7889	043356	474 05 0 00 000000 		SETO	5,			; initialize pointer to line number
  7890	043357	350 00 0 00 000005 	SREPO2:	AOS	5			; point to next line
  7891	043360	301 05 0 00 000005 		CAIL	5,5			; done yet?
  7892	043361	254 00 0 00 043415 		JRST	SREPO3			; yes - exit
  7893	043362	200 04 0 00 000005 		MOVE	4,5			; calculate beginning address
  7894	043363	221 04 0 00 000006 		IMULI	4,6			;   of statistics
  7895	043364	271 04 0 00 043556 		ADDI	4,STARCA		;   ...
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 182
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0357

  7896
  7897					; Check to see if there is anything here to print
  7898
  7899	043365	400 01 0 00 000000 		SETZ	1,			; clear totals
  7900	043366	270 01 0 04 000000 		ADD	1,.RPRCV(4)		; add in packets received
  7901	043367	270 01 0 04 000001 		ADD	1,.RBRCV(4)		; add in bytes received
  7902	043370	270 01 0 04 000002 		ADD	1,.RRERR(4)		; add in receive errors
  7903	043371	270 01 0 04 000003 		ADD	1,.RPERR(4)		; add in packets in error
  7904	043372	270 01 0 04 000004 		ADD	1,.RBERR(4)		; add in bytes in error
  7905	043373	322 01 0 00 043357 		JUMPE	1,SREPO2		; zero? yes - try next category
  7906
  7907					; Print it
  7908
  7909						XCT	[TMSGC	<IntLnk>	; no - print type field
  7910							 TMSGC	<ExtLnk>
  7911							 TMSGC	<ReqID >
  7912							 TMSGC	<RegR/W>
  7913	043374	256 00 0 05 114744 			 TMSGC	<Other >](5)
  7914	043375	200 00 0 04 000000 		MOVE	.RPRCV(4)		; get packets received
  7915	043376	003 11 0 00 000000 		PNTDCC	9,0			; print it
  7916	043377	200 00 0 04 000001 		MOVE	.RBRCV(4)		; get bytes received
  7917	043400	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7918	043401	200 00 0 04 000002 		MOVE	.RRERR(4)		; get receive errors
  7919	043402	274 00 0 04 000005 		SUB	.RREXP(4)		; subtract off expected recv errors
  7920	043403	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7921	043404	200 00 0 04 000005 		MOVE	.RREXP(4)		; get expected receive errors
  7922	043405	003 13 0 00 000000 		PNTDCC	13,0			; print it
  7923	043406	303 05 0 00 000003 		CAILE	5,3			; done with the first 3?
  7924	043407	254 00 0 00 043357 		JRST	SREPO2			; yes - loop till done
  7925	043410	200 00 0 04 000003 		MOVE	.RPERR(4)		; get packets in error
  7926	043411	003 13 0 00 000000 		PNTDCC	13,0			; print it
  7927	043412	200 00 0 04 000004 		MOVE	.RBERR(4)		; get bytes in error
  7928	043413	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7929	043414	254 00 0 00 043357 		JRST	SREPO2			; loop till done
  7930
  7931					; Packets Received Path B statistics
  7932
  7933	043415	037 00 0 00 030242 	SREPO3:	PCRL
  7934	043416	037 00 0 00 115046 		TMSGC	<*** STATISTICS - Packets Received Path B (>
  7935	043417	260 17 0 00 043354*		GO	PTIME
  7936						TMSG	<) ***
  7937					 (All numbers decimal)    Unexpected  Expected
  7938					        Packets    Bytes     Recv       Recv     Packets    Bytes
  7939					 Type     Rcvd      Recv    Errors     Errors    In Error  In Error
  7940	043420	037 00 0 00 114762 	 ----     ----      ----    ------     ------    --------  -------->
  7941	043421	474 05 0 00 000000 		SETO	5,			; initialize pointer to line number
  7942	043422	350 00 0 00 000005 	SREPO4:	AOS	5			; point to next line
  7943	043423	301 05 0 00 000005 		CAIL	5,5			; done yet?
  7944	043424	254 00 0 00 043460 		JRST	SREPOX			; yes - exit
  7945	043425	200 04 0 00 000005 		MOVE	4,5			; calculate beginning address
  7946	043426	221 04 0 00 000006 		IMULI	4,6			;   of statistics
  7947	043427	271 04 0 00 043614 		ADDI	4,STARCB		;   ...
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 183
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0358

  7948
  7949					; Check to see if there is anything here to print
  7950
  7951	043430	400 01 0 00 000000 		SETZ	1,			; clear totals
  7952	043431	270 01 0 04 000000 		ADD	1,.RPRCV(4)		; add in packets received
  7953	043432	270 01 0 04 000001 		ADD	1,.RBRCV(4)		; add in bytes received
  7954	043433	270 01 0 04 000002 		ADD	1,.RRERR(4)		; add in receive errors
  7955	043434	270 01 0 04 000003 		ADD	1,.RPERR(4)		; add in packets in error
  7956	043435	270 01 0 04 000004 		ADD	1,.RBERR(4)		; add in bytes in error
  7957	043436	322 01 0 00 043422 		JUMPE	1,SREPO4		; zero? yes - try next category
  7958
  7959					; Print it
  7960
  7961						XCT	[TMSGC	<IntLnk>	; no - print type field
  7962							 TMSGC	<ExtLnk>
  7963							 TMSGC	<ReqID >
  7964							 TMSGC	<RegR/W>
  7965	043437	256 00 0 05 114744 			 TMSGC	<Other >](5)
  7966	043440	200 00 0 04 000000 		MOVE	.RPRCV(4)		; get packets received
  7967	043441	003 11 0 00 000000 		PNTDCC	9,0			; print it
  7968	043442	200 00 0 04 000001 		MOVE	.RBRCV(4)		; get bytes received
  7969	043443	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7970	043444	200 00 0 04 000002 		MOVE	.RRERR(4)		; get receive errors
  7971	043445	274 00 0 04 000005 		SUB	.RREXP(4)		; subtract off expected recv errors
  7972	043446	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7973	043447	200 00 0 04 000005 		MOVE	.RREXP(4)		; get expected receive errors
  7974	043450	003 13 0 00 000000 		PNTDCC	13,0			; print it
  7975	043451	303 05 0 00 000003 		CAILE	5,3			; done with the first 3?
  7976	043452	254 00 0 00 043422 		JRST	SREPO4			; yes - loop till done
  7977	043453	200 00 0 04 000003 		MOVE	.RPERR(4)		; get packets in error
  7978	043454	003 13 0 00 000000 		PNTDCC	13,0			; print it
  7979	043455	200 00 0 04 000004 		MOVE	.RBERR(4)		; get bytes in error
  7980	043456	003 12 0 00 000000 		PNTDCC	12,0			; print it
  7981	043457	254 00 0 00 043422 		JRST	SREPO4			; loop till done
  7982
  7983					; Exit
  7984
  7985	043460	037 00 0 00 030242 	SREPOX:	PCRL
  7986	043461	262 17 0 00 000005 		RGET	(5,4,3,2,1,0)		; restore AC's
  7987
  7988	043467	263 17 0 00 000000 		RTN				; return
  7989
  7990
  7991					;#********************************************************************
  7992					;* SZERO - Clear statistics
  7993					;#********************************************************************
  7994
  7995	043470	402 00 0 00 043474 	SZERO:	SETZM	STATB			; clear first word
  7996	043471	200 00 0 00 115057 		MOVE	[STATB,,STATB+1]	; build a BLT pointer
  7997	043472	251 00 0 00 043651 		BLT	STATE			; clear them all
  7998	043473	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 184
DFCIA1	MAC	27-Oct-84 19:00		Statistics Handling Routines                                                       SEQ 0359

  7999
  8000					;#********************************************************************
  8001					;* Statistics data areas
  8002					;#********************************************************************
  8003
  8004					; Offset definitions for packets sent
  8005
  8006			000000		.SPSNT==0				; # packets sent
  8007			000001		.SBSNT==1				; # bytes sent
  8008			000002		.SAACK==2				; # ACKs received
  8009			000003		.SANAK==3				; # NAKs received
  8010			000004		.SANSP==4				; # NORSPs received
  8011			000005		.SBACK==5				; # ACKs received
  8012			000006		.SBNAK==6				; # NAKs received
  8013			000007		.SBNSP==7				; # NORSPs received
  8014			000010		.SRERR==8				; # unexpected response errors
  8015			000011		.SREXP==9				; # expected response errors
  8016
  8017					; Offset definitions for packets received
  8018
  8019			000000		.RPRCV==0				; # packets received
  8020			000001		.RBRCV==1				; # bytes received
  8021			000002		.RRERR==2				; # receive errors
  8022			000003		.RPERR==3				; # packets in error
  8023			000004		.RBERR==4				; # bytes in error
  8024			000005		.RREXP==5				; # expected receive errors
  8025
  8026					; Statistics
  8027
  8028	043474				STATB:
  8029	043474				STASNT:	BLOCK	^D10			; Internal Link Loopback
  8030	043506					BLOCK	^D10			; External Link Loopback
  8031	043520					BLOCK	^D10			; Request ID's
  8032	043532					BLOCK	^D10			; Register Read/Writes
  8033	043544					BLOCK	^D10			; Other
  8034
  8035	043556				STARCA:	BLOCK	6			; Path A - Internal Link Loopback
  8036	043564					BLOCK	6			; Path A - External Link Loopback
  8037	043572					BLOCK	6			; Path A - Request ID's
  8038	043600					BLOCK	6			; Path A - Register Read/Writes
  8039	043606					BLOCK	6			; Path A - Other
  8040
  8041	043614				STARCB:	BLOCK	6			; Path B - Internal Link Loopback
  8042	043622					BLOCK	6			; Path B - External Link Loopback
  8043	043630					BLOCK	6			; Path B - Request ID's
  8044	043636					BLOCK	6			; Path B - Register Read/Writes
  8045	043644					BLOCK	6			; Path B - Other
  8046
  8047			043651		STATE==.-1
  8048
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 185
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0360

  8049						SUBTTL	Microcode Handling Routines
  8050
  8051					;#********************************************************************
  8052					; These routines load/verify operational microcode and test microcode.
  8053					;
  8054					; Operational microcode:
  8055					;
  8056					;   TFLOAD - Load operational microcode for a test
  8057					;   FLOADB - Load operational microcode into buffer
  8058					;   FLOADC - Load microcode buffer contents into the port
  8059					;   FVERFC - Verify port microcode against buffer contents
  8060					;   FUERR -  Print verify error data
  8061					;
  8062					; Test microcode:
  8063					;
  8064					;   MLOADN - Load microcode and verify it (do not print errors)
  8065					;   MLOADY - Load microcode and verify it (print errors)
  8066					;   MVPNT - Print verify error data
  8067					;   MLIST - List microcode of a test
  8068					;   TLOAD - Load microcode/verify it for a test
  8069					;#********************************************************************
  8070
  8071					;#********************************************************************
  8072					;* TFLOAD - Load operational microcode for a test
  8073					;
  8074					; Returns:	+1 Error occurred (Error message or routine in AC0)
  8075					;		+2 Succeeded
  8076					;#********************************************************************
  8077
  8078	043652	402 00 0 00 044232 	TFLOAD:	SETZM	FFLAG			; clear operator output flag
  8079	043653	260 17 0 00 043745 		GO	FLOADB			; load file into ucode buffer
  8080						JRST	[MOVE	[TFLER1,,TFLER2]; error - exit
  8081	043654	254 00 0 00 115061 			 RTN]
  8082	043655	200 00 0 00 121005'		MOVE	TSLOAD			; get microcode loaded flag
  8083	043656	306 00 0 00 000777 		CAIN	777			; operational microcode?
  8084	043657	254 00 0 00 043676 		JRST	TFLOAX			; yes - return - already loaded
  8085	043660	261 17 0 00 000001 		PUT	1			; save AC1
  8086	043661	260 17 0 00 042614*		GO	ISTOP			; stop the port
  8087	043662	400 01 0 00 000000 		SETZ	1,			; clear AC1
  8088	043663	260 17 0 00 042776*		GO	LDCSR			; clear CSR
  8089	043664	262 17 0 00 000001 		GET	1			; restore AC1
  8090	043665	332 00 0 00 120737'		SKIPE	LDEBUG			; ucode load debug switch set?
  8091	043666	254 00 0 00 043676 		JRST	TFLOAX			; yes - don't load ucode
  8092	043667	201 00 0 00 000777 		MOVEI	777			; set microcode loaded flag to
  8093	043670	202 00 0 00 121005'		MOVEM	TSLOAD			;   indicate operational ucode
  8094	043671	260 17 0 00 044030 		GO	FLOADC			; load buffer into CRAM
  8095	043672	254 00 0 00 043700 		JRST	TFLOAE			; error - exit
  8096	043673	254 00 0 00 043676 		JRST	TFLOAX			; already loaded - exit
  8097	043674	260 17 0 00 044100 		GO	FVERFC			; verify CRAM against buffer
  8098	043675	254 00 0 00 043700 		JRST	TFLOAE			; error - exit
  8099	043676	350 00 0 17 000000 	TFLOAX:	AOS	(P)			; set up proper return
  8100	043677	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 186
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0361

  8101
  8102					; Error loading operational microcode
  8103
  8104	043700	200 00 0 00 115063 	TFLOAE:	MOVE	[TFLER3,,TFLER4]
  8105	043701	474 15 0 00 000000 		SETO	ERFLG,			; set error flag
  8106	043702	332 00 0 00 120741'		SKIPE	MDEBUG			; error message debug switch set?
  8107	043703	350 00 0 17 000000 		AOS	(P)			; yes - skip this error
  8108	043704	263 17 0 00 000000 		RTN				; exit
  8109
  8110					; Error message routines
  8111
  8112	043705	037 01 0 00 115064 	TFLER1:	FMSG	<Can't access ">
  8113	043706	200 00 0 00 044225 		MOVE	FNAME
  8114	043707	037 01 0 00 000002 		PNTSXF
  8115	043710	037 01 0 00 000056 		PNTCIF	"."
  8116	043711	200 00 0 00 044226 		MOVE	FNAME+1
  8117	043712	037 01 0 00 000002 	 	PNTSXF
  8118	043713	037 01 0 00 115067 		FMSG	<" on selected load device>
  8119	043714	263 17 0 00 000000 		RTN
  8120
  8121	043715	037 00 0 00 115064 	TFLER2:	TMSG	<Can't access ">
  8122	043716	200 00 0 00 044225 		MOVE	FNAME
  8123	043717	037 00 0 00 000002 		PNTSIX
  8124	043720	037 00 0 00 000056 		PNTCI	"."
  8125	043721	200 00 0 00 044226 		MOVE	FNAME+1
  8126	043722	037 00 0 00 000002 	 	PNTSIX
  8127	043723	037 00 0 00 115067 		TMSG	<" on selected load device>
  8128	043724	263 17 0 00 000000 		RTN
  8129
  8130	043725	037 01 0 00 115075 	TFLER3:	FMSG	<Verify error loading ">
  8131	043726	200 00 0 00 044225 		MOVE	FNAME
  8132	043727	037 01 0 00 000002 		PNTSXF
  8133	043730	037 01 0 00 000056 		PNTCIF	"."
  8134	043731	200 00 0 00 044226 		MOVE	FNAME+1
  8135	043732	037 01 0 00 000002 	 	PNTSXF
  8136	043733	037 01 0 00 115102 		FMSG	<" into CRAM>
  8137	043734	263 17 0 00 000000 		RTN
  8138
  8139	043735	037 00 0 00 115075 	TFLER4:	TMSG	<Verify error loading ">
  8140	043736	200 00 0 00 044225 		MOVE	FNAME
  8141	043737	037 00 0 00 000002 		PNTSIX
  8142	043740	037 00 0 00 000056 		PNTCI	"."
  8143	043741	200 00 0 00 044226 		MOVE	FNAME+1
  8144	043742	037 00 0 00 000002 	 	PNTSIX
  8145	043743	037 00 0 00 115102 		TMSG	<" into CRAM>
  8146	043744	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 187
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0362

  8147
  8148					;#********************************************************************
  8149					;* FLOADB - Load operational microcode into buffer
  8150					;
  8151					; Data areas:	UCODE - 4096 word buffer of opr ucode
  8152					;		ULEN - number of uword used
  8153					;		UNAME - name of ucode loaded
  8154					;
  8155					;		FNAME - name of ucode desired
  8156					;		FFLAG - output flag 0 - no operator output
  8157					;				   -1 - operator output is printed
  8158					;
  8159					; Return:  +1 - Error occurred
  8160					;	   +2 - Load succeeded
  8161					;	   ULEN,UCODE,UNAME updated
  8162					;#********************************************************************
  8163
  8164	043745	261 17 0 00 000000 	FLOADB:	RPUT	(0,1,2,3,4)		; save AC's
  8165
  8166	043752	200 00 0 00 044227 		MOVE	UNAME			; get microcode loaded name
  8167	043753	312 00 0 00 044225 		CAME	FNAME			; same as desired?
  8168	043754	254 00 0 00 043761 		JRST	FLODB0			; no - must reload ucode
  8169	043755	200 00 0 00 044230 		MOVE	UNAME+1			; get microcode loaded extension
  8170	043756	316 00 0 00 044226 		CAMN	FNAME+1			; same as desired?
  8171	043757	254 00 0 00 044021 		JRST	FLODBX			; yes - already loaded
  8172	043760	402 00 0 00 044231 		SETZM	CNAME			; no - clear 'CRAM loaded' name
  8173
  8174					; Must load microcode into buffer
  8175
  8176	043761	201 00 0 00 044225 	FLODB0:	MOVEI	FNAME			; point to file name buffer
  8177	043762	037 05 0 00 000004 		FSELECT				; init the file
  8178						JRST	[SKIPN	FFLAG		; error - print error message
  8179							 JRST	FLODBE		;   if operator output is
  8180							 FMSGC	<? Can't access ">; desired, then exit
  8181							 MOVE	FNAME
  8182							 PNTSXF
  8183							 PNTCIF	"."
  8184							 MOVE	FNAME+1
  8185							 PNTSXF
  8186							 FMSGD	<" on selected load device.>
  8187	043763	254 00 0 00 115111 			 JRST	FLODBE]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 188
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0363

  8188	043764	332 00 0 00 044232 		SKIPE	FFLAG			  ; print operator output?
  8189						GO	[TMSGC	<[Reading file: > ; yes - print this
  8190							 MOVE	FNAME
  8191							 PNTSIX
  8192							 PNTCI	"."
  8193							 MOVE	FNAME+1
  8194							 PNTSIX				
  8195							 TMSGD	<]>
  8196	043765	260 17 0 00 115127 			 RTN]
  8197	043766	402 00 0 00 044227 		SETZM	UNAME			; invalidate current contents
  8198	043767	402 00 0 00 121013'		SETZM	UVERSN#			; invalidate current version number
  8199	043770	201 04 0 00 044234 		MOVEI	4,UCODE			; get buffer address
  8200	043771	260 17 0 00 000000*	FLODB1:	GO	FGETW			; get microcode entry
  8201	043772	254 00 0 00 044007 		 JRST	FLODB2			; error/EOF occurred
  8202	043773	403 01 0 00 000002 		SETZB	1,2			; clear AC's
  8203	043774	200 00 0 00 035713 		MOVE	CADDR			; get address
  8204	043775	137 00 0 00 113107 		DPB	[POINT 12,1,11]		; save in word 1
  8205	043776	135 00 0 00 115137 		LDB	[POINT 24,CWORDL,29]	; get left 24 bits (0-23)
  8206	043777	137 00 0 00 115140 		DPB	[POINT 24,1,35]		; save in word 1
  8207	044000	135 00 0 00 115141 		LDB	[POINT 6,CWORDL,35]	; get left 24 bits (24-27)
  8208	044001	137 00 0 00 115142 		DPB	[POINT 6,2,5]		; save in word 2
  8209	044002	135 00 0 00 115143 		LDB	[POINT 30,CWORDR,35]	; get right 28 bits (0-27)
  8210	044003	137 00 0 00 115144 		DPB	[POINT 30,2,35]		; save in word 2
  8211	044004	124 01 0 04 000000 		DMOVEM	1,(4)			; save data
  8212	044005	271 04 0 00 000002 		ADDI	4,2			; point to next location
  8213	044006	254 00 0 00 043771 		JRST	FLODB1			; no - loop til done
  8214
  8215					; Done loading ucode into buffer
  8216
  8217	044007	120 00 0 00 044225 	FLODB2:	DMOVE	FNAME			; get name of microcode loaded
  8218	044010	124 00 0 00 044227 		DMOVEM	UNAME			; save in actual name loaded
  8219	044011	275 04 0 00 044234 		SUBI	4,UCODE			; calculate length of ucode
  8220	044012	242 04 0 00 777777 		LSH	4,-1			; divide by 2
  8221	044013	202 04 0 00 044233 		MOVEM	4,ULEN			; save it
  8222	044014	332 00 0 00 044232 		SKIPE	FFLAG			; operator output desired?
  8223						GO	[TMSGC	<[>		; yes - print message
  8224							 MOVE	4
  8225							 PNTDEC
  8226							 TMSGD	<. microwords loaded]>
  8227	044015	260 17 0 00 115152 			 RTN]
  8228	044016	200 00 0 00 121005'		MOVE	TSLOAD			; get microcode loaded flag
  8229	044017	306 00 0 00 000777 		CAIN	777			; operational microcode?
  8230	044020	476 00 0 00 121005'		SETOM	TSLOAD			; yes - reset loaded flag
  8231	044021	350 00 0 17 777773 	FLODBX:	AOS	-5(P)			; set up good return
  8232	044022	262 17 0 00 000004 	FLODBE:	RGET	(4,3,2,1,0)		; restore AC's
  8233
  8234	044027	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 189
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0364

  8235
  8236					;#********************************************************************
  8237					;* FLOADC - Load microcode buffer contents into the port
  8238					;
  8239					; Return:  +1 - Error
  8240					;	   +2 - Already loaded
  8241					;	   +3 - Ok
  8242					;#********************************************************************
  8243
  8244	044030	261 17 0 00 000000 	FLOADC:	RPUT	(0,1,2,3,4)		; save AC's
  8245
  8246	044035	336 00 0 00 044227 		SKIPN	UNAME			; any microcode loaded?
  8247						JRST	[SKIPE	FFLAG		; no - return
  8248							 TMSGCD	<? No microcode loaded yet>
  8249							 SOS	-5(P)
  8250							 SOS	-5(P)
  8251	044036	254 00 0 00 115165 			 JRST	FLODCX]
  8252	044037	200 00 0 00 044227 		MOVE	UNAME			; get microcode name desired
  8253	044040	316 00 0 00 044231 		CAMN	CNAME			; same as what is loaded?
  8254						JRST	[SKIPN	FFLAG		; no - return
  8255							 JRST	FLODCX
  8256							 TMSGC	<[>
  8257							 MOVE	UNAME		;   message
  8258							 PNTSIX
  8259							 PNTCI	"."
  8260							 MOVE	UNAME+1
  8261							 PNTSIX
  8262							 TMSGD	< already loaded]>
  8263							 SOS	-5(P)
  8264	044041	254 00 0 00 115172 			 JRST	FLODCX]
  8265	044042	332 00 0 00 044232 		SKIPE	FFLAG			; operator output desired?
  8266						GO	[TMSGC	<[Loading >	; yes - print loading ucode
  8267							 MOVE	UNAME		;   message
  8268							 PNTSIX
  8269							 PNTCI	"."
  8270							 MOVE	UNAME+1
  8271							 PNTSIX
  8272							 TMSGD	< into CRAM]>
  8273	044043	260 17 0 00 115213 			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 190
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0365

  8274
  8275					; Go load the microcode
  8276
  8277	044044	200 03 0 00 044233 		MOVE	3,ULEN			; get length of ucode
  8278	044045	201 04 0 00 044234 		MOVEI	4,UCODE			; get address of ucode buffer
  8279	044046	261 17 0 00 034000 		PUT	PARFLG			; save auto parity flag
  8280	044047	402 00 0 00 034000 		SETZM	PARFLG			; clear auto parity flag
  8281	044050	120 01 0 04 000000 	FLODC0:	DMOVE	1,(4)			; get microword entry
  8282	044051	135 00 0 00 113107 		LDB	[POINT 12,1,11]		; get CRAM address
  8283	044052	202 00 0 00 035713 		MOVEM	CADDR			; save it
  8284	044053	246 01 0 00 000006 		LSHC	1,6			; position correctly for 30 bits
  8285	044054	135 00 0 00 113111 		LDB	[POINT 30,1,35]		; get left 30 bits
  8286	044055	202 00 0 00 035714 		MOVEM	CWORDL			; save it
  8287	044056	135 00 0 00 113110 		LDB	[POINT 30,2,29]		; get right 30 bits
  8288	044057	622 00 0 00 000002 		TRZE	2			; bit 59 set?
  8289	044060	660 00 0 00 000001 		TRO	1			; yes - set rightmost bit
  8290	044061	202 00 0 00 035715 		MOVEM	CWORDR			; save it
  8291	044062	260 17 0 00 036340 		GO	DWCRAM			; write CRAM word
  8292	044063	271 04 0 00 000002 		ADDI	4,2			; point to next entry
  8293	044064	367 03 0 00 044050 		SOJG	3,FLODC0		; loop till done
  8294	044065	262 17 0 00 034000 		GET	PARFLG			; restore auto parity flag
  8295	044066	200 00 0 00 044227 		MOVE	UNAME			; get name of ucode loaded
  8296	044067	202 00 0 00 044231 		MOVEM	CNAME			; save name of ucode loaded
  8297
  8298					; Exit
  8299
  8300	044070	262 17 0 00 000004 	FLODCX:	RGET	(4,3,2,1,0)		; restore AC's
  8301
  8302	044075	350 00 0 17 000000 		AOS	(P)			; set up proper return
  8303	044076	350 00 0 17 000000 		AOS	(P)			; set up proper return
  8304	044077	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 191
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0366

  8305
  8306					;#********************************************************************
  8307					;* FVERFC - Verify port microcode against buffer contents
  8308					;
  8309					; Data areas:	UCODE - 4096 word buffer of opr ucode
  8310					;		ULEN - number of uword used
  8311					;		UNAME - name of ucode loaded
  8312					;		UVERR - verify error count
  8313					;		ECODE - up to 3 verify errors
  8314					;
  8315					;		FFLAG - output flag 0 - no operator output
  8316					;				   -1 - operator output is printed
  8317					;
  8318					; Return:  +1 - Verify error
  8319					;	   +2 - Verify succeeded
  8320					;	   UVERR,ECODE updated
  8321					;#********************************************************************
  8322
  8323	044100	261 17 0 00 000000 	FVERFC:	RPUT	(0,1,2,3,4)		; save AC's
  8324
  8325	044105	336 00 0 00 044227 		SKIPN	UNAME			; any microcode loaded?
  8326						JRST	[SKIPE	FFLAG		; no - return
  8327							 TMSGCD	<? No microcode loaded into buffer yet>
  8328	044106	254 00 0 00 115234 			 JRST	FVERFE]
  8329	044107	200 03 0 00 044233 		MOVE	3,ULEN			; get length of ucode
  8330	044110	201 04 0 00 044234 		MOVEI	4,UCODE			; get address of ucode buffer
  8331	044111	402 00 0 00 064234 		SETZM	UVERR			; clear verify error count
  8332	044112	120 01 0 04 000000 	FVERF0:	DMOVE	1,(4)			; get microword entry
  8333	044113	135 00 0 00 113107 		LDB	[POINT 12,1,11]		; get CRAM address
  8334	044114	202 00 0 00 035713 		MOVEM	CADDR			; save it
  8335	044115	246 01 0 00 000006 		LSHC	1,6			; position correctly for 30 bits
  8336	044116	135 00 0 00 113111 		LDB	[POINT 30,1,35]		; get left 30 bits
  8337	044117	202 00 0 00 120725'		MOVEM	DWORDL#			; save it
  8338	044120	135 00 0 00 113110 		LDB	[POINT 30,2,29]		; get right 30 bits
  8339	044121	622 00 0 00 000002 		TRZE	2			; bit 59 set?
  8340	044122	660 00 0 00 000001 		TRO	1			; yes - set rightmost bit
  8341	044123	202 00 0 00 120726'		MOVEM	DWORDR#			; save it
  8342	044124	260 17 0 00 036372 		GO	DRCRAM			; read CRAM word
  8343	044125	200 00 0 00 035714 		MOVE	CWORDL			; get left word
  8344	044126	312 00 0 00 120725'		CAME	DWORDL			; correct?
  8345						JRST	[AOS	2,UVERR		; no - handle error
  8346							 CAILE	2,3		; too many errors so far?
  8347							 JRST	FVERF1		; yes - don't save this one
  8348							 IMULI	2,5		; no - multiply by 5
  8349							 MOVEI	2,ECODE-5(2)	; get address to save bad data
  8350							 MOVE	CADDR		; get CRAM address
  8351							 MOVEM	(2)		; save it
  8352							 DMOVE	DWORDL		; get correct
  8353							 DMOVEM	1(2)		; save it
  8354							 DMOVE	CWORDL		; get correct
  8355							 DMOVEM	3(2)		; save it
  8356	044127	254 00 0 00 115237 			 JRST	FVERF1]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 192
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0367

  8357	044130	200 00 0 00 035715 		MOVE	CWORDR			; get right word
  8358	044131	312 00 0 00 120726'		CAME	DWORDR			; correct?
  8359						JRST	[AOS	2,UVERR		; no - handle error
  8360							 CAILE	2,3		; too many errors so far?
  8361							 JRST	FVERF1		; yes - don't save this one
  8362							 IMULI	2,5		; no - multiply by 5
  8363							 MOVEI	2,ECODE-5(2)	; get address to save bad data
  8364							 MOVE	CADDR		; get CRAM address
  8365							 MOVEM	(2)		; save it
  8366							 DMOVE	DWORDL		; get correct
  8367							 DMOVEM	1(2)		; save it
  8368							 DMOVE	CWORDL		; get correct
  8369							 DMOVEM	3(2)		; save it
  8370	044132	254 00 0 00 115237 			 JRST	FVERF1]
  8371	044133	271 04 0 00 000002 	FVERF1:	ADDI	4,2			; point to next entry
  8372	044134	367 03 0 00 044112 		SOJG	3,FVERF0		; loop till done
  8373	044135	201 00 0 00 000137 		MOVEI	137			; read location 137 which contains
  8374	044136	202 00 0 00 035713 		MOVEM	CADDR			;   microcode version in MGC field
  8375	044137	260 17 0 00 036372 		GO	DRCRAM			;   bits 14-23
  8376	044140	135 00 0 00 111140 		LDB	[POINT 10,CWORDL,29] 	; get version number
  8377	044141	202 00 0 00 121013'		MOVEM	UVERSN			; save it
  8378	044142	332 00 0 00 064234 		SKIPE	UVERR			; any verify errors?
  8379	044143	254 00 0 00 044147 		JRST	FVERFE			; yes - take error exit
  8380	044144	332 00 0 00 044232 		SKIPE	FFLAG			; operator output desired?
  8381						GO	[TMSGC	<[>		; yes - print message
  8382							 MOVE	ULEN
  8383							 PNTDEC
  8384							 TMSGD	<. CRAM locations loaded/verified]>
  8385							 TMSGC	<[Ucode version >
  8386							 MOVE	UVERSN		; get version number
  8387							 PNTOCS			; print it
  8388							 TMSGD	<]>
  8389	044145	260 17 0 00 115267 			 RTN]
  8390	044146	350 00 0 17 777773 		AOS	-5(P)			; set up good return
  8391	044147	262 17 0 00 000004 	FVERFE:	RGET	(4,3,2,1,0)		; restore AC's
  8392
  8393	044154	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 193
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0368

  8394
  8395					;#********************************************************************
  8396					;* FUERR -  Print verify error data
  8397					;
  8398					; Data printed:  UVERR - number of verify errors
  8399					;		 ECODE - correct/actual data for each error (up to 3)
  8400					;#********************************************************************
  8401
  8402	044155	336 00 0 00 064234 	FUERR:	SKIPN	UVERR			; any verify errors?
  8403	044156	263 17 0 00 000000 		RTN				; no - return
  8404	044157	261 17 0 00 000000 		RPUT	(0,1,2,3,4)		; save some AC's
  8405
  8406	044164	037 00 0 00 030242 		PCRL				; start a new line
  8407	044165	200 00 0 00 044233 		MOVE	ULEN
  8408	044166	037 15 0 00 000000 		PNTDEC
  8409	044167	037 00 0 00 115300 		TMSG	<. CRAM locations loaded - >
  8410	044170	200 00 0 00 064234 		MOVE	UVERR			; get number of errors
  8411	044171	037 15 0 00 000000 		PNTDEC				; print it
  8412	044172	037 00 0 00 115306 		TMSG	<. verify errors:>
  8413	044173	037 00 0 00 115312 		TMSGC	< Addr           Correct                  Actual>
  8414	044174	201 01 0 00 064235 		MOVEI	1,ECODE			; get address of correct/actual data
  8415	044175	200 04 0 00 064234 		MOVE	4,UVERR			; get number of verify errors
  8416	044176	303 04 0 00 000003 		CAILE	4,3			; more than 3 errors?
  8417	044177	201 04 0 00 000003 		MOVEI	4,3			; yes - limit to 3
  8418	044200	200 00 0 01 000000 	FUERR0:	MOVE	(1)			; get CRAM address
  8419	044201	037 00 0 00 112240 		TMSGC	< >
  8420	044202	037 04 0 00 000000 		PNT4				; print it
  8421	044203	037 00 0 00 112413 		TMSG	<  >
  8422	044204	120 02 0 01 000001 		DMOVE	2,1(1)			; get left/right halves of correct
  8423	044205	260 17 0 00 042365 		GO	PNTWD			; print it
  8424	044206	037 00 0 00 112413 		TMSG	<  >
  8425	044207	120 02 0 01 000003 		DMOVE	2,3(1)			; get left/right halves of actual
  8426	044210	260 17 0 00 042365 		GO	PNTWD			; print it
  8427	044211	271 01 0 00 000005 		ADDI	1,5			; point to next entry
  8428	044212	367 04 0 00 044200 		SOJG	4,FUERR0		; loop till done
  8429	044213	200 04 0 00 064234 		MOVE	4,UVERR			; get error count
  8430	044214	303 04 0 00 000003 		CAILE	4,3			; more than printed?
  8431	044215	037 00 0 00 115324 		TMSGC	< ...>			; yes - indicate more
  8432	044216	037 00 0 00 030242 		PCRL
  8433	044217	262 17 0 00 000004 		RGET	(4,3,2,1,0)		; restore AC's
  8434
  8435	044224	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 194
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0369

  8436
  8437					;#********************************************************************
  8438					; Ucode data areas
  8439					;#********************************************************************
  8440
  8441					; Microcode file name
  8442
  8443	044225	43 51 22 20 00 00 	FNAME:	SIXBIT	/CI20/			; operational microcode
  8444	044226	65 54 44 00 00 00 		SIXBIT	/ULD/			;   file name
  8445
  8446	044227	000000	000000		UNAME:	0				; name of actual microcode
  8447	044230	000000	000000			0				;   loaded into buffer
  8448	044231	000000	000000		CNAME:	0				; name of actual ucode loaded into CRAM
  8449
  8450	044232	000000	000000		FFLAG:	0				; operator output flag (0-N,-1-Y)
  8451
  8452					; Microcode
  8453
  8454	044233	000000	000000		ULEN:	0				; length of microcode
  8455
  8456	044234				UCODE:	BLOCK	^D8192			; microcode data area
  8457
  8458					; Verify error data
  8459
  8460	064234	000000	000000		UVERR:	0				; number of ucode verify errors
  8461	064235				ECODE:	BLOCK	3*5			; verify error ucode data area
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 195
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0370

  8462
  8463					;#********************************************************************
  8464					;* MLOADN - Load microcode and verify it (do not print errors)
  8465					;* MLOADY - Load microcode and verify it (print errors)
  8466					;
  8467					; Arguments:	AC1 - Contains address where microcode starts
  8468					;
  8469					; Returns:	MLNUM - Number of words loaded/verified
  8470					;		+1 - Error occurred loading/verifying microcode
  8471					;		+2 - Ok
  8472					;
  8473					; Microcode format:  The microcode is given in  2  word  segments
  8474					;	(specifying address and 60 CRAM bits).  The ucode is in a
  8475					;	table beginning at the address given in AC1.  The end  of
  8476					;	this table is indicated by a word containing -1.
  8477					;
  8478					;	Microwords from another microcode list may be inserted by
  8479					;	placing a two word entry within  the table:  -2  followed
  8480					;	by the address of the new list.
  8481					;
  8482					;  Word 1:  Bits 00-11 - Microword load address (0000-7777)
  8483					;		 12-35 - Bits 0-23 of microword to load
  8484					;  Word 2:  Bits 00-34 - Bits 24-57,59 of microword to load
  8485					;	         35 ---- Force Bad Parity flag
  8486					;#********************************************************************
  8487
  8488	064254	402 00 0 00 120747'	MLOADN:	SETZM	MVREP#			; clear print flag
  8489	064255	334 00 0 00 000000 		SKIPA				; continue
  8490	064256	476 00 0 00 120747'	MLOADY:	SETOM	MVREP			; set print flag
  8491	064257	402 00 0 00 120745'		SETZM	MVFLAG#			; clear verify flag
  8492	064260	260 17 0 00 064267 		GO	MVCOM			; load microcode
  8493	064261	255 00 0 00 000000 		JFCL				; error - ignore
  8494	064262	476 00 0 00 120745'		SETOM	MVFLAG			; set verify flag
  8495	064263	260 17 0 00 064267 		GO	MVCOM			; verify microcode
  8496	064264	263 17 0 00 000000 		RTN				; error - return
  8497	064265	350 00 0 17 000000 		AOS	(P)			; set up proper return
  8498	064266	263 17 0 00 000000 		RTN				; return
  8499
  8500	064267	476 00 0 00 120746'	MVCOM:	SETOM	MVNUM#			; init number of verify errors
  8501	064270	402 00 0 00 120742'		SETZM	MLNUM#			; init number of words loaded
  8502	064271	323 01 0 00 103535 		JUMPLE	1,[RTN]			; exit if no microcode table specified
  8503	064272	261 17 0 00 000000 		RPUT	(0,1,2,3,4)		; save some AC's
  8504
  8505	064277	200 04 0 00 000001 		MOVE	4,1			; get address of table in AC4
  8506	064300	200 01 0 00 115326 		MOVE	1,[MWBADR,,MWBADR+1]	; build a BLT pointer
  8507	064301	476 00 0 00 064420 		SETOM	MWBADR			; initialize first word
  8508	064302	251 01 0 00 064436 		BLT	1,MWBRAC+2		; initialize the rest
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 196
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0371

  8509
  8510					; First stop the port and ensure 'DIAG TEST EBUF' is not set
  8511
  8512	064303	260 17 0 00 043661*		GO	ISTOP			; stop the port
  8513	064304	260 17 0 00 000000*		GO	CLREBU			; ensure cleared
  8514	064305	255 00 0 00 000000 		 JFCL				; ignore error
  8515
  8516					; Load microwords
  8517
  8518	064306	200 02 0 04 000000 	MLOAD0:	MOVE	2,(4)			; get first word
  8519	064307	316 02 0 00 111025 		CAMN	2,[-1]			; end of list?
  8520	064310	254 00 0 00 064406 		JRST	MLOADX			; yes - exit
  8521	064311	402 00 0 00 044231 		SETZM	CNAME			; clear 'CRAM loaded' ucode flag
  8522	064312	200 03 0 04 000001 		MOVE	3,1(4)			; get second word
  8523	064313	312 02 0 00 112101 		CAME	2,[-2]			; subtable entry?
  8524	064314	254 00 0 00 064330 		JRST	MLOAD1			; no - go load word
  8525
  8526					; Subtable entry
  8527
  8528	064315	271 04 0 00 000002 		ADDI	4,2			; point to next table entry
  8529	064316	261 17 0 00 115327 		PUT	[MLOADR]		; set up return address
  8530	064317	261 17 0 00 000000 		RPUT	(0,1,2,3,4)		; save AC's
  8531
  8532	064324	200 04 0 00 000003 		MOVE	4,3			; get table address
  8533	064325	254 00 0 00 064306 		JRST	MLOAD0			; reentrant call to load
  8534	064326	255 00 0 00 000000 	MLOADR:	JFCL				; error - ignore
  8535	064327	254 00 0 00 064306 		JRST	MLOAD0			; continue
  8536
  8537					; Load bits 0-29
  8538
  8539	064330	135 01 0 00 115330 	MLOAD1:	LDB	1,[POINT 12,2,11]	; get actual CRAM load address
  8540	064331	202 01 0 00 035713 		MOVEM	1,CADDR			; save address
  8541	064332	242 01 0 00 000001 		LSH	1,1			; convert to address for RAR
  8542	064333	660 01 0 00 000001 		TRO	1,1			; set bit 12 (for left 30 bits)
  8543	064334	202 01 0 00 120776'		MOVEM	1,SAVRAR#		; save address loaded
  8544	064335	260 17 0 00 041133*		GO	LDRAR			; load RAR with it
  8545
  8546	064336	200 01 0 00 000003 		MOVE	1,3			; get word 2 (has 'bad parity' flag)
  8547	064337	621 02 0 00 777700 		TLZ	2,777700		; now AC2 has CRAM bits 0-23 
  8548	064340	246 02 0 00 000006 		LSHC	2,6			; now get bits 0-30 in AC2 (left half)
  8549	064341	242 03 0 00 777772 		LSH	3,-6			; right justify AC3 (right half)
  8550	064342	622 03 0 00 000002 		TRZE	3,2			; bit 59 set?
  8551	064343	660 03 0 00 000001 		TRO	3,1			; yes - set rightmost bit
  8552	064344	260 17 0 00 042407 		GO	CALPAR			; calculate parity
  8553	064345	200 01 0 00 000002 		MOVE	1,2			; get left 30 bits
  8554	064346	336 00 0 00 120745'		SKIPN	MVFLAG			; load?
  8555	064347	260 17 0 00 036364*		GO	LDCRAM			; yes - load it
  8556	064350	332 00 0 00 120745'		SKIPE	MVFLAG			; verify?
  8557						GO	[GO	RDCRAM		; yes - read CRAM
  8558							 MOVEM	1,CWORDL	; save it
  8559	064351	260 17 0 00 115331 			 RTN]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 197
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0372

  8560
  8561					; Load bits 30-59
  8562
  8563	064352	200 01 0 00 120776'		MOVE	1,SAVRAR		; get RAR address (for left 30 bits)
  8564	064353	620 01 0 00 000001 		TRZ	1,1			; clear bit 12 (for right 30 bits)
  8565	064354	260 17 0 00 064335*		GO	LDRAR			; load address
  8566	064355	200 01 0 00 000003 		MOVE	1,3			; get right 30 bits
  8567	064356	336 00 0 00 120745'		SKIPN	MVFLAG			; load?
  8568	064357	260 17 0 00 064347*		GO	LDCRAM			; yes - load it
  8569	064360	336 00 0 00 120745'		SKIPN	MVFLAG			; load?
  8570	064361	254 00 0 00 064403 		JRST	MLOAD2			; yes - next location
  8571	064362	260 17 0 00 036406*		GO	RDCRAM			; yes - read CRAM
  8572	064363	202 01 0 00 035715 		MOVEM	1,CWORDR		; save it
  8573	064364	316 02 0 00 035714 		CAMN	2,CWORDL		; valid data?
  8574	064365	312 03 0 00 035715 		CAME	3,CWORDR
  8575	064366	334 00 0 00 000000 		SKIPA				; no - continue
  8576	064367	254 00 0 00 064403 		JRST	MLOAD2			; yes - next location
  8577	064370	350 01 0 00 120746'		AOS	1,MVNUM			; get error count
  8578	064371	303 01 0 00 000002 		CAILE	1,2			; more than 3 errors?
  8579	064372	254 00 0 00 064403 		JRST	MLOAD2			; yes - next location
  8580	064373	200 00 0 00 035713 		MOVE	CADDR			; get address
  8581	064374	202 00 0 01 064420 		MOVEM	MWBADR(1)		; save it
  8582	064375	202 02 0 01 064423 		MOVEM	2,MWBLCO(1)		; save left 30 bits (correct)
  8583	064376	202 03 0 01 064431 		MOVEM	3,MWBRCO(1)		; save right 30 bits (correct)
  8584	064377	200 02 0 00 035714 		MOVE	2,CWORDL		; get left 30 bits
  8585	064400	202 02 0 01 064426 		MOVEM	2,MWBLAC(1)		; save it (actual)
  8586	064401	200 02 0 00 035715 		MOVE	2,CWORDR		; get right 30 bits
  8587	064402	202 03 0 01 064434 		MOVEM	3,MWBRAC(1)		; save it (actual)
  8588
  8589					; Point to next microword
  8590
  8591	064403	350 00 0 00 120742'	MLOAD2:	AOS	MLNUM			; increment word count
  8592	064404	271 04 0 00 000002 		ADDI	4,2			; increment by 2
  8593	064405	254 00 0 00 064306 		JRST	MLOAD0			; loop till done
  8594
  8595					; Done - return count of words loaded
  8596
  8597	064406	337 00 0 00 120746'	MLOADX:	SKIPG	MVNUM			; any verify errors?
  8598	064407	350 00 0 17 777773 		AOS	-5(P)			; no - set up RTN+2
  8599	064410	332 00 0 00 120747'		SKIPE	MVREP			; report errors?
  8600	064411	260 17 0 00 064437 		GO	MVPNT			; yes - print errors
  8601	064412	262 17 0 00 000004 		RGET	(4,3,2,1,0)		; restore AC's
  8602
  8603	064417	263 17 0 00 000000 		RTN				; return
  8604
  8605	064420				MWBADR:	BLOCK	3			; CRAM addresses
  8606	064423				MWBLCO:	BLOCK	3			; left correct
  8607	064426				MWBLAC:	BLOCK	3			; left actual
  8608	064431				MWBRCO:	BLOCK	3			; right correct
  8609	064434				MWBRAC:	BLOCK	3			; right actual
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 198
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0373

  8610
  8611					;#********************************************************************
  8612					;* MVPNT - Print verify error data
  8613					;#********************************************************************
  8614
  8615	064437	335 00 0 00 120746'	MVPNT:	SKIPGE	MVNUM			; any errors to report?
  8616	064440	263 17 0 00 000000 		RTN				; no - return
  8617	064441	261 17 0 00 000000 		RPUT	(0,1,2,3,4,5,6)		; save some AC's
  8618
  8619	064450	350 01 0 00 120746'		AOS	1,MVNUM			; get correct error count 1..n
  8620	064451	200 00 0 00 000001 		MOVE	1
  8621	064452	037 00 0 00 115334 		TMSGC	<? >
  8622	064453	037 15 0 00 000000 		PNTDEC				; print it
  8623	064454	037 00 0 00 115335 		TMSG	<. CRAM verify errors:>
  8624	064455	037 00 0 00 115342 		TMSGC	<Addr    --- Correct ---       --- Actual ---      -- Discrepancy -->
  8625	064456	400 04 0 00 000000 		SETZ	4,			; pointer to error data
  8626	064457	200 00 0 04 064420 	MVPNT1:	MOVE	MWBADR(4)		; get address
  8627	064460	037 00 0 00 030242 		PCRL
  8628	064461	037 04 0 00 000000 		PNT4				; print it
  8629	064462	037 00 0 00 103540 		TMSG	< >
  8630	064463	200 02 0 04 064423 		MOVE	2,MWBLCO(4)		; get left half
  8631	064464	200 03 0 04 064431 		MOVE	3,MWBRCO(4)		; get right half
  8632	064465	260 17 0 00 064516 		GO	MVPNTW			; print it
  8633	064466	037 00 0 00 103540 		TMSG	< >
  8634	064467	200 02 0 04 064426 		MOVE	2,MWBLAC(4)		; get left half
  8635	064470	200 03 0 04 064434 		MOVE	3,MWBRAC(4)		; get right half
  8636	064471	260 17 0 00 064516 		GO	MVPNTW			; print it
  8637	064472	037 00 0 00 103540 		TMSG	< >
  8638	064473	200 02 0 04 064423 		MOVE	2,MWBLCO(4)		; get left half
  8639	064474	430 02 0 04 064426 		XOR	2,MWBLAC(4)		; xor actual data
  8640	064475	200 03 0 04 064431 		MOVE	3,MWBRCO(4)		; get right half
  8641	064476	430 03 0 04 064434 		XOR	3,MWBRAC(4)		; xor actual data
  8642	064477	260 17 0 00 064516 		GO	MVPNTW			; print it
  8643	064500	377 00 0 00 000001 		SOSG	1			; decrement error count - done?
  8644	064501	254 00 0 00 064506 		JRST	MVPNTX			; yes - exit
  8645	064502	350 00 0 00 000004 		AOS	4			; point to next word
  8646	064503	305 04 0 00 000003 		CAIGE	4,3			; 3 printed already?
  8647	064504	254 00 0 00 064457 		JRST	MVPNT1			; no - loop till done
  8648	064505	037 00 0 00 115324 		TMSGC	< ...>
  8649	064506	262 17 0 00 000006 	MVPNTX:	RGET	(6,5,4,3,2,1,0)		; yes - restore AC's
  8650
  8651	064515	263 17 0 00 000000 		RTN				; return
  8652
  8653	064516	242 03 0 00 000006 	MVPNTW:	LSH	3,^D6			; left justify the data
  8654	064517	246 02 0 00 000006 		LSHC	2,^D6			; left justify both words
  8655	064520	200 05 0 00 115360 		MOVE	5,[POINT 3,2]		; initial byte pointer
  8656	064521	201 06 0 00 000024 		MOVEI	6,^D20			; number of bytes to print
  8657	064522	134 00 0 00 000005 		ILDB	5			; get byte
  8658	064523	037 16 0 00 000003 		PNTOCS				; print it
  8659	064524	365 06 0 00 064522 		SOJGE	6,.-2			; loop till done
  8660	064525	263 17 0 00 000000 		RTN
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 199
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0374

  8661
  8662					;#********************************************************************
  8663					;* MLIST - List microcode of a test
  8664					;#********************************************************************
  8665
  8666	064526	261 17 0 00 000000 	MLIST:	RPUT	(0,1,2,3,4)		; save some AC's
  8667
  8668	064533	037 00 0 00 111637 		TMSGC	<ADDR/ JUMP PAR OUT MGC SOR FUN DES CC RAM PA PB SK BUS CRY CTL  TM SP MK>
  8669	064534	200 04 0 00 000001 		MOVE	4,1			; get address of table in AC4
  8670	064535	200 02 0 04 000000 	MLIST0:	MOVE	2,(4)			; get first word
  8671	064536	316 02 0 00 111025 		CAMN	2,[-1]			; end of list?
  8672	064537	254 00 0 00 064560 		JRST	MLISTX			; yes - exit
  8673	064540	200 03 0 04 000001 		MOVE	3,1(4)			; get second word
  8674
  8675					; Print this CRAM entry
  8676
  8677	064541	037 00 0 00 030242 		PCRL				; start a new line
  8678	064542	135 00 0 00 115330 		LDB	[POINT 12,2,11]		; get cram load address
  8679	064543	001 04 0 00 000000 		PNTOCC	4,0			; print it
  8680	064544	037 00 0 00 111633 		TMSG	</ >
  8681	064545	200 01 0 00 000003 		MOVE	1,3			; get word 2 (it has 'bad parity' flag)
  8682	064546	135 02 0 00 115361 		LDB	2,[POINT 24,2,35]	; get CRAM bits 0-23
  8683	064547	246 02 0 00 000006 		LSHC	2,6			; now get bits 0-30 in AC2 (left half)
  8684	064550	242 03 0 00 777772 		LSH	3,-6			; right justify AC3 (right half)
  8685	064551	622 03 0 00 000002 		TRZE	3,2			; bit 59 set?
  8686	064552	660 03 0 00 000001 		TRO	3,1			; yes - set rightmost bit
  8687	064553	260 17 0 00 042407 		GO	CALPAR			; calculate parity
  8688	064554	260 17 0 00 042271 		GO	PNTCRM			; print it
  8689
  8690					; Point to next microword / Exit if Altmode typed / Exit when done
  8691
  8692	064555	271 04 0 00 000002 		ADDI	4,2			; increment by 2
  8693	064556	336 00 0 00 120713'		SKIPN	ALTF			; altmode typed?
  8694	064557	254 00 0 00 064535 		JRST	MLIST0			; no - loop till done
  8695	064560	037 00 0 00 030242 	MLISTX:	PCRL
  8696	064561	262 17 0 00 000004 		RGET	(4,3,2,1,0)		; restore AC's
  8697
  8698	064566	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 200
DFCIA1	MAC	27-Oct-84 19:00		Microcode Handling Routines                                                        SEQ 0375

  8699
  8700					;#********************************************************************
  8701					;* TLOAD - Load microcode/verify it for a test
  8702					;
  8703					; Arguments:	AC1 - Contains address where microcode starts
  8704					;
  8705					; Function:	Issue a port clear to the port to ensure it is stopped.
  8706					;		Then call MLOADN to load the microcode, then call MVERFY
  8707					;		to verify it.  Abort on any error.
  8708					;
  8709					; Returns:	+1 - Error occurred loading/verifying microcode
  8710					;		+2 - Ok
  8711					;#********************************************************************
  8712
  8713	064567	332 00 0 00 120737'	TLOAD:	SKIPE	LDEBUG			; ucode load debug switch set?
  8714	064570	254 00 0 00 064577 		JRST	TLOADX			; yes - don't load ucode
  8715	064571	316 01 0 00 121005'		CAMN	1,TSLOAD		; already loaded?
  8716	064572	254 00 0 00 064577 		JRST	TLOADX			; yes - don't load ucode
  8717
  8718	064573	260 17 0 00 043032*		GO	IPACLR			; do a 'port clear'
  8719	064574	260 17 0 00 064254 		GO	MLOADN			; load it
  8720	064575	254 00 0 00 064601 		 JRST	TLOADE			; failed
  8721	064576	202 01 0 00 121005'		MOVEM	1,TSLOAD		; save microcode address
  8722	064577	350 00 0 17 000000 	TLOADX:	AOS	(P)			; set up RTN +2
  8723	064600	263 17 0 00 000000 		RTN				; exit
  8724
  8725	064601	474 15 0 00 000000 	TLOADE:	SETO	ERFLG,			; set error flag
  8726	064602	027 00 0 00 064610 		SCOPER	TLERR			; print error message
  8727	064603	255 00 0 00 000000 		JFCL				; don't allow test looping
  8728	064604	255 00 0 00 000000 		JFCL				; ignore altmode
  8729	064605	332 00 0 00 120741'		SKIPE	MDEBUG			; error message debug switch set?
  8730	064606	350 00 0 17 000000 		AOS	(P)			; yes - skip this error
  8731	064607	263 17 0 00 000000 		RTN				; exit
  8732
  8733	064610	160000	115362		TLERR:	MSG!TXALL![ASCIZ /Error loading test microcode - test aborted./]
  8734	064611	270000	064437			LAST!CALL!TXALL!MVPNT		; print verify errors
  8735
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 201
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0376

  8736						SUBTTL	CI Initialization Routines
  8737
  8738					;#********************************************************************
  8739					;* TPCB - Set up initial PCB
  8740					;#********************************************************************
  8741
  8742	064612	261 17 0 00 000000 	TPCB:	RPUT	(0,1,2,3,4)		; save AC's
  8743
  8744	064617	260 17 0 00 064303*		GO	ISTOP			; stop the port
  8745
  8746					; Initialize the PCB
  8747
  8748	064620	200 00 0 00 115373 	TPCB0:	MOVE	[IPCB,,PCB]		; build a BLT pointer
  8749	064621	251 00 0 00 070046 		BLT	PCB+^D38		; transfer the data
  8750	064622	332 00 0 00 030037 		SKIPE	USER			; user mode?
  8751	064623	402 00 0 00 070043 		SETZM	PCBPI			; yes - clear PI word
  8752
  8753					; Set up the message free queue
  8754
  8755	064624	402 00 0 00 071447 		SETZM	MGSTAR			; clear first word
  8756	064625	200 00 0 00 115374 		MOVE	[MGSTAR,,MGSTAR+1]	; build a BLT pointer
  8757	064626	251 00 0 00 073446 		BLT	MGEND			; clear the buffer
  8758	064627	120 00 0 00 115375 		DMOVE	[EXP QFMG2,MFREE]	; get 1st entry
  8759	064630	124 00 0 00 071447 		DMOVEM	QFMG1			; set it up
  8760	064631	120 00 0 00 115377 		DMOVE	[EXP QFMG3,QFMG1]	; get 2nd entry
  8761	064632	124 00 0 00 072047 		DMOVEM	QFMG2			; set it up
  8762	064633	120 00 0 00 115401 		DMOVE	[EXP QFMG4,QFMG2]	; get 3rd entry
  8763	064634	124 00 0 00 072447 		DMOVEM	QFMG3			; set it up
  8764	064635	120 00 0 00 115376 		DMOVE	[EXP MFREE,QFMG3]	; get 4th entry
  8765	064636	124 00 0 00 073047 		DMOVEM	QFMG4			; set it up
  8766
  8767					; Set up the datagram free queue
  8768
  8769	064637	402 00 0 00 073447 		SETZM	DGSTAR			; clear first word
  8770	064640	200 00 0 00 115403 		MOVE	[DGSTAR,,DGSTAR+1]	; build a BLT pointer
  8771	064641	251 00 0 00 100446 		BLT	DGEND			; clear the buffer
  8772	064642	120 00 0 00 115404 		DMOVE	[EXP QFDG2,DFREE]	; get 1st entry
  8773	064643	124 00 0 00 073447 		DMOVEM	QFDG1			; set it up
  8774	064644	120 00 0 00 115406 		DMOVE	[EXP QFDG3,QFDG1]	; get 2nd entry
  8775	064645	124 00 0 00 074047 		DMOVEM	QFDG2			; set it up
  8776	064646	120 00 0 00 115410 		DMOVE	[EXP QFDG4,QFDG2]	; get 3rd entry
  8777	064647	124 00 0 00 074447 		DMOVEM	QFDG3			; set it up
  8778	064650	120 00 0 00 115412 		DMOVE	[EXP QFDG5,QFDG3]	; get 4th entry
  8779	064651	124 00 0 00 075047 		DMOVEM	QFDG4			; set it up
  8780	064652	120 00 0 00 115414 		DMOVE	[EXP QFDG6,QFDG4]	; get 5th entry
  8781	064653	124 00 0 00 075447 		DMOVEM	QFDG5			; set it up
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 202
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0377

  8782	064654	120 00 0 00 115416 		DMOVE	[EXP QFDG7,QFDG5]	; get 6th entry
  8783	064655	124 00 0 00 076047 		DMOVEM	QFDG6			; set it up
  8784	064656	120 00 0 00 115420 		DMOVE	[EXP QFDG10,QFDG6]	; get 7th entry
  8785	064657	124 00 0 00 076447 		DMOVEM	QFDG7			; set it up
  8786	064660	120 00 0 00 115422 		DMOVE	[EXP QFDG11,QFDG7]	; get 8th entry
  8787	064661	124 00 0 00 077047 		DMOVEM	QFDG10			; set it up
  8788	064662	120 00 0 00 115424 		DMOVE	[EXP QFDG12,QFDG10]	; get 9th entry
  8789	064663	124 00 0 00 077447 		DMOVEM	QFDG11			; set it up
  8790	064664	120 00 0 00 115426 		DMOVE	[EXP DFREE,QFDG11]	; get 10th entry
  8791	064665	124 00 0 00 100047 		DMOVEM	QFDG12			; set it up
  8792
  8793					; Next convert all of the virtual addresses to physical
  8794
  8795	064666	474 03 0 00 000000 		SETO	3,			; initialize pointer to list
  8796	064667	350 00 0 00 000003 	TPCB1:	AOS	3			; point to next address
  8797	064670	336 01 0 03 064774 		SKIPN	1,ADRVIR(3)		; done yet?
  8798	064671	254 00 0 00 064677 		JRST	TPCB2			; yes - continue
  8799	064672	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  8800	064673	257 01 0 01 000000 		MAP	1,(1)			; no - map to physical
  8801	064674	621 01 0 00 777000 		TLZ	1,777000		; get rid of extraneous bits
  8802	064675	202 01 0 03 065023 		MOVEM	1,ADRPHY(3)		; save physical address
  8803	064676	254 00 0 00 064667 		JRST	TPCB1			; loop till done
  8804
  8805					; Finally, ensure that each address in all of the queues is indeed
  8806					; a physical address
  8807
  8808	064677	474 03 0 00 000000 	TPCB2:	SETO	3,			; initialize address pointer
  8809	064700	350 00 0 00 000003 	TPCB3:	AOS	3			; point to next address
  8810	064701	336 02 0 03 064717 		SKIPN	2,ADRQUE(3)		; get location of address - zero?
  8811	064702	254 00 0 00 064711 		JRST	TPCBX			; yes - exit
  8812	064703	200 01 0 02 000000 		MOVE	1,(2)			; get address in that location
  8813	064704	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  8814	064705	257 01 0 01 000000 		MAP	1,(1)			; no - map to physical
  8815	064706	621 01 0 00 777000 		TLZ	1,777000		; get rid of extraneous bits
  8816	064707	202 01 0 02 000000 		MOVEM	1,(2)			; save physical address
  8817	064710	254 00 0 00 064700 		JRST	TPCB3			; loop till done
  8818
  8819					; Done - exit
  8820
  8821	064711	262 17 0 00 000004 	TPCBX:	RGET	(4,3,2,1,0)		; restore AC's
  8822
  8823	064716	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 203
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0378

  8824
  8825					; Table of locations, the contents of which contain virtual
  8826					; addresses, which must be translated to physical
  8827
  8828	064717	000000	070000		ADRQUE:	EXP	PCB,PCB+5,PCB+6,PCB+10,PCB+11,PCB+13,PCB+14
  8829	064720	000000	070005
  8830	064721	000000	070006
  8831	064722	000000	070010
  8832	064723	000000	070011
  8833	064724	000000	070013
  8834	064725	000000	070014
  8835	064726	000000	070016			EXP	PCB+16,PCB+17,PCB+21,PCB+22,PCB+24,PCB+25
  8836	064727	000000	070017
  8837	064730	000000	070021
  8838	064731	000000	070022
  8839	064732	000000	070024
  8840	064733	000000	070025
  8841	064734	000000	070027			EXP	PCB+27,PCB+30,PCB+42
  8842	064735	000000	070030
  8843	064736	000000	070042
  8844	064737	000000	071447			EXP	QFMG1,QFMG1+1,QFMG2,QFMG2+1,QFMG3,QFMG3+1,QFMG4,QFMG4+1
  8845	064740	000000	071450
  8846	064741	000000	072047
  8847	064742	000000	072050
  8848	064743	000000	072447
  8849	064744	000000	072450
  8850	064745	000000	073047
  8851	064746	000000	073050
  8852	064747	000000	073447			EXP	QFDG1,QFDG1+1,QFDG2,QFDG2+1,QFDG3,QFDG3+1,QFDG4,QFDG4+1
  8853	064750	000000	073450
  8854	064751	000000	074047
  8855	064752	000000	074050
  8856	064753	000000	074447
  8857	064754	000000	074450
  8858	064755	000000	075047
  8859	064756	000000	075050
  8860	064757	000000	075447			EXP	QFDG5,QFDG5+1,QFDG6,QFDG6+1,QFDG7,QFDG7+1,QFDG10,QFDG10+1
  8861	064760	000000	075450
  8862	064761	000000	076047
  8863	064762	000000	076050
  8864	064763	000000	076447
  8865	064764	000000	076450
  8866	064765	000000	077047
  8867	064766	000000	077050
  8868	064767	000000	077447			EXP	QFDG11,QFDG11+1,QFDG12,QFDG12+1
  8869	064770	000000	077450
  8870	064771	000000	100047
  8871	064772	000000	100050
  8872	064773	000000	000000			0
  8873
  8874					; Table of virtual addresses
  8875
  8876	064774	000000	070000		ADRVIR:	EXP	PCB,PCB+5,PCB+10,PCB+13,PCB+16,PCB+21,MFREE,DFREE
  8877	064775	000000	070005
  8878	064776	000000	070010
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 203-1
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0379

  8879	064777	000000	070013
  8880	065000	000000	070016
  8881	065001	000000	070021
  8882	065002	000000	070024
  8883	065003	000000	070027
  8884	065004	000000	071447			EXP	QFMG1,QFMG2,QFMG3,QFMG4,QFDG1,QFDG2,QFDG3
  8885	065005	000000	072047
  8886	065006	000000	072447
  8887	065007	000000	073047
  8888	065010	000000	073447
  8889	065011	000000	074047
  8890	065012	000000	074447
  8891	065013	000000	075047			EXP	QFDG4,QFDG5,QFDG6,QFDG7,QFDG10,QFDG11,QFDG12
  8892	065014	000000	075447
  8893	065015	000000	076047
  8894	065016	000000	076447
  8895	065017	000000	077047
  8896	065020	000000	077447
  8897	065021	000000	100047
  8898	065022	000000	000000			0
  8899
  8900					; Table of physical addresses
  8901
  8902	065023	000000	070000		ADRPHY:	EXP	PCB,PCB+5,PCB+10,PCB+13,PCB+16,PCB+21,MFREE,DFREE
  8903	065024	000000	070005
  8904	065025	000000	070010
  8905	065026	000000	070013
  8906	065027	000000	070016
  8907	065030	000000	070021
  8908	065031	000000	070024
  8909	065032	000000	070027
  8910	065033	000000	071447			EXP	QFMG1,QFMG2,QFMG3,QFMG4,QFDG1,QFDG2,QFDG3
  8911	065034	000000	072047
  8912	065035	000000	072447
  8913	065036	000000	073047
  8914	065037	000000	073447
  8915	065040	000000	074047
  8916	065041	000000	074447
  8917	065042	000000	075047			EXP	QFDG4,QFDG5,QFDG6,QFDG7,QFDG10,QFDG11,QFDG12
  8918	065043	000000	075447
  8919	065044	000000	076047
  8920	065045	000000	076447
  8921	065046	000000	077047
  8922	065047	000000	077447
  8923	065050	000000	100047
  8924	065051	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 204
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0380

  8925
  8926					;#********************************************************************
  8927					;* TIDLE - Start the port and wait for IDLE bit to set in CSR
  8928					;
  8929					; Return:  +1 - Error - never reached idle loop
  8930					;	   +2 - Succeeded
  8931					;#********************************************************************
  8932
  8933	065052	261 17 0 00 000000 	TIDLE:	RPUT	(0,1,2)			; save AC's
  8934
  8935	065055	260 17 0 00 064573*		GO	IPACLR			; clear port
  8936
  8937					; Set up initial CCW list
  8938
  8939	065056	260 17 0 00 034101*		GO	CHINIT			; initialize software
  8940
  8941					; Start it up
  8942
  8943	065057	400 01 0 00 000000 		SETZ	1,			; clear data
  8944	065060	260 17 0 00 064354*		GO	LDRAR			; clear RAR contents
  8945	065061	201 01 0 00 000010 		MOVEI	1,MPRUN			; get 'MPRun' bit
  8946	065062	336 00 0 00 030037 		SKIPN	USER			; user mode?
  8947	065063	660 01 0 00 000004 		TRO	1,4			; no - set PIA bits
  8948	065064	260 17 0 00 043663*		GO	LDCSR			; start up the port
  8949	065065	005 00 0 00 000144 		DELAY	^D100			; wait 100 milliseconds
  8950	065066	260 17 0 00 042773*		GO	RDCSR			; read CSR register
  8951	065067	254 00 0 00 065072 		JRST	TIDLEE			; error - exit
  8952	065070	602 01 0 00 000010 		TRNE	1,MPRUN			; still running?
  8953	065071	350 00 0 17 777775 		AOS	-3(P)			; yes - set up proper return
  8954	065072	262 17 0 00 000002 	TIDLEE:	RGET	(2,1,0)			; restore AC's
  8955
  8956	065075	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 205
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0381

  8957
  8958					;#********************************************************************
  8959					;* RDNODE - Read our node number
  8960					;
  8961					; Arguments:	None
  8962					;
  8963					; Returns:	+1 - Failed
  8964					;		+2 - Succeeded, AC1 contains node number
  8965					;#********************************************************************
  8966
  8967	065076	261 17 0 00 000000 	RDNODE:	RPUT	(0,2,3)			; save AC's
  8968
  8969
  8970					; Save CRAM locations
  8971
  8972	065101	200 01 0 00 115430 		MOVE	1,[-^D8,,7750]		; set up AOBJN word
  8973	065102	260 17 0 00 042566 		GO	SAVCRM			; save the CRAM locations
  8974
  8975					; Now load microcode and start the port
  8976
  8977	065103	201 01 0 00 065133 		MOVEI	1,RDMIC			; set up microcode address
  8978	065104	260 17 0 00 064254 		GO	MLOADN			; load/verify it
  8979	065105	254 00 0 00 065127 		JRST	RDNODX			; ignore error
  8980	065106	201 01 0 00 007750 		MOVEI	1,7750			; get start address
  8981	065107	242 01 0 00 000001 		LSH	1,1			; position correctly
  8982	065110	260 17 0 00 065060*		GO	LDRAR			; load the register
  8983	065111	201 01 0 00 000010 		MOVEI	1,MPRUN			; no - set initial data
  8984	065112	260 17 0 00 065064*		GO	LDCSR
  8985
  8986					; Wait a bit and read node address
  8987
  8988	065113	005 00 0 00 000001 		DELAY	1			; wait 1 millisecond
  8989	065114	201 01 0 00 200000 		MOVEI	1,TSTEBF		; set up to read EBUF
  8990	065115	260 17 0 00 065112*		GO	LDCSR			; stop the port
  8991	065116	260 17 0 00 040244*		GO	RDEBUF			; read EBUF
  8992	065117	405 01 0 00 000377 		ANDI	1,377			; mask out unused bits
  8993	065120	202 01 0 00 034013 		MOVEM	1,CPORT			; save our port number
  8994	065121	335 00 0 00 034012 		SKIPGE	SPORT			; our port number initialized yet?
  8995	065122	202 01 0 00 034012 		MOVEM	1,SPORT			; no - initialize it for SET cmd
  8996
  8997					; Restore CRAM locations and exit
  8998
  8999	065123	200 01 0 00 115430 		MOVE	1,[-^D8,,7750]		; set up AOBJN word
  9000	065124	260 17 0 00 042610 		GO	RESCRM			; restore CRAM data
  9001
  9002					; Exit
  9003
  9004	065125	350 00 0 17 777775 		AOS	-3(P)			; set up proper return
  9005	065126	200 01 0 00 034013 		MOVE	1,CPORT			; get port number
  9006	065127	262 17 0 00 000003 	RDNODX:	RGET	(3,2,0)			; restore AC's
  9007
  9008	065132	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 206
DFCIA1	MAC	27-Oct-84 19:00		CI Initialization Routines                                                         SEQ 0382

  9009
  9010					;#********************************************************************
  9011					; RDMIC - Read node address register
  9012					;#********************************************************************
  9013
  9014					;	Select maintenance mode
  9015
  9016	065133	775077	510214		RDMIC:	MWORD	<ADDR=7750,JMAP,J=7751,SD0,OR,D=2,SKCN,MGC=214>	; 7750
  9017	065134	732000	240040
  9018	065135	775100	002040			MWORD	<CONT,S0A,OR,D=1,OENA,SELM,MGC=40>		; 7751
  9019	065136	431000	002340
  9020	065137	775200	070274			MWORD	<LDCT,J=7,SELP,MGC=274>				; 7752
  9021	065140	000000	001300
  9022	065141	775377	530000			MWORD	<RPCT,J=7753,S0A,AND,D=2>			; 7753
  9023	065142	442000	000220
  9024
  9025					;	Read node address
  9026
  9027	065143	775400	000332			MWORD	<CONT,S0B,AND,D=2,SELP,MGC=332>			; 7754
  9028	065144	342000	001340
  9029	065145	775500	000300			MWORD	<CONT,SD0,OR,D=2,SELM,MGC=300>			; 7755
  9030	065146	732000	002340
  9031	065147	775600	002004			MWORD	<CONT,S0A,OR,D=1,OENA,SELE,MGC=4>		; 7756
  9032	065150	431000	005340
  9033	065151	775777	570000			MWORD	<JMAP,J=7757>					; 7757
  9034	065152	000000	000040
  9035	065153	777777	777777			-1
  9036
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 207
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0383

  9037						SUBTTL	Packet Handling Routines
  9038
  9039					;#********************************************************************
  9040					; Routines for building packets, etc:
  9041					;
  9042					; BPACK - Build a packet
  9043					;   ITEXT - get text length + text
  9044					;   ICRC - get text len + text + CRC
  9045					;   IREGW - Set up to write a register
  9046					;   IREGR - Set up to read a register
  9047					;
  9048					; RWAIT - Wait for a response (by CSR bit 'RspQAvail' bit being set.
  9049					; INSQUE - Insert a packet into a queue
  9050					; CHKRSP - Check if a response queue entry
  9051					;   CHKINT - Check/set up interlock for queue
  9052					;   CONVIR - Convert physical address to virtual
  9053					;   GETQUE - Remove a queue entry from the beginning of a queue
  9054					;   SHUTRQ - Turn off RESQAV bit in CSR register
  9055					;
  9056					; Arguments:	OP - Contains the op code
  9057					;		TFMFLG - Format flag (0-COMPAT,1-HIDEN)
  9058					;		TRSFLG - Response packet is requested flag (0-no,1-yes)
  9059					;		TPTFLG - Path select flag (0-Auto,1-Path1,2-Path2)
  9060					;		TXCTID - Contains the transaction ID to use
  9061					;		TDPORT - Destination port
  9062					;		TBYTE -  Length of text portion (in bytes)
  9063					;		TPAT -   Data pattern
  9064					;		TREGN -  Register number (to read or write)
  9065					;		TREGD -  Register data (read or written)
  9066					;#********************************************************************
  9067
  9068	065154	000000	000000		TFMFLG:	0			; format flag (0-COMPAT,1-HIDEN)
  9069	065155	000000	000000		TRSFLG:	0			; response packet requested flag (0-no,1-yes)
  9070	065156	000000	000000		TPTFLG:	0			; path select flag (0-Auto,1-Path1,2-Path2)
  9071	065157	000000	000000		TXCTID:	0			; contains the transaction ID to use
  9072	065160	000000	000000			0
  9073	065161	000000	000000		TDPORT:	0			; destination port
  9074	065162	000000	000000		TBYTE:	0			; length of text portion (in bytes)
  9075	065163	000000	000000		TWORD:	0			; calculated text length (in words)
  9076	065164	000000	000000		TPAT:	0			; data pattern
  9077	065165	000000	000000		TREGN:	0			; register number (to read or write)
  9078	065166	000000	000000		TREGD:	0			; register data (read or written)
  9079	065167	000000	000000		TREGDC:	0			; register data correct
  9080	065170	000000	000000		TREGDA:	0			; register data actual
  9081	065171	000000	000000		TREGCF:	0			; data compare flag (0-no,1-yes)
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 208
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0384

  9082
  9083					;#********************************************************************
  9084					;* BPACK - Build a packet
  9085					;#********************************************************************
  9086
  9087	065172	476 00 0 00 120735'	BPACKN:	SETOM	INHCRC#			; set 'inhibit CRC calc' flag
  9088	065173	334 00 0 00 000000 		SKIPA				; continue
  9089	065174	402 00 0 00 120735'	BPACK:	SETZM	INHCRC			; clear 'inhibit CRC calc' flag
  9090	065175	261 17 0 00 000000 		RPUT	(0,1,2)			; save AC's
  9091
  9092
  9093					; Initialize packet to 0's
  9094
  9095	065200	402 00 0 00 070047 		SETZM	PACKET			; clear first word
  9096	065201	200 00 0 00 115431 		MOVE	[PACKET,,PACKET+1]	; build BLT pointer
  9097	065202	251 00 0 00 070446 		BLT	PACKET+^D255		; clear the packet buffer
  9098
  9099					; Get flags/put in packet
  9100
  9101	065203	400 01 0 00 000000 		SETZ	1,			; initialize flags
  9102	065204	332 00 0 00 065154 		SKIPE	TFMFLG			; HIDEN format?
  9103	065205	661 01 0 00 001000 		TLO	1,1000			; yes - set HIDEN flag
  9104	065206	200 00 0 00 065156 		MOVE	TPTFLG			; get path select bits
  9105	065207	137 00 0 00 115432 		DPB	[POINT 2,1,14]		; save them
  9106	065210	332 00 0 00 065155 		SKIPE	TRSFLG			; always generate response?
  9107	065211	661 01 0 00 000004 		TLO	1,4			; yes - set response flag
  9108	065212	436 01 0 00 070052 		IORM	1,PACKET+3		; store in packet
  9109
  9110					; Get destination port/put in packet
  9111
  9112	065213	200 00 0 00 065161 		MOVE	TDPORT			; get port number
  9113	065214	242 00 0 00 000004 		LSH	4			; position properly
  9114	065215	436 00 0 00 070052 		IORM	PACKET+3		; save in packet
  9115
  9116					; Get transaction ID/put in packet
  9117
  9118	065216	201 02 0 00 070053 		MOVEI	2,PACKET+4		; get address of XCTID in packet
  9119	065217	306 11 0 00 000007 		CAIN	OP,SNDSTR		; SNDSTRT packet?
  9120	065220	350 00 0 00 000002 		AOS	2			; yes - XCTID goes in next word
  9121	065221	200 01 0 00 065157 		MOVE	1,TXCTID		; get word 1
  9122	065222	202 01 0 02 000000 		MOVEM	1,(2)			; save it
  9123	065223	200 01 0 00 065160 		MOVE	1,TXCTID+1		; get word 2
  9124	065224	202 01 0 02 000001 		MOVEM	1,1(2)			; save it
  9125
  9126					; Insert op code
  9127	
  9128	065225	260 17 0 00 067212 		GO	DECOPC			; decode opcode
  9129	065226	201 01 0 00 000040 		MOVEI	1,40			; error - use offset of 40
  9130	065227	137 11 0 00 114435 		DPB	OP,[POINT 8,PACKET+3,23]; insert op code
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 209
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0385

  9131
  9132					; Get miscellaneous data
  9133
  9134						XCT	[GO	ITEXT		; 0-SNDDG - get text length + text
  9135							 GO	ITEXT		; 1-SNDMSG - get text length + text
  9136							 JFCL			; 2-REQID
  9137							 JFCL			; 3-SNDRST
  9138							 JFCL			; 4-SDNSTRT
  9139							 JFCL			; 5-REQDAT0
  9140							 JFCL			; 6-REQDAT1
  9141							 JFCL			; 7-REQDAT2
  9142							 GO	ICRC		; 10-SNDLB - get text len + text + CRC
  9143							 JFCL			; 11-REQMDAT
  9144							 JFCL			; 12-SNDDAT
  9145							 JFCL			; 13-RETDAT
  9146							 JFCL			; 14-SNTMDAT
  9147							 JFCL			; 15-CLSBUF
  9148							 JFCL			; 16-SETCKT
  9149							 JFCL			; 17-SETCNT
  9150							 JFCL			; 20-RDCNT
  9151							 GO	IREGR		; 21-RDREG - get register
  9152							 GO	IREGW		; 22-WRREG - get register/data
  9153							 JFCL			; 23
  9154							 JFCL			; 24
  9155							 JFCL			; 25
  9156							 JFCL			; 26
  9157							 JFCL			; 27
  9158							 JFCL			; 30
  9159							 JFCL			; 31
  9160							 JFCL			; 32
  9161							 JFCL			; 33
  9162							 JFCL			; 34
  9163							 JFCL			; 35
  9164							 JFCL			; 36
  9165							 JFCL			; 37
  9166	065230	256 00 0 01 115433 			 JFCL](1)		; 40
  9167	065231	262 17 0 00 000002 		RGET	(2,1,0)			; restore AC's
  9168
  9169	065234	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 210
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0386

  9170
  9171					;#********************************************************************
  9172					;* ITEXT - get text length + text
  9173					;
  9174					; The text length is given either as byte count (in TBYTE) or as a
  9175					; word count (in TWORD).  The one not given is calculated based on
  9176					; packet format.
  9177					;#********************************************************************
  9178
  9179	065235	261 17 0 00 000000 	ITEXT:	RPUT	(0,1,2,3)		; save AC's
  9180
  9181	065241	332 00 0 00 065162 		SKIPE	TBYTE			; byte count given?
  9182	065242	254 00 0 00 065252 		JRST	ITEXT0			; yes - continue
  9183	065243	200 00 0 00 065163 		MOVE	TWORD			; no - get word count
  9184	065244	242 00 0 00 000002 		LSH	2			; multiply by 4
  9185	065245	332 00 0 00 065154 		SKIPE	TFMFLG			; HIDEN format?
  9186						GO	[LSH	-3		; divide by 8
  9187							 IMULI	9		; multiply by 9
  9188	065246	260 17 0 00 115474 			 RTN]
  9189	065247	202 00 0 00 065162 		MOVEM	TBYTE			; save byte count
  9190	065250	200 00 0 00 065163 		MOVE	TWORD			; get word count
  9191	065251	254 00 0 00 065260 		JRST	ITEXT1			; continue
  9192	065252	200 00 0 00 065162 	ITEXT0:	MOVE	TBYTE			; get length in bytes
  9193	065253	332 00 0 00 065154 		SKIPE	TFMFLG			; HIDEN format?
  9194						JRST	[LSH	1		; yes - multiply by 2 and
  9195							 IDIVI	9		;   divide by 9 to calculate
  9196							 SKIPE	1		;   word count - and ensure
  9197							 AOS			;   that it is an even number
  9198							 TRZ	1		;   of words
  9199	065254	254 00 0 00 115477 			 JRST	ITEXT1]
  9200	065255	231 00 0 00 000004 		IDIVI	4			; COMPAT - calculate word count
  9201	065256	332 00 0 00 000001 		SKIPE	1			; remainder?
  9202	065257	350 00 0 00 000000 		AOS				; yes - increment word count
  9203	065260	303 00 0 00 000372 	ITEXT1:	CAILE	^D250			; word count in proper range?
  9204	065261	201 00 0 00 000372 		MOVEI	^D250			; no - limit to maximum length
  9205	065262	302 11 0 00 000015 		CAIE	OP,SNDLB		; loopback packet?
  9206	065263	254 00 0 00 065266 		JRST	ITEXT2			; no - continue
  9207	065264	303 00 0 00 000370 		CAILE	^D248			; yes - maximum is 248 words - over?
  9208	065265	201 00 0 00 000370 		MOVEI	^D248			; yes - limit to maximum length
  9209	065266	202 00 0 00 065163 	ITEXT2:	MOVEM	TWORD			; save word count
  9210	065267	200 14 0 00 065164 		MOVE	PAT,TPAT		; get data pattern
  9211	065270	200 02 0 00 065163 		MOVE	2,TWORD			; word length
  9212	065271	201 03 0 00 070054 		MOVEI	3,PACKET+5		; buffer address
  9213	065272	260 17 0 00 000000*		GO	BUFGEN			; generate buffer contents
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 211
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0387

  9214	065273	332 00 0 00 065154 		SKIPE	TFMFLG			; HIDEN format?
  9215						JRST	[LSH	2,-1		; yes - calculate byte count
  9216							 IMULI	2,9
  9217	065274	254 00 0 00 115505 			 JRST	ITEXT3]
  9218	065275	221 02 0 00 000004 		IMULI	2,4			; no - calculate byte count
  9219	065276	202 02 0 00 070053 	ITEXT3:	MOVEM	2,PACKET+4		; save in packet
  9220	065277	202 02 0 00 065162 		MOVEM	2,TBYTE			; save byte count
  9221	065300	306 11 0 00 000001 		CAIN	OP,1			; datagram?
  9222						GO	[MOVE	1,TWORD		; yes - eliminate unused portion
  9223							 MOVE	2,PACKET+4(1)	;   of last word
  9224							 AND	2,[777774,,0]
  9225							 MOVEM	2,PACKET+4(1)
  9226	065301	260 17 0 00 115511 			 RTN]
  9227
  9228					; Exit after testing for additional routine
  9229
  9230	065302	332 00 0 00 121011'		SKIPE	TXADDL			; routine specified for addl data?
  9231	065303	260 17 1 00 121011'		GO	@TXADDL			; yes - call it
  9232	065304	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
  9233
  9234	065310	263 17 0 00 000000 		RTN				; return
  9235
  9236
  9237					;#********************************************************************
  9238					;* ICRC - get text len + text + CRC
  9239					;#********************************************************************
  9240
  9241	065311	402 00 0 00 000000*	ICRC:	SETZM	CRCSAV			; clear saved CRC data
  9242	065312	476 00 0 00 000000*		SETOM	CRCOFF			; init CRC table offset
  9243	065313	260 17 0 00 065235 		GO	ITEXT			; set up data, etc.
  9244	065314	332 00 0 00 120735'		SKIPE	INHCRC			; inhibit CRC calculation?
  9245	065315	263 17 0 00 000000 		RTN				; yes - return
  9246	065316	261 17 0 00 000001 		RPUT	(1,2,3,4,5,6,7,10)	; no - save AC's
  9247
  9248	065326	332 04 0 00 065311*		SKIPE	4,CRCSAV		; get precalculated CRC - valid?
  9249						JRST	[MOVEI	1,PACKET+5	; yes - save it and exit
  9250							 ADD	1,TWORD
  9251							 MOVEM	4,(1)
  9252	065327	254 00 0 00 115516 			 JRST	ICRCY]
  9253
  9254					; Calculate CRC of header bytes
  9255
  9256	065330	474 04 0 00 000000 		SETO	4,			; initial CRC value
  9257	065331	200 07 0 00 065162 		MOVE	7,TBYTE			; calculate total packet
  9258	065332	271 07 0 00 000007 		ADDI	7,7			;   length
  9259	065333	135 02 0 00 115522 		LDB	2,[POINT 8,7,27]	; get 'Packet Type/Length'
  9260	065334	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9261	065335	135 02 0 00 115523 		LDB	2,[POINT 8,7,35]	; get 'Packet Length'
  9262	065336	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9263	065337	200 02 0 00 070052 		MOVE	2,PACKET+3		; get status word
  9264	065340	135 02 0 00 115524 		LDB	2,[POINT 8,2,31]	; get 'Destination (True)'
  9265	065341	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 212
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0388

  9266	065342	200 02 0 00 070052 		MOVE	2,PACKET+3		; get status word
  9267	065343	135 02 0 00 115524 		LDB	2,[POINT 8,2,31]	; get 'Destination (True)'
  9268	065344	431 02 0 00 000377 		XORI	2,377			; get 'Destination (Complement)'
  9269	065345	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9270	065346	200 02 0 00 034013 		MOVE	2,CPORT			; get 'Source'
  9271	065347	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9272	065350	200 02 0 00 000011 		MOVE	2,OP			; get op code
  9273	065351	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9274	065352	200 02 0 00 070052 		MOVE	2,PACKET+3		; get status word
  9275	065353	135 02 0 00 115525 		LDB	2,[POINT 8,2,15]	; get flags byte
  9276	065354	405 02 0 00 000200 		ANDI	2,200			; keep only the packing format bit
  9277	065355	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9278
  9279					; Calculate CRC of the first 2 text bytes (in the length word)
  9280					; (But only if this is a datagram)
  9281
  9282	065356	302 11 0 00 000001 		CAIE	OP,DGSNT		; datagram?
  9283	065357	254 00 0 00 065364 		JRST	.+5			; no - continue
  9284	065360	400 02 0 00 000000 		SETZ	2,			; zero byte
  9285	065361	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9286	065362	400 02 0 00 000000 		SETZ	2,			; zero byte
  9287	065363	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9288
  9289					; Now calculate CRC of 'Body' depending on packet format
  9290
  9291	065364	201 06 0 00 070054 		MOVEI	6,PACKET+5		; get address of 1st word
  9292	065365	200 07 0 00 065163 		MOVE	7,TWORD			; get word count
  9293	065366	200 02 0 00 070052 		MOVE	2,PACKET+3		; get status word
  9294	065367	603 02 0 00 001000 		TLNE	2,1000			; HIDEN format?
  9295	065370	254 00 0 00 065411 		JRST	ICRC1			; yes - go handle it
  9296
  9297					; Loop through all the bytes (COMPAT mode)
  9298
  9299	065371	322 07 0 00 065451 	ICRC0:	JUMPE	7,ICRCX			; exit if already done
  9300	065372	200 10 0 06 000000 		MOVE	10,(6)			; get data word
  9301	065373	135 02 0 00 115526 		LDB	2,[POINT 8,10,7]	; get byte 1
  9302	065374	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9303	065375	135 02 0 00 115527 		LDB	2,[POINT 8,10,15]	; get byte 2
  9304	065376	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9305	065377	350 00 0 00 000006 		AOS	6			; point to next word
  9306	065400	306 11 0 00 000001 		CAIN	OP,DGSNT		; datagram?
  9307	065401	363 07 0 00 065451 		SOJLE	7,ICRCX			; decrement count - done? yes - exit
  9308	065402	135 02 0 00 115530 		LDB	2,[POINT 8,10,23]	; get byte 3
  9309	065403	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9310	065404	135 02 0 00 115531 		LDB	2,[POINT 8,10,31]	; get byte 4
  9311	065405	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9312	065406	302 11 0 00 000001 		CAIE	OP,DGSNT		; datagram?
  9313	065407	363 07 0 00 065451 		SOJLE	7,ICRCX			; decrement count - done? yes - exit
  9314	065410	254 00 0 00 065371 		JRST	ICRC0			; loop till done
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 213
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0389

  9315
  9316					; Loop through all the bytes (HIDEN mode)
  9317
  9318	065411	322 07 0 00 065451 	ICRC1:	JUMPE	7,ICRCX			; exit if already done
  9319	065412	200 10 0 06 000000 		MOVE	10,(6)			; get 1st data word
  9320	065413	135 02 0 00 115526 		LDB	2,[POINT 8,10,7]	; get byte 1
  9321	065414	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9322	065415	135 02 0 00 115527 		LDB	2,[POINT 8,10,15]	; get byte 2
  9323	065416	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9324	065417	135 02 0 00 115530 		LDB	2,[POINT 8,10,23]	; get byte 3
  9325	065420	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9326	065421	135 02 0 00 115531 		LDB	2,[POINT 8,10,31]	; get byte 4
  9327	065422	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9328	065423	135 02 0 00 115532 		LDB	2,[POINT 4,10,35]	; get byte 5 (1st half)
  9329	065424	242 02 0 00 000004 		LSH	2,4			; position properly
  9330	065425	350 00 0 00 000006 		AOS	6			; point to next word
  9331	065426	200 10 0 06 000000 		MOVE	10,(6)			; get 2nd data word
  9332	065427	370 00 0 00 000007 		SOS	7			; decrement word count
  9333	065430	135 00 0 00 115533 		LDB	[POINT 4,10,3]		; get byte 5 (2nd half)
  9334	065431	434 02 0 00 000000 		IOR	2,0			; include with 1st half
  9335	065432	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9336	065433	135 02 0 00 115534 		LDB	2,[POINT 8,10,11]	; get byte 6
  9337	065434	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9338	065435	135 02 0 00 115535 		LDB	2,[POINT 8,10,19]	; get byte 7
  9339	065436	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9340	065437	350 00 0 00 000006 		AOS	6			; point to next word
  9341	065440	306 11 0 00 000001 		CAIN	OP,DGSNT		; datagram?
  9342	065441	363 07 0 00 065451 		SOJLE	7,ICRCX			; decrement count - done? yes - exit
  9343	065442	135 02 0 00 115536 		LDB	2,[POINT 8,10,27]	; get byte 8
  9344	065443	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9345	065444	135 02 0 00 115537 		LDB	2,[POINT 8,10,35]	; get byte 9
  9346	065445	260 17 0 00 065470 		GO	CRCCAL			; calculate for this byte
  9347	065446	302 11 0 00 000001 		CAIE	OP,DGSNT		; datagram?
  9348	065447	363 07 0 00 065451 		SOJLE	7,ICRCX			; decrement count - done? yes - exit
  9349	065450	254 00 0 00 065411 		JRST	ICRC1			; loop till done
  9350
  9351					; Done - just do final XOR and save in text
  9352
  9353	065451	430 04 0 00 111025 	ICRCX:	XOR	4,[-1]			; final XOR
  9354	065452	260 17 0 00 065504 		GO	CRCFIX			; swap bits properly
  9355	065453	242 04 0 00 000004 		LSH	4,4			; position in bits 0-31
  9356	065454	202 04 0 06 000000 		MOVEM	4,(6)			; save in buffer
  9357	065455	331 01 0 00 065312*		SKIPL	1,CRCOFF		; get offset value
  9358	065456	202 04 0 01 000000*		MOVEM	4,CRCTAB(1)		; save CRC value
  9359	065457	262 17 0 00 000010 	ICRCY:	RGET	(10,7,6,5,4,3,2,1)	; restore AC's
  9360
  9361	065467	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 214
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0390

  9362
  9363					;#********************************************************************
  9364					;* CRCCAL - Calculate CRC (cumulative) for 8 bits
  9365					;
  9366					; Given:   AC2 - data byte	Uses:	AC1,AC3,AC5 without saving or
  9367					;	   AC4 - result			restoring.
  9368					;
  9369					; Returns: AC4 - updated result
  9370					;#********************************************************************
  9371
  9372	065470	201 01 0 00 000010 	CRCCAL:	MOVEI	1,8			; do this 8 times
  9373	065471	400 03 0 00 000000 		SETZ	3,			; clear AC3
  9374	065472	246 02 0 00 777777 	CRCCA0:	LSHC	2,-1			; get a bit (into AC3)
  9375	065473	135 05 0 00 115540 		LDB	5,[POINT 1,3,0]		; get data bit
  9376	065474	602 04 0 00 000001 		TRNE	4,1			; leftmost bit set?
  9377	065475	431 05 0 00 000001 		XORI	5,1			; yes - XOR with data bit
  9378	065476	242 04 0 00 777777 		LSH	4,-1			; right shift 1 bit
  9379	065477	332 00 0 00 000005 		SKIPE	5			; data bit result non-zero?
  9380	065500	430 04 0 00 115541 		XOR	4,[15556,,101440]	; yes - XOR 1's with CRC
  9381	065501	137 05 0 00 115542 		DPB	5,[POINT 1,4,4]		; also insert result bit
  9382	065502	367 01 0 00 065472 		SOJG	1,CRCCA0		; loop till done
  9383	065503	263 17 0 00 000000 		RTN				; return
  9384
  9385
  9386					;#********************************************************************
  9387					;* CRCFIX - Adjust properly
  9388					;#********************************************************************
  9389
  9390	065504	261 17 0 00 000002 	CRCFIX:	RPUT	(2,3)			; save AC's
  9391
  9392	065506	400 03 0 00 000000 		SETZ	3,			; clear result
  9393	065507	135 02 0 00 115543 		LDB	2,[POINT 8,4,11]	; get byte 1
  9394	065510	137 02 0 00 115544 		DPB	2,[POINT 8,3,35]	; save it
  9395	065511	135 02 0 00 115545 		LDB	2,[POINT 8,4,19]	; get byte 2
  9396	065512	137 02 0 00 115546 		DPB	2,[POINT 8,3,27]	; save it
  9397	065513	135 02 0 00 115547 		LDB	2,[POINT 8,4,27]	; get byte 3
  9398	065514	137 02 0 00 115550 		DPB	2,[POINT 8,3,19]	; save it
  9399	065515	135 02 0 00 115551 		LDB	2,[POINT 8,4,35]	; get byte 4
  9400	065516	137 02 0 00 114316 		DPB	2,[POINT 8,3,11]	; save it
  9401	065517	200 04 0 00 000003 		MOVE	4,3			; get into AC4
  9402	065520	262 17 0 00 000003 		RGET	(3,2)			; restore AC's
  9403
  9404	065522	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 215
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0391

  9405
  9406					;#********************************************************************
  9407					;* IREGR - Set up to read a register
  9408					;#********************************************************************
  9409
  9410	065523	261 17 0 00 000000 	IREGR:	RPUT	(0,1)			; save AC's
  9411
  9412	065525	332 00 0 00 103310 		SKIPE	PMODE			; normal test?
  9413	065526	254 00 0 00 065540 		JRST	IREGR1			; yes - continue
  9414	065527	476 00 0 00 040547*	IREGR0:	SETOM	ARGFLG			; initialize to accept arguments
  9415	065530	260 17 0 00 036032*		GO	CLRBUF			; clear input buffer
  9416	065531	037 01 0 00 115552 		FMSGC	<Register number? >
  9417						MOVN	1,[FMSGCD <Register number n, where n:
  9418					1-RdRSta  10-RdXSta
  9419					3-RdBuff  14-RdNode
  9420	065532	210 01 0 00 115577 	5-RdPRev>]
  9421	065533	260 17 0 00 041565*		GO	.OARG			; get argument
  9422						JRST	[GO	FIOFF		; error - shut off file input
  9423	065534	254 00 0 00 115600 			 JRST	IREGR0]		;   and exit
  9424						JRST	[GO	FIOFF		; missing argument - shut off file
  9425	065535	254 00 0 00 115602 			 JRST	IREGRX]		;   input and exit
  9426	065536	200 00 0 00 041767*		MOVE	ARGUM			; get argument
  9427	065537	202 00 0 00 065165 		MOVEM	TREGN			; save it
  9428	065540	200 00 0 00 065165 	IREGR1:	MOVE	TREGN			; get register number
  9429	065541	402 00 0 00 070053 		SETZM	PACKET+4		; clear word
  9430	065542	137 00 0 00 115604 		DPB	[POINT 8,PACKET+4,23]	; store in packet
  9431	065543	262 17 0 00 000001 	IREGRX:	RGET	(1,0)			; restore AC's
  9432
  9433	065545	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 216
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0392

  9434
  9435					;#********************************************************************
  9436					;* IREGW - Set up to write a register
  9437					;#********************************************************************
  9438
  9439	065546	261 17 0 00 000000 	IREGW:	RPUT	(0,1)			; save AC's
  9440
  9441	065550	332 00 0 00 103310 		SKIPE	PMODE			; normal test?
  9442	065551	254 00 0 00 065571 		JRST	IREGW1			; yes - continue
  9443	065552	476 00 0 00 065527*	IREGW0:	SETOM	ARGFLG			; initialize to accept arguments
  9444	065553	260 17 0 00 065530*		GO	CLRBUF			; clear input buffer
  9445	065554	037 01 0 00 115605 		FMSGC	<Register number,data? >
  9446						MOVE	1,[FMSGCD <Register n,data, where n:
  9447					2-RsXSta  11-AboXmt  16-Sync
  9448					4-EnaLnk  12-SetMod
  9449					6-SelBuf  13-Xmit
  9450	065555	200 01 0 00 115643 	7-LdXBuf  15-DsaLnk>]
  9451	065556	260 17 0 00 065533*		GO	.OARG			; get argument
  9452						JRST	[GO	FIOFF		; error - shut off file input
  9453	065557	254 00 0 00 115644 			 JRST	IREGW0]		;   and exit
  9454						JRST	[GO	FIOFF		; missing argument - shut off file
  9455	065560	254 00 0 00 115646 			 JRST	IREGWX]		;   input and exit
  9456	065561	200 00 0 00 065536*		MOVE	ARGUM			; get argument
  9457	065562	202 00 0 00 065165 		MOVEM	TREGN			; save it
  9458						MOVN	1,[FMSGCD <Register n,data, where n:
  9459					2-RsXSta  11-AboXmt  16-Sync
  9460					4-EnaLnk  12-SetMod
  9461					6-SelBuf  13-Xmit
  9462	065563	210 01 0 00 115643 	7-LdXBuf  15-DsaLnk>]
  9463	065564	260 17 0 00 065556*		GO	.OARG			; get argument
  9464						JRST	[GO	FIOFF		; error - shut off file input
  9465	065565	254 00 0 00 115644 			 JRST	IREGW0]		;   and exit
  9466						JRST	[GO	FIOFF		; missing argument - shut off file
  9467	065566	254 00 0 00 115646 			 JRST	IREGWX]		;   input and exit
  9468	065567	200 00 0 00 065561*		MOVE	ARGUM			; get argument
  9469	065570	202 00 0 00 065166 		MOVEM	TREGD			; save it
  9470	065571	402 00 0 00 070053 	IREGW1:	SETZM	PACKET+4		; clear word
  9471	065572	200 00 0 00 065165 		MOVE	TREGN			; get register number
  9472	065573	137 00 0 00 115604 		DPB	[POINT 8,PACKET+4,23]	; store in packet
  9473	065574	200 00 0 00 065166 		MOVE	TREGD			; get register data
  9474	065575	137 00 0 00 115650 		DPB	[POINT 8,PACKET+4,31]	; store in packet
  9475	065576	262 17 0 00 000001 	IREGWX:	RGET	(1,0)			; restore AC's
  9476
  9477	065600	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 217
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0393

  9478
  9479					;#********************************************************************
  9480					;* RWAIT - Wait for a response (by CSR bit 'RspQAvail' bit being set.
  9481					;
  9482					;  Return:  +1 - Always
  9483					;#********************************************************************
  9484
  9485	065601	261 17 0 00 000000 	RWAIT:	RPUT	(0,1,2)			; save AC's
  9486
  9487	065604	201 02 0 00 000012 		MOVEI	2,^D10			; check up to 10 times
  9488	065605	260 17 0 00 065066*	RWAIT0:	GO	RDCSR			; read CSR
  9489	065606	255 00 0 00 000000 		JFCL				; ignore error
  9490	065607	602 01 0 00 000200 		TRNE	1,RESQAV		; response queue available bit set?
  9491	065610	254 00 0 00 065613 		JRST	RWAITX			; yes - exit
  9492	065611	005 00 0 00 000001 		DELAY	1			; wait 1 millisecond
  9493	065612	367 02 0 00 065605 		SOJG	2,RWAIT0		; no - loop till done
  9494	065613	262 17 0 00 000002 	RWAITX:	RGET	(2,1,0)			; restore AC's
  9495
  9496	065616	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 218
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0394

  9497
  9498					;#********************************************************************
  9499					;* CHKINT - Check/set up interlock for queue
  9500					;
  9501					; This routine tries to gain control of the specified queue.  If it
  9502					; cannot, it returns with an error condition.  If it can, it builds
  9503					; a list of entries in the queue, with  the  virtual address of the
  9504					; beginning of each queue entry.  Other routines access  the  queue
  9505					; via the addresses given in the entry list.
  9506					;
  9507					; Only one queue can be dealt with at a time, since there  is  only
  9508					; one list of queue entries.
  9509					;
  9510					; Given:   Q - Contains queue number
  9511					;
  9512					; Return: +1 - Error, couldn't get access to queue in 1 second
  9513					;	  +2 - Ok
  9514					;#********************************************************************
  9515
  9516	065617	261 17 0 00 000000 	CHKINT:	RPUT	(0,1,2,3)		; save AC's
  9517
  9518	065623	201 01 0 00 000001 		MOVEI	1,1			; set up a wait of 1 ms
  9519	065624	332 00 0 00 030037 		SKIPE	USER			; user mode?
  9520	065625	104 00 0 00 000167 		DISMS				; yes - wait
  9521	065626	402 00 0 00 065751 		SETZM	NUMENT			; clear entry count
  9522						MOVE	1,[PCB+4		; get address of interlock word
  9523							   PCB+7		; CmdQ2
  9524							   PCB+12		; CmdQ1
  9525							   PCB+15		; CmdQ0
  9526							   PCB+20		; RspQ
  9527							   PCB+23		; MsgFQ
  9528	065627	200 01 0 13 115651 			   PCB+26](Q)		; DgmFQ
  9529	065630	201 02 0 00 000764 		MOVEI	2,^D500			; do this up to 500 times
  9530	065631	356 00 0 01 000000 	CHKIN0:	AOSN	(1)			; available yet?
  9531	065632	254 00 0 00 065636 		JRST	CHKIN1			; yes - continue
  9532	065633	005 00 0 00 000001 		DELAY	1			; wait 1 millisecond
  9533	065634	367 02 0 00 065631 		SOJG	2,CHKIN0		; loop till done
  9534	065635	254 00 0 00 065657 		JRST	CHKINX			; exit
  9535	065636	350 00 0 17 777774 	CHKIN1:	AOS	-4(P)			; set up good return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 219
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0395

  9536
  9537					; Now search through the queue and build a queue entry list
  9538
  9539	065637	350 00 0 00 000001 		AOS	1			; point to FLINK
  9540	065640	201 00 0 01 000000 		MOVEI	(1)			; get address of FLINK of queue
  9541	065641	202 00 0 00 065664 		MOVEM	LENTRY			; save it
  9542	065642	201 02 0 00 065665 		MOVEI	2,LENTRY+1		; next address in list
  9543	065643	400 03 0 00 000000 		SETZ	3,			; init last entry address
  9544	065644	402 00 0 02 000000 	CHKIN2:	SETZM	(2)			; set up end of list
  9545	065645	200 01 0 01 000000 		MOVE	1,(1)			; get FLINK address
  9546	065646	260 17 0 00 065752 		GO	CONVIR			; convert to virtual
  9547	065647	316 01 0 00 065664 		CAMN	1,LENTRY		; points to start of list?
  9548	065650	254 00 0 00 065656 		JRST	CHKIN3			; yes - done
  9549	065651	202 01 0 02 000000 		MOVEM	1,(2)			; save address
  9550	065652	202 01 0 00 000003 		MOVEM	1,3			; save for last entry address
  9551	065653	350 00 0 00 000002 		AOS	2			; point to next list entry
  9552	065654	350 00 0 00 065751 		AOS	NUMENT			; increment entry count
  9553	065655	254 00 0 00 065644 		JRST	CHKIN2			; loop till done
  9554	065656	202 03 0 00 065750 	CHKIN3:	MOVEM	3,LASENT		; save it
  9555
  9556					; Done - exit
  9557
  9558	065657	262 17 0 00 000003 	CHKINX:	RGET	(3,2,1,0)		; restore AC's
  9559
  9560	065663	263 17 0 00 000000 		RTN				; return
  9561
  9562					; List of queue entries (ended with a zero)
  9563
  9564	065664	000000	000000		LENTRY:	0				; address of PCB FLINK entry
  9565	065665					BLOCK	^D50			; up to 50 queue entries
  9566	065747	000000	000000			0				; end of list
  9567	065750	000000	000000		LASENT:	0				; last entry in list
  9568	065751	000000	000000		NUMENT:	0				; entry count
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 220
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0396

  9569
  9570					;#********************************************************************
  9571					;* CONVIR - Convert physical address to virtual
  9572					;
  9573					; This routine searches through PHYTAB to find the physical address
  9574					; matching the one given here.  Then the virtual address is  gotten
  9575					; from the corresponding entry in VIRTAB.
  9576					;
  9577					; Given:  AC1 - Contains a physical address
  9578					;
  9579					; Return: AC1 - Contains the virtual address
  9580					;#********************************************************************
  9581
  9582	065752	261 17 0 00 000000 	CONVIR:	RPUT	(0,2)			; save AC's
  9583
  9584	065754	474 02 0 00 000000 		SETO	2,			; initialize address pointer
  9585	065755	350 00 0 00 000002 	CONVI0:	AOS	2			; point to next address
  9586	065756	336 00 0 02 065023 		SKIPN	ADRPHY(2)		; end of list?
  9587	065757	254 00 0 00 065766 		JRST	CONVIE			; yes - error - go handle
  9588	065760	312 01 0 02 065023 		CAME	1,ADRPHY(2)		; address match?
  9589	065761	254 00 0 00 065755 		JRST	CONVI0			; no - loop till done
  9590	065762	200 01 0 02 064774 	CONVIX:	MOVE	1,ADRVIR(2)		; yes - get virtual address
  9591	065763	262 17 0 00 000002 		RGET	(2,0)			; restore AC's
  9592
  9593	065765	263 17 0 00 000000 		RTN				; return
  9594
  9595					; Unrecognized address
  9596
  9597	065766	037 00 0 00 115660 	CONVIE:	TMSGC	<? PCB or queue entries are no longer valid>
  9598	065767	037 00 0 00 115671 		TMSGC	<? Address >
  9599	065770	200 00 0 00 000001 		MOVE	1
  9600	065771	037 10 0 00 000000 		PNTADR
  9601	065772	037 00 0 00 115674 		TMSG	< not recognized as a physical address of a queue entry>
  9602	065773	037 00 0 00 115707 		TMSGC	<? CONVIR called from address - >
  9603	065774	200 00 0 17 777776 		MOVE	-2(P)
  9604	065775	037 10 0 00 000000 		PNTADR	
  9605	065776	260 17 0 00 000000*		GO	FFF
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 221
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0397

  9606
  9607					;#********************************************************************
  9608					;* INSQUE - Insert a packet into a queue
  9609					;
  9610					; PACKET - 256 word queue entry which can be copied directly into
  9611					;	   a queue entry
  9612					;
  9613					; Given:  Q - Contains CMD queue number to put packet on
  9614					;
  9615					; Return: +1 - Error, out of room (or interlock failed)
  9616					;	  +2 - Ok
  9617					;#********************************************************************
  9618
  9619	065777	261 17 0 00 000000 	INSQUE:	RPUT	(0,1,2,3,Q)		; save AC's
  9620
  9621
  9622					; Get control of DGM Free Queue
  9623
  9624	066004	201 13 0 00 000006 		MOVEI	Q,6			; look at datagram free queue
  9625	066005	260 17 0 00 065617 		GO	CHKINT			; check interlock word
  9626	066006	254 00 0 00 066073 		JRST	INSQUX			; failed - exit
  9627	066007	336 00 0 00 065750 		SKIPN	LASENT			; queue empty?
  9628						JRST	[SETOM	PCB+26		; yes - error - out of room
  9629	066010	254 00 0 00 115716 			 JRST	INSQUX]		;   reset interlock and exit
  9630
  9631					; Remove a free queue entry from the queue
  9632
  9633	066011	260 17 0 00 066101 		GO	GETQUE			; get an entry
  9634	066012	255 00 0 00 000000 		JFCL				; error - ignore
  9635	066013	202 01 0 00 120751'		MOVEM	1,NEWENT#		; save address of new entry
  9636	066014	200 02 0 00 065664 		MOVE	2,LENTRY		; get PCB address
  9637	066015	370 00 0 00 000002 		SOS	2			; point to interlock address
  9638	066016	476 00 0 02 000000 		SETOM	(2)			; reset interlock
  9639	066017	200 02 0 00 000001 		MOVE	2,1			; get address of entry into AC2
  9640	066020	271 01 0 00 000002 		ADDI	1,2			; build BLT pointer to move the
  9641	066021	505 01 0 00 070051 		HRLI	1,PACKET+2		;   packet into the queue entry 
  9642	066022	251 01 0 02 000377 		BLT	1,^D255(2)		; do the BLT
  9643
  9644					; Get control of Command Queue
  9645
  9646	066023	200 13 0 17 000000 		MOVE	Q,(P)			; get cmd queue number back
  9647	066024	260 17 0 00 065617 		GO	CHKINT			; check interlock word
  9648	066025	254 00 0 00 066073 		JRST	INSQUX			; failed - exit
  9649
  9650					; Insert this at the end of the specified command queue
  9651
  9652	066026	332 00 0 00 065750 		SKIPE	LASENT			; queue currently empty?
  9653	066027	254 00 0 00 066044 		JRST	INSQU0			; no - continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 222
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0398

  9654
  9655					; Empty queue - insert entry
  9656
  9657	066030	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9658	066031	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9659	066032	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9660	066033	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9661						MOVE	1,[PCB+4		; get address of queue in PCB
  9662							   PCB+7
  9663							   PCB+12
  9664							   PCB+15
  9665							   PCB+20
  9666							   PCB+23
  9667	066034	200 01 0 13 115651 			   PCB+26](Q)
  9668	066035	200 02 0 01 000001 		MOVE	2,1(1)			; get address of PCB
  9669	066036	202 03 0 01 000001 		MOVEM	3,1(1)			; set up new FLINK in PCB
  9670	066037	202 03 0 01 000002 		MOVEM	3,2(1)			; set up new BLINK in PCB
  9671	066040	200 01 0 00 120751'		MOVE	1,NEWENT		; get address of new entry
  9672	066041	202 02 0 01 000000 		MOVEM	2,(1)			; set up FLINK of new entry
  9673	066042	202 02 0 01 000001 		MOVEM	2,1(1)			; set up BLINK of new entry
  9674	066043	254 00 0 00 066066 		JRST	INSQU1			; done - continue
  9675
  9676					; Queue is not empty - insert entry
  9677
  9678	066044	200 03 0 00 120751'	INSQU0:	MOVE	3,NEWENT		; get address of new entry
  9679	066045	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9680	066046	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9681	066047	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9682	066050	200 02 0 00 065750 		MOVE	2,LASENT		; get address of last entry
  9683	066051	200 01 0 02 000000 		MOVE	1,(2)			; get FLINK of last entry
  9684	066052	202 03 0 02 000000 		MOVEM	3,(2)			; set up new FLINK of last entry
  9685	066053	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9686	066054	257 02 0 02 000000 		MAP	2,(2)			; no - map to physical
  9687	066055	621 02 0 00 777000 		TLZ	2,777000		; get rid of extraneous bits
  9688	066056	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9689	066057	202 01 0 03 000000 		MOVEM	1,(3)			; set up FLINK of new entry
  9690	066060	202 02 0 03 000001 		MOVEM	2,1(3)			; set up BLINK of new entry
  9691	066061	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9692	066062	257 03 0 03 000000 		MAP	3,(3)			; no - map to physical
  9693	066063	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9694						MOVE	1,[PCB+4		; get address of queue in PCB
  9695							   PCB+7
  9696							   PCB+12
  9697							   PCB+15
  9698							   PCB+20
  9699							   PCB+23
  9700	066064	200 01 0 13 115651 			   PCB+26](Q)
  9701	066065	202 03 0 01 000002 		MOVEM	3,2(1)			; set up new BLINK in PCB
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 223
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0399

  9702
  9703					; Reset interlock and update statistics
  9704
  9705	066066	200 02 0 00 065664 	INSQU1:	MOVE	2,LENTRY		; get PCB address
  9706	066067	370 00 0 00 000002 		SOS	2			; point to interlock address
  9707	066070	476 00 0 02 000000 		SETOM	(2)			; reset interlock
  9708	066071	260 17 0 00 043130 		GO	SUPDAT			; update statistics (sent)
  9709
  9710					; Done - exit
  9711
  9712	066072	350 00 0 17 777773 		AOS	-5(P)			; set up proper return
  9713	066073	262 17 0 00 000013 	INSQUX:	RGET	(Q,3,2,1,0)		; restore AC's
  9714
  9715	066100	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 224
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0400

  9716
  9717					;#********************************************************************
  9718					;* GETQUE - Remove a queue entry from the beginning of a queue
  9719					;
  9720					; This routine removes the entry and adjusts the PCB and next
  9721					; entry links so that the queue is correct.
  9722					;
  9723					; Given:  LENTRY - Contains location of start of queue in PCB and
  9724					;		   a list of queue entries (virtual addresses)
  9725					;
  9726					; Return: AC1 - Address of entry obtained (virtual)
  9727					;	  +1 - No entry found
  9728					;	  +2 - An entry was found
  9729					;#********************************************************************
  9730
  9731	066101	336 00 0 00 065665 	GETQUE:	SKIPN	LENTRY+1		; empty list?
  9732	066102	263 17 0 00 000000 		RTN				; yes - return
  9733	066103	350 00 0 17 000000 		AOS	(P)			; no - set up proper return
  9734	066104	261 17 0 00 000000 		RPUT	(0,2)			; save AC's
  9735
  9736	066106	332 00 0 00 065666 		SKIPE	LENTRY+2		; multiple entries?
  9737	066107	254 00 0 00 066120 		JRST	GETQU0			; yes - go handle
  9738
  9739					; Only one entry in the list
  9740
  9741	066110	200 01 0 00 065664 		MOVE	1,LENTRY		; get address of FLINK in PCB
  9742	066111	200 02 0 00 000001 		MOVE	2,1			;   and in AC2
  9743	066112	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9744	066113	257 02 0 02 000000 		MAP	2,(2)			; no - map to physical
  9745	066114	621 02 0 00 777000 		TLZ	2,777000		; get rid of extraneous bits
  9746	066115	202 02 0 01 000000 		MOVEM	2,(1)			; set up new FLINK address
  9747	066116	202 02 0 01 000001 		MOVEM	2,1(1)			; set up new BLINK address
  9748	066117	254 00 0 00 066130 		JRST	GETQUX			; exit
  9749
  9750					; Multiple entries in the list
  9751
  9752	066120	200 01 0 00 065665 	GETQU0:	MOVE	1,LENTRY+1		; get address of 1st entry
  9753	066121	200 01 0 01 000001 		MOVE	1,1(1)			; get BLINK of 1st entry
  9754	066122	200 02 0 00 065666 		MOVE	2,LENTRY+2		; get address of 2nd entry
  9755	066123	202 01 0 02 000001 		MOVEM	1,1(2)			; set up BLINK of 2nd entry
  9756	066124	200 01 0 00 065665 		MOVE	1,LENTRY+1		; get address of 1st entry
  9757	066125	200 01 0 01 000000 		MOVE	1,(1)			; get FLINK of 1st entry
  9758	066126	200 02 0 00 065664 		MOVE	2,LENTRY		; get address of FLINK in PCB
  9759	066127	202 01 0 02 000000 		MOVEM	1,(2)			; set up new FLINK in PCB
  9760
  9761					; Done - exit	
  9762
  9763	066130	200 01 0 00 065665 	GETQUX:	MOVE	1,LENTRY+1		; get address of entry
  9764	066131	262 17 0 00 000002 		RGET	(2,0)			; restore AC's
  9765
  9766	066133	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 225
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0401

  9767
  9768					;#********************************************************************
  9769					;* CHKRSP - Check if a response queue entry
  9770					;
  9771					; Return:  +1 - No entry
  9772					;	   +2 - Found an entry(ies)
  9773					;#********************************************************************
  9774
  9775	066134	352 00 0 00 070020 	CHKRSP:	AOSE	PCB+20			; check interlock for rsp queue
  9776	066135	263 17 0 00 000000 		RTN				; return - queue is in use already
  9777	066136	261 17 0 00 000000 		RPUT	(0,1,2,Q)		; save AC's
  9778
  9779	066142	476 00 0 00 070020 		SETOM	PCB+20			; reset interlock
  9780	066143	201 13 0 00 000004 		MOVEI	Q,4			; set up for response queue
  9781	066144	260 17 0 00 065617 		GO	CHKINT			; check interlock word
  9782	066145	254 00 0 00 066276 		JRST	CHKRSX			; failed - exit
  9783	066146	336 00 0 00 065665 		SKIPN	LENTRY+1		; queue empty?
  9784						JRST	[GO	SHUTRQ		; yes - reset the response queue
  9785							 SETOM	PCB+20		;   available bit, then reset the
  9786	066147	254 00 0 00 115720 			 JRST	CHKRSX]		;   interlock word and exit
  9787	066150	476 00 0 00 041611*		SETOM	RQAFLG			; set rsp queue available flag
  9788
  9789					; An entry exists - copy it to 'RSPONS'
  9790
  9791	066151	350 00 0 17 777774 		AOS	-4(P)			; found an entry - set up return
  9792	066152	504 00 0 00 065665 		HRL	LENTRY+1		; build a BLT pointer
  9793	066153	541 00 0 00 070447 		HRRI	RSPONS
  9794	066154	251 00 0 00 071046 		BLT	RSPONS+^D255		; copy into 'RSPONS'
  9795
  9796					; Remove response queue packet from the response queue and reset interlock
  9797
  9798	066155	200 01 0 00 065665 		MOVE	1,LENTRY+1		; get address of 1st entry
  9799	066156	202 01 0 00 120751'		MOVEM	1,NEWENT		; save it
  9800	066157	200 02 0 01 000000 		MOVE	2,(1)			; get FLINK of 1st entry
  9801	066160	202 02 0 00 070021 		MOVEM	2,PCB+21		; set up new FLINK of PCB
  9802	066161	336 03 0 00 065666 		SKIPN	3,LENTRY+2		; get address of 2nd entry - zero?
  9803	066162	202 02 0 00 070022 		MOVEM	2,PCB+22		; yes - set up new BLINK of PCB
  9804	066163	332 03 0 00 065666 		SKIPE	3,LENTRY+2		; get address of 2nd entry - zero?
  9805	066164	202 02 0 03 000001 		MOVEM	2,1(3)			; no - set up BLINK of 2nd entry
  9806	066165	260 17 0 00 066342 		GO	SHUTRQ			; reset 'RSPQAV' bit
  9807	066166	476 00 0 00 070020 		SETOM	PCB+20			; reset interlock word
  9808
  9809					; Put the packet back in the free queue and reset the interlock words
  9810
  9811	066167	260 17 0 00 066303 		GO	CHKQUE			; determine queue to use
  9812	066170	260 17 0 00 065617 		GO	CHKINT			; check on interlock word
  9813	066171	254 00 0 00 066276 		JRST	CHKRSX			; error - exit
  9814	066172	302 13 0 00 000005 		CAIE	Q,5			; MSG free queue?
  9815	066173	254 00 0 00 066235 		JRST	CHKRS2			; no - continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 226
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0402

  9816
  9817					; MSG Free queue
  9818
  9819	066174	332 00 0 00 065750 	CHKRS0:	SKIPE	LASENT			; queue currently empty?
  9820	066175	254 00 0 00 066212 		JRST	CHKRS1			; no - continue
  9821
  9822					; Empty queue - insert entry
  9823
  9824	066176	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9825	066177	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9826	066200	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9827	066201	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9828	066202	200 02 0 00 070024 		MOVE	2,PCB+24		; get address of PCB
  9829	066203	202 03 0 00 070024 		MOVEM	3,PCB+24		; set up new FLINK in PCB
  9830	066204	202 03 0 00 070025 		MOVEM	3,PCB+25		; set up new BLINK in PCB
  9831	066205	200 01 0 00 120751'		MOVE	1,NEWENT		; get address of new entry
  9832	066206	202 02 0 01 000000 		MOVEM	2,(1)			; set up FLINK of new entry
  9833	066207	202 02 0 01 000001 		MOVEM	2,1(1)			; set up BLINK of new entry
  9834	066210	476 00 0 00 070023 		SETOM	PCB+23			; reset interlock
  9835	066211	254 00 0 00 066275 		JRST	CHKRS4			; done - continue
  9836
  9837					; Queue is not empty - insert entry
  9838
  9839	066212	200 03 0 00 120751'	CHKRS1:	MOVE	3,NEWENT		; get address of new entry
  9840	066213	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9841	066214	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9842	066215	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9843	066216	200 02 0 00 065750 		MOVE	2,LASENT		; get address of last entry
  9844	066217	200 01 0 02 000000 		MOVE	1,(2)			; get FLINK of last entry
  9845	066220	202 03 0 02 000000 		MOVEM	3,(2)			; set up new FLINK of last entry
  9846	066221	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9847	066222	257 02 0 02 000000 		MAP	2,(2)			; no - map to physical
  9848	066223	621 02 0 00 777000 		TLZ	2,777000		; get rid of extraneous bits
  9849	066224	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9850	066225	202 01 0 03 000000 		MOVEM	1,(3)			; set up FLINK of new entry
  9851	066226	202 02 0 03 000001 		MOVEM	2,1(3)			; set up BLINK of new entry
  9852	066227	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9853	066230	257 03 0 03 000000 		MAP	3,(3)			; no - map to physical
  9854	066231	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9855	066232	202 03 0 00 070025 		MOVEM	3,PCB+25		; set up new BLINK in PCB
  9856	066233	476 00 0 00 070023 		SETOM	PCB+23			; reset interlock
  9857	066234	254 00 0 00 066275 		JRST	CHKRS4			; done - continue
  9858
  9859					; DGM Free queue
  9860
  9861	066235	332 00 0 00 065750 	CHKRS2:	SKIPE	LASENT			; queue currently empty?
  9862	066236	254 00 0 00 066253 		JRST	CHKRS3			; no - continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 227
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0403

  9863
  9864					; Empty queue - insert entry
  9865
  9866	066237	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9867	066240	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9868	066241	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9869	066242	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9870	066243	200 02 0 00 070027 		MOVE	2,PCB+27		; get address of PCB
  9871	066244	202 03 0 00 070027 		MOVEM	3,PCB+27		; set up new FLINK in PCB
  9872	066245	202 03 0 00 070030 		MOVEM	3,PCB+30		; set up new BLINK in PCB
  9873	066246	200 01 0 00 120751'		MOVE	1,NEWENT		; get address of new entry
  9874	066247	202 02 0 01 000000 		MOVEM	2,(1)			; set up FLINK of new entry
  9875	066250	202 02 0 01 000001 		MOVEM	2,1(1)			; set up BLINK of new entry
  9876	066251	476 00 0 00 070026 		SETOM	PCB+26			; reset interlock
  9877	066252	254 00 0 00 066275 		JRST	CHKRS4			; done - continue
  9878
  9879					; Queue is not empty - insert entry
  9880
  9881	066253	200 03 0 00 120751'	CHKRS3:	MOVE	3,NEWENT		; get address of new entry
  9882	066254	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9883	066255	257 03 0 03 000000 		MAP	3,(3)			; map to physical
  9884	066256	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9885	066257	200 02 0 00 065750 		MOVE	2,LASENT		; get address of last entry
  9886	066260	200 01 0 02 000000 		MOVE	1,(2)			; get FLINK of last entry
  9887	066261	202 03 0 02 000000 		MOVEM	3,(2)			; set up new FLINK of last entry
  9888	066262	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9889	066263	257 02 0 02 000000 		MAP	2,(2)			; no - map to physical
  9890	066264	621 02 0 00 777000 		TLZ	2,777000		; get rid of extraneous bits
  9891	066265	200 03 0 00 120751'		MOVE	3,NEWENT		; get address of new entry
  9892	066266	202 01 0 03 000000 		MOVEM	1,(3)			; set up FLINK of new entry
  9893	066267	202 02 0 03 000001 		MOVEM	2,1(3)			; set up BLINK of new entry
  9894	066270	336 00 0 00 121012'		SKIPN	UDEBUG			; debug mode?
  9895	066271	257 03 0 03 000000 		MAP	3,(3)			; no - map to physical
  9896	066272	621 03 0 00 777000 		TLZ	3,777000		; get rid of extraneous bits
  9897	066273	202 03 0 00 070030 		MOVEM	3,PCB+30		; set up new BLINK in PCB
  9898	066274	476 00 0 00 070026 		SETOM	PCB+26			; reset interlock
  9899
  9900					; Update statistics
  9901
  9902	066275	260 17 0 00 043166 	CHKRS4:	GO	RUPDAT			; update statistics (received)
  9903
  9904					; Exit
  9905
  9906	066276	262 17 0 00 000013 	CHKRSX:	RGET	(Q,2,1,0)		; restore AC's
  9907
  9908	066302	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 228
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0404

  9909
  9910					;#********************************************************************
  9911					;* CHKQUE - Determine which queue to insert entry back on
  9912					;
  9913					; Given:    NEWENT - Contains address of packet
  9914					; Returns:  Q - Contains queue to put entry back on
  9915					;#********************************************************************
  9916
  9917	066303	261 17 0 00 000000 	CHKQUE:	RPUT	(0,1)			; save AC's
  9918
  9919	066305	201 01 0 00 066322 		MOVEI	1,CHKTAB-1		; get entry table address
  9920	066306	350 00 0 00 000001 	CHKQU0:	AOS	1			; increment table pointer
  9921	066307	200 00 0 01 000000 		MOVE	(1)			; get address
  9922	066310	321 00 0 00 066314 		JUMPL	CHKQUX			; end of list? yes - exit
  9923	066311	621 00 0 00 777777 		TLZ	777777			; clear left half
  9924	066312	312 00 0 00 120751'		CAME	NEWENT			; match expected?
  9925	066313	254 00 0 00 066306 		JRST	CHKQU0			; no - keep looping
  9926	066314	554 13 0 01 000000 	CHKQUX:	HLRZ	Q,(1)			; yes - get queue number
  9927	066315	301 13 0 00 000005 		CAIL	Q,5			; valid queue number?
  9928	066316	303 13 0 00 000006 		CAILE	Q,6
  9929						GO	[FMSGC	<? Unrecognized packet address - >
  9930							 MOVE	NEWENT
  9931							 PNTHWF
  9932							 MOVEI	Q,6
  9933	066317	260 17 0 00 115732 			 RTN]
  9934	066320	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
  9935
  9936	066322	263 17 0 00 000000 		RTN				; return
  9937
  9938	066323	000005	071447		CHKTAB:	EXP	5B17!QFMG1,5B17!QFMG2,5B17!QFMG3,5B17!QFMG4
  9939	066324	000005	072047
  9940	066325	000005	072447
  9941	066326	000005	073047
  9942	066327	000006	073447			EXP	6B17!QFDG1,6B17!QFDG2,6B17!QFDG3,6B17!QFDG4,6B17!QFDG5
  9943	066330	000006	074047
  9944	066331	000006	074447
  9945	066332	000006	075047
  9946	066333	000006	075447
  9947	066334	000006	076047			EXP	6B17!QFDG6,6B17!QFDG7,6B17!QFDG10,6B17!QFDG11,6B17!QFDG12
  9948	066335	000006	076447
  9949	066336	000006	077047
  9950	066337	000006	077447
  9951	066340	000006	100047
  9952	066341	777777	777777			-1
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 229
DFCIA1	MAC	27-Oct-84 19:00		Packet Handling Routines                                                           SEQ 0405

  9953
  9954					;#********************************************************************
  9955					;* SHUTRQ - Turn off response queue available
  9956					;#********************************************************************
  9957
  9958	066342	261 17 0 00 000001 	SHUTRQ:	PUT	1			; save AC1
  9959	066343	260 17 0 00 065605*		GO	RDCSR			; read CSR
  9960	066344	254 00 0 00 066351 		JRST	SHUTRX			; error - exit
  9961	066345	621 01 0 00 777777 		TLZ	1,777777		; clear left half
  9962	066346	620 01 0 00 000400 		TRZ	1,CMDQAV		; clear this bit
  9963	066347	660 01 0 00 000200 		TRO	1,RESQAV		; set the bit
  9964	066350	260 17 0 00 065115*		GO	LDCSR			; write the CSR register
  9965	066351	262 17 0 00 000001 	SHUTRX:	GET	1			; restore AC1
  9966	066352	263 17 0 00 000000 		RTN				; return
  9967
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 230
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0406

  9968						SUBTTL	Queue Print Routines
  9969
  9970					;#********************************************************************
  9971					;* PQUEUE - Print a set of queue entries
  9972					;
  9973					; Q - Queue to print -  0-3 - Cmd Queues 3-0
  9974					;			4 - Rsp Queue
  9975					;			5 - Msg Free Queue
  9976					;			6 - Dgm Free Queue
  9977					; PK - Address of packet
  9978					;#********************************************************************
  9979
  9980	066353	261 17 0 00 000000 	PQUEUE:	RPUT	(0,1,2,3,4)		; save AC's
  9981
  9982	066360	200 12 0 00 000013 		MOVE	PK,Q			; get queue number
  9983	066361	221 12 0 00 000003 		IMULI	PK,3			; calculate offset into PCB as
  9984	066362	201 12 0 12 070004 		MOVEI	PK,PCB+4(PK)		;   address of start of queue
  9985	066363	200 04 0 00 000012 		MOVE	4,PK			; get into AC4 also
  9986	066364	260 17 0 00 065617 		GO	CHKINT			; obtain queue ownership
  9987						GO	[GO	ISTOP		; failed - stop the port,
  9988							 SETOM	(PK)		;   clear the interlock word,
  9989							 GO	CHKINT		;   obtain the queue again,
  9990							 JFCL			;   and continue
  9991	066365	260 17 0 00 115737 			 RTN]
  9992						XCT	[TMSGC	<CmdQ3> 	; print name of queue
  9993							 TMSGC	<CmdQ2>
  9994							 TMSGC	<CmdQ1>
  9995							 TMSGC	<CmdQ0>
  9996							 TMSGC	<RspQ>
  9997							 TMSGC	<MsgFQ>
  9998	066366	256 00 0 13 115762 			 TMSGC	<DgmFQ>](Q)
  9999	066367	350 00 0 00 000012 		AOS	PK			; point to FLINK
 10000	066370	037 00 0 00 115771 		TMSG	< (PCB+>
 10001	066371	200 00 0 00 000012 		MOVE	PK			; get address
 10002	066372	275 00 0 00 070000 		SUBI	PCB			; normalize to PCB+n
 10003	066373	037 16 0 00 000003 		PNTOCS				; print it
 10004	066374	037 00 0 00 115773 		TMSG	<):	Flink = >
 10005	066375	200 01 0 12 000000 		MOVE	1,(PK)			; get FLINK
 10006	066376	260 17 0 00 067420 		GO	LINKP			; print it
 10007	066377	037 00 0 00 115776 		TMSG	<   	Blink = >
 10008	066400	200 01 0 12 000001 		MOVE	1,1(PK)			; get BLINK
 10009	066401	260 17 0 00 067420 		GO	LINKP			; print it
 10010	066402	336 00 0 00 065750 		SKIPN	LASENT			; queue empty?
 10011	066403	037 00 0 00 116001 		TMSGC	< Queue is empty>	; yes - print message
 10012	066404	201 03 0 00 065664 		MOVEI	3,LENTRY		; init entry pointer
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 231
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0407

 10013
 10014					; Print the queue entry
 10015
 10016	066405	350 00 0 00 000003 	PQUEU0:	AOS	3			; point to next entry
 10017	066406	336 00 0 03 000000 		SKIPN	(3)			; non-zero queue entry?
 10018	066407	254 00 0 00 066413 		JRST	PQUEUX			; no - done with queue - exit
 10019	066410	200 12 0 03 000000 		MOVE	PK,(3)			; get address of queue entry
 10020						XCT	[GO	PPAKC		; print CmdQ3 entry
 10021							 GO	PPAKC		; print CmdQ2 entry
 10022							 GO	PPAKC		; print CmdQ1 entry
 10023							 GO	PPAKC		; print CmdQ0 entry
 10024							 GO	PPAKR		; print RspQ entry
 10025							 GO	PPAKF		; print MsgFQ entry
 10026	066411	256 00 0 13 116005 			 GO	PPAKF](Q)	; print DgmFQ entry
 10027	066412	254 00 0 00 066405 		JRST	PQUEU0			; loop till done
 10028	066413	476 00 0 04 000000 	PQUEUX:	SETOM	(4)			; reset interlock
 10029	066414	262 17 0 00 000004 		RGET	(4,3,2,1,0)		; restore AC's
 10030
 10031	066421	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 232
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0408

 10032
 10033					;#********************************************************************
 10034					;* PPAKC - Print a command queue entry
 10035					;
 10036					; PK - Address of packet
 10037					; Q - Cmd queue number
 10038					;#********************************************************************
 10039
 10040	066422	261 17 0 00 000000 	PPAKC:	RPUT	(0,1)			; save AC's
 10041
 10042	066424	476 00 0 00 120716'		SETOM	CMDPAK#			; set command packet flag
 10043	066425	402 00 0 00 120772'		SETZM	RSPPAK#			; clear response packet flag
 10044	066426	037 00 0 00 116014 		TMSGC	< -------------------->
 10045	066427	037 00 0 00 116021 		TMSGC	< BUFF+>
 10046	066430	200 00 0 00 000012 		MOVE	PK			; calculate buffer
 10047	066431	275 00 0 00 071047 		SUBI	BUFF			;   offset
 10048	066432	037 16 0 00 000003 		PNTOCS				; print it
 10049	066433	037 00 0 00 116023 		TMSG	</ (CmdQ>
 10050	066434	201 00 0 00 000003 		MOVEI	3			; calculate cmd queue
 10051	066435	274 00 0 00 000013 		SUB	Q			;   number 3-0
 10052	066436	037 16 0 00 000003 		PNTOCS				; print it
 10053	066437	037 00 0 00 116025 		TMSG	< Entry) - >
 10054
 10055					; Print op code
 10056
 10057	066440	200 01 0 12 000003 	PPAKC0:	MOVE	1,3(PK)			; get status word
 10058	066441	135 11 0 00 113744 		LDB	OP,[POINT 8,1,23]	; get op code
 10059	066442	260 17 0 00 067055 		GO	OPCPNT			; print op code
 10060
 10061					; Now print remainder of queue entry with regard to packet type
 10062
 10063	066443	261 17 0 00 000002 	PPAKCC:	PUT	2			; save AC2 
 10064	066444	260 17 0 00 067212 		GO	DECOPC			; decode op code
 10065	066445	201 01 0 00 000040 		MOVEI	1,40			; error - set offset to 40
 10066	066446	261 17 0 00 000003 		RPUT	(3,4)			; save AC's
 10067
 10068						XCT	[GO	PACK1		; 0 - SNDDG
 10069							 GO	PACKG		; 1 - SNDMSG
 10070							 GO	PACK5		; 2 - REQID
 10071							 GO	PACKG		; 3 - SNDRST
 10072							 GO	PACKG		; 4 - SNDSTRT
 10073							 GO	PACKG		; 5 - REQDAT0
 10074							 GO	PACKG		; 6 - REQDAT2
 10075							 GO	PACKG		; 7 - REQDAT2
 10076							 GO	PACK15		; 10 - SNDLB
 10077							 GO	PACKG		; 11 - REQMDAT
 10078							 GO	PACKG		; 12 - SNDDAT
 10079							 GO	PACKG		; 13 - RETDAT
 10080							 GO	PACKG		; 14 - SNTMDAT
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 233
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0409

 10081 10082							 GO	PACKG		; 15 - CLSBUF
 10083							 GO	PACKG		; 16 - SETCKT
 10084							 GO	PACKG		; 17 - SETCNT
 10085							 GO	PACK33		; 20 - RDCNT
 10086							 GO	PACK36		; 21 - WRREG
 10087							 GO	PACK37		; 22 - RDREG
 10088							 GO	PACKG		; 23 - CNFRET
 10089							 GO	PACKG		; 24 - MCNF
 10090							 GO	PACK13		; 25 - IDREC
 10091							 GO	PACKG		; 26 - DATREC
 10092							 GO	PACKG		; 27 - RTMDAT
 10093							 GO	PACKG		; 30
 10094							 GO	PACKG		; 31
 10095							 GO	PACKG		; 32
 10096							 GO	PACKG		; 33
 10097							 GO	PACKG		; 34
 10098							 GO	PACKG		; 35
 10099							 GO	PACKG		; 36
 10100							 GO	PACKG		; 37
 10101	066450	256 00 0 01 116030 			 GO	PACKG](1)	; 40
 10102	066451	262 17 0 00 000004 		RGET	(4,3,2)			; restore AC's
 10103
 10104	066454	262 17 0 00 000001 	PPAKCX:	RGET	(1,0)			; restore AC's
 10105
 10106	066456	263 17 0 00 000000 		RTN				; return
 10107
 10108
 10109					;#********************************************************************
 10110					;* PPAKR - Print a response queue entry
 10111					;
 10112					; PK - Address of packet
 10113					; Q - Cmd queue number
 10114					;#********************************************************************
 10115
 10116	066457	261 17 0 00 000000 	PPAKR:	RPUT	(0,1)			; save AC's
 10117
 10118	066461	402 00 0 00 120716'		SETZM	CMDPAK			; clear command packet flag
 10119	066462	476 00 0 00 120772'		SETOM	RSPPAK			; set response packet flag
 10120	066463	037 00 0 00 116014 		TMSGC	< -------------------->
 10121	066464	037 00 0 00 116021 		TMSGC	< BUFF+>
 10122	066465	200 00 0 00 000012 		MOVE	PK			; calculate buffer
 10123	066466	275 00 0 00 071047 		SUBI	BUFF			;   offset
 10124	066467	037 16 0 00 000003 		PNTOCS				; print it
 10125	066470	037 00 0 00 116071 		TMSG	</ (RspQ Entry) - >
 10126	066471	254 00 0 00 066440 		PJRST	PPAKC0			; continue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 234
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0410

 10127
 10128					;#********************************************************************
 10129					;* PPAKF - Print a free queue entry
 10130					;
 10131					; PK - Address of packet
 10132					; Q - Cmd queue number
 10133					;#********************************************************************
 10134
 10135	066472	261 17 0 00 000000 	PPAKF:	RPUT	(0,1)			; save AC's
 10136
 10137	066474	037 00 0 00 116021 		TMSGC	< BUFF+>
 10138	066475	200 00 0 00 000012 		MOVE	PK			; calculate buffer
 10139	066476	275 00 0 00 071047 		SUBI	BUFF			;   offset
 10140	066477	037 16 0 00 000003 		PNTOCS				; print it
 10141	066500	037 00 0 00 116075 		TMSG	</	Flink = >
 10142	066501	200 01 0 12 000000 		MOVE	1,(PK)			; get FLINK
 10143	066502	260 17 0 00 067420 		GO	LINKP			; print it
 10144	066503	037 00 0 00 116100 		TMSG	<  	Blink = >
 10145	066504	200 01 0 12 000001 		MOVE	1,1(PK)			; get BLINK
 10146	066505	260 17 0 00 067420 		GO	LINKP			; print it
 10147	066506	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
 10148
 10149	066510	263 17 0 00 000000 		RTN				; return
 10150
 10151
 10152					;#********************************************************************
 10153					;* PACK1 - Print a packet - SNDDG command / DGSNT response
 10154					;#********************************************************************
 10155
 10156	066511	260 17 0 00 067324 	PACK1:	GO	PHEAD			; print header data
 10157	066512	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10158	066513	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10159	066514	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10160	066515	260 17 0 00 067352 		GO	PTEXT			; print text
 10161	066516	263 17 0 00 000000 		RTN				; return
 10162
 10163
 10164					;#********************************************************************
 10165					;* PACK5 - Print a packet - REQID command / IDREQ response
 10166					;#********************************************************************
 10167
 10168	066517	260 17 0 00 067324 	PACK5:	GO	PHEAD			; print header data
 10169	066520	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10170	066521	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10171	066522	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10172	066523	260 17 0 00 067311 		GO	PXCTID			; print 2-word XCT-ID
 10173	066524	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 235
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0411

 10174
 10175					;#********************************************************************
 10176					;* PACK13 - Print a packet - ID response
 10177					;#********************************************************************
 10178
 10179	066525	260 17 0 00 067324 	PACK13:	GO	PHEAD			; print header data
 10180	066526	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10181	066527	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10182	066530	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10183	066531	260 17 0 00 067311 		GO	PXCTID			; print 2-word XCT-ID
 10184
 10185					; Print maintenance ID word
 10186
 10187	066532	037 00 0 00 116103 		TMSGC	< Port Type:  >
 10188	066533	200 01 0 12 000006 		MOVE	1,6(PK)			; get port type word
 10189	066534	135 01 0 00 116107 		LDB	1,[POINT 6,1,31]	; get port type
 10190	066535	200 00 0 00 000001 		MOVE	1			; get into AC0
 10191	066536	037 16 0 00 000003 		PNTOCS				; print it
 10192	066537	303 01 0 00 000007 		CAILE	1,7			; exceed allowed range?
 10193	066540	201 01 0 00 000007 		MOVEI	1,7			; yes - limit to 7
 10194						XCT	[TMSG	< (Undefined)>	; print type 0
 10195							 TMSG	< (Undefined)>	;       type 1
 10196							 TMSG	< (CI780)>	;       type 2
 10197							 TMSG	< (CI750)>	;       type 3
 10198							 TMSG	< (HSC50)>	;       type 4
 10199							 TMSG	< (Jupiter)>	;       type 5
 10200							 TMSG	< (KL10)>	;       type 6
 10201	066541	256 00 0 01 116126 			 TMSG	< (Undefined)>](1);     type 7
 10202	066542	200 01 0 12 000006 		MOVE	1,6(PK)			; get Maint-ID word
 10203	066543	603 01 0 00 400000 		TLNE	1,400000		; dual path?
 10204	066544	037 00 0 00 116136 		TMSGC	< Responding port has 2 paths>
 10205	066545	607 01 0 00 400000 		TLNN	1,400000		; dual path?
 10206	066546	037 00 0 00 116145 		TMSGC	< Responding port has 1 path>
 10207
 10208					; Print microcode revision level
 10209
 10210	066547	037 00 0 00 116153 		TMSGC	< Code Rev Level:  >
 10211	066550	200 00 0 12 000007 		MOVE	7(PK)			; get CODE REV word
 10212	066551	242 00 0 00 777774 		LSH	-4			; position correctly
 10213	066552	037 16 0 00 000003 		PNTOCS				; print it
 10214
 10215					; Print port functionality
 10216
 10217	066553	037 00 0 00 116160 		TMSGC	< Port Functionality:  >
 10218	066554	200 00 0 12 000010 		MOVE	10(PK)			; get functionality word
 10219	066555	242 00 0 00 777764 		LSH	-^D12			; position correctly
 10220	066556	037 16 0 00 000003 		PNTOCS				; print it
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 236
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0412

 10221
 10222					; Print state word
 10223
 10224	066557	037 00 0 00 116165 		TMSGC	< Last Port to send a reset:  >
 10225	066560	200 01 0 12 000011 		MOVE	1,11(PK)		; get system state word
 10226	066561	135 00 0 00 116174 		LDB	[POINT	8,1,31]		; get port number
 10227	066562	037 16 0 00 000003 		PNTOCS				; print it
 10228	066563	037 00 0 00 116175 		TMSGC	< Port State:  >
 10229	066564	135 01 0 00 116201 		LDB	1,[POINT 2,1,22]	; get state bits
 10230						XCT	[TMSG	<Uninitialized>	; print it
 10231							 TMSG	<Disabled>
 10232							 TMSG	<Enabled>
 10233	066565	256 00 0 01 116213 			 TMSG	<Undefined>](1)
 10234	066566	200 01 0 12 000011 		MOVE	1,11(PK)		; get system state word
 10235	066567	135 01 0 00 116217 		LDB	1,[POINT 1,1,23]	; get maintenance state
 10236						XCT	[TMSGC	< Not in maint mode>
 10237	066570	256 00 0 01 116231 			 TMSGC	< In maint mode>](1)
 10238	066571	263 17 0 00 000000 		RTN				; return
 10239
 10240
 10241					;#********************************************************************
 10242					;* PACK15 - Print a packet - SNDLB command / LBSNT response
 10243					;#********************************************************************
 10244
 10245	066572	260 17 0 00 067324 	PACK15:	GO	PHEAD			; print header data
 10246	066573	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10247	066574	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10248	066575	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10249	066576	260 17 0 00 067352 		GO	PTEXT			; print text data
 10250	066577	037 00 0 00 116233 		TMSGC	< CRC:   >
 10251	066600	201 01 0 12 000005 		MOVEI	1,5(PK)			; address of CRC if 0 byte length
 10252	066601	200 00 0 12 000004 		MOVE	4(PK)			; get text length
 10253	066602	322 00 0 00 066616 		JUMPE	PK15A			; zero? yes - go print CRC
 10254	066603	242 00 0 00 000001 		LSH	1			; multiply by 2
 10255	066604	200 02 0 12 000003 		MOVE	2,3(PK)			; get status word
 10256	066605	607 02 0 00 001000 		TLNN	2,1000			; COMPAT format?
 10257	066606	231 00 0 00 000010 		IDIVI	8			; yes - calculate # words of text
 10258	066607	603 02 0 00 001000 		TLNE	2,1000			; HIDEN format?
 10259	066610	231 00 0 00 000011 		IDIVI	9			; yes - and divide by 9
 10260	066611	332 00 0 00 000001 		SKIPE	1			; any remainder?
 10261	066612	271 00 0 00 000001 		ADDI	1			; yes - increase by 1 word
 10262	066613	202 00 0 00 000002 		MOVEM	2			; save length in AC2
 10263	066614	270 02 0 00 000012 		ADD	2,PK			; calculate address that the
 10264	066615	201 05 0 02 000005 		MOVEI	5,5(2)			;   CRC is at
 10265	066616	200 00 0 05 000000 	PK15A:	MOVE	(5)			; get CRC
 10266	066617	037 13 0 00 000000 		PNTHW				; print it
 10267	066620	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 237
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0413

 10268
 10269					;#********************************************************************
 10270					;* PACK33 - Print a packet - RDCNT command / CNTRD response
 10271					;#********************************************************************
 10272
 10273	066621	260 17 0 00 067324 	PACK33:	GO	PHEAD			; print header data
 10274	066622	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10275	066623	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10276	066624	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10277	066625	260 17 0 00 067311 		GO	PXCTID			; print 2-word XCT-ID
 10278	066626	201 01 0 00 000006 		MOVEI	1,6			; get address to start
 10279	066627	201 03 0 00 000016 		MOVEI	3,^D14			; get address to stop
 10280	066630	260 17 0 00 066772 		GO	PMISC			; print miscellaneous data
 10281	066631	263 17 0 00 000000 		RTN				; return
 10282
 10283
 10284					;#********************************************************************
 10285					;* PACK36 - Print a packet - RDREG command / REGRD response
 10286					;#********************************************************************
 10287
 10288	066632	260 17 0 00 067324 	PACK36:	GO	PHEAD			; print header data
 10289	066633	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10290	066634	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10291	066635	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10292	066636	037 00 0 00 116236 		TMSGC	< Register = >
 10293	066637	200 01 0 12 000004 		MOVE	1,4(PK)			; get data word
 10294	066640	135 00 0 00 113744 		LDB	[POINT 8,1,23]		; get register number
 10295	066641	037 16 0 00 000003 		PNTOCS				; print it
 10296	066642	037 00 0 00 116241 		TMSG	<, Data = >
 10297	066643	200 01 0 12 000004 		MOVE	1,4(PK)			; get data word
 10298	066644	135 00 0 00 116243 		LDB	[POINT 8,1,7]		; get data
 10299	066645	037 16 0 00 000003 		PNTOCS				; print it
 10300	066646	263 17 0 00 000000 		RTN				; return
 10301
 10302
 10303					;#********************************************************************
 10304					;* PACK37 - Print a packet - WRREG command / REGWR response
 10305					;#********************************************************************
 10306
 10307	066647	260 17 0 00 067324 	PACK37:	GO	PHEAD			; print header data
 10308	066650	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10309	066651	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10310	066652	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10311	066653	037 00 0 00 116236 		TMSGC	< Register = >
 10312	066654	200 01 0 12 000004 		MOVE	1,4(PK)			; get data word
 10313	066655	135 00 0 00 113744 		LDB	[POINT 8,1,23]		; get register number
 10314	066656	037 16 0 00 000003 		PNTOCS				; print it
 10315	066657	037 00 0 00 116241 		TMSG	<, Data = >
 10316	066660	200 01 0 12 000004 		MOVE	1,4(PK)			; get data word
 10317	066661	135 00 0 00 116174 		LDB	[POINT 8,1,31]		; get data
 10318	066662	037 16 0 00 000003 		PNTOCS				; print it
 10319	066663	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 238
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0414

 10320
 10321					;#********************************************************************
 10322					;* PACKG - Print a general type packet
 10323					;
 10324					; OP Code:  2 - Print a packet - SNDMSG command / MSGSNT response
 10325					;	    3 - Print a packet - CNFRET response
 10326					;	    4 - Print a packet - MCNF response
 10327					;	    6 - Print a packet - SNDRST command / RSTSNT response
 10328					;	    7 - Print a packet - SNDSTRT command / STRTSNT response
 10329					;	    10 - Print a packet - REQDAT0/1/2 command / DATREQ0/1/2 response
 10330					;	    16 - Print a packet - REQMDAT command / MDATREQ response
 10331					;	    20 - Print a packet - SNDDAT command / SNTDAT response
 10332					;	    21 - Print a packet - RETDAT command / DATRET response
 10333					;	    22 - Print a packet - SNTMDAT command / MDATSNT response
 10334					;	    23 - Print a packet - RETMDAT response
 10335					;	    30 - Print a command CLSBUF / BUFCLS response
 10336					;	    31 - Print a packet - SETCKT command / CKTSET response
 10337					;	    32 - Print a packet - SETCNT command / CNTSET response
 10338					;#********************************************************************
 10339
 10340	066664	260 17 0 00 067324 	PACKG:	GO	PHEAD			; print header data
 10341	066665	260 17 0 00 067337 		GO	PPORTO			; print opcode and port
 10342	066666	260 17 0 00 066675 		GO	PSTATS			; print status byte
 10343	066667	260 17 0 00 067017 		GO	PFLAGS			; print flags byte
 10344	066670	260 17 0 00 067311 		GO	PXCTID			; print 2-word XCT-ID
 10345	066671	201 01 0 00 000006 		MOVEI	1,6			; get address to start
 10346	066672	201 03 0 00 000011 		MOVEI	3,9			; get address to stop
 10347	066673	260 17 0 00 066772 		GO	PMISC			; print miscellaneous data
 10348	066674	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 239
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0415

 10349
 10350					;#********************************************************************
 10351					;* PSTATS - Print status field
 10352					;#********************************************************************
 10353
 10354	066675	261 17 0 00 000000 	PSTATS:	RPUT	(0,1,2,3)		; save AC's
 10355
 10356	066701	200 01 0 12 000003 		MOVE	1,3(PK)			; get word
 10357	066702	135 01 0 00 116243 		LDB	1,[POINT 8,1,7]		; get status byte
 10358	066703	037 00 0 00 116244 		TMSGC	<   Status:>
 10359	066704	602 01 0 00 000200 		TRNE	1,200			; path status field?
 10360	066705	254 00 0 00 066720 		JRST	PSTAT1			; no - handle other type
 10361
 10362					; Path status byte
 10363
 10364	066706	336 00 0 00 000001 		SKIPN	1			; any status to print?
 10365	066707	037 00 0 00 116247 		TMSG	<  No Error>		; no - print no error
 10366	066710	474 02 0 00 000000 		SETO	2,			; initialize text pointer
 10367	066711	350 00 0 00 000002 	PSTAT0:	AOS	2			; point to next text string
 10368	066712	301 02 0 00 000006 		CAIL	2,6			; done yet?
 10369	066713	254 00 0 00 066736 		JRST	PSTATX			; yes - exit
 10370	066714	602 01 0 00 000040 		TRNE	1,40			; bit set?
 10371						XCT	[TMSG	<  Path A ACK>	; yes - print it
 10372							 TMSG	<  Path A NAK>
 10373							 TMSG	<  Path A NRSP>
 10374							 TMSG	<  Path B ACK>
 10375							 TMSG	<  Path B NAK>
 10376	066715	256 00 0 02 116274 			 TMSG	<  Path B NRSP>](2)
 10377	066716	242 01 0 00 000001 		LSH	1,1			; left shift 1 bit
 10378	066717	254 00 0 00 066711 		JRST	PSTAT0			; loop till done
 10379
 10380					; Error byte
 10381
 10382	066720	135 02 0 00 116302 	PSTAT1:	LDB	2,[POINT 7,1,35]	; get error bits
 10383	066721	201 01 0 00 066742 		MOVEI	1,STATAB-1		; initialize table address
 10384	066722	350 00 0 00 000001 	PSTAT2:	AOS	1			; point to next entry
 10385	066723	337 00 0 01 000000 		SKIPG	(1)			; end of list?
 10386	066724	254 00 0 00 066733 		JRST	PSTAT3			; yes - print unrecognized
 10387	066725	554 00 0 01 000000 		HLRZ	(1)			; get error code
 10388	066726	312 00 0 00 000002 		CAME	2			; match?
 10389	066727	254 00 0 00 066722 		JRST	PSTAT2			; no - keep looking
 10390	066730	550 01 0 01 000000 		HRRZ	1,(1)			; get address of text to print
 10391	066731	256 00 0 01 000000 		XCT	(1)			; print it
 10392	066732	254 00 0 00 066736 		JRST	PSTATX			; exit
 10393
 10394	066733	037 00 0 00 116303 	PSTAT3:	TMSG	< ? Invalid error code - >
 10395	066734	200 00 0 00 000002 		MOVE	2
 10396	066735	037 16 0 00 000003 		PNTOCS
 10397	
 10398					; Exit
 10399
 10400	066736	262 17 0 00 000003 	PSTATX:	RGET	(3,2,1,0)		; done - restore AC's
 10401
 10402	066742	263 17 0 00 000000 		RTN				;  and return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 240
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0416

 10403
 10404					; Status error table
 10405
 10406	066743	000000	116312		STATAB:	0,,[TMSG < No Error>]
 10407	066744	000001	116321			1,,[TMSG < Access Control Violation>]
 10408	066745	000002	116327			2,,[TMSG < Invalid Buffer Name>]
 10409	066746	000003	116335			3,,[TMSG < Buffer Length Violation>]
 10410	066747	000004	116343			4,,[TMSG < Packet Size Violation>]
 10411	066750	000006	116351			6,,[TMSG < Local Unrecognized Cmd>]
 10412	066751	000017	116361			17,,[TMSG < Port Disabled During Processing>]
 10413	066752	000007	116370			7,,[TMSG < Internal port hardware error>]
 10414	066753	000010	116376			10,,[TMSG < Invalid remote port>]
 10415	066754	000011	116402			11,,[TMSG < CRC error>]
 10416	066755	000012	116406			12,,[TMSG < No legal path>]
 10417	066756	000041	116416			41,,[TMSG < Path B - Remote Unrecognized Cmd>]
 10418	066757	000042	116426			42,,[TMSG < Path B - Virtual Circuit Closed>]
 10419	066760	000043	116436			43,,[TMSG < Path B - Retries Exhausted (NAK)>]
 10420	066761	000044	116446			44,,[TMSG < Path B - Retries Exhausted (NRSP)>]
 10421	066762	000101	116456			101,,[TMSG < Path A - Remote Unrecognized Cmd>]
 10422	066763	000102	116466			102,,[TMSG < Path A - Virtual Circuit Closed>]
 10423	066764	000103	116476			103,,[TMSG < Path A - Retries Exhausted (NAK)>]
 10424	066765	000104	116506			104,,[TMSG < Path A - Retries Exhausted (NRSP)>]
 10425	066766	000142	116516			142,,[TMSG < Path A/B - Virtual Circuit Closed>]
 10426	066767	000143	116527			143,,[TMSG < Path A/B - Retries Exhausted (NAK)>]
 10427	066770	000144	116540			144,,[TMSG < Path A/B - Retries Exhausted (NRSP)>]
 10428	066771	777777	777777			-1
 10429
 10430
 10431					;#********************************************************************
 10432					;* PMISC - Print miscellaneous data at the end of a packet
 10433					;
 10434					; AC1 - Points to address to start printing
 10435					; PK -  Points to address of start of packet
 10436					;#********************************************************************
 10437
 10438	066772	261 17 0 00 000000 	PMISC:	RPUT	(0,1,2,3)		; save AC's
 10439
 10440	066776	037 00 0 00 116541 		TMSGC	< Packet Data:>		; print heading
 10441	066777	201 02 0 00 000004 		MOVEI	2,4			; initialize word number
 10442	067000	037 00 0 00 116545 	PMISC0:	TMSGC	< +>			; print word count
 10443	067001	200 00 0 00 000002 		MOVE	2			; get word number
 10444	067002	037 16 0 00 000003 		PNTOCS				; print it
 10445	067003	037 00 0 00 111633 		TMSG	</ >
 10446	067004	200 00 0 01 000000 		MOVE	(1)			; get packet data
 10447	067005	037 13 0 00 000000 		PNTHW				; print it
 10448	067006	350 00 0 00 000001 		AOS	1			; point to next word
 10449	067007	350 00 0 00 000002 		AOS	2			; increment word count
 10450	067010	315 02 0 00 000003 		CAMGE	2,3			; done yet?
 10451	067011	254 00 0 00 067000 		JRST	PMISC0			; no - loop till done
 10452	067012	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
 10453
 10454	067016	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 241
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0417

 10455
 10456					;#********************************************************************
 10457					;* PFLAGS - Print flags field (AC1 contains status byte (right justified))
 10458					;#********************************************************************
 10459
 10460	067017	261 17 0 00 000000 	PFLAGS:	RPUT	(0,1,2,3)		; save AC's
 10461
 10462	067023	200 01 0 12 000003 		MOVE	1,3(PK)			; get word
 10463	067024	135 01 0 00 116546 		LDB	1,[POINT 8,1,15]	; get flags byte
 10464	067025	037 00 0 00 116547 		TMSGC	<   Flags:  >
 10465	067026	606 01 0 00 000200 		TRNN	1,200			; packet size bit set?
 10466	067027	037 00 0 00 116552 		TMSG	<512. bytes>		; no - 512 bytes
 10467	067030	602 01 0 00 000200 		TRNE	1,200			; packet size bit set?
 10468	067031	037 00 0 00 116555 		TMSG	<576. bytes>		; yes - 576 bytes
 10469	067032	606 01 0 00 000100 		TRNN	1,100			; format flag set?
 10470	067033	037 00 0 00 116560 		TMSG	<, COMPAT mode>		; no - industry compatible mode
 10471	067034	602 01 0 00 000100 		TRNE	1,100			; format flag set?
 10472	067035	037 00 0 00 116563 		TMSG	<, HIDEN mode>		; yes - high density mode
 10473	067036	037 00 0 00 116566 		TMSG	<, M=>
 10474	067037	135 00 0 00 116567 		LDB	[POINT 3,1,31]		; get M field
 10475	067040	037 16 0 00 000003 		PNTOCS
 10476	067041	135 02 0 00 116570 		LDB	2,[POINT 2,1,34]	; get path select field
 10477						XCT	[TMSG	<, Auto path>	; print it
 10478							 TMSG	<, Path A>
 10479							 TMSG	<, Path B>
 10480	067042	256 00 0 02 116603 			 TMSG	<, Undefined>](2)
 10481	067043	037 00 0 00 116607 		TMSG	<, Rsp requested=>
 10482	067044	606 01 0 00 000001 		TRNN	1,1			; response requested?
 10483	067045	037 00 0 00 116613 		TMSG	<No>			; no - print such
 10484	067046	602 01 0 00 000001 		TRNE	1,1			; response requested?
 10485	067047	037 00 0 00 116614 		TMSG	<Yes>			; yes - print such
 10486	067050	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
 10487
 10488	067054	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 242
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0418

 10489
 10490					;#********************************************************************
 10491					;* OPCPNT - Print opcode of command packet
 10492					;
 10493					; OP - Contains opcode
 10494					;#********************************************************************
 10495
 10496	067055	261 17 0 00 000000 	OPCPNT:	RPUT	(0,1)			; save AC's
 10497
 10498	067057	200 00 0 00 000011 		MOVE	OP			; get op code
 10499	067060	037 16 0 00 000003 		PNTOCS				; print it
 10500	067061	037 00 0 00 103613 		TMSG	<->
 10501	067062	201 01 0 00 067104 		MOVEI	1,CMDOPC-1		; get cmd packet table
 10502	067063	336 00 0 00 120716'		SKIPN	CMDPAK			; command packet?
 10503	067064	201 01 0 00 067130 		MOVEI	1,RSPOPC-1		; no - get rsp packet table
 10504	067065	350 00 0 00 000001 	OPCPN0:	AOS	1			; point to next entry
 10505	067066	554 00 0 01 000000 		HLRZ	(1)			; get entry
 10506	067067	322 00 0 00 067076 		JUMPE	OPCPNE			; done? yes - error
 10507	067070	312 00 0 00 000011 		CAME	OP			; correct?
 10508	067071	254 00 0 00 067065 		JRST	OPCPN0			; no - look at next entry
 10509	067072	550 01 0 01 000000 		HRRZ	1,(1)			; get address of message
 10510	067073	200 01 0 01 000000 		MOVE	1,(1)			; get message
 10511	067074	256 00 0 00 000001 		XCT	1			; print it
 10512	067075	254 00 0 00 067102 		JRST	OPCPNX			; exit
 10513	067076	037 00 0 00 116615 	OPCPNE:	TMSG	<??>
 10514	067077	200 00 0 00 000011 		MOVE	OP
 10515	067100	037 16 0 00 000003 		PNTOCS
 10516	067101	037 00 0 00 116615 		TMSG	<??>
 10517	067102	262 17 0 00 000001 	OPCPNX:	RGET	(1,0)			; restore AC's
 10518
 10519	067104	263 17 0 00 000000 		RTN				; return
 10520
 10521					; Table of command queue opcodes
 10522
 10523	067105	000001	116620		CMDOPC:	SNDDG,,[TMSG <SNDDG>]
 10524	067106	000002	116623			SNDMSG,,[TMSG <SNDMSG>]
 10525	067107	000005	116626			REQID,,[TMSG <REQID>]
 10526	067110	000006	116631			SNDRST,,[TMSG <SNDRST>]
 10527	067111	000007	116634			SNDSTR,,[TMSG <SNDSTRT>]
 10528	067112	000010	116637			REQDT0,,[TMSG <REQDAT0>]
 10529	067113	000011	116642			REQDT1,,[TMSG <REQDAT1>]
 10530	067114	000012	116645			REQDT2,,[TMSG <REQDAT2>]
 10531	067115	000015	116650			SNDLB,,[TMSG <SNDLB>]
 10532	067116	000016	116653			REQMDT,,[TMSG <REQMDAT>]
 10533	067117	000020	116656			SNDDAT,,[TMSG <SNDDAT>]
 10534	067120	000021	116661			RETDAT,,[TMSG <RETDAT>]
 10535	067121	000022	116664			SNDMDT,,[TMSG <SNDMDAT>]
 10536	067122	000030	116667			CLSBUF,,[TMSG <CLSBUF>]
 10537	067123	000200	116672			SETCKT,,[TMSG <SETCKT>]
 10538	067124	000201	116675			SETCNT,,[TMSG <SETCNT>]
 10539	067125	000202	116700			RDCNT,,[TMSG <RDCNT>]
 10540	067126	000203	116703			RDREG,,[TMSG <RDREG>]
 10541	067127	000204	116706			WRREG,,[TMSG <WRREG>]
 10542	067130	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 243
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0419

 10543
 10544					; Table of response queue opcodes
 10545
 10546	067131	000001	116711		RSPOPC:	DGSNT,,[TMSG <DGSNT>]
 10547	067132	000002	116714			MSGSNT,,[TMSG <MSGSNT>]
 10548	067133	000003	116717			CNFRET,,[TMSG <CNFRET>]
 10549	067134	000004	116721			MCNF,,[TMSG <MCNF>]
 10550	067135	000005	116724			IDREQ,,[TMSG <IDREQ>]
 10551	067136	000006	116727			RSTSNT,,[TMSG <RSTSNT>]
 10552	067137	000007	116732			STRSNT,,[TMSG <STRTSNT>]
 10553	067140	000010	116735			DATRQ0,,[TMSG <DATREQ0>]
 10554	067141	000011	116740			DATRQ1,,[TMSG <DATREQ1>]
 10555	067142	000012	116743			DATRQ2,,[TMSG <DATREQ2>]
 10556	067143	000013	116746			IDREC,,[TMSG <IDREC>]
 10557	067144	000014	116751			DATREC,,[TMSG <DATREC>]
 10558	067145	000015	116754			LBSNT,,[TMSG <LBSNT>]
 10559	067146	000016	116757			MDATRQ,,[TMSG <MDATREQ>]
 10560	067147	000020	116762			DATSNT,,[TMSG <DATSNT>]
 10561	067150	000021	116765			DATRET,,[TMSG <DATRET>]
 10562	067151	000022	116770			MDTSNT,,[TMSG <MDATSNT>]
 10563	067152	000023	116773			RTMDAT,,[TMSG <RETMDAT>]
 10564	067153	000030	116776			BUFCLS,,[TMSG <BUFCLS>]
 10565	067154	000200	117001			CKTSET,,[TMSG <CKTSET>]
 10566	067155	000201	117004			CNTSET,,[TMSG <CNTSET>]
 10567	067156	000202	117007			CNTRD,,[TMSG <CNTRD>]
 10568	067157	000203	117012			REGRD,,[TMSG <REGRD>]
 10569	067160	000204	117015			REGWR,,[TMSG <REGWR>]
 10570
 10571	067161	000041	116711			DGSNT+40,,[TMSG <DGSNT>]
 10572	067162	000042	116714			MSGSNT+40,,[TMSG <MSGSNT>]
 10573	067163	000043	116717			CNFRET+40,,[TMSG <CNFRET>]
 10574	067164	000044	116721			MCNF+40,,[TMSG <MCNF>]
 10575	067165	000045	116724			IDREQ+40,,[TMSG <IDREQ>]
 10576	067166	000046	116727			RSTSNT+40,,[TMSG <RSTSNT>]
 10577	067167	000047	116732			STRSNT+40,,[TMSG <STRTSNT>]
 10578	067170	000050	116735			DATRQ0+40,,[TMSG <DATREQ0>]
 10579	067171	000051	116740			DATRQ1+40,,[TMSG <DATREQ1>]
 10580	067172	000052	116743			DATRQ2+40,,[TMSG <DATREQ2>]
 10581	067173	000053	116746			IDREC+40,,[TMSG <IDREC>]
 10582	067174	000054	116751			DATREC+40,,[TMSG <DATREC>]
 10583	067175	000055	116754			LBSNT+40,,[TMSG <LBSNT>]
 10584	067176	000056	116757			MDATRQ+40,,[TMSG <MDATREQ>]
 10585	067177	000060	116762			DATSNT+40,,[TMSG <DATSNT>]
 10586	067200	000061	116765			DATRET+40,,[TMSG <DATRET>]
 10587	067201	000062	116770			MDTSNT+40,,[TMSG <MDATSNT>]
 10588	067202	000063	116773			RTMDAT+40,,[TMSG <RETMDAT>]
 10589	067203	000070	116776			BUFCLS+40,,[TMSG <BUFCLS>]
 10590	067204	000240	117001			CKTSET+40,,[TMSG <CKTSET>]
 10591	067205	000241	117004			CNTSET+40,,[TMSG <CNTSET>]
 10592	067206	000242	117007			CNTRD+40,,[TMSG <CNTRD>]
 10593	067207	000243	117012			REGRD+40,,[TMSG <REGRD>]
 10594	067210	000244	117015			REGWR+40,,[TMSG <REGWR>]
 10595	067211	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 244
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0420

 10596
 10597					;#********************************************************************
 10598					;* DECOPC - Decode op code
 10599					;
 10600					; Given:  OP - Contains op code to decode
 10601					;
 10602					; Returns:  AC1 - Contains offset address of opcode (0..n)
 10603					;	    AC2 - Contains 0 - Sent
 10604					;			   1 - Received (as a response ...)
 10605					;			   2 - Received (from another port)
 10606					;	    +1 - No match
 10607					;	    +2 - Match
 10608					;#********************************************************************
 10609
 10610	067212	261 17 0 00 000000 	DECOPC:	PUT	0			; save AC0
 10611	067213	201 01 0 00 067227 		MOVEI	1,DECTAB-1		; initialize table address
 10612	067214	350 00 0 00 000001 	DECOP0:	AOS	1			; point to next entry
 10613	067215	336 00 0 01 000000 		SKIPN	(1)			; end of list?
 10614	067216	254 00 0 00 067226 		JRST	DECOPX			; yes - exit +1 (error)
 10615	067217	550 00 0 01 000000 		HRRZ	(1)			; get op code
 10616	067220	312 00 0 00 000011 		CAME	OP			; match?
 10617	067221	254 00 0 00 067214 		JRST	DECOP0			; no - loop till done
 10618	067222	200 02 0 01 000000 		MOVE	2,(1)			; get data
 10619	067223	135 01 0 00 117016 		LDB	1,[POINT 15,2,17]	; get offset
 10620	067224	135 02 0 00 117017 		LDB	2,[POINT 3,2,2]		; get type
 10621	067225	350 00 0 17 777777 		AOS	-1(P)			; set up return +2
 10622	067226	262 17 0 00 000000 	DECOPX:	GET	0			; restore AC0
 10623	067227	263 17 0 00 000000 		RTN				; exit
 10624
 10625					; Table of op codes (for sending packets)
 10626
 10627	067230	000000	000001		DECTAB:	0B2!0B17!SNDDG			; 0
 10628	067231	000001	000002			0B2!1B17!SNDMSG			; 1
 10629	067232	000002	000005			0B2!2B17!REQID			; 2
 10630	067233	000003	000006			0B2!3B17!SNDRST			; 3
 10631	067234	000004	000007			0B2!4B17!SNDSTR			; 4
 10632	067235	000005	000010			0B2!5B17!REQDT0			; 5
 10633	067236	000006	000011			0B2!6B17!REQDT1			; 6
 10634	067237	000007	000012			0B2!7B17!REQDT2			; 7
 10635	067240	000010	000015			0B2!10B17!SNDLB			; 10
 10636	067241	000011	000016			0B2!11B17!REQMDT		; 11
 10637	067242	000012	000020			0B2!12B17!SNDDAT		; 12
 10638	067243	000013	000021			0B2!13B17!RETDAT		; 13
 10639	067244	000014	000022			0B2!14B17!SNDMDT		; 14
 10640	067245	000015	000030			0B2!15B17!CLSBUF		; 15
 10641	067246	000016	000200			0B2!16B17!SETCKT		; 16
 10642	067247	000017	000201			0B2!17B17!SETCNT		; 17
 10643	067250	000020	000202			0B2!20B17!RDCNT			; 20
 10644	067251	000021	000203			0B2!21B17!RDREG			; 21
 10645	067252	000022	000204			0B2!22B17!WRREG			; 22
 10646
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 245
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0421

 10647	067253	100023	000003			1B2!23B17!CNFRET		; 23
 10648	067254	100024	000004			1B2!24B17!MCNF			; 24
 10649	067255	100025	000013			1B2!25B17!IDREC			; 25
 10650	067256	100026	000014			1B2!26B17!DATREC		; 26
 10651	067257	100027	000023			1B2!27B17!RTMDAT		; 27
 10652
 10653	067260	200000	000041			2B2!0B17!DGSNT+40		; 0
 10654	067261	200001	000042			2B2!1B17!MSGSNT+40		; 1
 10655	067262	200023	000043			2B2!23B17!CNFRET+40		; 23
 10656	067263	200024	000044			2B2!24B17!MCNF+40		; 24
 10657	067264	200025	000045			2B2!25B17!IDREQ+40		; 25
 10658	067265	200003	000046			2B2!3B17!RSTSNT+40		; 3
 10659	067266	200004	000047			2B2!4B17!STRSNT+40		; 4
 10660	067267	200005	000050			2B2!5B17!DATRQ0+40		; 5
 10661	067270	200006	000051			2B2!6B17!DATRQ1+40		; 6
 10662	067271	200007	000052			2B2!7B17!DATRQ2+40		; 7
 10663	067272	200025	000053			2B2!25B17!IDREC+40		; 25
 10664	067273	200026	000054			2B2!26B17!DATREC+40		; 26
 10665	067274	200010	000055			2B2!10B17!LBSNT+40		; 10
 10666	067275	200011	000056			2B2!11B17!MDATRQ+40		; 11
 10667	067276	200012	000060			2B2!12B17!DATSNT+40		; 12
 10668	067277	200013	000061			2B2!13B17!DATRET+40		; 13
 10669	067300	200014	000062			2B2!14B17!MDTSNT+40		; 14
 10670	067301	200027	000063			2B2!27B17!RTMDAT+40		; 27
 10671	067302	200015	000070			2B2!15B17!BUFCLS+40		; 15
 10672	067303	200016	000240			2B2!16B17!CKTSET+40		; 16
 10673	067304	200017	000241			2B2!17B17!CNTSET+40		; 17
 10674	067305	200020	000242			2B2!20B17!CNTRD+40		; 20
 10675	067306	200021	000243			2B2!21B17!REGRD+40		; 21
 10676	067307	200022	000244			2B2!22B17!REGWR+40		; 22
 10677	067310	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 246
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0422

 10678
 10679					;#********************************************************************
 10680					;* PXCTID - Print 2 word XCT ID in words 4/5
 10681					;#********************************************************************
 10682
 10683	067311	261 17 0 00 000000 	PXCTID:	PUT	0			; save AC0
 10684	067312	037 00 0 00 117020 		TMSGC	< XCT-ID:  >
 10685	067313	200 00 0 12 000004 		MOVE	4(PK)			; get first word
 10686	067314	242 00 0 00 777774 		LSH	-4			; position properly
 10687	067315	037 16 0 00 000003 		PNTOCS				; print it
 10688	067316	037 00 0 00 103540 		TMSG	< >
 10689	067317	200 00 0 12 000005 		MOVE	5(PK)			; get second word
 10690	067320	242 00 0 00 777774 		LSH	-4			; position properly
 10691	067321	037 16 0 00 000003 		PNTOCS				; print it
 10692	067322	262 17 0 00 000000 		GET	0			; restore AC0
 10693	067323	263 17 0 00 000000 		RTN				; return
 10694
 10695
 10696					;#********************************************************************
 10697					;* PHEAD - Print header info of a packet
 10698					;#********************************************************************
 10699
 10700	067324	261 17 0 00 000000 	PHEAD:	RPUT	(0,1)			; save AC's
 10701
 10702
 10703					; Print Flink/Blink
 10704
 10705	067326	037 00 0 00 117023 		TMSGC	< Flink = >
 10706	067327	200 01 0 12 000000 		MOVE	1,(PK)			; get FLINK
 10707	067330	260 17 0 00 067420 		GO	LINKP			; print it
 10708	067331	037 00 0 00 117026 		TMSG	< / Blink = >
 10709	067332	200 01 0 12 000001 		MOVE	1,1(PK)			; get BLINK
 10710	067333	260 17 0 00 067420 		GO	LINKP			; print it
 10711	067334	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
 10712
 10713	067336	263 17 0 00 000000 		RTN				; return
 10714
 10715
 10716					;#********************************************************************
 10717					;* PPORTO - Print opcode and port in packet printout
 10718					;#********************************************************************
 10719
 10720	067337	261 17 0 00 000000 	PPORTO:	RPUT	(0,1)			; save AC's
 10721
 10722	067341	037 00 0 00 117031 		TMSGC	< Status word:  OpCode = >
 10723	067342	260 17 0 00 067055 		GO	OPCPNT			; print OP CODE
 10724	067343	037 00 0 00 117037 		TMSG	<, Port = >
 10725	067344	200 01 0 12 000003 		MOVE	1,3(PK)			; get status word
 10726	067345	135 00 0 00 116174 		LDB	[POINT 8,1,31]		; get port number
 10727	067346	037 16 0 00 000003 		PNTOCS				; print it
 10728	067347	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
 10729
 10730	067351	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 247
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0423

 10731
 10732					;#********************************************************************
 10733					;* PTEXT - Print text of a command packet
 10734					;#********************************************************************
 10735
 10736	067352	261 17 0 00 000000 	PTEXT:	RPUT	(0,1,2,3)		; save AC's
 10737
 10738	067356	037 00 0 00 117041 		TMSGC	< Text length:  >
 10739	067357	200 00 0 12 000004 		MOVE	4(PK)			; get length
 10740	067360	037 15 0 00 000000 		PNTDEC				; print it
 10741	067361	037 00 0 00 117045 		TMSG	<. bytes>
 10742	067362	200 00 0 12 000004 		MOVE	4(PK)			; get length
 10743	067363	322 00 0 00 067413 		JUMPE	PTEXTX			; zero? yes - exit
 10744	067364	242 00 0 00 000001 		LSH	1			; multiply by 2
 10745	067365	200 02 0 12 000003 		MOVE	2,3(PK)			; get status word
 10746	067366	607 02 0 00 001000 		TLNN	2,1000			; COMPAT format?
 10747	067367	231 00 0 00 000010 		IDIVI	8			; yes - calculate # words of text
 10748	067370	603 02 0 00 001000 		TLNE	2,1000			; HIDEN format?
 10749	067371	231 00 0 00 000011 		IDIVI	9			; yes - and divide by 9
 10750	067372	332 00 0 00 000001 		SKIPE	1			; remainder?
 10751	067373	271 00 0 00 000001 		ADDI	1			; yes - increase by 1 word
 10752	067374	202 00 0 00 000002 		MOVEM	2			; save length in AC2
 10753	067375	311 02 0 00 034016 		CAML	2,DSPRIN		; less than number to print?
 10754	067376	200 02 0 00 034016 		MOVE	2,DSPRIN		; no - only print selected number
 10755	067377	037 00 0 00 117047 		TMSGC	< Text:>
 10756	067400	201 03 0 12 000005 		MOVEI	3,5(PK)			; get address of text
 10757	067401	400 01 0 00 000000 		SETZ	1,			; clear word count
 10758	067402	037 00 0 00 112413 	PTEXT0:	TMSG	<  >
 10759	067403	200 00 0 03 000000 		MOVE	(3)			; get the data
 10760	067404	037 13 0 00 000000 		PNTHW				; print the word
 10761	067405	350 00 0 00 000003 		AOS	3			; point to next word
 10762	067406	350 00 0 00 000001 		AOS	1			; increment word count
 10763	067407	363 02 0 00 067413 		SOJLE	2,PTEXTX		; done? yes - exit
 10764	067410	606 01 0 00 000003 		TRNN	1,3			; multiple of 4 words?
 10765	067411	037 00 0 00 117051 		TMSGC	<      >		; yes - start a new line
 10766	067412	254 00 0 00 067402 		JRST	PTEXT0			; loop till done
 10767	067413	262 17 0 00 000003 	PTEXTX:	RGET	(3,2,1,0)		; restore AC's
 10768
 10769	067417	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 248
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0424

 10770
 10771					;#********************************************************************
 10772					;* LINKP - Print FLINK/BLINK data as PCB+n or BUFF+n
 10773					;
 10774					; Given:  AC1 - Contains the LINK data
 10775					;#********************************************************************
 10776
 10777	067420	261 17 0 00 000000 	LINKP:	RPUT	(0,1)			; save AC's
 10778
 10779	067422	260 17 0 00 065752 		GO	CONVIR			; convert to virtual address
 10780	067423	200 00 0 00 000001 		MOVE	1			; get into AC0
 10781	067424	301 01 0 00 071047 		CAIL	1,BUFF			; in buffer area?
 10782						JRST	[TMSG	<BUFF+>		; yes - print as
 10783							 SUBI	BUFF		;   BUFF+n
 10784	067425	254 00 0 00 117055 			 JRST	LINKPX]
 10785	067426	037 00 0 00 117060 		TMSG	<PCB+>			; no - print as 
 10786	067427	275 00 0 00 070000 		SUBI	PCB			;   PCB+n
 10787	067430	037 16 0 00 000003 	LINKPX:	PNTOCS				; print it
 10788	067431	262 17 0 00 000001 		RGET	(1,0)			; restore AC's
 10789
 10790	067433	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 249
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0425

 10791
 10792					;#********************************************************************
 10793					;* PPCB - Print current data in the PCB
 10794					;
 10795					; All of the addresses are printed as virtual addresses, and FLINK
 10796					; and BLINK words are printed as 'PCB+n' or 'BUFF+n'.
 10797					;#********************************************************************
 10798
 10799	067434	261 17 0 00 000000 	PPCB:	RPUT	(0,1,2,3,4)		; save AC's
 10800
 10801	067441	037 00 0 00 117061 		TMSGC	<PCB:>
 10802	067442	037 00 0 00 117063 		TMSGC	< BDT Start Adr:>
 10803	067443	001 11 0 00 070000 		PNTOCC	11,PCB			; print address
 10804	067444	037 00 0 00 117067 		TMSGC	< MFQ Entry Len:>
 10805	067445	001 11 0 00 070001 		PNTOCC	11,PCB+1		; print length
 10806	067446	037 00 0 00 117073 		TMSGC	< DFQ Entry Len:>
 10807	067447	001 11 0 00 070002 		PNTOCC	11,PCB+2		; print length
 10808	067450	037 00 0 00 117077 		TMSGC	< Port Err Wd0:>
 10809	067451	200 00 0 00 070035 		MOVE	PCB+^D29		; get error word
 10810	067452	037 13 0 00 000000 		PNTHW				; print it
 10811	067453	037 00 0 00 117103 		TMSGC	< Port Err Wd1:>
 10812	067454	200 00 0 00 070036 		MOVE	PCB+^D30		; get error word
 10813	067455	037 13 0 00 000000 		PNTHW				; print it
 10814	067456	037 00 0 00 117107 		TMSGC	< Port Err Wd2:>
 10815	067457	200 00 0 00 070037 		MOVE	PCB+^D31		; get error word
 10816	067460	037 13 0 00 000000 		PNTHW				; print it
 10817	067461	037 00 0 00 117113 		TMSGC	< Port Err Wd3:>
 10818	067462	200 00 0 00 070040 		MOVE	PCB+^D32		; get error word
 10819	067463	037 13 0 00 000000 		PNTHW				; print it
 10820	067464	037 00 0 00 117117 		TMSGC	< Port Err Wd4:>
 10821	067465	200 00 0 00 070041 		MOVE	PCB+^D33		; get error word
 10822	067466	037 13 0 00 000000 		PNTHW				; print it
 10823	067467	037 00 0 00 117123 		TMSGC	< PCB Base Addr:>
 10824	067470	200 01 0 00 070042 		MOVE	1,PCB+^D34		; get address
 10825	067471	260 17 0 00 065752 		GO	CONVIR			; convert to virtual
 10826	067472	001 11 0 00 000001 		PNTOCC	11,1			; print it
 10827	067473	037 00 0 00 117127 		TMSGC	< PI Level:     >
 10828	067474	001 11 0 00 070043 		PNTOCC	11,PCB+^D35		; print PI level
 10829	067475	037 00 0 00 117133 		TMSGC	< Reserved Word:>
 10830	067476	001 11 0 00 070044 		PNTOCC	11,PCB+^D36
 10831	067477	037 00 0 00 117137 		TMSGC	< CCW:          >
 10832	067500	200 00 0 00 070045 		MOVE	PCB+^D37		; get CCW
 10833	067501	037 13 0 00 000000 		PNTHW				; print it
 10834	067502	037 00 0 00 117133 		TMSGC	< Reserved Word:>
 10835	067503	001 11 0 00 070046 		PNTOCC	11,PCB+^D38		; print reserved word
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 250
DFCIA1	MAC	27-Oct-84 19:00		Queue Print Routines                                                               SEQ 0426

 10836
 10837	067504	037 00 0 00 117143 	PPCBD:	TMSGC	< #  Queue   PCB Addr    Interlock    Flink	 Blink>
 10838	067505	037 00 0 00 117156 		TMSGC	< -  -----   --------    ---------    -----	 ----->
 10839	067506	201 04 0 00 000004 		MOVEI	4,4			; initialize pointer into PCB
 10840	067507	400 03 0 00 000000 		SETZ	3,			; initialize queue number
 10841	067510	037 00 0 00 112240 	PPCB0:	TMSGC	< >			; start a new line
 10842	067511	200 00 0 00 000003 		MOVE	3			; get queue number
 10843	067512	037 16 0 00 000003 		PNTOCS				; print it
 10844	067513	037 00 0 00 112413 		TMSG	<  >
 10845	067514	256 00 0 03 067542 		XCT	PPCBP(3)		; print type of queue
 10846	067515	037 00 0 00 117171 		TMSG	<    PCB+>
 10847	067516	200 00 0 00 000004 		MOVE	4			; get PCB offset
 10848	067517	037 16 0 00 000003 		PNTOCS				; print it
 10849	067520	037 00 0 00 117173 		TMSG	<	>		; print a tab
 10850	067521	001 06 0 04 070000 		PNTOCC	6,PCB(4)		; print interlock
 10851	067522	037 00 0 00 112612 		TMSG	<       >
 10852	067523	200 01 0 04 070001 		MOVE	1,PCB+1(4)		; get flink
 10853	067524	260 17 0 00 067420 		GO	LINKP			; print it
 10854	067525	037 00 0 00 117174 		TMSG	<	 >		; print a tab
 10855	067526	200 01 0 04 070002 		MOVE	1,PCB+2(4)		; get flink
 10856	067527	260 17 0 00 067420 		GO	LINKP			; print it
 10857	067530	271 04 0 00 000003 		ADDI	4,3			; point to next queue location
 10858	067531	350 00 0 00 000003 		AOS	3			; point to next queue number
 10859	067532	305 03 0 00 000007 		CAIGE	3,7			; done yet?
 10860	067533	254 00 0 00 067510 		JRST	PPCB0			; no - loop till done
 10861	067534	262 17 0 00 000004 		RGET	(4,3,2,1,0)		; restore AC's
 10862
 10863	067541	263 17 0 00 000000 		RTN				; return
 10864
 10865	067542	037 00 0 00 117175 	PPCBP:	TMSG	<CmdQ3>
 10866	067543	037 00 0 00 117177 		TMSG	<CmdQ2>
 10867	067544	037 00 0 00 117201 		TMSG	<CmdQ1>
 10868	067545	037 00 0 00 117203 		TMSG	<CmdQ0>
 10869	067546	037 00 0 00 117205 		TMSG	<RspQ >
 10870	067547	037 00 0 00 117207 		TMSG	<MsgFQ>
 10871	067550	037 00 0 00 117211 		TMSG	<DgmFQ>
 10872
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 251
DFCIA1	MAC	27-Oct-84 19:00		Port Control Block and Data Areas                                                  SEQ 0427

 10873						SUBTTL	Port Control Block and Data Areas
 10874
 10875					;#********************************************************************
 10876					;* IPCB - PCB initial data
 10877					;#********************************************************************
 10878
 10879	067551	000000	000000		IPCB:	0				; 0 - BHD Table Base Address
 10880	067552	000000	000400			^D256				; 1 - Message FQ entry length (words)
 10881	067553	000000	000400			^D256				; 2 - Datagram FQ entry length (words)
 10882	067554	000000	000000			0				; 3 - reserved
 10883	067555	777777	777777			-1				; 4 - INTLK for CQ 3
 10884	067556	000000	070005			PCB+5				; 5 - FLINK for CQ 3
 10885	067557	000000	070005			PCB+5				; 6 - BLINK for CQ 3
 10886	067560	777777	777777			-1				; 7 - INTLK for CQ 2
 10887	067561	000000	070010			PCB+10				; 8 - FLINK for CQ 2
 10888	067562	000000	070010			PCB+10				; 9 - BLINK for CQ 2
 10889	067563	777777	777777			-1				; 10 - INTLK for CQ 1
 10890	067564	000000	070013			PCB+13				; 11 - FLINK for CQ 1
 10891	067565	000000	070013			PCB+13				; 12 - BLINK for CQ 1
 10892	067566	777777	777777			-1				; 13 - INTLK for CQ 0
 10893	067567	000000	070016			PCB+16				; 14 - FLINK for CQ 0
 10894	067570	000000	070016			PCB+16				; 15 - BLINK for CQ 0
 10895	067571	777777	777777			-1				; 16 - INTLK for Resp Q
 10896	067572	000000	070021			PCB+21				; 17 - FLINK for Resp Q
 10897	067573	000000	070021			PCB+21				; 18 - BLINK for Resp Q
 10898	067574	777777	777777			-1				; 19 - INTLK for MSG Free Q
 10899	067575	000000	071447			QFMG1				; 20 - FLINK for MSG Free Q
 10900	067576	000000	073047			QFMG4				; 21 - BLINK for MSG Free Q
 10901	067577	777777	777777			-1				; 22 - INTLK for DGM Free Q
 10902	067600	000000	073447			QFDG1				; 23 - FLINK for DGM Free Q
 10903	067601	000000	100047			QFDG12				; 24 - BLINK for DGM Free Q
 10904	067602	000000	000000			0				; 25 - reserved
 10905	067603	000000	000000			0				; 26 - reserved
 10906	067604	000000	000000			0				; 27 - reserved
 10907	067605	000000	000000			0				; 28 - reserved
 10908	067606	000000	000000			0				; 29 - Port Error Word 0
 10909	067607	000000	000000			0				; 30 - Port Error Word 1
 10910	067610	000000	000000			0				; 31 - Port Error Word 2
 10911	067611	000000	000000			0				; 32 - Port Error Word 3
 10912	067612	000000	000000			0				; 33 - Port Error Word 4
 10913	067613	000000	070000			PCB				; 34 - PCB base address
 10914	067614	000000	000004			4				; 35 - PIA interrupt level
 10915	067615	000000	000000			0				; 36 - reserved
 10916	067616	000000	000000			0				; 37 - CCW command word
 10917	067617	000000	000000			0				; 38 - reserved
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 252
DFCIA1	MAC	27-Oct-84 19:00		Port Control Block and Data Areas                                                  SEQ 0428

 10918
 10919					;#********************************************************************
 10920					;* PCB - Port Control Block
 10921					;#********************************************************************
 10922
 10923	070000				LOC	<.+1000>&777000
 10924
 10925	070000	000000	000000		PCB:	0				; 0 - BHD Table Base Address
 10926	070001	000000	000400			^D256				; 1 - Message FQ entry length (words)
 10927	070002	000000	000400			^D256				; 2 - Datagram FQ entry length (words)
 10928	070003	000000	000000			0				; 3 - reserved
 10929	070004	777777	777777			-1				; 4 - INTLK for CQ 3
 10930	070005	000000	070005			PCB+5				; 5 - FLINK for CQ 3
 10931	070006	000000	070005			PCB+5				; 6 - BLINK for CQ 3
 10932	070007	777777	777777			-1				; 7 - INTLK for CQ 2
 10933	070010	000000	070010			PCB+10				; 8 - FLINK for CQ 2
 10934	070011	000000	070010			PCB+10				; 9 - BLINK for CQ 2
 10935	070012	777777	777777			-1				; 10 - INTLK for CQ 1
 10936	070013	000000	070013			PCB+13				; 11 - FLINK for CQ 1
 10937	070014	000000	070013			PCB+13				; 12 - BLINK for CQ 1
 10938	070015	777777	777777			-1				; 13 - INTLK for CQ 0
 10939	070016	000000	070016			PCB+16				; 14 - FLINK for CQ 0
 10940	070017	000000	070016			PCB+16				; 15 - BLINK for CQ 0
 10941	070020	777777	777777			-1				; 16 - INTLK for Resp Q
 10942	070021	000000	070021			PCB+21				; 17 - FLINK for Resp Q
 10943	070022	000000	070021			PCB+21				; 18 - BLINK for Resp Q
 10944	070023	777777	777777			-1				; 19 - INTLK for MSG Free Q
 10945	070024	000000	071447		MFREE:	QFMG1				; 20 - FLINK for MSG Free Q
 10946	070025	000000	073047			QFMG4				; 21 - BLINK for MSG Free Q
 10947	070026	777777	777777			-1				; 22 - INTLK for DGM Free Q
 10948	070027	000000	073447		DFREE:	QFDG1				; 23 - FLINK for DGM Free Q
 10949	070030	000000	100047			QFDG12				; 24 - BLINK for DGM Free Q
 10950	070031	000000	000000			0				; 25 - reserved
 10951	070032	000000	000000			0				; 26 - reserved
 10952	070033	000000	000000			0				; 27 - reserved
 10953	070034	000000	000000			0				; 28 - reserved
 10954	070035	000000	000000			0				; 29 - Port Error Word 0
 10955	070036	000000	000000			0				; 30 - Port Error Word 1
 10956	070037	000000	000000			0				; 31 - Port Error Word 2
 10957	070040	000000	000000			0				; 32 - Port Error Word 3
 10958	070041	000000	000000			0				; 33 - Port Error Word 4
 10959	070042	000000	070000		PCBBAS:	PCB				; 34 - PCB base address
 10960	070043	000000	000004		PCBPI:	4				; 35 - PIA interrupt level
 10961	070044	000000	000000			0				; 36 - reserved
 10962	070045	000000	000000			0				; 37 - CCW command word
 10963	070046	000000	000000			0				; 38 - reserved
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 253
DFCIA1	MAC	27-Oct-84 19:00		Port Control Block and Data Areas                                                  SEQ 0429

 10964
 10965					;#*********************************************************************
 10966					; Data areas
 10967					;#*********************************************************************
 10968
 10969	070047				PACKET:	BLOCK	^D256			; packet being built
 10970	070447				RSPONS:	BLOCK	^D256			; response packet
 10971
 10972	071047				BUFF:	BLOCK	^D256			; buffer for reading/writing
 10973
 10974
 10975					;#********************************************************************
 10976					;* Datagram and Message free queues
 10977					;#********************************************************************
 10978
 10979	071447				MGSTAR:					; start of message free queue
 10980	071447	000000	072047		QFMG1:	QFMG2				; FLINK
 10981	071450	000000	070024			MFREE				; BLINK
 10982	071451					BLOCK	^D254			; remainder of entry
 10983	072047	000000	072447		QFMG2:	QFMG3				; FLINK
 10984	072050	000000	071447			QFMG1				; BLINK
 10985	072051					BLOCK	^D254			; remainder of entry
 10986	072447	000000	073047		QFMG3:	QFMG4				; FLINK
 10987	072450	000000	072047			QFMG2				; BLINK
 10988	072451					BLOCK	^D254			; remainder of entry
 10989	073047	000000	070024		QFMG4:	MFREE				; FLINK
 10990	073050	000000	072447			QFMG3				; BLINK
 10991	073051					BLOCK	^D253			; remainder of entry
 10992	073446	000000	000000		MGEND:	0				; end of message free queue
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 254
DFCIA1	MAC	27-Oct-84 19:00		Port Control Block and Data Areas                                                  SEQ 0430

 10993
 10994	073447				DGSTAR:					; start of datagram free queue
 10995	073447	000000	074047		QFDG1:	QFDG2				; FLINK
 10996	073450	000000	070027			DFREE				; BLINK
 10997	073451					BLOCK	^D254			; remainder of entry
 10998	074047	000000	074447		QFDG2:	QFDG3				; FLINK
 10999	074050	000000	073447			QFDG1				; BLINK
 11000	074051					BLOCK	^D254			; remainder of entry
 11001	074447	000000	075047		QFDG3:	QFDG4				; FLINK
 11002	074450	000000	074047			QFDG2				; BLINK
 11003	074451					BLOCK	^D254			; remainder of entry
 11004	075047	000000	075447		QFDG4:	QFDG5				; FLINK
 11005	075050	000000	074447			QFDG3				; BLINK
 11006	075051					BLOCK	^D254			; remainder of entry
 11007	075447	000000	076047		QFDG5:	QFDG6				; FLINK
 11008	075450	000000	075047			QFDG4				; BLINK
 11009	075451					BLOCK	^D254			; remainder of entry
 11010	076047	000000	076447		QFDG6:	QFDG7				; FLINK
 11011	076050	000000	075447			QFDG5				; BLINK
 11012	076051					BLOCK	^D254			; remainder of entry
 11013	076447	000000	077047		QFDG7:	QFDG10				; FLINK
 11014	076450	000000	076047			QFDG6				; BLINK
 11015	076451					BLOCK	^D254			; remainder of entry
 11016	077047	000000	077447		QFDG10:	QFDG11				; FLINK
 11017	077050	000000	076447			QFDG7				; BLINK
 11018	077051					BLOCK	^D254			; remainder of entry
 11019	077447	000000	100047		QFDG11:	QFDG12				; FLINK
 11020	077450	000000	077047			QFDG10				; BLINK
 11021	077451					BLOCK	^D254			; remainder of entry
 11022	100047	000000	070027		QFDG12:	DFREE				; FLINK
 11023	100050	000000	077447			QFDG11				; BLINK
 11024	100051					BLOCK	^D253			; remainder of entry
 11025	100446	000000	000000		DGEND:	0				; end of datagram free queue
 11026
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 255
DFCIA1	MAC	27-Oct-84 19:00		SPEAR Reporting                                                                    SEQ 0431

 11027						SUBTTL	SPEAR Reporting
 11028
 11029					;#********************************************************************
 11030					;* SPREP1 - Print initial SPEAR report 'diagnostic started'
 11031					;#********************************************************************
 11032
 11033	100447	332 00 0 00 121012'	SPREP1:	SKIPE	UDEBUG			; debug mode?
 11034	100450	263 17 0 00 000000 		RTN				; yes - return
 11035	100451	332 00 0 00 030037 		SKIPE	USER			; exec mode?
 11036	100452	332 00 0 00 121001'		SKIPE	SPEAR1			; already done?
 11037	100453	263 17 0 00 000000 		RTN				; yes - return
 11038
 11039					; Check switches first
 11040
 11041	100454	261 17 0 00 000000 		RPUT	(0,1)			; save AC's
 11042
 11043	100456	260 17 0 00 042452*		GO	SWITT			; get program switches
 11044	100457	602 00 0 00 004000 		TRNE	DSPEAR			; SPEAR reporting disabled?
 11045	100460	254 00 0 00 100471 		JRST	SPRE1X			; yes - exit
 11046
 11047					; Get PPN and build entry / get time and insert it
 11048
 11049	100461	260 17 0 00 100653 	SPCHK1:	GO	GETPPN			; get user's PPN
 11050	100462	202 01 0 00 100506 		MOVEM	1,SENT10+11+1		; save in SPEAR entry block
 11051	100463	104 00 0 00 000227 		GTAD				; get time and day
 11052	100464	202 01 0 00 100502 		MOVEM	1,SENT10+5+1		; save it
 11053
 11054					; Make the entry
 11055
 11056	100465	201 01 0 00 100474 		MOVEI	1,SENT10		; get address of argument block
 11057	100466	201 02 0 00 000013 		MOVEI	2,^D10+1		; get length
 11058	100467	104 00 0 00 000527 	S1:	SYERR				; write to SYSERR file
 11059
 11060					; Exit
 11061
 11062	100470	476 00 0 00 121001'		SETOM	SPEAR1			; set 'SPEAR initial msg done' flag
 11063	100471	262 17 0 00 000001 	SPRE1X:	RGET	(1,0)			; restore AC's
 11064
 11065	100473	263 17 0 00 000000 		RTN				; return
 11066
 11067					; SPEAR entry block 10
 11068
 11069	100474	250000	000000		SENT10:	250000,,0			; event type
 11070	100475	000000	000000			0				; zero
 11071	100476	000000	000000			0				; zero
 11072	100477	000000	000000			0				; zero
 11073	100500	000000	000000			0				; (for Release 6.0 or later)
 11074	100501	000000	020002			20002				; time of occurence block
 11075	100502	000000	000000			0				; time
 11076	100503	000000	100004			0,,100004			; 4 words, type 10 code
 11077	100504	44 46 43 51 41 00 		SIXBIT	/DFCIA/			; diagnostic name
 11078	100505	000003	000000			MCNVER,,DECVER			; diagnostic version
 11079	100506	000000	000000			0				; user PPN
 11080	100507	000000	000000			0
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 256
DFCIA1	MAC	27-Oct-84 19:00		SPEAR Reporting                                                                    SEQ 0432

 11081
 11082					;#********************************************************************
 11083					;* SPREP2 - Print error or successful completion SPEAR report
 11084					;#********************************************************************
 11085
 11086	100510	336 00 0 00 121012'	SPREP2:	SKIPN	UDEBUG			; debug mode?
 11087	100511	336 00 0 00 030037 		SKIPN	USER			; exec mode?
 11088	100512	263 17 0 00 000000 		RTN				; yes - return
 11089
 11090					; First check if anything should be reported now
 11091
 11092	100513	261 17 0 00 000000 		PUT	0			; save AC0
 11093	100514	200 00 0 00 121002'		MOVE	SPEAR2			; get reporting flag
 11094	100515	322 00 0 00 100521 		JUMPE	SPRE2A			; nothing yet? yes - continue
 11095	100516	316 00 0 00 111025 		CAMN	[-1]			; already reported an error?
 11096						JRST	[GET			; yes - exit
 11097	100517	254 00 0 00 117213 			 RTN]
 11098						JUMPE	ERFLG,[GET		; error this time? no - exit
 11099	100520	322 15 0 00 117213 			       RTN]
 11100
 11101					; Check switches
 11102
 11103	100521	261 17 0 00 000001 	SPRE2A:	RPUT	(1,2,3,4)		; save AC's
 11104
 11105	100525	260 17 0 00 100456*		GO	SWITT			; get program switches
 11106	100526	602 00 0 00 004000 		TRNE	DSPEAR			; SPEAR reporting disabled?
 11107	100527	254 00 0 00 100603 		JRST	SPRE2X			; yes - exit
 11108
 11109					; Initialize entry
 11110
 11111	100530	402 00 0 00 100625 	SPCHK2:	SETZM	SENT11+^D11+1		; clear test number
 11112	100531	402 00 0 00 100627 		SETZM	SENT11+^D13+1		;  ...
 11113	100532	201 02 0 00 000003 		MOVEI	2,3			; set block length to 3 words
 11114	100533	137 02 0 00 117215 		DPB	2,[POINT 9,SEN11L,35]	; save length
 11115	100534	322 15 0 00 100567 		JUMPE	ERFLG,SPRE2C		; error? no - continue
 11116
 11117					; Insert test name
 11118
 11119	100535	200 01 0 00 117216 		MOVE	1,[SIXBIT /TST0  /]	; get SIXBIT 'TST'
 11120	100536	135 00 0 00 117217 		LDB	[POINT 3,TSTNUM,29]	; get digit 1
 11121	100537	271 00 0 00 000020 		ADDI	20			; convert to SIXBIT
 11122	100540	137 00 0 00 117220 		DPB	[POINT 6,1,23]		; save it
 11123	100541	135 00 0 00 117221 		LDB	[POINT 3,TSTNUM,32]	; get digit 2
 11124	100542	271 00 0 00 000020 		ADDI	20			; convert to SIXBIT
 11125	100543	137 00 0 00 117222 		DPB	[POINT 6,1,29]		; save it
 11126	100544	135 00 0 00 117223 		LDB	[POINT 3,TSTNUM,35]	; get digit 3
 11127	100545	271 00 0 00 000020 		ADDI	20			; convert to SIXBIT
 11128	100546	137 00 0 00 117224 		DPB	[POINT 6,1,35]		; save it
 11129	100547	202 01 0 00 100625 		MOVEM	1,SENT11+^D11+1		; save test number
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 257
DFCIA1	MAC	27-Oct-84 19:00		SPEAR Reporting                                                                    SEQ 0433

 11130
 11131					; Insert test description
 11132
 11133	100550	200 01 0 00 103275 		MOVE	1,TSTNUM		; get test number
 11134	100551	550 01 0 01 032203 		HRRZ	1,TSTNAM(1)		; get address of test description
 11135	100552	474 02 0 00 000000 		SETO	2,			; initialize character count
 11136	100553	200 03 0 00 117225 		MOVE	3,[POINT 7,0]		; get initial byte pointer
 11137	100554	540 03 0 00 000001 		HRR	3,1			; insert address
 11138	100555	200 04 0 00 117226 		MOVE	4,[POINT 7,SENT11+^D13+1];get initial byte pointer
 11139	100556	134 00 0 00 000003 	SPRE2B:	ILDB	3			; get a byte
 11140	100557	136 00 0 00 000004 		IDPB	4			; save it
 11141	100560	350 00 0 00 000002 		AOS	2			; increment byte count
 11142	100561	326 00 0 00 100556 		JUMPN	SPRE2B			; loop till done
 11143
 11144					; Insert block length ...
 11145
 11146	100562	231 02 0 00 000005 		IDIVI	2,5			; calculate number of words
 11147	100563	332 00 0 00 000003 		SKIPE	3			; remainder?
 11148	100564	350 00 0 00 000002 		AOS	2			; yes - add in partial word
 11149	100565	271 02 0 00 000003 		ADDI	2,3			; calculate subtotal
 11150	100566	137 02 0 00 117215 		DPB	2,[POINT 9,SEN11L,35]	; save length
 11151
 11152					; Add time and day
 11153
 11154	100567	104 00 0 00 000227 	SPRE2C:	GTAD				; get time and day
 11155	100570	202 01 0 00 100617 		MOVEM	1,SENT11+5+1		; save it
 11156
 11157					; Get PPN and build entry / get time and insert it
 11158
 11159	100571	260 17 0 00 100653 		GO	GETPPN			; get user's PPN
 11160	100572	202 01 0 00 100623 		MOVEM	1,SEN11L-1		; save in SPEAR entry block
 11161
 11162					; Make the SPEAR entry
 11163
 11164	100573	201 01 0 00 100611 		MOVEI	1,SENT11		; get address of argument block
 11165	100574	135 02 0 00 117215 		LDB	2,[POINT 9,SEN11L,35]	; get length
 11166	100575	271 02 0 00 000013 		ADDI	2,^D10+1		; calculate total block length
 11167	100576	104 00 0 00 000527 	S2:	SYERR				; write to SYSERR file
 11168
 11169					; Exit
 11170
 11171	100577	200 00 0 00 111025 		MOVE	[-1]			; get flag for 'Error message'
 11172	100600	336 00 0 00 000015 		SKIPN	ERFLG			; error flag set?
 11173	100601	200 00 0 00 112101 		MOVE	[-2]			; no - get flag for 'Final message'
 11174	100602	202 00 0 00 121002'		MOVEM	SPEAR2			; set 'SPEAR err/fin msg done' flag
 11175	100603	262 17 0 00 000004 	SPRE2X:	RGET	(4,3,2,1,0)		; restore AC's
 11176
 11177	100610	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 258
DFCIA1	MAC	27-Oct-84 19:00		SPEAR Reporting                                                                    SEQ 0434

 11178
 11179					; SPEAR entry block 11
 11180
 11181	100611	250000	000000		SENT11:	250000,,0			; event type
 11182	100612	000000	000000			0				; zero
 11183	100613	000000	000000			0				; zero
 11184	100614	000000	000000			0				; zero
 11185	100615	000000	000000			0				; (for Release 6.0 or later)
 11186	100616	000000	020002			20002				; time of occurence block
 11187	100617	000000	000000			0				; time
 11188
 11189	100620	000000	100004			0,,100004			; 4 words, type 10 code
 11190	100621	44 46 43 51 41 00 		SIXBIT /DFCIA/			; diagnostic name
 11191	100622	000003	000000			MCNVER,,DECVER			; diagnostic version
 11192	100623	000000	000000			0				; user PPN
 11193
 11194	100624	000000	110000		SEN11L:	0,,110000			; type 11 code
 11195	100625	000000	000000			0				; failing test name
 11196	100626	000000	000003			3				; failing test description offset
 11197	100627					BLOCK	^D20			; ASCII test description
 11198
 11199
 11200					;#********************************************************************
 11201					;* GETPPN - Find out PPN number
 11202					;#********************************************************************
 11203
 11204	100653	261 17 0 00 000002 	GETPPN:	RPUT	(2,3)			; save AC's
 11205
 11206	100655	474 01 0 00 000000 		SETO	1,			; indicate current job
 11207	100656	200 02 0 00 117227 		MOVE	2,[-1,,1]		; place 1 word into AC1
 11208	100657	201 03 0 00 000003 		MOVEI	3,3			; point to connected directory number
 11209	100660	104 00 0 00 000507 		GETJI				; get job information
 11210	100661	400 01 0 00 000000 		SETZ	1,			; error - just clear AC1
 11211	100662	262 17 0 00 000003 		RGET	(3,2)			; restore AC's
 11212
 11213	100664	263 17 0 00 000000 		RTN				; return
 11214
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 259
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0435

 11215						SUBTTL	Test Execute Routines
 11216
 11217					;#********************************************************************
 11218					;* TEXEC - Test execute routine
 11219					;
 11220					; This routine starts up the port.  Then to perform testing, it places
 11221					; entries on the command queues, and interprets responses found on the
 11222					; response queue.
 11223					;
 11224					; This  routine is given a pointer to a 'Test Execute Table'.  It
 11225					; then executes one entry and returns +1,+2,+3 or +4 depending on
 11226					; the type of entry and the result.
 11227					;
 11228					; Argument:	AC6 - Address of 'Test Execute Table'
 11229					;
 11230					; Return:	+1 - End of table was seen.
 11231					;		+2 - A routine was called (just do next entry).
 11232					;		+3 - Error return.
 11233					;		+4 - Success return.
 11234					;
 11235					;		TCSR -  Final CSR data
 11236					;		TCMD  - Command placed on command queue
 11237					;		TRESPC - Response received (correct)
 11238					;		TRESPA - Response received (actual)
 11239					;
 11240					;		AC6 - Updated to point to the next table location
 11241					;
 11242					; Test Execute Table Format:
 11243					;
 11244					;		Entry
 11245					;		Entry
 11246					;		 ...
 11247					;		TLAST		; last entry (zero)
 11248					;
 11249					; 'Entry' is of the form:
 11250					;
 11251					; Bits 0-3 - Type of entry - 0 - Done with table	   (TLAST)
 11252					;			     1 - Start port		   (TSTART)
 11253					;			     2 - Call routine		   (TCALL)
 11254					;			     3 - Call routine (test exit)  (TCALLC)
 11255					;			     4 - Wait for segment done     (TWAIT)
 11256					;			     5 - Put packet on cmd queue   (TPACK)
 11257					;			     6 - Write a PILA register	   (TWRITE)
 11258					;			     7 - Read a PILA register	   (TREAD)
 11259					;			    10 - Select new table address  (TJRST)
 11260					;			    11 - Initialize packet data    (TINIT)
 11261					;			    12 - Exit test (if ERFLG set)  (TEXIT)
 11262					;
 11263					; Bits 4-35 - Defined per entry type.
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 260
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0436

 11264
 11265					; Entry types:
 11266					;   0 (TLAST) -  Bits 4-35 - Zero (end of table)
 11267					;   1 (TSTART) - Bits 4-35 - Unused
 11268					;   2 (TCALL) -  Bits 4-35 - Address of routine to call
 11269					;   3 (TCALLC) - Bits 4-35 - Address of routine to call
 11270					;   4 (TWAIT) -  Bits 4-35 - Unused
 11271					;   5 (TPACK) -  Bits 4-14 - Op code
 11272					;		     15-17 - Command queue on which to place entry
 11273					;		     18-35 - Address of special routine to set up
 11274					;			     expected response entries
 11275					;   6 (TWRITE) - Bits 4-17 - Register number to write
 11276					;		     18-35 - Data to write
 11277					;   7 (TREAD) - Bits  4-17 - Register number to read
 11278					;		        18 - Do data compare 0-no,1-yes
 11279					;		     19-35 - Correct data
 11280					;  10 (TJRST) -  Bits 4-35 - Table address to continue
 11281					;  11 (TINIT) -  Bits 4-35 - Unused
 11282					;  12 (TEXIT) -  Bits 4-35 - Unused
 11283					;#********************************************************************
 11284
 11285	100665	261 17 0 00 000000 	TEXEC:	RPUT	(0,1,2)			; save some AC's
 11286
 11287	100670	200 02 0 06 000000 		MOVE	2,(6)			; get entry
 11288	100671	350 00 0 00 000006 		AOS	6			; point to next entry
 11289	100672	322 02 0 00 100676 		JUMPE	2,TEXEX1		; end of table - yes - exit
 11290
 11291					; Determine type of entry and dispatch
 11292
 11293	100673	135 01 0 00 117230 		LDB	1,[POINT 4,2,3]		; get entry
 11294						XCT	[JRST	TEXERR		; dispatch on it
 11295							 JRST	TEXSTR
 11296							 JRST	TEXCAL
 11297							 JRST	TEXCAC
 11298							 JRST	TEXWAI
 11299							 JRST	TEXPAK
 11300							 JRST	TEXWRT
 11301							 JRST	TEXRD
 11302							 JRST	TEXJRS
 11303							 JRST	TEXINI
 11304							 JRST	TEXEXI
 11305	100674	256 00 0 01 117231 			 JRST	TEXERR](1)
 11306
 11307					; Error in Test Execute Table
 11308
 11309	100675	037 00 0 00 117245 	TEXERR:	TMSGCD	<Test Execute Dispatch Table Error - Entry out of range>
 11310	100676	260 17 0 00 042162 	TEXEX1:	GO	SETDSA			; disable the port
 11311	100677	260 17 0 00 064617*		GO	ISTOP			; stop the port
 11312	100700	332 00 0 00 120777'		SKIPE	SDEBUG			; EXEC debug mode?
 11313	100701	037 00 0 00 030242 		PCRL				; yes - a final CRLF
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 261
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0437

 11314
 11315					; Exit
 11316
 11317	100702	262 17 0 00 000002 	TEXEXX:	RGET	(2,1,0)			; restore AC's
 11318
 11319	100705	263 17 0 00 000000 		RTN				; return
 11320
 11321
 11322					;#********************************************************************
 11323					; Start the port
 11324					;#********************************************************************
 11325
 11326	100706	332 00 0 00 120777'	TEXSTR:	SKIPE	SDEBUG			; EXEC debug mode?
 11327	100707	037 00 0 00 117261 		TMSGC	<TSTART>		; yes - print debug data
 11328	100710	402 00 0 00 102762 		SETZM	TERROR			; initialize error code
 11329	100711	260 17 0 00 065055*		GO	IPACLR			; do a 'port clear'
 11330	100712	331 00 0 00 034013 		SKIPL	CPORT			; have our port number yet?
 11331	100713	254 00 0 00 100717 		JRST	TEXST0			; yes - continue
 11332	100714	260 17 0 00 065076 		GO	RDNODE			; read our port number
 11333						JRST	[SETO	ERFLG,		; error - failed - exit
 11334							 MOVEI	1		;   with failure code 1
 11335							 MOVEM	TERTYP
 11336	100715	254 00 0 00 117263 			 JRST	TEXST1]
 11337	100716	202 01 0 00 034013 		MOVEM	1,CPORT			; save port number
 11338	100717	200 00 0 00 034013 	TEXST0:	MOVE	CPORT			; get our port number
 11339	100720	202 00 0 00 065161 		MOVEM	TDPORT			; set up destination port
 11340	100721	260 17 0 00 043652 		GO	TFLOAD			; load operational microcode
 11341						JRST	[SETO	ERFLG,		; error - failed - exit
 11342							 HRRZM	TERMES		;   with failure code 2
 11343							 MOVEI	2
 11344							 MOVEM	TERTYP
 11345	100722	254 00 0 00 117267 			 JRST	TEXST1]
 11346	100723	260 17 0 00 065056*		GO	CHINIT			; initialize channel stuff
 11347	100724	260 17 0 00 064612 		GO	TPCB			; initialize PCB
 11348	100725	260 17 0 00 065052 		GO	TIDLE			; put port into IDLE loop
 11349						JRST	[SETO	ERFLG,		; error - failed - exit
 11350							 MOVEI	3		;   with failure code 3
 11351							 MOVEM	TERTYP
 11352	100726	254 00 0 00 117274 			 JRST	TEXST1]
 11353	100727	260 17 0 00 042122 		GO	SETENA			; ensure the port is enabled
 11354						JRST	[SETO	ERFLG,		; error - failed - exit
 11355							 MOVEI	4		;   with failure code 4
 11356							 MOVEM	TERTYP
 11357	100730	254 00 0 00 117300 			 JRST	TEXST1]
 11358	100731	336 00 0 00 000015 	TEXST1:	SKIPN	ERFLG			; error occurred yet?
 11359	100732	350 00 0 17 777775 		AOS	-3(P)			; no - set up return
 11360	100733	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11361	100734	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11362	100735	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 262
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0438

 11363
 11364					;#********************************************************************
 11365					; Execute a JRST and exit
 11366					;#********************************************************************
 11367
 11368	100736	550 02 0 00 000002 	TEXJRS:	HRRZ	2,2			; only want the address
 11369	100737	332 00 0 00 120777'		SKIPE	SDEBUG			; EXEC debug mode?
 11370						GO	[TMSGC	<TJRST Adr  >	; yes - print debug
 11371							 MOVE	2		;   data and continue
 11372							 PNTOCS
 11373	100740	260 17 0 00 117307 			 RTN]
 11374	100741	200 06 0 00 000002 		MOVE	6,2			; get new table address
 11375	100742	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11376	100743	254 00 0 00 100702 		JRST	TEXEXX			; exit
 11377
 11378
 11379					;#********************************************************************
 11380					; Execute a CALL and exit
 11381					;#********************************************************************
 11382
 11383	100744	550 02 0 00 000002 	TEXCAL:	HRRZ	2,2			; only want the address
 11384	100745	332 00 0 00 120777'		SKIPE	SDEBUG			; EXEC debug mode?
 11385						GO	[TMSGC	<TCALL Adr  >	; yes - print debug
 11386							 MOVE	2		;   data and continue
 11387							 PNTOCS
 11388	100746	260 17 0 00 117316 			 RTN]
 11389	100747	261 17 0 00 000003 		RPUT	(3,4)			; save some AC's
 11390
 11391	100751	260 17 1 00 000002 		GO	@2			; call the routine
 11392	100752	262 17 0 00 000004 		RGET	(4,3)			; restore AC's
 11393
 11394	100754	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11395	100755	254 00 0 00 100702 		JRST	TEXEXX			; exit
 11396
 11397
 11398					;#********************************************************************
 11399					; Execute a CALL and check if test done and exit
 11400					;#********************************************************************
 11401
 11402	100756	550 02 0 00 000002 	TEXCAC:	HRRZ	2,2			; only want the address
 11403	100757	332 00 0 00 120777'		SKIPE	SDEBUG			; EXEC debug mode?
 11404						GO	[TMSGC	<TCALLC Adr  >	; yes - print debug
 11405							 MOVE	2		;   data and continue
 11406							 PNTOCS
 11407	100760	260 17 0 00 117325 			 RTN] 
 11408	100761	261 17 0 00 000003 		RPUT	(3,4)			; save some AC's
 11409
 11410	100763	260 17 1 00 000002 		GO	@2			; call the routine
 11411	100764	334 00 0 00 000000 		SKIPA				; exit test
 11412	100765	350 00 0 17 777773 		AOS	-5(P)			; set up return
 11413	100766	262 17 0 00 000004 		RGET	(4,3)			; restore AC's
 11414
 11415	100770	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 263
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0439

 11416
 11417					;#********************************************************************
 11418					; Exit test (if error flag is set)
 11419					;#********************************************************************
 11420
 11421	100771	332 00 0 00 120777'	TEXEXI:	SKIPE	SDEBUG			; EXEC debug mode?
 11422						GO	[TMSGC	<TEXIT>		; yes - print debug
 11423	100772	260 17 0 00 117333 			 RTN]			; data and continue
 11424	100773	336 00 0 00 000015 		SKIPN	ERFLG			; any errors yet?
 11425	100774	350 00 0 17 777775 		AOS	-3(P)			; no - not done with test yet
 11426	100775	254 00 0 00 100702 		JRST	TEXEXX			; exit
 11427
 11428
 11429					;#********************************************************************
 11430					; Initialize packet data
 11431					;#********************************************************************
 11432
 11433	100776	332 00 0 00 120777'	TEXINI:	SKIPE	SDEBUG			; EXEC debug mode?
 11434	100777	037 00 0 00 117335 		TMSGC	<TINIT>			; yes - print debug data
 11435	101000	402 00 0 00 101356 		SETZM	TCMD			; clear first word
 11436	101001	200 00 0 00 117337 		MOVE	[TCMD,,TCMD+1]		; make BLT word
 11437	101002	251 00 0 00 102757 		BLT	DCRESP			; clear all of the data
 11438	101003	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11439	101004	402 00 0 00 065154 		SETZM	TFMFLG			; initialize 'format flag' to COMPAT
 11440	101005	402 00 0 00 065155 		SETZM	TRSFLG			; initialize 'rsp pkt rqst' flag to no
 11441	101006	402 00 0 00 065156 		SETZM	TPTFLG			; initialize 'path select' flag to Auto
 11442	101007	402 00 0 00 065157 		SETZM	TXCTID			; initialize transaction ID to use
 11443	101010	402 00 0 00 065160 		SETZM	TXCTID+1
 11444	101011	402 00 0 00 065162 		SETZM	TBYTE			; initialize text length (in bytes)
 11445	101012	402 00 0 00 065163 		SETZM	TWORD			; initialize text length (in words)
 11446	101013	402 00 0 00 065164 		SETZM	TPAT			; initialize data pattern to 0
 11447	101014	402 00 0 00 065165 		SETZM	TREGN			; initialize register number
 11448	101015	402 00 0 00 065166 		SETZM	TREGD			; initialize register data
 11449	101016	402 00 0 00 065167 		SETZM	TREGDC			; initialize register data correct
 11450	101017	402 00 0 00 065170 		SETZM	TREGDA			; initialize register data actual
 11451	101020	402 00 0 00 065171 		SETZM	TREGCF			; initialize data compare flag
 11452	101021	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 264
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0440

 11453
 11454					;#********************************************************************
 11455					; Write a packet buffer or link module register
 11456					;#********************************************************************
 11457
 11458					; Build the packet
 11459
 11460	101022	332 00 0 00 120777'	TEXWRT:	SKIPE	SDEBUG			; EXEC debug mode?
 11461						GO	[TMSGC	<TWRITE  Reg >	; yes - print debug data
 11462							 LDB	[POINT 12,2,17]	;   and exit
 11463							 PNTOCS
 11464							 TMSG	<  Data >
 11465							 LDB	[POINT 18,2,35]
 11466							 PNT3
 11467	101023	260 17 0 00 117346 			 RTN]
 11468	101024	350 00 0 00 103276 		AOS	TSTSUB			; increment test segment
 11469	101025	201 00 0 00 000001 		MOVEI	1			; initialize error code
 11470	101026	202 00 0 00 102762 		MOVEM	TERROR			;   ...
 11471	101027	402 00 0 00 102763 		SETZM	TERTYP			; clear error type
 11472	101030	135 00 0 00 114065 		LDB	[POINT 12,2,17]		; get register number
 11473	101031	202 00 0 00 065165 		MOVEM	TREGN			; save it
 11474	101032	135 00 0 00 117345 		LDB	[POINT 18,2,35]		; get data to write
 11475	101033	202 00 0 00 065166 		MOVEM	TREGD			; save it
 11476	101034	476 00 0 00 065155 		SETOM	TRSFLG			; initialize 'rsp pkt rqst' flag to yes
 11477	101035	201 11 0 00 000204 		MOVEI	OP,WRREG		; get write register opcode
 11478	101036	260 17 0 00 065174 		GO	BPACK			; go build packet
 11479	101037	200 00 0 00 117355 		MOVE	[PACKET,,TCMD]		; move the packet constructed
 11480	101040	251 00 0 00 101755 		BLT	TCMD+^D255		;   to TCMD
 11481
 11482					; Empty out the response queue first of all
 11483
 11484	101041	260 17 0 00 066134 		GO	CHKRSP			; check for a response queue entry
 11485	101042	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11486	101043	254 00 0 00 101041 		JRST	.-2			; found response - keep looking
 11487
 11488					; Insert onto command queue 3
 11489
 11490	101044	201 13 0 00 000003 		MOVEI	Q,3			; set up queue number
 11491	101045	260 17 0 00 065777 		GO	INSQUE			; insert into queue
 11492						JRST	[SETO	ERFLG,		; failed - set error flag, set
 11493							 MOVEI	1		;   up error code and exit
 11494							 MOVEM	TERTYP
 11495	101046	254 00 0 00 117356 			 JRST	TEXWRX]
 11496
 11497					; Set 'CMDQAV' in CSR register
 11498
 11499	101047	260 17 0 00 066343*		GO	RDCSR			; read CSR register
 11500	101050	255 00 0 00 000000 		JFCL				; error - ignore
 11501	101051	660 01 0 00 000400 		TRO	1,CMDQAV		; set 'command queue available' bit
 11502	101052	260 17 0 00 066350*		GO	LDCSR			; write CSR register
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 265
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0441

 11503
 11504					; Calculate timeout time
 11505
 11506	101053	400 03 0 00 000000 		SETZ	3,			; set up so RUNTME doesn't print time
 11507	101054	260 17 0 00 042044*		GO	RUNTME			; get initial time
 11508	101055	200 02 0 00 041700*		MOVE	2,DEBTIM		; get time in msecs
 11509	101056	271 02 0 00 000310 		ADDI	2,^D200			; wait up to 200 msec
 11510
 11511					; Wait for 'RSPQAV' bit set in CSR register
 11512
 11513	101057	260 17 0 00 065601 		GO	RWAIT			; wait for 'RESQAV' bit set
 11514
 11515					; Check for a response queue entry
 11516
 11517	101060	260 17 0 00 066134 	TEXWR0:	GO	CHKRSP			; check for a response queue entry
 11518	101061	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11519	101062	254 00 0 00 101070 		JRST	TEXWR1			; found a response - go handle
 11520	101063	400 03 0 00 000000 		SETZ	3,			; set up so RUNTME doesn't print time
 11521	101064	260 17 0 00 101054*		GO	RUNTME			; get initial time
 11522	101065	315 02 0 00 101055*		CAMGE	2,DEBTIM		; timed out?
 11523						JRST	[SETO	ERFLG,		; yes - set error flag, set
 11524							 MOVEI	2		;   up error code and exit
 11525							 MOVEM	TERTYP
 11526	101066	254 00 0 00 117362 			 JRST	TEXWRX]
 11527	101067	254 00 0 00 101060 		JRST	TEXWR0			; no - keep looking for a response
 11528
 11529					; Found an entry - discard unless it is the response requested
 11530
 11531	101070	200 01 0 00 070452 	TEXWR1:	MOVE	1,RSPONS+3		; get status word
 11532	101071	135 00 0 00 116174 		LDB	[POINT 8,1,31]		; get port number
 11533	101072	312 00 0 00 034013 		CAME	CPORT			; packet from us?
 11534	101073	254 00 0 00 101060 		JRST	TEXWR0			; no - look for next response
 11535	101074	135 00 0 00 114046 		LDB	[POINT 8,RSPONS+3,23] 	; get opcode
 11536	101075	302 00 0 00 000204 		CAIE	WRREG			; write register?
 11537	101076	254 00 0 00 101060 		JRST	TEXWR0			; no - keep looking
 11538
 11539					; Got the entry expected - now just verify that the status is good
 11540
 11541	101077	201 00 0 00 000003 		MOVEI	3			; get error code
 11542	101100	607 01 0 00 400000 		TLNN	1,400000		; error bit set?
 11543	101101	474 15 0 00 000000 		SETO	ERFLG,			; yes - set error flag
 11544	101102	607 01 0 00 400000 		TLNN	1,400000		; error bit set?
 11545	101103	202 00 0 00 102763 		MOVEM	TERTYP			; yes - set up error code
 11546
 11547					; Done - exit
 11548
 11549	101104	260 17 0 00 066134 	TEXWRX:	GO	CHKRSP			; check for addl responses
 11550	101105	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11551	101106	254 00 0 00 101104 		JRST	TEXWRX			; keep pulling responses off
 11552	101107	336 00 0 00 000015 		SKIPN	ERFLG			; error flag set?
 11553	101110	350 00 0 17 777775 		AOS	-3(P)			; no - set up good return
 11554	101111	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11555	101112	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11556	101113	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 266
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0442

 11557
 11558					;#********************************************************************
 11559					; Read a packet buffer or link module register
 11560					;#********************************************************************
 11561
 11562					; Build the packet
 11563
 11564	101114	332 00 0 00 120777'	TEXRD:	SKIPE	SDEBUG			; EXEC debug mode?
 11565						GO	[TMSGC	<TREAD  Reg >	; yes - print debug data
 11566							 LDB	[POINT 12,2,17]	;   and exit
 11567							 PNTOCS
 11568							 TRNN	2,400000
 11569							 RTN
 11570							 TMSG	< Data (correct) >
 11571							 LDB	[POINT 17,2,35]
 11572							 PNTOCS
 11573	101115	260 17 0 00 117376 			 RTN]
 11574	101116	350 00 0 00 103276 		AOS	TSTSUB			; increment test segment
 11575	101117	201 00 0 00 000002 		MOVEI	2			; initialize error code
 11576	101120	202 00 0 00 102762 		MOVEM	TERROR			;   ...
 11577	101121	402 00 0 00 102763 		SETZM	TERTYP			; clear error type
 11578	101122	135 00 0 00 114065 		LDB	[POINT 12,2,17]		; get register number
 11579	101123	202 00 0 00 065165 		MOVEM	TREGN			; save it
 11580	101124	135 00 0 00 114066 		LDB	[POINT 1,2,18]		; get data compare flag
 11581	101125	202 00 0 00 065171 		MOVEM	TREGCF			; save it
 11582	101126	402 00 0 00 065170 		SETZM	TREGDA			; initialize data read (actual)
 11583	101127	135 00 0 00 117375 		LDB	[POINT 17,2,35]		; get expected data
 11584	101130	202 00 0 00 065167 		MOVEM	TREGDC			; initialize data read (correct)
 11585	101131	476 00 0 00 065155 		SETOM	TRSFLG			; initialize 'rsp pkt rqst' flag to yes
 11586	101132	201 11 0 00 000203 		MOVEI	OP,RDREG		; get read register opcode
 11587	101133	260 17 0 00 065174 		GO	BPACK			; go build packet
 11588	101134	200 00 0 00 117355 		MOVE	[PACKET,,TCMD]		; move the packet constructed
 11589	101135	251 00 0 00 101755 		BLT	TCMD+^D255		;   to TCMD
 11590
 11591					; Empty out the response queue first of all
 11592
 11593	101136	260 17 0 00 066134 		GO	CHKRSP			; check for a response queue entry
 11594	101137	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11595	101140	254 00 0 00 101136 		JRST	.-2			; found response - keep looking
 11596
 11597					; Insert onto command queue 3
 11598
 11599	101141	201 13 0 00 000003 		MOVEI	Q,3			; set up queue number
 11600	101142	260 17 0 00 065777 		GO	INSQUE			; insert into queue
 11601						JRST	[SETO	ERFLG,		; failed - set error flag, set
 11602							 MOVEI	1		;   up error code and exit
 11603							 MOVEM	TERTYP
 11604	101143	254 00 0 00 117407 			 JRST	TEXRDX]
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 267
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0443

 11605
 11606					; Set 'CMDQAV' in CSR register
 11607
 11608	101144	260 17 0 00 101047*		GO	RDCSR			; read CSR register
 11609	101145	201 01 0 00 000010 		MOVEI	1,10			; error - ignore
 11610	101146	660 01 0 00 000400 		TRO	1,CMDQAV		; set 'command queue available' bit
 11611	101147	260 17 0 00 101052*		GO	LDCSR			; write CSR register
 11612
 11613					; Calculate timeout time
 11614
 11615	101150	400 03 0 00 000000 		SETZ	3,			; set up so RUNTME doesn't print time
 11616	101151	260 17 0 00 101064*		GO	RUNTME			; get initial time
 11617	101152	200 02 0 00 101065*		MOVE	2,DEBTIM		; get time in msecs
 11618	101153	271 02 0 00 000310 		ADDI	2,^D200			; wait up to 200 msec
 11619
 11620					; Wait for 'RSPQAV' bit set in CSR register
 11621
 11622	101154	260 17 0 00 065601 		GO	RWAIT			; wait for 'RESQAV' bit set
 11623
 11624					; Check for a response queue entry
 11625
 11626	101155	260 17 0 00 066134 	TEXRD0:	GO	CHKRSP			; check for a response queue entry
 11627	101156	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11628	101157	254 00 0 00 101165 		JRST	TEXRD1			; found a response - go handle
 11629	101160	400 03 0 00 000000 		SETZ	3,			; set up so RUNTME doesn't print time
 11630	101161	260 17 0 00 101151*		GO	RUNTME			; get initial time
 11631	101162	315 02 0 00 101152*		CAMGE	2,DEBTIM		; timed out?
 11632						JRST	[SETO	ERFLG,		; yes - set error flag, set
 11633							 MOVEI	2		;   up error code and exit
 11634							 MOVEM	TERTYP
 11635	101163	254 00 0 00 117413 			 JRST	TEXRDX]
 11636	101164	254 00 0 00 101155 		JRST	TEXRD0			; keep looking for a response
 11637
 11638					; Found an entry - discard unless it is the response requested
 11639
 11640	101165	200 01 0 00 070452 	TEXRD1:	MOVE	1,RSPONS+3		; get status word
 11641	101166	135 00 0 00 116174 		LDB	[POINT 8,1,31]		; get port number
 11642	101167	312 00 0 00 034013 		CAME	CPORT			; packet from us?
 11643	101170	254 00 0 00 101155 		JRST	TEXRD0			; no - look for next response
 11644	101171	135 00 0 00 114046 		LDB	[POINT 8,RSPONS+3,23] 	; get opcode
 11645	101172	302 00 0 00 000203 		CAIE	RDREG			; read register?
 11646	101173	254 00 0 00 101155 		JRST	TEXRD0			; no - keep looking
 11647
 11648					; Got the entry expected - now just verify that the status is good
 11649
 11650	101174	201 00 0 00 000003 		MOVEI	3			; get error code
 11651	101175	603 01 0 00 400000 		TLNE	1,400000		; error bit set?
 11652	101176	474 15 0 00 000000 		SETO	ERFLG,			; yes - set error flag
 11653	101177	603 01 0 00 400000 		TLNE	1,400000		; error bit set?
 11654	101200	202 00 0 00 102763 		MOVEM	TERTYP			; yes - set up error type
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 268
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0444

 11655
 11656					; Compare correct/actual data
 11657
 11658	101201	336 00 0 00 065171 		SKIPN	TREGCF			; do the data compare?
 11659	101202	254 00 0 00 101212 		JRST	TEXRDX			; no - exit
 11660	101203	135 00 0 00 117417 		LDB	[POINT 8,RSPONS+4,7]	; get data received
 11661	101204	202 00 0 00 065170 		MOVEM	TREGDA			; save in actual
 11662	101205	316 00 0 00 065167 		CAMN	TREGDC			; same as correct?
 11663	101206	254 00 0 00 101212 		JRST	TEXRDX			; yes - exit
 11664	101207	474 15 0 00 000000 		SETO	ERFLG,			; no - set error flag
 11665	101210	201 00 0 00 000004 		MOVEI	4			; get error type
 11666	101211	202 00 0 00 102763 		MOVEM	TERTYP			; save it
 11667
 11668					; Done - exit
 11669
 11670	101212	260 17 0 00 066134 	TEXRDX:	GO	CHKRSP			; check for addl responses
 11671	101213	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11672	101214	254 00 0 00 101212 		JRST	TEXRDX			; keep pulling responses off
 11673	101215	336 00 0 00 000015 		SKIPN	ERFLG			; error flag set?
 11674	101216	350 00 0 17 777775 		AOS	-3(P)			; no - set up good return
 11675	101217	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11676	101220	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11677	101221	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 269
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0445

 11678
 11679					;#********************************************************************
 11680					; Wait for response queue entries
 11681					;#********************************************************************
 11682
 11683	101222	135 00 0 00 117420 	TEXWAI:	LDB	[POINT 9,2,17]		; get wait time
 11684	101223	202 00 0 00 102765 		MOVEM	TWTIME			; save it
 11685	101224	135 00 0 00 117345 		LDB	[POINT 18,2,35]		; get routine address
 11686	101225	202 00 0 00 102766 		MOVEM	TWADDR			; save it
 11687	101226	332 00 0 00 120777'		SKIPE	SDEBUG			; EXEC debug mode?
 11688						GO	[TMSGC	<TWAIT Time >	; yes - print debug data
 11689							 MOVE	TWTIME		;   and exit
 11690							 PNTDEC
 11691							 TMSG	<. msecs  Adr >
 11692							 MOVE	TWADDR
 11693							 PNTOCS
 11694	101227	260 17 0 00 117427 			 RTN]
 11695	101230	201 00 0 00 000004 		MOVEI	4			; initialize error code
 11696	101231	202 00 0 00 102762 		MOVEM	TERROR			;   ...
 11697	101232	260 17 0 00 101144*		GO	RDCSR			; read CSR register
 11698	101233	255 00 0 00 000000 		JFCL				; error - ignore
 11699	101234	660 01 0 00 000400 		TRO	1,CMDQAV		; set 'command queue available' bit
 11700	101235	260 17 0 00 101147*		GO	LDCSR			; write CSR register
 11701	101236	350 00 0 00 103276 		AOS	TSTSUB			; increment test segment
 11702	101237	261 17 0 00 000003 		PUT	3			; save AC3
 11703	101240	400 03 0 00 000000 		SETZ	3,			; set up for RUNTME
 11704	101241	260 17 0 00 101161*		GO	RUNTME			; get current run time
 11705	101242	262 17 0 00 000003 		GET	3			; restore AC3
 11706	101243	200 01 0 00 101162*		MOVE	1,DEBTIM		; get time in milliseconds
 11707	101244	270 01 0 00 102765 		ADD	1,TWTIME		; point to maximum time
 11708	101245	202 01 0 00 120731'		MOVEM	1,ENDTIM#		; save it
 11709	101246	402 00 0 00 102756 		SETZM	NRESP			; clear count of packets received
 11710	101247	260 17 0 00 065601 		GO	RWAIT			; wait for 'RESQAV' bit set
 11711	101250	260 17 0 00 066134 	TEXWA0:	GO	CHKRSP			; check for a response queue entry
 11712	101251	254 00 0 00 101263 		JRST	TEXWA1			; nothing found - go check timeout
 11713
 11714					; Found an entry - check if it is a packet for us
 11715
 11716	101252	200 01 0 00 070452 		MOVE	1,RSPONS+3		; get status word
 11717	101253	135 00 0 00 116174 		LDB	[POINT 8,1,31]		; get port number
 11718	101254	312 00 0 00 034013 		CAME	CPORT			; packet from us?
 11719	101255	254 00 0 00 101250 		JRST	TEXWA0			; no - look for next response
 11720	101256	135 00 0 00 114046 		LDB	[POINT 8,RSPONS+3,23] 	; get opcode
 11721	101257	275 00 0 00 000040 		SUBI	40			; normalize to 1..n
 11722	101260	312 00 0 00 000011 		CAME	OP			; opcode we sent?
 11723	101261	254 00 0 00 101250 		JRST	TEXWA0			; no - keep looking
 11724	101262	254 00 0 00 101276 		JRST	TEXWA2			; yes - go handle
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 270
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0446

 11725
 11726					; Nothing found yet - check timeout time
 11727
 11728	101263	261 17 0 00 000003 	TEXWA1:	PUT	3			; save AC3
 11729	101264	400 03 0 00 000000 		SETZ	3,			; set up for RUNTME
 11730	101265	260 17 0 00 101241*		GO	RUNTME			; get current run time
 11731	101266	262 17 0 00 000003 		GET	3			; restore AC3
 11732	101267	200 00 0 00 101243*		MOVE	DEBTIM			; get current time
 11733	101270	315 00 0 00 120731'		CAMGE	ENDTIM			; exceeds maximum time?
 11734	101271	254 00 0 00 101250 		JRST	TEXWA0			; no - check for response again
 11735	101272	474 15 0 00 000000 		SETO	ERFLG,			; yes - set error flag
 11736	101273	201 00 0 00 000001 		MOVEI	1			; set up error type
 11737	101274	202 00 0 00 102763 		MOVEM	TERTYP			;   of 1
 11738	101275	254 00 0 00 101317 		JRST	TEXWAX			; exit
 11739
 11740					; Got a valid response
 11741
 11742	101276	350 00 0 00 102756 	TEXWA2:	AOS	NRESP			; increment number of packets received
 11743	101277	200 00 0 00 117436 		MOVE	[RSPONS,,TRESPA]	; move entire packet to TRESPA area
 11744	101300	251 00 0 00 102755 		BLT	TRESPA+^D255		;   ...
 11745	101301	135 00 0 00 114540 		LDB	[POINT 8,RSPONS+3,7]	; get status byte (actual)
 11746	101302	202 00 0 00 102761 		MOVEM	TSTATA			; save it
 11747
 11748					; Verify packet data
 11749
 11750	101303	402 00 0 00 102757 		SETZM	DCRESP			; clear data error count
 11751	101304	201 01 0 00 000375 		MOVEI	1,^D253			; get word count
 11752	101305	200 00 0 01 101760 	TEXWA3:	MOVE	TRESPC+2(1)		; get correct data
 11753	101306	312 00 0 01 102360 		CAME	TRESPA+2(1)		; same as actual?
 11754	101307	350 00 0 00 102757 		AOS	DCRESP			; no - increment data error count
 11755	101310	367 01 0 00 101305 		SOJG	1,TEXWA3		; loop till done
 11756	101311	332 00 0 00 102757 		SKIPE	DCRESP			; any errors?
 11757						GO	[SETO	ERFLG,		; yes - set error flag
 11758							 MOVEI	2		; set up error type
 11759							 MOVEM	TERTYP		;   of 2
 11760	101312	260 17 0 00 117437 			 RTN]
 11761	101313	336 00 0 00 102766 		SKIPN	TWADDR			; address given?
 11762	101314	254 00 0 00 101317 		JRST	TEXWAX			; no - exit
 11763	101315	260 17 1 00 102766 		GO	@TWADDR			; yes - call the routine
 11764						GO	[MOVEI	3		; error - set up new error type
 11765							 MOVEM	TERTYP
 11766	101316	260 17 0 00 117443 			 RTN]
 11767
 11768					; And exit +3 or +4
 11769
 11770	101317	260 17 0 00 066134 	TEXWAX:	GO	CHKRSP			; check for addl responses
 11771	101320	334 00 0 00 000000 		SKIPA				; nothing found - continue
 11772	101321	254 00 0 00 101317 		JRST	TEXWAX			; keep pulling responses off
 11773	101322	336 00 0 00 000015 		SKIPN	ERFLG			; error flag set?
 11774	101323	350 00 0 17 777775 		AOS	-3(P)			; no - set up good return
 11775	101324	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11776	101325	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11777	101326	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 271
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0447

 11778
 11779					;#********************************************************************
 11780					; Build a packet
 11781					;#********************************************************************
 11782
 11783	101327	332 00 0 00 120777'	TEXPAK:	SKIPE	SDEBUG			; EXEC debug mode?
 11784						GO	[TMSGC	<TPACK Op >	; yes - print debug data
 11785							 LDB	[POINT 9,2,14]	;   and exit
 11786							 PNTOCS
 11787							 TMSG	<  CmdQ >
 11788							 LDB	[POINT 3,2,17]
 11789							 PNTOCS
 11790							 TMSG	<  Adr >
 11791							 LDB	[POINT 18,2,35]
 11792							 PNTOCS
 11793	101330	260 17 0 00 117457 			 RTN]
 11794	101331	201 00 0 00 000003 		MOVEI	3			; initialize error code
 11795	101332	202 00 0 00 102762 		MOVEM	TERROR			;   ...
 11796	101333	200 00 0 00 034013 		MOVE	CPORT			; set up destination port
 11797	101334	202 00 0 00 065161 		MOVEM	TDPORT			;   as ourself
 11798	101335	135 11 0 00 117451 		LDB	OP,[POINT 9,2,14]	; get op code
 11799	101336	135 13 0 00 117454 		LDB	Q,[POINT 3,2,17] 	; get command queue number
 11800	101337	260 17 0 00 065174 		GO	BPACK			; go build packet
 11801	101340	135 02 0 00 117345 		LDB	2,[POINT 18,2,35]	; get address of routine to call
 11802	101341	332 00 0 00 000002 		SKIPE	2			; address given?
 11803	101342	260 17 1 00 000002 		GO	@2			; yes - build the packet
 11804	101343	200 00 0 00 117355 		MOVE	[PACKET,,TCMD]		; move the packet constructed
 11805	101344	251 00 0 00 101755 		BLT	TCMD+^D255		;   to TCMD
 11806
 11807					; Packet is all built - just have to insert onto the specified command
 11808					; queue.
 11809
 11810	101345	400 13 0 00 000000 		SETZ	Q,			; set to cmd queue 3
 11811	101346	260 17 0 00 065777 		GO	INSQUE			; insert into queue
 11812	101347	474 15 0 00 000000 		SETO	ERFLG,			; failed - set error flag
 11813	101350	336 00 0 00 000015 		SKIPN	ERFLG			; error flag set?
 11814	101351	350 00 0 17 777775 		AOS	-3(P)			; no - set up good return
 11815	101352	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11816	101353	350 00 0 17 777775 		AOS	-3(P)			; set up return
 11817	101354	254 00 0 00 100702 		JRST	TEXEXX			; exit
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 272
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0448

 11818
 11819					;#********************************************************************
 11820					; Miscellaneous
 11821					;#********************************************************************
 11822
 11823	101355	000000	000000		TCSR:	0				; final CSR data
 11824	101356				TCMD:	BLOCK	^D256			; command placed on command queue
 11825	101756				TRESPC:	BLOCK	^D256			; response received (correct)
 11826	102356				TRESPA:	BLOCK	^D256			; response received (actual)
 11827	102756	000000	000000		NRESP:	0				; number of responses received
 11828	102757	000000	000000		DCRESP:	0				; number of data compare errors
 11829
 11830	102760	000000	000000		TSTATC:	0				; correct status
 11831	102761	000000	000000		TSTATA:	0				; actual status
 11832
 11833	102762	000000	000000		TERROR:	0				; error code (0-TSTART,1-TWRITE,
 11834										;     2-TREAD,3-TPACK,4-TWAIT)
 11835	102763	000000	000000		TERTYP:	0				; error type
 11836	102764	000000	000000		TERMES:	0				; ucode load error message routine
 11837
 11838	102765	000000	000000		TWTIME:	0				; time to wait (TWAIT)
 11839	102766	000000	000000		TWADDR:	0				; routine to call (TWAIT)
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 273
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0449

 11840
 11841					;#********************************************************************
 11842					;* TTPNT - Print error data
 11843					;#********************************************************************
 11844
 11845	102767	261 17 0 00 000000 	TTPNT:	RPUT	(0,1,2,3)		; save AC's
 11846
 11847	102773	200 01 0 00 102762 		MOVE	1,TERROR		; get error type
 11848						GO	@[PNTSTR		; dispatch on it
 11849							  PNTWRT
 11850							  PNTRD
 11851							  PNTPAK
 11852	102774	260 17 1 01 117471 			  PNTWAI](1)
 11853	102775	262 17 0 00 000003 		RGET	(3,2,1,0)		; restore AC's
 11854
 11855	103001	263 17 0 00 000000 		RTN				; return
 11856
 11857
 11858					;#********************************************************************
 11859					;* PNTSTR - Print out error data (when failed to start the port)
 11860					;#********************************************************************
 11861
 11862	103002	200 01 0 00 102763 	PNTSTR:	MOVE	1,TERTYP			; get error flag
 11863						XCT	[TMSGC	<No error code given>
 11864							 TMSGC	<Could not read node address>
 11865							 TMSGC	<Could not load microcode properly>
 11866							 TMSGC	<Could not start microcode>
 11867	103003	256 00 0 01 117535 			 TMSGC	<Could not set enabled state>](1)
 11868	103004	306 01 0 00 000002 		CAIN	1,2				; ucode load failed?
 11869	103005	336 00 0 00 102764 		SKIPN	TERMES				; any error message?
 11870	103006	263 17 0 00 000000 		RTN					; no - return
 11871	103007	037 00 0 00 030242 		PCRL
 11872	103010	260 17 1 00 102764 		GO	@TERMES				; print the message
 11873	103011	263 17 0 00 000000 		RTN					; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 274
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0450

 11874
 11875					;#********************************************************************
 11876					;* PNTWRT - Print out error data (when failed to write a register)
 11877					;#********************************************************************
 11878
 11879	103012	037 00 0 00 117542 	PNTWRT:	TMSGC	<Could not write >
 11880	103013	200 00 0 00 065166 		MOVE	TREGD			; get data
 11881	103014	037 03 0 00 000000 		PNT3				; print it
 11882	103015	037 00 0 00 117546 		TMSG	< to Port Register >
 11883	103016	200 00 0 00 065165 		MOVE	TREGN			; get register number
 11884	103017	037 16 0 00 000003 		PNTOCS
 11885	103020	260 17 0 00 103042 		GO	PNTREG			; print register name
 11886	103021	200 01 0 00 102763 		MOVE	1,TERTYP		; get error type
 11887						XCT	[TMSGC	<No error code given>
 11888							 TMSGC	<No packet response received>
 11889							 TMSGC	<No response received>
 11890	103022	256 00 0 01 117576 			 TMSGC	<Receive status indicates error occurred>](1)
 11891	103023	263 17 0 00 000000 		RTN				; return
 11892
 11893
 11894					;#********************************************************************
 11895					;* PNTRD - Print out error data (when failed to read a register)
 11896					;#********************************************************************
 11897
 11898	103024	037 00 0 00 117602 	PNTRD:	TMSGC	<Could not read Port Register >
 11899	103025	200 00 0 00 065165 		MOVE	TREGN			; get register number
 11900	103026	037 16 0 00 000003 		PNTOCS
 11901	103027	260 17 0 00 103042 		GO	PNTREG			; print register name
 11902	103030	200 01 0 00 102763 		MOVE	1,TERTYP		; get error type
 11903						XCT	[TMSGC	<No error code given>
 11904							 TMSGC	<No packet response received>
 11905							 TMSGC	<No response received>
 11906							 TMSGC	<Status error in response>
 11907	103031	256 00 0 01 117631 			 TMSGC	<Packet received but expected data incorrect>](1)
 11908	103032	322 01 0 00 103535 		JUMPE	1,[RTN]			; print c/a? no - return
 11909	103033	037 00 0 00 117636 		TMSGC	<Correct:  >		; print correct data
 11910	103034	200 00 0 00 065167 		MOVE	TREGDC			; get data
 11911	103035	037 03 0 00 000000 		PNT3				; print it
 11912	103036	037 00 0 00 117641 		TMSGC	<Actual:   >		; print actual data
 11913	103037	200 00 0 00 065170 		MOVE	TREGDA			; get data
 11914	103040	037 03 0 00 000000 		PNT3				; print it
 11915	103041	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 275
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0451

 11916
 11917					;#********************************************************************
 11918					; PNTREG - Print register name
 11919					;#********************************************************************
 11920
 11921	103042	200 01 0 00 065165 	PNTREG:	MOVE	1,TREGN			; get register number
 11922	103043	370 00 0 00 000001 		SOS	1			; normalize to 0..n
 11923	103044	303 01 0 00 000015 		CAILE	1,15			; exceed maximum?
 11924	103045	201 01 0 00 000016 		MOVEI	1,16			; yes - limit to 16
 11925						XCT	[TMSG	< (Receive Status)> 		; 1
 11926							 TMSG	< (Reset Transmit Status)>	; 2
 11927							 TMSG	< (Read Buffer)>		; 3
 11928							 TMSG	< (Enable Link Control)>	; 4
 11929							 TMSG	< (Read Switches)>		; 5
 11930							 TMSG	< (Select Buffer)>		; 6
 11931							 TMSG	< (Load Transmit Buffer)>	; 7
 11932							 TMSG	< (Read Transmit Status)>	; 10
 11933							 TMSG	< (Abort Transmission)>		; 11
 11934							 TMSG	< (Set Mode)>			; 12
 11935							 TMSG	< (Transmit)>			; 13
 11936							 TMSG	< (Read Node Address)>		; 14
 11937							 TMSG	< (Disable Link Control)>	; 15
 11938							 TMSG	< (Sync)>			; 16
 11939	103046	256 00 0 01 117742 			 TMSG	< (? Unrecognized)>](1)
 11940	103047	263 17 0 00 000000 		RTN
 11941
 11942
 11943					;#********************************************************************
 11944					;* PNTPAK - Print out error data (when couldn't put entry on cmd queue)
 11945					;#********************************************************************
 11946
 11947	103050	037 00 0 00 117761 	PNTPAK:	TMSGC	<Could not place a >
 11948	103051	260 17 0 00 067055 		GO	OPCPNT			; print op code
 11949	103052	037 00 0 00 117766 		TMSG	< packet on Cmd queue >
 11950	103053	201 00 0 00 000003 		MOVEI	3			; get command queue number and
 11951	103054	274 00 0 00 000013 		SUB	Q			;   make in form 3-0
 11952	103055	037 16 0 00 000003 		PNTOCS				; print it out
 11953	103056	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 276
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0452

 11954
 11955					;#********************************************************************
 11956					;* PNTWAI - Print out error data (when failed to receive proper responses)
 11957					;#********************************************************************
 11958
 11959					; Print packet placed on command queue
 11960
 11961	103057	037 00 0 00 117773 	PNTWAI:	TMSGC	<Packet sent:  >	; print heading
 11962	103060	201 01 0 00 101356 		MOVEI	1,TCMD			; get address of cmd packet
 11963	103061	260 17 0 00 103141 		GO	PNTWPK			; print packet
 11964
 11965					; Print error
 11966
 11967	103062	200 02 0 00 102763 		MOVE	2,TERTYP		; get error flag
 11968						XCT	[TMSGC	<No error code given>
 11969							 TMSGC	<No response received>
 11970							 TMSGC	<Data compare error>
 11971	103063	256 00 0 02 120014 			 TMSGC	<Data compare error and status error>](2)
 11972
 11973					; Print status error if applicable
 11974
 11975	103064	307 02 0 00 000001 		CAIG	2,1			; packet error of some type?
 11976	103065	263 17 0 00 000000 		RTN				; no - return
 11977	103066	302 02 0 00 000003 		CAIE	2,3			; status error?
 11978	103067	254 00 0 00 103076 		JRST	PNTWA0			; no - continue
 11979
 11980	103070	037 00 0 00 120020 		TMSGC	<Status (Expected):>
 11981	103071	200 01 0 00 102760 		MOVE	1,TSTATC		; get correct status
 11982	103072	260 17 0 00 103106 		GO	PNTWAS			; print it
 11983	103073	037 00 0 00 120025 		TMSGC	<Status (Actual):>
 11984	103074	200 01 0 00 102761 		MOVE	1,TSTATA		; get correct status
 11985	103075	260 17 0 00 103106 		GO	PNTWAS			; print it
 11986
 11987					; Print response received correct/actual data	
 11988
 11989	103076	201 01 0 00 101756 	PNTWA0:	MOVEI	1,TRESPC		; get address of correct packet
 11990	103077	201 02 0 00 102356 		MOVEI	2,TRESPA		; get address of actual packet
 11991	103100	260 17 0 00 103203 		GO	PNTWCM			; yes - print data discrepancies
 11992	103101	037 00 0 00 120031 		TMSGC	< Words in error = >	; print number of words in
 11993	103102	200 00 0 00 102757 		MOVE	DCRESP			;   error
 11994	103103	037 15 0 00 000000 		PNTDEC
 11995	103104	037 00 0 00 107460 		TMSG	<.>
 11996	103105	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 277
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0453

 11997
 11998					;#********************************************************************
 11999					; PNTWAS - Print status
 12000					;#********************************************************************
 12001
 12002	103106	602 01 0 00 000200 	PNTWAS:	TRNE	1,200			; path status field?
 12003	103107	254 00 0 00 103122 		JRST	PNTWS1			; no - handle other type
 12004
 12005					; Path status byte
 12006
 12007	103110	336 00 0 00 000001 		SKIPN	1			; any status to print?
 12008	103111	037 00 0 00 116247 		TMSG	<  No Error>		; no - print no error
 12009	103112	474 02 0 00 000000 		SETO	2,			; initialize text pointer
 12010	103113	350 00 0 00 000002 	PNTWS0:	AOS	2			; point to next text string
 12011	103114	301 02 0 00 000006 		CAIL	2,6			; done yet?
 12012	103115	263 17 0 00 000000 		RTN				; yes - exit
 12013	103116	602 01 0 00 000040 		TRNE	1,40			; bit set?
 12014						XCT	[TMSG	<  Path A ACK>	; yes - print it
 12015							 TMSG	<  Path A NAK>
 12016							 TMSG	<  Path A NRSP>
 12017							 TMSG	<  Path B ACK>
 12018							 TMSG	<  Path B NAK>
 12019	103117	256 00 0 02 116274 			 TMSG	<  Path B NRSP>](2)
 12020	103120	242 01 0 00 000001 		LSH	1,1			; left shift 1 bit
 12021	103121	254 00 0 00 103113 		JRST	PNTWS0			; loop till done
 12022
 12023					; Error byte
 12024
 12025	103122	135 02 0 00 117224 	PNTWS1:	LDB	2,[POINT 6,1,35]	; get error bits
 12026	103123	201 01 0 00 066742 		MOVEI	1,STATAB-1		; initialize table address
 12027	103124	350 00 0 00 000001 	PNTWS2:	AOS	1			; point to next entry
 12028	103125	337 00 0 01 000000 		SKIPG	(1)			; end of list?
 12029	103126	254 00 0 00 103135 		JRST	PNTWS3			; yes - print unrecognized
 12030	103127	554 00 0 01 000000 		HLRZ	(1)			; get error code
 12031	103130	312 00 0 00 000002 		CAME	2			; match?
 12032	103131	254 00 0 00 103124 		JRST	PNTWS2			; no - keep looking
 12033	103132	550 01 0 01 000000 		HRRZ	1,(1)			; get address of text to print
 12034	103133	256 00 0 01 000000 		XCT	(1)			; print it
 12035	103134	263 17 0 00 000000 		RTN				; exit
 12036
 12037	103135	037 00 0 00 116303 	PNTWS3:	TMSG	< ? Invalid error code - >
 12038	103136	200 00 0 00 000002 		MOVE	2
 12039	103137	037 16 0 00 000003 		PNTOCS
 12040	103140	263 17 0 00 000000 		RTN				; exit	
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 278
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0454

 12041
 12042					;#********************************************************************
 12043					; PNTWPK - Print a packet (first 6 words)
 12044					;#********************************************************************
 12045
 12046	103141	200 02 0 00 000001 	PNTWPK:	MOVE	2,1			; get packet address
 12047	103142	037 00 0 00 120036 		TMSG	<OpCode >
 12048	103143	200 00 0 02 000003 		MOVE	3(2)			; get status word
 12049	103144	135 11 0 00 120040 		LDB	OP,[POINT 8,0,23]	; get op code
 12050	103145	260 17 0 00 067055 		GO	OPCPNT			; print op code
 12051	103146	037 00 0 00 120041 		TMSGC	< Word  Data>
 12052	103147	037 00 0 00 120044 		TMSGC	<  +3   >
 12053	103150	200 01 0 02 000003 		MOVE	1,3(2)			; get 4th word of packet
 12054	103151	260 17 0 00 103167 		GO	BYTPNT			; print it in byte format
 12055	103152	037 00 0 00 120046 		TMSGC	<  +4   >
 12056	103153	200 01 0 02 000004 		MOVE	1,4(2)			; get 5th word of packet
 12057	103154	260 17 0 00 103167 		GO	BYTPNT			; print it in byte format
 12058	103155	037 00 0 00 120050 		TMSGC	<  +5   >
 12059	103156	200 01 0 02 000005 		MOVE	1,5(2)			; get 6th word of packet
 12060	103157	260 17 0 00 103167 		GO	BYTPNT			; print it in byte format
 12061	103160	037 00 0 00 120052 		TMSGC	<  +6   >
 12062	103161	200 01 0 02 000006 		MOVE	1,6(2)			; get 7th word of packet
 12063	103162	260 17 0 00 103167 		GO	BYTPNT			; print it in byte format
 12064	103163	037 00 0 00 120054 		TMSGC	<  +7   >
 12065	103164	200 01 0 02 000007 		MOVE	1,7(2)			; get 8th word of packet
 12066	103165	260 17 0 00 103167 		GO	BYTPNT			; print it in byte format
 12067	103166	263 17 0 00 000000 		RTN				; return
 12068
 12069					; Print a word in '377 377 377 377 17' format
 12070
 12071	103167	400 00 0 00 000000 	BYTPNT:	SETZ	0,			; clear AC0
 12072	103170	246 00 0 00 000010 		LSHC	8			; get a byte
 12073	103171	037 03 0 00 000000 		PNT3				; print it
 12074	103172	246 00 0 00 000010 		LSHC	8			; get a byte
 12075	103173	037 03 0 00 000000 		PNT3				; print it
 12076	103174	246 00 0 00 000010 		LSHC	8			; get a byte
 12077	103175	037 03 0 00 000000 		PNT3				; print it
 12078	103176	246 00 0 00 000010 		LSHC	8			; get a byte
 12079	103177	037 03 0 00 000000 		PNT3				; print it
 12080	103200	246 00 0 00 000004 		LSHC	4			; get a byte
 12081	103201	037 02 0 00 000000 		PNT2				; print it
 12082	103202	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 279
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0455

 12083
 12084					;#********************************************************************
 12085					; PNTWCM - Data compare and print of a packet
 12086					;
 12087					; Arguments:	AC1 - Address of correct packet data
 12088					; 		AC2 - Address of actual packet data
 12089					;#********************************************************************
 12090
 12091					; Print heading data (correct)
 12092
 12093	103203	261 17 0 00 000003 	PNTWCM:	RPUT	(3,4,5,6)		; save AC's
 12094
 12095	103207	037 00 0 00 120056 		TMSGC	<Packet Received (Correct):  OpCode >
 12096	103210	200 00 0 01 000003 		MOVE	3(1)			; get status word
 12097	103211	135 11 0 00 120040 		LDB	OP,[POINT 8,0,23]	; get op code
 12098	103212	260 17 0 00 067055 		GO	OPCPNT			; print op code
 12099	103213	037 00 0 00 120066 		TMSG	< from Port >
 12100	103214	200 00 0 01 000003 		MOVE	3(1)			; get status word
 12101	103215	135 00 0 00 120071 		LDB	[POINT 8,0,31]		; get port number
 12102	103216	037 16 0 00 000003 		PNTOCS				; print it
 12103
 12104					; Print heading data (actual)
 12105
 12106	103217	037 00 0 00 120072 		TMSGC	<Packet Received (Actual):  OpCode >
 12107	103220	200 00 0 02 000003 		MOVE	3(2)			; get status word
 12108	103221	135 11 0 00 120040 		LDB	OP,[POINT 8,0,23]	; get op code
 12109	103222	260 17 0 00 067055 		GO	OPCPNT			; print op code
 12110	103223	037 00 0 00 120066 		TMSG	< from Port >
 12111	103224	200 00 0 02 000003 		MOVE	3(2)			; get status word
 12112	103225	135 00 0 00 120071 		LDB	[POINT 8,0,31]		; get port number
 12113	103226	037 16 0 00 000003 		PNTOCS				; print it
 12114
 12115					; Print correct/actual data
 12116
 12117	103227	400 06 0 00 000000 		SETZ	6,			; clear print count
 12118	103230	201 05 0 00 000003 		MOVEI	5,3			; start at word 3
 12119	103231	037 00 0 00 120102 		TMSGC	< Word	---Correct---   ---Actual----   Discrepancy>
 12120	103232	260 17 0 00 103242 	PNTWC0:	GO	PNTCAD			; print correct/actual/discrepancy
 12121	103233	350 00 0 00 000005 		AOS	5			; point to next word
 12122	103234	305 06 0 00 000005 		CAIGE	6,5			; printed 5 words yet?
 12123	103235	254 00 0 00 103232 		JRST	PNTWC0			; no - loop till done
 12124	
 12125					; Exit
 12126
 12127	103236	262 17 0 00 000006 		RGET	(6,5,4,3)		; restore AC's
 12128
 12129
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 280
DFCIA1	MAC	27-Oct-84 19:00		Test Execute Routines                                                              SEQ 0456

 12130
 12131					; Print correct/actual/discrepancy
 12132
 12133	103242	200 03 0 00 000001 	PNTCAD:	MOVE	3,1			; calculate address of word
 12134	103243	270 03 0 00 000005 		ADD	3,5			;   ...
 12135	103244	200 03 0 03 000000 		MOVE	3,(3)			; get correct word
 12136	103245	200 04 0 00 000002 		MOVE	4,2			; calculate address of word
 12137	103246	270 04 0 00 000005 		ADD	4,5			;   ...
 12138	103247	200 04 0 04 000000 		MOVE	4,(4)			; get actual word
 12139	103250	303 05 0 00 000004 		CAILE	5,4			; past the first 2 words?
 12140	103251	254 00 0 00 103254 		JRST	PNTCA0			; no - forcibly print these
 12141	103252	316 03 0 00 000004 		CAMN	3,4			; correct = actual?
 12142	103253	263 17 0 00 000000 		RTN				; yes - return without printing
 12143	103254	350 00 0 00 000006 	PNTCA0:	AOS	6			; increment line count
 12144	103255	037 00 0 00 120115 		TMSGC	<  +>
 12145	103256	200 00 0 00 000005 		MOVE	5			; get offset
 12146	103257	037 16 0 00 000003 		PNTOCS				; print it
 12147	103260	037 00 0 00 117173 		TMSG	<	>		; print tab
 12148	103261	200 00 0 00 000003 		MOVE	3			; get correct data
 12149	103262	037 13 0 00 000000 		PNTHW				; print it
 12150	103263	037 00 0 00 117052 		TMSG	<   >
 12151	103264	200 00 0 00 000004 		MOVE	4			; get actual data
 12152	103265	037 13 0 00 000000 		PNTHW				; print it
 12153	103266	200 00 0 00 000003 		MOVE	3			; get actual word
 12154	103267	430 00 0 00 000004 		XOR	4			; xor with correct
 12155	103270	336 00 0 00 000000 		SKIPN	0			; zero?
 12156	103271	263 17 0 00 000000 		RTN				; yes - return
 12157	103272	037 00 0 00 117052 		TMSG	<   >			; no - space over
 12158	103273	037 13 0 00 000000 		PNTHW				;   and print it
 12159	103274	263 17 0 00 000000 		RTN				; return
 12160
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 281
DFCIA1	MAC	27-Oct-84 19:00		Miscellaneous Test Variables                                                       SEQ 0457

 12161						SUBTTL	Miscellaneous Test Variables
 12162
 12163					;#*********************************************************************
 12164					; Current Test Data
 12165					;#*********************************************************************
 12166
 12167	103275	000 00 0 00 000000 	TSTNUM:	Z				; current test number (1-n)
 12168	103276	000 00 0 00 000000 	TSTSUB:	Z				; current subtest number
 12169	103277	000 00 0 00 000000 	TSTPC:	Z				; current test PC
 12170	103300	000 00 0 00 000000 	TSTFLG:	Z				; current test flags
 12171	103301	000 00 0 00 000000 	TSTMSK:	Z				; mask to determine what test to run
 12172	103302	000 00 0 00 000000 	TSTREP:	Z				; number of test repetitions done
 12173	103303	000 00 0 00 000000 	TSTREQ:	Z				; number of test repetitions requested
 12174	103304	000 00 0 00 000000 	TSTMUL:	Z				; multiple test flag
 12175	103305	000 00 0 00 000000 	TSTOFF:	Z				; relocatable offset of test module
 12176	103306	000 00 0 00 000000 	TSTREL:	Z				; reliability mode repeat count
 12177	103307	000 00 0 00 000000 	TSTCNT:	Z				; reliability mode repeat count
 12178
 12179	103310	000 00 0 00 000000 	PMODE:	Z				; program mode
 12180
 12181	103311	057400	000000		CIPORT:	57400,,0			; CI port controller number
 12182
 12183
 12184					;#********************************************************************
 12185					; PATCH - Patch Area
 12186					;#********************************************************************
 12187
 12188	103312				PATCH0:
 12189	103312				PATCH:	BLOCK	100			; patch area
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 282
DFCIA1	MAC	27-Oct-84 19:00		Miscellaneous Test Variables                                                       SEQ 0458

 12190
 12191					;#********************************************************************
 12192					;* Special code to test SPEAR entries
 12193					;#********************************************************************
 12194
 12195	103412	200 00 0 00 103543 	STEST:	MOVE	[JFCL]			; get noop
 12196	103413	202 00 0 00 100467 		MOVEM	S1			; delete SYERR call #1
 12197	103414	202 00 0 00 100576 		MOVEM	S2			; delete SYERR call #2
 12198	103415	260 17 0 00 103421 		GO	.+4			; do it
 12199	103416	201 01 0 00 100474 		MOVEI	1,SENT10		; get address to print
 12200	103417	260 17 0 00 103454 		GO	STESTP			; print it
 12201	103420	254 00 0 00 103424 		JRST	STEST0			; continue
 12202	103421	261 17 0 00 000000 		RPUT	(0,1)			; save AC's
 12203
 12204	103423	254 00 0 00 100461 		JRST	SPCHK1			; check entry type 1
 12205
 12206	103424	260 17 0 00 103430 	STEST0:	GO	.+4			; do it
 12207	103425	201 01 0 00 100611 		MOVEI	1,SENT11		; get address to print
 12208	103426	260 17 0 00 103454 		GO	STESTP			; print it
 12209	103427	254 00 0 00 103437 		JRST	STEST1			; continue
 12210	103430	261 17 0 00 000000 		RPUT	(0,1,2,3,4)		; save AC's
 12211
 12212	103435	400 15 0 00 000000 		SETZ	ERFLG,			; clear error flag
 12213	103436	254 00 0 00 100530 		JRST	SPCHK2			; check entry type 2 (no error)
 12214
 12215	103437	260 17 0 00 103443 	STEST1:	GO	.+4			; do it
 12216	103440	201 01 0 00 100611 		MOVEI	1,SENT11		; get address to print
 12217	103441	260 17 0 00 103454 		GO	STESTP			; print it
 12218	103442	254 00 0 00 030007 		JRST	SRTDDT			; continue
 12219	103443	261 17 0 00 000000 		RPUT	(0,1,2,3,4)		; save AC's
 12220
 12221	103450	474 15 0 00 000000 		SETO	ERFLG,			; set error flag
 12222	103451	201 00 0 00 000012 		MOVEI	12			; get test number
 12223	103452	202 00 0 00 103275 		MOVEM	TSTNUM			; save it
 12224	103453	254 00 0 00 100530 		JRST	SPCHK2			; check entry type 2 (error)
 12225
 12226	103454	037 00 0 00 120117 	STESTP:	TMSGCD	<Buffer:>
 12227	103455	505 01 0 00 777753 		HRLI	1,-25			; build AOBJN word
 12228	103456	200 00 0 01 000000 		MOVE	(1)			; get data
 12229	103457	037 13 0 00 000000 		PNTHW				; print
 12230	103460	037 00 0 00 030242 		PCRL
 12231	103461	253 01 0 00 103456 		AOBJN	1,STESTP+2		; loop till done
 12232	103462	263 17 0 00 000000 		RTN				; return
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 283
DFCIA1	MAC	27-Oct-84 19:00		Miscellaneous Test Variables                                                       SEQ 0459

 12233
 12234					;#********************************************************************
 12235					;* Special code to produce an EXE version
 12236					;
 12237					; To produce a standard DFCIA.EXE, just type EXE$G in DDT, then ^Z,
 12238					; then CSAVE DFCIA.EXE.  Non-DIAG version type EXEN$G.
 12239					;#********************************************************************
 12240
 12241	103463	200 00 0 00 120122 	EXEN:	MOVE	[SKIPA]
 12242	103464	202 00 0 00 000000*		MOVEM	REQ1
 12243	103465	202 00 0 00 000000*		MOVEM	REQ2
 12244	103466	202 00 0 00 000000*		MOVEM	REL
 12245	103467	200 00 0 00 120123 		MOVE	[10,,140]
 12246	103470	334 00 0 00 000000 		SKIPA	
 12247	103471	200 00 0 00 120124 	EXE:	MOVE	[10,,0]
 12248	103472	202 00 0 00 030046 		MOVEM	CONSW
 12249	103473	200 00 0 00 120125 		MOVE	[SETOM $$TOGG]
 12250	103474	202 00 0 00 030643 		MOVEM	START+32
 12251	103475	201 00 0 00 030000 		MOVEI	30000
 12252	103476	542 00 0 00 000120 		HRRM	.JBSA
 12253	103477	402 00 0 00 030056 		SETZM	$ONETM
 12254	103500	402 00 0 00 000000*		SETZM	HAVIPA
 12255	103501	402 00 0 00 000000*		SETZM	LOCDON
 12256	103502	402 00 0 00 000016 		SETZM	MBCN
 12257	103503	402 00 0 00 044231 		SETZM	CNAME
 12258	103504	254 00 0 00 030007 		JRST	SRTDDT
 12259
 12260	103505	201 01 0 00 000004 	P7:	MOVEI	1,4
 12261	103506	254 00 0 00 103514 		JRST	PG
 12262	103507	201 01 0 00 000003 	P5:	MOVEI	1,3
 12263	103510	254 00 0 00 103514 		JRST	PG
 12264	103511	201 01 0 00 000002 	P3:	MOVEI	1,2
 12265	103512	334 00 0 00 000000 		SKIPA
 12266	103513	201 01 0 00 000001 	P1:	MOVEI	1,1
 12267	103514	202 01 0 00 034011 	PG:	MOVEM	1,DPORT
 12268	103515	202 01 0 00 034013 		MOVEM	1,CPORT
 12269	103516	202 01 0 00 034012 		MOVEM	1,SPORT
 12270						MOVE	1,[0
 12271							   54400,,0
 12272							   55400,,0
 12273							   56400,,0
 12274	103517	200 01 0 01 120126 			   57400,,0](1)
 12275	103520	202 01 0 00 103311 		MOVEM	1,CIPORT
 12276	103521	254 00 0 00 030007 		JRST	SRTDDT
 12277
 12278					;#********************************************************************
 12279					; End of Mainline Module
 12280					;#********************************************************************
 12281
 12282	103522				D1LIT:	XLIST
 12283
NO ERRORS DETECTED

PROGRAM BREAK IS 121020
ABSOLUTE BREAK IS 120712
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page 283-1
DFCIA1	MAC	27-Oct-84 19:00		Miscellaneous Test Variables                                                       SEQ 0460

CPU TIME USED 02:01.727

136P CORE USED
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-1
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0461

AADDR		000000	ext	CLRBUF		111056	ext	CVALID		043076	int	DCOMLX		036335		
ABORT		400000	spd	CLREBU		064304	ext	CWORDL		035714	int	DCOMP	000040	000000	spd	
ADRPHY		065023		CLSBUF		000030	spd	CWORDR		035715	int	DCOMSG		036116		
ADRQUE		064717		CMD0		032345		D1LIT		103522		DCOMZE		036251		
ADRVIR		064774		CMD1		032377		DACRAM		035637		DCONF		042115		
ALL	760000	000000	spd	CMD1A		032411		DATREC		000014	spd	DCONT		035514		
ALTCHK	007000	000000		CMD2		032413		DATRET		000021	spd	DCRESP		102757	int	
ALTF		120713'	int	CMDOPC		067105	ent	DATRQ0		000010	spd	DCWPNT		041311		
ALTMGO		030063		CMDPAK		120716'		DATRQ1		000011	spd	DDALU		036521		
ALUFR		036715		CMDQAV		000400	spd	DATRQ2		000012	spd	DDALU0		036525		
ALUTO		036716		CMDQUE		032427		DATSNT		000020	spd	DDALUM		036677		
ANEXT		035720		CMDQUU		032432		DBCRAM		035634		DDALUX		036577		
ARGFLG		065552	ext	CNAME		044231		DBPAC0		041470		DDCRAM		035631		
ARGUM		104120	ext	CNFRET		000003	spd	DBPACK		041433		DDCSR		034032		
BEGIN		030000		CNTRD		000202	spd	DBPACP		041465		DDEBU1		035556		
BONETM		120714'		CNTSET		000201	spd	DBREA0		040516		DDEBUF		035552		
BPACK		065174	ent	CONFI0		042760		DBREAK		040514		DDEBUG		120722'	int	
BPACKN		065172	ent	CONFI1		043000		DC1ST		120721'		DDLOC0		037026		
BUFCLS		000030	spd	CONFI2		043031		DCBR0		040611		DDLOCM		037172		
BUFCOM		000000	ext	CONFIG		042731	ent	DCBR1		040622		DDLOCS		037022		
BUFF		071047	int	CONFIX		043034		DCBRK		040572		DDLOCX		037073		
BUFGEN		065272	ext	CONPN0		043047		DCCOD1		041122		DDNEX0		040411		
BYTPNT		103167		CONPN1		043070		DCCOD2		041146		DDNEX1		040420		
CADDR		035713	int	CONPNT		043041	ent	DCCOD3		041150		DDNEX2		040425		
CALL	200000	000000	spd	CONSW		030046		DCCOD4		041156		DDNEX3		040432		
CALMAR		120715'		CONVI0		065755		DCCOD5		041160		DDNEXT		040366		
CALPAR		042407	ent	CONVIE		065766		DCCOD6		041166		DDPLI		037417		
CBASE		030655	ext	CONVIR		065752	ent	DCCODE		041114		DDPLI0		037423		
CCMIC		041232		CONVIX		065762		DCLEAR		034054		DDPLI1		037457		
CCTAB1		041172		CONVSX		036065	ext	DCMAR0		037307		DDPLIM		037476		
CCTAB3		041212		CPORT		034013	int	DCMAR1		037320		DDPLIX		037473		
CCWPNT		041314	ext	CRAMFR		035711		DCMAR2		037335		DDPLM2		037502		
CHINIT		100723	ext	CRAMTO		035712		DCMARK		037270		DDPPAK		040435		
CHKARG		105630	ext	CRCCA0		065472		DCODPB		036162		DDRAR		035604		
CHKCSR		000000	ext	CRCCAL		065470		DCOLDB		036140		DDTAB		040373		
CHKIN0		065631		CRCFIX		065504		DCOM0		035671		DDUMP		037752	int	
CHKIN1		065636		CRCOFF		065455	ext	DCOM1		035706		DDUMP0		040005		
CHKIN2		065644		CRCSAV		065326	ext	DCOM3A		036062		DDUMPM		040077		
CHKIN3		065656		CRCTAB		065456	ext	DCOMA0		036035		DDUMPX		040071		
CHKINT		065617	ent	CSHFLG		030506		DCOMA1		036040		DEALU		036413		
CHKINX		065657		CSHMEM		030507		DCOMA2		036057		DEALU0		036434		
CHKQU0		066306		CSREN0		042477		DCOMA3		036060		DEALU1		036454		
CHKQUE		066303		CSREN1		042513		DCOMA4		036077		DEALUM		036674		
CHKQUX		066314		CSREN2		042514		DCOMA5		036101		DEALUX		036514		
CHKRQV		041670	ext	CSRENB		042524		DCOMAA		036047		DEBALU		036452		
CHKRS0		066174		CSRENG		042465	ent	DCOMAG		036021		DEBEBU		035534		
CHKRS1		066212		CSRENS		120717'		DCOMAL		036016		DEBELO		036756		
CHKRS2		066235		CSRENX		042516		DCOMAX		036104		DEBLAR		035567		
CHKRS3		066253		CSRPNT		042443	ent	DCOMDB		036011		DEBSTK		040457		
CHKRS4		066275		CSRPNX		042460		DCOMDE		035721		DEBTIM		101267	ext	
CHKRSP		066134	ent	CSRRQS	200000	000000	spd	DCOMEX		036267		DEBUG1		002000	spd	
CHKRSX		066276		CSRSAV		120720'		DCOMEZ		036310		DEBUG2		001000	spd	
CHKTAB		066323		CTABLE		043077	int	DCOMGO		035650		DEBUG3		000400	spd	
CIPORT		103311		CTYPE		043117	int	DCOML0		036315		DEBUG4		000200	spd	
CKTSET		000200	spd	CURTIM		042045	ext	DCOMLI		036313		DEBUG5		000100	spd	
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-2
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0462

DEBUG6		000040	spd	DHELP		032760		DSCPO0		033531		DSPAR2		033207		
DECOP0		067214		DHELP0		032772		DSCPO1		033547		DSPAT		034003		
DECOPC		067212		DHELP1		033025		DSCPO2		033550		DSPCB1		033326		
DECOPX		067226		DIINIT		041412		DSCPO3		033543		DSPCB2		033327		
DECRAM		035626		DIPLI		037612		DSCSR1		033167		DSPEAR		004000	spd	
DECSR		034022		DIPLIM		037635		DSCSR2		033170		DSPNT1		033621		
DECTAB		067230		DIPRIN		041336		DSDAT1		033302		DSPNT2		033622		
DECVER		000000	spd	DIQUEU		041506		DSDAT2		033303		DSPOR0		033471		
DECYN		033633	ext	DISGO		031211		DSDAT3		033313		DSPOR1		033506		
DEEBUF		035531		DISLIS		031132		DSDATA		033777		DSPOR2		033507		
DELAR		035564		DISMS	104000	000167	int	DSDATX		033276		DSPOR3		033503		
DELAY	005000	000000		DISP0		030771		DSEBU1		033226		DSPRIN		034016	int	
DELOC0		036740		DISP0A		031053		DSEBU2		033227		DSPTH1		033444		
DELOC1		036761		DISP0B		031055		DSET		033052		DSPTH2		033445		
DELOCM		037165		DISP1		031063		DSETAD		033137		DSPTHL		033451		
DELOCS		036717		DISP2		031120		DSETCN		033514		DSRES1		033377		
DELOCX		037015		DISPAT		030765		DSETCS		033160		DSRES2		033400		
DENE0		040313		DISPD		031107		DSETDA		033255		DSSCLR		034237		
DENEX0		040347		DISPE		031115		DSETEB		033215		DSSPN0		034226		
DENEX1		040353		DISPR		031101		DSETFN		033335		DSSPNT		034215		
DENEX2		040357		DISPX		031121		DSETFO		033406		DSST0		034162		
DENEX3		040363		DISQUE		031125		DSETHE		033765		DSST1		034176		
DENEXT		040304		DISQUU		031130		DSETHL		033773		DSSTEP		034146		
DEPLI		037507		DLBR0		040655		DSETIG		033627		DSSTX		034202		
DEPLI0		037520		DLBR1		040670		DSETIN		033664		DSSUM		034020		
DEPLI1		037546		DLBR2		040707		DSETLN		033235		DSSUM1		033656		
DEPLIM		037576		DLBRK		040636		DSETPA		033430		DSSUM2		033657		
DEPLIX		037572		DLBRX		040715		DSETPC		033315		DSTAR0		034102		
DERBUF		037736		DLCRAM		035645		DSETPL		033730		DSTART		034074		
DESTA0		040470		DLGPNT		041317		DSETPO		033455		DSTOP		034123		
DESTAK		040454		DLIST		040740		DSETPP		033747		DSTOP1		034136		
DESTAX		040505		DLMAR0		037360		DSETPR		033175		DSTPAT		034004		
DESTAY		040506		DLMAR1		037373		DSETPT		033607		DSWIT		041325		
DESTKM		040511		DLMAR2		037407		DSETPX		033763		DSXCT1		033574		
DETAB		040331		DLMARK		037341		DSETRE		033366		DSXCT2		033575		
DETBUF		037722		DLMARX		037415		DSETSU		033647		DTRAC0		034150		
DEVREL		031362	ext	DLOAD		040717		DSETUP		030707	ext	DTRACE		034143		
DEVREQ		030720	ext	DMARK		037212		DSETWH		033701		DTRANS		041104		
DFEXA0		041057		DMARK0		037214		DSETXC		033555		DTRFLG		120724'		
DFEXAM		041047		DPINIT		041420		DSFNM0		033351		DWATC0		041613		
DFEXAX		041102		DPLIH		037610		DSFNM1		033355		DWATC1		041670		
DFILLN		041243		DPORT		034011		DSFNM2		033356		DWATC2		041710		
DFILLP		041267		DPPCB		041522		DSFOR1		033420		DWATC3		041743		
DFILN0		041254		DPQUE0		041553		DSFOR2		033421		DWATC4		042012		
DFILP0		041300		DPQUEU		041530		DSFORL		033425		DWATC5		042015		
DFLAG		120723'		DRBR0		040551		DSIDLE		041425		DWATC6		042026		
DFLIS0		041023		DRBRK		040547		DSIGN1		033640		DWATC7		042036		
DFLIST		041012		DRCRAM		036372	ent	DSIGN2		033641		DWATC8		042043		
DFLISX		041045		DRESET		034047		DSINIT		034061		DWATCG		041650		
DFLOAD		040753		DRMAR0		037243		DSINT		034021		DWATCH		041562		
DFREE		070027		DRMARK		037241		DSINT1		033673		DWATCQ		041612		
DFVERF		040776		DSADD1		033152		DSINT2		033674		DWATCX		042050		
DGEND		100446		DSADD2		033153		DSLEN1		033247		DWCRAM		036340	ent	
DGSNT		000001	spd	DSADDR		033776		DSLEN2		033250		DWORDL		120725'		
DGSTAR		073447		DSBYTE		034002		DSPAR1		033206		DWORDR		120726'		
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-3
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0463

DXCTID		034014		FUERR0		044200		IREGRX		065543		MLOADN		064254	ent	
DZALU		036602		FUNCT	020000	000000	spd	IREGW		065546		MLOADR		064326		
DZALU0		036623		FVERF0		044112		IREGW0		065552		MLOADX		064406		
DZALU1		036643		FVERF1		044133		IREGW1		065571		MLOADY		064256	ent	
DZALUM		036712		FVERFC		044100		IREGWX		065576		MONTYP		030516		
DZALUX		036671		FVERFE		044147		ISTOP		115737	ext	MPRUN		000010	spd	
DZCRAM		035642		GET	262740	000000		ITERAT		000005	spd	MSG	100000	000000	spd	
DZCSR		034041		GETJI	104000	000507	int	ITEXT		065235		MSGSNT		000002	spd	
DZEBUF		035545		GETLOG		041322	ext	ITEXT0		065252		MULFLG		120743'		
DZLOC0		037117		GETPPN		100653		ITEXT1		065260		MULINI		120744'		
DZLOC1		037137		GETQU0		066120		ITEXT2		065266		MVCOM		064267		
DZLOCM		037205		GETQUE		066101		ITEXT3		065276		MVFLAG		120745'		
DZLOCS		037076		GETQUX		066130		ITRCNT		030024		MVNUM		120746'		
DZLOCX		037162		GO	260740	000000		LARG2		120736'		MVPNT		064437	ent	
DZRAR		035616		GTAD	104000	000227	int	LASARG		033701	ext	MVPNT1		064457		
EADDR		000000	ext	HALT	254200	000000		LASENT		065750		MVPNTW		064516		
ECODE		064235		HAVIPA		103500	ext	LAST	010000	000000	spd	MVPNTX		064506		
ECOMP	000020	000000	spd	ICRC		065311		LBSNT		000015	spd	MVREP		120747'		
EDEBUG		120727'	int	ICRC0		065371		LDCRAM		064357	ext	MWBADR		064420		
ENABLE		030711	ext	ICRC1		065411		LDCSR		113775	ext	MWBLAC		064426		
ENATST		120730'		ICRCX		065451		LDEBUF		035562	ext	MWBLCO		064423		
ENDFIX		030577		ICRCY		065457		LDEBUG		120737'	int	MWBRAC		064434		
ENDTIM		120731'		ICWA0		040141	ext	LDRAR		065110	ext	MWBRCO		064431		
ENDUUO	037500	000004		IDLE	000100	000000	spd	LENTRY		065664		MWDQUE		036227		
EOPUUO	037700	000004		IDREC		000013	spd	LINK	100000	000000	spd	NCHAR		120750'		
EPLIH		037611		IDREQ		000005	spd	LINKP		067420		NEWENT		120751'		
ERESET		034052	ext	IGNFLG		034017	int	LINKPX		067430		NPACKR		120752'		
ERFLG		000015		INHCRC		120735'		LOCDON		103501	ext	NPACKS		120753'		
ERRPC		030052		INITPD		031353	ext	LOCFR		037210		NRESP		102756		
EXE		103471		INITPI		041415	ext	LOCPHY		030710	ext	NUMENT		065751	int	
EXEN		103463		INSQU0		066044		LOCTO		037211		OP		000011		
FFF		065776	ext	INSQU1		066066		LOGPNT		041323	ext	OPCPN0		067065		
FFLAG		044232		INSQUE		065777	ent	LOOP	040000	000000	spd	OPCPNE		067076		
FGETW		043771	ext	INSQUX		066073		LOOPGM		040000	spd	OPCPNT		067055	ent	
FINCMD		111026	ext	INTAPR		041401	ext	LOOPTS		020000	spd	OPCPNX		067102		
FINECH		120732'	int	INTCON		041376	ext	MAPNEW		030143		OPRSEL		000010	spd	
FINPUT		120733'	int	INTCSR		041404	ext	MAXPOR		000017	spd	P		000017		
FIOFF		115646	ext	INTEND		105617	ext	MAXTST		000054	spd	P1		103513		
FLDLIS		036204		INTNUM		105620	ext	MBCN		000016		P3		103511		
FLOADB		043745		INTPC		041364	ext	MCNF		000004	spd	P5		103507		
FLOADC		044030		INTTIM		041367	ext	MCNVER		000003	spd	P7		103505		
FLODB0		043761		INTTYP		041407	ext	MCPUS		120740'		PACK1		066511		
FLODB1		043771		INTUSE		041372	ext	MDATRQ		000016	spd	PACK13		066525		
FLODB2		044007		IPACLR		100711	ext	MDEBUG		120741'	int	PACK15		066572		
FLODBE		044022		IPASRT		035517	ext	MDTSNT		000022	spd	PACK33		066621		
FLODBX		044021		IPASST		040476	ext	MFREE		070024		PACK36		066632		
FLODC0		044050		IPASTP		034126	ext	MGEND		073446		PACK37		066647		
FLODCX		044070		IPCB		067551		MGSTAR		071447		PACK5		066517		
FMTTYP		120734'		IPRIN0		041344		MLIST		064526		PACKET		070047	int	
FNAME		044225		IPRINI		041355		MLIST0		064535		PACKG		066664		
FOARG		000000	ext	IPRINT		041341	ent	MLISTX		064560		PAG		000010	spd	
FORPNT		032043	ext	IPRINX		041351		MLNUM		120742'	int	PAKOFF		120754'		
FORSEL		034007		IREGR		065523		MLOAD0		064306		PAKTYP		120755'		
FSELEC	037240	000004		IREGR0		065527		MLOAD1		064330		PARFLG		034000	int	
FUERR		044155		IREGR1		065540		MLOAD2		064403		PASCNT		030047		
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-4
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0464

PASPNT		030746		PNTHW	037540	000000		PTEXTX		067413		RETDAT		000021	spd	
PAT		000014		PNTHWF	037540	000001		PTIME		043417	ext	RFROM		035717		
PAT1		120756'		PNTMSF	037040	000000		PUT	261740	000000		RLOCB		120770'		
PAT2		120757'		PNTMSG	037000	000000		PVPAGI		030511		RLOCE		120771'		
PATCH		103312		PNTOCC	001000	000000		PXCTID		067311		RQAFLG		113742	ext	
PATCH0		103312		PNTOCF	037740	000003		Q		000013		RSPFLG		034006		
PATPNT		033754	ext	PNTOCS	037700	000003		QARG1		120762'		RSPONS		070447	int	
PATSEL		034010		PNTPAK		103050		QARG2		120763'		RSPOPC		067131		
PBUFF	200000	000000	spd	PNTRD		103024		QFDG1		073447		RSPPAK		120772'		
PCB		070000	int	PNTREG		103042		QFDG10		077047	int	RSTART		200000	spd	
PCBBAS		070042		PNTRS0		042072		QFDG11		077447		RSTSNT		000006	spd	
PCBFLG		034005		PNTRS1		042107		QFDG12		100047		RTMDAT		000023	spd	
PCBPI		070043		PNTRSP		042056	ent	QFDG2		074047		RTN	263740	000000		
PCMD		120760'		PNTRSX		042110		QFDG3		074447		RTO		035716		
PCRL	037000	030242		PNTSIX	037000	000002		QFDG4		075047		RUNTME		101265	ext	
PCRL2	037000	030243		PNTSTR		103002		QFDG5		075447		RUPDA1		043242		
PCRLF	037040	030242		PNTSXF	037040	000002		QFDG6		076047		RUPDA2		043245		
PDSABL		000040	spd	PNTWA0		103076		QFDG7		076447	int	RUPDA3		043261		
PENABL		000020	spd	PNTWAI		103057		QFMG1		071447		RUPDAT		043166	ent	
PFLAGS		067017		PNTWAS		103106		QFMG2		072047		RUPDAX		043264		
PFORCE	037040	000026		PNTWC0		103232		QFMG3		072447		RWAIT		065601	ent	
PG		103514		PNTWCM		103203		QFMG4		073047		RWAIT0		065605		
PGMINT	265000	030011		PNTWD		042365		RALUB		120764'		RWAITX		065613		
PGMNAM		030600	int	PNTWPK		103141		RALUE		120765'		S1		100467		
PHEAD		067324		PNTWRT		103012		RANCNT		120766'		S2		100576		
PI00RQ	020000	000000	spd	PNTWS0		103113		RANDBS		030022		SAVCMD		120773'		
PJRST	254000	000000		PNTWS1		103122		RANGEN		031623		SAVCR0		042575		
PK		000012		PNTWS2		103124		RANNUM		120767'		SAVCRL		042635		
PK15A		066616		PNTWS3		103135		RDBF		040226		SAVCRM		042566		
PLIDAT		037606		PORT	400000	000000	spd	RDBUF1		040114		SAVFLD		120774'		
PLILNK		037605		PPAKC		066422	ent	RDBUFS		040104		SAVHST		035466		
PLINUM		120761'		PPAKC0		066440		RDBUFX		040122		SAVNUM		120775'		
PLIREP		037607		PPAKCC		066443		RDCNT		000202	spd	SAVRAR		120776'		
PLOG		040127		PPAKCX		066454		RDCRAM		115331	ext	SB		030610		
PLOG0		040153		PPAKF		066472	ent	RDCSR		113771	ext	SCOOFF		042227	ext	
PLOGM		040171		PPAKR		066457	ent	RDEBUF		065116	ext	SCOPE1		000000	ext	
PMISC		066772		PPCB		067434	ent	RDLAR		041140	ext	SCOPER	027000	000000		
PMISC0		067000		PPCB0		067510		RDMIC		065133		SCOSW		000000	ext	
PMODE		103310	int	PPCBD		067504	ent	RDNODE		065076	ent	SDATA		042232	ext	
PNT1	037040	000000		PPCBP		067542		RDNODX		065127		SDEBUG		120777'	int	
PNT2	037100	000000		PPORTO		067337		RDREG		000203	spd	SELLAR		040000	spd	
PNT3	037140	000000		PQUEU0		066405		REGRD		000203	spd	SEN11L		100624		
PNT4	037200	000000		PQUEUE		066353	ent	REGWR		000204	spd	SENT10		100474		
PNT4F	037200	000001		PQUEUX		066413		REL		103466	ext	SENT11		100611		
PNTADR	037400	000000		PRSFLG		034001		RELIAB		000400	spd	SETCKT		000200	spd	
PNTCA0		103254		PSP	037000	000040		REQ1		103464	ext	SETCNT		000201	spd	
PNTCAD		103242		PSPF	037040	000040		REQ2		103465	ext	SETDS0		042175		
PNTCI	037000	000000		PSTAT0		066711		REQDT0		000010	spd	SETDSA		042162	ent	
PNTCIF	037040	000000		PSTAT1		066720		REQDT1		000011	spd	SETDSX		042203		
PNTCRM		042271		PSTAT2		066722		REQDT2		000012	spd	SETEBU		035557	ext	
PNTDCC	003000	000000		PSTAT3		066733		REQID		000005	spd	SETEN0		042132		
PNTDCF	037640	000001		PSTATS		066675		REQMDT		000016	spd	SETEN1		042141		
PNTDEC	037640	000000		PSTATX		066736		RESCR0		042621		SETEN2		042146		
PNTENB		030220		PTEXT		067352		RESCRM		042610		SETEN3		042155		
PNTHST		035447		PTEXT0		067402		RESQAV		000200	spd	SETENA		042122	ent	
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-5
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0465

SETENE		042156		STEST1		103437		TEXCAL		100744		TREGN		065165	int	
SETLAR		000000	ext	STESTP		103454		TEXEC		100665	ent	TRESPA		102356	int	
SETVEC		041416	ext	STIME		121003'		TEXERR		100675		TRESPC		101756	int	
SHUTRQ		066342		STRSNT		000007	spd	TEXEX1		100676		TREX		042224		
SHUTRX		066351		STRT1		030647		TEXEXI		100771		TREXX		042240		
SINCYC		020000	spd	SUPDA0		043150		TEXEXX		100702		TRSFLG		065155	int	
SLAST		035500	ext	SUPDAT		043130	ent	TEXINI		100776		TSLOAD		121005'	int	
SLDATA		121000'		SWCHPT		000000	ext	TEXJRS		100736		TST1		000000	ext	
SNARKF		000000	ext	SWCOM		041333	ext	TEXPAK		101327		TST10		000000	ext	
SNDDAT		000020	spd	SWITT		100525	ext	TEXRD		101114		TST11		000000	ext	
SNDDG		000001	spd	SWPTAB		030525		TEXRD0		101155		TST12		000000	ext	
SNDLB		000015	spd	SWRGT		030635	ext	TEXRD1		101165		TST13		000000	ext	
SNDMDT		000022	spd	SWSTP		000124	spd	TEXRDX		101212		TST14		000000	ext	
SNDMSG		000002	spd	SWSTT		000031	spd	TEXST0		100717		TST15		000000	ext	
SNDRST		000006	spd	SYERR	104000	000527	int	TEXST1		100731		TST16		000000	ext	
SNDSTR		000007	spd	SZERO		043470		TEXSTR		100706		TST17		000000	ext	
SNEXT		042231	ext	T10M		000000	ext	TEXWA0		101250		TST2		000000	ext	
SPCHK1		100461		T11M		000000	ext	TEXWA1		101263		TST20		000000	ext	
SPCHK2		100530		T12M		000000	ext	TEXWA2		101276		TST21		000000	ext	
SPEAR1		121001'		T13M		000000	ext	TEXWA3		101305		TST22		000000	ext	
SPEAR2		121002'	int	T14M		000000	ext	TEXWAI		101222		TST23		000000	ext	
SPORT		034012	int	T15M		000000	ext	TEXWAX		101317		TST24		000000	ext	
SPRE1X		100471		T16M		000000	ext	TEXWR0		101060		TST25		000000	ext	
SPRE2A		100521		T17M		000000	ext	TEXWR1		101070		TST26		000000	ext	
SPRE2B		100556		T20M		000000	ext	TEXWRT		101022		TST27		000000	ext	
SPRE2C		100567		T21M		000000	ext	TEXWRX		101104		TST3		000000	ext	
SPRE2X		100603		T22M		000000	ext	TFLER1		043705		TST30		000000	ext	
SPREP1		100447		T23M		000000	ext	TFLER2		043715		TST31		000000	ext	
SPREP2		100510	int	T24M		000000	ext	TFLER3		043725		TST32		000000	ext	
SREPO0		043304		T25M		000000	ext	TFLER4		043735		TST33		000000	ext	
SREPO1		043352		T26M		000000	ext	TFLOAD		043652	ent	TST34		000000	ext	
SREPO2		043357		T27M		000000	ext	TFLOAE		043700		TST35		000000	ext	
SREPO3		043415		T2M		000000	ext	TFLOAX		043676		TST36		000000	ext	
SREPO4		043422		T30M		000000	ext	TFMFLG		065154	int	TST37		000000	ext	
SREPOR		043272	ent	T31M		000000	ext	TIDLE		065052	ent	TST4		000000	ext	
SREPOX		043460		T32M		000000	ext	TIDLEE		065072		TST40		000000	ext	
SRTDDT		030007		T33M		000000	ext	TLERR		064610		TST41		000000	ext	
SSADRL		034447		T34M		000000	ext	TLOAD		064567	ent	TST42		000000	ext	
SSADRN		034647		T35M		000000	ext	TLOADE		064601		TST43		000000	ext	
SSCSRL		035047		T36M		000000	ext	TLOADX		064577		TST44		000000	ext	
SSCSRN		035247		T37M		000000	ext	TMP1		121004'		TST45		000000	ext	
SSLOC		034246		T3M		000000	ext	TPAT		065164	int	TST46		000000	ext	
SSNUM		034247		T40M		000000	ext	TPCB		064612	ent	TST47		000000	ext	
STARCA		043556	int	T4M		000000	ext	TPCB0		064620		TST5		000000	ext	
STARCB		043614	int	T5M		000000	ext	TPCB1		064667		TST50		000000	ext	
START		030611	ent	TAKFIL		031576	int	TPCB2		064677		TST51		000000	ext	
STARTA		030723	ent	TBYTE		065162	int	TPCB3		064700		TST52		000000	ext	
STARTB		030745		TCMD		101356	int	TPCBX		064711		TST53		000000	ext	
STASNT		043474	int	TCSR		101355	int	TPTFLG		065156	int	TST54		000000	ext	
STATAB		066743		TDENA	000100	000000	spd	TRACE		042206	ent	TST6		000000	ext	
STATB		043474		TDPORT		065161	int	TRACET		400000	spd	TST7		000000	ext	
STATE		043651	spd	TERMES		102764		TREGCF		065171		TSTAL0		032023		
STCLOK		030656	ext	TERROR		102762		TREGD		065166	int	TSTALT		032014		
STEST		103412		TERTYP		102763		TREGDA		065170		TSTATA		102761	int	
STEST0		103424		TEXCAC		100756		TREGDC		065167		TSTATC		102760	int	
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-6
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0466

TSTCNT		103307		TSTREQ		103303		.COMM		036072	ext	.MCRTN		000017	spd	
TSTCON		031375		TSTRES		032261		.CONI		000000	ext	.MCRY		000001	spd	
TSTCPN		031403		TSTSAV		121010'		.CONO		000000	ext	.MD		000007	spd	
TSTD0		031712		TSTSP0		031621		.DARG		040436	ext	.MJ		007777	spd	
TSTD1		031720		TSTSPC		031600		.DATAI		040156	ext	.MJMAP		000017	spd	
TSTD2		031732		TSTSSW		031533		.DATAO		040151	ext	.MLDCT		000017	spd	
TSTD3		031733		TSTSUB		103276	int	.DBCMD		032435		.MLDLM		000037	spd	
TSTD4		031736		TSTSWI		031521		.DBDIS		032607		.MMGC		001777	spd	
TSTD5		031745		TSTSWP		031526		.HLCMD		033000		.MOENA		000001	spd	
TSTD6		031752		TSTTA0		031561		.INPNT		041713	ext	.MOR		000007	spd	
TSTD8		031772		TSTTAB		032050	int	.INWD1		041712	ext	.MPLUS		000007	spd	
TSTD9		032001		TSTTAK		031544		.ISWT		105625	ext	.MRDLM		000037	spd	
TSTDDT		031346		TSTTAN		031542		.JBSA		000120	spd	.MRPCT		000017	spd	
TSTDEB		032341		TSTZER		031370		.LA		000000	spd	.MS0A		000007	spd	
TSTDIA		031341		TTALTM	037340	000003		.LADDR	000100	000000	spd	.MS0B		000007	spd	
TSTDIS		031672		TTIDEC	037200	000003		.LAND		000000	spd	.MSD0		000007	spd	
TSTDL0		031477		TTNBRF		030510		.LB		000000	spd	.MSELC		000007	spd	
TSTDS0		031453		TTPNT		102767	ent	.LCCER		000000	spd	.MSELE		000007	spd	
TSTDSA		031442		TTSIXB	037400	000003		.LCENA		000000	spd	.MSELM		000007	spd	
TSTDSL		031472		TTYYES		000000	ext	.LCJP		000000	spd	.MSELP		000007	spd	
TSTEBF		200000	spd	TWADDR		102766		.LCJPP		000000	spd	.MSKCN		000037	spd	
TSTEN0		031451		TWORD		065163	int	.LCJS		000000	spd	.MXNOR		000007	spd	
TSTENA		031446		TWTIME		102765		.LCONT		000000	spd	.OARG		065564	ext	
TSTEND		042244	ent	TXADDL		121011'	int	.LCRTN		000000	spd	.RA	000010	000000	spd	
TSTEOP		032032		TXALL	060000	000000	spd	.LCRY		000000	spd	.RAND	040000	000000	spd	
TSTEXE		031267		TXCTID		065157	int	.LD		000000	spd	.RB		400000	spd	
TSTFLG		103300	int	TXTINH		000200	spd	.LJ		010000	spd	.RBERR		000004	spd	
TSTHL0		031422		UCODE		044234		.LJMAP		000000	spd	.RBRCV		000001	spd	
TSTHLC		031430		UDEBUG		121012'	int	.LLDCT		000000	spd	.RCCER		100000	spd	
TSTHLL		031435		ULEN		044233		.LLDLM		000000	spd	.RCENA	000400	000000	spd	
TSTHLP		031410		UNAME		044227		.LMGC		000001	spd	.RCJP		000060	spd	
TSTHLT		031357		USER		030037		.LOENA		002000	spd	.RCJPP		000260	spd	
TSTL1		121006'		USRION		030712	ext	.LOR		000000	spd	.RCJS		000020	spd	
TSTL2		121007'		UVERR		064234		.LPLUS		000000	spd	.RCONT		000340	spd	
TSTLI0		031317		UVERSN		121013'	int	.LRDLM		000000	spd	.RCRTN		000240	spd	
TSTLI1		031326		WATFLG		121014'		.LRPCT		000000	spd	.RCRY		000400	spd	
TSTLIS		031275		WATTIM		121015'		.LS0A		000000	spd	.RD	001000	000000	spd	
TSTLIX		031337		WRDERR		000000	ext	.LS0B		000000	spd	.RESET		030647	ext	
TSTMAX		032125		WRPLI		040253		.LSD0		000000	spd	.RJ		000000	spd	
TSTMIC		032126		WRREG		000204	spd	.LSELC		000000	spd	.RJMAP		000040	spd	
TSTMSK		103301	int	XXW		121016'		.LSELE		000000	spd	.RLDCT		000300	spd	
TSTMUL		103304		XXX		121017'		.LSELM		000000	spd	.RLDLM		230000	spd	
TSTNAM		032203	int	$$TOGG		030521		.LSELP		000000	spd	.RMGC		000000	spd	
TSTNUM		103275	int	$ARG2		007757		.LSKCN		000000	spd	.ROENA		000000	spd	
TSTOFF		103305	int	$B		000052		.LSWIT		000000	ext	.ROR	030000	000000	spd	
TSTPC		103277	int	$CHR		000052		.LXNOR		000000	spd	.RPERR		000003	spd	
TSTPN0		042260		$GARG		000001		.MA		000017	spd	.RPLUS		000000	spd	
TSTPNT		042247	ent	$ONETM		030056		.MAND		000007	spd	.RPRCV		000000	spd	
TSTPNX		042266		$TTCHR		030231		.MB		000017	spd	.RRDLM		220000	spd	
TSTPRI		031514		$TWCNT		030225		.MCCER		000037	spd	.RRERR		000002	spd	
TSTRA0		031656		%ADDR		007760	spd	.MCENA		000001	spd	.RREXP		000005	sin	
TSTRAA		031664		%ML	775777	570000	spd	.MCJP		000017	spd	.RRPCT		000220	spd	
TSTRAN		031643		%MR		000040	spd	.MCJPP		000017	spd	.RS0A	400000	000000	spd	
TSTREL		103306		.CGOT		041331	ext	.MCJS		000017	spd	.RS0B	300000	000000	spd	
TSTREP		103302	int	.CLOSE		031363	ext	.MCONT		000017	spd	.RSD0	700000	000000	spd	
DFCIA (Port Functional Diagnostic)	MACRO %53A(1152) 18:45 29-Oct-84 Page S-7
DFCIA1	MAC	27-Oct-84 19:00		SYMBOL TABLE                                                                       SEQ 0467

.RSELC		004000	spd	
.RSELE		005000	spd	
.RSELM		002000	spd	
.RSELP		001000	spd	
.RSKCN		240000	spd	
.RSWIT		030636	ext	
.RXNOR	070000	000000	spd	
.SAACK		000002	spd	
.SANAK		000003	spd	
.SANSP		000004	spd	
.SARG		033630	ext	
.SBACK		000005	spd	
.SBNAK		000006	spd	
.SBNSP		000007	spd	
.SBSNT		000001	spd	
.SPSNT		000000	spd	
.SRERR		000010	spd	
.SREXP		000011	sin	
.STCMD		033064		
.STDIS		033112		
.SWCHP		105632	ext	
AADDR	    90#
ABORT	   247	  1213                                                                                                     SEQ 0468
ADRPHY	  8802	  8902#	  9586	  9588
ADRQUE	  8810	  8828#
ADRVIR	  8797	  8876#	  9590
ALL	   636
ALTF	    38	   240	   322#	   322	   335	   339	  1188	  1231	  1639	  1643	  3489	  3546	  3636	  3949
	  3978	  4072	  4126	  4369	  4423	  5268	  5277	  5286	  5299	  5317	  5325	  5541	  6132	  6167
	  6679	  7172	  8693
ALTMGO	   338	  1027	  1074	  1110	  1189	  1192	  1642	  3549	  3640
ALUFR	  4045	  4085	  4159	  4224	  4263	  4333#
ALUTO	  4047	  4087	  4161	  4226	  4265	  4334#
ANEXT	  3540#	  3610	  3733	  3927	  3953	  3981	  4123	  4190	  4208	  4286	  4427	  4479	  4480	  4501
	  4585	  4924	  5005	  5566	  5573	  5580	  5587	  5624	  5631	  5639	  5647
ARGFLG	   102#	   418	   421	   870	  1036	  1044	  1116	  1124	  1138	  1674	  1677	  3561	  4206	  4499
	  4634	  4677	  5746	  5793	  9414	  9443
ARGUM	   102#	   671	   678	   795	   797	   881	   983	   989	  1042	  1122	  2039	  2041	  2222	  2285
	  2310	  2377	  2401	  2416	  2466	  2472	  2521	  2548	  2579	  2592	  2623	  2637	  2669	  2678
	  2703	  2751	  2771	  2822	  2831	  2954	  3037	  3119	  3120	  3125	  3193	  3198	  3338	  3352
	  3391	  3471	  3481	  3568	  3576	  3584	  3592	  3600	  4056	  4064	  4153	  4168	  4209	  4235
	  4243	  4353	  4361	  4451	  4465	  4502	  4528	  4536	  4645	  4688	  4733	  4743	  4806	  4816
	  4887	  4902	  4910	  4911	  4981	  4989	  5001	  5002	  5522	  5523	  5528	  5533	  5542	  5588
	  5634	  5642	  5648	  5663	  5678	  5757	  5804	  5845	  5855	  5913	  5923	  5993	  6024	  6186
	  6299	  6327	  6481	  6560	  6603	  6615	  6638	  6639	  6723	  6743	  6777	  6779	  6821	  9426
	  9456	  9468
BEGIN	 12283
BONETM	   153#	   153	   155	   391
BPACK	    46	  6506	  7474	  9089#	 11478	 11587	 11800
BPACKN	    46	  9087#
BUFCLS	 10564	 10589	 10671
BUFCOM	   103#
BUFF	    49	 10047	 10123	 10139	 10781	 10783	 10972#
BUFGEN	   103#	  9213
BYTPNT	 12054	 12057	 12060	 12063	 12066	 12071#
CADDR	    27	  3532#	  3557	  3622	  3626	  3920	  3938	  3969	  3973	  3994	  4006	  4022	  4029	  4657
	  4700	  4769	  4844	  5769	  5816	  5881	  5951	  6122	  6129	  6156	  6163	  6303	  6328	  6331
	  7367	  7389	  8203	  8283	  8334	  8350	  8364	  8374	  8540	  8580
CALL	  8734
CALMAR	  7224#	  7224	  7226	  7250
CALPAR	    26	  4002	  5777	  5958	  7222#	  8552	  8687
CBASE	    93#	   183
CCMIC	  6210	  6211	  6278#
CCTAB1	  6236	  6245	  6257#
CCTAB3	  6223	  6225	  6235	  6244	  6274#
CCWPNT	    93#	  6348
CHINIT	    93#	  3032	  8939	 11346
CHKARG	   102#	   721	   732	   746	   761	   773	   780	   906	   933	   943	   949	   960	  1599	  1881
	  1956	  1993	  1998	  2861	  2935	  2964	  2976	  2986	  2997	  3068	  3217	  3291	  3313	  3336
	  3362	  3401	  5106	  5205	  5229	  5622	  5687	  6044	  6087	  6110	  6145	  6196	  6346	  6358
	  6370	  6384	  6442	  6454	  6465	  6587	  6944
CHKCSR	    89#
CHKIN0	  9530#	  9533
CHKIN1	  9531	  9535#
CHKIN2	  9544#	  9553
CHKIN3	  9548	  9554#                                                                                                    SEQ 0469
CHKINT	    46	  6799	  9516#	  9625	  9647	  9781	  9812	  9986	  9989
CHKINX	  9534	  9558#
CHKQU0	  9920#	  9925
CHKQUE	  9811	  9917#
CHKQUX	  9922	  9926#
CHKRQV	    84#	  6734
CHKRS0	  9819#
CHKRS1	  9820	  9839#
CHKRS2	  9815	  9861#
CHKRS3	  9862	  9881#
CHKRS4	  9835	  9857	  9877	  9902#
CHKRSP	    46	  6735	  7486	  9775#	 11484	 11517	 11549	 11593	 11626	 11670	 11711	 11770
CHKRSX	  9782	  9786	  9813	  9906#
CHKTAB	  9919	  9938#
CIPORT	   214	   347	  1173	  1609	 12181#	 12275
CKTSET	 10565	 10590	 10672
CLRBUF	    99#	   346	  1636	  3644	  3691	  3712	  9415	  9444
CLREBU	    89#	  8513
CLSBUF	 10536	 10640
CMD0	  1605#	  1641	  1667	  1686	  1688	  1694
CMD1	  1637#	  1653	  1659	  1672
CMD1A	  1656#	  1671
CMD2	  1654	  1669#
CMDOPC	    47	 10501	 10523#
CMDPAK	  6927	 10042#	 10042	 10118	 10502
CMDQAV	  6816	  7480	  9962	 11501	 11610	 11699
CMDQUE	  1662	  1692#
CMDQUU	  1693	  1696#
CNAME	  2476	  3608	  3731	  3922	  6059	  6071	  6310	  6335	  8172	  8253	  8296	  8448#	  8521	 12257
CNFRET	 10548	 10573	 10647	 10655
CNTRD	 10567	 10592	 10674
CNTSET	 10566	 10591	 10673
CONFI0	  7464#	  7487	  7516
CONFI1	  7486#	  7493	  7495
CONFI2	  7466	  7469	  7520#
CONFIG	    47	   775	  6945	  7418#
CONFIX	  7423	  7450	  7455	  7460	  7526#
CONPN0	  7542#	  7562
CONPN1	  7543	  7562#
CONPNT	    47	   776	   782	  6946	  7534#
CONSW	 12248
CONVI0	  9585#	  9589
CONVIE	  9587	  9597#
CONVIR	    47	  6738	  9546	  9582#	 10779	 10825
CONVIX	  9590#
CONVSX	   100#	   436	  2580	  2624	  3702
CPORT	    49	  2631	  2652	  2656	  2918#	  6912	  7424	  7512	  7598	  7691	  8993	  9005	  9270	 11330
	 11337	 11338	 11533	 11642	 11718	 11796	 12268
CRAMFR	  3463	  3472	  3486	  3497	  3508	  3530#	  3556	  3609	  3621	  3625	  3641	  3732	  3919	  3926
	  3937	  3952	  3968	  3980	  5568	  5626
CRAMTO	  3461	  3473	  3482	  3492	  3510	  3531#	  3611	  3734	  3928	  3954	  3982	  5567	  5625
CRCCA0	  9374#	  9382
CRCCAL	  9260	  9262	  9265	  9269	  9271	  9273	  9277	  9285	  9287	  9302	  9304	  9309	  9311	  9321     SEQ 0470
	  9323	  9325	  9327	  9335	  9337	  9339	  9344	  9346	  9372#
CRCFIX	  9354	  9390#
CRCOFF	    84#	  9242	  9357
CRCSAV	    84#	  9241	  9248
CRCTAB	    84#	  9358
CSHFLG	   142
CSHMEM	   143
CSREN0	  7292#	  7306
CSREN1	  7297	  7304#
CSREN2	  7294	  7305#
CSRENB	  7304	  7315#
CSRENG	    31	  7271	  7285#
CSRENS	  7287#	  7287	  7331	  7351
CSRENX	  7292	  7307#
CSRPNT	    31	  2939	  3054	  3084	  3304	  5260	  6187	  6729	  6864	  7261#
CSRPNX	  7268	  7272#
CSRRQS	  6719
CSRSAV	  6658#	  6658	  6721	  6725
CTABLE	    48	  7429	  7430	  7431	  7515	  7542	  7547	  7570#
CTYPE	    48	  7514	  7572#
CURTIM	    99#	  1082	  6666	  6688	  6884
CVALID	    48	  7428	  7522	  7569#
CWORDL	    27	  3534#	  3554	  3603	  3619	  3764	  3766	  3768	  3770	  3772	  3774	  3803	  3805	  3807
	  3809	  3811	  3813	  3917	  3944	  3975	  3998	  4027	  4658	  4661	  4701	  4704	  4770	  4773
	  4845	  5770	  5775	  5778	  5817	  5882	  5952	  5956	  5959	  6301	  6307	  6329	  6332	  7369
	  7391	  8205	  8207	  8286	  8343	  8354	  8368	  8376	  8558	  8573	  8584
CWORDR	    27	  3535#	  3555	  3606	  3620	  3776	  3778	  3780	  3782	  3784	  3786	  3788	  3790	  3792
	  3794	  3796	  3798	  3815	  3817	  3819	  3821	  3823	  3825	  3827	  3829	  3831	  3833	  3835
	  3837	  3918	  3945	  3976	  3999	  4034	  4659	  4662	  4664	  4702	  4705	  4707	  4771	  4774
	  4777	  4846	  4848	  5771	  5776	  5779	  5818	  5883	  5953	  5957	  6302	  6308	  6330	  6333
	  8209	  8290	  8357	  8572	  8574	  8586
D1LIT	 12282#
DACRAM	  1919	  3437#
DATREC	 10557	 10582	 10650	 10664
DATRET	 10561	 10586	 10668
DATRQ0	 10553	 10578	 10660
DATRQ1	 10554	 10579	 10661
DATRQ2	 10555	 10580	 10662
DATSNT	 10560	 10585	 10667
DBCRAM	  1918	  3429#
DBPAC0	  6514#	  6519	  6521	  6548
DBPACK	  1978	  6475#
DBPACP	  6475	  6511#
DBREA0	  5753#	  5785
DBREAK	  1937	  5746#
DC1ST	  3519#	  3519	  3550	  3552	  3631	  3634
DCBR0	  5844	  5854	  5860#
DCBR1	  5881#	  5891
DCBRK	  1939	  5836#
DCCOD1	  6207#	  6226
DCCOD2	  6209	  6230#
DCCOD3	  6232#	  6237
DCCOD4	  6234	  6239#                                                                                                    SEQ 0471
DCCOD5	  6241#	  6246
DCCOD6	  6243	  6247#
DCCODE	  1950	  6195#
DCLEAR	  1898	  2985#
DCMAR0	  4732	  4742	  4748#
DCMAR1	  4769#	  4784
DCMAR2	  4776	  4782#
DCMARK	  1934	  4724#
DCODPB	  3723	  3803#
DCOLDB	  3670	  3764#
DCOM0	  3470	  3480	  3486#	  5569	  5627
DCOM1	  3519#
DCOM3A	  3666	  3696#
DCOMA0	  3650#	  3681
DCOMA1	  3653#	  3718	  3726
DCOMA2	  3669	  3674#	  3694	  3715
DCOMA3	  3662	  3675#	  3678	  3698
DCOMA4	  3704	  3722#
DCOMA5	  3699	  3724#
DCOMAA	  3663#	  3689
DCOMAG	  3623	  3631#
DCOMAL	  3524	  3625#	  3739
DCOMAX	  3655	  3685	  3730#
DCOMDB	  3523	  3619#	  3738
DCOMDE	  3522	  3546#	  3612
DCOMEX	  3521	  3937#	  3955
DCOMEZ	  3951	  3956#
DCOMGO	  3415	  3423	  3431	  3439	  3447	  3455	  3460#
DCOML0	  3968#	  3983
DCOMLI	  3526	  3966#
DCOMLX	  3979	  3984#
DCOMP	  6968	  7013
DCOMSG	  3674	  3743#
DCOMZE	  3525	  3917#	  3929
DCONF	  6943#
DCONT	  1902	  3290#
DCRESP	    65	 11437	 11750	 11754	 11756	 11828#	 11993
DCWPNT	  1971	  6345#
DDALU	  1925	  4147#
DDALU0	  4153#	  4210	  5635
DDALUM	  4181	  4185	  4186	  4313#
DDALUX	  4207	  4214#
DDCRAM	  1917	  3421#
DDCSR	  1894	  2948#
DDEBU1	  3339	  3347#
DDEBUF	  1910	  3341#
DDEBUG	    18	   128#	   128	   193	   205	   356	   368	  1617	  1628
DDLOC0	  4451#	  4503	  5643
DDLOCM	  4478	  4481	  4605#
DDLOCS	  1929	  4445#
DDLOCX	  4500	  4507#
DDNEX0	  5604	  5605	  5606	  5607	  5608	  5609	  5621#
DDNEX1	  5610	  5611	  5612	  5631#                                                                                    SEQ 0472
DDNEX2	  5613	  5614	  5615	  5639#
DDNEX3	  5616	  5617	  5647#
DDNEXT	  1891	  5596#
DDPLI	  1983	  4881#
DDPLI0	  4887#	  5649
DDPLI1	  4937#	  4951
DDPLIM	  4927	  4931	  4961#	  5501	  5502
DDPLIX	  4949	  4955#
DDPLM2	  4925	  4965#	  5499
DDPPAK	  1986	  5657#
DDRAR	  1914	  3382#
DDTAB	  5597	  5599	  5604#
DDUMP	    18	  1969	  5251#
DDUMP0	  5284#	  5290
DDUMPM	  5334	  5354#
DDUMPX	  5269	  5278	  5287	  5300	  5318	  5326	  5348#
DEALU	  1924	  4045#
DEALU0	  4055	  4063	  4069#	  5576
DEALU1	  4098#	  4131
DEALUM	  4101	  4110	  4111	  4307#
DEALUX	  4128	  4135#
DEBALU	  4093#	  5267
DEBEBU