MACRO 00001000 RCTLUNIT &ADDRESS=,&CUTYPE=,&FEATURE=,&ALTCH= 00002000 .* THIS MACRO GENERATES A REAL CONTROL UNIT BLOCK 00003000 GBLA &CHADDR,&CUADDR,&DVADDR,&DEC,&RCUCNT 00004000 GBLA &RDVCNT,&RCHCNT 00005000 GBLB &RCODE 00006000 GBLC &HEX,&CUTBL(512),&DVTBL(8) 00007000 LCLA &COUNT,&INDEXA,&INDEXB,&RCHNOA(4) 00008000 LCLC &NAMEX,&RCUADD,&RCUTYPE,&RCUSUB,&PRIME,&DUMMY 00008500 LCLC &RCUNAM(4),&RCHNAM(4),&RCHNOC(4) 00009000 LCLA &DEVCNT,&SUBCNT 00010000 AIF (&RDVCNT EQ 0 OR &RCHCNT NE 0).ERR15 00011000 &RCUSUB SETC '0' 00012000 &RCUTYPE SETC '0' @VA03583 00012500 &RCUADD SETC '&ADDRESS'(2,1) 00013000 &SUBCNT SETA 0 00014000 AIF (K'&ADDRESS NE 3).ERR1 00015000 &RCHNOC(1) SETC '&ADDRESS'(1,1) 00015500 &HEX SETC '&ADDRESS'(1,1) 00016000 HEXDEC 00017000 AIF (&RCODE).ERR1 00017100 &RCHNOA(1) SETA &DEC 00017200 AIF (T'&ALTCH EQ 'O').NOALT 00017300 AIF ('&CUTYPE' EQ '2314' OR '&CUTYPE' EQ '2403').ALTOK 00017400 AIF ('&CUTYPE' EQ '2404' OR '&CUTYPE' EQ '2803').ALTOK 00017500 AIF ('&CUTYPE' EQ '2804' OR '&CUTYPE' EQ '2835').ALTOK 00017600 AIF ('&CUTYPE' EQ '2841' OR '&CUTYPE' EQ '3803').ALTOK 00017700 AIF ('&CUTYPE' EQ '3830').ALTOK 00017800 AIF ('&CUTYPE' EQ '3880').ALTOK HRC011DK 00017850 AIF ('&CUTYPE' EQ 'ISC').ALTOK 00017900 AGO .ERR2 00018000 .ALTOK AIF (N'&ALTCH GT 3).ERR3 00018100 &COUNT SETA 0 00018200 .LOOPALT ANOP 00018300 &COUNT SETA &COUNT+1 00018400 AIF (K'&ALTCH(&COUNT) NE 1).ERR3 00018500 &RCHNOC(&COUNT+1) SETC '&ALTCH(&COUNT)' 00018600 &HEX SETC '&ALTCH(&COUNT)' 00018700 HEXDEC 00018800 AIF (&RCODE).ERR3 00018900 &RCHNOA(&COUNT+1) SETA &DEC 00019000 AIF (&COUNT LT N'&ALTCH).LOOPALT 00019100 .NOALT ANOP 00019200 &HEX SETC '&ADDRESS'(2,1) 00020000 HEXDEC 00021000 AIF (&RCODE).ERR1 00022000 &CUADDR SETA &DEC 00023000 &HEX SETC '&ADDRESS'(3,1) 00024000 HEXDEC 00025000 AIF (&RCODE).ERR1 00026000 &DVADDR SETA &DEC 00027000 AIF (&DVADDR NE 0 AND &DVADDR NE 8).ERR1 00028000 AIF ('&FEATURE' EQ '').NO16D 00030000 AIF ('&DVADDR' NE '0').ERR4 00031000 AIF ('&FEATURE' EQ '16-DEVICE').OK16 00032000 .TST32 AIF ('&FEATURE' NE '32-DEVICE').TST48 00033000 &SUBCNT SETA 1 00034000 .* TABLE OF SUPPORTED 32-DEVICE FEATURE DEVICES 00035000 AIF ('&CUTYPE' EQ '3880').OK16 HRC011DK 00036190 AIF ('&CUTYPE' EQ '3830').OK16 HRC011DK 00036380 AIF ('&CUTYPE' EQ '3272').OK16 HRC011DK 00036570 AIF ('&CUTYPE' EQ '3274').OK16 HRC101DK 00036670 AIF ('&CUTYPE' EQ '3174').OK16 HRC101DK 00036770 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00037000 AIF ('&CUTYPE' EQ '2702' OR '&CUTYPE' EQ 'ISC').OK16 @VA2050 00038100 AIF ('&CUTYPE' EQ '2848' OR '&CUTYPE' EQ 'IFA').OK16 00038110 AGO .ERR5 00039000 .TST48 AIF ('&FEATURE' NE '48-DEVICE').TST64 00040000 &SUBCNT SETA 2 00041000 .* TABLE OF SUPPORTED 48-DEVICE FEATURE DEVICES 00042000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00043000 AIF ('&CUTYPE' EQ '3830').OK16 00043050 AIF ('&CUTYPE' EQ 'ISC' OR '&CUTYPE' EQ 'IFA').OK16 00043100 AGO .ERR5 00044000 .TST64 AIF ('&FEATURE' NE '64-DEVICE').TST80 00045000 &SUBCNT SETA 3 00046000 .* TABLE OF SUPPORTED 64-DEVICE FEATURE DEVICES 00047000 AIF ('&CUTYPE' EQ '3174').OK16 HRC101DK 00047200 AIF ('&CUTYPE' EQ '3880').OK16 HRC011DK 00047500 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00048000 AIF ('&CUTYPE' EQ '3830').OK16 00048050 AIF ('&CUTYPE' EQ 'ISC').OK16 @VA02050 00048100 AGO .ERR5 00049000 .TST80 AIF ('&FEATURE' NE '80-DEVICE').TST96 00050000 &SUBCNT SETA 4 00051000 .* TABLE OF SUPPORTED 80-DEVICE FEATURE DEVICES 00052000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00053000 AGO .ERR5 00054000 .TST96 AIF ('&FEATURE' NE '96-DEVICE').TST112 00055000 &SUBCNT SETA 5 00056000 .* TABLE OF SUPPORTED 96-DEVICE FEATURE DEVICES 00057000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00058000 AGO .ERR5 00059000 .TST112 AIF ('&FEATURE' NE '112-DEVICE').TST128 00060000 &SUBCNT SETA 6 00061000 .* TABLE OF SUPPORTED 112-DEVICE FEATURE DEVICES 00062000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00063000 AGO .ERR5 00064000 .TST128 AIF ('&FEATURE' NE '128-DEVICE').TST144 00065000 &SUBCNT SETA 7 00066000 .* TABLE OF SUPPORTED 128-DEVICE FEATURE DEVICES 00067000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00068000 AGO .ERR5 00069000 .TST144 AIF ('&FEATURE' NE '144-DEVICE').TST160 00070000 &SUBCNT SETA 8 00071000 .* TABLE OF SUPPORTED 144-DEVICE FEATURE DEVICES 00072000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00073000 AGO .ERR5 00074000 .TST160 AIF ('&FEATURE' NE '160-DEVICE').TST176 00075000 &SUBCNT SETA 9 00076000 .* TABLE OF SUPPORTED 160-DEVICE FEATURE DEVICES 00077000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00078000 AGO .ERR5 00079000 .TST176 AIF ('&FEATURE' NE '176-DEVICE').TST192 00080000 &SUBCNT SETA 10 00081000 .* TABLE OF SUPPORTED 176-DEVICE FEATURE DEVICES 00082000 AIF ('&CUTYPE' EQ '2703' OR '&CUTYPE' EQ '3705').OK16 00083000 AGO .ERR5 00084000 .TST192 AIF ('&FEATURE' NE '192-DEVICE').TST208 00085000 &SUBCNT SETA 11 00086000 .* TABLE OF SUPPORTED 192-DEVICE FEATURE DEVICES 00087000 AIF ('&CUTYPE' EQ '3705').OK16 00088000 AGO .ERR5 00089000 .TST208 AIF ('&FEATURE' NE '208-DEVICE').TST224 00090000 &SUBCNT SETA 12 00091000 .* TABLE OF SUPPORTED 208-DEVICE FEATURE DEVICES 00092000 AIF ('&CUTYPE' EQ '3705').OK16 00093000 AGO .ERR5 00094000 .TST224 AIF ('&FEATURE' NE '224-DEVICE').TST240 00095000 &SUBCNT SETA 13 00096000 .* TABLE OF SUPPORTED 224-DEVICE FEATURE DEVICES 00097000 AIF ('&CUTYPE' EQ '3705').OK16 00098000 AGO .ERR5 00099000 .TST240 AIF ('&FEATURE' NE '240-DEVICE').TST256 00100000 &SUBCNT SETA 14 00101000 .* TABLE OF SUPPORTED 240-DEVICE FEATURE DEVICES 00102000 AIF ('&CUTYPE' EQ '3705').OK16 00103000 AGO .ERR5 00104000 .TST256 AIF ('&FEATURE' NE '256-DEVICE').ERR6 00105000 &SUBCNT SETA 15 00106000 .* TABLE OF SUPPORTED 256-DEVICE FEATURE DEVICES 00107000 AIF ('&CUTYPE' EQ '3705').OK16 00108000 AGO .ERR5 00109000 .OK16 ANOP 00110000 &NAMEX SETC 'RCU'.'&ADDRESS'(1,1).'&RCUADD'.'8' 00111000 .NO16D ANOP 00112000 &COUNT SETA 1 00113000 .CUTAB ANOP 00113100 &RCUNAM(&COUNT) SETC 'RCU'.'&RCHNOC(&COUNT)'.'&RCUADD'.'&ADDRESS'(3,1) 00113200 &RCHNAM(&COUNT) SETC 'RCHAN'.'&RCHNOC(&COUNT)' 00113300 &INDEXA SETA &RCHNOA(&COUNT)*32+&CUADDR*2+&DVADDR/8+1 00113400 &DUMMY SETC '&CUTBL(&INDEXA)' 00113410 AIF ('&CUTBL(&INDEXA)' NE '').ERR8 00113420 &CUTBL(&INDEXA) SETC '&RCUNAM(1)' 00113500 .CUTBFIL ANOP 00113600 &COUNT SETA &COUNT+1 00113700 AIF (&COUNT LE N'&ALTCH+1).CUTAB 00113800 AIF (&COUNT GT 4).CUTABND 00113900 &RCHNAM(&COUNT) SETC '0' 00114000 AGO .CUTBFIL 00114100 .CUTABND ANOP 00114200 AIF (&RCUCNT NE 0).N1ST 00116000 ENTRY DMKRIOCU 00117000 DMKRIOCU DS 0D 00118000 .N1ST ANOP 00119000 &RCUNAM(1) DS 0D 00120000 AIF ('&FEATURE' EQ '').N16D 00121000 &NAMEX EQU &RCUNAM(1) 00122000 .N16D AIF ('&RCUSUB' NE '0').SUB 00123000 &PRIME SETC '&RCUNAM(1)' 00124000 .SUB ANOP 00125000 &RCUADD SETC '&RCUADD'.'&ADDRESS'(3,1) 00126000 DC XL2'0&RCUADD' -RCUADD 00127000 DC H'0' - RCULOCK 00128000 DC AL1(RCUDISA+RCUCHAOF+RCUCHBOF+RCUCHCOF+RCUCHDOF) RCUSTAT 00129000 AIF ('&CUTYPE' EQ '2314' OR '&CUTYPE' EQ '2844').SSUB 00130000 AIF ('&CUTYPE' EQ '2403' OR '&CUTYPE' EQ '2803').SSUB 00131000 AIF ('&CUTYPE' EQ '2404' OR '&CUTYPE' EQ '2804').SSUB 00132000 AIF ('&CUTYPE' EQ '2415' OR '&CUTYPE' EQ '3411').SSUB 00133000 AIF ('&CUTYPE' EQ '3345').SSUB @VA05692 00134100 AIF ('&CUTYPE' EQ '2820' OR '&CUTYPE' EQ '2841').SSUB 00135000 AIF ('&CUTYPE' EQ '2840' OR '&CUTYPE' EQ '2848').SSUB 00136000 AIF ('&CUTYPE' EQ '3272').SSUB 00137000 AIF ('&CUTYPE' EQ '3274').SSUB HRC101DK 00137500 AIF ('&CUTYPE' EQ '3803' OR '&CUTYPE' EQ '2319').SSUB 00138000 AIF ('&CUTYPE' EQ 'CTCA').SSUB 00139000 AIF ('&CUTYPE' EQ '3174').TYPE HRC101DK 00141000 AIF ('&CUTYPE' NE '2701' AND '&CUTYPE' NE '2702' *00143000 AND '&CUTYPE' NE '2703' *00144090 AND '&CUTYPE' NE '3880').TYPE HRC011DK 00144180 .* IF CUTYPE IS 3066, 3138, 3148, 3158, 3036, 3830, 3851, 00144500 .* ISC OR IFA, THEN RCUTYPE HAS BEEN SET TO 0 AND WE NOW 00144700 .* BRANCH TO LABEL .TYPE 00144800 &RCUTYPE SETC 'RCU&CUTYPE' 2701, 2702, 2703 OR 3880 HRC011DK 00145490 AGO .TYPE 00146000 .SSUB ANOP 00147000 &RCUTYPE SETC 'RCUSHRD' 00148000 .TYPE ANOP 00149000 DC AL1(&RCUTYPE+&RCUSUB) RCUTYPE 00150000 DC H'0' - RESERVED 00151000 DC A(&RCUNAM(1)) - RCUFIOB 00152000 DC A(&RCUNAM(1)) - RCULIOB 00153000 AIF ('&RCUSUB' EQ '0').PRIME 00154000 DC A(&PRIME) - POINTER TO PRIMARY CONTROL UNIT 00155000 DC 3A(0) - RESERVED 00156000 AGO .NTPRIME 00157000 .PRIME ANOP 00158000 DC A(&RCHNAM(1)) - RCUCHA 00159000 DC A(&RCHNAM(2)) - RCUCHB 00159500 DC A(&RCHNAM(3)) - RCUCHC 00160000 DC A(&RCHNAM(4)) - RCUCHD 00160500 .NTPRIME ANOP 00162000 DC A(&RCUNAM(1)) - RCURSTQ 00163000 DC F'0' - RCUOPER 00164000 DS 0D RCUDVTBL 00165000 &COUNT SETA 1 00166000 .ZERO1 ANOP 00167000 &DVTBL(&COUNT) SETC '0' 00168000 &COUNT SETA &COUNT+1 00169000 AIF (&COUNT LE 8).ZERO1 00170000 &CHADDR SETA &RCHNOA(1) 00171000 RDVTBL GEN 00172000 AIF (&DVADDR LT 8).LOWR 00173000 DC 8H'-1' - 00174000 .LOWR ANOP 00175000 &DEVCNT SETA 0 00176000 &COUNT SETA 1 00177000 .LOOP1 ANOP 00178000 AIF ('&DVTBL(&COUNT)' EQ '0').NDEV1 00179000 DC AL2((&DVTBL(&COUNT)-DMKRIODV)/8) 00180000 &DEVCNT SETA &DEVCNT+1 00181000 AGO .CONT1 00182000 .NDEV1 ANOP 00183000 DC H'-1' - 00184000 .CONT1 ANOP 00185000 &COUNT SETA &COUNT+1 00186000 AIF (&COUNT LE 8).LOOP1 00187000 AIF (&DVADDR GE 8).END 00188000 AIF ('&FEATURE' EQ '').HIGHR 00189000 &COUNT SETA 1 00190000 .ZERO2 ANOP 00191000 &DVTBL(&COUNT) SETC '0' 00192000 &COUNT SETA &COUNT+1 00193000 AIF (&COUNT LE 8).ZERO2 00194000 &DVADDR SETA 8 00195000 &CHADDR SETA &RCHNOA(1) 00196000 RDVTBL GEN 00197000 &COUNT SETA 1 00198000 .LOOP2 ANOP 00199000 AIF ('&DVTBL(&COUNT)' EQ '0').NDEV2 00200000 DC AL2((&DVTBL(&COUNT)-DMKRIODV)/8) 00201000 AGO .CONT2 00202000 .NDEV2 ANOP 00203000 DC H'-1' - 00204000 .CONT2 ANOP 00205000 &COUNT SETA &COUNT+1 00206000 AIF (&COUNT LE 8).LOOP2 00207000 AGO .END 00208000 .HIGHR ANOP 00209000 DC 8H'-1' - 00210000 .END ANOP 00211000 AIF ('&CUTYPE' EQ 'CTCA' AND &DEVCNT NE 1).ERR7 00212000 &RCUCNT SETA &RCUCNT+1 00213000 SPACE 3 00214000 AIF ('&SUBCNT' EQ '0').MEND 00215000 &SUBCNT SETA &SUBCNT-1 00216000 &RCUSUB SETC 'RCUSUB' 00217000 &CUADDR SETA &CUADDR+1 00218000 &DEC SETA &CUADDR 00219000 DECHEX 00220000 AIF (&RCODE).ERR1 00221000 &RCUADD SETC '&HEX' 00222000 &DVADDR SETA 0 00223000 AGO .OK16 00224000 .MEND MEXIT 00225000 .ERR1 MNOTE 8,'INVALID CONTROL UNIT ADDRESS' 00226000 MEXIT 00227000 .ERR2 MNOTE 8,'''ALTCH'' IS INVALID FOR CUTYPE ''&CUTYPE''' 00227200 MEXIT 00227400 .ERR3 MNOTE 8,'INVALID ALTCH SPECIFICATION' 00227600 MEXIT 00227800 .ERR4 MNOTE 8,'INVALID CONTROL UNIT ADDRESS FOR SPECIFIED FEATURE' 00228000 MEXIT 00229000 .ERR5 MNOTE 8,'INVALID CONTROL UNIT TYPE FOR SPECIFIED FEATURE' 00230000 MEXIT 00231000 .ERR6 MNOTE 8,'INVALID FEATURE SPECIFIED' 00232000 MEXIT 00233000 .ERR7 MNOTE 8,'INVALID DEVICE CONFIGURATION' 00234000 MEXIT 00235000 .ERR8 MNOTE 8,'CHANNEL TABLE FOR &RCUNAM(1) IN USE BY &DUMMY' 00235100 MEXIT 00235200 .ERR15 MNOTE 12,'RCTLUNIT MACRO OUT OF SEQUENCE' 00236000 MEND 00237000