IDENT DEMUX,110B ABS SST FL,TR ENTRY DEMUX ENTRY RFL= SYSCOM B1 TITLE DEMUX - PROCESS STIMULATOR OUTPUT. *COMMENT DEMUX - PROCESS STIMULATOR OUTPUT. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992. SPACE 4,10 *** DEMUX - PROCESS STIMULATOR OUTPUT. * JERRY BRANHAM. 74/05/07. * R. A. JAPS 78/05/25. * D. K. ELDRED. 82/01/18. SPACE 4,10 *** DEMUX TRANSLATES THE OUTPUT FROM THE NOS STIMULATORS AND * OPTIONALLY PROCESSES TIME STAMP AND/OR TRACE DATA. SPACE 4,30 *** CONTROL STATEMENT CALL. * * DEMUX(P1,P2,...,PN) * * PN DEFAULT MEANING * * I *STIMOUT* FILE CONTAINING STIMULATOR DATA. * * NR REWIND DO NOT REWIND STIMULATOR AND OUTPUT FILES * BEFORE EXECUTION. CANNOT BE EQUIVALENCED. * * NT 1 NUMBER OF TERMINALS TO PROCESS. RANGE IS * FROM 1 TO 512 DECIMAL. IF NO POST RADIX * IS SPECIFIED, OCTAL BASE IS ASSUMED. * * O *OUTPUT* FILE TO RECEIVE TRANSLATED SESSION OUTPUT. * * SL NONE SELECTED LINE TO BE PROCESSED. THIS MUST * BE WITHIN THE RANGE SPECIFIED BY *NT*. IF * NO POST RADIX IS SPECIFIED, OCTAL BASE IS * ASSUMED. * * T NONE PROCESS TIME STAMP DATA. CANNOT BE * EQUIVALENCED. * * TR NONE FILE TO RECEIVE TRACE OUTPUT. IF *TR* IS * OMITTED, TRACE DATA IS IGNORED. IF *TR* * IS UNEQUIVALENCED, THE FILE SPECIFIED BY * *O* WILL ALSO BE USED FOR TRACE OUTPUT. SPACE 4,15 *** DAYFILE MESSAGES. * * * DEMUX ARGUMENT ERROR.* = AN ILLEGAL ARGUMENT WAS USED, OR * AN ARGUMENT WAS ILLEGALLY EQUIVALENCED. * * * DEMUX COMPLETE.* = NORMAL TERMINATION. * * * DEMUX MEMORY OVERFLOW.* = REQUIRED FL EXCEEDED MFL FOR JOB * STEP. POSSIBLE SOLUTIONS ARE TO DECREASE THE *NT* * VALUE, TO INCREASE THE JOB STEP MFL, OR TO REDUCE THE * MEMORY REQUIREMENTS BY ADJUSTING ONE OR MORE DEMUX * ASSEMBLY PARAMETERS - SEE *PROGRAMMING CONSIDERATIONS*. * * * DEMUX NUMERIC ARGUMENT CONVERSION ERROR.* = A NUMERIC * ARGUMENT WAS INVALID. * * * DEMUX NT VALUE TOO LARGE.* = *NT* VALUE EXCEEDS 512. * * * DEMUX SL VALUE TOO LARGE.* = *SL* VALUE EXCEEDS *NT* VALUE. SPACE 4,10 *** OPERATOR MESSAGES. * * * COPYING SESSION DATA TO OUTPUT* = DATA FROM THE SCRATCH * FILE IS BEING COPIED TO THE OUTPUT FILE. * * * TRANSLATING STIMULATOR OUTPUT* = DATA IS BEING TRANSLATED * AND COPIED TO THE SCRATCH FILE. SPACE 4,10 *** COMMON DECKS. *CALL COMCMAC TITLE INTERNAL DOCUMENTATION. SPACE 4,10 ** STIMULATOR DATA FORMATS. * * TWO TYPES OF DATA ARE PRODUCED BY THE NOS STIMULATORS AND * PROCESSED BY DEMUX - CHARACTER DATA AND TRACE DATA. SPACE 4,20 ** CHARACTER DATA FORMAT. * *T CHARDATA 1/0,11/ TERMINAL,12/ DATA,12/ DATA,12/ DATA,12/ DATA * * TERMINAL = TERMINAL NUMBER. * * EACH *DATA* BYTE HAS THREE POSSIBLE FORMATS - * *T NORMAL 1/0,3/,8/ ASCII * *T SECOND 1/1,1/1,10/ SECONDS * *T MILLI 1/1,1/0,10/ MILLISEC * * ASCII = NORMAL CHARACTER DATA. * SECONDS = SECONDS PORTION OF TIME STAMP DATA. * MILLISEC = MILLISECONDS PORTION OF TIME STAMP DATA. SPACE 4,20 ** TRACE DATA FORMAT. * * TRACE DATA HAS THE FOLLOWING FORMAT - * *T TRACE1 1/1,11/ TERMINAL,24/ *1TE* STATUS,12/ SECONDS,12/ MILLISEC *T,TRACE2 1/1,11/ TERMINAL,12/ *1TE* ADDR,12/ INPCHR,12/ OUTCHR,12/ 0 * * TERMINAL = TERMINAL NUMBER. * *1TE* STATUS = BYTES 0 AND 1 FROM *1TE* TERMINAL TABLE. * SECONDS = SECOND CLOCK. * MILLISEC = MILLISECOND CLOCK. * *1TE* ADDR = *1TE* ADDRESS FOR NEXT OUTPUT ROUTINE (*TOCA* * TABLE ENTRY FOR THE TERMINAL). * INPCHR = INPUT CHARACTER TO BE PROCESSED. * OUTCHR = OUTPUT CHARACTER SENT. SPACE 4,25 ** PROGRAMMING CONSIDERATIONS. * * IN ORDER TO EFFICIENTLY PROCESS VARIABLE AMOUNTS OF SESSION * DATA FOR VARIABLE NUMBERS OF TERMINALS, DEMUX AUTOMATICALLY * ALLOCATES MEMORY FOR LINE TABLES (ONE PER TERMINAL AS SET * BY THE *NT* ARGUMENT). * * IN ORDER TO AVOID A TIME CONSUMING AND INEFFICIENT SORT OF * THE STIMULATOR DATA, WHILE STILL PROVIDING OUTPUT DATA IN * ASCENDING TERMINAL NUMBER ORDER, A *PRU DIRECTORY* IS KEPT * WHICH ASSOCIATES THE SCRATCH FILE PRUS WITH THE RESPECTIVE * TERMINALS. IN THIS MANNER, THE OUTPUT FILE IS SORTED AS * REQUIRED WITHOUT EVER ACTUALLY MOVING ANY DATA - THE SCRATCH * FILE IS SIMPLY READ IN RANDOM ORDER AND THE ONLY SORTING IS * DONE ON THE PRU DIRECTORY ITSELF. * * SINCE BOTH THE LINE TABLES AND PRU DIRECTORY ARE DYNAMICALLY * CREATED, AND SINCE ADDITIONAL MEMORY IS OBTAINED AS REQUIRED * FOR THE PRU DIRECTORY, IT IS POSSIBLE TO REQUIRE MORE MEMORY * THAN IS AVAILABLE. THIS IS MINIMIZED BY ENSURING THAT THE * LINE TABLES WILL NOT EXCEED 300000B. HOWEVER, EXTREMELY * LARGE SESSIONS AND EXTREMELY LARGE NUMBERS OF TERMINALS MAY * REQUIRE ADJUSTMENT OF SOME ASSEMBLY PARAMETERS. IF ONLY A * SMALL NUMBER OF TERMINALS WILL BE STIMULATED, DECREASING * *MTN* AND INCREASING *LBUFL* WILL INCREASE SPEED SLIGHTLY. EJECT TITLE MACRO DEFINITIONS AND ASSEMBLY CONSTANTS. INPUT SPACE 4,10 ** INPUT - INPUT NEXT DATA WORD. * * INPUT * * EXIT (X6) = DATA WORD. * * CALLS INP. PURGMAC INPUT INPUT MACRO RJ INP ENDM OUTPUT SPACE 4,10 ** OUTPUT - OUTPUT CHARACTER FROM (X6). * * OUTPUT * * (X6) WILL BE WRITTEN TO THE OUTPUT FILE. * * CALLS SWB. PURGMAC OUTPUT OUTPUT MACRO RJ SWB ENDM SPACE 4,10 **** ASSEMBLY PARAMETERS. IBUFL EQU 3001B INPUT BUFFER LENGTH LBUFL EQU 300B LINE BUFFER LENGTH ERRNZ LBUFL-LBUFL/100B*100B MUST BE MULTIPLE OF PRU 7 ERRNG 300000B-MTN*LBUFL MAY EXCEED AVAILABLE FL OBUFL EQU 3001B OUTPUT BUFFER LENGTH SBUFL EQU 3001B SCRATCH BUFFER LENGTH WBUFL EQU 400B WORKING BUFFER LENGTH MEMI EQU 1000B INITIAL / INCREMENTAL PRU DIRECTORY SIZE MTN EQU 512D MAXIMUM NUMBER OF TERMINALS **** TABLE SPACE 4,30 *** LINE TABLE STRUCTURE. * * FOR EACH TERMINAL BEING PROCESSED, A LINE TABLE EXISTS WITH * THE FOLLOWING FORMAT. * *T LASM 60/ TEXT ASSEMBLY BUFFER *T,LCNT 60/ WORD COUNT IN CURRENT LINE *T,LPTR 1/F,59/ OFFSET INTO *LBUF* *T,LSEC 60/ LAST SECONDS *T,LSHF 60/ SHIFT COUNT FOR NEXT CHARACTER *T,LTIM 60/ TIME ADDER *T,LBUF 60/ *LBUFL* WORD LINE BUFFER * * F = 0, IF SESSION DATA FOR THIS LINE HAS BEEN ENCOUNTERED. * = 1, IF NO SESSION DATA HAS BEEN ENCOUNTERED. BEGIN BSSN 0 LASM BSSN 1 TEXT ASSEMBLY BUFFER LCNT BSSN 1 WORD COUNT LPTR BSSN 1 BUFFER POINTER LSEC BSSN 1 LAST SECONDS LSHF BSSN 1 SHIFT COUNT LTIM BSSN 1 TIME ADDER LBUF BSSN LBUFL LINE BUFFER LNLG BSSN 0 LINE TABLE LENGTH END BSSN TITLE FETS AND WORKING STORAGE. FETS SPACE 4,10 * FETS AND CONSTANTS. ORG 110B I BSS 0 STIMOUT FILEB IBUF,IBUFL O BSS 0 OUTPUT FILEB OBUF,OBUFL R BSS 0 TR BSS 0 TRACE FILEB OBUF,OBUFL S BSS 0 SCR FILEB SBUF,SBUFL,(FET=6) SPACE 4,10 * DIRECT CELLS. FL BSS 2 CURRENT FL / JOB STEP MFL LW BSS 1 LAST WORD STORED IN LINE BUFFER MR BSS 1 *MEM* REQUEST WORD NR BSS 1 NO REWIND FLAG NT CON 0L1 NUMBER OF TERMINALS TO PROCESS PD BSS 2 FWA / NEXT PRU DIRECTORY PN CON 1 NEXT PRU ON *SCR* SL BSS 1 SELECTED LINE TO PROCESS - 0 = ALL LINES T BSS 1 TIME STAMP FLAG TITLE DEMUX MAIN LOOP. ** DEMUX - STIMULA DATA PROCESSOR. DEMUX SB1 1 RJ PRS PRESET PROGRAM READEI I INITIATE READ ON *STIMOUT* FILE MESSAGE (=C* TRANSLATING STIMULATOR OUTPUT*),1 DEM1 RJ GNW GET NEXT WORD NZ X1,DEM5 IF EOI NZ B7,DEM3 IF NOT TRACE DATA RJ FTD FORMAT TRACE DATA EQ DEM1 PROCESS NEXT WORD DEM2 SB7 B7-1 DECREMENT CHARACTER COUNT PL B7,DEM3 IF CHARACTERS REMAIN TO BE PROCESSED SA6 B6+LASM SAVE DATA WORD SX6 B3+ SAVE SHIFT COUNT SA6 B6+LSHF EQ DEM1 PROCESS NEXT WORD DEM3 NG X5,DEM4 IF TIME STAMP DATA RJ FCD FORMAT CHARACTER DATA EQ DEM2 PROCESS NEXT CHARACTER DEM4 RJ FTS FORMAT TIME STAMP EQ DEM2 PROCESS NEXT CHARACTER * COPY SESSION DATA TO OUTPUT. DEM5 RJ FLB FLUSH LINE BUFFERS MESSAGE (=C* COPYING SESSION DATA TO OUTPUT*),1 REWIND S,R RJ SPD SORT PRU DIRECTORY WRITEW O,(=10H1 ),1 ISSUE PAGE EJECT DEM6 RJ IRR INITIATE/RESUME *RPHRLS* REQUEST READW S,WBUF,WBUFL NZ X1,DEM7 IF END OF DATA WRITEW O,WBUF,WBUFL EQ DEM6 LOOP DEM7 SB7 B6-WBUF CHECK FOR DATA REMAINING IN *WBUF* ZR B7,DEM8 IF NO DATA LEFT IN BUFFER WRITEW O,WBUF,B7 WRITE FRAGMENT TO OUTPUT FILE DEM8 SA1 S+5 CHECK FOR END OF LIST SA1 X1+ NZ X1,DEM6 IF NOT EOI WRITEW O,(=0),1 TERMINATE LAST LINE WRITER X2 RETURN S MESSAGE (=C* DEMUX COMPLETE.*) ENDRUN TITLE SUBROUTINES. CEL SPACE 4,15 ** CEL - CHECK FOR END OF LINE. * * ENTRY (B6) = LINE TABLE ADDRESS. * (LW) = LAST WORD STORED IN LINE BUFFER. * * EXIT END OF LINE ENSURED. * * USES X - 0, 1, 6. * A - 1. * * MACROS OUTPUT. CEL SUBR ENTRY/EXIT SA1 LW MX0 -12 BX1 -X0*X1 ZR X1,CELX IF END OF LINE SX6 B0+ OUTPUT EQ CELX RETURN FCD SPACE 4,20 ** FCD - FORMAT CHARACTER DATA. * * ENTRY (X5) = DATA WORD. * (X6) = ASSEMBLY WORD. * (B3) = SHIFT COUNT. * (B6) = LINE TABLE ADDRESS. * * EXIT CHARACTER ADDED TO LINE DATA. * (X5), (X6), (B3) UPDATED. * * USES X - 0, 1, 2, 4, 5, 6, 7. * A - 1, 2, 6. * B - 3. * * CALLS CEL. * * MACROS OUTPUT. FCD SUBR ENTRY/EXIT LX5 12 EXTRACT CHARACTER MX0 -8 BX2 -X0*X5 AX2 1 SA1 ASCI+X2 TRANSLATE CHARACTER NG X1,FCDX IF UNPRINTABLE CHARACTER MX0 -6 BX4 -X0*X1 LX4 B3 BX6 X6+X4 SB3 B3-6 DECREMENT SHIFT COUNT SA6 LW NZ X1,FCD1 IF NOT CARRIAGE RETURN OUTPUT EQ FCD2 PROCESS END OF LINE FCD1 PL B3,FCDX IF DATA WORD NOT FULL SA6 LW OUTPUT SA2 LW SA1 B6+LCNT CHECK LINE SIZE MX6 0 ZR X2,FCD3 IF END OF LINE SX6 X1+B1 SX7 X6-12 NG X7,FCD3 IF LINE LIMIT NOT EXCEEDED FCD2 RJ CEL CHECK FOR END OF LINE SA1 =10H INDENT NEXT LINE BX6 X1 OUTPUT BX6 X6-X6 SET END OF LINE FCD3 SA6 B6+LCNT UPDATE LINE WORD COUNT SB3 54 RESET SHIFT COUNT BX6 X6-X6 CLEAR ASSEMBLY REGISTER EQ FCDX RETURN FLB SPACE 4,15 ** FLB - FLUSH LINE BUFFERS. * * EXIT ALL LINE BUFFERS FLUSHED TO *SCR*. * * END OF THE LINE * WRITTEN TO *SCR* FOR EACH LINE. * TRACE FILE FLUSHED IF USED. * * USES X - 0, 1, 3, 6, 7. * A - 1, 6, 7. * B - 5, 6. * * CALLS UPD. * * MACROS RECALL, WRITER, WRITEW. FLB SUBR ENTRY/EXIT SX0 B0+ RECALL S FLB1 SX1 LNLG FLUSH OUTPUT IN BUFFER, IF ANY IX7 X0*X1 SB6 X7+AMEM SA1 B6+LPTR SX6 X1+ SA6 FLBA NG X1,FLB3 IF NO SESSION DATA ZR X1,FLB2 IF NO DATA IN BUFFER WRITEW S,B6+LBUF,X1 FLUSH DATA TO *SCR* FLB2 SX1 X0+1 CONVERT TERMINAL NUMBER TO DISPLAY RJ CDD MX6 48 BX7 X6*X4 SA7 FLBB+5 ADD TERMINAL NUMBER TO SESSION TERMINATOR WRITEW S,FLBB,FLBBL ISSUE SESSION TERMINATOR WRITER X2,R SA1 FLBA SX3 X1+FLBBL+100B CALCULATE NUMBER OF PRUS REQUIRED SB5 X0 SET TERMINAL NUMBER AX3 6 RJ UPD UPDATE PRU DIRECTORY AND POINTERS FLB3 SX0 X0+B1 SA1 NT IX1 X0-X1 NG X1,FLB1 IF MORE TERMINALS TO PROCESS SA1 FTD CHECK FOR TRACE DATA ZR X1,FLBX IF NO TRACE DATA WRITER R,R FLUSH TRACE FILE EQ FLBX RETURN FLBA BSS 1 WORD COUNT IN BUFFER FLBB CON 0 END OF LINE DATA C* END OF THE LINE ------------------------------* DATA 10H1 PAGE EJECT FOR NEXT SESSION FLBBL EQU *-FLBB FTD SPACE 4,15 ** FTD - FORMAT TRACE DATA. * * ENTRY (X6) = FIRST WORD OF TRACE DATA. * (TN) = TERMINAL NUMBER. * * EXIT TRACE DATA PROCESSED IF SELECTED. * * USES X - ALL. * A - 1, 3, 4, 5, 6, 7. * B - NONE. * * CALLS CFD, WOD. * * MACROS INPUT, WRITEW. FTD SUBR ENTRY/EXIT (ALSO USED AS FLAG) SA6 FTDA SAVE FIRST TRACE WORD INPUT SA6 FTDA+1 SAVE SECOND TRACE WORD SA1 TR ZR X1,FTDX IF TRACE NOT SELECTED * TRANSLATE INPUT AND OUTPUT CHARACTERS. MX0 -59 BX1 -X0*X6 MX0 -7 AX6 12 BX2 -X0*X6 EXTRACT OUTPUT CHARACTER AX6 12 SA3 TASC+X2 TRANSLATE OUTPUT CHARACTER BX4 -X0*X6 EXTRACT INPUT CHARACTER LX7 X3 SA5 TASC+X4 TRANSLATE INPUT CHARACTER SA7 FTDB+5 BX7 X5 SA7 FTDB+3 * PROCESS DATA IN SECOND TRACE WORD. AX1 6 POSITION DATA WORD RJ WOD CONVERT SECOND TRACE WORD TO OCTAL BX1 X6 SAVE UPPER OCTAL TRANSLATION MX0 -24 SA4 =6L GET SPACE FILL AX7 12 BX6 -X0*X7 BX6 X6+X4 LX6 18 SA6 A7+1 STORE OUTPUT CHARACTER OCTAL AX7 24 BX6 -X0*X7 BX7 X6+X4 LX7 18 SA7 A7-B1 STORE INPUT CHARACTER OCTAL BX6 -X0*X1 AX1 24 BX6 X6+X4 LX6 18 BX7 -X0*X1 SA6 A6+2 STORE DRIVER ADDRESS BX7 X7+X4 LX7 18 SA7 A7-B1 STORE PORT NUMBER * PROCESS DATA IN FIRST TRACE WORD. SA1 FTDA AX1 24 IGNORE TIME STAMP DATA RJ WOD BX1 X6 SAVE UPPER OCTAL TRANSLATION MX0 -48 BX6 -X0*X7 LX6 12 POSITION DATA AND CREATE END OF LINE SA6 A6+1 * PROCESS TIME DATA. SA1 FTDA CONVERT TIME MX0 -12 BX2 -X0*X1 EXTRACT MILLISECONDS AX1 12 BX1 -X0*X1 EXTRACT SECONDS SX6 1000 IX1 X6*X1 MERGE SECONDS AND MILLISECONDS IX1 X1+X2 RJ CFD CONVERT TO F10.3 FORMAT SA6 FTDB * WRITE COMPLETED LINE TO TRACE FILE. SA1 FTDC CHECK PAGE POSITION SX6 X1-1 SA6 A1+ PL X6,FTD1 IF NO PAGE HEADING REQUIRED SX6 LINP-1 SA6 A6+ WRITEW R,FTDD,FTDDL WRITE PAGE HEADING TO TRACE FILE FTD1 WRITEW R,FTDB,8 EQ FTDX RETURN FTDA BSS 2 FTDB BSS 8 TRACE LINE ASSEMBLY BUFFER FTDC CON 0 LINES REMAINING ON PAGE FTDD DATA C*1 TIME PORT --INPUT CHARACTER-- --OUTPUT CHA ,RACTER-- ADDR PARAMETERS* DATA C*0 * FTDDL EQU *-FTDD LENGTH OF PAGE HEADING FTS SPACE 4,15 ** FTS - FORMAT TIME STAMP. * * ENTRY (X5) = DATA WORD. * (B3) = SHIFT COUNT. * (B6) = LINE TABLE ADDRESS. * * EXIT TIME STAMP DATA PROCESSED IF SELECTED. * * USES X - 1, 2, 3, 4, 5, 6, 7. * A - 0, 1, 2, 4, 6, 7. * B - 3. * * CALLS CDD. * * MACROS OUTPUT. FTS SUBR ENTRY/EXIT SX7 B0+ SA7 B6+LCNT SA1 T CHECK TIME STAMP OPTION MX7 -10 LX5 12 ZR X1,FTSX IF TIME STAMP OPTION NOT SELECTED SA6 B6+LASM SAVE ASSEMBLY REGISTER SX6 B3 SAVE SHIFT COUNT SA6 B6+LSHF BX1 -X7*X5 BX2 X5 LX2 59-10 PL X2,FTS2 IF MILLISECOND TIME STAMP SA2 B6+LSEC GET LAST SECONDS STAMP IX3 X1-X2 PL X3,FTS1 IF CURRENT TIME .GE. PREVIOUS TIME SA4 B6+LTIM UPDATE TIME ADDER SX3 2000B IX6 X3+X4 SA6 A4 FTS1 BX6 X1 SA2 B6+LTIM GET TIME ADDER IX1 X1+X2 SA6 B6+LSEC SET LAST SECONDS = CURRENT TIME RJ CDD CONVERT SECONDS TO DISPLAY CODE SA2 FTSA BX6 X6-X2 SA0 B0 CLEAR *INDENT* FLAG EQ FTS3 OUTPUT TIME STAMP FTS2 RJ CDD CONVERT MILLISECONDS SA1 FTSB SA2 =1L. SB3 B2-B1 (B2) = 6*CHAR COUNT MX7 1 AX7 B3 FORM MASK FOR MILLISECONDS LX7 B2 RIGHT JUSTIFY MASK BX1 -X7*X1 BX6 X6-X1 MX7 18 FORM MASK FOR MILLISECONDS LX7 54 LX6 36 POSITION MASK BX6 X7*X6 ISOLATE 3-CHARACTERS OF MILLISECONDS BX6 X2+X6 SET DECIMAL POINT SA0 B1 SET *INDENT* FLAG FTS3 SA6 FTSC SAVE TIME STAMP SA2 B6+LASM ZR X2,FTS4 IF NO DATA IN DATA WORD BX6 X2 OUTPUT WRITE LEFT OVER DATA FTS4 SA1 FTSC WRITE TIME STAMP BX6 X1 OUTPUT SB3 A0+ CHECK FOR POSSIBLE INDENTATION ZR B3,FTS5 IF INDENTATION NOT REQUIRED SA1 =10H INDENT NEXT LINE BX6 X1 OUTPUT FTS5 SB3 54 RESET SHIFT COUNT SX6 B0+ CLEAR ASSEMBLY REGISTER EQ FTSX RETURN FTSA CON 5L*****&5L FTSB CON 10H0000000000&10H FTSC BSS 1 TEMPORARY GNW SPACE 4,25 ** GNW - GET NEXT WORD. * * EXIT (B5) = TERMINAL NUMBER. * (B6) = LINE TABLE ADDRESS. * (X1) .NE. 0 IF END OF RECORD. * (X5) = DATA WORD SHIFTED 12 BITS. * * IF TRACE DATA - * (B7) = 0. * (X6) = DATA WORD. * * IF NOT TRACE DATA - * (B3) = SHIFT COUNT. * (B7) = CHARACTER COUNT - 1 = 3. * (X3) = (X6) = ASSEMBLY WORD. * * USES X - 0, 1, 2, 3, 5, 6, 7. * A - 1, 2, 3. * B - 3, 6, 7. * * MACROS INPUT. * * NOTE DATA FOR AN INELIGIBLE TERMINAL IS DISCARDED. GNW SUBR ENTRY/EXIT GNW1 INPUT NZ X1,GNWX IF EOI BX5 X6 MX0 -11 SET TERMINAL NUMBER LX5 12 BX7 -X0*X5 SA1 NT SA2 SL IX1 X7-X1 BX3 X2-X7 PL X1,GNW1 IF TERMINAL NUMBER .GT. *NT* VALUE ZR X2,GNW2 IF SELECTIVE LINE NOT SET NZ X3,GNW1 IF TERMINAL NOT SELECTED GNW2 SX1 LNLG SET LINE TABLE ADDRESS SB5 X7 SET TERMINAL NUMBER IX1 X1*X7 SB7 B0+ PRESET *TRACE DATA* FLAG SB6 X1+AMEM SX1 B0+ CLEAR *EOI* FLAG NG X6,GNWX IF TRACE DATA SB7 4-1 SET CHARACTER COUNT - 1 SA2 B6+LSHF SET SHIFT COUNT SA3 B6+LASM SET ASSEMBLY WORD BX6 X3 SB3 X2 EQ GNWX RETURN INP SPACE 4,15 ** INP - INPUT NEXT DATA WORD. * * ENTRY (INPA) = LWA+1 OF DATA IN *WBUF*. * (INPB) = NEXT WORD IN *WBUF*. * * EXIT (X1) .EQ. 0 IF DATA TRANSFERED. * (X1) .NE. 0 IF EOF/EOI * (X6) = DATA WORD. * * USES X - 1, 3, 6. * A - 1, 3, 6. * B - 7. * * MACROS READW. INP SUBR ENTRY/EXIT SA1 INPA SET LWA+1 OF DATA SA3 A1+B1 SET CURRENT INDEX IX6 X1-X3 NZ X6,INP2 IF DATA REMAINS IN *WBUF* READW I,WBUF,WBUFL PL X1,INP1 IF NOT EOI SB7 B6-WBUF ZR B7,INPX IF NO DATA TRANSFERRED INP1 SX3 WBUF SX6 B6+ SA6 INPA INP2 SX6 X3+B1 INCREMENT INDEX SA3 X3 SA6 INPB SX1 B0 SET TRANSFER COMPLETE BX6 X3 EQ INPX RETURN INPA CON 0 LWA+1 OF DATA INPB CON 0 INDEX IN BUFFER IRR SPACE 4,15 ** IRR - INITIATE/RESUME *RPHRLS* REQUEST. * * EXIT *RPHRLS* INITIATED IF NECESSARY. * * USES X - 1, 2, 3, 4, 7. * A - 1, 2, 3, 4. * B - NONE. * * MACROS RPHRLS. * * NOTE BECAUSE THE *CIO* CODE FOR *RPHRLS* IS 230B, THE * COMMON DECKS WILL NOT RESTART THE REQUEST SHOULD *CIO* * DROP OUT, SINCE THEY INTERPRET A FET STATUS WITH 2**4 * SET AS *EOF*. IRR SUBR ENTRY/EXIT SA2 S CHECK FET STATUS LX2 59-0 PL X2,IRRX IF FET BUSY SA2 S+5 CHECK FOR END OF LIST SA2 X2+ ZR X2,IRRX IF ALL PRUS PROCESSED * THE FOLLOWING CODE IS ADAPTED FROM *COMCRDW*. SA1 S+1 GET FET BUFFER POINTERS SA2 A1+B1 SA3 A2+B1 SA4 A3+B1 SX1 X1 SX4 X4+ IX1 X4-X1 LIMIT - FIRST IX7 X2-X3 IN-OUT LX3 X7,B1 2*(IN-OUT) AX7 60 SIGN OF (IN-OUT) BX4 X7-X1 INVERT BUFFER IF OUT \ IN IX7 X4-X3 BUFFER SIZE - 2*(IN-OUT) NG X7,IRRX IF BUFFER THRESHOLD NOT REACHED RPHRLS S INITIATE *CIO* REQUEST EQ IRRX RETURN SPD SPACE 4,15 ** SPD - SORT PRU DIRECTORY. * * ENTRY (PD) = FWA OF PRU DIRECTORY. * (PD+1) = NEXT UNUSED ENTRY IN DIRECTORY. * * EXIT DIRECTORY SORTED. * LIST ADDRESS SET IN *SCR* FET. * * CALLS SST=. * * USES X - 1, 2, 6. * A - 1, 2, 6. * B - 7. SPD SUBR ENTRY/EXIT SA1 PD SET *SST=* PARAMETERS BX6 X1 SB7 X1 FWA OF TABLE TO BE SORTED SA6 S+5 SET PRU LIST INTO *SCR* FET SA2 A1+B1 IX1 X2-X1 SX1 X1-1 LENGTH OF TABLE RJ SST= SORT PRU DIRECTORY EQ SPDX RETURN SWB SPACE 4,15 ** SWB - STORE WRITE BUFFER DATA. * * ENTRY (X6) = DATA TO WRITE. * (B6) = LINE TABLE ADDRESS. * * EXIT DATA PLACED IN LINE BUFFER. * LINE BUFFER WRITTEN TO *SCR* IF NECESSARY. * (B5). (B6), (B7) PRESERVED. * * USES X - 1, 2, 3, 4, 6, 7. * A - 1, 2, 3, 4, 6, 7. * B - 5, 6, 7. * * CALLS UPD. * * MACROS WRITEW. SWB1 SA6 A1+ SET NEW INDEX SWB SUBR ENTRY/EXIT SA1 B6+LPTR GET LINE BUFFER POINTER SX7 X1+LBUF SA6 X7+B6 SX6 X1+B1 SX7 X6-LBUFL NZ X7,SWB1 IF OUTPUT BUFFER NOT FULL SX6 B5 SAVE REGISTERS SX7 B6 SA6 SWBA SA7 A6+B1 SX6 B7 SA6 A7+1 WRITEW S,X7+LBUF,LBUFL SA2 SWBA SET TERMINAL NUMBER SX3 LBUFL/100B SET NUMBER OF PRUS SB5 X2+ RJ UPD UPDATE PRU DIRECTORY / POINTERS SA3 SWBA+1 SA4 A3+B1 SB6 X3 SB7 X4 BX6 X6-X6 SA6 B6+LPTR STORE NEW BUFFER POINTER EQ SWBX RETURN SWBA BSS 3 TEMPORARY STORAGE UPD SPACE 4,15 ** UPD - UPDATE PRU DIRECTORY AND POINTERS. * * ENTRY (B5) = TERMINAL NUMBER. * (X3) = NUMBER OF PRUS WRITTEN. * (PN) = NEXT PRU TO WRITE. * (PD+1) = NEXT PRU DIRECTORY ENTRY TO USE. * * EXIT (PN), (PD+1), ((PD+1)) UPDATED. * * USES X - 1, 3, 4, 6, 7. * A - 1, 2, 3, 6, 7. * B - 7. * * MACROS ABORT, MEMORY, MESSAGE. UPD SUBR ENTRY/EXIT SA1 PN IX6 X1+X3 SA6 A1 UPDATE PRU NUMBER SB7 X3 SA3 PD+B1 SX4 B1 PX6 X1,B5 MERGE TERMINAL NUMBER AND PRU NUMBER SA6 X3 UPDATE PRU DIRECTORY SX7 X3+B1 SA7 A3 UPD1 SB7 B7-1 ZR B7,UPD2 IF ALL PRUS PROCESSED IX6 X6+X4 SA6 A6+B1 SX7 X7+B1 SA7 A3 EQ UPD1 LOOP * CHECK FOR POSSIBLE MEMORY INCREASE. UPD2 SA3 FL SA1 MR IX3 X3-X7 LX1 30 SX3 X3-LBUFL/100B-1 PL X3,UPDX IF NO MEMORY INCREASE REQUIRED SX7 X1+MEMI SA7 A3 UPDATE CURRENT FL SA3 A3+B1 LX7 30 IX3 X3-X7 SA7 A1+ NG X3,UPD3 IF *MEM* REQUEST EXCEEDS JOB STEP MFL MEMORY CM,MR,R REQUEST ADDITIONAL MEMORY EQ UPDX RETURN UPD3 MESSAGE (=C* DEMUX MEMORY OVERFLOW.*) RETURN S RETURN SCRATCH FILE ABORT COMMON SPACE 4,10 * COMMON DECKS. *CALL COMCCDD *CALL COMCCFD *CALL COMCCIO *CALL COMCRDW *CALL COMCSST *CALL COMCSYS *CALL COMCWOD *CALL COMCWTW TITLE DEMUX CONVERSION TABLE. ASCI SPACE 4,10 * ASCI - ASCII TABLE. ASCI BSS 0 LOC 0 DATA -1 UNPRINTABLE DUP 7,1 DATA -1 UNPRINTABLE DATA 70B BACKSPACE (UP-ARROW) DUP 4,1 DATA -1 UNPRINTABLE DATA 0 CARRIAGE RETURN DUP 18,1 DATA -1 UNPRINTABLE DATA 55B SPACE DATA -1 UNPRINTABLE DATA 64B DOUBLE QUOTE DATA 60B NUMBER DATA 53B DOLLAR SIGN DATA 63B PERCENT DATA 67B AMPERSAND DATA 70B APOSTROPHE DATA 51B ( DATA 52B ) DATA 47B * DATA 45B + DATA 56B , DATA 46B - DATA 57B . DATA 50B / DATA 33B 0 DATA 34B 1 DATA 35B 2 DATA 36B 3 DATA 37B 4 DATA 40B 5 DATA 41B 6 DATA 42B 7 DATA 43B 8 DATA 44B 9 DATA 400B COLON DATA 77B : DATA 72B < DATA 54B = DATA 73B > DATA 71B QUESTION MARK DATA -1 UNPRINTABLE DATA 01B A DATA 02B B DATA 03B C DATA 04B D DATA 05B E DATA 06B F DATA 07B G DATA 10B H DATA 11B I DATA 12B J DATA 13B K DATA 14B L DATA 15B M DATA 16B N DATA 17B O DATA 20B P DATA 21B Q DATA 22B R DATA 23B S DATA 24B T DATA 25B U DATA 26B V DATA 27B W DATA 30B X DATA 31B Y DATA 32B Z DATA 61B ( DATA 75B REVERSE SLANT DATA 62B ) DATA -1 UNPRINTABLE DATA 65B UNDERLINE DATA -1 UNPRINTABLE DATA 01B LOWER CASE A DATA 02B B DATA 03B C DATA 04B D DATA 05B E DATA 06B F DATA 07B G DATA 10B H DATA 11B I DATA 12B J DATA 13B K DATA 14B L DATA 15B M DATA 16B N DATA 17B O DATA 20B P DATA 21B Q DATA 22B R DATA 23B S DATA 24B T DATA 25B U DATA 26B V DATA 27B W DATA 30B X DATA 31B Y DATA 32B Z DUP 5,1 DATA -1 UNPRINTABLE LOC *O TASC SPACE 4,10 * TASC - ASCII READABLE OUTPUT TRANSLATION TABLE. TASC BSS 0 LOC 0 DATA 10HNULL DATA 10HSOH DATA 10HSTX DATA 10HETX DATA 10HEOT DATA 10HENQ DATA 10HACK DATA 10HBELL DATA 10HBKSP DATA 10HHTAB DATA 10HLF DATA 10HVTAB DATA 10HFORM FEED DATA 10HCR DATA 10HSHIFT OUT DATA 10HSHIFT IN DATA 10HDLE DATA 10HDC1 DATA 10HDC2 DATA 10HDC3 DATA 10HDC4 DATA 10HNAK DATA 10HSYN DATA 10HETB DATA 10HCAN DATA 10HEM DATA 10HSUB DATA 10HESC DATA 10HFS DATA 10HGS DATA 10HRS DATA 10HUS DATA 10H DATA 10HEX POINT DATA 10HD QUOTE DATA 10HPOUND SIGN DATA 10H$ DATA 10H^ DATA 10HAMPERSAND DATA 10HS QUOTE DATA 10H( DATA 10H) DATA 10H* DATA 10H+ DATA 10H, DATA 10H- DATA 10H. DATA 10H/ DATA 10H0 DATA 10H1 DATA 10H2 DATA 10H3 DATA 10H4 DATA 10H5 DATA 10H6 DATA 10H7 DATA 10H8 DATA 10H9 DATA 10H% DATA 10HSEMI DATA 10H< DATA 10H= DATA 10H> DATA 10HQUESTION DATA 10HAT SIGN DATA 10HA DATA 10HB DATA 10HC DATA 10HD DATA 10HE DATA 10HF DATA 10HG DATA 10HH DATA 10HI DATA 10HJ DATA 10HK DATA 10HL DATA 10HM DATA 10HN DATA 10HO DATA 10HP DATA 10HQ DATA 10HR DATA 10HS DATA 10HT DATA 10HU DATA 10HV DATA 10HW DATA 10HX DATA 10HY DATA 10HZ DATA 10HL BRACKET DATA 10HREV SLANT DATA 10HR BRACKET DATA 10HCIRCUMFLEX DATA 10HUNDERLINE DATA 10HGR ACCENT DATA 10H?A DATA 10H?B DATA 10H?C DATA 10H?D DATA 10H?E DATA 10H?F DATA 10H?G DATA 10H?H DATA 10H?I DATA 10H?J DATA 10H?K DATA 10H?L DATA 10H?M DATA 10H?N DATA 10H?O DATA 10H?P DATA 10H?Q DATA 10H?R DATA 10H?S DATA 10H?T DATA 10H?U DATA 10H?V DATA 10H?W DATA 10H?X DATA 10H?Y DATA 10H?Z DATA 10HL BRACE DATA 10HVERT LINE DATA 10HR BRACE DATA 10HTILDE DATA 10HRUBOUT LOC *O BUFFERS SPACE 4,20 USE PRESET * BUFFER ALLOCATION. IBUF BSSN IBUFL *STIMOUT* BUFFER OBUF BSSN OBUFL *OUTPUT* / *TRACE* BUFFER SBUF BSSN SBUFL *SCR* BUFFER WBUF BSSN WBUFL WORKING BUFFER * ALLOCATABLE MEMORY - LINE TABLES, PRU DIRECTORY. AMEM BSSN 0 FWA OF ALLOCATABLE MEMORY END BSSN RFL= EQU AMEM STARTING FL FOR DEMUX TITLE PRESET PROGRAM. PRS SPACE 4,15 ** PRS - PRESET PROGRAM. * * ENTRY (B1) = 1. * * EXIT CONTROL STATEMENT PARAMETERS PROCESSED. * FILES INITIALIZED AS NECESSARY. * * USES X - 1, 2, 4, 5, 6, 7. * A - 1, 4, 5, 6, 7. * B - 2, 3, 4, 5, 6, 7. * * CALLS ARG, DXB. * * MACROS ABORT, EVICT, MEMORY, MESSAGE, REWIND. PRS SUBR ENTRY/EXIT SX6 B0+ ESTABLISH DEFAULT OF NO TRACE SA6 TR * PROCESS CONTROL STATEMENT PARAMETERS. SA1 ACTR SET *COMCARG* PARAMETERS SB5 PRSA SA4 ARGR SB4 X1+ RJ ARG PROCESS ARGUMENTS ZR X1,PRS1 IF NO ERROR DETECTED MESSAGE (=C* DEMUX ARGUMENT ERROR.*) ABORT * PROCESS *NT* PARAMETER. PRS1 SA5 NT SB7 0 SET DEFAULT BASE TO OCTAL RJ DXB CONVERT TO BINARY SA6 NT ZR X4,PRS2 IF NO CONVERSION ERROR MESSAGE (=C* DEMUX NUMERIC ARGUMENT CONVERSION ERROR.*) ABORT PRS2 SX1 MTN+1 CHECK FOR *NT* IN RANGE IX2 X6-X1 NG X2,PRS3 IF *NT* VALUE IN RANGE MESSAGE (=C* DEMUX NT VALUE TOO LARGE.*) ABORT * PROCESS *SL* PARAMETER. PRS3 SA5 SL PROCESS SELECTIVE LINE SB7 0 SET DEFAULT BASE TO OCTAL RJ DXB CONVERT TO BINARY SA6 SL ZR X4,PRS4 IF NO CONVERSION ERROR MESSAGE (=C* DEMUX NUMERIC ARGUMENT CONVERSION ERROR.*) ABORT PRS4 SA1 NT IX2 X1-X6 PL X2,PRS5 IF SL .LE. NT MESSAGE (=C* DEMUX SL VALUE TOO LARGE.*) ABORT * CHECK FOR 63-CHARACTER SYSTEM. PRS5 SA1 CSMR CHECK CHARACTER SET MODE OF SYSTEM NG X1,PRS6 IF 64 CHARACTER SET SX6 63B CHANGE COLON TO PERCENT SA6 ASCI+72B * ALLOCATE LINE TABLES AND INITIAL PRU DIRECTORY SIZE. PRS6 MX6 29 GET JOB STEP MFL SA6 FL+1 MEMORY CM,FL+1,R SA1 NT SB2 X1+ SAVE TERMINAL NUMBER SX2 LNLG IX5 X2*X1 SX7 X5+AMEM INITIALIZE PRU DIRECTORY POINTERS SA7 PD SA7 A7+B1 SX7 X7+MEMI+77B DETERMINE MEMORY REQUIREMENTS AX7 6 LX7 6 SA7 FL SAVE CURRENT FL SA1 A7+B1 LX7 30 IX1 X1-X7 SA7 MR NG X1,PRS8 IF *MEM* REQUEST EXCEEDS JOB STEP MFL MEMORY CM,MR,R REQUEST ADDITIONAL MEMORY * INITIALIZE LINE TABLES. MX6 0 SA6 AMEM SB6 A6 SB3 LNLG PRS7 SA6 B6+B3 SB3 B3-B1 PL B3,PRS7 IF LINE TABLE NOT COMPLETE MX7 1 SET *NO SESSION DATA* FLAG SA7 B6+LPTR SX7 54 SET SHIFT COUNT SA7 A6+LSHF SB3 LNLG SB6 B6+LNLG PREPARE FOR NEXT TERMINAL SB2 B2-1 NZ B2,PRS7 IF MORE TERMINALS TO PROCESS * INITIALIZE FILES. EVICT S RETURN SCRATCH FILE SA1 NR CHECK NO REWIND OPTION NZ X1,PRSX IF *NR* OPTION SELECTED REWIND I,R REWIND O,R EQ PRSX RETURN PRS8 MESSAGE (=C* DEMUX MEMORY OVERFLOW.*) ABORT PRSA BSS 0 I ARG STIMOUT,I NR ARG -=1,NR NT ARG =0L1,NT O ARG OUTPUT,O SL ARG =0,SL T ARG -=1,T TR ARG OUTPUT,TR ARG TERMINATOR COMMON SPACE 4,10 * COMMON DECKS (PRESET). *CALL COMCARG *CALL COMCDXB END SPACE 4,10 END