$CONTROL USLINIT,PRIVILEGED,CODE,MAP,XREF,NOWARN,NODYNREF               00005000
<<-------------------------------------------------------->>            00010000
<<                                                        >>            00015000
<<              HP 3000 SERIES 33 CHANGES                 >>            00020000
<<              =========================                 >>            00025000
<<                                                        >>            00030000
<<  The version number was increased to .10 to            >><<0.10>>    00035000
<<  reflect the fact that this version of the             >>            00040000
<<  ADCC diagnostic was created from scratch using        >>            00045000
<<  a newer version of SPLII.                             >>            00050000
<<                                                        >>            00055000
<<  Modified 3/26/80                                      >><<0.29>>    00060000
<<   1) Pause at startup deleted to reduce op interaction >>            00065000
<<   2) Row of dots displayed to indicated pgm activity.  >>            00070000
<<   3) Eliminated occassional underflow from "RUN" cmd.  >>            00075000
<<   4) More comb. of modem status cond. added to sect 8. >>            00080000
<<   5) UART master reset test added to step 15.          >>            00085000
<<   6) Unexpected int ck (when mask dsbld) add to step 10>>            00090000
<<   7) Spurious ext interrupts will no longer hang pgm.  >>            00095000
<<   8) New STATE cmd allows user to view pgm status.     >>            00100000
<<   9) Leading spaces now allowed on command input.      >>            00105000
<<  10) Lower case letters now accepted in commands.      >>            00110000
<<  11) Test cmd now works properly with all its paramtrs.>>            00115000
<<  12) Input of chan 9,10 or 11 not mistaken for 7 or 8. >>            00120000
<<  13) Added checks for spurious int to most sections.   >>            00125000
<<  14) Byte count check added to step 49.                >>            00130000
<<  15) Section 16 cks sw pos 0 & allows any # of non     >>            00135000
<<      zero channels to be installed.                    >>            00140000
<<  PROCEDURE DODELAY WAS CHANGED TO CALL IIX'TIMER       >>            00145000
<<  IN DUS.                                               >><<0.29>>    00150000
<<                                                        >>            00155000
<<  Modified 4/2/80                                       >><<0.30>>    00160000
<<                                                        >>            00165000
<<  Corrected problem of "system failure" when ENTER      >>            00170000
<<  key is pressed after ">" prompt.                      >><<0.30>>    00175000
<<                                                        >><<1.31>>    00180000
<<  Modified 3/11/81                                      >><<1.31>>    00185000
<<                                                        >><<1.31>>    00190000
<<  Added "EXTND15" command, causing Section 15, Step 52  >><<1.31>>    00195000
<<  (Extended Baud Rate Test) to run only on devices 3-7  >><<1.31>>    00200000
<<  if the Extended board is present.  This allows mfg to >><<1.31>>    00205000
<<  save time when testing ADCC Extended boards.          >><<1.31>>    00210000
<<                                                        >><<1.31>>    00215000
<<-------------------------------------------------------->>            00220000
$PAGE"ADCDIAG1  ADCC DIAGNOSTIC     DECLARATIONS"                       00225000
                                                                        00230000
BYTE ARRAY                                                              00235000
copyright:="(C) Hewlett-Packard 1980";                                  00240000
BYTE ARRAY ADCC(18):="ADCCDIAG 01.31    ";                      <<1.31>>00245000
                                                                        00250000
INTEGER                                                                 00255000
A,                                                                      00260000
ADR'B,                                                                  00265000
ADR'LIM,                                                                00270000
B,                                                                      00275000
BAUD,                                                                   00280000
C,                                                                      00285000
CHNL,                                                                   00290000
CONSOLE:=0,                                                             00295000
D,                                                                      00300000
DEV,                                                                    00305000
DOT'CNT:=0,                                                             00310000
DVN,                                                                    00315000
E,                                                                      00320000
F,                                                                      00325000
G,                                                                      00330000
K,                                                                      00335000
M,                                                                      00340000
MAX'DEV:=-1,                                                            00345000
NUM'CHARS,                                                              00350000
PNTR,                                                                   00355000
T'CHNL,                                                                 00360000
TEM'DEV,                                                                00365000
ZENDINT;                                                                00370000
                                                                        00375000
LOGICAL                                                                 00380000
ADD'SUB,                                                                00385000
ADDR,                                                                   00390000
CF'DONE,                                                                00395000
CHNLBIT,                                                                00400000
CONCHNLBIT,                                                             00405000
DESIRED'DEV,                                                            00410000
DISC:=0,                                                                00415000
DNV,                                                                    00420000
ENDPASSCOUNTER:=1,                                                      00425000
EPAUSEOK,                                                               00430000
EPRINTOK,                                                               00435000
ERR,                                                                    00440000
EXTND,                                                                  00445000
EXTND15:=FALSE,                                                 <<1.31>>00450000
IRQ',                                                                   00455000
LA,                                                                     00460000
LB,                                                                     00465000
LC,                                                                     00470000
LOOP,                                                                   00475000
MAIN'BOARD,                                                             00480000
MAS,                                                                    00485000
NMBROFCHNLS,                                                            00490000
NO'ERROR,                                                               00495000
PAUSEOK,                                                                00500000
PRINT'ERRORS:=FALSE,                                                    00505000
PRINTER:=0,                                                             00510000
PRINTOK,                                                                00515000
REF,                                                                    00520000
STP,                                                                    00525000
T'CHNLBIT,                                                              00530000
TESTNR,                                                                 00535000
TOS',                                                                   00540000
TOS'1,                                                                  00545000
XX,                                                                     00550000
XY,                                                                     00555000
ZENDLOG;                                                                00560000
$PAGE"ADCDIAG1  ADCC DIAGNOSTIC     DEFINES"                            00565000
DEFINE                                                                  00570000
ABS'ADDR(ARAY,INDX)=LOGICAL                                             00575000
ASSEMBLE(                                                               00580000
 PUSH INDX;                                                             00585000
 STAX;                                                                  00590000
 LRA ARAY,I,X;                                                          00595000
 PSHR %100;            <<REPLACED AMIGO CLAA INSTRUCTION>>      <<0.29>>00600000
 DELB,LADD)#,          <<ADDED LADD INSTRUCTION>>               <<0.29>>00605000
                                                                        00610000
ASMB=ASSEMBLE#,                                                         00615000
                                                                        00620000
CHECK'DNV=DNV:=0; ASMB(LOAD CHNL; RIOC; BGE *+3;                        00625000
                       LDNI 1; STOR DNV; DEL)#,                         00630000
                                                                        00635000
CHNL'INIT=                                                              00640000
ASMB(LOAD CHNL; INIT; BG P+2);                                          00645000
WRITEFAIL#,                                                             00650000
                                                                        00655000
CLEAR'UNX'DEV=ASMB(LDXN 2; ZERO; PSTA)#,                                00660000
                                                                        00665000
CLEAR'UNX'IRQ=ASMB(LDXN 2; ZERO; PSTA; LDXN 3; ZERO; PSTA)#,            00670000
                                                                        00675000
CLEARIRQ=ASMB(ZERO; LDXN 1; PSTA)#,                                     00680000
                                                                        00685000
CLEARMASK=ASMB(LOAD CONCHNLBIT; SMSK)#,                                 00690000
                                                                        00695000
DELAY1SECOND=DODELAY(STARTIME,1000)#,                                   00700000
                                                                        00705000
DELTA'P=LOGICAL ASSEMBLE(LOAD Q-2)#,                                    00710000
                                                                        00715000
DISABLE'RTN'INTRPS=                                                     00720000
ASSEMBLE(                                                               00725000
 PSHR %100;   <<LOAD DB BANK AND DB>>                          <<0.29>> 00730000
 PSHR 2;      <<LOAD Q (DELTA Q OF LAST STACK MARKER)>>        <<0.29>> 00735000
 LADD,        <<TOS EQUALS DB REL ADDR OF LAST MARKER>>        <<0.29>> 00740000
 STAX;        <<ABSOLUTE ADDR OF PREV STACK MARKER>>           <<0.29>> 00745000
 DECX,        <<SET TO STATUS WORD OF STACK MARKER>>           <<0.29>> 00750000
 DEL;         <<DELETE BANK>>                                  <<0.29>> 00755000
 PLDA;        <<LOAD STATUS WORD ON TOS>>                      <<0.29>> 00760000
 LDI 0;                                                        <<0.29>> 00765000
 DPF (1:1);   <<SET INTERRUPT BIT (1) TO ZERO>>                <<0.29>> 00770000
 PSTA)#,      <<RESTORE STATUS WORD IN PREVIOUS STACK MARKER>> <<0.29>> 00775000
<< THESE                                                                00780000
         LINES                                                          00785000
               ARE BEING                                                00790000
                         DELETED                                        00795000
                                 FOR                                    00800000
                                     SERIES 33>>               <<0.29>> 00805000
                                                                        00810000
DO'PSIOP=ASMB(LOAD TOS'1; LOAD TOS'; WIOC)#,                            00815000
                                                                        00820000
DO'SIOP=ASMB(LOAD TOS'1; LOAD TOS'; SIOP)#,                             00825000
DRT'PLABEL'OF(procedur)=LOGICAL                                         00830000
ASSEMBLE(                                                               00835000
 LLBL procedur)#,                                               <<0.29>>00840000
<<THESE LINES                                                           00845000
          ARE BEING DELETED                                             00850000
                 FOR SERIES 33. THEY WERE                               00855000
                      USED FOR AMIGO 2 WORD                             00860000
                                P LABELS. >>                    <<0.29>>00865000
                                                                        00870000
GET'UNX'IRQ=ASMB(LDXN 2; PLDA; STOR TOS'; LDXN 3;                       00875000
                 PLDA; STOR TOS'1)#,                                    00880000
                                                                        00885000
GETIRQ=ASMB(LDXN 1; PLDA; STOR IRQ')#,                                  00890000
                                                                        00895000
INT'EXIT=ASMB(IXIT)#,                                                   00900000
                                                                        00905000
INTPSYS'OFF=ASMB(IOFF)#,                                                00910000
                                                                        00915000
INTPSYS'ON=ASMB(ION)#,                                                  00920000
                                                                        00925000
IPOLL=                                                                  00930000
ASMB(LDI 8; CSL 12; RIOC; BNE P+3;                                      00935000
     STOR TOS'; BR P+2);                                                00940000
READFAIL#,                                                              00945000
                                                                        00950000
MEM'GETS'V(MEMLOC,VARABLE)=                                             00955000
ASSEMBLE(                                                               00960000
 PUSH VARABLE;                                                          00965000
 PUSH MEMLOC;                                                           00970000
 STAX;                                                                  00975000
 PSTA)#,                                                                00980000
                                                                        00985000
OBII=                                                                   00990000
ASMB(LOAD CHNL; LDI 2; CSL 12; OR; RIOC;                                00995000
     BNE P+3; STOR TOS'; BR P+2);                                       01000000
READFAIL#,                                                              01005000
                                                                        01010000
OBSI=                                                                   01015000
ASMB(LOAD CHNL; LDI 4; CSL 12; OR; RIOC;                                01020000
     BNE P+3; STOR TOS'; BR P+2);                                       01025000
READFAIL#,                                                              01030000
                                                                        01035000
RAW'CLOCK=LOGICAL ASSEMBLE (RCCR)#,  <<CHANGED RCLK TO RCCR>>   <<0.29>>01040000
                                                                        01045000
READKBD=READ#,                                                          01050000
                                                                        01055000
READREG(K)=                                                             01060000
ASSEMBLE(                                                               01065000
 LOAD CHNL;                                                             01070000
 PUSH K;                                                                01075000
 CSL 8;                                                                 01080000
 OR;                                                                    01085000
 RIOC;                                                                  01090000
 BNE P+3;                                                               01095000
 STOR TOS';                                                             01100000
 BR P+2);                                                               01105000
READFAIL#,                                                              01110000
                                                                        01115000
RESTART=LOOP'BACK(0)#,                                                  01120000
                                                                        01125000
ROLLCALL=                                                               01130000
ASSEMBLE(                                                               01135000
 LDI !A;                                                                01140000
 CSR 4; <<MAKES !A000>>                                                 01145000
 RIOC;                                                                  01150000
 STOR TOS')#,                                                           01155000
                                                                        01160000
SAVESTART=STORE'MARK(0)#,                                               01165000
                                                                        01170000
SECTION(sectno)=LOGICAL                                                 01175000
ASSEMBLE(                                                               01180000
 LDD SECTIONS'TO'RUN;                                           <<0.29>>01185000
 PUSH sectno;                                                           01190000
 STAX;                                                                  01195000
 DCSL 1,X; DELB,NOP)#,   <<REPLACED AMIGO INSTR (LBIT 0,X)>>    <<0.29>>01200000
                                                                        01205000
SETMASK=                                                                01210000
ASSEMBLE(                                                               01215000
 LOAD CHNLBIT;                                                          01220000
 LOAD CONCHNLBIT;                                                       01225000
 OR;                                                                    01230000
 SMSK)#,                                                                01235000
                                                                        01240000
SPOLL1=                                                                 01245000
ASSEMBLE(                                                               01250000
 LDI 12;                                                                01255000
 CSL 12;                                                                01260000
 RIOC;                                                                  01265000
 BNE P+3;                                                               01270000
 STOR TOS';                                                             01275000
 BR P+2);                                                               01280000
READFAIL#,                                                              01285000
                                                                        01290000
STARTIME=RAW'CLOCK#,                                                    01295000
                                                                        01300000
STUFF(NUM)=                                                             01305000
ASSEMBLE(                                                               01310000
 LDXN 1;                                                                01315000
 PLDA;                                                                  01320000
 LDI 1;                                                                 01325000
 DPF(NUM:1);                                                            01330000
 PSTA)#,                                                                01335000
                                                                        01340000
TRAP(NUM)=                                                              01345000
ASSEMBLE(                                                               01350000
 LDXN 2;                                                                01355000
 PLDA;                                                                  01360000
 LDI 1;                                                                 01365000
 DPF(NUM:1);                                                            01370000
 PSTA)#,                                                                01375000
                                                                        01380000
TROF'=                                                                  01385000
ASSEMBLE(                                                               01390000
  PSHR %10; LDI 0; DPF(2:1); SETR %10)#, <<SET TRAPS BIT TO 0>> <<0.29>>01395000
                                                                        01400000
V'GETS'MEM(VARABLE,MEMLOC)=                                             01405000
ASSEMBLE(                                                               01410000
 PUSH MEMLOC;                                                           01415000
 STAX;                                                                  01420000
 PLDA;                                                                  01425000
 POP VARABLE)#,                                                         01430000
                                                                        01435000
WRITEREG(K)=                                                            01440000
ASMB(LOAD CHNL; PUSH K; CSL 8; OR; LOAD TOS';                           01445000
     WIOC; BE P+2);                                                     01450000
WRITEFAIL#,                                                             01455000
                                                                        01460000
ZENDEF=END#;                                                            01465000
$PAGE"ADCDIAG1  ADCC DIAGNOSTIC   DOUBLES,  EQUATES"                    01470000
DOUBLE                                                                  01475000
SECTIONS'TO'RUN:=[16/!7FFC,16/0],                                       01480000
DEFAULT'SECTS:=[16/!7FFC,16/0],                                         01485000
ZENDOUBLE;                                                              01490000
                                                                        01495000
EQUATE                                                                  01500000
CTCBP=!0004,     <<@ Mem Loc>>                                          01505000
LAST'SECT=17,                                                           01510000
MASK=!007,       <<@ Mem Loc>>                                          01515000
QI=!0005,        <<@ Mem Loc>>                                          01520000
SCST'BANK=!0000, <<@ Mem Loc>>                                          01525000
SCSTP=!0001,     <<@ Mem Loc>>                                          01530000
UCST'BANK=!0002, <<@ Mem Loc>>                                          01535000
UCSTP=!0003,     <<@ Mem Loc>>                                          01540000
ZI=!0006;        <<@ Mem Loc>>                                          01545000
$PAGE"ADCDIAG1  ADCC DIAGNOSTIC   BYTE ARRAYS"                          01550000
BYTE ARRAY CLEARBUF(80):=(80(" "));                                     01555000
                                                                        01560000
BYTE ARRAY                                                              01565000
MSG'OUT(80):=(80(" "));                                                 01570000
                                                                        01575000
BYTE ARRAY                                                              01580000
PERIOD(1):=".";                                                         01585000
                                                                        01590000
BYTE ARRAY TEMPBUF(80);                                                 01595000
                                                                        01600000
BYTE ARRAY LIST'COM:=(                                                  01605000
 "Name    Parameter(s)    Meaning",!D,                                  01610000
 "----    ------------    -------",!D,                                  01615000
 "DEV     device         Select only device specified",!D,              01620000
 "EEPR                   Enable error messages",!D,                     01625000
 "EEPS                   Enable error pauses",!D,                       01630000
 "ENPR                   Enable non-error messages",!D,                 01635000
 "EXIT                   Return to DUS",!D,                             01640000
 "GO                     Resume diagnostic execution",!D,               01645000
 "LOOP                   Loop on selected test sections",!D,            01650000
 "LOOPOFF                Stop loop",!D,                                 01655000
 "PRINTER                Display errors on printer",!D,                 01660000
 "RST                    Enable Pauses and Messages,",!D,               01665000
 "                       also Suppress Printer",!D,                     01670000
 "RUN                    Restart diagnostic execution",!D,              01675000
 "SEPR                   Suppress error messages",!D,                   01680000
 "SEPS                   Suppress error pauses",!D,                     01685000
 "SNPR                   Suppress non-error messages",!D,               01690000
 "STATE                  Lists status of program",!D,                   01695000
 <<**"SO                     Stop DUS Stream Facility",!D,**>>          01700000
 "TEST    section        Alter section selection",!D,                   01705000
 !FF);                                                                  01710000
$PAGE"ADCDIAG1  ADCC DIAGNOSTIC     LOGICAL ARRAYS"                     01715000
LOGICAL ARRAY                                                           01720000
DELAYBUF(16):=(0,0,300,200,110,75,25,7,2,3,8,12,7,50,100,140);          01725000
                                                                        01730000
LOGICAL ARRAY BAUDARRAY(4):=(0,!55,!AA,!CC);                            01735000
                                                                        01740000
LOGICAL ARRAY                                                           01745000
BAUDS(16):=(0,0,50,75,134,200,600,2400,9600,4800,                       01750000
            1800,1200,2400,300,150,110);                                01755000
                                                                        01760000
LOGICAL ARRAY DCSRQBUF1(4):=(!4030,!4032,!4034,!4036);                  01765000
                                                                        01770000
LOGICAL ARRAY DCSRQBUF2(8):=                                            01775000
        (!4071,!4073,!4075,!4077,!4079,!407B,!407D,!407F);              01780000
                                                                        01785000
LOGICAL ARRAY ENCSRQBUF1(9):=                                           01790000
        (!4020,!4021,!4022,!4023,!4024,!4025,!4026,!4027,!403F);        01795000
                                                                        01800000
LOGICAL ARRAY ENCSRQBUF2(9):=                                           01805000
        (!4060,!4061,!4062,!4063,!4064,!4065,!4066,!4067,!4070);        01810000
                                                                        01815000
LOGICAL ARRAY UARTCNTRL(24):=                                           01820000
 (!80,  <<1 start bit, 5 data bits, odd parity,  1 stop bit>>           01825000
  !81,  <<1 start bit, 5 data bits, no parity,   1 stop bit>>           01830000
  !82,  <<1 start bit, 5 data bits, even parity, 1 stop bit>>           01835000
  !84,  <<1 start bit, 5 data bits, odd parity,  1.5 stop bits>>        01840000
  !85,  <<1 start bit, 5 data bits, no parity,   1.5 stop bits>>        01845000
  !86,  <<1 start bit, 5 data bits, even parity, 2 stop bits>>          01850000
  !88,  <<1 start bit, 6 data bits, odd parity,  1 stop bit>>           01855000
  !89,  <<1 start bit, 6 data bits, no parity,   1 stop bit>>           01860000
  !8A,  <<1 start bit, 6 data bits, even parity, 1 stop bit>>           01865000
  !8C,  <<1 start bit, 6 data bits, odd parity,  2 stop bits>>          01870000
  !8D,  <<1 start bit, 6 data bits, no parity,   2 stop bits>>          01875000
  !8E,  <<1 start bit, 6 data bits, even parity, 2 stop bits>>          01880000
  !90,  <<1 start bit, 7 data bits, odd parity,  1 stop bit>>           01885000
  !91,  <<1 start bit, 7 data bits, no parity,   1 stop bit>>           01890000
  !92,  <<1 start bit, 7 data bits, even parity, 1 stop bit>>           01895000
  !94,  <<1 start bit, 7 data bits, odd parity,  2 stop bits>>          01900000
  !95,  <<1 start bit, 7 data bits, no parity,   2 stop bits>>          01905000
  !96,  <<1 start bit, 7 data bits, even parity, 2 stop bits>>          01910000
  !98,  <<1 start bit, 8 data bits, odd parity,  1 stop bit>>           01915000
  !99,  <<1 start bit, 8 data bits, no parity,   1 stop bit>>           01920000
  !9A,  <<1 start bit, 8 data bits, even parity, 1 stop bit>>           01925000
  !9C,  <<1 start bit, 8 data bits, odd parity,  2 stop bits>>          01930000
  !9D,  <<1 start bit, 8 data bits, no parity,   2 stop bits>>          01935000
  !9E); <<1 start bit, 8 data bits, even parity, 2 stop bits>>          01940000
                                                                        01945000
LOGICAL ARRAY MDCSRQBUF1(4):=(16,18,20,22);                             01950000
                                                                        01955000
LOGICAL ARRAY MDCSRQBUF2(8):=(17,19,21,23,25,27,29,31);                 01960000
                                                                        01965000
LOGICAL ARRAY MENCSRQBUF1(9):=(0,1,2,3,4,5,6,7,31);                     01970000
                                                                        01975000
LOGICAL ARRAY MENCSRQBUF2(9):=(0,1,2,3,4,5,6,7,16);                     01980000
                                                                        01985000
LOGICAL ARRAY                                                           01990000
SAVE'MARK(10):=(10(0));                                                 01995000
                                                                        02000000
LOGICAL ARRAY TSTBUF(35);                                               02005000
                                                                        02010000
LOGICAL ARRAY TSTBUF'(35):=                                             02015000
 (!0000,!FFFF,!FFFF,!FFFF,!FFFF,!FFFF,!FFFF,!FFFF,!FFFF,!FFFF,          02020000
  !FFFF,!FFFF,!FFFF,!FFFF,!0000,!0000,!0000,!0000,!0000,!0000,          02025000
  !0000,!0000,!0000,!0000,!0000,!0000,!0000,!0000,!0000,!0000,          02030000
  !0000,!0000,!0000,!0000,!0000);                                       02035000
                                                                        02040000
LOGICAL ARRAY RG2'CHNL'PGM(5):=                                         02045000
     (!0B02,   <<RREG 2>>                                               02050000
      !0000,   <<Reserved word for read>>                               02055000
      !0182,   <<INT w/HALT>>                                           02060000
      !00FF,   <<Interrupt code>>                                       02065000
      !FFFF);  <<End-of-code>>                                          02070000
                                                                        02075000
LOGICAL ARRAY                                                           02080000
ID'CHNL'PGM(5):=(!0600,  <<Identify>>                                   02085000
                 !0000,  <<Reserved for I.D. return>>                   02090000
                 !0182,  <<Interrupt w/halt>>                           02095000
                 !00FF,  <<Interrupt code for cpva>>                    02100000
                 !FFFF); <<End-of-code>>                                02105000
                                                                        02110000
LOGICAL ARRAY ADDARRAY(8):=                                             02115000
      (!F000,!F080,!F100,!F180,!F200,!F280,!F300,!F380);                02120000
                                                                        02125000
LOGICAL ARRAY CPVAARRAY(8):=                                            02130000
      (!D000,!D008,!D010,!D018,!D020,!D028,!D030,!D038);                02135000
                                                                        02140000
LOGICAL ARRAY TEMPARRAY(8);                                             02145000
                                                                        02150000
LOGICAL ARRAY CHG'ADDR'ARRAY(16):=                                      02155000
   <<DEVICE 0>>  (!E085,!E106,                                          02160000
   <<DEVICE 1>>   !E107,!E188,                                          02165000
   <<DEVICE 2>>   !E189,!E20A,                                          02170000
   <<DEVICE 3>>   !E20B,!E28C,                                          02175000
   <<DEVICE 4>>   !E28D,!E30E,                                          02180000
   <<DEVICE 5>>   !E30F,!E390,                                          02185000
   <<DEVICE 6>>   !E391,!E412,                                          02190000
   <<DEVICE 7>>   !E413,!E494);                                         02195000
                                                                        02200000
LOGICAL ARRAY MEMAP(133):=                                              02205000
 (!9E00,!0401,!0600,!0102,!0304,!0506,!0708,!090A,!0B0C,                02210000
  !0D0E,!0F10,!1112,!1314,!1516,!1718,!191A,!1B1C,!1D1E,                02215000
  !1F20,!2122,!2324,!2526,!2728,!292A,!2B2C,!2D2E,!2F30,                02220000
  !3132,!3334,!3536,!3738,!393A,!3B3C,!3D3E,!3F40,!4142,                02225000
  !4344,!4546,!4748,!494A,!4B4C,!4D4E,!4F50,!5152,!5354,                02230000
  !5556,!5758,!595A,!5B5C,!5D5E,!5F60,!6162,!6364,!6566,                02235000
  !6768,!696A,!6B6C,!6D6E,!6F70,!7172,!7374,!7576,!7778,                02240000
  !797A,!7B7C,!7D7E,!7F80,!8182,!8384,!8586,!8788,!898A,                02245000
  !8B8C,!8D8E,!8F90,!9192,!9394,!9596,!9798,!999A,!9B9C,                02250000
  !9D9E,!9FA0,!A1A2,!A3A4,!A5A6,!A7A8,!A9AA,!ABAC,!ADAE,                02255000
  !AFB0,!B1B2,!B3B4,!B5B6,!B7B8,!B9BA,!BBBC,!BDBE,!BFC0,                02260000
  !C1C2,!C3C4,!C5C6,!C7C8,!C9CA,!CBCC,!CDCE,!CFD0,!D1D2,                02265000
  !D3D4,!D5D6,!D7D8,!D9DA,!DBDC,!DDDE,!DFE0,!E1E2,!E3E4,                02270000
  !E5E6,!E7E8,!E9EA,!EBEC,!EDEE,!EFF0,!F1F2,!F3F4,!F5F6,                02275000
  !F7F8,!F9FA,!FBFC,!FDFE,!FFFF,!1707,!2000);                           02280000
                                                                        02285000
LOGICAL ARRAY ADCC'CHNL'PGM(115):=                                      02290000
 <<000>> (!0401,      <<Write modifier 1 - UART control>>               02295000
          !0001,                                                        02300000
          !0001,                                                        02305000
          !A000,                                                        02310000
          !E000,                                                        02315000
                                                                        02320000
          !0402,      <<Write modifier 2 - I/F control>>                02325000
          !0001,                                                        02330000
          !0001,                                                        02335000
          !E000,                                                        02340000
          !E000,                                                        02345000
                                                                        02350000
 <<010>>  !0403,      <<Write modifier 3 - svc. conditions>>            02355000
          !0001,                                                        02360000
          !0001,          <<request for TB not full>>                   02365000
          !A000,                                                        02370000
          !E001,                                                        02375000
                                                                        02380000
          !0403,      <<Write modifier 3>>                              02385000
          !0001,                                                        02390000
          !0001,          <<no request for TBE>>                        02395000
          !C000,                                                        02400000
          !E001,                                                        02405000
                                                                        02410000
 <<020>>  !0403,      <<Write modifier 3>>                              02415000
          !0001,                                                        02420000
          !0001,          <<request when byte received>>                02425000
          !A000,                                                        02430000
          !E002,                                                        02435000
                                                                        02440000
          !0404,      <<Write modifier 4>>                              02445000
          !0100,                                                        02450000
          !0001,          <<Clear special character RAM>>               02455000
          !E000,                                                        02460000
          !E002,                                                        02465000
                                                                        02470000
 <<030>>  !0000,      <<Jump *+2>>                                      02475000
          !0004,                                                        02480000
                                                                        02485000
          !0200,      <<Wait>>                                          02490000
          !0000,                                                        02495000
                                                                        02500000
          !0000,      <<Jump *-11>>                                     02505000
          !FFF5,                                                        02510000
                                                                        02515000
          !0405,      <<Write modifier 5>>                              02520000
          !0001,                                                        02525000
          !0001,         <<Set the special character RAM>>              02530000
          !E000,                                                        02535000
 <<040>>  !E082,                                                        02540000
                                                                        02545000
          !0406,      <<Write modifier 6>>                              02550000
          !0002,                                                        02555000
          !0001,         <<Set the baud rates>>                         02560000
          !A000,                                                        02565000
          !E083,         <<to 2400>>                                    02570000
                                                                        02575000
          !0000,      <<Jump *+ 2>>                                     02580000
          !0002,                                                        02585000
                                                                        02590000
          !0000,      <<Jump *-9>>                                      02595000
          !FFF7,                                                        02600000
                                                                        02605000
 <<050>>  !0407,      <<Write modifier 7>>                              02610000
          !0001,                                                        02615000
          !0001,         <<Clear modem line status>>                    02620000
          !A000,                                                        02625000
          !E084,                                                        02630000
                                                                        02635000
          !0400,      <<Write modifier 0>>                              02640000
          !0100,                                                        02645000
          !0001,          <<Write the test bytes>>                      02650000
          !E000,                                                        02655000
          !E002,                                                        02660000
                                                                        02665000
 <<060>>  !0000,      <<Jump *+ 9>>                                     02670000
          !000A,                                                        02675000
                                                                        02680000
          !0200,      <<Wait>>                                          02685000
          !0000,                                                        02690000
                                                                        02695000
          !0503,      <<DSJ max = 3>>                                   02700000
          !0000,      <<return word>>                                   02705000
          !0009,      <<if read + 7>>                                   02710000
          !FFF1,      <<if write -15>>                                  02715000
          !001A,      <<if status + 26>>                                02720000
          !0000,      <<If bad DSJ return>>                             02725000
                                                                        02730000
 <<070>>  !0182,      <<Interrupt for bad DSJ value>>                   02735000
          !0030,      <<!30 for CPVA word>>                             02740000
                                                                        02745000
          !0403,      <<Write modifier 3>>                              02750000
          !0001,                                                        02755000
          !0001,           <<disable XMIT REQ's>>                       02760000
          !E000,                                                        02765000
          !E084,                                                        02770000
                                                                        02775000
          !0000,      <<Jump to the wait>>                              02780000
          !0007,                                                        02785000
                                                                        02790000
          !0300,      <<Read the byte in the UART>>                     02795000
 <<080>>  !0100,                                                        02800000
          !0001,                                                        02805000
          !C000,                                                        02810000
          !E085,                                                        02815000
                                                                        02820000
          !0182,      <<Interrupt if special character>>                02825000
          !0050,      <<Halt code for correct termination>>             02830000
                                                                        02835000
          !0200,      <<Wait>>                                          02840000
          !0000,                                                        02845000
                                                                        02850000
          !0503,      <<DSJ  max = 3>>                                  02855000
          !0000,      <<reserved return word>>                          02860000
 <<090>>  !FFF1,      <<if read   - 14>>                                02865000
          !FFD9,      <<if write  - 39>>                                02870000
          !0002,      <<if status + 2>>                                 02875000
          !0000,      <<If bad DSJ return>>                             02880000
                                                                        02885000
          !0182,      <<Interrupt if unexpected DSJ return>>            02890000
          !0030,      <<Halt code for the CPVA area>>                   02895000
                                                                        02900000
          !0302,      <<Read the modem status>>                         02905000
          !0001,                                                        02910000
          !0001,                                                        02915000
          !8000,                                                        02920000
 <<100>>  !E086,                                                        02925000
                                                                        02930000
          !0301,      <<Read the UART status>>                          02935000
          !0002,                                                        02940000
          !0001,                                                        02945000
          !C000,                                                        02950000
          !E086,                                                        02955000
                                                                        02960000
          !0182,      <<Interrupt if>>                                  02965000
          !0010,      <<break caused termination>>                      02970000
                                                                        02975000
          !0182,      <<Interrupt if the termination>>                  02980000
          !0020,      <<was caused by an overrun or PE>>                02985000
                                                                        02990000
 <<110>>  !FFFF);     <<End-of-code>>                                   02995000
                                                                        03000000
LOGICAL ARRAY                                                           03005000
DSJ'CH'PROG(170):=(                                                     03010000
        <<@ array+0, channel program, device 0>>                        03015000
 !0F03, <<Write rel immediate +3>>                                      03020000
 !0000, <<Clear DSJ return byte>>                                       03025000
 !0200, <<WAIT>>                                                        03030000
 !0000,                                                                 03035000
 !0503, <<DSJ, 3 max>>                                                  03040000
 !0000, <<DSJ return byte @ chan prog +5>>                              03045000
 !0002, <<If READ, 0, then +2>>                                         03050000
 !0004, <<If WRITE, 1, then +4>>                                        03055000
 !0006, <<If STATUS, 2, then +6>>                                       03060000
 !0008, <<If no request, 3, then +8>>                                   03065000
 !0183, <<INTERRUPT/HALT>>                                              03070000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03075000
 !0183, <<INTERRUPT/HALT>>                                              03080000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03085000
 !0183, <<INTERRUPT/HALT>>                                              03090000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03095000
 !0183, <<INTERRUPT/HALT>>                                              03100000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03105000
 !0183, <<INTERRUPT/HALT>>                                              03110000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03115000
 !FFFF, <<End of channel program, device 0>>                            03120000
        <<@ array+21, channel program, device 1>>                       03125000
 !0F03, <<Write rel immediate +3>>                                      03130000
 !0000, <<Clear DSJ return byte>>                                       03135000
 !0200, <<WAIT>>                                                        03140000
 !0000,                                                                 03145000
 !0503, <<DSJ, 3 max>>                                                  03150000
 !0000, <<DSJ return byte @ chan prog +5>>                              03155000
 !0002, <<If READ, 0, then +2>>                                         03160000
 !0004, <<If WRITE, 1, then +4>>                                        03165000
 !0006, <<If STATUS, 2, then +6>>                                       03170000
 !0008, <<If no request, 3, then +8>>                                   03175000
 !0183, <<INTERRUPT/HALT>>                                              03180000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03185000
 !0183, <<INTERRUPT/HALT>>                                              03190000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03195000
 !0183, <<INTERRUPT/HALT>>                                              03200000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03205000
 !0183, <<INTERRUPT/HALT>>                                              03210000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03215000
 !0183, <<INTERRUPT/HALT>>                                              03220000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03225000
 !FFFF, <<End of channel program, device 1>>                            03230000
        <<@ array+42,, channel program, device 2>>                      03235000
 !0F03, <<Write rel immediate +3>>                                      03240000
 !0000, <<Clear DSJ return byte>>                                       03245000
 !0200, <<WAIT>>                                                        03250000
 !0000,                                                                 03255000
 !0503, <<DSJ, 3 max>>                                                  03260000
 !0000, <<DSJ return byte @ chan prog +5>>                              03265000
 !0002, <<If READ, 0, then +2>>                                         03270000
 !0004, <<If WRITE, 1, then +4>>                                        03275000
 !0006, <<If STATUS, 2, then +6>>                                       03280000
 !0008, <<If no request, 3, then +8>>                                   03285000
 !0183, <<INTERRUPT/HALT>>                                              03290000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03295000
 !0183, <<INTERRUPT/HALT>>                                              03300000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03305000
 !0183, <<INTERRUPT/HALT>>                                              03310000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03315000
 !0183, <<INTERRUPT/HALT>>                                              03320000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03325000
 !0183, <<INTERRUPT/HALT>>                                              03330000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03335000
 !FFFF, <<End of channel program, device 2>>                            03340000
        <<@ array+63, channel program, device 3>>                       03345000
 !0F03, <<Write rel immediate +3>>                                      03350000
 !0000, <<Clear DSJ return byte>>                                       03355000
 !0200, <<WAIT>>                                                        03360000
 !0000,                                                                 03365000
 !0503, <<DSJ, 3 max>>                                                  03370000
 !0000, <<DSJ return byte @ chan prog +5>>                              03375000
 !0002, <<If READ, 0, then +2>>                                         03380000
 !0004, <<If WRITE, 1, then +4>>                                        03385000
 !0006, <<If STATUS, 2, then +6>>                                       03390000
 !0008, <<If no request, 3, then +8>>                                   03395000
 !0183, <<INTERRUPT/HALT>>                                              03400000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03405000
 !0183, <<INTERRUPT/HALT>>                                              03410000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03415000
 !0183, <<INTERRUPT/HALT>>                                              03420000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03425000
 !0183, <<INTERRUPT/HALT>>                                              03430000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03435000
 !0183, <<INTERRUPT/HALT>>                                              03440000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03445000
 !FFFF, <<End of channel program, device 3>>                            03450000
        <<@ array+84, channel program, device 4>>                       03455000
 !0F03, <<Write rel immediate +3>>                                      03460000
 !0000, <<Clear DSJ return byte>>                                       03465000
 !0200, <<WAIT>>                                                        03470000
 !0000,                                                                 03475000
 !0503, <<DSJ, 3 max>>                                                  03480000
 !0000, <<DSJ return byte @ chan prog +5>>                              03485000
 !0002, <<If READ, 0, then +2>>                                         03490000
 !0004, <<If WRITE, 1, then +4>>                                        03495000
 !0006, <<If STATUS, 2, then +6>>                                       03500000
 !0008, <<If no request, 3, then +8>>                                   03505000
 !0183, <<INTERRUPT/HALT>>                                              03510000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03515000
 !0183, <<INTERRUPT/HALT>>                                              03520000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03525000
 !0183, <<INTERRUPT/HALT>>                                              03530000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03535000
 !0183, <<INTERRUPT/HALT>>                                              03540000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03545000
 !0183, <<INTERRUPT/HALT>>                                              03550000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03555000
 !FFFF, <<End of channel program, device 4>>                            03560000
        <<@ array+105, channel program, device 5>>                      03565000
 !0F03, <<Write rel immediate +3>>                                      03570000
 !0000, <<Clear DSJ return byte>>                                       03575000
 !0200, <<WAIT>>                                                        03580000
 !0000,                                                                 03585000
 !0503, <<DSJ, 3 max>>                                                  03590000
 !0000, <<DSJ return byte @ chan prog +5>>                              03595000
 !0002, <<If READ, 0, then +2>>                                         03600000
 !0004, <<If WRITE, 1, then +4>>                                        03605000
 !0006, <<If STATUS, 2, then +6>>                                       03610000
 !0008, <<If no request, 3, then +8>>                                   03615000
 !0183, <<INTERRUPT/HALT>>                                              03620000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03625000
 !0183, <<INTERRUPT/HALT>>                                              03630000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03635000
 !0183, <<INTERRUPT/HALT>>                                              03640000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03645000
 !0183, <<INTERRUPT/HALT>>                                              03650000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03655000
 !0183, <<INTERRUPT/HALT>>                                              03660000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03665000
 !FFFF, <<End of channel program, device 5>>                            03670000
        <<@ array+126, channel program, device 6>>                      03675000
 !0F03, <<Write rel immediate +3>>                                      03680000
 !0000, <<Clear DSJ return byte>>                                       03685000
 !0200, <<WAIT>>                                                        03690000
 !0000,                                                                 03695000
 !0503, <<DSJ, 3 max>>                                                  03700000
 !0000, <<DSJ return byte @ chan prog +5>>                              03705000
 !0002, <<If READ, 0, then +2>>                                         03710000
 !0004, <<If WRITE, 1, then +4>>                                        03715000
 !0006, <<If STATUS, 2, then +6>>                                       03720000
 !0008, <<If no request, 3, then +8>>                                   03725000
 !0183, <<INTERRUPT/HALT>>                                              03730000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03735000
 !0183, <<INTERRUPT/HALT>>                                              03740000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03745000
 !0183, <<INTERRUPT/HALT>>                                              03750000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03755000
 !0183, <<INTERRUPT/HALT>>                                              03760000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03765000
 !0183, <<INTERRUPT/HALT>>                                              03770000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03775000
 !FFFF, <<End of channel program, device 6>>                            03780000
        <<@ array+147, channel program, device 7>>                      03785000
 !0F03, <<Write rel immediate +3>>                                      03790000
 !0000, <<Clear DSJ return byte>>                                       03795000
 !0200, <<WAIT>>                                                        03800000
 !0000,                                                                 03805000
 !0503, <<DSJ, 3 max>>                                                  03810000
 !0000, <<DSJ return byte @ chan prog +5>>                              03815000
 !0002, <<If READ, 0, then +2>>                                         03820000
 !0004, <<If WRITE, 1, then +4>>                                        03825000
 !0006, <<If STATUS, 2, then +6>>                                       03830000
 !0008, <<If no request, 3, then +8>>                                   03835000
 !0183, <<INTERRUPT/HALT>>                                              03840000
 !0004, <<Interrupt code, DSJ error, to CPVA 4th word>>                 03845000
 !0183, <<INTERRUPT/HALT>>                                              03850000
 !0000, <<Interrupt code, READ, to CPVA 4th word>>                      03855000
 !0183, <<INTERRUPT/HALT>>                                              03860000
 !0001, <<Interrupt code, WRITE, to CPVA 4th word>>                     03865000
 !0183, <<INTERRUPT/HALT>>                                              03870000
 !0002, <<Interrupt code, STATUS, to CPVA 4th word>>                    03875000
 !0183, <<INTERRUPT/HALT>>                                              03880000
 !0003, <<Interrupt code, no request, to CPVA 4th word>>                03885000
 !FFFF, <<End of channel program, device 7>>                            03890000
 !FFFF);                                                                03895000
                                                                        03900000
LOGICAL ARRAY                                                           03905000
CPVA(32);                                                               03910000
$PAGE"ADCDIAG2  ADCC DIAGNOSTIC  PROCEDURES, EXTERNAL & FORWARD"        03915000
PROCEDURE CLEAROFFLINE;                                                 03920000
EXTERNAL;                                                               03925000
                                                                        03930000
PROCEDURE CRLF;                                                         03935000
EXTERNAL;                                                               03940000
                                                                        03945000
PROCEDURE CRTOUT(BUFFR,LENGTH);                                         03950000
VALUE INTEGER LENGTH; BYTE ARRAY BUFFR;                                 03955000
FORWARD;                                                                03960000
                                                                        03965000
PROCEDURE DODELAY(STAR'CLOCK,MIL'SEC);                                  03970000
VALUE LOGICAL STAR'CLOCK,MIL'SEC;                                       03975000
FORWARD;                                                                03980000
                                                                        03985000
PROCEDURE ERROROUT(LEN,DVN);                                            03990000
VALUE INTEGER LEN;                                                      03995000
VALUE LOGICAL DVN;                                                      04000000
FORWARD;                                                                04005000
                                                                        04010000
LOGICAL PROCEDURE FMGR(N,BUF,SADR,B1,B2,B3,B4);                         04015000
VALUE INTEGER N,B1,B2,B3,B4; INTEGER ARRAY SADR;                        04020000
BYTE ARRAY BUF;                                                         04025000
EXTERNAL,VARIABLE;                                                      04030000
                                                                        04035000
PROCEDURE GET'INPUT(WHERE); VALUE LOGICAL WHERE;                        04040000
FORWARD;                                                                04045000
                                                                        04050000
INTEGER PROCEDURE GET'MESSAGE(SELECT);                                  04055000
VALUE INTEGER SELECT;                                                   04060000
FORWARD;                                                                04065000
                                                                        04070000
INTEGER PROCEDURE GETIO(N); VALUE INTEGER N;                            04075000
EXTERNAL;                                                               04080000
                                                                        04085000
PROCEDURE INT'RECV;                                                     04090000
INTERRUPT,     <<ADDED FOR SPLII VERSION 2.03>>                 <<0.29>>04095000
FORWARD;                                                                04100000
                                                                        04105000
PROCEDURE IIX'TIMER(TIMES);                                     <<0.29>>04110000
VALUE LOGICAL TIMES;                                            <<0.29>>04115000
EXTERNAL;                                                       <<0.29>>04120000
                                                                        04125000
PROCEDURE LIST'PROG'STAT;                                               04130000
FORWARD;                                                                04135000
                                                                        04140000
PROCEDURE LOOP'BACK(INDEX);                                             04145000
VALUE INTEGER INDEX;                                                    04150000
FORWARD;                                                                04155000
                                                                        04160000
PROCEDURE NUM2ASC(INDEX,COUNT,BASE,NUMBER);                             04165000
VALUE INTEGER INDEX,BASE,COUNT; VALUE LOGICAL NUMBER;                   04170000
FORWARD;                                                                04175000
                                                                        04180000
PROCEDURE PRINT(MSG,LEN,CNTL);                                          04185000
BYTE ARRAY MSG; VALUE INTEGER LEN,CNTL;                                 04190000
EXTERNAL;                                                               04195000
                                                                        04200000
INTEGER PROCEDURE READ(MSG,MAXLEN);                                     04205000
BYTE ARRAY MSG; VALUE INTEGER MAXLEN;                                   04210000
EXTERNAL;                                                               04215000
                                                                        04220000
PROCEDURE READFAIL;                                                     04225000
FORWARD;                                                                04230000
                                                                        04235000
PROCEDURE SETOFFLINE;                                                   04240000
EXTERNAL;                                                               04245000
                                                                        04250000
PROCEDURE STARTIDLE;                                                    04255000
EXTERNAL;                                                               04260000
                                                                        04265000
LOGICAL PROCEDURE TEST'COMMAND'OK(INBUFFER,LAST'ELEMENT);               04270000
BYTE ARRAY INBUFFER;                                                    04275000
VALUE INTEGER LAST'ELEMENT;                                             04280000
FORWARD;                                                                04285000
                                                                        04290000
PROCEDURE WRITEFAIL;                                                    04295000
FORWARD;                                                                04300000
$PAGE"ADCDIAG2  ADCC DIAGNOSTIC     PROCEDURES AREA"                    04305000
<<------------------------------------------------------------>>        04310000
PROCEDURE CHECKYTRAP;                                                   04315000
 BEGIN                                                                  04320000
                                                                        04325000
INTEGER                                                                 04330000
CA,                                                                     04335000
SAVE'CHARS;                                                             04340000
                                                                        04345000
BYTE ARRAY                                                              04350000
SAVE'MSG(80);                                                           04355000
                                                                        04360000
DEFINE                                                                  04365000
UNMASK'CONS=                                                            04370000
ASSEMBLE(                                                               04375000
 LOAD CONCHNLBIT;                                                       04380000
 RMSK;                                                                  04385000
 OR;                                                                    04390000
 SMSK)#; <<UNMASK CONSOLE CHANNEL>>                                     04395000
                                                                        04400000
  UNMASK'CONS;                                                          04405000
  INTPSYS'ON;                                                           04410000
  IF GETIO(6)                                                           04415000
   THEN                                                                 04420000
    BEGIN                                                               04425000
     INTPSYS'OFF;                                                       04430000
     IF PRINT'ERRORS THEN CLEAROFFLINE;                                 04435000
     SAVE'CHARS:=NUM'CHARS; <<Retain message in case of GO>>            04440000
     MOVE MSG'OUT TO SAVE'MSG FOR NUM'CHARS ITEMS;                      04445000
     CRLF; <<Break was detected, clear input>>                          04450000
     NUM'CHARS:=GET'MESSAGE(74);                                        04455000
     MOVE ("   ") TO MSG'OUT(23);                                       04460000
     CA:=(IF STP > 99 THEN 3 ELSE 2);                                   04465000
     NUM2ASC(23,CA,10,STP); <<Put step # in message>>                   04470000
     PRINT(MSG'OUT,-NUM'CHARS,%201);                                    04475000
     GET'INPUT(0); <<Now go see what the operator wants>>               04480000
     NUM'CHARS:=SAVE'CHARS;                                             04485000
     MOVE SAVE'MSG TO MSG'OUT FOR NUM'CHARS ITEMS;                      04490000
    END;                                                                04495000
 END; <<CHECKYTRAP>>                                                    04500000
$PAGE                                                                   04505000
<<------------------------------------------------------------>>        04510000
PROCEDURE CHK'UNEXP'I(CHK'DEV); <<Looks to see if INT'RECV>>            04515000
INTEGER CHK'DEV; <<put a device # in CPVA 3rd word.>>                   04520000
 BEGIN                                                                  04525000
LOGICAL                                                                 04530000
D;                                                                      04535000
  IF (D:=CPVA(CHK'DEV*4+2))<>0 <<Interrupt?>>                           04540000
   THEN <<Uh-oh>>                                                       04545000
    BEGIN                                                               04550000
     NUM'CHARS:=GET'MESSAGE(84);                                        04555000
     NUM2ASC(16,2,16,CPVA(CHK'DEV*4+3).(8:8)); <<DSJ byte>>             04560000
     NUM2ASC(35,2,10,D.(8:5)); <<Interrupting channel>>                 04565000
     NUM2ASC(39,1,10,D AND 7); <<Interrupting device>>                  04570000
     NUM2ASC(62,1,10,DEV); <<Tested device>>                            04575000
     ERROROUT(-NUM'CHARS,0);                                            04580000
    END;                                                                04585000
 END; <<CHK'UNEXP'I>>                                                   04590000
<<------------------------------------------------------------>>        04595000
PROCEDURE CRTOUT(BUFFR,LENGTH);                                         04600000
VALUE INTEGER LENGTH; BYTE ARRAY BUFFR;                                 04605000
 BEGIN                                                                  04610000
BYTE ARRAY SUBBUF(80);                                                  04615000
  MOVE BUFFR TO SUBBUF FOR -LENGTH ITEMS;                               04620000
  CHECKYTRAP;                                                           04625000
  PRINT(SUBBUF,LENGTH,%201);                                            04630000
  STARTIDLE;                                                            04635000
  DODELAY(STARTIME,50);                                                 04640000
  CHECKYTRAP;                                                           04645000
 END; <<CRTOUT>>                                                        04650000
<<------------------------------------------------------------>>        04655000
PROCEDURE DO'RIOC0;                                                     04660000
 BEGIN                                                                  04665000
DEFINE                                                                  04670000
DORIOC=                                                                 04675000
ASSEMBLE(                                                               04680000
 LOAD CHNL;                                                             04685000
 RIOC;                                                                  04690000
 BNE P+3; <<Branch over RETURN if error>>                               04695000
 STOR TOS')#;                                                           04700000
                                                                        04705000
 <<Read contents of REG>>                                               04710000
  DORIOC;                                                               04715000
  RETURN;                                                               04720000
  TOS':=DELTA'P; <<Get the read failure address>>                       04725000
  READFAIL; <<and pass to the reporting routine>>                       04730000
  NO'ERROR:=FALSE;                                                      04735000
 END; <<DO'RIOC0>>                                                      04740000
<<------------------------------------------------------------>>        04745000
PROCEDURE DO'WIOC0(WRITE'WORD);                                         04750000
VALUE LOGICAL                                                           04755000
WRITE'WORD;                                                             04760000
 BEGIN                                                                  04765000
DEFINE                                                                  04770000
DOWIOC=                                                                 04775000
ASSEMBLE(                                                               04780000
 LOAD CHNL;                                                             04785000
 LOAD WRITE'WORD;                                                       04790000
 WIOC;                                                                  04795000
 BNE P+2)#; <<Branch over RETURN if error>>                             04800000
                                                                        04805000
 <<Write content of WRITE'WORD to REG>>                                 04810000
  DOWIOC;                                                               04815000
  RETURN;                                                               04820000
  TOS':=DELTA'P; <<Get the write failure address>>                      04825000
  WRITEFAIL; <<and pass to the reporting routine>>                      04830000
  NO'ERROR:=FALSE;                                                      04835000
 END; <<DO'WIOC0>>                                                      04840000
<<------------------------------------------------------------>>        04845000
PROCEDURE DODELAY(STAR'CLOCK,MIL'SEC);                                  04850000
 <<1000 milliseconds/91.43 usec, 89.3 nsec CPU, =10937>>                04855000
VALUE LOGICAL                                                           04860000
STAR'CLOCK,                                                             04865000
MIL'SEC;                                                                04870000
 BEGIN <<Accuracy is +/-0.01%, +5.7uSec/-85.7uSec>>                     04875000
  WHILE INTEGER(MIL'SEC:=MIL'SEC-2000) > 0 DO                   <<0.29>>04880000
   BEGIN                                                        <<0.29>>04885000
      IIX'TIMER(21875);  <<2000 * 10.9375  (2 SECONDS)>>        <<0.29>>04890000
   END;                                                         <<0.29>>04895000
   IF (MIL'SEC:=MIL'SEC+2000) <> 0 THEN                         <<0.29>>04900000
      IIX'TIMER (MIL'SEC/0.09142857);                           <<0.29>>04905000
<< THESE LINES                                                          04910000
      ARE DELETED                                                       04915000
        FOR THIS VERSION>>                                      <<0.29>>04920000
 END; <<DODELAY>>                                                       04925000
<<------------------------------------------------------------>>        04930000
PROCEDURE DOPAUSE;                                                      04935000
 BEGIN                                                                  04940000
 GET'INPUT(0);                                                          04945000
   CHECKYTRAP;                                                          04950000
 END;                                                                   04955000
<<------------------------------------------------------------>>        04960000
PROCEDURE DOT;                                                          04965000
 BEGIN                                                                  04970000
  CHECKYTRAP;                                                           04975000
  IF PRINTOK                                                            04980000
   THEN                                                                 04985000
    BEGIN                                                               04990000
     PRINT(PERIOD,-1,IF (DOT'CNT:=DOT'CNT+1)<50                         04995000
                      THEN %320 <<Stay on this line>>                   05000000
                      ELSE %201); <<Advance to next line>>              05005000
     STARTIDLE;                                                         05010000
     IF DOT'CNT>=50 THEN DOT'CNT:=0;                                    05015000
    END;                                                                05020000
 END; <<DOT>>                                                           05025000
<<------------------------------------------------------------>>        05030000
PROCEDURE DRT'INIT;                                                     05035000
 BEGIN                                                                  05040000
INTEGER                                                                 05045000
INFO,                                                           <<0.29>>05050000
TEM'DEV:=-1;                                                            05055000
LOGICAL                                                                 05060000
DRT'ADDR,                                                               05065000
INT'RCV'LABEL;                                                          05070000
  INT'RCV'LABEL:=DRT'PLABEL'OF(INT'RECV);                               05075000
  WHILE (TEM'DEV:=TEM'DEV+1)<=7                                         05080000
   DO                                                                   05085000
    BEGIN                                                               05090000
     MEM'GETS'V((DRT'ADDR:=(CHNL+TEM'DEV)*4),0);                        05095000
     INFO:=ABS'ADDR(CPVA,(TEM'DEV*4));<<ADDED FOR SPLII (2.03)>><<0.29>>05100000
     MEM'GETS'V(DRT'ADDR+1,INFO);                               <<0.29>>05105000
     MEM'GETS'V(DRT'ADDR+2,INT'RCV'LABEL);                              05110000
     MEM'GETS'V(DRT'ADDR+3,0);                                          05115000
    END;                                                                05120000
 END; <<DRT'INIT>>                                                      05125000
<<------------------------------------------------------------>>        05130000
PROCEDURE ERROROUT(LEN,DVN);                                            05135000
VALUE INTEGER LEN;                                                      05140000
VALUE LOGICAL DVN;                                                      05145000
 BEGIN                                                                  05150000
LOGICAL COUNT;                                                          05155000
BYTE ARRAY SUBBUF(80);                                                  05160000
  MOVE MSG'OUT TO SUBBUF FOR -LEN ITEMS;                                05165000
  IF EPRINTOK                                                           05170000
   THEN                                                                 05175000
    BEGIN                                                               05180000
     NUM'CHARS:=GET'MESSAGE(79);                                        05185000
     MOVE(!20,!20,!20) TO MSG'OUT(14);                                  05190000
     COUNT:=(IF STP > 99                                                05195000
               THEN 3                                                   05200000
               ELSE 2);                                                 05205000
     NUM2ASC(14,COUNT,10,STP);                                          05210000
                                                                        05215000
     IF PRINT'ERRORS THEN SETOFFLINE ELSE CRLF;                         05220000
     CRTOUT(MSG'OUT,-NUM'CHARS);                                        05225000
     PRINT(SUBBUF,LEN,%320);                                            05230000
     IF DVN                                                             05235000
      THEN                                                              05240000
       BEGIN                                                            05245000
        NUM'CHARS:=GET'MESSAGE(80);                                     05250000
        MSG'OUT(18):=!30+DEV;                                           05255000
        PRINT(MSG'OUT,-NUM'CHARS,%320);                                 05260000
       END;                                                             05265000
     CRLF;                                                              05270000
     CLEAROFFLINE;                                                      05275000
     STARTIDLE;                                                         05280000
     IF EPAUSEOK THEN DOPAUSE ELSE DODELAY(STARTIME,50);                05285000
    END;                                                                05290000
  CHECKYTRAP;                                                           05295000
 END; <<ERROROUT>>                                                      05300000
<<------------------------------------------------------------>>        05305000
PROCEDURE EXIT'TO'DUS;                                                  05310000
 BEGIN                                                                  05315000
 <<** Add code to halt all channel progs and to save                    05320000
      and restore entire DRT **>>                                       05325000
  STARTIDLE; <<Clears Break>>                                           05330000
  CRTOUT(MSG'OUT,-GET'MESSAGE(4));                                      05335000
  CRLF;                                                                 05340000
  MAX'DEV:=-1;                                                          05345000
  SECTIONS'TO'RUN:=DEFAULT'SECTS;                                       05350000
  FMGR(6); <<Return to the File Manager>>                               05355000
 END; <<EXIT'TO'DUS>>                                                   05360000
<<------------------------------------------------------------>>        05365000
PROCEDURE FLY'CATCHER;                                                  05370000
 INTERRUPT;                                                             05375000
 BEGIN                                                                  05380000
  MEM'GETS'V(!FFFD,PARMQPLUS3);                                         05385000
  DISABLE'RTN'INTRPS;                                                   05390000
  INT'EXIT;                                                             05395000
 END; <<FLY'CATCHER>>                                                   05400000
<<------------------------------------------------------------>>        05405000
PROCEDURE GET'INPUT(WHERE);  VALUE LOGICAL WHERE;                       05410000
 BEGIN                                                                  05415000
LOGICAL INPUTOK,GO'FLAG;                                                05420000
INTEGER INDEX:=0;                                                       05425000
INTEGER COUNT:=0;                                                       05430000
                                                                        05435000
  GO'FLAG:=0;                                                           05440000
  WHILE GO'FLAG=0                                                       05445000
   DO                                                                   05450000
    BEGIN                                                               05455000
PSTRT:                                                                  05460000
     PRINT(MSG'OUT,-GET'MESSAGE(71),%320); <<Prompt>>                   05465000
     INPUTOK:=FALSE;                                                    05470000
     WHILE INPUTOK=FALSE                                                05475000
      DO                                                                05480000
       BEGIN                                                            05485000
        MOVE CLEARBUF TO TEMPBUF FOR 80 ITEMS; <<CLEAR TEMPBUF>>        05490000
        IF (COUNT:=READKBD(TEMPBUF,-80))<=0 THEN GO PSTRT;              05495000
        STARTIDLE;                                                      05500000
                                                                        05505000
        IF (INDEX:=SCAN TEMPBUF WHILE !0D20)>0 <<Pass leading spaces>>  05510000
         THEN                                                           05515000
          MOVE TEMPBUF(INDEX) TO TEMPBUF                                05520000
           FOR (COUNT:=COUNT-INDEX) ITEMS;                              05525000
        INDEX:=IF TEMPBUF=1 THEN 1 ELSE 0; <<Sec code?>>                05530000
        MOVE TEMPBUF(INDEX) TO TEMPBUF(INDEX) WHILE ALPHA SHIFT;        05535000
                                                                        05540000
 <<LC  -  Display Set of commands>>                                     05545000
        IF TEMPBUF="LC"                                                 05550000
         THEN                                                           05555000
          BEGIN                                                         05560000
           INDEX:=0;                                                    05565000
           REPEAT                                                       05570000
            BEGIN                                                       05575000
             COUNT:=SCAN LIST'COM(INDEX) UNTIL !DFF;                    05580000
            END;                                                        05585000
           WHILE CARRY                                                  05590000
            DO                                                          05595000
             BEGIN                                                      05600000
              CRTOUT(LIST'COM(INDEX),-COUNT);                           05605000
              INDEX:=INDEX+COUNT+1;                                     05610000
             END;                                                       05615000
           GO PSTRT;                                                    05620000
          END;                                                          05625000
                                                                        05630000
<<LOOP  -  Sets variable name LOOP>>                                    05635000
        IF TEMPBUF<>"LOOPOFF"                                           05640000
         THEN                                                           05645000
          BEGIN                                                         05650000
           IF TEMPBUF="LOOP"                                            05655000
            THEN                                                        05660000
             BEGIN                                                      05665000
              LOOP:=TRUE; <<Setup to loop>>                             05670000
              INPUTOK:=TRUE; <<Set input ok flag>>                      05675000
             END;                                                       05680000
          END;                                                          05685000
                                                                        05690000
<<LOOPOFF  -  Resets variable name LOOP>>                               05695000
      IF (TEMPBUF="LOOPOFF")OR(TEMPBUF="NOLOOP")                        05700000
       THEN                                                             05705000
        BEGIN                                                           05710000
         LOOP:=FALSE; <<Setup not to loop>>                             05715000
         INPUTOK:=TRUE; <<Set input ok flag>>                           05720000
         END;                                                           05725000
                                                                        05730000
<<PRINTER, ON ERRORS ONLY>>                                             05735000
     IF TEMPBUF="PRINTER" THEN BEGIN                                    05740000
      PRINT'ERRORS:=TRUE;                                               05745000
      INPUTOK:=TRUE;                                                    05750000
      END;                                                              05755000
                                                                        05760000
<<RST       -   >>                                                      05765000
      IF TEMPBUF="RST" THEN BEGIN                                       05770000
         EPRINTOK:=TRUE;  PRINTOK:=TRUE;                                05775000
         EPAUSEOK:=TRUE;  PAUSEOK:=TRUE;                                05780000
         INPUTOK:=TRUE; PRINT'ERRORS:=FALSE;                            05785000
         END;                                                           05790000
                                                                        05795000
<<SEPR      -     Suppress error prints>>                               05800000
      IF TEMPBUF="SEPR" THEN BEGIN                                      05805000
         EPRINTOK:=FALSE;   INPUTOK:=TRUE;                              05810000
         END;                                                           05815000
                                                                        05820000
<<EEPR      -     Enable error prints>>                                 05825000
      IF TEMPBUF="EEPR" THEN BEGIN                                      05830000
         EPRINTOK:=TRUE;   INPUTOK:=TRUE;                               05835000
         END;                                                           05840000
                                                                        05845000
<<SEPS      -     Suppress error pauses>>                               05850000
      IF TEMPBUF="SEPS" THEN BEGIN                                      05855000
         EPAUSEOK:=FALSE;  INPUTOK:=TRUE;                               05860000
         END;                                                           05865000
                                                                        05870000
<<EEPS      -     Enable error pauses>>                                 05875000
      IF TEMPBUF="EEPS" THEN BEGIN                                      05880000
         EPAUSEOK:=TRUE;   INPUTOK:=TRUE;                               05885000
         END;                                                           05890000
                                                                        05895000
<<SNPR      -     Suppress non error prints>>                           05900000
      IF TEMPBUF="SNPR" THEN BEGIN                                      05905000
         PRINTOK:=FALSE;   INPUTOK:=TRUE;                               05910000
         END;                                                           05915000
                                                                        05920000
<<ENPR      -     Enable non error prints>>                             05925000
      IF TEMPBUF="ENPR" THEN BEGIN                                      05930000
         PRINTOK:=TRUE;    INPUTOK:=TRUE;                               05935000
         END;                                                           05940000
                                                                        05945000
<<EXIT>>                                                                05950000
    IF TEMPBUF="EXIT" THEN EXIT'TO'DUS;                                 05955000
                                                                        05960000
<<SO        -  Stop DUS stream facility>>                               05965000
 <<~IF (TEMPBUF="SO")OR(TEMPBUF="STREAMOFF") THEN FMGR(13);~>>          05970000
                                                                        05975000
<<GO    -     continue execution from point of interruption>>           05980000
  IF TEMPBUF="GO"                                                       05985000
   THEN                                                                 05990000
    IF NOT WHERE                                                        05995000
     THEN                                                               06000000
      BEGIN                                                             06005000
       STARTIDLE; <<Restart the input driver>>                          06010000
       RETURN; <<Return to caller address>>                             06015000
      END                                                               06020000
     ELSE                                                               06025000
      BEGIN                                                             06030000
       INPUTOK:=TRUE;                                                   06035000
       A:=GO'FLAG:=1;                                                   06040000
       B:=(IF TEMPBUF="GO,1" THEN 1 ELSE 0);                            06045000
      END;                                                              06050000
                                                                        06055000
<<DEV       -     Select only one device to be tested>>                 06060000
      IF TEMPBUF="DEV" THEN BEGIN                                       06065000
         IF !30<=TEMPBUF(4)<=!37 THEN BEGIN                             06070000
            DESIRED'DEV:=TEMPBUF(4) AND !7;                             06075000
            MAX'DEV:=DESIRED'DEV; <<Range of one>>                      06080000
            INPUTOK:=TRUE;                                              06085000
            EXTND:=IF DESIRED'DEV>3                                     06090000
                     THEN                                               06095000
                      TRUE                                              06100000
                     ELSE                                               06105000
                      FALSE;                                            06110000
            END ELSE CRTOUT(MSG'OUT,-GET'MESSAGE(8));                   06115000
         END;                                                           06120000
                                                                        06125000
<<EXTND15  - Limits Section 15 (Extended baud rate/UARTS) to  >><<1.31>>06130000
<<           devices 4-7.  Applies only to Section 15 and     >><<1.31>>06135000
<<           only if the Extended board is present and the    >><<1.31>>06140000
<<           DEV command is not used.                         >><<1.31>>06145000
      IF TEMPBUF="EXTND15" THEN EXTND15 := INPUTOK := TRUE;     <<1.31>>06150000
                                                                        06155000
 <<TEST  -  Alter test section selection>>                              06160000
<<THE CHECK FOR                                                         06165000
     AMIGO SECURITY WAS                                                 06170000
         REMOVED >>                                             <<0.29>>06175000
     IF TEMPBUF="TEST"                                          <<0.29>>06180000
       THEN INPUTOK:=TEST'COMMAND'OK(TEMPBUF,COUNT-1);                  06185000
 <<REMOVED (END;) AS PART OF LINE 259/261 CHANGE>>              <<0.29>>06190000
                                                                        06195000
<<RUN   -  Begin diagnostic execution>>                                 06200000
   IF TEMPBUF="RUN"                                                     06205000
    THEN                                                                06210000
     BEGIN                                                              06215000
      INPUTOK:=TRUE;                                                    06220000
      RESTART;                                                          06225000
     END;                                                               06230000
                                                                        06235000
 <<STATE  -  List status of program>>                                   06240000
   IF TEMPBUF="STATE"                                                   06245000
    THEN                                                                06250000
     BEGIN                                                              06255000
      LIST'PROG'STAT;                                                   06260000
      GOTO PSTRT;                                                       06265000
     END;                                                               06270000
                                                                        06275000
  IF NOT INPUTOK                                                        06280000
   THEN                                                                 06285000
    BEGIN                                                               06290000
     CRTOUT(MSG'OUT,-GET'MESSAGE(72));                                  06295000
     PRINT(MSG'OUT,-GET'MESSAGE(71),%320);                              06300000
    END;                                                                06305000
     END;                                                               06310000
    END;                                                                06315000
  CHECKYTRAP; <<Check for operator interrupt request>>                  06320000
 END; <<GET'INPUT>>                                                     06325000
<<------------------------------------------------------------>>        06330000
INTEGER PROCEDURE GET'MESSAGE(SELECT);                                  06335000
VALUE INTEGER SELECT;                                                   06340000
 <<Puts SELECTed message in global buffer MSG'OUT                       06345000
   and returns byte length.  Some message lines                         06350000
   have variables in the string. Any change there may                   06355000
   need a change where the variables are stuffed.>>                     06360000
 BEGIN                                                                  06365000
BYTE CONSTANT ARRAY MESSAGES:=(                   <<message SELECT #>>  06370000
"Asynchronous Data Communication Channel Diagnostic",!D,       <<0>>    06375000
" Revision",!D,                                                         06380000
"Type GO to continue (LC for List Commands)",!D,                        06385000
"Replace ADCC cable(s) with test connector(s).",!D,                     06390000
"Replace test connector(s) with ADCC cable(s).",!D,                     06395000
"What is the CHANNEL address of ADCC under test? ",!D,         <<5>>    06400000
"Is the extended ADCC present?(Y/N) ",!D,                               06405000
"1<=channel number<=15",!D,                                             06410000
"0<=device number<=7",!D,                                               06415000
"ADCC Diagnostic Pass XXXX",!D,                                         06420000
                                                                        06425000
"ADCC under test did not respond to Roll Call",!D,             <<10>>   06430000
"Register 2 read is !XXXX expected !800A",!D,                           06435000
"Register 14 read is !XXXX expected !80N1",!D,                          06440000
"Please set processor select switch to CPU, respond 'GO'",!D,           06445000
"OBXI returned YY expected ZZ",!D,                                      06450000
"Interrupt queue not cleared by INIT",!D,                      <<15>>   06455000
"Interrupt queue is X expected Y",!D,                                   06460000
"Queued device D did not cause interrupt",!D,                           06465000
"Unexpected interrupt from device D",!D,                                06470000
"Device X did not hold off interrupt from device Y",!D,                 06475000
                                                                        06480000
"IPOLL returns !XXXX expected !YYYY",!D,                       <<20>>   06485000
"Register XX returned !YYYY expected !0000",!D,                         06490000
"Write to register XX changed register YY",!D,                          06495000
"Character transmitted is !XX, received !YY",!D,                        06500000
" XX incorrectly tagged as special character",!D,                       06505000
" XX not tagged as special character",!D,                      <<25>>   06510000
"UART control=!XX.  Sent !AA received !BB, baud=XXXXX",!D,              06515000
"!55 not received after 300 msec.  Baud=XXXXX",!D,                      06520000
"Device Specified Jump returned XX expected 0Y",!D,                     06525000
"Device D UART did not detect parity error",!D,                         06530000
                                                                        06535000
"Device D modifier 1 did not report parity error",!D,          <<30>>   06540000
"Device D UART did not detect overrun error",!D,                        06545000
"Device D modifier 1 did not report overrun",!D,                        06550000
"Device D UART did not detect break",!D,                                06555000
"Device D modifier 1 did not report break",!D,                          06560000
"EOT not appended at detected break",!D,                       <<35>>   06565000
"TBE not returned as X",!D,                                             06570000
"Modem status change did not set DSJ byte=2",!D,                        06575000
"DSJ did not report modem status change",!D,                            06580000
"Modifier 2 did not report status change",!D,                           06585000
                                                                        06590000
"Modifier 2 read is !XX expected !YY",!D,                      <<40>>   06595000
"DSJ returned !XX expected !YY",!D,                                     06600000
"Special Character RAM address XXXX affected YYYY",!D,                  06605000
"DSJ return byte, chan prog 6th word, is !nn, expect !nn",!D,           06610000
"How many channels of all types are there installed? ",!D,              06615000
"Primary XX, secondary YY do not disable CSRQ",!D,             <<45>>   06620000
"INIT does not re-enable CSRQ.  Primary XX, secondary YY",!D,           06625000
"Primary XX, secondary YY do not re-enable CSRQ",!D,                    06630000
"Register 2 read is !XXXX expected !802A",!D,                           06635000
"Identify device D returned !XXXX expected !4080",!D,                   06640000
                                                                        06645000
"DNV not asserted for Identify",!D,                            <<50>>   06650000
"Channel program did not start",!D,                                     06655000
"Channel program stuck in wait",!D,                                     06660000
"Unexpected value !XXXX found in DRT",!D,                               06665000
"Break detected -",!D,                                                  06670000
"Overrun detected",!D,                                         <<55>>   06675000
"Parity error detected",!D,                                             06680000
"Unexpected value !XXXX found in CPVA",!D,                              06685000
"Unexpected DSJ value returned",!D,                                     06690000
"Channel program aborted by CPU, CPVA=!XXXX",!D,                        06695000
                                                                        06700000
"Byte !XX is !XX, expected !ZZ",!D,                            <<60>>   06705000
"Set Thumbwheel of ADCC under test to channel xx",!D,                   06710000
"1<=number of CHANNELS<=15",!D,                                         06715000
"Roll Call responses = xx, expected xx channel responses",!D,           06720000
"What is device number associated with the cable under test? ",!D,      06725000
"Channel XX did not respond to Roll Call",!D,                  <<65>>   06730000
"Place RS-232C 'D' loop on cable jack.",!D,                             06735000
"OBSI return is !XXXX expected !YYYY",!D,                               06740000
"SPOLL1 return is !XXXX expected !YYYY",!D,                             06745000
"1 <= test SECTION <= nn",!D,                                           06750000
                                                                        06755000
"Thumbwheel switch of ADCC under test is supposed to be on 0.",!D,      06760000
">",!D,                                                        <<71>>   06765000
"Input incorrect, re-enter, or type 'LC' for list of valid commands",!D,06770000
"All other channels except Console must be switched to 0",!D,           06775000
"Break detected in Step XX",!D,                                         06780000
"Read failed P=!XXXX",!D,                                      <<75>>   06785000
"Unexpected DEVICE D Interrupt",!D,                                     06790000
"Unexpected Interrupt from CHANNEL XX DEVICE Y ",!D,                    06795000
"Write failed P=!XXXX",!D,                                              06800000
"Error in step 00 ",!D,                                                 06805000
                                                                        06810000
", testing DEVICE# d",!D,                                      <<80>>   06815000
"Respond GO",!D,                                                        06820000
"Interrupted before MASK enabled",!D,                                   06825000
"UART did not MASTER RESET",!D,                                         06830000
"Unexpected DSJ !bb, INTERRUPT from cc, d while testing DEVICE d",!D,   06835000
"No interrupt from modem status change",!D,                    <<85>>   06840000
"Read  nnn bytes, expected nnn",!D,                                     06845000
"Cannot test Console Channel.",!D,                                      06850000
"WARNING: Attempting to test Channel with Disc.   ",7,!D,               06855000
                                                                        06860000
  !FF,"** MESSAGE NUMBER TOO BIG **",!D,!FF);      <<LAST MESSAGE>>     06865000
<<LINE 391 MOVED 2 SPACES. COMPILER DOESN'T LIKE ! (SPECIAL             06870000
  CHARACTER) IN THE FIRST SPACE.>>                              <<0.29>>06875000
INTEGER                                                                 06880000
COUNT:=0,                                                               06885000
INDEX:=0;                                                               06890000
                                                                        06895000
  REPEAT                                                                06900000
   BEGIN                                                                06905000
SCANIT:                                                                 06910000
    COUNT:=SCAN MESSAGES(INDEX) UNTIL !DFF; <<looking for CR or DEL>>   06915000
   END;                                                                 06920000
  WHILE CARRY                                                           06925000
   DO <<CR(!D) @ end of line>>                                          06930000
    IF (SELECT:=SELECT-1)<0                                             06935000
     THEN <<This is the message>>                                       06940000
      BEGIN                                                             06945000
       MOVE MESSAGES(INDEX) TO MSG'OUT FOR COUNT ITEMS;                 06950000
       GET'MESSAGE:=COUNT;                                              06955000
       RETURN;                                                          06960000
      END                                                               06965000
     ELSE <<This ain't the message yet.>>                               06970000
      INDEX:=INDEX+COUNT+1;                                             06975000
                                                                        06980000
   INDEX:=INDEX+1; <<SELECT too big, found DEL(!FF)>>                   06985000
   SELECT:=0;                                                           06990000
   GO SCANIT; <<to get last message>>                                   06995000
                                                                        07000000
 END; <<GET'MESSAGE>>                                                   07005000
<<------------------------------------------------------------>>        07010000
PROCEDURE INT'RECV;                                                     07015000
INTERRUPT;                                                              07020000
 BEGIN                                                                  07025000
DEFINE                                                                  07030000
SAVE'DEV=                                                               07035000
ASSEMBLE(                                                               07040000
 LOAD PARMQPLUS3;                                                       07045000
 STOR DB+2)#;                                                           07050000
                                                                        07055000
  SAVE'DEV; <<Put channel, device # into CPVA 3rd word>>                07060000
  DISABLE'RTN'INTRPS;                                                   07065000
  INT'EXIT;                                                             07070000
 END; <<INT'RECV>>                                                      07075000
<<------------------------------------------------------------>>        07080000
PROCEDURE INTTRAP0;                                                     07085000
 INTERRUPT;                                                             07090000
BEGIN   TRAP(0);                                                        07095000
DISABLE'RTN'INTRPS;                                                     07100000
INT'EXIT;   END;                                                        07105000
<<------------------------------------------------------------>>        07110000
PROCEDURE INTTRAP1;                                                     07115000
 INTERRUPT;                                                             07120000
BEGIN   TRAP(1);      DISABLE'RTN'INTRPS;                               07125000
INT'EXIT;   END;                                                        07130000
<<------------------------------------------------------------>>        07135000
PROCEDURE INTTRAP2;                                                     07140000
 INTERRUPT;                                                             07145000
BEGIN   TRAP(2); DISABLE'RTN'INTRPS;                                    07150000
INT'EXIT;   END;                                                        07155000
<<------------------------------------------------------------>>        07160000
PROCEDURE INTTRAP3;                                                     07165000
 INTERRUPT;                                                             07170000
BEGIN    TRAP(3); DISABLE'RTN'INTRPS;                                   07175000
INT'EXIT;   END;                                                        07180000
<<------------------------------------------------------------>>        07185000
PROCEDURE INTTRAP4;                                                     07190000
 INTERRUPT;                                                             07195000
BEGIN    TRAP(4);    DISABLE'RTN'INTRPS;                                07200000
INT'EXIT;   END;                                                        07205000
<<------------------------------------------------------------>>        07210000
PROCEDURE INTTRAP5;                                                     07215000
 INTERRUPT;                                                             07220000
BEGIN    TRAP(5); DISABLE'RTN'INTRPS;                                   07225000
INT'EXIT;   END;                                                        07230000
<<------------------------------------------------------------>>        07235000
PROCEDURE INTTRAP6;                                                     07240000
 INTERRUPT;                                                             07245000
BEGIN     TRAP(6); DISABLE'RTN'INTRPS;                                  07250000
INT'EXIT;   END;                                                        07255000
<<------------------------------------------------------------>>        07260000
PROCEDURE INTTRAP7;                                                     07265000
 INTERRUPT;                                                             07270000
BEGIN    TRAP(7); DISABLE'RTN'INTRPS;                                   07275000
INT'EXIT;   END;                                                        07280000
<<------------------------------------------------------------>>        07285000
PROCEDURE INTHNDLR0;                                                    07290000
 INTERRUPT;                                                             07295000
BEGIN    STUFF(0); DISABLE'RTN'INTRPS;                                  07300000
INT'EXIT;   END;                                                        07305000
<<------------------------------------------------------------>>        07310000
PROCEDURE INTHNDLR1;                                                    07315000
 INTERRUPT;                                                             07320000
BEGIN    STUFF(1); DISABLE'RTN'INTRPS;                                  07325000
INT'EXIT;   END;                                                        07330000
<<------------------------------------------------------------>>        07335000
PROCEDURE INTHNDLR2;                                                    07340000
 INTERRUPT;                                                             07345000
BEGIN    STUFF(2);                                                      07350000
DISABLE'RTN'INTRPS;                                                     07355000
INT'EXIT;   END;                                                        07360000
<<------------------------------------------------------------>>        07365000
PROCEDURE INTHNDLR3;                                                    07370000
 INTERRUPT;                                                             07375000
BEGIN    STUFF(3);                                                      07380000
DISABLE'RTN'INTRPS;                                                     07385000
INT'EXIT;   END;                                                        07390000
<<------------------------------------------------------------>>        07395000
PROCEDURE INTHNDLR4;                                                    07400000
 INTERRUPT;                                                             07405000
BEGIN    STUFF(4);                                                      07410000
DISABLE'RTN'INTRPS;                                                     07415000
INT'EXIT;   END;                                                        07420000
<<------------------------------------------------------------>>        07425000
PROCEDURE INTHNDLR5;                                                    07430000
 INTERRUPT;                                                             07435000
BEGIN    STUFF(5);                                                      07440000
DISABLE'RTN'INTRPS;                                                     07445000
INT'EXIT;   END;                                                        07450000
<<------------------------------------------------------------>>        07455000
PROCEDURE INTHNDLR6;                                                    07460000
 INTERRUPT;                                                             07465000
BEGIN    STUFF(6);                                                      07470000
DISABLE'RTN'INTRPS;                                                     07475000
INT'EXIT;   END;                                                        07480000
<<------------------------------------------------------------>>        07485000
PROCEDURE INTHNDLR7;                                                    07490000
 INTERRUPT;                                                             07495000
BEGIN    STUFF(7);                                                      07500000
DISABLE'RTN'INTRPS;                                                     07505000
INT'EXIT;   END;                                                        07510000
<<------------------------------------------------------------>>        07515000
PROCEDURE LIST'PROG'STAT; <<lists diagnostic status>>                   07520000
 BEGIN                                                                  07525000
INTEGER                                                                 07530000
COUNT:=0,                                                               07535000
INDEX:=0,                                                               07540000
SECTNR:=0;                                                              07545000
                                                                        07550000
  MOVE "CHAN =" TO MSG'OUT;                                             07555000
  NUM2ASC(7,2,10,CHNL.(9:4));                                           07560000
  CRTOUT(MSG'OUT,-9);                                                   07565000
                                                                        07570000
  MOVE "DEVN =" TO MSG'OUT;                                             07575000
  NUM2ASC(8,1,10,DEV);                                                  07580000
  CRTOUT(MSG'OUT,-9);                                                   07585000
                                                                        07590000
  MOVE "EEPR : false" TO MSG'OUT;                                       07595000
  IF EPRINTOK THEN MOVE " true " to MSG'OUT(6);                         07600000
  CRTOUT(MSG'OUT,-12);                                                  07605000
                                                                        07610000
  MOVE "EEPS : false" TO MSG'OUT;                                       07615000
  IF EPAUSEOK THEN MOVE " true " to MSG'OUT(6);                         07620000
  CRTOUT(MSG'OUT,-12);                                                  07625000
                                                                        07630000
  MOVE "ENPR : false" TO MSG'OUT;                                       07635000
  IF PRINTOK THEN MOVE " true " to MSG'OUT(6);                          07640000
  CRTOUT(MSG'OUT,-12);                                                  07645000
                                                                        07650000
  MOVE "EXTND: false" TO MSG'OUT;                                       07655000
  IF EXTND THEN MOVE " true " to MSG'OUT(6);                            07660000
  CRTOUT(MSG'OUT,-12);                                                  07665000
                                                                        07670000
  MOVE "LOOP : false" TO MSG'OUT;                                       07675000
  IF LOOP THEN MOVE " true " to MSG'OUT(6);                             07680000
  CRTOUT(MSG'OUT,-12);                                                  07685000
                                                                        07690000
  MOVE "PRINT: false" TO MSG'OUT;                                       07695000
  IF PRINT'ERRORS THEN MOVE " true " to MSG'OUT(6);                     07700000
  CRTOUT(MSG'OUT,-12);                                                  07705000
                                                                        07710000
  MOVE "Sections Selected:" TO MSG'OUT;                                 07715000
  CRTOUT(MSG'OUT,-18);                                                  07720000
  MOVE CLEARBUF TO MSG'OUT FOR 80 ITEMS;                                07725000
  WHILE (SECTNR:=SECTNR+1)<=31                                          07730000
   DO                                                                   07735000
    IF SECTION(SECTNR)                                                  07740000
     THEN                                                               07745000
      BEGIN                                                             07750000
       INDEX:=INDEX+COUNT+1;                                            07755000
       NUM2ASC(INDEX,COUNT:=(IF SECTNR<10 THEN 1 ELSE 2),10,SECTNR);    07760000
       IF INDEX>1 THEN MSG'OUT(INDEX-1):=",";                           07765000
      END;                                                              07770000
  CRTOUT(MSG'OUT,-(INDEX+COUNT));                                       07775000
                                                                        07780000
  NUM'CHARS:=GET'MESSAGE(9);                                            07785000
  NUM2ASC(21,4,10,ENDPASSCOUNTER);                                      07790000
  CRTOUT(MSG'OUT,-NUM'CHARS);                                           07795000
                                                                        07800000
 END; <<LIST'PROG'STAT>>                                                07805000
<<------------------------------------------------------------>>        07810000
PROCEDURE LOAD'INTHNDLRS;                                               07815000
 BEGIN                                                                  07820000
  TEMPARRAY(0):=DRT'PLABEL'OF(INTHNDLR0);                               07825000
  TEMPARRAY(1):=DRT'PLABEL'OF(INTHNDLR1);                               07830000
  TEMPARRAY(2):=DRT'PLABEL'OF(INTHNDLR2);                               07835000
  TEMPARRAY(3):=DRT'PLABEL'OF(INTHNDLR3);                               07840000
  TEMPARRAY(4):=DRT'PLABEL'OF(INTHNDLR4);                               07845000
  TEMPARRAY(5):=DRT'PLABEL'OF(INTHNDLR5);                               07850000
  TEMPARRAY(6):=DRT'PLABEL'OF(INTHNDLR6);                               07855000
  TEMPARRAY(7):=DRT'PLABEL'OF(INTHNDLR7);                               07860000
 END;                                                                   07865000
<<------------------------------------------------------------>>        07870000
PROCEDURE LOAD'TRAPS;                                                   07875000
 BEGIN                                                                  07880000
  TEMPARRAY(0):=DRT'PLABEL'OF(INTTRAP0);                                07885000
  TEMPARRAY(1):=DRT'PLABEL'OF(INTTRAP1);                                07890000
  TEMPARRAY(2):=DRT'PLABEL'OF(INTTRAP2);                                07895000
  TEMPARRAY(3):=DRT'PLABEL'OF(INTTRAP3);                                07900000
  TEMPARRAY(4):=DRT'PLABEL'OF(INTTRAP4);                                07905000
  TEMPARRAY(5):=DRT'PLABEL'OF(INTTRAP5);                                07910000
  TEMPARRAY(6):=DRT'PLABEL'OF(INTTRAP6);                                07915000
  TEMPARRAY(7):=DRT'PLABEL'OF(INTTRAP7);                                07920000
                                                                        07925000
  DVN:=-1;                                                              07930000
  WHILE (DVN:=DVN+1)<8 DO BEGIN                                         07935000
  MEM'GETS'V((CHNL+DVN)*4+2,TEMPARRAY(DVN)); <<DRT word 2>>             07940000
 <<Interrupt procedure label>>                                          07945000
  END; <<Do all eight devices>>                                         07950000
 END;                                                                   07955000
<<------------------------------------------------------------>>        07960000
PROCEDURE LOOP'BACK(INDEX); <<Causes return to point in program kept>>  07965000
VALUE INTEGER INDEX; <<       by procedure STORE'MARK no matter how>>   07970000
 BEGIN <<                     many levels of procedures intervene.>>    07975000
DEFINE                                                                  07980000
LOOPBACK=                                                               07985000
ASSEMBLE(                                                               07990000
 LOAD INDEX;                                                            07995000
 MPYI 5; <<Five word entries in array SAVE'MARK>>                       08000000
 STAX;                                                                  08005000
 LOAD SAVE'MARK,I,X; <<Old Q>>                                          08010000
 SETR 2; <<Q>>                                                          08015000
 INCX;                                                                  08020000
 LOAD SAVE'MARK,I,X; <<Old stack marker>>                               08025000
 STOR Q-3;                                                              08030000
 INCX;                                                                  08035000
 LOAD SAVE'MARK,I,X;                                                    08040000
 STOR Q-2;                                                              08045000
 INCX;                                                                  08050000
 LOAD SAVE'MARK,I,X;                                                    08055000
 STOR Q-1;                                                              08060000
 INCX;                                                                  08065000
 LOAD SAVE'MARK,I,X;                                                    08070000
 STOR Q-0)#;                                                            08075000
                                                                        08080000
  LOOPBACK; <<Set up & EXIT through recovered stack marker.>>           08085000
                                                                        08090000
 END; <<LOOP'BACK>>                                                     08095000
<<------------------------------------------------------------>>        08100000
PROCEDURE MOVE'CHNL'PGM(CHNL'PGM,LEN,ADDR);                             08105000
 VALUE INTEGER LEN; LOGICAL ARRAY CHNL'PGM;                             08110000
VALUE LOGICAL ADDR;                                                     08115000
 BEGIN  INTEGER LA;                                                     08120000
  LA:=-1;                                                               08125000
  WHILE (LA:=LA+1)<LEN DO BEGIN                                         08130000
  MEM'GETS'V(ADDR,CHNL'PGM(LA));                                        08135000
  ADDR:=ADDR+1;                                                         08140000
  END;                                                                  08145000
 END;                                                                   08150000
<<------------------------------------------------------------>>        08155000
PROCEDURE NUM2ASC(INDEX,COUNT,BASE,NUMBER);                             08160000
VALUE INTEGER INDEX,BASE,COUNT;                                         08165000
VALUE LOGICAL NUMBER;                                                   08170000
 BEGIN                                                                  08175000
LOGICAL REMAINDER;                                                      08180000
  WHILE NUMBER>0                                                        08185000
   DO                                                                   08190000
    BEGIN                                                               08195000
     REMAINDER:=NUMBER MOD LOGICAL(BASE);                               08200000
     NUMBER:=NUMBER/LOGICAL(BASE);                                      08205000
     IF COUNT>0                                                         08210000
      THEN                                                              08215000
       BEGIN                                                            08220000
        MSG'OUT(INDEX+(COUNT:=COUNT-1)):=                               08225000
         IF (BASE=16) AND (REMAINDER>9)                                 08230000
          THEN                                                          08235000
           REMAINDER+!37                                                08240000
          ELSE                                                          08245000
           REMAINDER+!30;                                               08250000
       END;                                                             08255000
    END;                                                                08260000
                                                                        08265000
  WHILE COUNT>0                                                         08270000
   DO                                                                   08275000
    BEGIN <<Fill with leading zeros>>                                   08280000
     MSG'OUT(INDEX+(COUNT:=COUNT-1)):="0";                              08285000
    END;                                                                08290000
                                                                        08295000
  IF BASE=8 THEN MSG'OUT(INDEX-1):="%";                                 08300000
  IF BASE=16 THEN MSG'OUT(INDEX-1):="!";                                08305000
  IF BASE=10 THEN MSG'OUT(INDEX-1):=" ";                                08310000
                                                                        08315000
 END; <<NUM2ASC>>                                                       08320000
<<------------------------------------------------------------>>        08325000
PROCEDURE READFAIL;                                                     08330000
 BEGIN                                                                  08335000
  NUM'CHARS:=GET'MESSAGE(75);                                           08340000
  NUM2ASC(15,4,16,TOS');                                                08345000
  ERROROUT(-NUM'CHARS,IF DEV<=MAX'DEV THEN TRUE ELSE FALSE);            08350000
 END; <<READFAIL>>                                                      08355000
<<------------------------------------------------------------>>        08360000
PROCEDURE REP'ILL'INT;                                                  08365000
 BEGIN                                                                  08370000
  GET'UNX'IRQ;                                                          08375000
  LA:=TRUE;                                                             08380000
  WHILE (LA:=LA+1)<8 DO BEGIN                                           08385000
  IF TOS'.(0:1) THEN BEGIN                                              08390000
NUM'CHARS:=GET'MESSAGE(76);                                             08395000
     MSG'OUT(18):=!30+LA;                                               08400000
     ERROROUT(-NUM'CHARS,0);                                            08405000
     END;                                                               08410000
  TOS':=TOS' CSL (1);                                                   08415000
  END;                                                                  08420000
 IF TOS'1 <> 0 THEN BEGIN                                               08425000
NUM'CHARS:=GET'MESSAGE(77);                                             08430000
    NUM2ASC(34,2,10,TOS'1.(9:4));                                       08435000
    NUM2ASC(44,1,10,TOS'1.(13:3));                                      08440000
    ERROROUT(-NUM'CHARS,0);                                             08445000
    END;                                                                08450000
 CLEAR'UNX'IRQ;                                                         08455000
                                                                        08460000
 END;                                                                   08465000
<<------------------------------------------------------------>>        08470000
PROCEDURE SET'CPVA;                                                     08475000
 BEGIN                                                                  08480000
  ADDR:=!CFFF;                                                          08485000
  WHILE (ADDR:=ADDR+1)<!D040 DO BEGIN                                   08490000
  MEM'GETS'V(ADDR,0); <<ZERO THE CPVA AREA>>                            08495000
  END;                                                                  08500000
                                                                        08505000
  DVN:=-1;                                                              08510000
  WHILE (DVN:=DVN+1)<8 DO BEGIN                                         08515000
  MEM'GETS'V((CHNL+DVN)*4+1,CPVAARRAY(DVN));                            08520000
 <<Put the CPVA pointer in the DRT>>                                    08525000
  END;                                                                  08530000
 END;                                                                   08535000
<<------------------------------------------------------------>>        08540000
PROCEDURE SETUP'DRT(DVN); VALUE INTEGER DVN;                            08545000
 BEGIN                                                                  08550000
  LOAD'TRAPS;                                                           08555000
  LOAD'INTHNDLRS;                                                       08560000
  MEM'GETS'V((CHNL+DVN)*4+2,TEMPARRAY(DVN)); <<DRT word 2>>             08565000
 <<Gets Address of interrupt handler>>                                  08570000
 END;                                                                   08575000
<<------------------------------------------------------------>>        08580000
PROCEDURE ST'DSJ'CH'PROGS; <<Start channel programs for all devices>>   08585000
 BEGIN                                                                  08590000
INTEGER                                                                 08595000
TEM'DEV:=-1;                                                            08600000
                                                                        08605000
  WHILE (TEM'DEV:=TEM'DEV+1)<=7                                         08610000
   DO                                                                   08615000
    BEGIN                                                               08620000
     TOS'1:=CHNL+TEM'DEV;                                               08625000
     TOS':= ABS'ADDR(DSJ'CH'PROG,TEM'DEV*21);                           08630000
     DO'SIOP;                                                           08635000
    END;                                                                08640000
                                                                        08645000
 END; <<ST'DSJ'CH'PROGS>>                                               08650000
<<------------------------------------------------------------>>        08655000
PROCEDURE STORE'MARK(INDEX); <<Saves stack marker for use by>>          08660000
VALUE INTEGER INDEX; <<procedure LOOP'BACK>>                            08665000
 BEGIN                                                                  08670000
DEFINE                                                                  08675000
STOREMARK=                                                              08680000
ASSEMBLE(                                                               08685000
 LOAD INDEX;                                                            08690000
 MPYI 5; <<Five word entries in array SAVE'MARK>>                       08695000
 STAX;                                                                  08700000
 PSHR 2; <<Q>>                                                          08705000
 STOR SAVE'MARK,I,X; <<This Q>>                                         08710000
 INCX;                                                                  08715000
 LOAD Q-3; <<This stack marker>>                                        08720000
 STOR SAVE'MARK,I,X;                                                    08725000
 INCX;                                                                  08730000
 LOAD Q-2;                                                              08735000
 STOR SAVE'MARK,I,X;                                                    08740000
 INCX;                                                                  08745000
 LOAD Q-1;                                                              08750000
 STOR SAVE'MARK,I,X;                                                    08755000
 INCX;                                                                  08760000
 LOAD Q-0;                                                              08765000
 STOR SAVE'MARK,I,X)#;                                                  08770000
                                                                        08775000
  STOREMARK; <<Keep Q & stack marker.>>                                 08780000
                                                                        08785000
 END; <<STORE'MARK>>                                                    08790000
<<------------------------------------------------------------>>        08795000
LOGICAL PROCEDURE TEST'COMMAND'OK(INBUFFER,LAST'ELEMENT);               08800000
BYTE ARRAY INBUFFER;                                                    08805000
VALUE INTEGER LAST'ELEMENT;                                             08810000
 <<                                                                     08815000
                                                                        08820000
  Deleted references                                                    08825000
    to the AMIGO (HP 300)                                               08830000
      security for the                                                  08835000
        Test command.                                           (0.29)  08840000
         INBUFFER=working buffer                                        08845000
         LAST'ELEMENT=# of last valid element                           08850000
                                                                        08855000
 uses global: DEFAULT'SECTS                                             08860000
              LAST'SECT                                                 08865000
              SECTIONS'TO'RUN                                           08870000
 >>                                                                     08875000
 BEGIN                                                                  08880000
                                                                        08885000
DEFINE                                                                  08890000
SET'SECTION(sectno)=                                                    08895000
ASSEMBLE(                                                               08900000
 LDD TEMP'SECT'2'RUN;                                           <<0.29>>08905000
 PUSH SECTNO; STAX,NOP;                                         <<0.29>>08910000
 DCSL 1,X; ORI 1;                                               <<0.29>>08915000
 DCSR 1,X;                                                      <<0.29>>08920000
 STD TEMP'SECT'2'RUN)#;                                         <<0.29>>08925000
                                                                        08930000
DOUBLE TEMP'SECT'2'RUN:=0;                                              08935000
                                                                        08940000
INTEGER ACTION:=0, <<action flag; +1=add,-1=delete,0=replace>>          08945000
        CHAR'PNTR:=4, <<points to next valid char in buffer>>   <<0.29>>08950000
        <<Changed 5 to 4 in line 747 for Series 30/33 systems>> <<0.29>>08955000
        FRST'BYTE, <<first byte of number for subroutine>>              08960000
        LST'BYTE, <<last byte of number for subroutine>>                08965000
        NUMBER, <<converted number for subroutine>>                     08970000
        PREVIOUS'NUMBER,                                                08975000
        TEMP'CNTR;                                                      08980000
                                                                        08985000
LOGICAL SUBROUTINE IT'S'A'NUMBER;                                       08990000
 BEGIN                                                                  08995000
  IF INBUFFER(CHAR'PNTR)=NUMERIC                                        09000000
   THEN                                                                 09005000
    BEGIN                                                               09010000
     IF (LST'BYTE:=MOVE INBUFFER(CHAR'PNTR) TO                          09015000
      INBUFFER(CHAR'PNTR) WHILE NUMERIC)>2                              09020000
      THEN RETURN;                                                      09025000
     NUMBER:=TEMP'CNTR:=0;                                              09030000
     FRST'BYTE:=(CHAR'PNTR:=LST'BYTE+CHAR'PNTR)-1;                      09035000
     WHILE LST'BYTE>0                                                   09040000
      DO                                                                09045000
       BEGIN                                                            09050000
        NUMBER:=NUMBER+                                                 09055000
                (LOGICAL(INBUFFER(FRST'BYTE)) AND %17)*                 09060000
                (IF TEMP'CNTR=0 THEN 1 ELSE 10);                        09065000
        FRST'BYTE:=FRST'BYTE-1;                                         09070000
        LST'BYTE:=LST'BYTE-1;                                           09075000
        TEMP'CNTR:=TEMP'CNTR+1;                                         09080000
       END;                                                             09085000
     IT'S'A'NUMBER:=TRUE;                                               09090000
    END;                                                                09095000
 END; <<IT'S'A'NUMBER>>                                                 09100000
                                                                        09105000
 <<"TEST" only-use default set>>                                        09110000
 IF LAST'ELEMENT=3     <<CHANGED FROM 4 FOR SERIES 30/33 SYS>>  <<0.29>>09115000
   THEN                                                                 09120000
    BEGIN                                                               09125000
     TEMP'SECT'2'RUN:=DEFAULT'SECTS;                                    09130000
     GOTO PROCESS'INPUT;                                                09135000
    END;                                                                09140000
 <<ignores blanks between "TEST" & test list>>                          09145000
  WHILE INBUFFER(CHAR'PNTR)=" "                                         09150000
   DO                                                                   09155000
    IF (CHAR'PNTR:=CHAR'PNTR+1)>LAST'ELEMENT                            09160000
     THEN                                                               09165000
      GOTO PROCESS'INPUT; <<blanks only in test list>>                  09170000
 <<eats "+" or "-" and sets action flag>>                               09175000
  IF INBUFFER(CHAR'PNTR)="+"                                            09180000
   THEN                                                                 09185000
    BEGIN                                                               09190000
     ACTION:=1;                                                         09195000
     IF (CHAR'PNTR:=CHAR'PNTR+1)>LAST'ELEMENT THEN RETURN;              09200000
    END                                                                 09205000
   ELSE                                                                 09210000
    IF INBUFFER(CHAR'PNTR)="-"                                          09215000
     THEN                                                               09220000
      BEGIN                                                             09225000
       ACTION:=-1;                                                      09230000
       IF (CHAR'PNTR:=CHAR'PNTR+1)>LAST'ELEMENT THEN RETURN;            09235000
      END;                                                              09240000
                                                                        09245000
NUMBER0: <<expecting #>>                                                09250000
                                                                        09255000
  IF IT'S'A'NUMBER AND 1<=NUMBER<=LAST'SECT                             09260000
   THEN                                                                 09265000
    BEGIN <<test section w/in valid limits>>                            09270000
     SET'SECTION(NUMBER);                                               09275000
    END                                                                 09280000
   ELSE <<expecting #>>                                                 09285000
    BEGIN                                                               09290000
     NUM'CHARS:=GET'MESSAGE(69);                                        09295000
     NUM2ASC(21,2,10,LAST'SECT);                                        09300000
     CRTOUT(MSG'OUT,-NUM'CHARS);                                        09305000
     RETURN;                                                            09310000
    END;                                                                09315000
  IF CHAR'PNTR>LAST'ELEMENT THEN GOTO PROCESS'INPUT;                    09320000
 <<test list terminated w/ #>>                                          09325000
  IF INBUFFER(CHAR'PNTR)="/"                                            09330000
   THEN <<eat "/" & ck for 2nd #>>                                      09335000
    BEGIN                                                               09340000
     IF (CHAR'PNTR:=CHAR'PNTR+1)>LAST'ELEMENT                           09345000
      THEN RETURN; <<not valid to terminate test list w/ "/">>          09350000
     PREVIOUS'NUMBER:=NUMBER; <<save 1st # of "/" # pair>>              09355000
     IF IT'S'A'NUMBER AND PREVIOUS'NUMBER<=NUMBER<=LAST'SECT            09360000
      THEN <<valid #>>                                                  09365000
       WHILE (PREVIOUS'NUMBER:=PREVIOUS'NUMBER+1)<=NUMBER               09370000
        DO                                                              09375000
         BEGIN                                                          09380000
           SET'SECTION(PREVIOUS'NUMBER);                                09385000
         END                                                            09390000
      ELSE RETURN;                                                      09395000
     IF CHAR'PNTR>LAST'ELEMENT THEN GOTO PROCESS'INPUT;                 09400000
 <<test list terminated w/ "/" # pair>>                                 09405000
    END;                                                                09410000
  IF INBUFFER(CHAR'PNTR)=","                                            09415000
   THEN                                                                 09420000
    IF (CHAR'PNTR:=CHAR'PNTR+1)>LAST'ELEMENT                            09425000
     THEN RETURN; <<not valid to terminate test list w/ ",">>           09430000
  GOTO NUMBER0;                                                         09435000
PROCESS'INPUT: <<TEST command is valid>>                                09440000
                                                                        09445000
  IF ACTION=1                                                           09450000
   THEN                                                                 09455000
    BEGIN                                                               09460000
     SECTIONS'TO'RUN.(0:16):=                                           09465000
      SECTIONS'TO'RUN.(0:16) OR TEMP'SECT'2'RUN.(0:16);                 09470000
     SECTIONS'TO'RUN.(16:16):=                                          09475000
      SECTIONS'TO'RUN.(16:16) OR TEMP'SECT'2'RUN.(16:16);               09480000
    END                                                                 09485000
   ELSE                                                                 09490000
    IF ACTION=0                                                         09495000
     THEN SECTIONS'TO'RUN:=TEMP'SECT'2'RUN                              09500000
     ELSE                                                               09505000
      BEGIN <<assumes ACTION=-1>>                                       09510000
       SECTIONS'TO'RUN.(0:16):=                                         09515000
        SECTIONS'TO'RUN.(0:16) AND                                      09520000
        (NOT (TEMP'SECT'2'RUN.(0:16)));                                 09525000
       SECTIONS'TO'RUN.(16:16):=                                        09530000
        SECTIONS'TO'RUN.(16:16) AND                                     09535000
        (NOT (TEMP'SECT'2'RUN.(16:16)));                                09540000
      END;                                                              09545000
  IF SECTIONS'TO'RUN=0                                                  09550000
   THEN SECTIONS'TO'RUN:=DEFAULT'SECTS;                                 09555000
  TEST'COMMAND'OK:=TRUE;                                                09560000
 END; <<TEST'COMMAND'OK>>                                               09565000
<<------------------------------------------------------------>>        09570000
PROCEDURE WRITEFAIL;                                                    09575000
 BEGIN                                                                  09580000
  NUM'CHARS:=GET'MESSAGE(78);                                           09585000
  NUM2ASC(16,4,16,TOS');                                                09590000
  ERROROUT(-NUM'CHARS,IF DEV<=MAX'DEV THEN TRUE ELSE FALSE);            09595000
 END; <<WRITEFAIL>>                                                     09600000
<<------------------------------------------------------------>>        09605000
PROCEDURE ZERO'CPVA;                                                    09610000
 BEGIN                                                                  09615000
  CPVA:=0;                                                              09620000
  MOVE CPVA TO CPVA(1) FOR 31 ITEMS;                                    09625000
 END; <<ZERO'CPVA>>                                                     09630000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC     MAIN"                               09635000
PROCEDURE ADCCDIAG;                                                     09640000
MAIN;                                                                   09645000
BEGIN                                                                   09650000
     FMGR(5,ADCC); <<This is the required call to FMGR>>                09655000
     SAVESTART; <<RUN restarts from here>>                              09660000
     TROF';                                                             09665000
     STARTIDLE; <<Startup for the input console driver>>                09670000
  <<------------------------------------------------------->>           09675000
  <<The following sets up the default diagnostic run time               09680000
     parameters (the same as the RST command)>>                         09685000
     EPRINTOK:=PRINTOK:=EPAUSEOK:=PAUSEOK:=TRUE;                        09690000
     PRINT'ERRORS:=FALSE;                                               09695000
IF 0 THEN BEGIN  << GS: This seeems incompatible with DUSIII >>         09695100
  <<------------------------------------------------------->>           09700000
  <<The following lines are required for compatability with             09705000
      the Stand-Alone File Manager>>                                    09710000
     V'GETS'MEM(ADDR,QI);                                               09715000
    MEM'GETS'V(ADDR,0); <<Clear QI>>                                    09720000
     V'GETS'MEM(TOS',!200+(4*!C)+3);                                    09725000
     MEM'GETS'V(CTCBP,TOS'); ADDR:=TOS';                                09730000
 A:=0;                                                                  09735000
 WHILE (A:=A+1)<5 DO BEGIN                                              09740000
            TOS':=(IF A<3 THEN !4009 ELSE !4008);                       09745000
            MEM'GETS'V(ADDR,TOS');                                      09750000
            ADDR:=ADDR+1;   END;                                        09755000
  <<------------------------------------------------------->>           09760000
END; << DUSIII incompatible stuff >>                                    09760100
                                                                        09765000
    <<The next line gets the console channel from FMGR>>                09770000
      CONSOLE:=IF (D:=GETIO(0))=0 THEN GETIO(2) ELSE D;                 09775000
      CONCHNLBIT:=(!8000) LSR (CONSOLE.(9:4));                          09780000
 <<then the Printer & disc.>>                                           09785000
      PRINTER:=GETIO(1);                                                09790000
      DISC:=GETIO(3);                                                   09795000
                                                                        09800000
  <<The following stuffs the DRT of un-used                             09805000
    channel/devices with the label of the unexpected                    09810000
     interrupt handler>>                                                09815000
     TOS':=DRT'PLABEL'OF(FLY'CATCHER);                                  09820000
  TEM'DEV:=7;                                                           09825000
  WHILE (TEM'DEV:=TEM'DEV+1)<%200                                       09830000
   DO                                                                   09835000
    BEGIN                                                               09840000
     IF TEM'DEV<>CONSOLE OR TEM'DEV<>DISC OR TEM'DEV<>PRINTER           09845000
      THEN MEM'GETS'V(TEM'DEV*4+2,TOS');                                09850000
    END;                                                                09855000
                                                                        09860000
     MOVE TSTBUF' TO TSTBUF FOR 35 ITEMS;                               09865000
     CLEAR'UNX'IRQ; <<Zero unexpected interrupt holder>>                09870000
     ENDPASSCOUNTER:=1; <<Initialize the end-of-pass counter>>          09875000
                                                                        09880000
     EXTND:=0;                                                          09885000
    EXTND15 := FALSE;  <<DUS doesn't load prog when rerun>>     <<1.31>>09890000
 DESIRED'DEV:=STP:=0;                                                   09895000
     PRINT(MSG'OUT,-GET'MESSAGE(0),%320);                               09900000
     NUM'CHARS:=GET'MESSAGE(1);                                         09905000
     MOVE ADCC(8) TO MSG'OUT(NUM'CHARS) FOR 8 ITEMS; <<Revision #>>     09910000
     NUM'CHARS:=NUM'CHARS+8;                                            09915000
     CRTOUT(MSG'OUT,-NUM'CHARS);                                        09920000
     CRTOUT(MSG'OUT,-GET'MESSAGE(2));                                   09925000
 A:=B:=0;                                                               09930000
 WHILE A=0 DO BEGIN                                                     09935000
     GET'INPUT(1); <<Get run parameters>>                               09940000
     END;                                                               09945000
 <<"GO" POINT>>                                                         09950000
                                                                        09955000
  <<------------------------------------------------------->>           09960000
                                                                        09965000
  <<If Section 16 has been selected, go directly to TS16,               09970000
     (the begining of this Section) bypassing the channel               09975000
     number request etc.>>                                              09980000
     IF SECTION(16) THEN GO START16;                                    09985000
                                                                        09990000
  <<------------------------------------------------------->>           09995000
  <<If GO,1 was input, skip the operator instruction to replace         10000000
     the RS 232C cable with the test connector>>                        10005000
     IF NOT B THEN BEGIN                                                10010000
     IF PRINTOK THEN CRTOUT(MSG'OUT,-GET'MESSAGE(3));                   10015000
     END;                                                               10020000
                                                                        10025000
  <<------------------------------------------------------->>           10030000
  <<The following accepts the reply to the question which               10035000
     channel is to be tested, and checks that the reply is              10040000
     within the range 1-15>>                                            10045000
GET'CHANNEL:                                                            10050000
  B:=1;                                                                 10055000
  WHILE B=1                                                             10060000
   DO                                                                   10065000
    BEGIN                                                               10070000
     A:=C:=0;                                                           10075000
     PRINT(MSG'OUT,-GET'MESSAGE(5),%320);                               10080000
     MOVE CLEARBUF TO TEMPBUF FOR 10 ITEMS;                             10085000
     B:=(IF READKBD(TEMPBUF,-3)>2 THEN 1 ELSE 0);                       10090000
     CHECKYTRAP;                                                        10095000
     STARTIDLE;                                                         10100000
                                                                        10105000
     IF (A:=TEMPBUF(1))<>" "                                            10110000
      THEN                                                              10115000
       BEGIN                                                            10120000
        B:=(IF !30<=A<=!39 THEN B ELSE 1);                              10125000
        B:=(IF !30<=(C:=TEMPBUF(0))<=!39 THEN B ELSE 1);                10130000
       END                                                              10135000
      ELSE                                                              10140000
       B:=(IF !30<=(A:=TEMPBUF(0))<=!39 THEN B ELSE 1);                 10145000
                                                                        10150000
     A:=(A AND !F);                                                     10155000
     C:=(C AND !F)*10;                                                  10160000
     B:=(IF 1<=(A:=A+C)<=15 THEN B ELSE 1);                             10165000
     IF B THEN CRTOUT(MSG'OUT,-GET'MESSAGE(7));                         10170000
    END;                                                                10175000
                                                                        10180000
  <<------------------------------------------------------->>           10185000
  <<The following sets up the channel bit for use when comparing        10190000
     the results of a roll call, or when setting or clearing the        10195000
     interrupt mask etc.>>                                              10200000
  CHNLBIT:=(!8000) CSR (A);                                             10205000
  CHNL:=A CSL (3);                                                      10210000
  CHECKYTRAP; <<Check for operator interrupt request>>                  10215000
                                                                        10220000
  <<------------------------------------------------------->>           10225000
  <<The following checks for conflict in Channel numbers.>>             10230000
  IF CHNL=(CONSOLE AND !F8)                                             10235000
   THEN                                                                 10240000
    BEGIN                                                               10245000
     CRTOUT(MSG'OUT,-GET'MESSAGE(87));                                  10250000
     GO GET'CHANNEL;                                                    10255000
    END;                                                                10260000
  IF CHNL=(DISC AND !F8) OR CHNL=(PRINTER AND !F8)                      10265000
   THEN                                                                 10270000
    BEGIN                                                               10275000
     NUM'CHARS:=GET'MESSAGE(88);                                        10280000
     CRTOUT(MSG'OUT,-NUM'CHARS);                                        10285000
     IF CHNL=(PRINTER AND !F8)                                          10290000
      THEN                                                              10295000
       BEGIN                                                            10300000
        MOVE("Printer.") TO MSG'OUT(41);                                10305000
        CRTOUT(MSG'OUT,-NUM'CHARS);                                     10310000
       END;                                                             10315000
     DOPAUSE;                                                           10320000
    END;                                                                10325000
                                                                        10330000
  <<------------------------------------------------------->>           10335000
  <<The following determines whether or not the ADCC-Extended           10340000
     is present>>                                                       10345000
GET'EXTND:                                                              10350000
  IF DESIRED'DEV<=3                                                     10355000
   THEN                                                                 10360000
    BEGIN                                                               10365000
     PRINT(MSG'OUT,-GET'MESSAGE(6),%320);                               10370000
     READKBD(TEMPBUF,-2);                                               10375000
     CHECKYTRAP;                                                        10380000
     STARTIDLE;                                                         10385000
     IF (TEMPBUF(0) AND !DF)="Y"                                        10390000
      THEN                                                              10395000
       EXTND:=TRUE                                                      10400000
      ELSE                                                              10405000
       IF (TEMPBUF(0) AND !DF)="N"                                      10410000
        THEN                                                            10415000
         EXTND:=FALSE                                                   10420000
        ELSE                                                            10425000
         GO GET'EXTND;                                                  10430000
     IF MAX'DEV=-1                                                      10435000
      THEN <<Not initialized>>                                          10440000
       BEGIN                                                            10445000
        MAX'DEV:=(IF EXTND THEN 7 ELSE 3);                              10450000
       END;                                                             10455000
     IF NOT EXTND AND MAX'DEV>=4 THEN MAX'DEV:=3;                       10460000
     CHECKYTRAP; <<Check for operator interrupt request>>               10465000
    END;                                                                10470000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC     SECTION ONE"                        10475000
TS0: <<Begin execution of diagnostic here>>                             10480000
IF SECTION(1) THEN BEGIN                                                10485000
                                                                        10490000
  COMMENT                                                               10495000
  SECTION 1   -   Roll call and Register 2,14 reads                     10500000
        Places the command decode logic, the channel recognition        10505000
        logic, the global response logic, the register decoding         10510000
        logic and the handshake control logic under test.               10515000
        Register 2                                                      10520000
  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+     10525000
  | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |     10530000
  |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|     10535000
  | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |   | 0 | 1 | 0 | 1 | 0 |     10540000
  +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+     10545000
      Bit 0              - The 'OR' of the other bits in this           10550000
                           word.                                        10555000
                                                                        10560000
      Bits 1-9           - These bits have no meaning on an             10565000
                           ADCC, but defined as all zeroes for          10570000
                      use by the channel program microcode.             10575000
                                                                        10580000
      Bit 10             - Poll response.  This bit will be set         10585000
                           to a one whenever the ADCC asserts           10590000
                           CSRQ on the IMB.                             10595000
                                                                        10600000
      Bits 11-15         - These bits have no meaning on an             10605000
                           ADCC, but are defined as !A for use          10610000
                           by the channel program microcode.            10615000
        Register 14                                                     10620000
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+      10625000
 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |10 |11 |12 |13 |14 |15 |      10630000
 |---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|      10635000
 | 1 | 0 |   | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |   | 0 | 0 | 0 | 1 |      10640000
 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+      10645000
      Bit 0                        -   always a one on an ADCC          10650000
                                                                        10655000
      Bit 1   AMIGO/HYBRID         -   always a zero on an ADCC         10660000
                                                                        10665000
      Bit 2   CPU/CPP              -   zero if the processor select     10670000
                                       switch is set to the 'CPU'       10675000
                                       position, one if it is set       10680000
                                       to the 'CPP' position.           10685000
                                                                        10690000
      Bits 12 thru 15 CHANNEL TYPE -   these bits indicate that the     10695000
                                       channel is an ADCC.  (a CIC      10700000
                                       returns a zero in this           10705000
                                       nibble);                         10710000
$PAGE                                                                   10715000
 <<- STEP 1      -      Roll Call  (ROCL)                               10720000
                                                                        10725000
       The ability of the ADCC under test to respond to the global      10730000
       I/O instruction ROCL is tested.  A ROCL is issued, and the       10735000
       resulting retuned word is tested to verify that the bit          10740000
       which corresponds to the ADCC channel number is set to a         10745000
       one.>>                                                           10750000
                                                                        10755000
     STP:=1;                                                            10760000
     ROLLCALL;                                                          10765000
     IF (TOS' AND CHNLBIT)<>CHNLBIT                                     10770000
      THEN                                                              10775000
       BEGIN                                                            10780000
        ERROROUT(-GET'MESSAGE(10),0);                                   10785000
        GO GET'CHANNEL; <<Don't continue this way.>>                    10790000
       END;                                                             10795000
                                                                        10800000
  <<- STEP 2      -      Read Register 2                                10805000
                                                                        10810000
      The ability of the ADCC under test to return the correct          10815000
      value in response to a Register 2 read is verified.  A            10820000
      register 2 read is issued, and the value of the resulting         10825000
      returned word is verified to be !800A, the expected value         10830000
      of register 2 at this time.  A further test of this register      10835000
      is done in Section eleven.>>                                      10840000
                                                                        10845000
     STP:=2;                                                            10850000
     READREG(2);                                                        10855000
                                                                        10860000
     IF TOS'<>!800A THEN BEGIN                                          10865000
        NUM'CHARS:=GET'MESSAGE(11);                                     10870000
        NUM2ASC(20,4,16,TOS');                                          10875000
        ERROROUT(-NUM'CHARS,0);                                         10880000
        END;                                                            10885000
                                                                        10890000
 <<- STEP 3      -      Channel Configuration Register 'CPP'            10895000
                                                                        10900000
        The contents of Register 14 are read and the sense of           10905000
        bit 2 is tested.  If the sense of bit 2 is one, indicating      10910000
        that the ADCC is using the CPP, the operator is asked to        10915000
        set the processor select switch to the CPU position.            10920000
        There is a message displayed as a reminder to reset this        10925000
        switch at the end of the diagnostic.>>                          10930000
                                                                        10935000
     STP:=3;                                                            10940000
     READREG(14);                                                       10945000
     IF TOS'.(2:1) THEN BEGIN                                           10950000
        CRTOUT(MSG'OUT,-GET'MESSAGE(13));                               10955000
 DOPAUSE;                                                               10960000
        END;                                                            10965000
$PAGE                                                                   10970000
  <<- STEP 4      -      Channel Configuration Register - CPU           10975000
                                                                        10980000
      The value of Register 14 is read, and the returned word           10985000
      is verified to be !80n1.>>                                        10990000
                                                                        10995000
     STP:=4;                                                            11000000
     READREG(14);                                                       11005000
 A:=INTEGER(IF NOT EXTND THEN !8001 ELSE !8011);                        11010000
     IF TOS'<>A THEN BEGIN                                              11015000
        NUM'CHARS:=GET'MESSAGE(12);                                     11020000
        NUM2ASC(21,4,16,TOS');                                          11025000
        NUM2ASC(36,4,16,A);                                             11030000
        ERROROUT(-NUM'CHARS,0);                                         11035000
        END;                                                            11040000
                                                                        11045000
  REP'ILL'INT;                                                          11050000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        11055000
END;                                                                    11060000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC      SECTION TWO"                       11065000
IF SECTION(2) THEN BEGIN                                                11070000
                                                                        11075000
   <<SECTION 2   -   OBII, OBSI and INTERRUPTS                          11080000
                                                                        11085000
     Section two places the interrupt queue, priority encoding,         11090000
     interrupt mask and the global response logic function blocks       11095000
     under test.>>                                                      11100000
                                                                        11105000
                                                                        11110000
     LOAD'TRAPS; <<Load up the interrupt trap addresses in DRT>>        11115000
     CLEAR'UNX'IRQ;                                                     11120000
                                                                        11125000
  <<- STEP 5      -      Obtain Interrupt Information (OBII)            11130000
                                                                        11135000
           OBII is a command issued by the interrupt processing         11140000
           micro-code.  Step 5 issues a register 0 read with a          11145000
           special command code to emulate OBII.  The resulting         11150000
           returned word, bits 9 thru 12 are verified to contain        11155000
           the value of the channel address of the ADCC under           11160000
           test.>>                                                      11165000
                                                                        11170000
     STP:=5;                                                            11175000
     OBII; <<ISSUE OBII>>                                               11180000
     IF TOS'.(9:4)<>CHNL.(9:4) THEN BEGIN                               11185000
        NUM'CHARS:=GET'MESSAGE(14);                                     11190000
        MSG'OUT(2):="I";                                                11195000
        NUM2ASC(14,2,10,TOS'.(9:4));                                    11200000
        NUM2ASC(26,2,10,CHNL.(9:4));                                    11205000
        ERROROUT(-NUM'CHARS,0);                                         11210000
        END;                                                            11215000
                                                                        11220000
                                                                        11225000
  <<- STEP 6      -      Obtain Service Information (OBSI)              11230000
                                                                        11235000
           OBSI is a command issued by the channel service process      11240000
           micro-code.  Step 6 issues a register 0 read with a          11245000
           speical command code to emulate OBSI.  The resulting         11250000
           returned word, bits 9 thru 12 are verified to contain        11255000
           the value of the channel address of the ADCC under           11260000
           test.>>                                                      11265000
                                                                        11270000
     STP:=6;                                                            11275000
     OBSI;     <<ISSUE OBSI>>                                           11280000
     IF TOS'.(9:4)<>CHNL.(9:4) THEN BEGIN                               11285000
        NUM'CHARS:=GET'MESSAGE(14);                                     11290000
        MSG'OUT(2):="S";                                                11295000
        NUM2ASC(14,2,10,TOS'.(9:4));                                    11300000
        NUM2ASC(26,2,10,CHNL.(9:4));                                    11305000
        ERROROUT(-NUM'CHARS,0);                                         11310000
        END;                                                            11315000
$PAGE                                                                   11320000
  <<- STEP 7      -      Interrupt Queue - cleared by INIT              11325000
                                                                        11330000
           Because the interrupt queue may be in a random state         11335000
           initially, an INIT is issued followed by a software          11340000
           equivalent OBII.  The resulting returned word is then        11345000
           verified to be the value of the channel address in bits      11350000
           9 thru 12, and a seven (the default case when no             11355000
           interrupts are queued) in bits 13,14,15.>>                   11360000
                                                                        11365000
     STP:=7;    <<Interrupt queue - cleared by INIT>>                   11370000
     CHNL'INIT;                                                         11375000
     OBII;                                                              11380000
     IF TOS'.(13:3)<>7 THEN ERROROUT(-GET'MESSAGE(15),0);               11385000
                                                                        11390000
  <<- STEP 8       -      Interrupt Queue                               11395000
                                                                        11400000
           The interrupt queue for all eight device numbers is          11405000
           present on the ADCC-Main, so all eight are tested            11410000
           regardless of the absence of the ADCC-Extended.  An          11415000
           interrupt is queued by a write to register 12 with           11420000
           bit 12 set to a one, and the device number of the device     11425000
           to be queued in bits 13,14,15.  The test sequence is, all    11430000
           devices are queued (then OBII is issued to check bits        11435000
           13,14,15 of the returned byte) one at a time 0 thru 7.>>     11440000
                                                                        11445000
     STP:=8;                                                            11450000
     SETMASK;                                                           11455000
 DEV:=-1;                                                               11460000
 WHILE (DEV:=DEV+1)<8 DO BEGIN                                          11465000
                                                                        11470000
     CLEAR'UNX'IRQ;     <<CLEAR UNEXPECTED INTERRUPT HOLDER>>           11475000
                                                                        11480000
     TOS':=!8+DEV;                                                      11485000
 WRITEREG(12);                                                          11490000
     OBII;                                                              11495000
     IF TOS'.(13:3)<>DEV THEN BEGIN                                     11500000
        NUM'CHARS:=GET'MESSAGE(16);                                     11505000
        MSG'OUT(19):=TOS'.(13:3)+!30;                                   11510000
        MSG'OUT(30):=DEV+!30;                                           11515000
        ERROROUT(-NUM'CHARS,0);                                         11520000
        END;                                                            11525000
                                                                        11530000
     REP'ILL'INT; <<Check for unexpected interrupt occurance>>          11535000
     TOS':=DEV; <<Unqueue>>                                             11540000
     WRITEREG(12);     <<interrupts>>                                   11545000
     END; <<for next test>>                                             11550000
     CLEARMASK; <<And then clear the mask bit>>                         11555000
                                                                        11560000
  <<- STEP 9      -      Interrupt Queue cleared by INIT                11565000
                                                                        11570000
           Assured by Step 7 that the interrupt queue is not in a       11575000
           random state, it is now necessary to insure that INIT will   11580000
           indeed set the Interrupt Queue to the default condition (all 11585000
           zeroes in the queue, but inverted when read by the priority  11590000
           encoder).  An interrupt for device 0 is queued, then an INIT 11595000
           is issued and OBII used to verify bits 13,14,15 are reset    11600000
           to all ones.>>                                               11605000
                                                                        11610000
     STP:=9;                                                            11615000
     TOS':=!8; <<Device 0 and the set bit>>                             11620000
     WRITEREG(12); <<Queue interrupt for device 0>>                     11625000
     CHNL'INIT; <<Initialize the channel>>                              11630000
     OBII; <<Now read and test the interrupt queue>>                    11635000
     IF TOS'.(13:3)<>7 THEN ERROROUT(-GET'MESSAGE(15),0);               11640000
                                                                        11645000
 << - STEP 10     -      Queued Interrupts and IRQ                      11650000
                                                                        11655000
      Being assured by Step 8 that interrupts can be queued,            11660000
      Step 10 sets the interrupt mask bit for the ADCC under test       11665000
      and allows external interrupts with the execution of an ION       11670000
      instruction.  A short wait loop is employed to allow the          11675000
      CPU to process the expected IRQ, then the program verifies        11680000
      that the interrupt was requested by the ADCC under test.          11685000
                                                                        11690000
      Two error conditions are possible as a result of Step 10,         11695000
      no interrupt occurred, or an unexpected device was the            11700000
      cause of the interrupt.>>                                         11705000
                                                                        11710000
     STP:=10;                                                           11715000
     DEV:=-1;                                                           11720000
     WHILE (DEV:=DEV+1)<8                                               11725000
      DO                                                                11730000
       BEGIN <<Make device under test loop>>                            11735000
        SETUP'DRT(DEV);                                                 11740000
        CLEARIRQ; <<Clear out the IRQ save word>>                       11745000
        CLEAR'UNX'IRQ; <<Clear the unexp int. word>>                    11750000
        INTPSYS'ON; <<Allow external interrupts>>                       11755000
        TOS':=!8+DEV; <<Device number + set bit>>                       11760000
        WRITEREG(12); <<Queue interrupt this device>>                   11765000
        A:=(!7FFF) CSR (DEV); <<Make compare word>>                     11770000
        B:=(!8000) CSR (DEV); <<Make another compare word>>             11775000
        DODELAY(STARTIME,10);                                           11780000
        GETIRQ;                                                         11785000
        IF IRQ'=B THEN ERROROUT(-GET'MESSAGE(82),1);                    11790000
        SETMASK;                                                        11795000
        DODELAY(STARTIME,10); <<Short wait>>                            11800000
        INTPSYS'OFF; <<disallow external interrupts>>                   11805000
        CLEARMASK; <<Mask bit for this channel off>>                    11810000
        GETIRQ; <<Get the IRQ word>>                                    11815000
        IF (A AND IRQ')<>0                                              11820000
         THEN                                                           11825000
          BEGIN    <<Check unexpected intps>>                           11830000
           NUM'CHARS:=GET'MESSAGE(18);                                  11835000
           MSG'OUT(33):=DEV+!30;                                        11840000
           ERROROUT(-NUM'CHARS,0);                                      11845000
          END;                                                          11850000
                                                                        11855000
        IF IRQ'<>B                                                      11860000
         THEN                                                           11865000
          BEGIN                                                         11870000
           NUM'CHARS:=GET'MESSAGE(17);                                  11875000
           MSG'OUT(14):=!30+DEV;                                        11880000
           ERROROUT(-NUM'CHARS,0);                                      11885000
          END;                                                          11890000
                                                                        11895000
        REP'ILL'INT;     <<Check for unexpected interrupts>>            11900000
        TOS':=DEV; <<Now unqueue interrupt for>>                        11905000
        WRITEREG(12); <<device number under test>>                      11910000
       END; <<Do for all eight devices>>                                11915000
  <<- STEP 11     -     Priority Encoder                                11920000
                                                                        11925000
   The priority encoder is tested by queuing interrupts for             11930000
   all devices, OBII is then used to insure that the correct            11935000
   device has priority in the queue, holding off interrupts             11940000
   from lower priority devices.  The highest priority device is         11945000
   then removed from the interrupt queue, and the next highest          11950000
   priority device is tested.  The step is completed when all           11955000
   all eight device numbers are tested.>>                               11960000
                                                                        11965000
    STP:=11;                                                            11970000
 DEV:=-1;                                                               11975000
 WHILE (DEV:=DEV+1)<8 DO BEGIN                                          11980000
     TOS':=!8+DEV;                                                      11985000
 WRITEREG(12); <<Queue all 8 devices>>                                  11990000
     END;                                                               11995000
                                                                        12000000
 DEV:=-1;                                                               12005000
 WHILE (DEV:=DEV+1)<8 DO BEGIN                                          12010000
     OBII; <<Issue OBII>>                                               12015000
     IF TOS'.(13:3)<>DEV.(13:3) THEN BEGIN                              12020000
        NUM'CHARS:=GET'MESSAGE(19);                                     12025000
        MSG'OUT(48):=TOS'.(13:3) + !30;                                 12030000
        MSG'OUT(7):=DEV + !30;                                          12035000
        ERROROUT(-NUM'CHARS,0);                                         12040000
        END;                                                            12045000
                                                                        12050000
     TOS':=DEV;                                                         12055000
 WRITEREG(12); <<Unqueue this device>>                                  12060000
     END;                                                               12065000
                                                                        12070000
  REP'ILL'INT;                                                          12075000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        12080000
END;                                                                    12085000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC      SECTION THREE"                     12090000
IF SECTION(3) THEN BEGIN                                                12095000
                                                                        12100000
  <<SECTION 3  -  Channel Address Recognition                           12105000
                                                                        12110000
 Section three gives a more extensive test of the Channel               12115000
 Address recognition logic than Section 1, and places a subset          12120000
 of the interrupt queue, device address latches, priority encoding      12125000
 and interrupt mask under test.  This Section is directed at            12130000
 the case of one channel responding to a Roll Call, Interrupt Poll      12135000
 or Service Poll as more than one channel.                              12140000
                                                                        12145000
 - STEP 12     -                                                        12150000
                                                                        12155000
  A test is made by queueing an interrupt, and enabling the             12160000
  mask for only the channel number under test, keeping the              12165000
  external interrupt system off.  An IPOLL at this time should          12170000
  return only the channel number of the ADCC under test.>>              12175000
                                                                        12180000
     STP:=12;                                                           12185000
     INTPSYS'OFF; <<Disallow external interrupts>>                      12190000
     SETMASK; <<Set mask for ADCC under test>>                          12195000
     TOS':=!8; <<Queue interrupt>>                                      12200000
     WRITEREG(12); <<for device 0>>                                     12205000
                                                                        12210000
     IPOLL; <<Poll channels>>                                           12215000
     IF TOS'<>CHNLBIT THEN BEGIN                                        12220000
        NUM'CHARS:=GET'MESSAGE(20);                                     12225000
        NUM2ASC(15,4,16,TOS');                                          12230000
        NUM2ASC(30,4,16,CHNLBIT);                                       12235000
        ERROROUT(-NUM'CHARS,0);                                         12240000
        END;                                                            12245000
                                                                        12250000
  CLEAR'UNX'DEV;                                                        12255000
  REP'ILL'INT;                                                          12260000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        12265000
END;                                                                    12270000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC     SECTION FOUR"                       12275000
IF SECTION(4) THEN BEGIN                                                12280000
                                                                        12285000
 <<SECTION 4  -  Register 1 thru 15 integrity                           12290000
                                                                        12295000
   Section 4 places the register decoding logic under test by           12300000
   verifying that registers 1, 3 thru 13 and 15 return all zeros as     12305000
   the result of a register read, and then verifies that write to       12310000
   any register 1 thru 15 will not alter contents of any register.>>    12315000
                                                                        12320000
 <<- STEP 13     -     Registers 1, 3 thru 13 and 15 return zeros       12325000
                                                                        12330000
   Registers 1, 3 thru 13 and 15 are read, and the returned             12335000
   words verified to be zero.  (Registers 2 and 14 were                 12340000
   previously tested for correct value in Section 1)>>                  12345000
                                                                        12350000
     STP:=13;                                                           12355000
     CHNL'INIT;                                                         12360000
    CLEARMASK;                                                          12365000
   DEV:=DESIRED'DEV-1;                                                  12370000
   WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                                 12375000
      DO'WIOC0(!4040+DEV); <<Address Device under test>>                12380000
     LA:=0;                                                             12385000
     WHILE (LA:=LA+1)<16 DO BEGIN                                       12390000
        READREG(LA); <<Read register LA>>                               12395000
        IF LA<>2 AND LA<>14 THEN BEGIN                                  12400000
           IF TOS'<>0 THEN BEGIN                                        12405000
           NUM'CHARS:=GET'MESSAGE(21);                                  12410000
           MOVE (!20,!20) TO MSG'OUT(9);                                12415000
           NUM2ASC(9,2,10,LA);                                          12420000
           NUM2ASC(22,4,16,TOS');                                       12425000
           ERROROUT(-NUM'CHARS,1);                                      12430000
           END;                                                         12435000
           END;                                                         12440000
                                                                        12445000
     B:=(IF LA=2 THEN TOS' ELSE B);                                     12450000
     C:=(IF LA=14 THEN TOS' ELSE C);                                    12455000
     END; <<Next register number>>                                      12460000
     END; <<Next device number>>                                        12465000
$PAGE                                                                   12470000
 <<- STEP 14     -      Registers affected by write register            12475000
                                                                        12480000
   An all ones pattern is written into each register 1 thru 15.         12485000
   After each write, all registers 1 thru 15 are read, and the          12490000
   returned values tested to verify that the contents are               12495000
   unaffected by the write.                                             12500000
                                                                        12505000
   Note that the all ones write into Register 12 will queue             12510000
   an interrupt, but the interrupt will not be processed                12515000
   because external interrupts are disallowed at this time.             12520000
   The queued interrupt will be cleared at the end of this              12525000
   step.>>                                                              12530000
                                                                        12535000
     STP:=14;                                                           12540000
 DEV:=DESIRED'DEV-1;                                                    12545000
 WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                                   12550000
     LA:=0;                                                             12555000
     WHILE (LA:=LA+1)<16 DO BEGIN                                       12560000
     TOS':=TRUE; <<Write an all ones pattern>>                          12565000
     WRITEREG(LA); <<to register (LA)>>                                 12570000
                                                                        12575000
     D:=0;                                                              12580000
     WHILE (D:=D+1)<16 DO BEGIN                                         12585000
     DO'WIOC0(!4040+DEV); <<Address Device under test>>                 12590000
     E:=0;                                                              12595000
     READREG(D);                                                        12600000
     IF D<>2 AND D<>14 THEN E:=(IF TOS'=0 THEN E ELSE -1);              12605000
     IF D=2 THEN E:=(IF TOS'=B THEN E ELSE -1);                         12610000
     IF D =14 THEN E:=(IF TOS'=C THEN E ELSE -1);                       12615000
                                                                        12620000
     IF E THEN BEGIN                                                    12625000
        NUM'CHARS:=GET'MESSAGE(22);                                     12630000
        NUM2ASC(18,2,10,LA);                                            12635000
        NUM2ASC(38,2,10,D);                                             12640000
        ERROROUT(-NUM'CHARS,1);                                         12645000
        END;                                                            12650000
                                                                        12655000
     END; <<Read next register>>                                        12660000
     END; <<Write next register>>                                       12665000
     END; <<Do next device number>>                                     12670000
   CHNL'INIT;                                                           12675000
  CLEAR'UNX'DEV;                                                        12680000
  REP'ILL'INT;                                                          12685000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        12690000
END;                                                                    12695000
$PAGE"ADCDIAG3  ADCC DIAGNOSTIC     SECTION FIVE"                       12700000
IF SECTION(5)                                                           12705000
 THEN                                                                   12710000
  BEGIN                                                                 12715000
                                                                        12720000
 <<SECTION 5   -   Baud Rate Clock and UARTS                            12725000
                                                                        12730000
  Step 15 verifies correct operation of the Baud Rate Clock             12735000
  logic, the device address latches logic and a subset of               12740000
  the UART logic.>>                                                     12745000
                                                                        12750000
 <<Each device is individually initialized to transmit and              12755000
   receive a test byte at the various baud rates shown in               12760000
   figure 5.4  A test byte (!55) is transmitted, and the program        12765000
   waits approximately 300 milliseconds to allow the looped-back        12770000
   test byte to be received by the UART.  The UART's receive            12775000
   buffer is read, and the contents are verified to be !55.             12780000
   (the value of the byte transmitted)  The test connector shown        12785000
   in part by figure 4.3, on the J2 edge connector, provides            12790000
   the data paths required to loop the UART's output to it's            12795000
   input.                                                               12800000
                                                                        12805000
   Once it has been established that the UART is capable of             12810000
   transmitting and receiving data, test byte characters with           12815000
   various bit patterns are transmitted, received and verified          12820000
   allowing between transmit and receive, a delay time                  12825000
   sufficient for one character.  The test bytes used are 0,!55,        12830000
   !AA and !CC.>>                                                       12835000
                                                                        12840000
   STP:=15;                                                             12845000
   CLEARMASK;                                                           12850000
   CHNL'INIT;                                                           12855000
   DEV:=DESIRED'DEV-1;                                                  12860000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          12865000
    DO                                                                  12870000
     BEGIN                                                              12875000
      DO'WIOC0(!4040+DEV); <<Address device under test>>                12880000
      DO'WIOC0(!4061); <<Send modifier one>>                            12885000
      DO'WIOC0(!DE); <<UART control byte>>                              12890000
      BAUD:=1;                                                          12895000
      WHILE (BAUD:=BAUD+1)<!10                                          12900000
       DO                                                               12905000
        BEGIN                                                           12910000
         DO'WIOC0(!4066); <<Send Baud Rate Modifier>>                   12915000
         DO'WIOC0(BAUD); <<Send transmit baud rate>>                    12920000
         DO'WIOC0(BAUD+!10); <<Send receive baud rate>>                 12925000
         DO'WIOC0(!4060); <<Send modifier zero>>                        12930000
         DO'WIOC0(!55); <<Send test byte to UART>>                      12935000
         DODELAY(STARTIME,300); <<Wait ~ 300 msec>>                     12940000
         DO'RIOC0; <<Read UART receive buffer>>                         12945000
         IF TOS'.(8:8)<>!55                                             12950000
          THEN                                                          12955000
           BEGIN                                                        12960000
            C:=3;                                                       12965000
            C:=(IF 7<=BAUD<=12 THEN 4 ELSE C);                          12970000
            C:=(IF 2<=BAUD<=3 THEN 2 ELSE C);                           12975000
            NUM'CHARS:=GET'MESSAGE(27)-1;                               12980000
            NUM'CHARS:=(IF 7<=BAUD<=12                                  12985000
                         THEN NUM'CHARS+1                               12990000
                         ELSE NUM'CHARS);                               12995000
            NUM'CHARS:=(IF 2<=BAUD<=3                                   13000000
                         THEN NUM'CHARS-1                               13005000
                         ELSE NUM'CHARS);                               13010000
            NUM'CHARS:=(IF BAUD=4                                       13015000
                         THEN NUM'CHARS+1                               13020000
                         ELSE NUM'CHARS);                               13025000
            MOVE (!20,!20,!20,!20,!20) TO MSG'OUT(39);                  13030000
            NUM2ASC(39,C,10,BAUDS(BAUD));                               13035000
            IF BAUD=4 THEN MOVE (".5") TO MSG'OUT(42);                  13040000
            ERROROUT(-NUM'CHARS,1);                                     13045000
           END;                                                         13050000
                                                                        13055000
         B:=-1;                                                         13060000
         WHILE (B:=B+1)<4                                               13065000
          DO                                                            13070000
           BEGIN                                                        13075000
            DO'WIOC0(BAUDARRAY(B)); <<Write the test byte>>             13080000
            DODELAY(STARTIME,DELAYBUF(BAUD)); <<Wait time, this baud>>  13085000
            DO'RIOC0; <<Read the UART receive buffer>>                  13090000
            IF TOS'.(8:8)<>BAUDARRAY(B).(8:8)                           13095000
             THEN                                                       13100000
              BEGIN                                                     13105000
               C:=3;                                                    13110000
               C:=(IF 7<=BAUD<=12 THEN 4 ELSE C);                       13115000
               C:=(IF 2<=BAUD<=3 THEN 2 ELSE C);                        13120000
               NUM'CHARS:=GET'MESSAGE(26)-2;                            13125000
               NUM'CHARS:=(IF 7<=BAUD<=12                               13130000
                            THEN NUM'CHARS+1                            13135000
                            ELSE NUM'CHARS);                            13140000
               NUM'CHARS:=(IF 2<=BAUD<=3                                13145000
                            THEN NUM'CHARS-1                            13150000
                            ELSE NUM'CHARS);                            13155000
               NUM'CHARS:=(IF BAUD=4                                    13160000
                            THEN NUM'CHARS+2                            13165000
                            ELSE NUM'CHARS);                            13170000
               MOVE (!20,!20,!20,!20,!20) TO MSG'OUT(47);               13175000
               NUM2ASC(25,2,16,BAUDARRAY(B));                           13180000
               NUM2ASC(38,2,16,TOS'.(8:8));                             13185000
               NUM2ASC(47,C,10,BAUDS(BAUD));                            13190000
               IF BAUD=4 THEN MOVE (".5") TO MSG'OUT(50);               13195000
               NUM2ASC(14,2,16,!DE);                                    13200000
               ERROROUT(-NUM'CHARS,1);                                  13205000
              END;                                                      13210000
           END; <<DO NEXT CHARACTER IN BAUDARRAY>>                      13215000
         DOT; <<Check ATTN/CNTL Y then print `period'>>                 13220000
        END; <<DO NEXT BAUD RATE>>                                      13225000
                                                                        13230000
 <<UART MASTER RESET test>>                                             13235000
      DO'WIOC0(!4040+DEV); <<Address device under test>>                13240000
      DO'WIOC0(!4061); <<Send modifier one>>                            13245000
      DO'WIOC0(!DE); <<UART control byte>>                              13250000
      DO'WIOC0(!4060); <<Send modifier zero>>                           13255000
      DO'RIOC0; <<Read UART receive buffer>>                            13260000
      IF TOS'.(8:8)<>0 THEN ERROROUT(-GET'MESSAGE(83),1);               13265000
                                                                        13270000
     END; <<DO NEXT DEVICE NUMBER>>                                     13275000
  CLEAR'UNX'DEV;                                                        13280000
  REP'ILL'INT;                                                          13285000
  END;                                                                  13290000
$PAGE"ADCDIAG4  ADCC DIAGNOSTIC      SECTION SIX"                       13295000
IF SECTION(6) THEN BEGIN                                                13300000
                                                                        13305000
 <<SECTION 6   -   Special Character Detection                          13310000
                                                                        13315000
     This Section verifies correct operation of the Special             13320000
     Character Detection logic.  Note that although the function        13325000
     under test is special character detection, the command decoding,   13330000
     channel address recognition, device address latch, baud rate       13335000
     clock and UART logic functions must all work.>>                    13340000
                                                                        13345000
 <<- STEP 16      -      Clear Special Character RAM                    13350000
                                                                        13355000
           Bytes written with a modifier 4 are removed from the device's13360000
           list of special characters.  All 256 special character RAM   13365000
           addresses (for each device) are cleared.  This is done       13370000
           with a modifier 4 write (to each device on the ADCC) with all13375000
           data bytes 0-255.  Then a modifier 0 write is performed      13380000
           for all data bytes 0-255.  Following each modifier 0 write,  13385000
           the loop-back path described in in Section 5 is used to      13390000
           transmit and received the character.  Each test byte is then 13395000
           read and verified to have no special character tag appended. 13400000
                                                                        13405000
           The step is complete when all addresses of the special       13410000
           character RAM (all data bytes 0-255) for each device         13415000
           have been tested.                                            13420000
                                                                        13425000
           There are two possible error conditions in this step.  The   13430000
           test byte received by the UART does not match the test       13435000
           byte transmitted, or the test byte was incorrectly tagged    13440000
           as a special character.                                      13445000
                                                                        13450000
           Please note Section 13 is the Extended Special               13455000
           Character RAM Test.  The time required to further test       13460000
           crosstalk, interference, etc in the special character        13465000
           ram is several minutes per board.  If an                     13470000
           interference problem is suspected, the operator must         13475000
           specifically select Section 13, otherwise, it                13480000
           will NOT be executed.                                        13485000
$PAGE"ADCDIAG4  ADCC DIAGNOSTIC      SECTION SIX"                       13490000
                                                                        13495000
     - STEP 17      -      Set Special Character RAM                    13500000
                                                                        13505000
           Bytes written with a modifier 5 are tagged by a device       13510000
           on the ADCC as a special character.  All 256 special         13515000
           character RAM addresses (for each device) are set to         13520000
           one.  This is accomplished by a modifier 5 write for         13525000
           all data bytes 0-255.  The test method is the same as        13530000
           is described in Step 16, except that each received test      13535000
           byte is verified to have the special character tag           13540000
           appended.                                                    13545000
                                                                        13550000
           Step 17 is complete when all addresses of the special        13555000
           character ram space for all devices present on the           13560000
           ADCC have been tested.  As in Step 16, there are two         13565000
           possible error conditions.  The wrong character is           13570000
           received or the character was not tagged as a special        13575000
           character.>>                                                 13580000
                                                                        13585000
  STP:=16;                                                              13590000
   DEV:=DESIRED'DEV-1;                                                  13595000
   WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                                 13600000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 13605000
     DO'WIOC0(!4061); <<Send UART modifier>>                            13610000
     DO'WIOC0(!DE); <<Send UART setup byte>>                            13615000
     DO'WIOC0(!4066); <<Send baud rate modifier>>                       13620000
     DO'WIOC0(!8); <<Send transmit baud rate>>                          13625000
     DO'WIOC0(!18); <<Send receive baud rate>>                          13630000
                                                                        13635000
     M:=!4063;                                                          13640000
     WHILE (M:=M+1)<!4066 DO BEGIN                                      13645000
     STP:=(IF M=!4064 THEN 16 ELSE 17);                                 13650000
     K:=(IF M=!4064 THEN 0 ELSE !4000);                                 13655000
     DO'WIOC0(M); <<Send set/clear modifier>>                           13660000
     A:=-1;                                                             13665000
     WHILE (A:=A+1)<=255 DO BEGIN                                       13670000
     DO'WIOC0(A); <<Write set/clear address>>                           13675000
     END; <<Do all address/this dev>>                                   13680000
                                                                        13685000
     DO'WIOC0(!4060); <<Send modifier zero>>                            13690000
     A:=-1;                                                             13695000
     WHILE (A:=A+1)<=255 DO BEGIN                                       13700000
     DO'WIOC0(A); <<Write test byte>>                                   13705000
     DODELAY(STARTIME,2); <<9600 Baud wait loop>>                       13710000
     DO'RIOC0; <<Now read byte back>>                                   13715000
     IF TOS'.(8:8)<>A.(8:8) THEN BEGIN                                  13720000
        NUM'CHARS:=GET'MESSAGE(23);                                     13725000
        NUM2ASC(40,2,16,TOS'.(8:8));                                    13730000
        NUM2ASC(26,2,16,A.(8:8));                                       13735000
        ERROROUT(-NUM'CHARS,1);                                         13740000
        END;                                                            13745000
                                                                        13750000
     IF (TOS' AND !7F00)<>K THEN BEGIN                                  13755000
     IF M=!4064 THEN BEGIN                                              13760000
        NUM'CHARS:=GET'MESSAGE(24);                                     13765000
        NUM2ASC(1,2,16,TOS'.(8:8));                                     13770000
        ERROROUT(-NUM'CHARS,1);                                         13775000
        END ELSE BEGIN                                                  13780000
        NUM'CHARS:=GET'MESSAGE(25);                                     13785000
        NUM2ASC(1,2,16,TOS'.(8:8));                                     13790000
        ERROROUT(-NUM'CHARS,1);                                         13795000
        END;                                                            13800000
        END;                                                            13805000
                                                                        13810000
     END; <<Do next test character>>                                    13815000
                                                                        13820000
     END; <<Do next mod 5/6>>                                           13825000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        13830000
     END; <<Do next device number>>                                     13835000
  CLEAR'UNX'DEV;                                                        13840000
  REP'ILL'INT;                                                          13845000
END;                                                                    13850000
$PAGE"ADCDIAG4  ADCC DIAGNOSTIC      SECTION SEVEN"                     13855000
IF SECTION(7) THEN BEGIN                                                13860000
                                                                        13865000
 <<SECTION 7  -  Device Specified Jump  (DSJ)                           13870000
                                                                        13875000
     This Section places under test, the device specified jump          13880000
     logic, a part of the UART's control and status logic and the       13885000
     break detection logic.  It verifies the ability of the DSJ         13890000
     logic to return the correct value to the CPU according to the      13895000
     applied stimulus.  The test is run on all device numbers present   13900000
     on the ADCC.                                                       13905000
                                                                        13910000
     A zero is returned if the ADCC is requesting service because the   13915000
     UART receive buffer of the device under test contains a character  13920000
     which may be read.                                                 13925000
                                                                        13930000
     A one is returned if the ADCC is requesting service because the    13935000
     UART transmit buffer of the device under test may be loaded with   13940000
     a character to be transmitted.                                     13945000
                                                                        13950000
     A two is returned if the ADCC device status should be read.(In     13955000
     case of an overrun or parity error, or a modem status line has     13960000
     changed from reference.)                                           13965000
                                                                        13970000
     A three is returned if no device is requesting service.            13975000
     This test section also tests the ability of the ADCC to return     13980000
     the end (EOT) message when a break is detected, also the ability   13985000
     to return the transmit buffer empty (TBE) status bit for a         13990000
     modifier one read.>>                                               13995000
                                                                        14000000
                                                                        14005000
     STP:=18;                                                           14010000
     CHNL'INIT; <<Do initialize on this channel>>                       14015000
     DEV:=DESIRED'DEV-1;                                                14020000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14025000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             14030000
     DO'WIOC0(!4061); <<Send UART modifier>>                            14035000
     DO'WIOC0(!DE); <<Set up UART for this test>>                       14040000
     DO'WIOC0(!4066); <<Send baud rate select modifier>>                14045000
     DO'WIOC0(!8); <<Set to transmit at 9600 baud>>                     14050000
     DO'WIOC0(!18); <<Set to receive  at 9600 baud>>                    14055000
     DO'WIOC0(!4067);                                                   14060000
     DO'WIOC0(!0);                                                      14065000
     END; <<Do for all devices present>>                                14070000
                                                                        14075000
     DEV:=DESIRED'DEV-1;                                                14080000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14085000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             14090000
     DO'WIOC0(!4063); <<Send service condition mod.>>                   14095000
     DO'WIOC0(!6); <<Request for byte in buffer>>                       14100000
     DO'WIOC0(!4070); <<Issue DSJ command>>                             14105000
     DO'RIOC0; <<Read resulting byte>>                                  14110000
     IF TOS'.(8:8)<>3 THEN BEGIN                                        14115000
        NUM'CHARS:=GET'MESSAGE(28);                                     14120000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    14125000
        MSG'OUT(44):="3";                                               14130000
        ERROROUT(-NUM'CHARS,1);                                         14135000
        END;                                                            14140000
     END; <<Place the next device number under test>>                   14145000
         CHECKYTRAP; <<Check for operator interrupt request>>           14150000
                                                                        14155000
                                                                        14160000
 <<- STEP 19     -      Board is requesting service because the         14165000
                          receive buffer contains a character which     14170000
                          may be read.                                  14175000
                                                                        14180000
           Each device on the ADCC is set up to request service when    14185000
           a character has been received.  A character is then trans-   14190000
           mitted and received (using the loop back connector described 14195000
           in Section 2)  The DSJ is issued, and the returned           14200000
           byte is verified to be a zero.>>                             14205000
                                                                        14210000
     STP:=19;                                                           14215000
     DEV:=DESIRED'DEV-1;                                                14220000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14225000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 14230000
     DO'WIOC0(!4063); <<Service condition mod.>>                        14235000
     DO'WIOC0(!6); <<Request when byte received>>                       14240000
     DO'WIOC0(!4060); <<Send modifier zero>>                            14245000
     DO'WIOC0(!41); <<Send byte to transmit buffer>>                    14250000
     DODELAY(STARTIME,5); <<Short wait to receive byte>>                14255000
     DO'WIOC0(!4070); <<Issue the DSJ command>>                         14260000
     DO'RIOC0; <<Read the resulting DSJ byte>>                          14265000
     IF TOS'.(8:8)<>0 THEN BEGIN                                        14270000
        NUM'CHARS:=GET'MESSAGE(28);                                     14275000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    14280000
        MSG'OUT(44):="0";                                               14285000
        ERROROUT(-NUM'CHARS,1);                                         14290000
        END;                                                            14295000
     DO'WIOC0(!4060); <<Send modifier zero and>>                        14300000
     DO'RIOC0; <<read the byte in the buffer>>                          14305000
     END; <<Place the next device number under test>>                   14310000
         CHECKYTRAP; <<Check for operator interrupt request>>           14315000
                                                                        14320000
                                                                        14325000
                                                                        14330000
 <<- STEP 20     -      Board is requesting service because a           14335000
                          character may be loaded into the UART         14340000
                          transmit buffer.                              14345000
                                                                        14350000
           Each device on the ADCC is set up to request service when    14355000
           the transmit buffer is empty.  The DSJ is issued, and the    14360000
           returned byte is verified to be a one.>>                     14365000
                                                                        14370000
     STP:=20;                                                           14375000
     DEV:=DESIRED'DEV-1;                                                14380000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14385000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             14390000
     DO'WIOC0(!4063); <<Send service cond. modifier>>                   14395000
     DO'WIOC0(!2); <<NO request for byte received>>                     14400000
     DO'WIOC0(!4); <<Request for xmit buffer not full>>                 14405000
     DO'WIOC0(!4070); <<Send the DSJ command>>                          14410000
     DO'RIOC0; <<Read the DSJ byte>>                                    14415000
     IF TOS'.(8:8)<>1 THEN BEGIN                                        14420000
        NUM'CHARS:=GET'MESSAGE(28);                                     14425000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    14430000
        MSG'OUT(44):="1";                                               14435000
        ERROROUT(-NUM'CHARS,1);                                         14440000
        END;                                                            14445000
     END; <<Place the next device number under test>>                   14450000
                                                                        14455000
 <<- STEP 21     -      Board is requesting service - parity error      14460000
                                                                        14465000
           A parity error is induced by setting each device to transmit 14470000
           at 9600 baud and receive at 4800 baud.  A character (chosen  14475000
           to generate a parity error with this set up) is transmitted  14480000
           and received.  A UART status (modifier 1) read is done to    14485000
           verify the parity error is detected by the UART.  Then a     14490000
           DSJ is issued, and the resulting returned byte is verified   14495000
           to be a 2.>>                                                 14500000
                                                                        14505000
     STP:=21;                                                           14510000
     DEV:=DESIRED'DEV-1;                                                14515000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14520000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             14525000
     DO'WIOC0(!4061); <<Send UART control modifier>>                    14530000
     DO'WIOC0(!DE); <<Send control byte ..>>                            14535000
     DO'WIOC0(!4063); <<Send service cond. modifier>>                   14540000
     DO'WIOC0(!6); <<Request when byte received>>                       14545000
     DO'WIOC0(!4066); <<Send baud select modifier>>                     14550000
     DO'WIOC0(!8); <<Transmit at 9600 baud>>                            14555000
     DO'WIOC0(!19); <<Receive at 4800  baud>>                           14560000
     DO'WIOC0(!4060); <<Send modifier zero>>                            14565000
     DO'WIOC0(!E0); <<Send byte to cause parity error>>                 14570000
     DODELAY(STARTIME,5); <<Wait for byte to be received>>              14575000
     DO'WIOC0(!4061); <<Send modifier one>>                             14580000
     DO'RIOC0; A:=TOS'; <<Read the UART's status>>                      14585000
     DO'WIOC0(!4070); <<Send the DSJ command>>                          14590000
     DO'RIOC0; <<Read the DSJ byte>>                                    14595000
     B:=0;                                                              14600000
     IF NOT A.(14:1) THEN BEGIN                                         14605000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        14610000
        NUM'CHARS:=GET'MESSAGE(29);                                     14615000
        MSG'OUT(7):=DEV+!30;                                            14620000
        ERROROUT(-NUM'CHARS,0);                                         14625000
        B:=-1;                                                          14630000
        END ELSE BEGIN                                                  14635000
        NUM'CHARS:=GET'MESSAGE(30);                                     14640000
        MSG'OUT(7):=DEV+!30;                                            14645000
        ERROROUT(-NUM'CHARS,0);                                         14650000
        END;                                                            14655000
     END;                                                               14660000
                                                                        14665000
     IF NOT B THEN BEGIN                                                14670000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        14675000
        NUM'CHARS:=GET'MESSAGE(28);                                     14680000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    14685000
        MSG'OUT(44):="2";                                               14690000
        ERROROUT(-NUM'CHARS,1);                                         14695000
        END;                                                            14700000
     END;                                                               14705000
         CHECKYTRAP; <<Check for operator interrupt request>>           14710000
                                                                        14715000
     END; <<Place the next device number under test>>                   14720000
                                                                        14725000
 <<- STEP 22     -      Board is requesting service - overrun error     14730000
                                                                        14735000
           An overrun condition occurs when a character is received     14740000
           by the UART while a valid character exists in the UART       14745000
           receive buffer.                                              14750000
                                                                        14755000
           Since the UART has a one character receive buffer, two       14760000
           characters are transmitted and looped back to the UART's     14765000
           receiver (without reading the first.)   The UART should      14770000
           provide 'overrun' status.  A UART status(modifier 1) read    14775000
           is done to verify that the overrun was detected.  Then a DSJ 14780000
           is issued and the resulting returned byte is verified to be  14785000
           a two.>>                                                     14790000
                                                                        14795000
     STP:=22;                                                           14800000
     DEV:=DESIRED'DEV-1;                                                14805000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               14810000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             14815000
     DO'WIOC0(!4066); <<Send baud select modifier>>                     14820000
     DO'WIOC0(!8); <<Set receive to 9600 baud>>                         14825000
     DO'WIOC0(!4060); <<Send modifier zero>>                            14830000
     DO'WIOC0(!55); <<Send test byte to cause O.E.>>                    14835000
     DODELAY(STARTIME,5); <<Wait to byte to be received>>               14840000
     DO'WIOC0(!4061); <<Send modifier one and>>                         14845000
     DO'RIOC0; A:=TOS'; <<read the UART status>>                        14850000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     14855000
     DO'RIOC0; <<Read the DSJ returned byte>>                           14860000
     B:=0;                                                              14865000
     IF NOT A.(13:1) THEN BEGIN                                         14870000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        14875000
        NUM'CHARS:=GET'MESSAGE(31);                                     14880000
        MSG'OUT(7):=!30+DEV;                                            14885000
        ERROROUT(-NUM'CHARS,0);                                         14890000
        B:=-1;                                                          14895000
        END ELSE BEGIN                                                  14900000
        NUM'CHARS:=GET'MESSAGE(32);                                     14905000
        MSG'OUT(7):=!30+DEV;                                            14910000
        ERROROUT(-NUM'CHARS,0);                                         14915000
        END;                                                            14920000
        END;                                                            14925000
     IF NOT B THEN BEGIN                                                14930000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        14935000
        NUM'CHARS:=GET'MESSAGE(28);                                     14940000
        MSG'OUT(44):="2";                                               14945000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    14950000
        ERROROUT(-NUM'CHARS,1);                                         14955000
        END;                                                            14960000
        END;                                                            14965000
                                                                        14970000
  DO'WIOC0(!4060); <<Send modifier zero>>                               14975000
  DO'RIOC0;                                                             14980000
  DO'WIOC0(!4061); <<Send modifier one>>                                14985000
  DO'RIOC0;                                                             14990000
  IF NOT TOS'.(13:1) <<Is OE still there?>>                             14995000
   THEN                                                                 15000000
    BEGIN <<No, modifier zero cleared it>>                              15005000
     NUM'CHARS:=GET'MESSAGE(32);                                        15010000
     MSG'OUT(7):=!30+DEV;                                               15015000
     ERROROUT(-NUM'CHARS,0);                                            15020000
    END;                                                                15025000
                                                                        15030000
         CHECKYTRAP; <<Check for operator interrupt request>>           15035000
                                                                        15040000
     END; <<Place the next device number under test>>                   15045000
 <<- STEP 23     -      Board is requesting service - break detected    15050000
                                                                        15055000
           A break condition is emulated by setting the UART to receive 15060000
           at a much faster baud rate than is transmitted, then an      15065000
           all zeroes character is sent.  A UART status (modifier 1)    15070000
                                                                        15075000
           read is executed to verify that the break condition was      15080000
           detected, then a DSJ is issued, and the resulting returned   15085000
           byte is verified to be a two.>>                              15090000
                                                                        15095000
     STP:=23;                                                           15100000
     DEV:=DESIRED'DEV-1;                                                15105000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               15110000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             15115000
     DO'WIOC0(!4063); <<Send service condition modifier>>               15120000
     DO'WIOC0(!6); <<Request when byte received>>                       15125000
     DO'WIOC0(!4066); <<Send baud rate select modifier>>                15130000
     DO'WIOC0(!7); <<Set to transmit @ 4800 baud>>                      15135000
     DO'WIOC0(!18); <<Set to receive  @ 9600 baud>>                     15140000
     DO'WIOC0(!4060); <<Send modifier zero>>                            15145000
     DO'WIOC0(!0); <<Send a zero byte>>                                 15150000
     DODELAY(STARTIME,25); <<Wait to receive the byte>>                 15155000
     DO'WIOC0(!4061); <<Send modifier one to read>>                     15160000
     DO'RIOC0; A:=TOS'; <<the UART status byte>>                        15165000
     DO'WIOC0(!4070); <<Now send the DSJ command code>>                 15170000
     DO'RIOC0; <<and then read the DSJ byte>>                           15175000
     B:=0;                                                              15180000
     IF NOT A.(12:1) THEN BEGIN                                         15185000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        15190000
        NUM'CHARS:=GET'MESSAGE(33);                                     15195000
        MSG'OUT(7):=!30+DEV;                                            15200000
        ERROROUT(-NUM'CHARS,0);                                         15205000
        B:=1;                                                           15210000
        END ELSE BEGIN                                                  15215000
        NUM'CHARS:=GET'MESSAGE(34);                                     15220000
        MSG'OUT(7):=!30+DEV;                                            15225000
        ERROROUT(-NUM'CHARS,0);                                         15230000
        END;                                                            15235000
        END;                                                            15240000
                                                                        15245000
     IF NOT B THEN BEGIN                                                15250000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        15255000
        NUM'CHARS:=GET'MESSAGE(28);                                     15260000
        MSG'OUT(44):=!32;                                               15265000
        NUM2ASC(31,2,10,TOS'.(8:8));                                    15270000
        ERROROUT(-NUM'CHARS,1);                                         15275000
        END;                                                            15280000
        END;                                                            15285000
                                                                        15290000
         CHECKYTRAP; <<Check for operator interrupt request>>           15295000
                                                                        15300000
     END; <<Place the next device number under test>>                   15305000
 <<- STEP 24                                                            15310000
           A break condition is again emulated using the method         15315000
           described in the previous step.  At this time, the END       15320000
           message (or EOT) is verified to be a one.>>                  15325000
     STP:=24;                                                           15330000
     DEV:=DESIRED'DEV-1;                                                15335000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               15340000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             15345000
     DO'WIOC0(!4063); <<Send service condition modifier>>               15350000
     DO'WIOC0(!6); <<Request when byte received>>                       15355000
     DO'WIOC0(!4066); <<Send baud rate select modifier>>                15360000
     DO'WIOC0(!7); <<Set to transmit @ 4800 baud>>                      15365000
     DO'WIOC0(!18); <<Set to receive  @ 9600 baud>>                     15370000
     DO'WIOC0(!4060); <<Send modifier zero>>                            15375000
     DO'WIOC0(!0); <<Send a zero byte>>                                 15380000
     DODELAY(STARTIME,5); <<Wait to receive the byte>>                  15385000
     DO'WIOC0(!4061); <<Send modifier one to read>>                     15390000
     DO'RIOC0; <<the UART status byte>>                                 15395000
     IF NOT TOS'.(1:1) THEN ERROROUT(-GET'MESSAGE(35),1);               15400000
         CHECKYTRAP; <<Check for operator interrupt request>>           15405000
                                                                        15410000
     END; <<Place next device number under test>>                       15415000
                                                                        15420000
 <<- Step 25  -  TBE status=1                                           15425000
          With service request condition 2 enabled, bit 15 of the       15430000
          word returned as the result of a modifier one read, when      15435000
          the UART transmit buffer is empty , should be set to a        15440000
          one.  This step issues an initialize, sets up service         15445000
          request condition 2, executes a modifier one read and         15450000
          verifies the state of this bit.  If an error is detected      15455000
          in this step, the message                                     15460000
                                                                        15465000
            "TBE not returned as 1  Dev=D"                              15470000
                                                                        15475000
          is displayed.>>                                               15480000
                                                                        15485000
      STP:=25;                                                          15490000
     CHNL'INIT;                                                         15495000
     DEV:=DESIRED'DEV-1;                                                15500000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               15505000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             15510000
     DO'WIOC0(!4063); <<Enable request condition>>                      15515000
     DO'WIOC0(!5); <<1 for this test>>                                  15520000
     DO'WIOC0(!4061); <<Send modifier one>>                             15525000
     DO'WIOC0(!DE); <<Setup UART conditions>>                           15530000
     DO'RIOC0; <<Read UART status>>                                     15535000
     IF NOT TOS'.(15:1) THEN BEGIN                                      15540000
        NUM'CHARS:=GET'MESSAGE(36);                                     15545000
        MSG'OUT(20):="1";                                               15550000
        ERROROUT(-NUM'CHARS,1);                                         15555000
        END;                                                            15560000
         CHECKYTRAP; <<Check for operator interrupt request>>           15565000
     END; <<Place next device number under test>>                       15570000
$PAGE"ADCDIAG4  ADCC DIAGNOSTIC      SECTION SEVEN"                     15575000
                                                                        15580000
 <<- Step 26  -  TBE status=0                                           15585000
          With service request condition 2 enabled, bit 15 of the       15590000
          word returned as the result of a modifier one read, should    15595000
          be set to zero if the UART transmit buffer is not empty.      15600000
          This condition is set by setting the UART to transmit         15605000
          at 4800 baud, sending a character to the buffer and then      15610000
          verifying that bit 15 of the resulting returned word to be    15615000
          a zero.  If an error is detected in this step, the message    15620000
                                                                        15625000
            "TBE not returned as 0  Dev=D"                              15630000
                                                                        15635000
          is displayed.>>                                               15640000
                                                                        15645000
      STP:=26;                                                          15650000
     CHNL'INIT;                                                         15655000
     DEV:=DESIRED'DEV-1;                                                15660000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               15665000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             15670000
     DO'WIOC0(!4063); <<Set service request condition>>                 15675000
     DO'WIOC0(!5); <<1 for this test>>                                  15680000
     DO'WIOC0(!4061); <<Send modifier one>>                             15685000
     DO'WIOC0(!DE); <<Setup UART conditions>>                           15690000
     DO'WIOC0(!4066); <<Send modifier six>>                             15695000
     DO'WIOC0(!9); <<Set xmit at 4800 baud>>                            15700000
     DO'WIOC0(!19); <<Set recv at 4800 baud>>                           15705000
     DO'WIOC0(!4060); <<Send modifier zero>>                            15710000
     DO'WIOC0(!55); <<Send a character>>                                15715000
     DO'WIOC0(!4061); <<Send modifier one>>                             15720000
     DO'RIOC0; <<Read UART status>>                                     15725000
     IF TOS'.(15:1) THEN BEGIN                                          15730000
        NUM'CHARS:=GET'MESSAGE(36);                                     15735000
        MSG'OUT(20):="0";                                               15740000
        ERROROUT(-NUM'CHARS,1);                                         15745000
        END;                                                            15750000
      CHECKYTRAP; <<Check for operator interrupt request>>              15755000
     END; <<Place next device number under test>>                       15760000
  REP'ILL'INT;                                                          15765000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        15770000
END;                                                                    15775000
                                                                        15780000
$PAGE"ADCDIAG5  ADCC DIAGNOSTIC      SECTION EIGHT"                     15785000
IF SECTION(8)                                                           15790000
 THEN                                                                   15795000
  BEGIN                                                                 15800000
                                                                        15805000
  <<SECTION 8  -  Modem Status and Device Specified Jump                15810000
                                                                        15815000
  Section 8 places under test the modem controls and the                15820000
  modem status monitor logic function blocks along with the poll and    15825000
  device specified jump logic function blocks.  This is done by         15830000
  testing for the RS-232-C output lines CA(request to send),            15835000
  CD (data terminal ready), CH (speed select) and SCA (secondary        15840000
  request to send) of each device on the ADCC, which are looped-        15845000
  back via the J2 test connector to the modem                           15850000
  status lines, CB(clear to send), CC(data set ready), CE(ring          15855000
  detect), CF(signal detect) and SCF(secondary signal detect) and       15860000
  then verifying the ability of the device specified jump logic to      15865000
  detect the change in the modem status lines.                          15870000
                                                                        15875000
  TEST CONDITION 1 for each output/modem status line is set by          15880000
  sending a byte, written with modifier 7, to establish the             15885000
  reference at one for each line under test, then setting the           15890000
  mask bit for that line, enabling the modem status monitor.  The       15895000
  stimulus is provided by writing a data byte, with modifier 2,         15900000
  having the bit corresponding to the line under test equal to          15905000
  zero, thus causing the desired deviation from reference.  The         15910000
  result of the test is determined by a modifier 2 (modem status)       15915000
  read, verifying that the returned byte has the correct value,         15920000
  thereby verifying that the correct line responded correctly to        15925000
  the applied stimulus.  At this time, the ability of the Device        15930000
  Specified Jump logic to recognize a deviation of modem status         15935000
  lines from reference is tested.                                       15940000
                                                                        15945000
  TEST CONDITION 2 for each output/modem status line is set using       15950000
  similiar test sequences as described in test condition 1, but         15955000
  using the reverse sense of the reference and stimulus(ie. the         15960000
  reference=0, and the stimulus=1) for each line, then verifying        15965000
  that the Device Specified Jump logic also detects this deviation>>    15970000
  <<- STEP 27     -      CA - CB or CF    (reference=1)                 15975000
                                                                        15980000
   The procedure described as test condition 1 is used to test          15985000
   the circuitry for each device associated with the lines              15990000
   CA, and CB or CF.>>                                                  15995000
                                                                        16000000
   STP:=27;                                                             16005000
   MAS:=!30; <<For CB>>                                                 16010000
   REF:=!10;                                                            16015000
   CF'DONE:=FALSE;                                                      16020000
   WHILE CF'DONE=FALSE                                                  16025000
    DO                                                                  16030000
     BEGIN                                                              16035000
      INTPSYS'OFF;                                                      16040000
      CHNL'INIT;                                                        16045000
      DEV:=DESIRED'DEV-1;                                               16050000
      WHILE (DEV:=DEV+1)<=MAX'DEV                                       16055000
       DO                                                               16060000
        BEGIN                                                           16065000
         SETMASK;                                                       16070000
         D:=-1;                                                         16075000
         WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                       16080000
          DO                                                            16085000
           BEGIN                                                        16090000
            DO'WIOC0(!4040+D); <<Address device>>                       16095000
            DO'WIOC0(!4067); <<Send modifier seven>>                    16100000
            DO'WIOC0(!20); <<Set masks=0>>                              16105000
            DO'WIOC0(!1F); <<Set references=1>>                         16110000
            DO'WIOC0(!4062); <<Send modifier two>>                      16115000
            DO'WIOC0(!F); <<Set statuses=1>>                            16120000
           END;                                                         16125000
         DRT'INIT;                                                      16130000
         ZERO'CPVA;                                                     16135000
         ST'DSJ'CH'PROGS;                                               16140000
         INTPSYS'ON;                                                    16145000
         D:=-1;                                                         16150000
         WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                       16155000
          DO                                                            16160000
           BEGIN                                                        16165000
            DO'WIOC0(!4040+D); <<Address device>>                       16170000
            DO'WIOC0(!4067); <<Send modifier seven>>                    16175000
            DO'WIOC0(!3F); <<Set masks=1>>                              16180000
           END;                                                         16185000
         DODELAY(STARTIME,5); <<Short wait>>                            16190000
         CHK'UNEXP'I(DEV);                                              16195000
         DO'WIOC0(!4040+DEV); <<Address the device under test>>         16200000
         DO'WIOC0(!4067); <<Send modifier seven>>                       16205000
         DO'WIOC0(!20); <<Set device mask 0>>                           16210000
         DO'WIOC0(REF); <<Set reference for CB or CF=1>>                16215000
         DO'WIOC0(!4062); <<Send modifier two>>                         16220000
         DO'WIOC0(!7); <<CA=0, CD,CH,SCA=1 for CB,CF status change>>    16225000
         DODELAY(STARTIME,5); <<Short wait>>                            16230000
         A:=B:=0;                                                       16235000
         DO'RIOC0; A:=TOS'; <<Now read modem status lines>>             16240000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 16245000
         DO'RIOC0; <<Read the DSJ returned byte>>                       16250000
         C:=!9; <<CC & SCF>>                                            16255000
         IF EXTND THEN C:=LOGICAL(C) OR !04; <<CE is there too>>        16260000
         IF A.(11:5)<>C                                                 16265000
          THEN                                                          16270000
           BEGIN                                                        16275000
            IF A.(11:5)<>7                                              16280000
             THEN                                                       16285000
              BEGIN                                                     16290000
               NUM'CHARS:=GET'MESSAGE(40);                              16295000
               NUM2ASC(20,2,16,A.(11:5));                               16300000
               NUM2ASC(33,2,16,C);                                      16305000
               ERROROUT(-NUM'CHARS,1);                                  16310000
              END                                                       16315000
             ELSE ERROROUT(-GET'MESSAGE(39),1);                         16320000
           END                                                          16325000
          ELSE                                                          16330000
           BEGIN <<Continue the test case.>>                            16335000
            IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                      16340000
             THEN                                                       16345000
              BEGIN                                                     16350000
               NUM'CHARS:=GET'MESSAGE(41);                              16355000
               NUM2ASC(14,2,16,TOS'.(8:8));                             16360000
               NUM2ASC(27,2,16,0);                                      16365000
               ERROROUT(-NUM'CHARS,1);                                  16370000
              END;                                                      16375000
            CHK'UNEXP'I(DEV);                                           16380000
            DO'WIOC0(!4067); <<Send modifier 7>>                        16385000
            DO'WIOC0(MAS); <<Mask on for CB or CF>>                     16390000
            DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>   16395000
            IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                           16400000
             THEN                                                       16405000
              BEGIN                                                     16410000
               NUM'CHARS:=GET'MESSAGE(43);                              16415000
               NUM2ASC(42,2,16,B);                                      16420000
               NUM2ASC(54,1,16,2);                                      16425000
               ERROROUT(-NUM'CHARS,1);                                  16430000
              END;                                                      16435000
            IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                   16440000
             THEN                                                       16445000
              ERROROUT(-GET'MESSAGE(85),1); <<No.>>                     16450000
           END;                                                         16455000
         D:=-1;                                                         16460000
         INTPSYS'ON; <<INT'RECV disabled interrupts>>                   16465000
         WHILE (D:=D+1)<=7                                              16470000
          DO <<Any other device interrupt?>>                            16475000
           IF D<>DEV THEN CHK'UNEXP'I(D);                               16480000
         CHNL'INIT;                                                     16485000
         CHECKYTRAP; <<Check for operator interrupt request>>           16490000
        END; <<Place the next device number under test>>                16495000
      IF REF=!10                                                        16500000
       THEN                                                             16505000
        BEGIN                                                           16510000
         MAS:=!22; <<For CF>>                                           16515000
         REF:=!02;                                                      16520000
        END                                                             16525000
       ELSE CF'DONE:=TRUE;                                              16530000
     END;                                                               16535000
$PAGE                                                                   16540000
  <<- STEP 28     -      CA - CB or CF    (reference=0)                 16545000
                                                                        16550000
      The procedure described as test condition 2 is used to test       16555000
      the circuitry for each device associated with the lines           16560000
      CA, and CB or CF.>>                                               16565000
                                                                        16570000
   STP:=28;                                                             16575000
   MAS:=!30; <<For CB>>                                                 16580000
   REF:=!0F;                                                            16585000
   CF'DONE:=FALSE;                                                      16590000
   WHILE CF'DONE=FALSE                                                  16595000
    DO                                                                  16600000
     BEGIN                                                              16605000
      INTPSYS'OFF;                                                      16610000
      CHNL'INIT;                                                        16615000
      DEV:=DESIRED'DEV-1;                                               16620000
      WHILE (DEV:=DEV+1)<=MAX'DEV                                       16625000
       DO                                                               16630000
        BEGIN                                                           16635000
         SETMASK;                                                       16640000
         D:=-1;                                                         16645000
         WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                       16650000
          DO                                                            16655000
           BEGIN                                                        16660000
            DO'WIOC0(!4040+D); <<Address device>>                       16665000
            DO'WIOC0(!4067); <<Send modifier seven>>                    16670000
            DO'WIOC0(!20); <<Set masks=0>>                              16675000
            DO'WIOC0(!00); <<Set references=0>>                         16680000
            DO'WIOC0(!4062); <<Send modifier two>>                      16685000
            DO'WIOC0(!0); <<Set statuses=0>>                            16690000
           END;                                                         16695000
         DRT'INIT;                                                      16700000
         ZERO'CPVA;                                                     16705000
         ST'DSJ'CH'PROGS;                                               16710000
         INTPSYS'ON;                                                    16715000
         D:=-1;                                                         16720000
         WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                       16725000
          DO                                                            16730000
           BEGIN                                                        16735000
            DO'WIOC0(!4040+D); <<Address device>>                       16740000
            DO'WIOC0(!4067); <<Send modifier seven>>                    16745000
            DO'WIOC0(!3F); <<Set masks=1>>                              16750000
           END;                                                         16755000
         DODELAY(STARTIME,5); <<Short wait>>                            16760000
         CHK'UNEXP'I(DEV);                                              16765000
         DO'WIOC0(!4040+DEV); <<Address the device under test>>         16770000
         DO'WIOC0(!4067); <<Send modifier seven>>                       16775000
         DO'WIOC0(!20); <<Set device mask 0>>                           16780000
         DO'WIOC0(REF); <<Set reference for CB or CF=0>>                16785000
         DO'WIOC0(!4062); <<Send modifier two>>                         16790000
         DO'WIOC0(!8); <<CA=1, CD,CH,SCA=0 for CB,CF status change>>    16795000
         DODELAY(STARTIME,5); <<Short wait>>                            16800000
         A:=B:=0;                                                       16805000
         DO'RIOC0; A:=TOS'; <<Now read modem status lines>>             16810000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 16815000
         DO'RIOC0; <<Read the DSJ returned byte>>                       16820000
         IF A.(11:5)<>!12 <<CB & CF>>                                   16825000
          THEN                                                          16830000
           BEGIN                                                        16835000
            IF A.(11:5)<>!8                                             16840000
             THEN                                                       16845000
              BEGIN                                                     16850000
               NUM'CHARS:=GET'MESSAGE(40);                              16855000
               NUM2ASC(20,2,16,A.(11:5));                               16860000
               NUM2ASC(33,2,16,!12);                                    16865000
               ERROROUT(-NUM'CHARS,1);                                  16870000
              END                                                       16875000
             ELSE ERROROUT(-GET'MESSAGE(39),1);                         16880000
           END                                                          16885000
          ELSE                                                          16890000
           BEGIN <<Continue the test case.>>                            16895000
            IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                      16900000
             THEN                                                       16905000
              BEGIN                                                     16910000
               NUM'CHARS:=GET'MESSAGE(41);                              16915000
               NUM2ASC(14,2,16,TOS'.(8:8));                             16920000
               NUM2ASC(27,2,16,0);                                      16925000
               ERROROUT(-NUM'CHARS,1);                                  16930000
              END;                                                      16935000
            CHK'UNEXP'I(DEV);                                           16940000
            DO'WIOC0(!4067); <<Send modifier 7>>                        16945000
            DO'WIOC0(MAS); <<Mask on for CB or CF>>                     16950000
            DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>   16955000
            IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                           16960000
             THEN                                                       16965000
              BEGIN                                                     16970000
               NUM'CHARS:=GET'MESSAGE(43);                              16975000
               NUM2ASC(42,2,16,B);                                      16980000
               NUM2ASC(54,1,16,2);                                      16985000
               ERROROUT(-NUM'CHARS,1);                                  16990000
              END;                                                      16995000
            IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                   17000000
             THEN                                                       17005000
              ERROROUT(-GET'MESSAGE(85),1); <<No.>>                     17010000
           END;                                                         17015000
         D:=-1;                                                         17020000
         INTPSYS'ON; <<INT'RECV disabled interrupts>>                   17025000
         WHILE (D:=D+1)<=7                                              17030000
          DO <<Any other device interrupt?>>                            17035000
           IF D<>DEV THEN CHK'UNEXP'I(D);                               17040000
         CHNL'INIT;                                                     17045000
         CHECKYTRAP; <<Check for operator interrupt request>>           17050000
        END; <<Place the next device number under test>>                17055000
      IF REF=!10                                                        17060000
       THEN                                                             17065000
        BEGIN                                                           17070000
         MAS:=!22; <<For CF>>                                           17075000
         REF:=!1D;                                                      17080000
        END                                                             17085000
       ELSE CF'DONE:=TRUE;                                              17090000
     END;                                                               17095000
$PAGE                                                                   17100000
 <<- STEP 29     -      CD - CC    (reference=1)                        17105000
                                                                        17110000
   The procedure described as test condition 1 is used to test          17115000
   the circuitry for each device associated with the lines              17120000
   CD, and CC.>>                                                        17125000
                                                                        17130000
   STP:=29;                                                             17135000
   INTPSYS'OFF;                                                         17140000
   CHNL'INIT;                                                           17145000
   DEV:=DESIRED'DEV-1;                                                  17150000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          17155000
    DO                                                                  17160000
     BEGIN                                                              17165000
      SETMASK;                                                          17170000
      D:=-1;                                                            17175000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          17180000
       DO                                                               17185000
        BEGIN                                                           17190000
         DO'WIOC0(!4040+D); <<Address device>>                          17195000
         DO'WIOC0(!4067); <<Send modifier seven>>                       17200000
         DO'WIOC0(!20); <<Set masks=0>>                                 17205000
         DO'WIOC0(!1F); <<Set references=1>>                            17210000
         DO'WIOC0(!4062); <<Send modifier two>>                         17215000
         DO'WIOC0(!F); <<Set statuses=1>>                               17220000
        END;                                                            17225000
      DRT'INIT;                                                         17230000
      ZERO'CPVA;                                                        17235000
      ST'DSJ'CH'PROGS;                                                  17240000
      INTPSYS'ON;                                                       17245000
      D:=-1;                                                            17250000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          17255000
       DO                                                               17260000
        BEGIN                                                           17265000
         DO'WIOC0(!4040+D); <<Address device>>                          17270000
         DO'WIOC0(!4067); <<Send modifier seven>>                       17275000
         DO'WIOC0(!3F); <<Set masks=1>>                                 17280000
        END;                                                            17285000
      DODELAY(STARTIME,5); <<Short wait>>                               17290000
      CHK'UNEXP'I(DEV);                                                 17295000
      DO'WIOC0(!4040+DEV); <<Address the device under test>>            17300000
      DO'WIOC0(!4067); <<Send modifier seven>>                          17305000
      DO'WIOC0(!20); <<Set device mask 0>>                              17310000
      DO'WIOC0(!08); <<Set reference for CC=1>>                         17315000
      DO'WIOC0(!4062); <<Send modifier two>>                            17320000
      DO'WIOC0(!B); <<CA=1, CD=0, CH,SCA=1 for CC status change>>       17325000
      DODELAY(STARTIME,5); <<Short wait>>                               17330000
      A:=B:=0;                                                          17335000
      DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                17340000
      DO'WIOC0(!4070); <<Send the DSJ command code>>                    17345000
      DO'RIOC0; <<Read the DSJ returned byte>>                          17350000
      C:=!13; <<CB,CF & SCF>>                                           17355000
      IF EXTND THEN C:=LOGICAL(C) OR !04; <<CE is there too>>           17360000
      IF A.(11:5)<>C                                                    17365000
       THEN                                                             17370000
        BEGIN                                                           17375000
         IF A.(11:5)<>!B                                                17380000
          THEN                                                          17385000
           BEGIN                                                        17390000
            NUM'CHARS:=GET'MESSAGE(40);                                 17395000
            NUM2ASC(20,2,16,A.(11:5));                                  17400000
            NUM2ASC(33,2,16,C);                                         17405000
            ERROROUT(-NUM'CHARS,1);                                     17410000
           END                                                          17415000
          ELSE ERROROUT(-GET'MESSAGE(39),1);                            17420000
        END                                                             17425000
       ELSE                                                             17430000
        BEGIN <<Continue the test case.>>                               17435000
         IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                         17440000
          THEN                                                          17445000
           BEGIN                                                        17450000
            NUM'CHARS:=GET'MESSAGE(41);                                 17455000
            NUM2ASC(14,2,16,TOS'.(8:8));                                17460000
            NUM2ASC(27,2,16,0);                                         17465000
            ERROROUT(-NUM'CHARS,1);                                     17470000
           END;                                                         17475000
         CHK'UNEXP'I(DEV);                                              17480000
         DO'WIOC0(!4067); <<Send modifier 7>>                           17485000
         DO'WIOC0(!28); <<Mask on for CC>>                              17490000
         DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>      17495000
         IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                              17500000
          THEN                                                          17505000
           BEGIN                                                        17510000
            NUM'CHARS:=GET'MESSAGE(43);                                 17515000
            NUM2ASC(42,2,16,B);                                         17520000
            NUM2ASC(54,1,16,2);                                         17525000
            ERROROUT(-NUM'CHARS,1);                                     17530000
           END;                                                         17535000
         IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                      17540000
          THEN                                                          17545000
           ERROROUT(-GET'MESSAGE(85),1); <<No.>>                        17550000
        END;                                                            17555000
      D:=-1;                                                            17560000
      INTPSYS'ON; <<INT'RECV disabled interrupts>>                      17565000
      WHILE (D:=D+1)<=7                                                 17570000
       DO <<Any other device interrupt?>>                               17575000
        IF D<>DEV THEN CHK'UNEXP'I(D);                                  17580000
      CHNL'INIT;                                                        17585000
      CHECKYTRAP; <<Check for operator interrupt request>>              17590000
     END; <<Place the next device number under test>>                   17595000
$PAGE                                                                   17600000
  <<- STEP 30     -      CD - CC    (reference=0)                       17605000
                                                                        17610000
      The procedure described as test condition 2 is used to test       17615000
      the circuitry for each device associated with the lines           17620000
      CD, and CC.>>                                                     17625000
                                                                        17630000
   STP:=30;                                                             17635000
   INTPSYS'OFF;                                                         17640000
   CHNL'INIT;                                                           17645000
   DEV:=DESIRED'DEV-1;                                                  17650000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          17655000
    DO                                                                  17660000
     BEGIN                                                              17665000
      SETMASK;                                                          17670000
      D:=-1;                                                            17675000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          17680000
       DO                                                               17685000
        BEGIN                                                           17690000
         DO'WIOC0(!4040+D); <<Address device>>                          17695000
         DO'WIOC0(!4067); <<Send modifier seven>>                       17700000
         DO'WIOC0(!20); <<Set masks=0>>                                 17705000
         DO'WIOC0(!00); <<Set references=0>>                            17710000
         DO'WIOC0(!4062); <<Send modifier two>>                         17715000
         DO'WIOC0(!0); <<Set statuses=0>>                               17720000
        END;                                                            17725000
      DRT'INIT;                                                         17730000
      ZERO'CPVA;                                                        17735000
      ST'DSJ'CH'PROGS;                                                  17740000
      INTPSYS'ON;                                                       17745000
      D:=-1;                                                            17750000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          17755000
       DO                                                               17760000
        BEGIN                                                           17765000
         DO'WIOC0(!4040+D); <<Address device>>                          17770000
         DO'WIOC0(!4067); <<Send modifier seven>>                       17775000
         DO'WIOC0(!3F); <<Set masks=1>>                                 17780000
        END;                                                            17785000
      DODELAY(STARTIME,5); <<Short wait>>                               17790000
      CHK'UNEXP'I(DEV);                                                 17795000
      DO'WIOC0(!4040+DEV); <<Address the device under test>>            17800000
      DO'WIOC0(!4067); <<Send modifier seven>>                          17805000
      DO'WIOC0(!20); <<Set device mask 0>>                              17810000
      DO'WIOC0(!17); <<Set reference for CC=0>>                         17815000
      DO'WIOC0(!4062); <<Send modifier two>>                            17820000
      DO'WIOC0(!4); <<CA=0, CD=1, CH,SCA=0 for CC status change>>       17825000
      DODELAY(STARTIME,5); <<Short wait>>                               17830000
      A:=B:=0;                                                          17835000
      DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                17840000
      DO'WIOC0(!4070); <<Send the DSJ command code>>                    17845000
      DO'RIOC0; <<Read the DSJ returned byte>>                          17850000
      IF A.(11:5)<>!08 <<CC>>                                           17855000
       THEN                                                             17860000
        BEGIN                                                           17865000
         IF A.(11:5)<>!4                                                17870000
          THEN                                                          17875000
           BEGIN                                                        17880000
            NUM'CHARS:=GET'MESSAGE(40);                                 17885000
            NUM2ASC(20,2,16,A.(11:5));                                  17890000
            NUM2ASC(33,2,16,!08);                                       17895000
            ERROROUT(-NUM'CHARS,1);                                     17900000
           END                                                          17905000
          ELSE ERROROUT(-GET'MESSAGE(39),1);                            17910000
        END                                                             17915000
       ELSE                                                             17920000
        BEGIN <<Continue the test case.>>                               17925000
         IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                         17930000
          THEN                                                          17935000
           BEGIN                                                        17940000
            NUM'CHARS:=GET'MESSAGE(41);                                 17945000
            NUM2ASC(14,2,16,TOS'.(8:8));                                17950000
            NUM2ASC(27,2,16,0);                                         17955000
            ERROROUT(-NUM'CHARS,1);                                     17960000
           END;                                                         17965000
         CHK'UNEXP'I(DEV);                                              17970000
         DO'WIOC0(!4067); <<Send modifier 7>>                           17975000
         DO'WIOC0(!32); <<Mask on for CC>>                              17980000
         DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>      17985000
         IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                              17990000
          THEN                                                          17995000
           BEGIN                                                        18000000
            NUM'CHARS:=GET'MESSAGE(43);                                 18005000
            NUM2ASC(42,2,16,B);                                         18010000
            NUM2ASC(54,1,16,2);                                         18015000
            ERROROUT(-NUM'CHARS,1);                                     18020000
           END;                                                         18025000
         IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                      18030000
          THEN                                                          18035000
           ERROROUT(-GET'MESSAGE(85),1); <<No.>>                        18040000
        END;                                                            18045000
      D:=-1;                                                            18050000
      INTPSYS'ON; <<INT'RECV disabled interrupts>>                      18055000
      WHILE (D:=D+1)<=7                                                 18060000
       DO <<Any other device interrupt?>>                               18065000
        IF D<>DEV THEN CHK'UNEXP'I(D);                                  18070000
      CHNL'INIT;                                                        18075000
      CHECKYTRAP; <<Check for operator interrupt request>>              18080000
     END; <<Place the next device number under test>>                   18085000
$PAGE                                                                   18090000
  <<- STEP 31     -      SCA - SCF    (reference=1)                     18095000
                                                                        18100000
      The procedure described as test condition 1 is used to test       18105000
      the circuitry for each device associated with the lines           18110000
      SCA, and SCF.>>                                                   18115000
                                                                        18120000
   STP:=31;                                                             18125000
   INTPSYS'OFF;                                                         18130000
   CHNL'INIT;                                                           18135000
   DEV:=DESIRED'DEV-1;                                                  18140000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          18145000
    DO                                                                  18150000
     BEGIN                                                              18155000
      SETMASK;                                                          18160000
      D:=-1;                                                            18165000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          18170000
       DO                                                               18175000
        BEGIN                                                           18180000
         DO'WIOC0(!4040+D); <<Address device>>                          18185000
         DO'WIOC0(!4067); <<Send modifier seven>>                       18190000
         DO'WIOC0(!20); <<Set masks=0>>                                 18195000
         DO'WIOC0(!1F); <<Set references=1>>                            18200000
         DO'WIOC0(!4062); <<Send modifier two>>                         18205000
         DO'WIOC0(!F); <<Set statuses=1>>                               18210000
        END;                                                            18215000
      DRT'INIT;                                                         18220000
      ZERO'CPVA;                                                        18225000
      ST'DSJ'CH'PROGS;                                                  18230000
      INTPSYS'ON;                                                       18235000
      D:=-1;                                                            18240000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          18245000
       DO                                                               18250000
        BEGIN                                                           18255000
         DO'WIOC0(!4040+D); <<Address device>>                          18260000
         DO'WIOC0(!4067); <<Send modifier seven>>                       18265000
         DO'WIOC0(!3F); <<Set masks=1>>                                 18270000
        END;                                                            18275000
      DODELAY(STARTIME,5); <<Short wait>>                               18280000
      CHK'UNEXP'I(DEV);                                                 18285000
      DO'WIOC0(!4040+DEV); <<Address the device under test>>            18290000
      DO'WIOC0(!4067); <<Send modifier seven>>                          18295000
      DO'WIOC0(!20); <<Set device mask 0>>                              18300000
      DO'WIOC0(!01); <<Set reference for SCF=1>>                        18305000
      DO'WIOC0(!4062); <<Send modifier two>>                            18310000
      DO'WIOC0(!E); <<CA,CD,CH=1, SCA=0 for SCF status change>>         18315000
      DODELAY(STARTIME,5); <<Short wait>>                               18320000
      A:=B:=0;                                                          18325000
      DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                18330000
      DO'WIOC0(!4070); <<Send the DSJ command code>>                    18335000
      DO'RIOC0; <<Read the DSJ returned byte>>                          18340000
      C:=!1A; <<CB,CC & CF>>                                            18345000
      IF EXTND THEN C:=LOGICAL(C) OR !04; <<CE is there too>>           18350000
      IF A.(11:5)<>C                                                    18355000
       THEN                                                             18360000
        BEGIN                                                           18365000
         IF A.(11:5)<>!E                                                18370000
          THEN                                                          18375000
           BEGIN                                                        18380000
            NUM'CHARS:=GET'MESSAGE(40);                                 18385000
            NUM2ASC(20,2,16,A.(11:5));                                  18390000
            NUM2ASC(33,2,16,C);                                         18395000
            ERROROUT(-NUM'CHARS,1);                                     18400000
           END                                                          18405000
          ELSE ERROROUT(-GET'MESSAGE(39),1);                            18410000
        END                                                             18415000
       ELSE                                                             18420000
        BEGIN <<Continue the test case.>>                               18425000
         IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                         18430000
          THEN                                                          18435000
           BEGIN                                                        18440000
            NUM'CHARS:=GET'MESSAGE(41);                                 18445000
            NUM2ASC(14,2,16,TOS'.(8:8));                                18450000
            NUM2ASC(27,2,16,0);                                         18455000
            ERROROUT(-NUM'CHARS,1);                                     18460000
           END;                                                         18465000
         CHK'UNEXP'I(DEV);                                              18470000
         DO'WIOC0(!4067); <<Send modifier 7>>                           18475000
         DO'WIOC0(!21); <<Mask on for SCF>>                             18480000
         DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>      18485000
         IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                              18490000
          THEN                                                          18495000
           BEGIN                                                        18500000
            NUM'CHARS:=GET'MESSAGE(43);                                 18505000
            NUM2ASC(42,2,16,B);                                         18510000
            NUM2ASC(54,1,16,2);                                         18515000
            ERROROUT(-NUM'CHARS,1);                                     18520000
           END;                                                         18525000
         IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                      18530000
          THEN                                                          18535000
           ERROROUT(-GET'MESSAGE(85),1); <<No.>>                        18540000
        END;                                                            18545000
      D:=-1;                                                            18550000
      INTPSYS'ON; <<INT'RECV disabled interrupts>>                      18555000
      WHILE (D:=D+1)<=7                                                 18560000
       DO <<Any other device interrupt?>>                               18565000
        IF D<>DEV THEN CHK'UNEXP'I(D);                                  18570000
      CHNL'INIT;                                                        18575000
      CHECKYTRAP; <<Check for operator interrupt request>>              18580000
     END; <<Place the next device number under test>>                   18585000
   DOT; <<Check ATTN/CNTL Y then print `period'>>                       18590000
$PAGE                                                                   18595000
  <<- STEP 32     -      SCA - SCF    (reference=0)                     18600000
                                                                        18605000
      The procedure described as test condition 2 is used to test       18610000
      the circuitry for each device associated with the lines           18615000
      SCA, and SCF.>>                                                   18620000
                                                                        18625000
   STP:=32;                                                             18630000
   INTPSYS'OFF;                                                         18635000
   CHNL'INIT;                                                           18640000
   DEV:=DESIRED'DEV-1;                                                  18645000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          18650000
    DO                                                                  18655000
     BEGIN                                                              18660000
      SETMASK;                                                          18665000
      D:=-1;                                                            18670000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          18675000
       DO                                                               18680000
        BEGIN                                                           18685000
         DO'WIOC0(!4040+D); <<Address device>>                          18690000
         DO'WIOC0(!4067); <<Send modifier seven>>                       18695000
         DO'WIOC0(!20); <<Set masks=0>>                                 18700000
         DO'WIOC0(!00); <<Set references=0>>                            18705000
         DO'WIOC0(!4062); <<Send modifier two>>                         18710000
         DO'WIOC0(!0); <<Set statuses=0>>                               18715000
        END;                                                            18720000
      DRT'INIT;                                                         18725000
      ZERO'CPVA;                                                        18730000
      ST'DSJ'CH'PROGS;                                                  18735000
      INTPSYS'ON;                                                       18740000
      D:=-1;                                                            18745000
      WHILE (D:=D+1)<=(IF EXTND THEN 7 ELSE 3)                          18750000
       DO                                                               18755000
        BEGIN                                                           18760000
         DO'WIOC0(!4040+D); <<Address device>>                          18765000
         DO'WIOC0(!4067); <<Send modifier seven>>                       18770000
         DO'WIOC0(!3F); <<Set masks=1>>                                 18775000
        END;                                                            18780000
      DODELAY(STARTIME,5); <<Short wait>>                               18785000
      CHK'UNEXP'I(DEV);                                                 18790000
      DO'WIOC0(!4040+DEV); <<Address the device under test>>            18795000
      DO'WIOC0(!4067); <<Send modifier seven>>                          18800000
      DO'WIOC0(!20); <<Set device mask 0>>                              18805000
      DO'WIOC0(!1E); <<Set reference for SCF=0>>                        18810000
      DO'WIOC0(!4062); <<Send modifier two>>                            18815000
      DO'WIOC0(!1); <<CA,CD,CH=0, SCA=1 for SCF status change>>         18820000
      DODELAY(STARTIME,5); <<Short wait>>                               18825000
      A:=B:=0;                                                          18830000
      DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                18835000
      DO'WIOC0(!4070); <<Send the DSJ command code>>                    18840000
      DO'RIOC0; <<Read the DSJ returned byte>>                          18845000
      IF A.(11:5)<>!01 <<SCF>>                                          18850000
       THEN                                                             18855000
        BEGIN                                                           18860000
         NUM'CHARS:=GET'MESSAGE(40);                                    18865000
         NUM2ASC(20,2,16,A.(11:5));                                     18870000
         NUM2ASC(33,2,16,!01);                                          18875000
         ERROROUT(-NUM'CHARS,1);                                        18880000
        END                                                             18885000
       ELSE                                                             18890000
        BEGIN <<Continue the test case.>>                               18895000
         IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                         18900000
          THEN                                                          18905000
           BEGIN                                                        18910000
            NUM'CHARS:=GET'MESSAGE(41);                                 18915000
            NUM2ASC(14,2,16,TOS'.(8:8));                                18920000
            NUM2ASC(27,2,16,0);                                         18925000
            ERROROUT(-NUM'CHARS,1);                                     18930000
           END;                                                         18935000
         CHK'UNEXP'I(DEV);                                              18940000
         DO'WIOC0(!4067); <<Send modifier 7>>                           18945000
         DO'WIOC0(!21); <<Mask on for SCF>>                             18950000
         DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>      18955000
         IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                              18960000
          THEN                                                          18965000
           BEGIN                                                        18970000
            NUM'CHARS:=GET'MESSAGE(43);                                 18975000
            NUM2ASC(42,2,16,B);                                         18980000
            NUM2ASC(54,1,16,2);                                         18985000
            ERROROUT(-NUM'CHARS,1);                                     18990000
           END;                                                         18995000
         IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                      19000000
          THEN                                                          19005000
           ERROROUT(-GET'MESSAGE(85),1); <<No.>>                        19010000
        END;                                                            19015000
      D:=-1;                                                            19020000
      INTPSYS'ON; <<INT'RECV disabled interrupts>>                      19025000
      WHILE (D:=D+1)<=7                                                 19030000
       DO <<Any other device interrupt?>>                               19035000
        IF D<>DEV THEN CHK'UNEXP'I(D);                                  19040000
      CHNL'INIT;                                                        19045000
      CHECKYTRAP; <<Check for operator interrupt request>>              19050000
     END; <<Place the next device number under test>>                   19055000
$PAGE                                                                   19060000
   IF EXTND                                                             19065000
    THEN <<Do steps 33 & 34>>                                           19070000
     BEGIN                                                              19075000
  <<- STEP 33     -      CH - CE    (reference=1)>>                     19080000
                                                                        19085000
      STP:=33;                                                          19090000
      INTPSYS'OFF;                                                      19095000
      CHNL'INIT;                                                        19100000
      DEV:=DESIRED'DEV-1;                                               19105000
      WHILE (DEV:=DEV+1)<=MAX'DEV                                       19110000
       DO                                                               19115000
        BEGIN                                                           19120000
         SETMASK;                                                       19125000
         D:=-1;                                                         19130000
         WHILE (D:=D+1)<=7                                              19135000
          DO                                                            19140000
           BEGIN                                                        19145000
            DO'WIOC0(!4040+D); <<Address device>>                       19150000
            DO'WIOC0(!4067); <<Send modifier seven>>                    19155000
            DO'WIOC0(!20); <<Set masks=0>>                              19160000
            DO'WIOC0(!1F); <<Set references=1>>                         19165000
            DO'WIOC0(!4062); <<Send modifier two>>                      19170000
            DO'WIOC0(!F); <<Set statuses=1>>                            19175000
           END;                                                         19180000
         DRT'INIT;                                                      19185000
         ZERO'CPVA;                                                     19190000
         ST'DSJ'CH'PROGS;                                               19195000
         INTPSYS'ON;                                                    19200000
         D:=-1;                                                         19205000
         WHILE (D:=D+1)<=7                                              19210000
          DO                                                            19215000
           BEGIN                                                        19220000
            DO'WIOC0(!4040+D); <<Address device>>                       19225000
            DO'WIOC0(!4067); <<Send modifier seven>>                    19230000
            DO'WIOC0(!3F); <<Set masks=1>>                              19235000
           END;                                                         19240000
         DODELAY(STARTIME,5); <<Short wait>>                            19245000
         CHK'UNEXP'I(DEV);                                              19250000
         DO'WIOC0(!4040+DEV); <<Address the device under test>>         19255000
         DO'WIOC0(!4067); <<Send modifier seven>>                       19260000
         DO'WIOC0(!20); <<Set device mask 0>>                           19265000
         DO'WIOC0(!04); <<Set reference for CE=1>>                      19270000
         DO'WIOC0(!4062); <<Send modifier two>>                         19275000
         DO'WIOC0(!D); <<CA,CD=1, CH=0, SCA=1 for CE status change>>    19280000
         DODELAY(STARTIME,5); <<Short wait>>                            19285000
         A:=B:=0;                                                       19290000
         DO'RIOC0; A:=TOS'; <<Now read modem status lines>>             19295000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 19300000
         DO'RIOC0; <<Read the DSJ returned byte>>                       19305000
         IF A.(11:5)<>!1B <<CB,CC,CF & SCF>>                            19310000
          THEN                                                          19315000
           BEGIN                                                        19320000
            IF A.(11:5)<>!D                                             19325000
             THEN                                                       19330000
              BEGIN                                                     19335000
               NUM'CHARS:=GET'MESSAGE(40);                              19340000
               NUM2ASC(20,2,16,A.(11:5));                               19345000
               NUM2ASC(33,2,16,!1B);                                    19350000
               ERROROUT(-NUM'CHARS,1);                                  19355000
              END                                                       19360000
             ELSE ERROROUT(-GET'MESSAGE(39),1);                         19365000
           END                                                          19370000
          ELSE                                                          19375000
           BEGIN <<Continue the test case.>>                            19380000
            IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                      19385000
             THEN                                                       19390000
              BEGIN                                                     19395000
               NUM'CHARS:=GET'MESSAGE(41);                              19400000
               NUM2ASC(14,2,16,TOS'.(8:8));                             19405000
               NUM2ASC(27,2,16,0);                                      19410000
               ERROROUT(-NUM'CHARS,1);                                  19415000
              END;                                                      19420000
            CHK'UNEXP'I(DEV);                                           19425000
            DO'WIOC0(!4067); <<Send modifier 7>>                        19430000
            DO'WIOC0(!24); <<Mask on for CE>>                           19435000
            DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>   19440000
            IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                           19445000
             THEN                                                       19450000
              BEGIN                                                     19455000
               NUM'CHARS:=GET'MESSAGE(43);                              19460000
               NUM2ASC(42,2,16,B);                                      19465000
               NUM2ASC(54,1,16,2);                                      19470000
               ERROROUT(-NUM'CHARS,1);                                  19475000
              END;                                                      19480000
            IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                   19485000
             THEN                                                       19490000
              ERROROUT(-GET'MESSAGE(85),1); <<No.>>                     19495000
           END;                                                         19500000
         D:=-1;                                                         19505000
         INTPSYS'ON; <<INT'RECV disabled interrupts>>                   19510000
         WHILE (D:=D+1)<=7                                              19515000
          DO <<Any other device interrupt?>>                            19520000
           IF D<>DEV THEN CHK'UNEXP'I(D);                               19525000
         CHNL'INIT;                                                     19530000
         CHECKYTRAP; <<Check for operator interrupt request>>           19535000
        END; <<Place the next device number under test>>                19540000
$PAGE                                                                   19545000
  <<- STEP 34     -      CH - CE    (reference=0)                       19550000
                                                                        19555000
      The procedure described as test condition 2 is used to test       19560000
      the circuitry for each device associated with the lines           19565000
      CH, and CE.>>                                                     19570000
                                                                        19575000
      STP:=34;                                                          19580000
      INTPSYS'OFF;                                                      19585000
      CHNL'INIT;                                                        19590000
      DEV:=DESIRED'DEV-1;                                               19595000
      WHILE (DEV:=DEV+1)<=MAX'DEV                                       19600000
       DO                                                               19605000
        BEGIN                                                           19610000
         SETMASK;                                                       19615000
         D:=-1;                                                         19620000
         WHILE (D:=D+1)<=7                                              19625000
          DO                                                            19630000
           BEGIN                                                        19635000
            DO'WIOC0(!4040+D); <<Address device>>                       19640000
            DO'WIOC0(!4067); <<Send modifier seven>>                    19645000
            DO'WIOC0(!20); <<Set masks=0>>                              19650000
            DO'WIOC0(!00); <<Set references=0>>                         19655000
            DO'WIOC0(!4062); <<Send modifier two>>                      19660000
            DO'WIOC0(!0); <<Set statuses=0>>                            19665000
           END;                                                         19670000
         DRT'INIT;                                                      19675000
         ZERO'CPVA;                                                     19680000
         ST'DSJ'CH'PROGS;                                               19685000
         INTPSYS'ON;                                                    19690000
         D:=-1;                                                         19695000
         WHILE (D:=D+1)<=7                                              19700000
          DO                                                            19705000
           BEGIN                                                        19710000
            DO'WIOC0(!4040+D); <<Address device>>                       19715000
            DO'WIOC0(!4067); <<Send modifier seven>>                    19720000
            DO'WIOC0(!3F); <<Set masks=1>>                              19725000
           END;                                                         19730000
         DODELAY(STARTIME,5); <<Short wait>>                            19735000
         CHK'UNEXP'I(DEV);                                              19740000
         DO'WIOC0(!4040+DEV); <<Address the device under test>>         19745000
         DO'WIOC0(!4067); <<Send modifier seven>>                       19750000
         DO'WIOC0(!20); <<Set device mask 0>>                           19755000
         DO'WIOC0(!1B); <<Set reference for CE=0>>                      19760000
         DO'WIOC0(!4062); <<Send modifier two>>                         19765000
         DO'WIOC0(!2); <<CA,CD=0, CH=1, SCA=0 for CE status change>>    19770000
         DODELAY(STARTIME,5); <<Short wait>>                            19775000
         A:=B:=0;                                                       19780000
         DO'RIOC0; A:=TOS'; <<Now read modem status lines>>             19785000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 19790000
         DO'RIOC0; <<Read the DSJ returned byte>>                       19795000
         IF A.(11:5)<>!04 <<CE>>                                        19800000
          THEN                                                          19805000
           BEGIN                                                        19810000
            IF A.(11:5)<>!2                                             19815000
             THEN                                                       19820000
              BEGIN                                                     19825000
               NUM'CHARS:=GET'MESSAGE(40);                              19830000
               NUM2ASC(20,2,16,A.(11:5));                               19835000
               NUM2ASC(33,2,16,!04);                                    19840000
               ERROROUT(-NUM'CHARS,1);                                  19845000
              END                                                       19850000
             ELSE ERROROUT(-GET'MESSAGE(39),1);                         19855000
           END                                                          19860000
          ELSE                                                          19865000
           BEGIN <<Continue the test case.>>                            19870000
            IF TOS'.(8:8)<>3 <<Expect no DSJ yet>>                      19875000
             THEN                                                       19880000
              BEGIN                                                     19885000
               NUM'CHARS:=GET'MESSAGE(41);                              19890000
               NUM2ASC(14,2,16,TOS'.(8:8));                             19895000
               NUM2ASC(27,2,16,0);                                      19900000
               ERROROUT(-NUM'CHARS,1);                                  19905000
              END;                                                      19910000
            CHK'UNEXP'I(DEV);                                           19915000
            DO'WIOC0(!4067); <<Send modifier 7>>                        19920000
            DO'WIOC0(!24); <<Mask on for CE>>                           19925000
            DODELAY(STARTIME,5); <<DSJ'CH'PROG should interrupt now>>   19930000
            IF (B:=DSJ'CH'PROG(DEV*!15+5))<>2                           19935000
             THEN                                                       19940000
              BEGIN                                                     19945000
               NUM'CHARS:=GET'MESSAGE(43);                              19950000
               NUM2ASC(42,2,16,B);                                      19955000
               NUM2ASC(54,1,16,2);                                      19960000
               ERROROUT(-NUM'CHARS,1);                                  19965000
              END;                                                      19970000
            IF CPVA(DEV*4+2)<>CHNL+DEV <<Interrupt?>>                   19975000
             THEN                                                       19980000
              ERROROUT(-GET'MESSAGE(85),1); <<No.>>                     19985000
           END;                                                         19990000
         D:=-1;                                                         19995000
         INTPSYS'ON; <<INT'RECV disabled interrupts>>                   20000000
         WHILE (D:=D+1)<=7                                              20005000
          DO <<Any other device interrupt?>>                            20010000
           IF D<>DEV THEN CHK'UNEXP'I(D);                               20015000
         CHNL'INIT;                                                     20020000
         CHECKYTRAP; <<Check for operator interrupt request>>           20025000
        END; <<Place the next device number under test>>                20030000
                                                                        20035000
     END; <<End of Extended ADCC only tests>>                           20040000
$PAGE                                                                   20045000
   STP:=35;                                                             20050000
   CHNL'INIT;                                                           20055000
   DEV:=DESIRED'DEV-1;                                                  20060000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          20065000
    DO                                                                  20070000
     BEGIN                                                              20075000
      DO'WIOC0(!4040+DEV); <<Address device under test>>                20080000
      DO'WIOC0(!4063); <<Send service cond. modifier>>                  20085000
      DO'WIOC0(!6); <<Request when byte received>>                      20090000
      DO'WIOC0(!4064); <<Send modifier four>>                           20095000
                                                                        20100000
      <<Clear SP Character RAM addresses>>                              20105000
      <<for all addresses present.>>                                    20110000
      A:=-1;                                                            20115000
      WHILE (A:=A+1)<256 DO DO'WIOC0(A);                                20120000
                                                                        20125000
      DO'WIOC0(!4061); <<Send UART modifier>>                           20130000
      DO'WIOC0(!DE); <<Set up UART for this test>>                      20135000
      DO'WIOC0(!4066); <<Send baud rate select modifier>>               20140000
      DO'WIOC0(!8); <<Set to transmit at 9600 baud>>                    20145000
      DO'WIOC0(!18); <<Set to receive  at 9600 baud>>                   20150000
                                                                        20155000
      DO'WIOC0(!4067); <<Set reference at 0>>                           20160000
      DO'WIOC0(!0); <<Set mask on for all>>                             20165000
      DO'WIOC0(!20); <<lines for this test>>                            20170000
                                                                        20175000
      DO'WIOC0(!4060); <<Send modifier zero>>                           20180000
      B:=-1;                                                            20185000
      WHILE (B:=B+1)<=(IF EXTND THEN 7 ELSE 3)                          20190000
       DO                                                               20195000
        BEGIN                                                           20200000
         DO'WIOC0(B); <<Send the test byte>>                            20205000
         DODELAY(STARTIME,5);                                           20210000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 20215000
         DO'RIOC0; <<Read the DSJ returned byte>>                       20220000
         IF TOS'.(8:8)=2                                                20225000
          THEN                                                          20230000
           BEGIN                                                        20235000
            C:=TOS';                                                    20240000
            DO'WIOC0(!4062); <<set up and read the>>                    20245000
            DO'RIOC0; <<modem status>>                                  20250000
            IF TOS'.(11:5)=0                                            20255000
             THEN                                                       20260000
              BEGIN                                                     20265000
               NUM'CHARS:=GET'MESSAGE(41);                              20270000
               NUM2ASC(14,2,16,C.(8:8));                                20275000
               NUM2ASC(27,2,16,0);                                      20280000
               ERROROUT(-NUM'CHARS,1);                                  20285000
              END                                                       20290000
             ELSE                                                       20295000
              BEGIN                                                     20300000
               NUM'CHARS:=GET'MESSAGE(40);                              20305000
               NUM2ASC(20,2,16,TOS'.(11:5));                            20310000
               NUM2ASC(33,2,16,0);                                      20315000
               ERROROUT(-NUM'CHARS,1);                                  20320000
              END;                                                      20325000
           END;                                                         20330000
        END; <<Next test byte>>                                         20335000
      CHECKYTRAP; <<Check for operator interrupt request>>              20340000
                                                                        20345000
     END; <<Next device number>>                                        20350000
                                                                        20355000
   STP:=36;                                                             20360000
   CHNL'INIT;                                                           20365000
   DEV:=DESIRED'DEV-1;                                                  20370000
   WHILE (DEV:=DEV+1)<=MAX'DEV                                          20375000
    DO                                                                  20380000
     BEGIN                                                              20385000
      DO'WIOC0(!4040+DEV); <<Address device under test>>                20390000
      DO'WIOC0(!4063); <<Send service cond. modifier>>                  20395000
      DO'WIOC0(!6); <<Request when byte received>>                      20400000
      DO'WIOC0(!4064); <<Send modifier four>>                           20405000
                                                                        20410000
      <<Clear SP Character RAM addresses>>                              20415000
      <<for all addresses present.>>                                    20420000
      A:=-1;                                                            20425000
      WHILE (A:=A+1)<256 DO DO'WIOC0(A);                                20430000
                                                                        20435000
      DO'WIOC0(!4061); <<Send UART modifier>>                           20440000
      DO'WIOC0(!DE); <<Set up UART for this test>>                      20445000
      DO'WIOC0(!4066); <<Send baud rate select modifier>>               20450000
      DO'WIOC0(!8); <<Set to transmit at 9600 baud>>                    20455000
      DO'WIOC0(!18); <<Set to receive  at 9600 baud>>                   20460000
                                                                        20465000
      DO'WIOC0(!4067); <<Set reference at 0>>                           20470000
      DO'WIOC0(!1F); <<Set mask on for all>>                            20475000
      DO'WIOC0(!20); <<lines for this test>>                            20480000
                                                                        20485000
      DO'WIOC0(!4060); <<Send modifier zero>>                           20490000
      B:=-1;                                                            20495000
      WHILE (B:=B+1)<=(IF EXTND THEN 7 ELSE 3)                          20500000
       DO                                                               20505000
        BEGIN                                                           20510000
         DO'WIOC0(B); <<Send the test byte>>                            20515000
         DODELAY(STARTIME,5);                                           20520000
         DO'WIOC0(!4070); <<Send the DSJ command code>>                 20525000
         DO'RIOC0; <<Read the DSJ returned byte>>                       20530000
         IF TOS'.(8:8)=2                                                20535000
          THEN                                                          20540000
           BEGIN                                                        20545000
            C:=TOS';                                                    20550000
            DO'WIOC0(!4062); <<set up and read the>>                    20555000
            DO'RIOC0; <<modem status>>                                  20560000
            D:=(IF NOT EXTND THEN !1B ELSE !1F);                        20565000
            IF TOS'.(11:5)=D                                            20570000
             THEN                                                       20575000
              BEGIN                                                     20580000
               NUM'CHARS:=GET'MESSAGE(41);                              20585000
               NUM2ASC(14,2,16,C.(8:8));                                20590000
               NUM2ASC(27,2,16,D);                                      20595000
               ERROROUT(-NUM'CHARS,1);                                  20600000
              END                                                       20605000
             ELSE                                                       20610000
              BEGIN                                                     20615000
               NUM'CHARS:=GET'MESSAGE(40);                              20620000
               NUM2ASC(20,2,16,TOS'.(11:5));                            20625000
               NUM2ASC(33,2,16,D);                                      20630000
               ERROROUT(-NUM'CHARS,1);                                  20635000
              END;                                                      20640000
           END;                                                         20645000
        END; <<Next test byte>>                                         20650000
      CHECKYTRAP; <<Check for operator interrupt request>>              20655000
     END; <<Next device number>>                                        20660000
  CLEAR'UNX'DEV;                                                        20665000
  REP'ILL'INT;                                                          20670000
   DOT; <<Check ATTN/CNTL Y then print `period'>>                       20675000
  END;                                                                  20680000
$PAGE"ADCDIAG6  ADCC DIAGNOSTIC      SECTION NINE"                      20685000
IF SECTION(9) THEN BEGIN                                                20690000
                                                                        20695000
 <<SECTION 9  -  DSJ Priority Structure                                 20700000
                                                                        20705000
     This Section verifies the ADCC Device Specified Jump               20710000
     priority structure, which is: (highest priority first)             20715000
                                                                        20720000
         STATUS  should be read                                         20725000
         READ    request pending                                        20730000
         WRITE   request pending                                        20735000
         NO      request pending>>                                      20740000
                                                                        20745000
                                                                        20750000
 <<- STEP 37                                                            20755000
                                                                        20760000
   Each device is set up to request service when the transmit           20765000
   buffer is empty, a character is present in the UART receive          20770000
   buffer, or when a modem status line has changed from                 20775000
   reference.  A character is transmitted and received (using           20780000
   the loop-back connection path described in Section 2).               20785000
   This will cause the board (when enabled) to request service          20790000
   because the receive buffer has a character to be read.               20795000
   Modem status line CC is made to deviate from reference using         20800000
   the procedure described in Step 28 to cause the board to             20805000
   request service because the modem status line has changed            20810000
   from its established reference.                                      20815000
                                                                        20820000
   A DSJ is issued and the resulting returned byte is verified          20825000
   to be a two (highest priority), which is caused by the               20830000
   modem status line change.  The condition of the board                20835000
   requesting service for a modem status line change is now             20840000
   masked off using modifier 7.                                         20845000
                                                                        20850000
   A DSJ is issued and the resulting returned byte is verified          20855000
   to be a zero (next highest priority).  This condition should         20860000
   exist because of the character in the UART receive buffer.           20865000
   Now the board requesting service due to a character in the           20870000
   receive buffer is masked off using Service Condition Modifier        20875000
   Three.                                                               20880000
                                                                        20885000
   A DSJ is issued and the resulting returned byte is verified          20890000
   to be a one, which is due to the empty UART transmit buffer.         20895000
   The request due to this condition is masked off using Service        20900000
   Condition Modifier Three.                                            20905000
                                                                        20910000
   A DSJ is issued and the resulting returned byte is verified          20915000
   to be a three, which means there are no requests and is              20920000
   the lowest priority.>>                                               20925000
                                                                        20930000
     STP:=37;                                                           20935000
     DEV:=DESIRED'DEV-1;                                                20940000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               20945000
     CHNL'INIT;                                                         20950000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             20955000
     DO'WIOC0(!4061); <<Set board up to request>>                       20960000
     DO'WIOC0(!DE); <<service so as to catch>>                          20965000
     DO'WIOC0(!4063); <<Send service request modifier>>                 20970000
     DO'WIOC0(!4); <<Request when xmit buffer not full>>                20975000
     DO'WIOC0(!6); <<Request when byte received>>                       20980000
     DO'WIOC0(!4066); <<Set up UART to xmit/recv at>>                   20985000
     DO'WIOC0(!8); <<9600 baud>>                                        20990000
     DO'WIOC0(!18);                                                     20995000
     DO'WIOC0(!4067); <<Send modifier seven>>                           21000000
     DO'WIOC0(!17); <<Set reference for CC=0>>                          21005000
     DO'WIOC0(!32); <<Mask on for this line>>                           21010000
     DO'WIOC0(!4062); <<Send modifier 2 and>>                           21015000
     DO'WIOC0(!4); <<wiggle CD to change CC>>                           21020000
     DODELAY(STARTIME,10);                                              21025000
     DO'RIOC0;  A:=TOS'; <<Read modem status>>                          21030000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     21035000
     DO'RIOC0; <<Read the DSJ returned byte>>                           21040000
     IF A.(11:5)<>!8 THEN ERROROUT(-GET'MESSAGE(37),1);                 21045000
     IF TOS'.(8:8)<>2 THEN BEGIN                                        21050000
        NUM'CHARS:=GET'MESSAGE(41);                                     21055000
        NUM2ASC(14,2,16,TOS'.(8:8));                                    21060000
        NUM2ASC(27,2,16,2);                                             21065000
        ERROROUT(-NUM'CHARS,1);                                         21070000
        END;                                                            21075000
                                                                        21080000
     DO'WIOC0(!4067); <<Send modifier seven and>>                       21085000
     DO'WIOC0(!20); <<mask off for all lines>>                          21090000
     DO'WIOC0(!4060); <<Send modifier zero>>                            21095000
     DO'WIOC0(!55); <<Send data to receive buffer>>                     21100000
     DODELAY(STARTIME,10); <<Wait for byte to be received>>             21105000
     DO'WIOC0(!4070); <<Send DSJ command code>>                         21110000
     DO'RIOC0; <<and read the DSJ byte>>                                21115000
     IF TOS'.(8:8)<>0 THEN BEGIN                                        21120000
        NUM'CHARS:=GET'MESSAGE(41);                                     21125000
        NUM2ASC(14,2,16,TOS'.(8:8));                                    21130000
        NUM2ASC(27,2,16,0);                                             21135000
        ERROROUT(-NUM'CHARS,1);                                         21140000
        END;                                                            21145000
                                                                        21150000
     DO'WIOC0(!4063); <<Send service condition mod.>>                   21155000
     DO'WIOC0(!2); <<NO request when byte received>>                    21160000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     21165000
     DO'RIOC0; <<and read the DSJ byte>>                                21170000
     IF TOS'.(8:8)<>1 THEN BEGIN                                        21175000
        NUM'CHARS:=GET'MESSAGE(41);                                     21180000
        NUM2ASC(14,2,16,TOS'.(8:8));                                    21185000
        NUM2ASC(27,2,16,1);                                             21190000
        ERROROUT(-NUM'CHARS,1);                                         21195000
        END;                                                            21200000
                                                                        21205000
     DO'WIOC0(!4063); <<Send service condition mod.>>                   21210000
     DO'WIOC0(!0); <<and NO request for buf not full>>                  21215000
     DO'WIOC0(!4070); <<Send DSJ code>>                                 21220000
     DO'RIOC0; <<Read DSJ byte>>                                        21225000
     IF TOS'.(8:8)<>3 THEN BEGIN                                        21230000
        NUM'CHARS:=GET'MESSAGE(41);                                     21235000
        NUM2ASC(14,2,16,TOS'.(8:8));                                    21240000
        NUM2ASC(27,2,16,3);                                             21245000
        ERROROUT(-NUM'CHARS,1);                                         21250000
        END;                                                            21255000
         CHECKYTRAP; <<Check for operator interrupt request>>           21260000
     END; <<Place the next device number under test>>                   21265000
  CLEAR'UNX'DEV;                                                        21270000
  REP'ILL'INT;                                                          21275000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        21280000
END;                                                                    21285000
$PAGE"ADCDIAG6  ADCC DIAGNOSTIC      SECTION TEN"                       21290000
IF SECTION(10) THEN BEGIN                                               21295000
                                                                        21300000
 <<The ability of the ADCC under test to return the correct response    21305000
     to a register 2 read while the ADCC is asserting CSRQ on the IMB   21310000
     is verified.  This step cannot be done with a software read, hence 21315000
     a channel program instruction read is used to verify the sense     21320000
     of bit 10.>>                                                       21325000
                                                                        21330000
  <<- STEP 38     -                                                     21335000
                                                                        21340000
   The channel program instruction READ REGISTER is used to read        21345000
   the contents of Register 2.  The channel program is then             21350000
   terminated, and the results of the read are verified to be           21355000
   !802A.  Note the difference between the software register 2          21360000
   read in Step 2 and this channel program instruction read.            21365000
   Bit 10 should be a one only while CSRQ is being asserted.>>          21370000
                                                                        21375000
     STP:=38;                                                           21380000
     CHNL'INIT;                                                         21385000
     DEV:=DESIRED'DEV-1;                                                21390000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               21395000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 21400000
     DO'WIOC0(!4061); <<Set board up to request>>                       21405000
     DO'WIOC0(!DE); <<service so as to catch>>                          21410000
     DO'WIOC0(!4063); <<bit 10 in 'POLL'>>                              21415000
     DO'WIOC0(!4);                                                      21420000
     SETUP'DRT(DEV); <<Set up DRT for this device>>                     21425000
     SET'CPVA;                                                          21430000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000); <<Write the program>>         21435000
                                                                        21440000
     TOS'1:=(CHNL+DEV);  TOS':=!F000; DO'SIOP;                          21445000
     DODELAY(STARTIME,10); <<Wait for chnl pgm completion>>             21450000
     V'GETS'MEM(TOS',!F001); <<Get RREG reserved word>>                 21455000
     IF TOS'<>!802A THEN BEGIN  <<Insure correct value of RREG>>        21460000
        NUM'CHARS:=GET'MESSAGE(48);                                     21465000
        NUM2ASC(20,4,16,TOS');                                          21470000
        ERROROUT(-NUM'CHARS,1);                                         21475000
        END;                                                            21480000
     END; <<Place the next device number under test>>                   21485000
  CLEAR'UNX'DEV;                                                        21490000
  REP'ILL'INT;                                                          21495000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        21500000
END;                                                                    21505000
$PAGE"ADCDIAG6  ADCC DIAGNOSTIC      SECTION ELEVEN"                    21510000
IF SECTION(11) THEN BEGIN                                               21515000
                                                                        21520000
 <<SECTION 11  -  Identify                                              21525000
                                                                        21530000
     Section eleven verifies correct operation of the ADCC identify     21535000
     logic to, upon request, provide two bytes (unique to ADCCs) used   21540000
     to identify which devices are present.                             21545000
                                                                        21550000
     Next, the ability of the ADCC to assert the Data Not Valid line    21555000
     for the ADCC-Extended device numbers (3-7) when not present        21560000
     during an IDentify sequence is tested.>>                           21565000
                                                                        21570000
  <<-STEP 39   -     "software equivalent" Identify                     21575000
           A direct I/O write with a special opcodeis issued, followed  21580000
           by two direct I/O register zero reads which simulates the    21585000
           channel program instruction "IDENTIFY".                      21590000
                                                                        21595000
           The two returned bytes are then verified to !4080, which is  21600000
           the unique identify code of ADCCs.>>                         21605000
                                                                        21610000
     STP:=39;                                                           21615000
     CHNL'INIT;                                                         21620000
     DEV:=DESIRED'DEV-1;                                                21625000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               21630000
     DO'WIOC0(!405F); <<Send 'UNTALK'>>                                 21635000
     DO'WIOC0(!4060+DEV); <<Send the 'ID' modifier>>                    21640000
     DO'RIOC0;    A:=TOS'; <<Read first returned byte>>                 21645000
     DO'RIOC0;    B:=TOS'; <<Read the second returned byte>>            21650000
     A:=(A AND !FF) CSL (8);                                            21655000
     B:=(B AND !FF) + A;                                                21660000
     IF B<>!4080 THEN BEGIN                                             21665000
        NUM'CHARS:=GET'MESSAGE(49);                                     21670000
        MSG'OUT(16):=!30+DEV;                                           21675000
        NUM2ASC(28,4,16,B);                                             21680000
        ERROROUT(-NUM'CHARS,0);                                         21685000
        END;                                                            21690000
                                                                        21695000
         CHECKYTRAP; <<Check for operator interrupt request>>           21700000
                                                                        21705000
     END; <<Place the next device number under test>>                   21710000
                                                                        21715000
$PAGE                                                                   21720000
  <<- STEP 40     -     Identify each device                            21725000
                                                                        21730000
           A channel program identify is executed for each device on the21735000
           ADCC, and the returned bytes are verified to !4080.>>        21740000
                                                                        21745000
     STP:=40;                                                           21750000
     DEV:=DESIRED'DEV-1;                                                21755000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               21760000
     SET'CPVA;                                                          21765000
     SETUP'DRT(DEV); <<Go make DRT for this device>>                    21770000
     MOVE'CHNL'PGM(ID'CHNL'PGM,5,!F000);                                21775000
     TOS'1:=(CHNL+DEV);  TOS':=!F000; DO'SIOP;                          21780000
     DODELAY(STARTIME,10);                                              21785000
     V'GETS'MEM(TOS',!F001);                                            21790000
     IF TOS'<>!4080 THEN BEGIN                                          21795000
        NUM'CHARS:=GET'MESSAGE(49);                                     21800000
        MSG'OUT(16):=!30+DEV;                                           21805000
        NUM2ASC(28,4,16,TOS');                                          21810000
        ERROROUT(-NUM'CHARS,0);                                         21815000
        END;                                                            21820000
                                                                        21825000
     END; <<Place the next device number under test>>                   21830000
                                                                        21835000
                                                                        21840000
 <<STEP 41     -     DNV set for ID of missing device numbers           21845000
                                                                        21850000
      A software equivalent IDentify is issued for each device          21855000
      (3-7) of the ADCC-Extended, and a test is made using the          21860000
      fact that Data Not Valid being asserted will set condition        21865000
      code CCL in the CPU status register.>>                            21870000
                                                                        21875000
IF NOT EXTND THEN BEGIN                                                 21880000
     STP:=41;                                                           21885000
     DEV:=3;                                                            21890000
     WHILE (DEV:=DEV+1)<8 DO BEGIN                                      21895000
     DO'WIOC0(!405F); <<Send 'UNTALK'>>                                 21900000
     DO'WIOC0(!4060+DEV); <<Send 'ID' modifier>>                        21905000
     CHECK'DNV; <<First check for DNV>>                                 21910000
     B:=(IF DNV THEN 1 ELSE 0);                                         21915000
     CHECK'DNV; <<Second check for DNV>>                                21920000
     B:=(IF DNV THEN B ELSE 0);                                         21925000
     IF NOT B THEN ERROROUT(-GET'MESSAGE(50),1);                        21930000
     END; <<Place the next device number under test>>                   21935000
END;                                                                    21940000
  CLEAR'UNX'DEV;                                                        21945000
  REP'ILL'INT;                                                          21950000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        21955000
END;                                                                    21960000
$PAGE"ADCDIAG6  ADCC DIAGNOSTIC      SECTION TWELVE"                    21965000
IF SECTION(12) THEN BEGIN                                               21970000
                                                                        21975000
     <<The ADCC logic is capable of suppressing the assertion of CSRQ   21980000
   on the IMB.  This is done by sending an address to talk or           21985000
   listen for any of the following device numbers: 16,18,20 or 22,      21990000
   followed by any one of the following secondary addresses: 17,19      21995000
   21,23,25,27,29 or 31.                                                22000000
                                                                        22005000
   Any reset (PON, SRST, etc.) of the ADCC will re-enable CSRQ          22010000
   assertion.  Also, CSRQ assertion can be re-enabled by sending an     22015000
   address to talk or listen for any of the following device numbers:   22020000
   0,1,2,3,4,5,6,7 or 31, followed by any of the following secondary    22025000
   addresses: 0,1,2,3,4,5,6,7 or 16.                                    22030000
                                                                        22035000
   This Section places this logic under test>>                          22040000
                                                                        22045000
      <<- STEP 42 -  Inhibit CSRQ                                       22050000
                                                                        22055000
      All combinations of the above mentioned primary and               22060000
      secondary address commands are used to insure that all of         22065000
      these combinations will disable CSRQ assertion.  The              22070000
      execution of a channel program using the instructions             22075000
      RREG 2 and INT,HLT is attempted.  If, after one of the            22080000
      combinations of primary and secondary commands is used to         22085000
      disallow CSRQ assertion, the execution is successful, the         22090000
      combination will be reported as                                   22095000
                                                                        22100000
       "Primary XX, secondary YY does not disable CSRQ,  Dev=d"         22105000
                                                                        22110000
      The IMB I/O command initialize will be used to re-enable          22115000
      CSRQ after each combination is found to be successful in          22120000
      disabling CSRQ assertion.  If the initialize does not             22125000
      re-enable CSRQ assertion, the message                             22130000
                                                                        22135000
       "INIT does not re-enable CSRQ.  Primary XX, secondary YY"        22140000
                                                                        22145000
      is displayed.>>                                                   22150000
                                                                        22155000
     STP:=42;                                                           22160000
     CHNL'INIT;                                                         22165000
     DEV:=DESIRED'DEV-1;                                                22170000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               22175000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             22180000
     DO'WIOC0(!4067); <<Set reference at 0>>                            22185000
     DO'WIOC0(!0); <<Set mask on for all>>                              22190000
     DO'WIOC0(!20); <<lines for this test>>                             22195000
     CHNL'INIT; <<INITialize the channel>>                              22200000
     SETUP'DRT(DEV); <<In case of successful execution>>                22205000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               22210000
                                                                        22215000
     A:=-1;                                                             22220000
     WHILE (A:=A+1)<4 DO BEGIN <<Primary loop>>                         22225000
     B:=-1;                                                             22230000
     WHILE (B:=B+1)<8 DO BEGIN <<Secondary loop>>                       22235000
     MEM'GETS'V(!F001,0); <<Clear RREG word>>                           22240000
     INTPSYS'ON; <<Allow external interrupts>>                          22245000
     DO'WIOC0(DCSRQBUF1(A)); <<Send the Primary>>                       22250000
     DO'WIOC0(DCSRQBUF2(B)); <<Send the Secondary>>                     22255000
     TOS'1:=(CHNL+DEV);                                                 22260000
     TOS':=!F000;                                                       22265000
     DO'SIOP;                                                           22270000
     DODELAY(STARTIME,10);                                              22275000
     INTPSYS'OFF;                                                       22280000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          22285000
     IF TOS'<>0 THEN BEGIN                                              22290000
        NUM'CHARS:=GET'MESSAGE(45);                                     22295000
        NUM2ASC(8,2,10,MDCSRQBUF1(A));                                  22300000
        NUM2ASC(22,2,10,MDCSRQBUF2(B));                                 22305000
        ERROROUT(-NUM'CHARS,1);                                         22310000
        END;                                                            22315000
                                                                        22320000
     CHNL'INIT; <<INIT to clear CSRQ disable>>                          22325000
     MEM'GETS'V(!F001,0);                                               22330000
     INTPSYS'ON; <<Allow external interrupts>>                          22335000
     TOS'1:=(CHNL+DEV);                                                 22340000
     TOS':=!F000; DO'SIOP; <<Issue SIOP again>>                         22345000
     DODELAY(STARTIME,10); <<Wait in case of c.p. execution>>           22350000
     INTPSYS'OFF; <<No more external interrupts>>                       22355000
     V'GETS'MEM(TOS',!F001); <<Get the RREG word>>                      22360000
     IF TOS'=0 THEN BEGIN                                               22365000
        NUM'CHARS:=GET'MESSAGE(46);                                     22370000
        NUM2ASC(39,2,10,MDCSRQBUF1(A));                                 22375000
        NUM2ASC(53,2,10,MDCSRQBUF2(B));                                 22380000
        ERROROUT(-NUM'CHARS,1);                                         22385000
        END;                                                            22390000
                                                                        22395000
     END; <<Next secondary address>>                                    22400000
     END; <<Next primary address>>                                      22405000
         DOT; <<Check ATTN/CNTL Y then print `period'>>                 22410000
     END; <<Place the next device number under test>>                   22415000
$PAGE                                                                   22420000
<<- STEP 43     -  Re-enable CSRQ                                       22425000
                                                                        22430000
     The primary/secondary combination, address to talk 16,secondary    22435000
     address 17, is used to disable CSRQ assertion, then all combina-   22440000
     tions of the above mentions primary and secondart address commands 22445000
     are used to insure that all of these combinations will re-enable   22450000
     CSRQ assertion.  The channel program used in the previous step     22455000
     is used in this step also to insure channel program execution.     22460000
                                                                        22465000
     If one of these combinations proves unsuccessful in re-enabling    22470000
     CSRQ assertion, the message                                        22475000
                                                                        22480000
      "Primary XX, secondary YY do not re-enable CSRQ.  Dev=D"          22485000
                                                                        22490000
     is displayed.>>                                                    22495000
                                                                        22500000
     STP:=43;                                                           22505000
     DEV:=DESIRED'DEV-1;                                                22510000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               22515000
     CHNL'INIT; <<Do Channel INITialize>>                               22520000
     SETUP'DRT(DEV); <<Set DRT area>>                                   22525000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               22530000
                                                                        22535000
     A:=-1;                                                             22540000
     WHILE (A:=A+1)<9 DO BEGIN                                          22545000
     B:=-1;                                                             22550000
     WHILE (B:=B+1)<9 DO BEGIN                                          22555000
     MEM'GETS'V(!F001,0);                                               22560000
     DO'WIOC0(!4030); <<Address to talk 16>>                            22565000
     DO'WIOC0(!4071); <<Secondary address 17>>                          22570000
                                                                        22575000
     DO'WIOC0(ENCSRQBUF1(A)); <<Send the primary>>                      22580000
     DO'WIOC0(ENCSRQBUF2(B)); <<Send secondary>>                        22585000
     TOS':=!F000;  TOS'1:=(CHNL+DEV); DO'SIOP;                          22590000
     DODELAY(STARTIME,10);                                              22595000
     V'GETS'MEM(TOS',!F001); <<Get the RREG word>>                      22600000
     IF TOS'=0 THEN BEGIN       <<Test for chnl pgm execution>>         22605000
        NUM'CHARS:=GET'MESSAGE(47);                                     22610000
        NUM2ASC(8,2,10,MENCSRQBUF1(A));                                 22615000
        NUM2ASC(22,2,10,MENCSRQBUF2(B));                                22620000
        ERROROUT(-NUM'CHARS,1);                                         22625000
        END;                                                            22630000
                                                                        22635000
     END; <<Next secondary for combinations>>                           22640000
     END; <<Next primary for combinations>>                             22645000
         DOT; <<Check ATTN/CNTL Y then print `period'>>                 22650000
     END; <<Place next device number under test>>                       22655000
$PAGE                                                                   22660000
                                                                        22665000
<<This section places under test the program status register logic      22670000
   and the logic which inhibits CSRQ assertion.  This is done with a    22675000
   test for bit 6 of the word returned as a result of an OBSI.          22680000
                                                                        22685000
   This bit is defined to be a one when a service request is due        22690000
   to a parallel poll, or when there has been a change in channel       22695000
   program running status. The next four steps make a change to         22700000
   the channel program run status, and check this bit by inhibiting     22705000
   CSRQ assertion (using the method defined in the previous test        22710000
   section, then emulating SIOP or HIOP with the set/clear bit          22715000
   of the data lines set or clear as necessary to change the            22720000
   running status>>                                                     22725000
                                                                        22730000
                                                                        22735000
                                                                        22740000
     <<Step 44 - SIOP w/bit set - (should change run status)>>          22745000
                                                                        22750000
     STP:=44;                                                           22755000
     CHNL'INIT;                                                         22760000
     DEV:=DESIRED'DEV-1;                                                22765000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               22770000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 22775000
     DO'WIOC0(!4030); <<Address to talk 16>>                            22780000
     DO'WIOC0(!4071); <<Secondary address 17>>                          22785000
     SETUP'DRT(DEV); <<Set DRT's and Traps>>                            22790000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               22795000
     MEM'GETS'V((CHNL+DEV)*4,!F000);                                    22800000
     TOS'1:=(CHNL+!4000); <<SIOP opcode and channel>>                   22805000
     TOS':=DEV; <<Bit 12 will set new run status>>                      22810000
     DO'PSIOP; <<Emulate SIOP>>                                         22815000
     DODELAY(STARTIME,10); <<Short wait loop>>                          22820000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          22825000
     IF TOS'<>0 THEN BEGIN      <<Channel program must not execute>>    22830000
        NUM'CHARS:=GET'MESSAGE(45);                                     22835000
        NUM2ASC(8,2,10,16);                                             22840000
        NUM2ASC(22,2,10,17);                                            22845000
        ERROROUT(-NUM'CHARS,1);                                         22850000
        END;                                                            22855000
                                                                        22860000
     OBSI; <<Read the OBSI word>>                                       22865000
     A:=((CHNL+DEV)+!200);                                              22870000
     IF TOS'<> A THEN BEGIN              <<Check the value>>            22875000
        NUM'CHARS:=GET'MESSAGE(67);                                     22880000
        NUM2ASC(16,4,16,TOS');                                          22885000
        NUM2ASC(31,4,16,A);                                             22890000
        ERROROUT(-NUM'CHARS,1);                                         22895000
        END;                                                            22900000
     CHNL'INIT;                                                         22905000
     END; <<Place the next device number under test>>                   22910000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        22915000
                                                                        22920000
     STP:=45;                                                           22925000
     DEV:=DESIRED'DEV-1;                                                22930000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               22935000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 22940000
     DO'WIOC0(!4030); <<Address to talk 16>>                            22945000
     DO'WIOC0(!4071); <<Secondary address 17>>                          22950000
     SETUP'DRT(DEV); <<Set DRT's and Traps>>                            22955000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               22960000
     MEM'GETS'V((CHNL+DEV)*4,!F000);                                    22965000
     TOS'1:=(CHNL+!4000); <<SIOP opcode+chnl>>                          22970000
     TOS':=!8+DEV; <<Bit 12 will clear new status>>                     22975000
     DO'PSIOP; <<Emulate SIOP>>                                         22980000
     DODELAY(STARTIME,10); <<Short wait loop>>                          22985000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          22990000
     IF TOS'<>0 THEN BEGIN      <<Channel program must not execute>>    22995000
        NUM'CHARS:=GET'MESSAGE(45);                                     23000000
        NUM2ASC(8,2,10,16);                                             23005000
        NUM2ASC(22,2,10,17);                                            23010000
        ERROROUT(-NUM'CHARS,1);                                         23015000
        END;                                                            23020000
                                                                        23025000
     A:=CHNL+3; <<Make the compare word>>                               23030000
     OBSI; <<Read the OBSI word>>                                       23035000
     IF TOS'<>A THEN BEGIN      <<Check the returned value>>            23040000
        NUM'CHARS:=GET'MESSAGE(67);                                     23045000
        NUM2ASC(16,4,16,TOS');                                          23050000
        NUM2ASC(31,4,16,A);                                             23055000
        ERROROUT(-NUM'CHARS,1);                                         23060000
        END;                                                            23065000
     CHNL'INIT;                                                         23070000
         CHECKYTRAP; <<Check for operator interrupt request>>           23075000
     END; <<Place the next device number under test>>                   23080000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        23085000
                                                                        23090000
     STP:=46;                                                           23095000
     DEV:=DESIRED'DEV-1;                                                23100000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               23105000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 23110000
     DO'WIOC0(!4030); <<Address to talk 16>>                            23115000
     DO'WIOC0(!4071); <<Secondary address 17>>                          23120000
     SETUP'DRT(DEV); <<Set DRT's and Traps>>                            23125000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               23130000
     MEM'GETS'V((CHNL+DEV)*4,!F000);                                    23135000
     TOS'1:=(CHNL+!6000); <<HIOP opcode and channel>>                   23140000
     TOS':=DEV; <<Bit 12 will set new run status>>                      23145000
     DO'PSIOP; <<Emulate SIOP>>                                         23150000
     DODELAY(STARTIME,10); <<Short wait loop>>                          23155000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          23160000
     IF TOS'<>0 THEN BEGIN      <<Channel program must not execute>>    23165000
        NUM'CHARS:=GET'MESSAGE(45);                                     23170000
        NUM2ASC(8,2,10,16);                                             23175000
        NUM2ASC(22,2,10,17);                                            23180000
        ERROROUT(-NUM'CHARS,1);                                         23185000
        END;                                                            23190000
                                                                        23195000
     OBSI; <<Read the OBSI word>>                                       23200000
     A:=((CHNL+DEV)+!200); <<Make the compare word>>                    23205000
     IF TOS'<>A THEN BEGIN          <<ck the returned value>>           23210000
        NUM'CHARS:=GET'MESSAGE(67);                                     23215000
        NUM2ASC(16,4,16,TOS');                                          23220000
        NUM2ASC(31,4,16,A);                                             23225000
        ERROROUT(-NUM'CHARS,1);                                         23230000
        END;                                                            23235000
     CHNL'INIT;                                                         23240000
         CHECKYTRAP; <<Check for operator interrupt request>>           23245000
     END; <<Place the next device number under test>>                   23250000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        23255000
                                                                        23260000
     STP:=47;                                                           23265000
     DEV:=DESIRED'DEV-1;                                                23270000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               23275000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 23280000
     DO'WIOC0(!4030); <<Address to talk 16>>                            23285000
     DO'WIOC0(!4071); <<Secondary address 17>>                          23290000
     SETUP'DRT(DEV); <<Set DRT's and Traps>>                            23295000
     MOVE'CHNL'PGM(RG2'CHNL'PGM,5,!F000);                               23300000
     MEM'GETS'V((CHNL+DEV)*4,!F000);                                    23305000
     TOS'1:=(CHNL+!6000); <<HIOP opcode+chnl>>                          23310000
     TOS':=!8+DEV; <<Bit 12 will clear new status>>                     23315000
     DO'PSIOP; <<Emulate SIOP>>                                         23320000
     DODELAY(STARTIME,10); <<Short wait loop>>                          23325000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          23330000
     IF TOS'<>0 THEN BEGIN      <<Channel program must not execute>>    23335000
        NUM'CHARS:=GET'MESSAGE(45);                                     23340000
        NUM2ASC(8,2,10,16);                                             23345000
        NUM2ASC(22,2,10,17);                                            23350000
        ERROROUT(-NUM'CHARS,1);                                         23355000
        END;                                                            23360000
                                                                        23365000
     A:=CHNL+3; <<Make the compare word>>                               23370000
     OBSI; <<Read the OBSI word>>                                       23375000
     IF TOS'<>A THEN BEGIN      <<Check the returned value>>            23380000
        NUM'CHARS:=GET'MESSAGE(67);                                     23385000
        NUM2ASC(16,4,16,TOS');                                          23390000
        NUM2ASC(31,4,16,A);                                             23395000
        ERROROUT(-NUM'CHARS,1);                                         23400000
        END;                                                            23405000
     CHNL'INIT;                                                         23410000
         CHECKYTRAP; <<Check for operator interrupt request>>           23415000
     END; <<Place the next device number under test>>                   23420000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        23425000
$PAGE                                                                   23430000
<<STEP 48 - Correct SPOLL1 response>>                                   23435000
                                                                        23440000
   <<SIOP is again emulated and while the board is awaiting             23445000
      service from the CPU, an SPOLL1 is emulated using the WIOC        23450000
      instruction w/ a special opcode>>                                 23455000
                                                                        23460000
                                                                        23465000
     STP:=48;                                                           23470000
     DEV:=DESIRED'DEV-1;                                                23475000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               23480000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 23485000
     DO'WIOC0(!4030);                                                   23490000
     DO'WIOC0(!4071);                                                   23495000
     SETUP'DRT(DEV);                                                    23500000
                                                                        23505000
     TOS'1:=(CHNL+!4000); <<SIOP opcode + channel number>>              23510000
     TOS':=DEV; <<Bit 12=0>>                                            23515000
     DO'PSIOP; <<Emulate SIOP>>                                         23520000
     DODELAY(STARTIME,10);                                              23525000
     V'GETS'MEM(TOS',!F001); <<Get RREG word>>                          23530000
     IF TOS'<>0 THEN BEGIN      <<Channel program must not execute>>    23535000
        NUM'CHARS:=GET'MESSAGE(45);                                     23540000
        NUM2ASC(8,2,10,16);                                             23545000
        NUM2ASC(22,2,10,17);                                            23550000
        ERROROUT(-NUM'CHARS,1);                                         23555000
        END;                                                            23560000
                                                                        23565000
     SPOLL1; <<SPOLL1>>                                                 23570000
     IF TOS'<>CHNLBIT THEN BEGIN                                        23575000
        NUM'CHARS:=GET'MESSAGE(68);                                     23580000
        NUM2ASC(18,4,16,TOS');                                          23585000
        NUM2ASC(33,4,16,CHNLBIT);                                       23590000
        ERROROUT(-NUM'CHARS,1);                                         23595000
        END;                                                            23600000
                                                                        23605000
     CHNL'INIT;                                                         23610000
         CHECKYTRAP; <<Check for operator interrupt request>>           23615000
     END; <<Place next device number under test>>                       23620000
  CLEAR'UNX'DEV;                                                        23625000
  REP'ILL'INT;                                                          23630000
  DOT; <<Check ATTN/CNTL Y then print `period'>>                        23635000
END;                                                                    23640000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC      SECTION THIRTEEN"                  23645000
  IF SECTION(13)                                                        23650000
   THEN                                                                 23655000
    BEGIN                                                               23660000
                                                                        23665000
 <<SECTION 13  -  ADCC Channel Program                                  23670000
                                                                        23675000
    Section thirteen heavily employs use of channel program             23680000
    processing micro-code, and places the entire ADCC under test.       23685000
    Each logic function block has been placed under test one or         23690000
    more times by the previous twelve Sections.>>                       23695000
                                                                        23700000
                                                                        23705000
 <<- STEP 49     -                                                      23710000
    Using a channel program, this step initializes the ADCC, by         23715000
    setting up the various service conditions, baud rates, UART         23720000
    control, modem references and defines a special character.  A       23725000
    256 byte output transfer is started (for each device) with          23730000
    each byte being read (thru the loop back connector described        23735000
    in Section Two) and placed in memory.  When the channel             23740000
    programs for all devices are complete, the data in the input        23745000
    buffers is verified.                                                23750000
    The possible error conditions of this step and probable             23755000
    causes if definable, are as follows:                                23760000
                                                                        23765000
                                         symptom(probable cause)        23770000
                                                                        23775000
       channel program did not start   -   CSRQ not pulled (ADCC)       23780000
                                           not recognized (CPU)         23785000
                                                                        23790000
       channel program did not          -  overrun or parity error      23795000
       complete correctly                  break detected,(ADCC)        23800000
                                           non-responding module        23805000
                                           (memory),  channel           23810000
                                           program abort (CPU)          23815000
                                           special character            23820000
                                           was not detected (ADCC)      23825000
                                                                        23830000
       channel program timed out        -  CSRQ logic                   23835000
                                                                        23840000
       data error                       -  missing or extra bits        23845000
                                           or bytes.>>                  23850000
                                                                        23855000
                                                                        23860000
     STP:=49;                                                           23865000
     CHNL'INIT; <<Initialize the channel>>                              23870000
     SET'CPVA; <<Clear CPVA's / setup DRT's>>                           23875000
                                                                        23880000
     LOAD'TRAPS;                                                        23885000
                                                                        23890000
     LOAD'INTHNDLRS; <<Get Interrupt Handler pointers>>                 23895000
     DEV:=DESIRED'DEV-1;                                                23900000
     WHILE (DEV:=DEV+1)<=MAX'DEV                                        23905000
      DO                                                                23910000
       BEGIN                                                            23915000
 <<Get Interrupt routine labels into DRT of each Device>>               23920000
        MEM'GETS'V((CHNL+DEV)*4+2,TEMPARRAY(DEV));                      23925000
       END;                                                             23930000
                                                                        23935000
                                                                        23940000
     MOVE'CHNL'PGM(MEMAP,136,!E000);                                    23945000
                                                                        23950000
     <<STORE CHANNEL PROGRAMS INTO MEMORY>>                             23955000
                                                                        23960000
     DEV:=DESIRED'DEV-1;                                                23965000
     WHILE (DEV:=DEV+1)<=MAX'DEV                                        23970000
      DO                                                                23975000
       BEGIN                                                            23980000
        ADCC'CHNL'PGM(83):=CHG'ADDR'ARRAY(DEV*2);                       23985000
        ADCC'CHNL'PGM(100):=CHG'ADDR'ARRAY(DEV*2+1);                    23990000
        ADCC'CHNL'PGM(105):=CHG'ADDR'ARRAY(DEV*2+1);                    23995000
        <<THESE CODES ARE FOR CPVA(2)>>                                 24000000
        ADCC'CHNL'PGM(85):=!50+DEV; <<OK>>                              24005000
        ADCC'CHNL'PGM(107):=!10+DEV; <<Break detected>>                 24010000
        ADCC'CHNL'PGM(109):=!20+DEV; <<Overrun or Parity error>>        24015000
        ADCC'CHNL'PGM(71):=!30+DEV; <<Unexpected DSJ value>>            24020000
                                                                        24025000
        MOVE'CHNL'PGM(ADCC'CHNL'PGM,111,ADDARRAY(DEV));                 24030000
                                                                        24035000
        <<Clear the input buffer>>                                      24040000
        ADDR:=CHG'ADDR'ARRAY(DEV*2);                                    24045000
        ADR'LIM:=ADDR+127; <<Limit>>                                    24050000
        MEM'GETS'V(ADDR,-1); <<First word=-1>>                          24055000
        <<Zero in rest of array>>                                       24060000
        WHILE (ADDR:=ADDR+1)<=ADR'LIM                                   24065000
         DO                                                             24070000
          BEGIN                                                         24075000
           MEM'GETS'V(ADDR,0);                                          24080000
          END;                                                          24085000
       END; <<Do for all devices>>                                      24090000
                                                                        24095000
     CLEARIRQ;                                                          24100000
     CLEAR'UNX'IRQ;                                                     24105000
     INTPSYS'ON;                                                        24110000
     SETMASK;                                                           24115000
                                                                        24120000
 <<Start the channel programs>>                                         24125000
                                                                        24130000
     DEV:=DESIRED'DEV-1;                                                24135000
     WHILE (DEV:=DEV+1)<=MAX'DEV                                        24140000
      DO                                                                24145000
       BEGIN                                                            24150000
        TOS'1:=(CHNL+DEV);                                              24155000
        TOS':=ADDARRAY(DEV);                                            24160000
        DO'SIOP;                                                        24165000
       END;                                                             24170000
                                                                        24175000
     DELAY1SECOND; <<Wait for channel programs to complete>>            24180000
     DELAY1SECOND;                                                      24185000
     DOT; <<Check ATTN/CNTL Y then print `period'>>                     24190000
                                                                        24195000
     DEV:=DESIRED'DEV-1;                                                24200000
     WHILE (DEV:=DEV+1)<=MAX'DEV                                        24205000
      DO                                                                24210000
       BEGIN                                                            24215000
        ERR:=0;                                                         24220000
        V'GETS'MEM(TOS',(CHNL+DEV)*4+3);                                24225000
        <<Get DRT word three>>                                          24230000
        IF TOS'<>0                                                      24235000
         THEN                                                           24240000
          BEGIN                                                         24245000
           ERR:=1; <<Set the 'any error' bit>>                          24250000
           IF TOS'=!C000                                                24255000
            THEN                                                        24260000
             ERROROUT(-GET'MESSAGE(51),1)                               24265000
            ELSE                                                        24270000
             IF TOS'=!8001                                              24275000
              THEN                                                      24280000
               ERROROUT(-GET'MESSAGE(52),1)                             24285000
              ELSE                                                      24290000
               BEGIN                                                    24295000
                NUM'CHARS:=GET'MESSAGE(53);                             24300000
                NUM2ASC(18,4,16,TOS');                                  24305000
                ERROROUT(-NUM'CHARS,1);                                 24310000
               END;                                                     24315000
          END;                                                          24320000
        CHECKYTRAP; <<Check for operator interrupt request>>            24325000
                                                                        24330000
        V'GETS'MEM(TOS',CPVAARRAY(DEV)+2);                              24335000
        <<Get the CPVA interrupt code>>                                 24340000
        IF TOS'.(8:8)<>(!50+DEV)                                        24345000
         THEN                                                           24350000
          BEGIN                                                         24355000
           ERR:=1; <<Set the 'any error' bit>>                          24360000
           IF TOS'.(8:8)=(!10+DEV)                                      24365000
            THEN                                                        24370000
             ERROROUT(-GET'MESSAGE(54),1)                               24375000
            ELSE                                                        24380000
             IF TOS'.(8:8)=(!20+DEV)                                    24385000
              THEN                                                      24390000
               BEGIN                                                    24395000
               V'GETS'MEM(TOS',CHG'ADDR'ARRAY(2*DEV+1));                24400000
                IF TOS'.(13:1) THEN ERROROUT(-GET'MESSAGE(55),1);       24405000
                IF TOS'.(14:1) THEN ERROROUT(-GET'MESSAGE(56),1);       24410000
                IF TOS'.(13:2)=0                                        24415000
                 THEN                                                   24420000
                  BEGIN                                                 24425000
                   NUM'CHARS:=GET'MESSAGE(57);                          24430000
                   NUM2ASC(18,4,16,TOS');                               24435000
                   ERROROUT(-NUM'CHARS,1);                              24440000
                  END;                                                  24445000
               END                                                      24450000
              ELSE                                                      24455000
               IF TOS'.(8:8)=(!30+DEV)                                  24460000
                THEN                                                    24465000
                 ERROROUT(-GET'MESSAGE(58),1)                           24470000
                ELSE                                                    24475000
                 BEGIN                                                  24480000
                  NUM'CHARS:=GET'MESSAGE(57);                           24485000
                  NUM2ASC(18,4,16,TOS');                                24490000
                  ERROROUT(-NUM'CHARS,1);                               24495000
                 END;                                                   24500000
                                                                        24505000
           V'GETS'MEM(TOS',CPVAARRAY(DEV));                             24510000
           <<Get CPVA word zero>>                                       24515000
           IF TOS'<>0                                                   24520000
            THEN                                                        24525000
             BEGIN                                                      24530000
              NUM'CHARS:=GET'MESSAGE(59);                               24535000
              NUM2ASC(38,4,16,TOS');                                    24540000
              ERROROUT(-NUM'CHARS,1);                                   24545000
             END;                                                       24550000
          END;                                                          24555000
                                                                        24560000
        IF NOT ERR                                                      24565000
         THEN                                                           24570000
          BEGIN                                                         24575000
           <<Check Chan Prog byte count>>                               24580000
           V'GETS'MEM(LA,ADDARRAY(DEV)+80);                             24585000
           IF LA<>0                                                     24590000
            THEN                                                        24595000
             BEGIN                                                      24600000
              NUM'CHARS:=GET'MESSAGE(86);                               24605000
              LB:=ADCC'CHNL'PGM(80); <<Original byte count>>            24610000
              NUM2ASC(6,3,10,LB-LA);                                    24615000
              NUM2ASC(25,3,10,LB);                                      24620000
              ERROROUT(-NUM'CHARS,1);                                   24625000
             END;                                                       24630000
                                                                        24635000
           B:=INTEGER(!E002); <<Address of the output buffer>>          24640000
           ADR'B:=CHG'ADDR'ARRAY(2*DEV); <<Address of input buffer>>    24645000
           C:=-1;                                                       24650000
           WHILE (C:=C+1)<255                                           24655000
            DO                                                          24660000
             BEGIN                                                      24665000
              V'GETS'MEM(D,B);                                          24670000
              V'GETS'MEM(E,ADR'B);                                      24675000
              F:=0;                                                     24680000
                                                                        24685000
T11:          D:=D CSR (8);                                             24690000
              E:=E CSR (8);                                             24695000
                                                                        24700000
              IF D.(8:8)<>E.(8:8)                                       24705000
               THEN                                                     24710000
                BEGIN                                                   24715000
                 IF C<>0                                                24720000
                  THEN                                                  24725000
                   BEGIN                                                24730000
                    NUM'CHARS:=GET'MESSAGE(60);                         24735000
                    NUM2ASC(6,2,16,(C-1));                              24740000
                    NUM2ASC(13,2,16,E.(8:8));                           24745000
                    NUM2ASC(27,2,16,D.(8:8));                           24750000
                    ERROROUT(-NUM'CHARS,1);                             24755000
                   END;                                                 24760000
                END;                                                    24765000
                                                                        24770000
              IF NOT F                                                  24775000
               THEN                                                     24780000
                BEGIN                                                   24785000
                 F:=1; C:=C+1;                                          24790000
                 GO T11;                                                24795000
                END;                                                    24800000
                                                                        24805000
              ADR'B:=ADR'B+1; <<Kick the>>                              24810000
              B:=B+1; <<pointers and>>                                  24815000
             END; <<do all 256 bytes>>                                  24820000
          END;                                                          24825000
        CHECKYTRAP; <<Check for operator interrupt request>>            24830000
       END; <<Place the next device number under test>>                 24835000
                                                                        24840000
     INTPSYS'OFF;                                                       24845000
     REP'ILL'INT;                                                       24850000
     DOT; <<Check ATTN/CNTL Y then print `period'>>                     24855000
    END; <<Section 13>>                                                 24860000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC      SECTION FOURTEEN"                  24865000
  IF SECTION(14)                                                        24870000
   THEN                                                                 24875000
    BEGIN                                                               24880000
                                                                        24885000
 <<**MAKE IT MARCHING ONE/ZERO TEST EVENTUALLY**>>                      24890000
 <<SECTION 14 - Extended Special Character RAM (optional)               24895000
                                                                        24900000
     This Section places the special character RAM under test using     24905000
     various patterns.  Due to the lengthy execution time required for  24910000
     this Section, it will by executed only upon request by the         24915000
     operator.>>                                                        24920000
                                                                        24925000
                                                                        24930000
 <<- STEP 50     -     Walking one                                      24935000
                                                                        24940000
           The entire special character RAM space is set to zero, and   24945000
           while a one is "walked" thru selected locations, all other   24950000
           locations are verified to remain at zero.>>                  24955000
                                                                        24960000
     STP:=50;                                                           24965000
     DEV:=-1;                                                           24970000
     WHILE (DEV:=DEV+1)<=(IF EXTND THEN 7 ELSE 3)                       24975000
      DO                                                                24980000
       BEGIN                                                            24985000
        DO'WIOC0(!4040+DEV); <<Address device under test>>              24990000
        DO'WIOC0(!4061); <<Send UART modifier>>                         24995000
        DO'WIOC0(!DE); <<Send UART setup byte>>                         25000000
        DO'WIOC0(!4066); <<Send baud rate modifier>>                    25005000
        DO'WIOC0(!8); <<Send transmit baud rate>>                       25010000
        DO'WIOC0(!18); <<Send receive baud rate>>                       25015000
        DO'WIOC0(!4064); <<Send modifier four>>                         25020000
        A:=-1;                                                          25025000
        WHILE (A:=A+1)<=255                                             25030000
         DO                                                             25035000
          BEGIN                                                         25040000
           DO'WIOC0(A); <<Clear SP Character RAM addresses>>            25045000
          END; <<for all addresses present and>>                        25050000
       END; <<all device numbers present>>                              25055000
                                                                        25060000
     DEV:=-1; A:=0; G:=INTEGER(!8000);                                  25065000
     MAIN'BOARD:=TRUE;                                                  25070000
     WHILE (DEV:=DEV+1)<=(IF EXTND THEN 7 ELSE 3)                       25075000
      DO                                                                25080000
       BEGIN                                                            25085000
        IF DEV>3 THEN MAIN'BOARD:=FALSE;                                25090000
        B:=0;                                                           25095000
        WHILE B<=255                                                    25100000
         DO                                                             25105000
          BEGIN                                                         25110000
           DO'WIOC0(!4065); <<Send modifier five>>                      25115000
           DO'WIOC0(B); <<Set the special character bit>>               25120000
           C:=0;                                                        25125000
           D:=IF MAIN'BOARD THEN -1 ELSE 3;                             25130000
           WHILE (D:=D+1)<=(IF MAIN'BOARD THEN 3 ELSE 7)                25135000
            DO                                                          25140000
             BEGIN                                                      25145000
              E:=-1;                                                    25150000
              WHILE (E:=E+1)<=255                                       25155000
               DO                                                       25160000
                BEGIN                                                   25165000
                 DO'WIOC0(!4060); <<Send modifier zero>>                25170000
                 DO'WIOC0(E); <<Write a character>>                     25175000
                 DODELAY(STARTIME,2); <<Wait loop>>                     25180000
                 DO'RIOC0; <<Read back the character and tag>>          25185000
                                                                        25190000
                 F:=(IF B=E THEN 0 ELSE 1);                             25195000
                 IF TOS'.(0:2)<>G.(0:2)                                 25200000
                  THEN                                                  25205000
                   BEGIN <<Tag is zero>>                                25210000
                    IF F                                                25215000
                     THEN                                               25220000
                      BEGIN                                             25225000
                       NUM'CHARS:=GET'MESSAGE(42);                      25230000
                       NUM2ASC(30,4,10,B);                              25235000
                       NUM2ASC(44,4,10,E);                              25240000
                       ERROROUT(-NUM'CHARS,0);                          25245000
                      END;                                              25250000
                   END;                                                 25255000
                 IF TOS'.(8:8)<>E.(8:8)                                 25260000
                  THEN                                                  25265000
                   BEGIN                                                25270000
                    NUM'CHARS:=GET'MESSAGE(23);                         25275000
                    NUM2ASC(26,2,16,E);                                 25280000
                    NUM2ASC(40,2,16,TOS'.(8:8));                        25285000
                    ERROROUT(-NUM'CHARS,1);                             25290000
                   END;                                                 25295000
                                                                        25300000
                 DO'WIOC0(!4064); <<Send modifier four>>                25305000
                 DO'WIOC0(B); <<Send the byte>>                         25310000
                                                                        25315000
                 C:=C+1;                                                25320000
                END; <<Next read address this device>>                  25325000
             END; <<Next device>>                                       25330000
                                                                        25335000
           A:=A+1;                                                      25340000
           B:=IF B=0 THEN 1 ELSE B+B; <<Double the address>>            25345000
           DOT; <<Check ATTN/CNTL Y then print `period'>>               25350000
          END; <<Next write address this device>>                       25355000
       END; <<Next device>>                                             25360000
                                                                        25365000
 <<- STEP 51     -     Walking zero                                     25370000
                                                                        25375000
           The entire special character RAM space is set to one, and    25380000
           while a zero is "walked" thru selected locations, all other  25385000
           locations are verified to remain at one.>>                   25390000
                                                                        25395000
     STP:=51;                                                           25400000
     DEV:=-1;                                                           25405000
     WHILE (DEV:=DEV+1)<=(IF EXTND THEN 7 ELSE 3)                       25410000
      DO                                                                25415000
       BEGIN                                                            25420000
        DO'WIOC0(!4061); <<Send UART modifier>>                         25425000
        DO'WIOC0(!DE); <<Send UART setup byte>>                         25430000
        DO'WIOC0(!4066); <<Send baud rate modifier>>                    25435000
        DO'WIOC0(!8); <<Send transmit baud rate>>                       25440000
        DO'WIOC0(!18); <<Send receive baud rate>>                       25445000
        DO'WIOC0(!4065); <<Send modifier five>>                         25450000
        A:=-1;                                                          25455000
        WHILE (A:=A+1)<=255                                             25460000
         DO                                                             25465000
          BEGIN                                                         25470000
           DO'WIOC0(A); <<Set SP Character RAM addresses>>              25475000
          END; <<for all addresses present and>>                        25480000
       END; <<all device numbers present>>                              25485000
                                                                        25490000
     DEV:=-1; A:=0; G:=INTEGER(!C000);                                  25495000
     MAIN'BOARD:=TRUE;                                                  25500000
     WHILE (DEV:=DEV+1)<=(IF EXTND THEN 7 ELSE 3)                       25505000
      DO                                                                25510000
       BEGIN                                                            25515000
        IF DEV>3 THEN MAIN'BOARD:=FALSE;                                25520000
        B:=0;                                                           25525000
        WHILE B<=255                                                    25530000
         DO                                                             25535000
          BEGIN                                                         25540000
           DO'WIOC0(!4064); <<Send modifier four>>                      25545000
           DO'WIOC0(B); <<Clear special character bit>>                 25550000
           C:=0;                                                        25555000
           D:=IF MAIN'BOARD THEN -1 ELSE 3;                             25560000
           WHILE (D:=D+1)<=(IF MAIN'BOARD THEN 3 ELSE 7)                25565000
            DO                                                          25570000
             BEGIN                                                      25575000
              E:=-1;                                                    25580000
              WHILE (E:=E+1)<=255                                       25585000
               DO                                                       25590000
                BEGIN                                                   25595000
                 DO'WIOC0(!4060); <<Send modifier zero>>                25600000
                 DO'WIOC0(E); <<Write a character>>                     25605000
                 DODELAY(STARTIME,2); <<Wait loop>>                     25610000
                 DO'RIOC0; <<Read back the character and tag>>          25615000
                                                                        25620000
                 F:=(IF B=E THEN 0 ELSE 1);                             25625000
                 IF TOS'.(0:2)<>G.(0:2)                                 25630000
                  THEN                                                  25635000
                   BEGIN <<Tag is one>>                                 25640000
                    IF F                                                25645000
                     THEN                                               25650000
                      BEGIN                                             25655000
                       NUM'CHARS:=GET'MESSAGE(42);                      25660000
                       NUM2ASC(30,4,10,B);                              25665000
                       NUM2ASC(44,4,10,E);                              25670000
                       ERROROUT(-NUM'CHARS,0);                          25675000
                      END;                                              25680000
                   END;                                                 25685000
                 IF TOS'.(8:8)<>E.(8:8)                                 25690000
                  THEN                                                  25695000
                   BEGIN                                                25700000
                    NUM'CHARS:=GET'MESSAGE(23);                         25705000
                    NUM2ASC(26,2,16,E);                                 25710000
                    NUM2ASC(40,2,16,TOS'.(8:8));                        25715000
                    ERROROUT(-NUM'CHARS,1);                             25720000
                   END;                                                 25725000
                                                                        25730000
                 DO'WIOC0(!4065); <<Send modifier five>>                25735000
                 DO'WIOC0(B); <<Send the byte>>                         25740000
                                                                        25745000
                 C:=C+1;                                                25750000
                END; <<Next read address this device>>                  25755000
             END; <<Next device>>                                       25760000
                                                                        25765000
           A:=A+1;                                                      25770000
           B:=IF B=0 THEN 1 ELSE B+B; <<Double the address>>            25775000
           DOT; <<Check ATTN/CNTL Y then print `period'>>               25780000
          END; <<Next write address this device>>                       25785000
       END; <<Next device>>                                             25790000
  REP'ILL'INT;                                                          25795000
    END; <<SECTION 14>>                                                 25800000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC      SECTION FIFTEEN"                   25805000
IF SECTION(15) THEN BEGIN                                               25810000
                                                                        25815000
 <<SECTION 15   -   Baud Rate Clock and UARTS                           25820000
                                                                        25825000
  This step verifies correct operation of the Baud Rate Clock           25830000
  logic, the device address latches logic and a subset of               25835000
  the UART logic.>>                                                     25840000
                                                                        25845000
 <<- STEP 52                                                            25850000
                                                                        25855000
  This step gives a more stringent test of the UART logic.              25860000
  In this step, various combinations of baud                            25865000
  rates and UART control functions are used to provide                  25870000
  stimulus to each device in the manner described below.                25875000
                                                                        25880000
  The test sequence is to set up the various UART control               25885000
  functions then transmitting, receiving                                25890000
  and verifying the test bytes (or part of the byte in case             25895000
  5,6 and 7 data bit words) !0,!55,!AA and !CC.>>                       25900000
                                                                        25905000
     STP:=52;                                                           25910000
   DEV := IF EXTND AND EXTND15 AND (DESIRED'DEV<>MAX'DEV)       <<1.31>>25915000
          THEN 3 ELSE DESIRED'DEV-1;                            <<1.31>>25920000
     WHILE (DEV:=DEV+1)<=MAX'DEV DO BEGIN                               25925000
      DO'WIOC0(!4040+DEV); <<Address device under test>>                25930000
      A:=-1;                                                            25935000
      WHILE (A:=A+1)<24 DO BEGIN                                        25940000
      DO'WIOC0(!4061); <<Send modifier one>>                            25945000
      DO'WIOC0(UARTCNTRL(A)); <<Send control byte>>                     25950000
      BAUD:=1;                                                          25955000
    WHILE (BAUD:=BAUD+1)<!10 DO BEGIN                                   25960000
      DO'WIOC0(!4066); <<Send baud rate modifier>>                      25965000
      DO'WIOC0(BAUD); <<Send transmit baud rate>>                       25970000
      DO'WIOC0(BAUD+!10); <<Issue receive baud rate>>                   25975000
      DO'WIOC0(!4060); <<Send modifier zero>>                           25980000
      B:=-1;                                                            25985000
      WHILE (B:=B+1)<4 DO BEGIN                                         25990000
      DO'WIOC0(BAUDARRAY(B));                                           25995000
      DODELAY(STARTIME,DELAYBUF(BAUD)); <<WAIT>>                        26000000
      DO'RIOC0; <<Read byte back>>                                      26005000
     CASE UARTCNTRL(A).(11:2) OF                                        26010000
      BEGIN                                                             26015000
      0: TOS'1:=(BAUDARRAY(B) AND !1F);                                 26020000
      1: TOS'1:=(BAUDARRAY(B) AND !3F);                                 26025000
      2: TOS'1:=(BAUDARRAY(B) AND !7F);                                 26030000
      3: TOS'1:=(BAUDARRAY(B) AND !FF);                                 26035000
      END;                                                              26040000
                                                                        26045000
      IF TOS'.(8:8)<>TOS'1.(8:8) THEN BEGIN                             26050000
       C:=3;                                                            26055000
       C:=(IF 7<=BAUD<=12 THEN 4 ELSE C);                               26060000
       C:=(IF 2<=BAUD<=3 THEN 2 ELSE C);                                26065000
      NUM'CHARS:=GET'MESSAGE(26);                                       26070000
      NUM'CHARS:=(IF 7<=BAUD<=12                                        26075000
                   THEN NUM'CHARS+1                                     26080000
                   ELSE NUM'CHARS);                                     26085000
      NUM'CHARS:=(IF 2<=BAUD<=3                                         26090000
                   THEN NUM'CHARS-1                                     26095000
                   ELSE NUM'CHARS);                                     26100000
      NUM'CHARS:=(IF BAUD=4                                             26105000
                   THEN NUM'CHARS+2                                     26110000
                   ELSE NUM'CHARS);                                     26115000
      MOVE (!20,!20,!20,!20,!20) TO MSG'OUT(47);                        26120000
      NUM2ASC(25,2,16,TOS'1);                                           26125000
       NUM2ASC(38,2,16,TOS'.(8:8));                                     26130000
       NUM2ASC(47,C,10,BAUDS(BAUD));                                    26135000
       IF BAUD=4 THEN MOVE (".5") TO MSG'OUT(50);                       26140000
       NUM2ASC(14,2,16,UARTCNTRL(A));                                   26145000
       ERROROUT(-NUM'CHARS,1);                                          26150000
       END;                                                             26155000
      END; <<Next test character>>                                      26160000
      END; <<Next baud rate>>                                           26165000
     DOT; <<Check ATTN/CNTL Y then print `period'>>                     26170000
      END; <<Next control character>>                                   26175000
      END; <<Next device number under test>>                            26180000
  REP'ILL'INT;                                                          26185000
END;                                                                    26190000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC      SECTION SIXTEEN"                   26195000
START16:                                                                26200000
 IF SECTION(16)                                                         26205000
  THEN                                                                  26210000
   BEGIN                                                                26215000
                                                                        26220000
 <<SECTION 16  -  Channel Address Switch (optional)                     26225000
                                                                        26230000
   This Section places the channel address recognition logic            26235000
   under test.  This Section is executed ONLY upon request              26240000
   by the operator.                                                     26245000
   Roll Call, OBII and OBSI are used to verify each setting             26250000
   of the channel address switch.  The operator is asked to set         26255000
   the channel address of the ADCC under test to all values             26260000
   0 thru 15 (except for the channels being used                        26265000
   by other cards) and the following tests are performed.               26270000
                                                                        26275000
   Since it would mean reloading  this diagnostic                       26280000
   program to test all 16 positions of the Channel Address              26285000
   Switch, positions not tested are the                                 26290000
   ones which correspond to the channel numbers being used              26295000
   by other interfaces.>>                                               26300000
                                                                        26305000
 <<- STEP 53     -     Roll Call                                        26310000
                                                                        26315000
   The ability of the ADCC under test to respond to the global          26320000
   I/O Roll Call is tested.  A Roll Call is issued, and the             26325000
   resulting returned word is tested to verify that only the            26330000
   bits which correspond to the ADCC channel number under test          26335000
   and the channel numbers used by other cards are set.>>               26340000
                                                                        26345000
    D:=0;                                                               26350000
    ZENDLOG:=TRUE;                                                      26355000
    NMBROFCHNLS:=0;                                                     26360000
    T'CHNL:=0;                                                          26365000
    T'CHNLBIT:=!8000;                                                   26370000
SWITCH'LOOP:                                                            26375000
    WHILE T'CHNL<%200                                                   26380000
     DO                                                                 26385000
      BEGIN                                                             26390000
       WHILE (D AND T'CHNLBIT)=T'CHNLBIT                                26395000
        DO                                                              26400000
         BEGIN <<Another channel has this number>>                      26405000
          IF (T'CHNL:=T'CHNL+%10)>%170 <<Advance to higher channel>>    26410000
           THEN GO SWITCH'LOOP;                                         26415000
          T'CHNLBIT:=T'CHNLBIT LSR (1);                                 26420000
         END;                                                           26425000
       STP:=53;                                                         26430000
                                                                        26435000
       IF NMBROFCHNLS=0                                                 26440000
        THEN                                                            26445000
         BEGIN                                                          26450000
          B:=1;                                                         26455000
          WHILE B=1                                                     26460000
           DO                                                           26465000
            BEGIN                                                       26470000
             A:=C:=0;                                                   26475000
             MOVE ("      ") TO TEMPBUF;                                26480000
             CRLF;                                                      26485000
             PRINT(MSG'OUT,-GET'MESSAGE(44),%320);                      26490000
             MOVE CLEARBUF TO TEMPBUF FOR 10 ITEMS;                     26495000
             B:=(IF READKBD(TEMPBUF,-3)>2 THEN 1 ELSE 0);               26500000
             CHECKYTRAP;                                                26505000
             STARTIDLE;                                                 26510000
                                                                        26515000
             IF (A:=TEMPBUF(1))<>" "                                    26520000
              THEN                                                      26525000
               BEGIN                                                    26530000
                B:=(IF !30<=A<=!39 THEN B ELSE 1);                      26535000
                B:=(IF !30<=(C:=TEMPBUF(0))<=!39 THEN B ELSE 1);        26540000
               END                                                      26545000
              ELSE                                                      26550000
               B:=(IF !30<=(A:=TEMPBUF(0))<=!39 THEN B ELSE 1);         26555000
                                                                        26560000
             A:=(A AND !F);                                             26565000
             C:=(C AND !F)*10;                                          26570000
             B:=(IF 1<=(NMBROFCHNLS:=A+C)<=15 THEN B ELSE 1);           26575000
             IF B THEN CRTOUT(MSG'OUT,-GET'MESSAGE(62));                26580000
            END; <<B=1>>                                                26585000
         END; <<NMBROFCHNLS=0>>                                         26590000
                                                                        26595000
       CHNL:=T'CHNL;                                                    26600000
       CHNLBIT:=T'CHNLBIT;                                              26605000
       NUM'CHARS:=GET'MESSAGE(61);                                      26610000
       NUM2ASC(45,2,10,CHNL.(9:4));                                     26615000
       CRTOUT(MSG'OUT,-NUM'CHARS); <<OUTPUT THE MESSAGE AND HALT>>      26620000
       CRTOUT(MSG'OUT,-GET'MESSAGE(81));                                26625000
       DOPAUSE;                                                         26630000
                                                                        26635000
       ROLLCALL; <<SEND ROLL CALL OP>>                                  26640000
       IF CHNL=0 THEN D:=TOS'; <<Save other channels present>>          26645000
       C:=TOS'; <<Save for later test>>                                 26650000
       IF ((TOS' AND CHNLBIT)<>CHNLBIT) AND CHNL<>0                     26655000
        THEN                                                            26660000
         BEGIN <<TEST FOR CHANNEL PRESENT>>                             26665000
          IF CHNL.(9:4)>7 THEN M:=1 ELSE E:=1;                          26670000
          NUM'CHARS:=GET'MESSAGE(65);                                   26675000
          NUM2ASC(8,2,10,CHNL.(9:4)); <<CHNLNR IN MSG>>                 26680000
          ERROROUT(-NUM'CHARS,0);                                       26685000
          GO START16; <<Don't continue this way>>                       26690000
         END;                                                           26695000
                                                                        26700000
       A:=-1;                                                           26705000
       B:=0;                                                            26710000
       WHILE (A:=A+1)<16                                                26715000
        DO                                                              26720000
         BEGIN                                                          26725000
          B:=(IF C.(15:1) THEN B+1 ELSE B);                             26730000
          C:=C LSR (1);                                                 26735000
         END;                                                           26740000
                                                                        26745000
       IF CHNL=0 THEN B:=B+1;                                           26750000
       IF LOGICAL(B)<>NMBROFCHNLS                                       26755000
        THEN                                                            26760000
         BEGIN <<Wrong number of Roll Call responses>>                  26765000
          IF CHNL=0                                                     26770000
           THEN                                                         26775000
            BEGIN                                                       26780000
             IF (B:=B-1)>(NMBROFCHNLS:=NMBROFCHNLS-1)                   26785000
              THEN <<Too many responded>>                               26790000
               CRTOUT(MSG'OUT,-GET'MESSAGE(70));                        26795000
            END;                                                        26800000
          NUM'CHARS:=GET'MESSAGE(63);                                   26805000
          NUM2ASC(22,2,10,B);                                           26810000
          NUM2ASC(35,2,10,NMBROFCHNLS);                                 26815000
          ERROROUT(-NUM'CHARS,0);                                       26820000
          NMBROFCHNLS:=0; <<So operator is asked again>>                26825000
          GO START16; <<Don't continue this way>>                       26830000
         END;                                                           26835000
                                                                        26840000
       IF CHNL<>0                                                       26845000
        THEN                                                            26850000
         BEGIN                                                          26855000
                                                                        26860000
 <<OBII is a command issued by the interrupt processing                 26865000
   micro-code.  This step issues a register 0 read with a               26870000
   special command code to emulate OBII.  The resulting                 26875000
   returned word, bits 9 thru 12 are verified to contain                26880000
   the value of the channel address of the ADCC under                   26885000
   test.>>                                                              26890000
                                                                        26895000
          STP:=54;                                                      26900000
          OBII; <<ISSUE OBII>>                                          26905000
          IF TOS'.(9:4)<>CHNL.(9:4)                                     26910000
           THEN                                                         26915000
            BEGIN                                                       26920000
             NUM'CHARS:=GET'MESSAGE(14);                                26925000
             MSG'OUT(2):="I";                                           26930000
             NUM2ASC(14,2,10,TOS'.(9:4));                               26935000
             NUM2ASC(26,2,10,CHNL.(9:4));                               26940000
             ERROROUT(-NUM'CHARS,0);                                    26945000
            END;                                                        26950000
                                                                        26955000
 <<- STEP 55      -      Obtain Service Information (OBSI)              26960000
                                                                        26965000
   OBSI is a command issued by the channel service process              26970000
   micro-code.  This step issues a register 0 read with a               26975000
   special command code to emulate OBSI.  The resulting                 26980000
   returned word, bits 9 thru 12 are verified to contain                26985000
   the value of the channel address of the ADCC under                   26990000
   test.>>                                                              26995000
                                                                        27000000
          STP:=55;                                                      27005000
          OBSI; <<ISSUE OBSI>>                                          27010000
          IF TOS'.(9:4)<>CHNL.(9:4)                                     27015000
           THEN                                                         27020000
            BEGIN                                                       27025000
             NUM'CHARS:=GET'MESSAGE(14);                                27030000
             MSG'OUT(2):="S";                                           27035000
             NUM2ASC(14,2,10,TOS'.(9:4));                               27040000
             NUM2ASC(26,2,10,CHNL.(9:4));                               27045000
             ERROROUT(-NUM'CHARS,0);                                    27050000
            END;                                                        27055000
         END; <<End of -comchan tests>>                                 27060000
       CHECKYTRAP; <<Check for operator interrupt request>>             27065000
       T'CHNLBIT:=T'CHNLBIT LSR(1);                                     27070000
       T'CHNL:=T'CHNL+%10; <<DO FOR NEXT CHANNEL NUMBER>>               27075000
      END;                                                              27080000
    REP'ILL'INT;                                                        27085000
   END; <<SECTION 16>>                                                  27090000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC      SECTION SEVENTEEN"                 27095000
                                                                        27100000
IF SECTION(17) THEN BEGIN                                               27105000
                                                                        27110000
                                                                        27115000
 <<This Section places one RS-232C cable under test using the           27120000
     RS-232C 'D' loop connector (hp 0960-0475)  Note that this          27125000
     Section will be executed ONLY upon request by the operator.>>      27130000
                                                                        27135000
 <<- STEP 56     -                                                      27140000
                                                                        27145000
       A subset of the special                                          27150000
      character ram test described in Section 3, chosen for             27155000
      maximum data pattern combinations, is executed for the            27160000
      device.>>                                                         27165000
                                                                        27170000
       STP:=56;                                                         27175000
     A:=0;                                                              27180000
     WHILE A=0 DO BEGIN                                                 27185000
     MOVE CLEARBUF TO TEMPBUF FOR 10 ITEMS;                             27190000
     CHECKYTRAP; <<Check for operator interrupt request>>               27195000
     CRLF;                                                              27200000
     CRTOUT(MSG'OUT,-GET'MESSAGE(66));                                  27205000
     PRINT(MSG'OUT,-GET'MESSAGE(64),%320);                              27210000
     READKBD(TEMPBUF,-3);                                               27215000
     CHECKYTRAP;                                                        27220000
     STARTIDLE;                                                         27225000
     A:=(IF TEMPBUF(1)<>" " THEN 0 ELSE 1); <<More than 1 char?>>       27230000
     A:=(IF NOT !30<=TEMPBUF(0)<=!37 THEN 0 ELSE A);                    27235000
     END; <<Range of input ok when we leave here>>                      27240000
                                                                        27245000
     DEV:=(TEMPBUF(0) AND !F);                                          27250000
                                                                        27255000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 27260000
     DO'WIOC0(!4061); <<Send UART modifier>>                            27265000
     DO'WIOC0(!DE); <<Send UART setup byte>>                            27270000
     DO'WIOC0(!4066); <<Send baud rate modifier>>                       27275000
     DO'WIOC0(!8); <<Send transmit baud rate>>                          27280000
     DO'WIOC0(!18); <<Send receive baud rate>>                          27285000
     DO'WIOC0(!4064); <<Send modifier four>>                            27290000
     A:=-1;                                                             27295000
     WHILE (A:=A+1)<=255 DO BEGIN                                       27300000
     DO'WIOC0(A); <<Write set/clear address>>                           27305000
     END; <<Do all address/this dev>>                                   27310000
                                                                        27315000
     DO'WIOC0(!4060); <<Send modifier zero>>                            27320000
     A:=-1;                                                             27325000
     WHILE (A:=A+1)<=255 DO BEGIN                                       27330000
     DO'WIOC0(A); <<Write test byte>>                                   27335000
     DODELAY(STARTIME,5); <<9600 Baud wait loop>>                       27340000
     DO'RIOC0; <<Now read byte back>>                                   27345000
     IF TOS'.(8:8)<>A.(8:8) THEN BEGIN                                  27350000
        NUM'CHARS:=GET'MESSAGE(23);                                     27355000
        NUM2ASC(26,2,16,A.(8:8));                                       27360000
        NUM2ASC(40,2,16,TOS'.(8:8));                                    27365000
        ERROROUT(-NUM'CHARS,1);                                         27370000
        END;                                                            27375000
                                                                        27380000
     IF TOS'.(1:1) THEN BEGIN                                           27385000
        NUM'CHARS:=GET'MESSAGE(24);                                     27390000
        NUM2ASC(1,2,16,TOS'.(8:8));                                     27395000
        ERROROUT(-NUM'CHARS,1);                                         27400000
        END;                                                            27405000
     END;                                                               27410000
         CHECKYTRAP; <<Check for operator interrupt request>>           27415000
                                                                        27420000
                                                                        27425000
 <<- STEP 57 >>                                                         27430000
                                                                        27435000
     STP:=57;                                                           27440000
     CHNL'INIT;                                                         27445000
 <<-             -      CA - CB,CF    (reference=1)>>                   27450000
                                                                        27455000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             27460000
     DO'WIOC0(!4067); <<Send modifier seven>>                           27465000
     DO'WIOC0(!12); <<Set reference for CB,CF=1>>                       27470000
     DO'WIOC0(!32); <<Set mask on for these lines>>                     27475000
     DO'WIOC0(!4062); <<Send modifier two>>                             27480000
     DO'WIOC0(!7); <<Wiggle CA to cause deviation>>                     27485000
     DODELAY(STARTIME,5); <<Short wait>>                                27490000
     A:=B:=0;                                                           27495000
     DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                 27500000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     27505000
     DO'RIOC0; <<Read the DSJ returned byte>>                           27510000
     C:=(IF NOT EXTND THEN !9 ELSE !D);                                 27515000
     IF A.(11:5)<>C THEN BEGIN                                          27520000
     IF A.(11:5)<>7 THEN BEGIN                                          27525000
        NUM'CHARS:=GET'MESSAGE(40);                                     27530000
        NUM2ASC(20,2,16,A.(11:5));                                      27535000
        NUM2ASC(33,2,16,C);                                             27540000
        ERROROUT(-NUM'CHARS,1);                                         27545000
        END ELSE BEGIN                                                  27550000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     27555000
        ERROROUT(-GET'MESSAGE(37),1);                                   27560000
        B:=-1;                                                          27565000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          27570000
        END;                                                            27575000
       END;                                                             27580000
                                                                        27585000
     IF NOT B THEN BEGIN                                                27590000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                27595000
     END;                                                               27600000
         CHECKYTRAP; <<Check for operator interrupt request>>           27605000
                                                                        27610000
 <<-             -      CA - CB,CF    (reference=0)>>                   27615000
                                                                        27620000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 27625000
     DO'WIOC0(!4067); <<Send modifier seven>>                           27630000
     DO'WIOC0(!D); <<Set CB,CF reference=0>>                            27635000
     DO'WIOC0(!32); <<Set mask on for these lines>>                     27640000
     DO'WIOC0(!4062); <<Send modifier two>>                             27645000
     DO'WIOC0(!8); <<Wiggle CA to cause change>>                        27650000
     DODELAY(STARTIME,5); <<Short wait ..>>                             27655000
     A:=B:=0;                                                           27660000
     DO'RIOC0; A:=TOS'; <<Read the modem status>>                       27665000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     27670000
     DO'RIOC0; <<Read the DSJ returned byte>>                           27675000
     IF A.(11:5)<>!12 THEN BEGIN                                        27680000
     IF A.(11:5)<>!8 THEN BEGIN                                         27685000
        NUM'CHARS:=GET'MESSAGE(40);                                     27690000
        NUM2ASC(20,2,16,A.(11:5));                                      27695000
        NUM2ASC(33,2,16,!12);                                           27700000
        ERROROUT(-NUM'CHARS,1);                                         27705000
        END ELSE BEGIN                                                  27710000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     27715000
        ERROROUT(-GET'MESSAGE(37),1);                                   27720000
        B:=-1;                                                          27725000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          27730000
        END;                                                            27735000
       END;                                                             27740000
                                                                        27745000
     IF NOT B THEN BEGIN                                                27750000
     IF  TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);               27755000
     END;                                                               27760000
         CHECKYTRAP; <<Check for operator interrupt request>>           27765000
                                                                        27770000
 <<-             -      CD - CC    (reference=1)>>                      27775000
                                                                        27780000
     CHNL'INIT;                                                         27785000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             27790000
     DO'WIOC0(!4067); <<Send modifier seven>>                           27795000
     DO'WIOC0(!8); <<Set reference for CC=1>>                           27800000
     DO'WIOC0(!28); <<Set mask on for this line>>                       27805000
     DO'WIOC0(!4062); <<Send modifier two>>                             27810000
     DO'WIOC0(!B); <<Wiggle CD to cause deviation>>                     27815000
     DODELAY(STARTIME,5); <<Short wait>>                                27820000
     A:=B:=0;                                                           27825000
     DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                 27830000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     27835000
     DO'RIOC0; <<Read the DSJ returned byte>>                           27840000
     C:=(IF NOT EXTND THEN !13 ELSE !17);                               27845000
     IF A.(11:5)<>C THEN BEGIN                                          27850000
     IF A.(11:5)<>!B THEN BEGIN                                         27855000
        NUM'CHARS:=GET'MESSAGE(40);                                     27860000
        NUM2ASC(20,2,16,A.(11:5));                                      27865000
        NUM2ASC(33,2,16,C);                                             27870000
        ERROROUT(-NUM'CHARS,1);                                         27875000
        END ELSE BEGIN                                                  27880000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     27885000
        ERROROUT(-GET'MESSAGE(37),1);                                   27890000
        B:=-1;                                                          27895000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          27900000
        END;                                                            27905000
       END;                                                             27910000
                                                                        27915000
     IF NOT B THEN BEGIN                                                27920000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                27925000
     END;                                                               27930000
         CHECKYTRAP; <<Check for operator interrupt request>>           27935000
                                                                        27940000
 <<-       9     -      CD - CC    (reference=0)>>                      27945000
                                                                        27950000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 27955000
     DO'WIOC0(!4067); <<Send modifier seven>>                           27960000
     DO'WIOC0(!17); <<Set CC reference=0>>                              27965000
     DO'WIOC0(!32); <<Set mask on for this line>>                       27970000
     DO'WIOC0(!4062); <<Send modifier two>>                             27975000
     DO'WIOC0(!4); <<Wiggle CD to cause change>>                        27980000
     DODELAY(STARTIME,5); <<Short wait ..>>                             27985000
     A:=B:=0;                                                           27990000
     DO'RIOC0; A:=TOS'; <<Read the modem status>>                       27995000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     28000000
     DO'RIOC0; <<Read the DSJ returned byte>>                           28005000
     IF A.(11:5)<>!8 THEN BEGIN                                         28010000
     IF A.(11:5)<>4 THEN BEGIN                                          28015000
        NUM'CHARS:=GET'MESSAGE(40);                                     28020000
        NUM2ASC(20,2,16,A.(11:5));                                      28025000
        NUM2ASC(33,2,16,!8);                                            28030000
        ERROROUT(-NUM'CHARS,1);                                         28035000
        END ELSE BEGIN                                                  28040000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     28045000
        ERROROUT(-GET'MESSAGE(37),1);                                   28050000
        B:=-1;                                                          28055000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          28060000
        END;                                                            28065000
       END;                                                             28070000
                                                                        28075000
     IF NOT B THEN BEGIN                                                28080000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                28085000
     END;                                                               28090000
         CHECKYTRAP; <<Check for operator interrupt request>>           28095000
                                                                        28100000
 <<-       0     -      SCA - SCF    (reference=1)>>                    28105000
                                                                        28110000
     CHNL'INIT;                                                         28115000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             28120000
     DO'WIOC0(!4067); <<Send modifier seven>>                           28125000
     DO'WIOC0(!1); <<Set reference for SCF=1>>                          28130000
     DO'WIOC0(!21); <<Set mask on for these lines>>                     28135000
     DO'WIOC0(!4062); <<Send modifier two>>                             28140000
     DO'WIOC0(!E); <<Wiggle SCA to cause deviation>>                    28145000
     DODELAY(STARTIME,5); <<Short wait>>                                28150000
     A:=B:=0;                                                           28155000
     DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                 28160000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     28165000
     DO'RIOC0; <<Read the DSJ returned byte>>                           28170000
     C:=(IF NOT EXTND THEN !1A ELSE !1E);                               28175000
     IF A.(11:5)<>C THEN BEGIN                                          28180000
     IF A.(11:5)<>!E THEN BEGIN                                         28185000
        NUM'CHARS:=GET'MESSAGE(40);                                     28190000
        NUM2ASC(20,2,16,A.(11:5));                                      28195000
        NUM2ASC(33,2,16,C);                                             28200000
        ERROROUT(-NUM'CHARS,1);                                         28205000
        END ELSE BEGIN                                                  28210000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     28215000
        ERROROUT(-GET'MESSAGE(37),1);                                   28220000
        B:=-1;                                                          28225000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          28230000
        END;                                                            28235000
       END;                                                             28240000
                                                                        28245000
     IF NOT B THEN BEGIN                                                28250000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                28255000
     END;                                                               28260000
         CHECKYTRAP; <<Check for operator interrupt request>>           28265000
                                                                        28270000
 <<-       1     -      SCA - SCF    (reference=0)>>                    28275000
                                                                        28280000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 28285000
     DO'WIOC0(!4067); <<Send modifier seven>>                           28290000
     DO'WIOC0(!1E); <<Set SCF reference=0>>                             28295000
     DO'WIOC0(!21); <<Set mask on for these lines>>                     28300000
     DO'WIOC0(!4062); <<Send modifier two>>                             28305000
     DO'WIOC0(!1); <<Wiggle SCA to cause change>>                       28310000
     DODELAY(STARTIME,5); <<Short wait ..>>                             28315000
     A:=B:=0;                                                           28320000
     DO'RIOC0; A:=TOS'; <<Read the modem status>>                       28325000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     28330000
     DO'RIOC0; <<Read the DSJ returned byte>>                           28335000
     IF A.(11:5)<>1 THEN BEGIN                                          28340000
     IF A.(11:5)<>!1E THEN BEGIN                                        28345000
        NUM'CHARS:=GET'MESSAGE(40);                                     28350000
        NUM2ASC(20,2,16,A.(11:5));                                      28355000
        NUM2ASC(33,2,16,1);                                             28360000
        ERROROUT(-NUM'CHARS,1);                                         28365000
        END ELSE BEGIN                                                  28370000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     28375000
        ERROROUT(-GET'MESSAGE(37),1);                                   28380000
        B:=-1;                                                          28385000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          28390000
        END;                                                            28395000
       END;                                                             28400000
                                                                        28405000
     IF NOT B THEN BEGIN                                                28410000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                28415000
     END;                                                               28420000
         CHECKYTRAP; <<Check for operator interrupt request>>           28425000
                                                                        28430000
     IF MAX'DEV=8 THEN BEGIN                                            28435000
 <<-             -      CH - CE    (reference=1)>>                      28440000
                                                                        28445000
     CHNL'INIT;                                                         28450000
     DO'WIOC0(!4040+DEV); <<Address the device under test>>             28455000
     DO'WIOC0(!4067); <<Send modifier seven>>                           28460000
     DO'WIOC0(!4); <<Set reference for CE=1>>                           28465000
     DO'WIOC0(!24); <<Set mask on for these lines>>                     28470000
     DO'WIOC0(!4062); <<Send modifier two>>                             28475000
     DO'WIOC0(!1D); <<Wiggle CH to cause deviation>>                    28480000
     DODELAY(STARTIME,5); <<Short wait>>                                28485000
     A:=B:=0;                                                           28490000
     DO'RIOC0; A:=TOS'; <<Now read modem status lines>>                 28495000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     28500000
     DO'RIOC0; <<Read the DSJ returned byte>>                           28505000
     IF A.(11:5)<>!1B THEN BEGIN                                        28510000
     IF A.(11:5)<>!1D THEN BEGIN                                        28515000
        NUM'CHARS:=GET'MESSAGE(40);                                     28520000
        NUM2ASC(20,2,16,A.(11:5));                                      28525000
        NUM2ASC(33,2,16,!1B);                                           28530000
        ERROROUT(-NUM'CHARS,1);                                         28535000
        END ELSE BEGIN                                                  28540000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     28545000
        ERROROUT(-GET'MESSAGE(37),1);                                   28550000
        B:=-1;                                                          28555000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          28560000
        END;                                                            28565000
       END;                                                             28570000
                                                                        28575000
     IF NOT B THEN BEGIN                                                28580000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                28585000
     END;                                                               28590000
 <<-      CH - CE    (reference=0)>>                                    28595000
                                                                        28600000
     DO'WIOC0(!4040+DEV); <<Address device under test>>                 28605000
     DO'WIOC0(!4067); <<Send modifier seven>>                           28610000
     DO'WIOC0(!B); <<Set CE reference=0>>                               28615000
     DO'WIOC0(!24); <<Set mask on for these lines>>                     28620000
     DO'WIOC0(!4062); <<Send modifier two>>                             28625000
     DO'WIOC0(!2); <<Wiggle CH to cause change>>                        28630000
     DODELAY(STARTIME,5); <<Short wait ..>>                             28635000
     A:=B:=0;                                                           28640000
     DO'RIOC0; A:=TOS'; <<Read the modem status>>                       28645000
     DO'WIOC0(!4070); <<Send the DSJ command code>>                     28650000
     DO'RIOC0; <<Read the DSJ returned byte>>                           28655000
     IF A.(11:5)<>4 THEN BEGIN                                          28660000
     IF A.(11:5)<>2 THEN BEGIN                                          28665000
        NUM'CHARS:=GET'MESSAGE(40);                                     28670000
        NUM2ASC(20,2,16,A.(11:5));                                      28675000
        NUM2ASC(33,2,16,4);                                             28680000
        ERROROUT(-NUM'CHARS,1);                                         28685000
        END ELSE BEGIN                                                  28690000
        IF TOS'.(8:8)<>2 THEN BEGIN                                     28695000
        ERROROUT(-GET'MESSAGE(37),1);                                   28700000
        B:=-1;                                                          28705000
        END ELSE ERROROUT(-GET'MESSAGE(39),1);                          28710000
        END;                                                            28715000
       END;                                                             28720000
                                                                        28725000
     IF NOT B THEN BEGIN                                                28730000
     IF TOS'.(8:8)<>2 THEN ERROROUT(-GET'MESSAGE(38),1);                28735000
     END;                                                               28740000
                                                                        28745000
     END; <<End of Extended ADCC only tests>>                           28750000
  REP'ILL'INT;                                                          28755000
         CHECKYTRAP; <<Check for operator interrupt request>>           28760000
END;                                                                    28765000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC     MAIN"                               28770000
                                                                        28775000
     IF PRINTOK THEN BEGIN                                              28780000
     CRLF;                                                              28785000
     NUM'CHARS:=GET'MESSAGE(9);                                         28790000
     NUM2ASC(21,4,10,ENDPASSCOUNTER);                                   28795000
     CRTOUT(MSG'OUT,-NUM'CHARS);                                        28800000
     END;                                                               28805000
     DOT'CNT:=0;                                                        28810000
     ENDPASSCOUNTER:=(IF ENDPASSCOUNTER>=9999 THEN 1 ELSE               28815000
                      ENDPASSCOUNTER+1);                                28820000
     IF LOOP THEN GO TS0;                                               28825000
                                                                        28830000
     EXIT'TO'DUS;                                                       28835000
                                                                        28840000
END; <<ADCCDIAG>>                                                       28845000
$CONTROL NOLIST                                                         28850000
$PAGE"ADCDIAG7  ADCC DIAGNOSTIC     LABEL LIST"                         28855000
$CONTROL LIST                                                           28860000
