IDENT IEDIT,FWA,IEDIT ABS SST ENTRY IEDIT ENTRY MFL= ENTRY CLB= ENTRY SSM= SYSCOM B1 DEFINE (B1) = 1 LIST F TITLE IEDIT - IN-LINE EDITOR. SPACE 4,10 *COMMENT IEDIT - IN-LINE EDITOR. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992. SPACE 4,10 ***** IEDIT - IN-LINE EDITOR. * * J. W. YOCUM. 79/12/17. * C. S. MEAGHER. 80/04/22. * S. P. BOOTH. 80/05/31. * K. F. REHM. 81/08/10. * S. D. PAINTER. 81/08/10. SPACE 4,10 *** *IEDIT* IS A *CPU* PROGRAM WHICH IS CALLED BY *IAF* * TO PERFORM AN EDITING FUNCTION ON A LINE NUMBERED FILE. * IT IS DESIGNED TO BE EXECUTED THROUGH THE *IAF* INTERFACE. * THE EDIT COMMAND IS PLACED INTO THE COMMAND LINE BUFFER, * THROUGH THE USE OF THE *CLB=* ENTRY POINT. SPACE 4,10 *** COMMAND FORMAT. * * * IEDIT (FN=LFN,OP=OPTIONS,CS=CHARTYPE) * * LFN NAME OF EDIT FILE. THIS PARAMETER * IS REQUIRED. * * OPTIONS B, F, L (ANY COMBINATION MAY BE USED). * * B - BASIC SUBSYSTEM FLAG INDICATING BASIC * RESEQUENCING SHOULD BE PERFORMED AS * REQUIRED (OMITTED WHEN TERMINAL IS NOT * IN BASIC SUBSYSTEM). * * F - FORTRAN SUBSYSTEM FLAG INDICATING * TERMINAL IS IN FORTRAN SUBSYSTEM * (OMITTED WHEN TERMINAL IS NOT IN * FORTRAN SUBSYSTEM). * * L - LIST FLAG. IF PRESENT, ALL LINES * CHANGED WILL BE ECHOED TO THE * TERMINAL. * IF OMITTED CHANGED LINES ARE NOT * ECHOED. (TERMINAL USER MAY SUSPEND * ECHO CAPABILITIES BY ENTERING A USER * BREAK.) * * * CHARTYPE CHARACTER TYPE DEFINITION * NORMAL - DISPLAY CODE. ( DEFAULT ) * ASCII - 6/12 ASCII. SPACE 4,10 *** ERROR MESSAGES. * * THE FOLLOWING ERROR MESSAGES WILL BE ISSUED WHEN AN ERROR * IS ENCOUNTERED, CAUSING *IEDIT* TO ABORT WITHOUT EXECUTING * THE COMMAND. * * *BUFFER SPACE ERROR (TOV).* - INTERNAL ERROR. * * *COMMAND ARGUMENT ERROR.* - AN INCORRECT PARAMETER * WAS ENTERED ON THE COMMAND. * * *COMMAND NOT PROCESSED DUE TO OVERLAP.* - YOU HAVE SPECIFIED * THAT THE SELECTED EDIT COMMAND SHOULD NOT BE * PROCESSED DUE TO OVERLAPPING LINE NUMBERS. * * *DUPLICATE FILE NAME.* - A DUPLICATE FILE NAME WAS * ENCOUNTERED ON A SINGLE DIRECTIVE. * * *EMPTY FILE (SSF).* - INTERNAL ERROR. * * *FILE NAME ERROR.* - THE FILE NAME SPECIFIED CONTAINS MORE * THAN SEVEN CHARACTERS OR NON-ALPHANUMERIC CHARACTERS. * * *INCORRECT SYNTAX.* - A REQUIRED PARAMETER IS MISSING, * PARAMETERS ARE GIVEN IN THE WRONG ORDER, OR AN * INCORRECT SEPARATOR HAS BEEN ENCOUNTERED. * * *LINE NUMBER INCREMENT ERROR.* - THE LINE NUMBER INCREMENT * SPECIFIED IS LESS THAN ONE OR GREATER THAN 4095. * * *LINE NUMBER LIMIT EXCEEDED.* - AN ATTEMPT TO MOVE, * DUPLICATE, OR READ A GROUP OF LINES IN THE EDIT FILE * REQUIRED A LINE NUMBER GREATER THAN 99999 TO BE * ASSIGNED. * * *LINE NUMBER OVERLAP ERROR.* - TWO OR MORE LINE RANGES HAVE * AT LEAST ONE LINE NUMBER IN COMMON. * * *LINE RANGE ERROR.* - AN INCORRECT LINE NUMBER WAS SPECIFIED * IN A LINE RANGE. * * *NO LINE NUMBER ON LINE.* - EITHER THE PRIMARY FILE OR A * SEQUENCED READ FILE CONTAINS A LINE WITHOUT A LINE * NUMBER. * * *NO LINES FOUND.* - NO LINE IN THE EDIT FILE MEETS THE * CRITERIA SPECIFIED BY THE EDIT COMMAND. * * *NO READ/DESTINATION FILE SPECIFIED.* - NO READ OR * DESTINATION FILE WAS SPECIFIED IN THE EDIT COMMAND. * * *NON-EXISTENT EDIT VERB SPECIFIED.* - INTERNAL ERROR. * * *READ FILE EMPTY.* - THE READ FILE SPECIFIED DOES NOT EXIST * OR CONTAINS NO DATA. * * *RESERVED FILE NAME.* - A RESERVED FILE NAME WAS INCORRECTLY * USED. * * *TOO SMALL BUFFER SPACE.* - INTERNAL ERROR. * * THE FOLLOWING MESSAGES ARE ISSUED TO NOTIFY THE USER OF AN * UNUSUAL CONDITION. THE *IEDIT* COMMAND IS PROCESSED TO * COMPLETION. * * *NO CLOSING DELIMITER FOUND.* - NO CLOSING DELIMITER WAS * FOUND ON A STRING. A STRING IS CONSIDERED TO END * AFTER THE LAST NON BLANK CHARACTER. * * *ZZZZZ LINES TRUNCATED ON FILE QQQQQQQ.* - ZZZZZ LINES WERE * TRUNCATED ON FILE QQQQQQQ. * ESTABLISH QUAL BLOCK ORDER. QUAL IEDIT1 QUAL COMCBLP QUAL COMCSNF QUAL MACRO$ QUAL TITLE MACRO DEFINITIONS. DAC SPACE 4,15 ** DAC - DECLARE ATTRIBUTES FOR CHARACTER POSITION. * * DAC GENERATES A WORD WHICH STORES ATTRIBUTES FOR TWO * CHARACTERS. THE HIGH 30 BITS HOLD THE CHARACTER ATTRIBUTES * FOR AN ASCII 6/12 CHARACTER. THE LOW 30 BITS HOLD THE SAME * DATA FOR AN ASCII8 CHARACTER. EACH HALF ALSO CONTAINS THE * DISPLAY CODE EQUIVALENT OF ITS CHARACTER IF ONE EXISTS. * * DAC DI,DC,DA,AI,AC,AA * * ENTRY DI - IF SPECIFIED, NO DISPLAY CODE EQUIVALENT OF * ASCII 6/12 CHARACTER. * DC - DISPLAY CODE EQUIVALENT OF 6/12 ASCII * CHARACTER. * DA - ATTRIBUTES FOR ASCII 6/12 CHARACTER. * AI - IF SPECIFIED, NO DISPLAY CODE EQUIVALENT OF * ASCII8 CHARACTER. * AC - DISPLAY CODE EQUIVALENT OF ASCII8 CHARACTER. * AA - ATTRIBUTES FOR ASCII8 CHARACTER. * * EXIT ENTRIES GENERATED IN THE FOLLOWING FORMAT - * *T 1/DI,NBIC/DC,DIST/0,MXNA/DA,1/AI,NBIC/AC,DIST/0,MXNA/AA * * WHERE - * NBIC - NUMBER OF BITS IN DISPLAY CODE CHARACTER. * MXNA - MAXIMUM NUMBER OF ATTRIBUTES PER CHARACTER. * DIST - PROPER NUMBER OF BITS TO ENSURE THAT CHARACTER * DATA FITS EXACTLY IN 30 BITS. * PURGMAC DAC DAC MACRO DI,DC,DA,AI,AC,AA MACREF DAC DIST EQU 30-1-NBIC-MXNA .A IFC EQ,*DA** VFD 30/7777777777B .A ELSE .B IFC NE,*DI** VFD 1/1,NBIC/0,DIST/0,MXNA/DA .B ELSE VFD 1/0,NBIC/DC_B,DIST/0,MXNA/DA .B ENDIF .A ENDIF .A IFC EQ,*AA** VFD 30/7777777777B .A ELSE .B IFC NE,*AI** VFD 1/1,NBIC/0,DIST/0,MXNA/AA .B ELSE VFD 1/0,NBIC/AC_B,DIST/0,MXNA/AA .B ENDIF .A ENDIF DAC ENDM FIELD SPACE 4,20 ** FIELD - DEFINE FIELDS. * * TAGS ARE GENERATED TO GIVE THE WORD LOCATION, BIT * LOCATION, AND NUMBER OF BITS IN FIELD. * * ENTRY TAG FIELD WP,LB,RP * TAG = NAME OF FIELD (1-6 LEGAL COMPASS CHARACTERS) * = *, USE CURRENT VALUE OF PSEUDO ORG COUNTER ORLOC1$ * LB = LEFT-MOST BIT POSITION WITHIN A WORD (BIT 59 BEING * SIGN BIT). * RB = RIGHT-MOST BIT POSITION WITHIN A WORD. * * EXIT TAGW = WORD LOCATION OF FIELD. * TAGS = LEFT BIT POSITION OF FIELD. * TAGN = NUMBER OF BITS IN FIELD. PURGMAC FIELD MACRO FIELD,TAG,WP,LB,RB MACREF FIELD IFC NE,/WP//,4 IFC EQ,/WP/*/,2 _TAG_W EQU ORLOC1$ SKIP 1 _TAG_W EQU WP _TAG_S EQU LB _TAG_N EQU LB-RB+1 ENDM BASE * ENDX MXB SPACE 4,15 ** MXB - MASK WITH B REGISTER * * ENTRY I - X REGISTER TO PLACE MASK IN. * J - B REGISTER SPECIFING SIZE OF MASK. * 0 .LE. (B(J)) .LE. 60. * * EXIT MX(I) CONTAINS MASK OF SIZE SPECIFIED IN B(J). * B(J) SAME AS ON ENTRY. * * MXB PROVIDES A MASK INSTRUCTION USING A B REGISTER. * RESTRICTION - 0 .LE. (B) .LE. 60 MXB OPDEF I,J BX.I X.I-X.I CLEAR X REGISTER SB.J B.J-B1 PX.I X.I,B.J AX.I 58 LX.I 59-0 AX.I B.J A BIT MASK SB.J B.J+B1 RESTORE BJ ENDM OVLDEF SPACE 4,10 ** OVLDEF - DEFINE IEDIT OVERLAY. * * OVLDEF LA,EA,LEVEL,TITLE * * LA = LOAD ADDRESS. * EA = ENTRY ADDRESS. * LEVEL = LEVEL OF OVERLAY. * TITLE = TITLE OF OVERLAY. PURGMAC OVLDEF OVLDEF MACRO LA,EA,LVL,TEXT MACREF OVLDEF QUAL IEDIT_LVL TTL IEDIT_LVL - TEXT TITLE IDENT IEDIT_LVL,LA,EA,LVL,0 *COMMENT IEDIT - TEXT COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992. ORG LA ENDM OVLDEF VERB SPACE 4,40 ** VERB - DECLARE VERB. * * VERB V,AL,P,FP DECLARE VERB * VERB DECLARE END OF VERB DECLARATIONS. * * ENTRY V - IEDIT VERB. * AL - * IF ALL ABBREVIATIONS OF THE VERB ARE TO BE * GENERATED; OTHERWISE NULL(OR ANY OTHER SYMBOL). * P - ORDERED LIST OF PROCESSOR DESCRIPTORS IN THE FORM * (AD,CON) - * AD - ENTRY ADDRESS OF PROCESSOR. * CON - R, IF SYNTACTIC ELEMENT REQUIRED. * O, IF SYNTACTIC ELEMENT IS OPTIONAL * (0 OR 1 OCCURRENCES). * A, IF ALTERNATE SYNTAX FOR COMMAND * FOLLOWS. * FP - FUNCTION PROCESSOR NUMBER. * * EXIT ENTRIES GENERATED ARE OF THREE TYPES, TYPE1, TYPE2 * AND TYPE3. *T TYPE1 42/CV,6/0,6/P,6/V *T,TYPE2 2/OP,40/OFFSET,18/ADR *T,TYPE3 2/0,1/1,39/0,18/FP * WHERE - * CV - V OR ALLOWED ABBREVIATION OF V IN DISPLAY CODE. * P - NUMBER OF WORDS INCREMENT TO START OF LIST * OF PROCESSORS. * V - NUMBER OF WORDS INCREMENT TO NEXT VERB. * OP - 1, IF PROCESSOR RECOGNITION OF AN ELEMENT IS * OPTIONAL. I.E. 0 OR 1 OCCURRENCES ARE * TO BE ACCEPTED. * - 2 IF PROCESSOR MUST PROCESS AN OCCURENCE OF * THE SYNTACTIC ELEMENT * ( I.E. THIS FUNCTION IS REQUIRED). * OFFSET - OFFSET TO ALTERNATE SYNTAX FROM * START OF TABLE. * ADR - ENTRY ADDRESS OF SYNTAX PROCESSOR. * * MACROS DSUB. PURGMAC VERB VERB MACRO V,AL,P,FP LOCAL S,L,NM1,R,CV,LIST MACREF VERB .A IFC NE,$_V_AL_P_$$ S MICRO 1,,$V$ L MICCNT S .B IFLT L,3 ERR INCORRECT VERB SPECIFIED .B ENDIF .B IFC EQ,$AL$*$ R SET L-3+1 REPETITION COUNT .B ELSE R SET 1 .B ENDIF VERB DUP R .B IF -DEF,VERBA N1 SET 1 LASTNM1 MICRO 1,,$VERBA$ .B ELSE N1 SET N1+1 .B ENDIF NM1 MICRO N1,1,$BCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$ CV MICRO 1,L,$"S"$ "LASTNM1" VFD TDVNN/0L_"CV",TDXXN/0,TDISN/LIST-*,TDIVN/VERB_"NM1"-* LASTNM1 MICRO 1,,$VERB_"NM1"$ L SET L-1 VERB ENDD N2 SET 1 NM2 MICRO N2,1,$1234567890$ ALTM MICRO 1,,$."NM1"_"NM2"$ LIST BSS 0 IRP P NWDS SET * DSUB P,"ALTM" .B IFEQ *-NWDS,0 VFD TDRQN/0 VFD TDOPN/0 VFD TDFPN/1 VFD TDRSN/0 VFD TDASN/0 VFD TDSAN/FP "ALTM" BSS 0 N2 SET N2+1 NM2 MICRO N2,1,$1234567890$ ALTM MICRO 1,,$."NM1"_"NM2"$ .B ENDIF IRP "ALTM" EQU 0 VFD TDRQN/0 VFD TDOPN/0 VFD TDFPN/1 VFD TDRSN/0 VFD TDASN/0 VFD TDSAN/FP .A ELSE "LASTNM1" BSSZ 1 .A ENDIF VERB ENDM DSUB SPACE 4,10 ** DSUB - DECLARE SUBROUTINE (HELPER MACRO). * PURGMAC DSUB DSUB MACRO AD,C,ALT LOCAL F MACREF DSUB .A IFC NE,$AD$$ F EQU * .B IFC EQ,$C$R$ VFD TDRQN/1 VFD TDOPN/0 VFD TDFPN/0 VFD TDRSN/0 VFD TDASN/ALT VFD TDSAN/AD .B ENDIF .B IFC EQ,$C$O$ VFD TDRQN/0 VFD TDOPN/1 VFD TDFPN/0 VFD TDRSN/0 VFD TDASN/ALT VFD TDSAN/AD .B ENDIF .B IFEQ F-*,0 ERR SECOND PARAMETER WRONG .B ENDIF .A ELSE .B IFC NE,$C$A$ ERR .B ENDIF .A ENDIF DSUB ENDM TITLE COMMON DECKS. ** DEFINITION COMMON DECKS. * *CALL COMCMAC *CALL COMCCMD *CALL COMCMTM TITLE WORKING STORAGE. ORG 111B FWA BSS 0 ** ASSEMBLY CONSTANTS. CLRL1 EQU 1 CLEAR LINE 1 OF CONTROL POINT EC1 EQU 74B ESCAPE CODE 1 EC2 EQU 76B ESCAPE CODE 2 LBINC EQU 250 LINE BUFFER TABLE INCREMENT LNTINC EQU 50 LINE NUMBER TABLE INCREMENT MINCR EQU 2000B MEMORY INCREMENT SNF$ SET 0 SNF WILL RETURN NUMBER OF SORTED LINES TRIM SET 0 TRIM MODE DESELECTED USBL$ SET 1 USBA$ SET 1 RDX$ SET 1 SUPPRESS HALF-BUFFER CIO THRESHOLD WTX$ SET 1 SUPPRESS HALF-BUFFER CIO THRESHOLD MXWL EQU 32D MAXIMUM CM WORDS IN LINE MXCIL EQU MXWL*10D/2 MAXIMUM CHARACTERS IN LINE MXIC EQU 4095 MAXIMUM INCREMENT SIZE MXLN EQU 99999 MAXIMUM LINE NUMBER MXWS EQU 7 MAXIMUM WORD SIZE IS SEVEN CHARACTERS NBIC EQU 6 NUMBER OF BITS IN CHARACTER NUMD EQU 5 MAXIMUM DIGITS IN LINE NUMBER NWIF EQU 7 NUMBER OF WORDS IN FET * THE MAIN AND LINE BUFFERS EACH CONTAIN THREE EXTRA * WORDS TO ALLOW *COMCSNF* TO SPLIT EACH BUFFER IN HALF * AND STILL HAVE TWO EXTRA WORDS IN THE SECOND HALF. * FOR MORE INFORMATION SEE *COMCSNF*. EBSZ EQU 4004B MAIN BUFFER SIZE LNTSZ EQU 201B LINE NUMBER TABLE SIZE LBSZ EQU 1404B LINE BUFFER SIZE SCRASZ EQU 1401B FIRST SCRATCH BUFFER SIZE SCRBSZ EQU 1401B SECOND SCRATCH BUFFER SIZE SCRCSZ EQU 4401B SEQUENTIAL FILE-REBUILD BUFFER SIZE OTSZ EQU 1001B OUTPUT BUFFER SIZE INSZ EQU 101B INPUT/CLB= BUFFER SIZE BUFL EQU EBSZ+LNTSZ+LBSZ+SCRASZ+SCRBSZ BUFL2 EQU EBSZ+SCRCSZ ** COMMAND PARAMETERS. EFN CON 0 EDIT FILE NAME BOP CON 0 B OPTION LOP CON 0 L OPTION FOP CON 0 F OPTION ** VARIABLES SET BY PRESET. BLNK CON 0 SET TO A BLANK IN CURRENT CHARACTER SET CSTI CON 0 CHARACTER SET TYPE INDICATOR FILEN CON 0 FILE NAME OF SECONDARY FILE FLNGTH CON 0 LENGTH OF ORIGINAL EDIT FILE FNUM CON 0 FUNCTION NUMBER INCR CON 1 RESEQUENCING INCREMENT LNIA CON MXLN+1 LINE NUMBER TO INSERT AFTER LSTFIL CON 0 LIST OPTION MSTAT VFD 30/-1,30/0 MEMORY STATUS WORD NCIS CON 0 NUMBER OF CHARACTERS IN SEARCH STRING NCIR CON 0 NUMBER OF CHARACTERS IN REPLACEMENT STRING NELR CON 0 NUMBER OF ENTRIES IN LINE RANGE TABLE ** VARIABLES SET BY LINE SELECT/PROCESSING PHASE. APPFLG CON 0 CHANGE RECORDS APPENDED FLAG CMAX CON 0 MAXIMUM AMOUNT OF MEMORY AVAILABLE CMEM CON 0 CURRENT AMOUNT OF MEMORY BEING USED DYNST CON 0 AMOUNT OF DYNAMIC STORAGE FLAGS CON 0 *LNTBUF* ENTRY FLAGS FNAI CON MXLN+1 FIRST LINE NUMBER AFTER INSERTION INTFLG CON 0 SET IF NOT INTERRUPTIBLE LSRA CON 0 NUMBER TO ASSIGN TO FIRST INSERTED LINE LTFILE CON 0 *LNT* FILE FLAG LBFILE CON 0 LINE BUFFER FULL FLAG LBFET CON E FET ADDRESS OF CURRENT LINE BUFFER LB2FET CON L FET ADDRESS OF SCRATCH LINE BUFFER LTFET CON LNT1 FET ADDRESS OF SORT/MERGED *LNT* FILE LT2FET CON LNT2 FET ADDRESS OF A FREE SCRATCH BUFFER NBLN CON 0 NEW BINARY LINE NUMBER NCOL CON 0 NUMBER OF CHARACTERS ON A LINE NMLS CON 0 NUMBER *LNT* ENTRIES CURRENTLY IN BUFFER NNOL CON 0 NUMBER OF NON-OVERLAPPED LINES NTBL CON 0 NUMBER OF TRAILING BLANKS IN LINE NTL CON 0 NUMBER OF TRUNCATED LINES OBLN CON -1 OLD BINARY LINE NUMBER OLLE CON 0 OVERLAPPED LINES LINE RANGE TABLE ENTRY OVLPFG CON 0 OVERLAP PROCESSING FLAG OUT DATA C*OUTPUT* FILE NAME TO WRITE TO SCRFIL CON 0 SCRATCH BUFFER FLAG TRNC CON 0 TRUNCATED LINE FLAG UNRF CON 0 UNNUMBERED *READ* FILE FLAG SPACE 4,15 ** TABLE OF FUNCTION NUMBERS. TOFN BSS 0 BEGINNING OF FUNCTION TABLE LOC 1 FNDU VFD 18/EFN,42/0 DUP FNMO VFD 18/EFN,42/0 MOVE FNRE VFD 18/EFN,42/0 READ MXIL EQU *-1 MAXIMUM FUNCTION TO CAUSE OVERLAP FNAL VFD 18/EFN,42/0 ALTER FNDE VFD 18/EFN,42/0 DELETE FNLI VFD 18/OUT,42/0 LIST/LNH MXNW EQU *-1 MAXIMUM NON-*WRITE(N)* FUNCTION FNWR VFD 18/FILEN,42/0 WRITE FNWN VFD 18/FILEN,42/0 WRITEN LOC *O SPACE 4 ** TABLE OF SCRATCH FILES. TSF BSS 0 VFD 42/0LZZZZZG0,18/0 LINE BUFFER FILES VFD 42/0LZZZZZG1,18/0 VFD 42/0LZZZZZG2,18/0 LINE NUMBER TABLE FILES VFD 42/0LZZZZZG3,18/0 VFD 42/0LZZZZZG4,18/0 SORT FILES VFD 42/0LZZZZZG5,18/0 VFD 42/0LZZZZZG6,18/0 DELETED LINE NUMBER FILE VFD 42/0LZZZZZG7,18/0 TRUNCATED LINE FILE CON 0 SPACE 4,5 ** *FILINFO* PARAMETER BLOCK. FIPB VFD 42/0,6/5,12/1 BSSZ 4 SPACE 4,5 ** *LOF* PARAMETER BLOCK. LOFPRM VFD 12/0,18/PRMW2,30/0 PRMW2 VFD 42/0,18/3 VFD 42/0LOUTPUT,18/O VFD 60/0 SPACE 4,5 ** *REPRIEVE* PARAMETER BLOCK. RPB BSS 0 VFD 36/0,12/RPBL,12/0 VFD 30/0,30/PIT BSSZ 7 BSSZ 16 EXCHANGE PACKAGE RPBL EQU *-RPB TITLE TABLES. SPACE 4,10 ** FIELD DEFINITIONS FOR VERB TABLE. TDVN FIELD ,59,18 VERB NAME TDXX FIELD ,17,12 RESERVED FOR CDC TDIS FIELD ,11,6 INCREMENT TO START OF PROCESSES FOR VERB TDIV FIELD ,5,0 INCREMENT TO NEXT VERB TDRQ FIELD ,59,59 REQUIRED ATTRIBUTE (SET IF YES) TDOP FIELD ,58,58 OPTIONAL TDFP FIELD ,57,57 SET IF AT END OF PROCESSORS FOR VERB TDRS FIELD ,56,36 RESERVED FOR CDC TDAS FIELD ,35,18 OFFSET TO FWA OF ALTERNATE SYNTAX TDSA FIELD ,17,0 SUBROUTINE ADDRESS TO PROCESS ** CHARACTER ATTRIBUTE BIT LOCATIONS. LETA EQU 1S0 LETTER ATTRIBUTE DIGA EQU 1S1 DIGIT (NUMBER) ATTRIBUTE DLMA EQU 1S2 DELIMITER ATTRIBUTE CHAA EQU 1S3 CHARACTER ATTRIBUTE SEPA EQU 1S4 SEPARATOR ATTRIBUTE TERA EQU 1S5 TERMINATOR ATTRIBUTE MXNA EQU 6 MAXIMUM NUMBER OF ATTRIBUTES PER CHARACTER SEDE EQU SEPA+DLMA *LNT* SPACE 4,10 ATTRIBUTE BIT LOCATIONS DEFINED ** THE *LNT* CONSISTS OF ONE WORD ENTRIES EITHER IN A BUFFER * OR WRITTEN OUT TO A LOCAL DISK FILE. THE FORMAT OF A * *LNT* ENTRY IS - * *T 18/NLN, 18/OLN, 1/O, 23/ * * NLN = NEW LINE NUMBER. * OLN = OLD LINE NUMBER. * O = OVERLAP PROCESSING FLAG. FOVL EQU 23 OVERLAPPED LINE FLAG BUFFERS SPACE 4,10 ** BUFFER DEFINITIONS. LRT BSS MXWL+1 LINE RANGE TABLE CLIN BSS 0 CURRENT EDIT FILE LINE BEING WORKED USBB BSS MXCIL+1 STRING BUFFER USED BY *USB* INBUF BSS INSZ INPUT BUFFER OTBUF BSS OTSZ OUTPUT BUFFER PCKDBF BSSZ MXWL+1 PACKED LINE BUFFER RBUF BSSZ MXCIL REPLACEMENT BUFFER SBUF BSSZ MXCIL SEARCH STRING BUFFER TRBUF BSS 204B TRUNCATED LINE BUFFER EFBUF TABLE EDIT FILE BUFFER SCRBA TABLE SCRATCH 1 / REBUILD BUFFER SCRBB TABLE SCRATCH BUFFER 2 LNBUF TABLE LINE BUFFER LNTBUF TABLE LINE NUMBER TABLE BUFFER SPACE 4,10 INTERFACE FILE FETS ** FET DEFINITIONS. E BSS 0 EDIT FILE BUFFER EFB FILEB 0,0,(FET=NWIF) I BSS 0 INPUT BUFFER INPUT FILEB INBUF,INSZ,(FET=NWIF) O BSS 0 OUTPUT BUFFER OUTPUT FILEB OTBUF,OTSZ,(FET=NWIF) L BSS 0 LINE BUFFER FILE ZZZZZG0 FILEB 0,0,(FET=NWIF) LNT1 BSS 0 LINE NUMBER TABLE FILE ZZZZZG2 FILEB 0,0,(FET=NWIF) LNT2 BSS 0 *LNT* SCRATCH FILE ZZZZZG3 FILEB 0,0,(FET=NWIF) SCR BSS 0 SCRATCH FILE 0 ZZZZZG4 FILEB 0,0,(FET=NWIF) SCR1 BSS 0 SCRATCH FILE 1 ZZZZZG5 FILEB 0,0,(FET=NWIF) TRNCFET BSS 0 TRUNCATED LINE BUFFER ZZZZZG7 FILEB TRBUF,204B,(FET=NWIF) TITLE MAIN PROGRAM. MAIN SPACE 4,20 ** IED - MAIN LOOP OF PROGRAM. * * ENTRY NONE. * * EXIT *IEDIT* PROCESSING COMPLETED. * TO *ERR* - IF A FATAL ERROR IS DETECTED. * * USES X - 0, 1, 2, 3, 5, 6. * A - 1, 2, 3, 6. * B - 2, 5. * * CALLS ABS, CDD, ERT, MRD, PRS, PSC, RSF, SFI, SNM. * * MACROS ENDRUN, FILINFO, RETURN, SYSTEM, WRITEC, WRITER. IEDIT BSS 0 ENTRY RJ PRS SA1 EFBUF ALLOCATE SPACE FOR MAIN BUFFER SX2 EBSZ RJ ABS NG X6,IED9 IF NOT ENOUGH ROOM FOR MAIN BUFFER SA1 SCRBA ALLOCATE SPACE FOR SCRATCH/REBUILD SX2 SCRASZ SA3 FNUM SX3 X3-MXIL-1 NG X3,IED1 IF NON-SEQUENTIAL COMMAND SX2 SCRCSZ RJ ABS NG X6,IED9 IF NOT ENOUGH SPACE FOR SEQUENTIAL COMMAND EQ IED2 PROCESS SEQUENTIAL COMMAND IED1 RJ ABS NG X6,IED9 IF NOT ENOUGH SPACE FOR SCRATCH BUFFER SA1 SCRBB ALLOCATE SECOND SCRATCH BUFFER SX2 SCRBSZ RJ ABS NG X6,IED9 IF NOT ENOUGH SPACE FOR *SCRBB* SA1 LNBUF ALLOCATE SPACE FOR LINE BUFFER SX2 LBSZ RJ ABS NG X6,IED9 IF NOT ENOUGH SPACE FOR *LBUF* SA1 BOP ZR X1,IED2 IF *LNT* NOT NEEDED SA1 LNTBUF SX2 LNTSZ RJ ABS ALLOCATE BUFFER NG X6,IED9 IF NOT ENOUGH ROOM FOR *LNT* IED2 RJ SFI UPDATE FET POINTERS FOR ALLOCATED TABLES SA1 EFN SA2 FIPB MX3 42 BX1 X1*X3 BX2 -X3*X2 BX6 X1+X2 SA6 A2 FILINFO FIPB GET LENGTH OF EDIT FILE SA2 FIPB+3 MX3 24 BX6 X2*X3 LX6 24 SA6 FLNGTH SA1 FNUM SX2 X1-MXIL-1 PL X2,IED3 IF A SEQUENTIAL COMMAND SX7 B0+ RJ RSF REWIND SCRATCH FILES RJ MRD PROCESS A *MOVE*, *READ*, OR *DUP* EQ IED4 POST PROCESS COMMAND IED3 RJ PSC PROCESS A SEQUENTIAL COMMAND IED4 SA1 NTL ZR X1,IED6 IF NO TRUNCATED LINES RJ CDD REPORT TRUNCATIONS MX0 B2 DELETE TRAILING SPACES BX1 X0*X4 SB2 1RZ SB5 ERRLTF RJ SNM SET NAME IN MESSAGE SB5 ERRLTF SB2 1RQ SA2 FNUM SA1 X2+TOFN-1 LX1 18 SA1 X1 RJ SNM SET NAME IN MESSAGE WRITEC O,ERRLTF *ZZZZZ LINES TRUNCATED ON FILE QQQQQQQ.* SA3 TRNCFET PREPARE TO PRINT TRUNCATED NUMBERS MX2 42 BX3 -X2*X3 SX2 A3 SX3 X3-3 ZR X3,IED5 IF BUFFER NEVER WRITTEN TO DISK SX3 B1+ INDICATE ON-DISK STATUS RJ ERT RETURN TRNCFET EQ IED6 PERFORM FINAL PROCESSING IED5 RJ ERT ECHO RECORD TO TERMINAL IED6 SA1 FNUM SX1 X1-MXIL-1 PL X1,IED8 IF SEQUENTIAL COMMAND SA1 APPFLG SET SORT FLAG IN TERMINAL TABLE ZR X1,IED7 IF SORT STATUS DID NOT CHANGE SYSTEM TLX,R,X1,1000B IED7 SX7 B1 RJ RSF RETURN SCRATCH FILES IED8 WRITER O ENDRUN IED9 SX5 ERRNES *NOT ENOUGH BUFFER SPACE AVAILABLE.* EQ ERR EXIT TO ERROR PROCESSOR TITLE FUNCTION PROCESSORS. MRD SPACE 4,15 ** MRD - *MOVE*, *READ*, AND *DUP* FUNCTION PROCESSOR. * * ENTRY (FILEN) = NAME OF *READ* FILE IF *READ* COMMAND. * * EXIT CHANGE RECORDS APPENDED TO END OF EDIT FILE. * * USES X - 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * * CALLS AEC, CBR, PLO, RLN, SLF, SLN, SLT. * * NOTES ALL LINES FROM THE *READ* FILE ARE IMPLICITLY * SELECTED FOR INSERTION INTO THE EDIT FILE. MRD SUBR ENTRY/EXIT RJ SLF SELECT LINES FROM FILE SA1 FNUM SX1 X1-FNRE NZ X1,MRD1 IF NOT A *READ* COMMAND SX2 L SET *READ* FILE NAME INTO FET *L* SA5 FILEN RJ SLN SX7 B1+ SA7 LBFILE MRD1 SA5 TSF+6 SX2 SCR1 RJ SLN RESTORE *ZZZZZG6* INTO FET *SCR1* SX5 B0+ RJ SBE SET *SCR1* EMPTY SX7 B0+ RJ RLN REPLACE LINE NUMBER ON LINE SA2 FNUM SX2 X2-FNRE NZ X2,MRD2 IF NOT A *READ* COMMAND SX2 L SET *ZZZZZG0* INTO FET *L* SA5 TSF+0 RJ SLN MRD2 RJ PLO PROCESS LINE OVERLAP SA1 BOP ZR X1,MRD3 IF NOT IN *BASIC* SUBSYSTEM SA1 UNRF CHECK FOR AN UNNUMBERED *READ* FILE SA2 OVLPFG CHECK FOR NO OVERLAPPED LINES BX1 -X2*X1 NZ X1,MRD3 IF BOTH CONDITIONS TRUE RJ SLT SORT LINE NUMBER TABLE RJ CBR CALL *BASIC* RESEQUENCER MRD3 SA1 SCRFIL ZR X1,MRD4 IF NOTHING WRITTEN TO DELETED LINES FILE SX2 SCR SA5 TSF+6 RJ SLN PUT DELETED LINES RECORD FILE NAME IN FET SA5 EFN SX3 B1 SX6 B0 SA6 LSTFIL RJ AEC APPEND LINE NUMBERS TO EDIT FILE SA1 LOP SX6 X1+ SA6 LSTFIL MRD4 SA5 EFN SA2 LBFET SA3 LBFILE RJ AEC APPEND AND ECHO RECORD EQ MRDX RETURN TITLE SUBROUTINES. ABL SPACE 4,10 ** ABL - ADD BLANKS TO LINE. * * ENTRY (X2) = NUMBER OF DIGITS IN LINE NUMBER. * (NCOL) = NUMBER OF CHARACTERS IN LINE. * (BLNK) = BLANK CHARACTER TO BE APPENDED. * CLIN = ADDRESS OF THE BEGINNING OF THE LINE. * * EXIT (NCOL) = X7 = NUMBER OF CHARACTERS IN LINE. * PROPER NUMBER OF BLANKS APPENDED TO LINE, NOT * TO EXCEED *MXCIL*. * * USES X - 1, 2, 3, 4, 6, 7. * A - 1, 3, 4, 6, 7. ABL SUBR ENTRY/EXIT SA1 NCOL SA4 BLNK ABL1 SA3 X1+CLIN-1 SX1 X1-1 BX3 X3-X4 ZR X3,ABL1 IF CHARACTER A BLANK SX7 X1+B1 SX1 MXCIL SA3 X7+CLIN-1 BX6 X4 IX4 X7-X1 PL X4,ABL4 IF LINE HAS REACHED *MXCIL* NZ X3,ABL2 IF LINE DOES NOT END IN A COLON SA6 X7+CLIN ADD A BLANK AFTER THE COLON SX7 X7+B1 UPDATE *NCOL* IX4 X7-X1 PL X4,ABL4 IF LINE HAS REACHED *MXCIL* ABL2 IX2 X2-X7 NZ X2,ABL3 IF LINE CONTAINS MORE THAN A LINE NUMBER SA6 X7+CLIN SX7 X7+2 SA6 A6+1 ABL3 BX2 X7 LX2 59-0 PL X2,ABL4 IF LINE HAS AN EVEN NUMBER OF CHARACTERS SA6 X7+CLIN SX7 X7+1 ABL4 SA7 NCOL EQ ABLX RETURN ABS SPACE 4,20 ** ABS - ALLOCATE BUFFER SPACE. * * ENTRY (A1) = TABLE NUMBER BEING ALLOCATED. * (X2) = WORD COUNT (+ OR -) TO BE ALLOCATED. * (DYNST) = AMOUNT OF DYNAMIC STORAGE LEFT. * * EXIT (DYNST) = AMOUNT OF DYNAMIC STORAGE LEFT. * (X6) .LT. 0, IF NOT ENOUGH MEMORY AVAILABLE. * * USES X - 1, 2, 3, 6, 7. * A - 0, 1, 2, 3, 6, 7. * * CALLS RAF. * * MACROS ALLOC, MEMORY. * * NOTES THERE MUST BE NO *CIO* ACTIVITY (ALL FETS MUST BE * *RECALLED*) BEFORE CALLING *ALLOC*. ABS3 BX6 X1 SA6 CMEM SX6 -B1 ABS SUBR ENTRY/EXIT SX6 A1 SAVE ENTRY CONDITIONS SX7 X2 SA6 ABSA SA7 ABSB RJ RAF RECALL ALL FETS ABS1 SA2 ABSA RESTORE ENTRY CONDITIONS SA1 ABSB SA0 X2 SA3 DYNST AMOUNT OF DYNAMIC STORAGE LEFT IX6 X3-X1 NG X6,ABS2 IF NOT ENOUGH DYNAMIC STORAGE SA6 DYNST ALLOC A0,X1 BX6 X6-X6 INDICATE SUCCESSFUL REALLOCATION EQ ABSX RETURN * SET UP MEMORY REQUEST. ABS2 SA1 CMEM GET CURRENT MEMORY SX3 MINCR IX2 X1+X3 SA3 CMAX IX6 X3-X2 NG X6,ABSX IF REQUEST WOULD EXCEED VALIDATION LIMITS BX6 X2 SA6 A1 UPDATE *CMEM* LX6 30-0 SA6 MSTAT MEMORY CM,MSTAT,R,,NA REQUEST ADDITIONAL MEMORY SA1 MSTAT SA2 CMEM AX1 30 BX2 X1-X2 NZ X2,ABS3 IF REQUEST NOT HONORED SA3 F.TEND UPDATE LWA OF TABLE SX2 MINCR SA1 DYNST IX6 X3+X2 IX7 X1+X2 SA6 A3 SA7 A1 EQ ABS1 ALLOCATE SPACE FOR TABLE ABSA CON 0 ENTRY CONDITIONS ABSB CON 0 AEC SPACE 4,20 ** AEC - APPEND AND ECHO CHANGE RECORD. * * ENTRY (X5) = NAME OF THE FILE TO APPEND TO. * (X2) = FET ADDRESS OF BUFFER CONTAINING RECORD. * (X3) = 0, IF CHANGE RECORD IS BUFFER RESIDENT. * 1, IF CHANGE RECORD IS DISK RESIDENT. * (LSTFIL) = 0, IF LIST OPTION IS OFF. * 1, IF LIST OPTION IS ON. * * EXIT (X2) = UNCHANGED. * RECORD APPENDED TO FILE AND ECHOED TO TERMINAL. * * USES X - 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * * CALLS CBO, SBE, SLN. * * MACROS READEI, REWIND, WRITE, WRITER. AEC SUBR ENTRY/EXIT BX7 X2 BX6 X5 SA7 AECC SA6 A7-B1 SAVE APPENDED FILE NAME SA1 X2+3 *OUT* WILL BE FIRST CBO PARAMETER BX6 X1 SA6 AECD ZR X3,AEC4 IF RECORD IS BUFFER RESIDENT MX3 42 SA1 X2 BX6 X1*X3 SA6 AECA STORE ORIGINAL FILE NAME REWIND X2,R SA1 X2+3 *OUT* WILL BE FIRST CBO PARAMETER BX6 X1 SA6 AECD AEC1 READEI X2,R SA1 LSTFIL NZ X1,AEC2 IF LIST OPTION IS ON SX2 O SX5 B0 RJ SBE SET *OUTPUT* BUFFER EMPTY SA2 AECC AEC2 SA1 X2 LX1 59-9 NG X1,AEC4 IF LAST BUFFER OF DATA SA5 AECB RJ SLN PUT APPENDED FILE NAME IN FET SA1 LSTFIL ZR X1,AEC3 IF LINES NOT TO BE ECHOED TO TERMINAL SA3 AECD RJ CBO COPY BUFFER TO OUTPUT FROM (X3) BX6 X3 SAVE UPDATED CBO PARAMETER SA6 AECD SA2 AECC AEC3 SX6 B1+ SA6 APPFLG WRITE X2,R APPEND LINES TO FILE SA5 AECA RJ SLN PUT ORIGINAL FILE NAME BACK IN FET EQ AEC1 READ IN NEXT SEGMENT AEC4 SA2 AECC SA5 AECB RJ SLN PUT APPENDED FILE NAME IN FET SA1 LSTFIL ZR X1,AEC5 IF LINES NOT TO BE ECHOED TO TERMINAL SA3 AECD RJ CBO COPY BUFFER TO OUTPUT AEC5 SX6 B1+ SA6 APPFLG WRITER X2,R FLUSH BUFFER TO APPENDED FILE EQ AECX RETURN AECA CON 0 ORIGINAL FILE NAME AECB CON 0 FILE NAME OF FILE TO APPEND TO AECC CON 0 FET ADDRESS AECD CON 0 CBO START POINTER CBO SPACE 4,15 ** CBO - COPY BUFFER TO OUTPUT. * * ENTRY (X2) = FET WHOSE BUFFER IS TO BE PRINTED. * (X3) = FIRST LOCATION TO TRANSMIT, INITIALLY *OUT*. * * EXIT (X2) = UNCHANGED. * (X3) = LAST LOCATION TRANSMITTED + 1. * * USES X - 1, 2, 3, 4, 6. * A - 1, 2, 3, 4, 6. * B - 6, 7. * * CALLS WTO. CBO SUBR ENTRY/EXIT BX6 X2 SA6 CBOA SAVE FET ADDRESS SA1 X2+B1 FIRST SA4 X2+4 LIMIT SA2 A1+B1 IN SB6 X3 FIRST LOCATION TO OUTPUT SB7 X2+ *IN* POINTER SB7 B7-B6 ZR B7,CBO2 IF BUFFER EMPTY NG B7,CBO1 IF BUFFER WRAPS AROUND RJ WTO EQ CBO2 EXIT * PROCESS BUFFER WRAPAROUND. CBO1 SB7 X4 LIMIT SB7 B7-B6 COPY FIRST PART OF DATA RJ WTO SA2 CBOA SA1 X2+B1 FIRST SA2 A1+B1 IN SB6 X1 SB7 X2 SB7 B7-B6 COPY SECOND PART OF DATA RJ WTO CBO2 SA2 CBOA RESTORE FET ADDRESS SA3 X2+2 EQ CBOX RETURN CBOA CON 0 FET ADDRESS OF BUFFER TO OUTPUT CBR SPACE 4,15 ** CBR - CALL *BASIC* RESEQUENCER. * * EXIT *BASIC* RESEQUENCING COMPLETED. * * USES X - 0, 1, 2, 3, 6, 7. * A - 1, 2, 3. * * CALLS OVL=, PBR. CBR SUBR ENTRY/EXIT SA1 =0LIEDIT1 SA2 ACTR GET FILE NAME SA3 LWPR GET FILE/SYSTEM LOAD FLAG SX6 B1+ SX0 B1 MX7 42 LX3 59-18 LX0 12-0 NG X3,CBR1 IF LOADED FROM SYSTEM BX1 X2*X7 SX6 B0 CBR1 BX6 X0+X6 SX2 B0 RJ OVL= LOAD THE *BASIC* OVERLAY RJ /IEDIT1/PBR EQ CBRX RETURN CLN SPACE 4,20 ** CLN - CHECK IF LINE NUMBER IS IN LINE RANGE TABLE. * * ENTRY ((A5)) = (X5) = PACKED LINE NUMBER TO BE EVALUATED. * * EXIT (X4) = 0, IF LINE NUMBER NOT IN *LRT* * .NE. 0, IF LINE NUMBER IS IN *LRT*. * (X3) = 0, IF LINE NOT FOLLOWED BY AT LEAST TWO * BLANKS OR A NON-BLANK CHARACTER. * (X6) = LINE NUMBER OF LINE IN BINARY FORM. * (X7) = NUMBER OF DIGITS IN LINE NUMBER. * * USES X - 1, 4, 5. * A - 5. * B - 3, 4, 5. * * CALLS VPL. * * NOTES IF *LRT* (LINE RANGE TABLE) IS EMPTY, ALL LINES * ARE ASSUMED TO HAVE BEEN SELECTED. CLN SUBR ENTRY/EXIT RJ VPL GET LINE NUMBER SX5 ERRNLN *NO LINE NUMBER ON LINE.* ZR X7,ERR IF NO LINE NUMBER ON LINE SA5 NELR MX4 1 SB5 X6 ZR X5,CLNX IF NO LINE NUMBERS IN *LRT* SA5 LRT-1 INITIALIZE POINTER TO BEFORE *LRT* CLN1 SA5 A5+B1 CHECK *LRT* ENTRY SB4 X5 CHECK LOW ORDER VALUE LT B5,B4,CLN2 IF LINE NUMBER NOT IN TABLE SB3 -18 SET HIGH ORDER VALUE LX1 X5,B3 SB3 X1 LE B5,B3,CLNX IF LINE NUMBER IN *LRT* PL X5,CLN1 IF NOT AT END OF *LRT* CLN2 SX4 B0+ NUMBER NOT IN *LRT* EQ CLNX RETURN CNL SPACE 4,15 ** CNL - CONVERT AND NORMALIZE LINE NUMBER. * * ENTRY (X1) = LINE NUMBER, RIGHT JUSTIFIED, IN BINARY. * * EXIT (X6) = LINE NUMBER IN DISPLAY CODE. * * USES X - 1, 4, 6. * * CALLS CDD. CNL SUBR ENTRY/EXIT SX4 100000 IX1 X1+X4 ENSURE LEADING ZEROES RJ CDD CONVERT TO DECIMAL DISPLAY CODE MX6 NBIC*NUMD LX4 NBIC TRUNCATE LEADING *1* DIGIT BX6 X4*X6 EQ CNLX RETURN ERT SPACE 4,20 ** ERT - ECHO RECORD TO TERMINAL. * * ENTRY (X2) = FET ADDRESS OF BUFFER CONTAINING RECORD. * (X3) = 0, IF RECORD IS BUFFER RESIDENT. * 1, IF RECORD IS DISK RESIDENT. * (LSTFIL) = 0, IF LIST OPTION IS OFF. * 1, IF LIST OPTION IS ON. * * USES X - 1, 3, 5, 6. * A - 1, 3, 6. * * CALLS CBO, SBE. * * MACROS READEI, REWIND. ERT SUBR ENTRY/EXIT SA1 LSTFIL ZR X1,ERTX IF LIST OPTION IS OFF ZR X3,ERT2 IF RECORD IS BUFFER RESIDENT MX3 42 SA1 X2 BX6 X1*X3 SA6 ERTA SAVE ORIGINAL FILE NAME REWIND X2 ERT1 READEI X2,R SA1 LSTFIL ZR X1,ERTX IF LINES NOT TO BE ECHOED SA1 X2 LX1 59-9 NG X1,ERT2 IF LAST BUFFER OF DATA SA3 X2+3 COPY BUFFER TO OUTPUT RJ CBO SX5 B0+ RJ SBE EQ ERT1 READ IN NEXT SEGMENT ERT2 SA3 X2+3 COPY BUFFER TO OUTPUT RJ CBO EQ ERTX RETURN ERTA CON 0 ORIGINAL FILE NAME ERR SPACE 4,10 ** ERR - ERROR PROCESSOR. * * ENTRY (X5) = FWA OF ERROR MESSAGE. * * EXIT ABORTS AFTER ISSUING APPROPRIATE MESSAGE. * * USES X - 1. * A - 1. * * CALLS RSF. * * MACROS ABORT, SYSTEM, WRITEC. ERR BSS 0 ENTRY ZR X5,ERR1 IF NO MESSAGE TO ISSUE WRITEC O,X5 ERR1 SA1 APPFLG ZR X1,ERR2 IF SORT STATUS DID NOT CHANGE SYSTEM TLX,R,X1,1000B ERR2 RJ RAF RECALL ALL FETS SX7 B1+ RJ RSF RETURN SCRATCH FILES ABORT ** FATAL ERRORS - ERRORS WHICH WHEN ENCOUNTERED CAUSE *IEDIT* * TO ABORT WITHOUT EXECUTING THE COMMAND. ERRBSE DATA C*BUFFER SPACE ERROR (TOV).* ERRCNP DATA C*COMMAND NOT PROCESSED DUE TO OVERLAP.* ERRCSE DATA C*COMMAND ARGUMENT ERROR.* ERRDFN DATA C*DUPLICATE FILE NAME.* ERREEF DATA C*EMPTY FILE (SSF).* ERREIE DATA C*LINE NUMBER OVERLAP ERROR.* ERREIF DATA C*FILE NAME ERROR.* ERREII DATA C*LINE NUMBER INCREMENT ERROR.* ERREIS DATA C*INCORRECT SYNTAX.* ERRELR DATA C*LINE RANGE ERROR.* ERRNES DATA C*TOO SMALL BUFFER SPACE.* ERRNIV DATA C*NON-EXISTENT EDIT VERB SPECIFIED.* ERRNLF DATA C*NO LINES FOUND.* ERRNLN DATA C*NO LINE NUMBER ON LINE.* ERRNRF DATA C*READ FILE EMPTY.* ERRNRS DATA C*NO READ/DESTINATION FILE SPECIFIED.* ERRNTL DATA C*LINE NUMBER LIMIT EXCEEDED.* ERRRFN DATA C*RESERVED FILE NAME.* ** INFORMATIVE MESSAGES - ISSUED TO NOTIFY THE USER OF AN * UNUSUAL CONDITION. THE *IEDIT* COMMAND IS PROCESSED TO * COMPLETION. ERRLTF DATA C*ZZZZZ LINES TRUNCATED ON FILE QQQQQQQ.* ERRNDF DATA C*NO CLOSING DELIMITER FOUND.* MLB SPACE 4,20 ** MLB - MANAGE LINE BUFFER. * * ENTRY (X2) = ADDRESS OF LINE TO ADD TO INPUT BUFFER. * .LT. 0, IF LINE IS IN CHARACTER BUFFER. * (B3) = ADDRESS OF FET TO ADD LINE TO. * (NCOL) = NUMBER OF CHARACTERS TO BE WRITTEN. * * EXIT LINE ADDED TO LINE BUFFER. * * USES X - 1, 2, 3, 6, 7. * A - 1, 2, 3, 6, 7. * B - 2, 4. * * CALLS ABS, PLB, SFI. * * MACROS WRITER. MLB SUBR ENTRY/EXIT SX6 B3 SAVE FET ADDRESS BX7 X2 SA6 MLBB SA7 MLBA SX3 MXWL+1 MAXIMUM WORDS IN A LINE MX6 -18 SA1 B3+2 GET *IN* POINTER BX1 -X6*X1 IX1 X1+X3 SA2 B3+4 GET *LIMIT* BX2 -X6*X2 SX2 X2-1 IX2 X1-X2 SB2 X2 LT B2,MLB2 IF ENOUGH ROOM LEFT IN BUFFER SB2 L NE B2,B3,MLB1 IF NOT *LNBUF* SA1 LBFILE NZ X1,MLB1 IF BUFFER PREVIOUSLY WRITTEN OUT SA1 LNBUF SX2 LBINC RJ ABS ALLOCATE MORE LINEBUF SPACE NZ X6,MLB1 IF NOT ENOUGH DYNAMIC STORAGE LEFT RJ SFI UPDATE FET POINTERS FOR ALLOCATED BUFFERS EQ MLB2 BUFFER HAS SPACE ENOUGH FOR THE LINE MLB1 SX7 B1 SET LINE BUFFER FULL FLAG SA7 LBFILE WRITER B3,R WRITE LINE BUFFER TO FILE SA1 B3+B1 SET LINE BUFFER TO EMPTY SX6 X1 SA6 A1+B1 SA6 A6+B1 MLB2 SA3 MLBA RESTORE ADDRESS OF LINE TO INSERT SA2 MLBB RESTORE FET ADDRESS SA1 X2+2 SET *IN* POINTER NG X3,MLB4 IF LINE IS UNPACKED SA3 X3 GET FIRST WORD OF LINE TO BE MOVED SX7 X1 MX1 -12 MLB3 BX6 X3 SA6 X7+ MOVE WORD SX7 X7+B1 SA3 A3+B1 GET NEXT WORD BX6 -X1*X6 NZ X6,MLB3 IF NOT END OF LINE SA7 X2+2 UPDATE THE *IN* POINTER EQ MLBX RETURN MLB4 SA3 NCOL NUMBER OF CHARACTERS IN LINE SA1 MLBB SB2 60 SB4 X3+ SA1 X1+2 SET UP PARAMETERS FOR *PLB* SA2 CLIN SA1 X1 RJ PLB PACK THE LINE INTO THE LINE BUFFER SX7 A1+1 SA2 MLBB SA7 X2+2 UPDATE THE *IN* POINTER EQ MLBX RETURN MLBA CON 0 ADDRESS OF LINE TO INSERT MLBB CON 0 FET ADDRESS PIT SPACE 4,25 ** PIT - PROCESS TERMINAL INTERRUPT. * * ENTRY OPERATING SYSTEM HAS DETECTED A USER BREAK 1 OR USER * BREAK 2. * * EXIT IF USER BREAK 1 OCCURRED, CHANGED RECORDS WILL NO * LONGER BE ECHOED TO THE OUTPUT FILE. * * IF USER BREAK 2 OCCURRED, *IEDIT* PROCESSING WILL * TERMINATE AFTER RESTORING THE EDIT FILE TO ITS * ORIGINAL CONDITION IF NECESSARY. THE COMPLETE * BIT IN THE INPUT FET MUST ALSO BE SET SINCE AN * INPUT REQUEST MAY HAVE BEEN LEFT PENDING AT * AT THE TIME OF THE INTERRUPT. * * USES X - 1, 2, 3, 5, 6, 7. * A - 1, 3, 5, 6, 7. * * CALLS SBE, SLN. * * MACROS REPRIEVE, RPHR, WRITEF. PIT BSS 0 ENTRY SA1 INTFLG SX6 B1 SET *NOT INTERRRUPTIBLE* SA6 A1 NZ X1,PIT3 IF NOT INTERRUPTIBLE SA1 RPB+7 CHECK WHICH USER BREAK OCCURED MX2 -12 BX2 -X2*X1 SX2 X2-TIET SX6 B0+ ZR X2,PIT2 IF USER BREAK ONE SA1 APPFLG ZR X1,PIT1 IF NOTHING APPENDED TO EDIT FILE SX2 E SET FET ADDRESS SA5 EFN SA6 A1 CLEAR APPEND FLAG RJ SLN SET EDIT FILE NAME INTO FET BX5 X5-X5 RJ SBE SET EDIT BUFFER TO EMPTY SA1 FLNGTH MX6 1 SET *RANDOM* BIT IN FET SA3 X2+B1 FET+1 LX6 47-59 BX7 X6+X3 BX6 X1 LOAD LAST SECTOR OF ORIGINAL FILE SA7 A3 SA6 X2+6 RPHR X2 SET FET FOR *WRITEF* BX5 X5-X5 RJ SBE SET BUFFER EMPTY WRITEF X2,R WRITE *EOF* AFTER LAST ORIGINAL SECTOR PIT1 SA1 I SET COMPLETE BIT IN INPUT FET SX7 B1 BX7 X1+X7 SA7 A1 SX5 B0 SET NO MESSAGE TO ISSUE EQ ERR EXIT TO ERROR PROCESSOR PIT2 SA6 LOP TURN OFF LIST OPTION SA6 LSTFIL PIT3 REPRIEVE RPB,RESUME,200B RESUME PRIOR EXECUTION PLB SPACE 4,15 ** PLB - PACK LINE INTO A BUFFER. * * ENTRY ((A1)) = (X1) = WORD TO START PACKING IN. * (A2) = ADDRESS OF STRING BUFFER TO PACK. * (B2) = FIRST FREE BIT IN WORD. * (B4) = LENGTH OF STRING TO PACK. * (CSTI) = CHARACTER SET IN USE. * * EXIT ((A1)) = LAST WORD PACKED. * * USES X - 1, 2, 3, 4, 5, 7. * A - 1, 2, 3, 7. * B - 2, 3, 4, 5, 6, 7. PLB5 LX7 B2 LEFT ADJUST FINAL PACKED WORD SA7 A1+B7 STORE PACKED WORD SA1 A7+ SB5 12 GE B2,B5,PLBX IF EOL GUARANTEED IN LAST WORD SA1 A1+B1 SX7 B0+ SA7 A1 PLB SUBR MX4 54 SA3 CSTI SB6 X3 SB5 12 GT B6,PLB1 IF *ASCII8* CHARACTER SET SB5 6 SX3 X3+1 PLB1 NZ B2,PLB2 IF ROOM LEFT IN CURRENT WORD SB2 60 SA1 A1+1 PLB2 SB7 B0+ SB3 60 SB3 B3-B2 LX7 X1,B3 ADJUST FIRST WORD FOR ADDING CHARACTERS SA2 A2-1 NZ B3,PLB3 IF FIRST WORD PARTIALLY FILLED SX7 B0+ PLB3 ZR B4,PLB5 IF ALL CHARACTERS HAVE BEEN PACKED SA2 A2+B1 GET NEXT CHARACTER BX5 X4*X2 NZ X3,PLB4 IF NOT *ASCII* CHARACTER SET ZR X5,PLB4 IF NOT A TWELVE BIT CHARACTER AX5 6 LX7 X7,B5 BX7 X7+X5 PACK ESCAPE PART OF CHARACTER SB2 B2-B5 BX2 -X4*X2 GET LOW SIX BITS OF CHARACTER GT B2,PLB4 IF ROOM LEFT FOR CHARACTER SA7 A1+B7 SB7 B7+B1 SX7 B0 SB2 60 PLB4 LX7 X7,B5 BX7 X7+X2 ADD NEW CHARACTER SB2 B2-B5 SB4 B4-B1 GT B2,PLB3 IF ROOM LEFT FOR MORE CHARACTERS SA7 A1+B7 STORE PACKED WORD SB7 B7+B1 SX7 B0+ SB2 60 EQ PLB3 CONTINUE WITH NEXT CHARACTER RAF SPACE 4,10 ** RAF - RECALL ALL FETS. * * EXIT ALL FETS RECALLED. * * MACROS RECALL. RAF SUBR ENTRY/EXIT RECALL E RECALL ALL FETS RECALL L RECALL LNT1 RECALL LNT2 RECALL SCR RECALL SCR1 EQ RAFX RETURN RSF SPACE 4,10 ** RSF - REWIND/RETURN SCRATCH FILES. * * ENTRY (X7) = 0, REWIND ALL SCRATCH FILES. * = 1, RETURN ALL SCRATCH FILES. * * EXIT SCRATCH FILES REWOUND/RETURNED. * *READ* FILE REWOUND IF PRESENT. * * USES X - 1, 2, 5, 7. * A - 1, 5, 7. * * CALLS SLN. * * MACROS RETURN, REWIND. RSF SUBR ENTRY/EXIT SA7 RSFC SAVE REWIND/RETURN FLAG SX7 TSF SA7 RSFA STORE ADDRESS OF FILE NAMES SA1 I BX7 X1 SX2 A1 SA7 RSFB PRESERVE THE ORIGINAL FILE NAME RSF1 SA5 RSFA SA5 X5 LOAD NEXT FILE NAME ZR X5,RSF3 IF END OF TABLE SX7 A5+1 SA7 RSFA RJ SLN SET SCRATCH FILE NAME INTO FET SA1 RSFC ZR X1,RSF2 IF REWIND RATHER THAN RETURN RETURN X2 EQ RSF1 GET NEXT FILE NAME RSF2 REWIND X2,R EQ RSF1 GET NEXT FILE NAME RSF3 SA1 FNUM SX1 X1-FNRE NZ X1,RSF4 IF NO *READ* FILE EXISTS SA5 FILEN RJ SLN SET *READ* FILE NAME INTO FET REWIND X2 RSF4 SA5 RSFB RESTORE ORIGINAL FET NAME RJ SLN EQ RSFX RETURN RSFA CON 0 ADDRESS OF FILE NAMES RSFB CON 0 ORIGINAL FET NAME RSFC CON 0 REWIND/RETURN FLAG SBE SPACE 4,10 ** SBE - SET BUFFER EMPTY. * * ENTRY (X2) = FET ADDRESS OF BUFFER. * (X5) .NE. 0, IF FILE IS TO BE REWOUND. * * EXIT BUFFER IS SET TO EMPTY. * * USES X - 0, 3, 6. * A - 3, 6. * * MACROS RECALL, REWIND. SBE SUBR ENTRY/EXIT ZR X5,SBE1 IF NO REWIND SPECIFIED REWIND X2,R EQ SBEX RETURN SBE1 RECALL X2 MX0 -18 SET FIRST=IN=OUT SA3 X2+B1 BX6 -X0*X3 SA6 A3+B1 SA6 A6+B1 EQ SBEX RETURN SFI SPACE 4,15 ** SFI - SET FET INFORMATION. * * ENTRY FWA OF EACH MANAGED TABLE. * LENGTH OF EACH MANGED TABLE. * * EXIT FETS WILL BE SET ACCORDING TO FWA AND LENGTH OF * BUFFERS AS DETERMINED BY MANAGED TABLE PROCESSORS. * * USES X - 1, 2, 4. * A - 2, 4. * * CALLS SFP. SFI SUBR ENTRY/EXIT SA4 F.EFBUF SX1 E SA2 L.EFBUF RJ SFP SA4 F.LNBUF SX1 L SA2 L.LNBUF RJ SFP SA4 F.SCRBA SX1 LNT1 SA2 L.SCRBA RJ SFP SA4 F.SCRBB SX1 LNT2 SA2 L.SCRBB RJ SFP SA4 F.SCRBA SX1 SCR SA2 L.SCRBA RJ SFP SA4 F.SCRBB SX1 SCR1 SA2 L.SCRBB RJ SFP EQ SFIX RETURN SFP SPACE 4,15 ** SFP - SET FET POINTERS. * * ENTRY (X1) = FWA OF FET TO BE SET. * (X2) = BUFFER LENGTH TO BE USED IN THIS FET. * (X4) = FIRST WORD ADDRESS OF BUFFER. * * EXIT FET POINTERS ARE RESET. INITIALLY A FET IS SET * TO EMPTY (FIRST=IN=OUT). * * USES X - 0, 2, 3, 5, 6, 7. * A - 3, 5, 6. * B - 2. SFP SUBR ENTRY/EXIT SA3 X1+B1 CHECK *FIRST* POINTER MX0 -18 BX5 -X0*X3 IX7 X4-X5 CALCULATE MOVEMENT OF TABLE BX3 X3*X0 SET *FIRST* POINTER BX6 X3+X4 SA6 A3 SA5 A3+B1 UPDATE *IN* POINTER BX5 -X0*X5 ZR X5,SFP1 IF *IN* POINTER HAS NOT BEEN SET * RESET FET POINTERS SB2 X7 MOVEMENT OF TABLE SX6 X5+B2 NEW *IN* POINTER SA6 A3+B1 SA3 X1+3 RETRIEVE *OUT* POINTER BX6 -X0*X3 SX6 X6+B2 SET NEW *OUT* POINTER SA6 A6+1 EQ SFP2 SET *LIMIT* POINTER SFP1 BX6 -X0*X6 SET *IN* POINTER IN FET TO *FIRST* SA6 A6+B1 SA6 A6+1 SET *OUT* POINTER IN FET TO *FIRST* SFP2 SA3 A6+B1 SET *LIMIT* POINTER IN FET BX3 X0*X3 SX2 X2+B1 IX2 X2+X4 BX6 X2+X3 SA6 A3 EQ SFPX RETURN SLN SPACE 4,15 ** SLN - SET LOCAL FILE NAME. * * ENTRY (X2) = FET ADDRESS. * (X5) = FILE NAME TO PUT IN FET. * * EXIT FILE NAME HAS BEEN INSERTED IN THE SPECFIED FET. * (X2) = FET ADDRESS. * (X5) = FET+0 WITH ORIGINAL FILE NAME AFTER *RECALL*. * * USES X - 3, 5, 7. * A - 5, 7. * * MACROS RECALL. SLN SUBR ENTRY/EXIT RECALL X2 SX3 B1 BX7 X3+X5 SA5 X2 SA7 X2 EQ SLNX RETURN SSF SPACE 4,15 ** SSF - SORT SELECTED FILE. * * ENTRY (B2) = FET ADDRESS OF FILE TO BE SORTED. * * EXIT (X2) = FET ADDRESS OF SORTED FILE. * (X6) = NUMBER OF LINES IN SORTED FILE. * * USES X - 1, 2, 4, 5, 6, 7. * A - 1, 2, 5, 6. * * CALLS SLN, SNF. * * MACROS FILINFO. SSF SUBR ENTRY/EXIT SX6 B2+ ADDRESS OF FET OF FILE TO SORT SA6 SSFA SA5 TSF+4 RESET SCRATCH FILE NAME SX2 SCR RJ SLN SA5 TSF+5 RESET SCRATCH FILE NAME SX2 SCR1 RJ SLN SX1 B1+ INDIRECT ACCESS FILES BEING WORKED WITH SX6 NUMD NUMBER OF DIGITS TO SORT ON SA5 CSTI CHARACTER TYPE FOR *COMCSNF* SX4 X5-1 ZR X4,SSF1 IF CHARACTER SET IS ASCII8 SX5 B0+ SSF1 BX7 X5 SA2 SSFA EDIT FILE FET ADDRESS FOR *COMCSNF* RJ SNF SORT LINE NUMBERED FILE ZR X1,SSF2 IF SORT SUCCESSFUL SX5 ERRNLN *NO LINE NUMBER ON LINE.* ZR B2,ERR IF NO LINE NUMBER SX5 ERREEF *EMPTY FILE (SSF).* NG B2,ERR IF SORT FILE EMPTY SX5 ERRNES *TOO SMALL BUFFER SPACE.* EQ ERR NOT ENOUGH BUFFER SPACE AVAILABLE SSF2 SA1 EFN GET EDIT FILE NAME SA5 SSFA GET SORT FILE NAME SA5 X5 MX4 42 BX5 X5*X4 BX1 X5-X1 NZ X1,SSFX IF NOT SORTING EDIT FILE SA6 SSFB SAVE NUMBER OF LINES SA1 EFN SA2 FIPB BX1 X1*X4 BX2 -X4*X2 BX6 X1+X2 SA6 A2 FILINFO FIPB GET NEW LENGTH OF EDIT FILE SA2 FIPB+3 MX4 24 BX6 X2*X4 LX6 24 SA2 SSFA SA6 FLNGTH SA1 SSFB BX6 X1 EQ SSFX RETURN SSFA CON 0 FET ADDRESS OF FILE TO SORT SSFB CON 0 NUMBER OF LINES IN FILE TOV SPACE 4,20 ** TOV - TABLE OVERFLOW. * * THIS ROUTINE IS REQUIRED BY THE MANAGED TABLE PROCESSORS * AND IS USED WHEN TABLES BECOME LARGER THAN THE * CURRENT FIELD LENGTH. BECAUSE OF CODE IN *ABS* WHICH * INCREASES THE FIELD LENGTH WHEN NECESSARY, THIS ROUTINE * SHOULD NEVER BE CALLED. * * ENTRY THE CURRENT FIELD LENGTH IS NOT LARGE ENOUGH * TO HANDLE THE INCREASE OF A TABLE THAT WAS REQUESTED. * * EXIT TO *ERR*. * * USES X - 5. TOV BSS 0 ENTRY SX5 ERRBSE *BUFFER SPACE ERROR (TOV).* EQ ERR ISSUE ERROR MESSAGE AND ABORT VPL SPACE 4,15 ** VPL - EVALUATE PACKED LINE NUMBER. * * ENTRY ((A5)) = (X5) = PACKED WORD TO BE EVALUATED. * (CSTI) = CHARACTER SET. * * EXIT (X6) = LINE NUMBER IN BINARY FORM. * (X7) = NUMBER OF DIGITS IN LINE NUMBER. * (X3) = 0, IF LINE NOT FOLLOWED BY AT LEAST TWO * BLANKS OR ONE NON-BLANK CHARACTER. * * USES X - ALL. * A - 2, 5. * B - 3, 4, 5, 6, 7. VPL SUBR ENTRY/EXIT SA2 CSTI GET CHARACTER SET SX1 10D SB5 60 SX0 NUMD SB6 60B ZERO IN *ASCII8* SB7 71B NINE IN *ASCII8* SX2 X2-1 SB3 12 SX6 B0 INITIALIZE LINE NUMBER TO ZERO MX3 -12 PL X2,VPL1 IF *ASCII8* CHARACTER SET SB6 1R0 SB7 1R9 SB3 6 MX3 -6 VPL1 NZ B5,VPL2 IF MORE CHARACTERS REMAIN IN WORD SB5 60 SA5 A5+1 VPL2 LX5 X5,B3 BX4 -X3*X5 GET NEXT CHARACTER BX5 X3*X5 ISOLATE CHARACTER SB5 B5-B3 ZR X4,VPL3 IF COLON OR EOL FOUND ZR X0,VPL3 IF *NUMD* DIGITS FOUND SB4 X4+ LT B4,B6,VPL3 IF ALPHABETIC CHARACTER GT B4,B7,VPL3 IF NOT DIGIT SB4 B4-B6 CONVERT DIGIT TO BINARY IX6 X6*X1 SX0 X0-1 SX6 X6+B4 ADD DIGIT TO RUNNING TOTAL EQ VPL1 PROCESS NEXT CHARACTER VPL3 SX1 NUMD SA2 BLNK IX7 X1-X0 ZR X4,VPL5 IF COLON OF EOL FOUND IX4 X4-X2 NZ X4,VPLX IF NOT BLANK CHARACTER NZ B5,VPL4 IF MORE CHARACTERS LEFT IN WORD SB5 60 SA5 A5+1 VPL4 LX5 X5,B3 BX4 -X3*X5 GET NEXT CHARACTER BX5 X3*X5 SB5 B5-B3 NZ X4,VPLX IF AT LEAST TWO CHARACTERS AFTER NUMBER VPL5 NZ B5,VPL6 IF MORE CHARACTERS LEFT IN WORD SB5 60 SA5 A5+1 VPL6 NZ X5,VPLX IF CHARACTERS FOLLOW LINE NUMBER SB6 12 GE B5,B6,VPL7 IF ZERO BYTE IN BOTTOM OF WORD SA5 A5+1 NZ X5,VPLX IF NEXT WORD CONTAINS A CHARACTER VPL7 SX3 B0 A LINE TO BE DELETED EQ VPLX RETURN WTL SPACE 4,15 ** WTL - WRITE TRUNCATED LINE. * * ENTRY (X1) = BINARY LINE NUMBER OF TRUNCATED LINE. * * EXIT LINE NUMBER OF TRUNCATED LINE WILL BE WRITTEN * TO A SCRATCH FILE. * * USES X - 1, 6. * A - 1, 6. * * CALLS CNL. * * MACROS WRITEO. WTL SUBR ENTRY/EXIT RJ CNL CONVERT LINE NUMBER TO DISPLAY SX1 2R PAD BLANKS TO ALLOW SORTING LX1 18 BX6 X1+X6 WRITEO TRNCFET SA1 NTL SX6 X1+B1 SA6 A1 EQ WTLX RETURN WTO SPACE 4,25 ** WTO - WRITE DATA TO OUTPUT. * * ENTRY (B6) = FWA OF DATA TO WRITE OUT. * (B7) = LENGTH OF DATA IN WORDS. * * EXIT DATA WRITTEN TO *OUTPUT*. * * USES X - 1, 6. * A - 1, 6. * B - 7. * * MACROS WRITEW. * * NOTES *WTO* IS EQUIVALENT TO *WRITEW O,B6,B7* EXCEPT * THAT THE WRITE WILL NOT BE PERFORMED IF THE * LIST FLAG HAS BEEN CLEARED (THIS MAY HAPPEN AT * ANY TIME DUE TO A *USER BREAK ONE*). NOTE THAT * *B6* IS UPDATED BY *COMCWTW*. WTO SUBR ENTRY/EXIT WTO1 SA1 LSTFIL ZR X1,WTOX IF LISTING DISABLED (USER BREAK 1) SX6 B7 SA6 WTOA SAVE NUMBER OF WORDS TO WRITE SX6 X6-100B NG X6,WTO2 IF LESS THAN 100B WORDS LEFT TO WRITE WRITEW O,B6,100B SA1 WTOA DECREMENT NUMBER OF WORDS TO WRITE SB7 X1-100B EQ WTO1 PROCESS THE NEXT BLOCK OF DATA WTO2 WRITEW O,B6,B7 EQ WTOX RETURN WTOA CON 0 NUMBER OF WORDS TO WRITE TITLE COMMON DECKS. SPACE 4,10 ** EXECUTABLE COMMON DECKS. *CALL COMCCDD *CALL COMCCIO *CALL COMCCPM *CALL COMCDXB *CALL COMCLFM *CALL COMCMTP *CALL COMCMVE *CALL COMCOVL *CALL COMCRDC *CALL COMCRDO *CALL COMCRDW LIST X *CALL COMCSNF LIST -X *CALL COMCSNM *CALL COMCSST *CALL COMCSYS *CALL COMCUSB *CALL COMCWTC *CALL COMCWTW *CALL COMCWTO USE LITERALS OVLY EQU * TITLE OVERLAYABLE FUNCTION PROCESSORS. PSC SPACE 4,15 ** PSC - PROCESS SEQUENTIAL COMMANDS. * * *PSC* PROCESSES THE CLASS OF COMMANDS WHICH READ A CLEAN * SOURCE FILE AND POTENTIALLY WRITE A NEW CLEAN FILE. * * EXIT EDIT FILE REWRITTEN IF NECESSARY AND LINES ECHOED * TO THE TERMINAL. * * USES X - ALL. * A - 1, 2, 3, 4, 5, 6, 7. * B - 2, 3, 4, 5, 6, 7. * * CALLS ABL, CLN, CSL, FSL, PLB, PWN, SLN, USB, WTL. * * MACROS READC, READEI, READO, RENAME, WRITEC, WRITER. PSC SUBR ENTRY/EXIT SA1 FNUM SX1 X1-MXNW-1 NG X1,PSC1 IF NOT A *WRITE* OR *WRITEN* FUNCTION SA5 FILEN SET *WRITE(N)* FILE NAME INTO FET SX2 SCR RJ SLN EQ PSC2 AVOID REWIND OF *WRITE(N)* FILE PSC1 REWIND SCR PSC2 READEI E REWIND TRNCFET * COUNT NUMBER OF TRAILING BLANKS IN SEARCH STRING AND * PUT COUNT IN *PSCB*. SA5 NCIS SA4 BLNK SB6 X5+ PSC3 ZR B6,PSC4 IF NO SEARCH STRING SA3 B6+SBUF-1 BX3 X3-X4 NZ X3,PSC4 IF CHARACTER NOT A BLANK SB6 B6-B1 EQ PSC3 CHECK NEXT CHARACTER PSC4 SB6 -B6 SX6 X5+B6 SA6 PSCB * THIS MARKS THE BEGINNING OF THE MAIN LOOP. * CLEAR ALL FLAGS AND READ A LINE INTO THE WORKING BUFFER. PSC5 SX7 B0+ SA7 TRNC READC E,PCKDBF,MXWL+1 NZ X1,PSC28 IF END OF EDIT FILE REACHED BX6 X4 PSC6 MX0 -12 BX6 -X0*X6 ZR X6,PSC7 IF NO MORE WORDS IN LINE READO X2 EQ PSC6 CHECK FOR END OF LINE * CRACK THE LINE NUMBER AND STORE ITS VALUE AND LENGTH. PSC7 SA5 PCKDBF CHECK LINE NUMBER RJ CLN SA7 PSCA SA6 OBLN SA6 NBLN BX0 X4 SAVE THE LINE SELECT PARAMETER * UNPACK THE LINE INTO *CLIN* AND CHECK FOR TRUNCATION. SB2 PCKDBF SA1 CSTI SB6 MXCIL+1 SB3 X1+ RJ USB UNPACK LINE INTO STRING BUFFER SB4 B7-B6 SB4 B4+B1 * FIND THE LAST NON-BLANK CHARACTER. SA4 BLNK SB2 MXCIL GE B2,B4,PSC8 IF LINE NOT TOO LONG SX7 B2 SA7 NCOL SX7 B1 SA7 TRNC EQ PSC10 TRUNCATE FLAG IS SET PSC8 SA3 B4+CLIN-1 BX7 X3-X4 NZ X7,PSC8.1 IF CHARACTER IS NOT A BLANK SB4 B4-1 EQ PSC8 CHECK NEXT CHARACTER PSC8.1 NZ X3,PSC9 IF NOT A 64 CHARACTER SET COLON GE B4,B2,PSC9 IF ALREADY AT END OF LINE SB4 B4+1 INSURE A BLANK AFTER THE COLON PSC9 SX7 B4+ SA7 NCOL * PERFORM ANY CHARACTER STRING REPLACEMENT * NECESSARY FOR THE *ALTER* COMMAND. PSC10 ZR X0,PSC27 IF LINE NOT SELECTED SA5 NCIS NZ X5,PSC13 IF NON-NULL SEARCH STRING SA2 NCIR ZR X2,PSC22 IF REPLACEMENT STRING ALSO NULL * PROCESS THE *ALTER* COMMAND FORMAT IN * WHICH A REPLACEMENT STRING IS SPECIFIED, * BUT A SEARCH STRING IS NOT. * (ALTER,//STRING2/) SA1 NCOL SB3 MXCIL MAXIMUM NUMBER OF CHARACTERS PER LINE SB4 X2 LENGTH OF REPLACEMENT STRING SB2 X1 CURRENT NUMBER OF CHARACTERS IN LINE SB5 B0+ PSC11 GE B2,B3,PSC12 IF NEW LINE IS TOO LONG SA1 B5+RBUF SB5 B5+B1 BX7 X1 SA7 B2+CLIN SB2 B2+B1 LT B5,B4,PSC11 IF MORE CHARACTERS ARE TO BE ADDED SX7 B2 SA7 NCOL EQ PSC22 COMPLETE PROCESSING SELECTED LINE PSC12 SX6 B1 SX7 B3 SA6 TRNC SA7 NCOL EQ PSC22 COMPLETE PROCESSING SELECTED LINE * PROCESS THE *ALTER* COMMAND FORMAT IN WHICH THE SEARCH * STRING IS SPECIFIED. * (ALTER,/STRING1/STRING2/ OR ALTER,/STRING1//) PSC13 BSS 0 .TRIM IFEQ TRIM,0 SA2 PSCB ZR X2,PSC16 IF NO TRAILING BLANKS IN SEARCH STRING IFEQ TRIM,0 SA1 NCOL SA3 BLNK SB3 MXCIL SB2 X1+ BX7 X3 SA1 B2+CLIN-1 GET LAST CHARACTER BX1 X1-X3 NZ X1,PSC14 IF NOT A BLANK PROTECTING A COLON SB2 B2-1 POINT TO THE COLON PSC14 EQ B2,B3,PSC15 IF NO MORE ROOM IN STRING BUFFER SA7 B2+CLIN SB2 B2+1 SX2 X2-1 NZ X2,PSC14 IF ALL BLANKS NOT YET ADDED PSC15 SX7 B2+ SA7 NCOL .TRIM ENDIF * STORE THE NUMBER OF TRAILING BLANKS IN LINE INTO *NTBL*. * CHECK FOR SEARCH STRING PRESENT IN LINE. PSC16 SA1 NCOL SA2 PSCA SX4 MXCIL IX6 X4-X1 BX7 X2 SA6 NTBL SB6 X1+ RJ FSL FIND STRING IN LINE NG X4,PSC27 IF STRING NOT FOUND, DE-SELECT * REPLACE ALL OCCURENCES OF SEARCH STRING IN LINE * WITH THE REPLACEMENT STRING. SA1 FNUM SX1 X1-FNAL NZ X1,PSC22 IF FUNCTION NOT *ALTER* PSC17 RJ CSL CHANGE STRING IN LINE SA5 NCIR IX7 X4+X5 SA4 NCOL SB6 X4+ RJ FSL PL X4,PSC17 IF ANOTHER SEARCH STRING OCCURENCE FOUND SA2 NCIS SA1 PSCB IX1 X1-X2 NZ X1,PSC22 IF SEARCH STRING IS NOT ALL BLANKS * PROCESS THE SPECIAL CASE WHERE THE USER SPECIFIED * AN ALL BLANK SEARCH STRING IN AN *ALTER* COMMAND. * (ALTER,/ /STRING2/) .TRIM IFEQ TRIM,0 SA3 NCOL SB7 X3+ CURRENT NUMBER OF CHARACTERS IN LINE SA1 NTBL SA4 NCIR SB2 X1 ORIGINAL NUMBER OF TRAILING BLANKS SB3 X2 NUMBER OF CHARACTERS IN SEARCH STRING SB6 MXCIL SB4 X4+ NUMBER OF CHARACTERS IN REPLACEMENT STRING PSC18 LT B2,B3,PSC21 IF LESS THAN *NCIS* BLANKS REMAIN SB2 B2-B3 SB5 B0 PSC19 EQ B5,B4,PSC18 IF ENTIRE REPLACE STRING ADDED EQ B7,B6,PSC20 IF NEW LINE IS TOO LONG SA1 B5+RBUF SX7 X1+ SA7 B7+CLIN SB7 B7+B1 SB5 B5+B1 EQ PSC19 ADD THE NEXT CHARACTER PSC20 SX7 B1+ SA7 TRNC PSC21 SX7 B7+ SA7 NCOL .TRIM ENDIF * PROCESS SELECTED LINES. THE FOLLOWING CODE REPACKS, * ECHOS TO OUTPUT, AND COPIES THE POTENTIALLY ALTERED * LINE TO THE NEW SOURCE FILE. PSC22 SA1 NMLS SX6 X1+B1 SA6 A1 SA1 FNUM SX1 X1-FNAL NZ X1,PSC23 IF NOT AN *ALTER* COMMAND SA2 PSCA ADD BLANKS AND REPACK RJ ABL SB2 60 SA1 PCKDBF SA2 CLIN SA3 NCOL SB4 X3 RJ PLB PSC23 SA1 FNUM SX1 X1-MXNW-1 PL X1,PSC24 IF A *WRITE(N)* FUNCTION SA1 LOP ZR X1,PSC24 IF LIST FLAG NOT SET WRITEC O,PCKDBF ECHO SELECTED LINES PSC24 SA1 FNUM SX2 X1-FNLI ZR X2,PSC26 IF A *LIST* COMMAND SX2 X1-FNDE ZR X2,PSC26 IF A *DELETE* COMMAND SX1 X1-FNWN NZ X1,PSC25 IF NOT A *WRITE(N)* COMMAND SA1 PSCA RJ PWN SHIFT TEXT FOR *WRITEN* PSC25 WRITEC SCR,PCKDBF BUILD NEW FILE PSC26 SA1 TRNC ZR X1,PSC5 IF LINE NOT TRUNCATED SA1 OBLN RJ WTL EQ PSC5 PROCESS NEXT LINE * PROCESS UNSELECTED LINES. * THE FOLLOWING CODE SUPPRESSES PACKING AND ECHOING AND * AS SUCH IS FOR THE SIMPLE COPYING OF UNSELECTED LINES. PSC27 SA1 FNUM SX2 X1-FNAL ZR X2,PSC25 IF AN *ALTER* COMMAND SX2 X1-FNDE ZR X2,PSC25 IF A *DELETE* COMMAND EQ PSC5 PROCESS NEXT LINE * FINISH UP AFTER SCAN OF EDIT FILE IS COMPLETED. PSC28 SA2 NMLS SA1 FNUM NZ X2,PSC29 IF AT LEAST ONE LINE WAS SELECTED SX2 X1-FNLI SX5 ERRNLF *NO LINES FOUND.* NZ X2,ERR IF NOT A *LIST* COMMAND SX5 B0+ EQ ERR NO LINES FOUND AND A *LIST* COMMAND * FLUSH TRUNCATED LINES IF NECESSARY PSC29 SA3 TRNCFET CHECK FET STATUS MX2 -18 BX3 -X2*X3 SX2 A3+ SX3 X3-3 ZR X3,PSC30 IF BUFFER NEVER WRITTEN TO DISK WRITER X2 PSC30 SA1 FNUM SX2 X1-FNLI ZR X2,PSCX IF A *LIST* COMMAND WRITER SCR COMPLETE *ALTER*, *DELETE*, OR *WRITE(N)* SA1 FNUM SX1 X1-MXNW-1 PL X1,PSCX IF A *WRITE(N)* COMMAND RENAME SCR,E COMPLETE *ALTER* OR *DELETE* EQ PSCX RETURN PSCA CON 0 NUMBER OF DIGITS IN LINE NUMBER PSCB CON 0 NUMBER OF TRAILING BLANKS IN SEARCH STRING TITLE OVERLAYABLE SUBROUTINES. CSL SPACE 4,25 ** CSL - CHANGE STRING IN LINE. * * *CSL* CHANGES A STRING IN A LINE TO ANOTHER * STRING OF CHARACTERS. * * ENTRY (NCOL) = NUMBER OF CHARACTERS ON LINE. * (CLIN) = FWA OF UNPACKED LINE. * (RBUF) = FWA OF REPLACEMENT BUFFER. * (X4) = CHARACTER POSITION WHERE SEARCH STRING WAS * FOUND. * * EXIT (X4) = CHARACTER POSITION POINTER. * *CLIN* CHANGED TO INCLUDE THE STRING TO REPLACE * WITH THE NEW STRING. * (NCOL) CHANGED TO REFLECT NEW LENGTH OF LINE * AFTER CHANGE HAS BEEN MADE. * * USES X - 1, 2, 3, 4, 5, 6, 7. * A - 1, 4, 5, 7. * B - 3, 5, 6. * * MACROS MOVE. CSL SUBR ENTRY/EXIT SA5 NCIS FIND DIFFERENCE IN STRING LENGTHS SA1 NCIR SX7 X4 IX3 X1-X5 NUMBER OF CHARACTERS TO INCREASE HOLE BY SA7 CSLA SX2 CLIN+X4 FIND BEGINNING OF SEARCH STRING SA4 NCOL IX7 X4+X3 COMPUTED LENGTH OF NEW STRING SA7 A4 UPDATE *NCOL* TO ITS NEW LENGTH ZR X3,CSL2 IF STRINGS ARE SAME SIZE IX2 X2+X5 GET STARTING ADDRESS FOR MOVE SX4 X4+CLIN ENDING ADDRESS OF OLD LINE PLUS ONE IX3 X2+X3 DESTINATION ADDRESS FOR MOVE IX1 X4-X2 COMPUTE LENGTH OF STRING TO MOVE SB5 X7-MXCIL-1 SX7 B1 NG B5,CSL1 IF NO TRUNCATION SA7 TRNC SX7 MXCIL SX6 X3-CLIN-MXCIL SA7 NCOL CORRECT LENGTH OF NEW LINE TO *MXCIL* PL X6,CSL2 IF DESTINATION ADDRESS BEYOND *MXCIL* SX4 X7-MXCIL AMOUNT OF TRUNCATION IX1 X1-X4 ADJUST NUMBER OF CHARACTERS TO MOVE * ADJUST SEARCH STRING HOLE TO FIT REPLACEMENT STRING. CSL1 MOVE X1,X2,X3 * MOVE REPLACEMENT STRING TO SEARCH STRING HOLE. CSL2 SA4 CSLA SA5 NCIR SB5 CLIN+X4 ADDR TO START REPLACEMENT SB6 MXCIL+1 SB3 X4 SB6 B6-B3 SB3 X5+ LE B3,B6,CSL3 IF ROOM FOR ENTIRE REPLACEMENT STRING SB3 B6+ CSL3 SB6 B0+ CHARACTER REPLACEMENT COUNT SA1 RBUF-1 CSL4 GE B6,B3,CSLX IF DONE MOVING STRING, RETURN SA1 A1+B1 GET NEXT CHARACTER SX7 X1 SA7 B5+B6 SB6 B6+B1 EQ CSL4 MOVE NEXT CHARACTER CSLA CON 0 SEARCH STRING POSITION FSL SPACE 4,20 ** FSL - FIND STRING IN LINE. * * ENTRY (CLIN) = FIRST CHARACTER OF LINE * (LINE UNPACKED - 1 CHARACTER PER WORD). * (X7) = NUMBER OF CHARACTERS ON LINE TO SKIP * OVER BEFORE STARTING SEARCH. * (B6) = COUNT OF CHARACTERS IN LINE. * (SBUF) = UNPACKED SEARCH STRING. * (NCIS) = NUMBER OF CHARACTERS IN SEARCH STRING. * * EXIT (X4) = CHARACTER POSITION IN LINE WHERE * MATCH WAS FOUND. * .LT. 0, IF CHARACTER STRING NOT IN LINE. * * USES X - 1, 4, 5, 7. * A - 1, 5. * B - 2, 3, 4, 7. FSL SUBR ENTRY/EXIT MX4 1 SA5 NCIS NUMBER OF CHARACTERS IN SEARCH STRING SB4 X7 OFFSET TO START SEARCH AT SB3 X5+ SB7 B6-B3 SB2 B0+ COUNT OF CHARACTERS FOUND GT B4,B7,FSLX IF ALREADY AT END OF LINE FSL1 SA5 CLIN+B4 GET CHARACTER FROM LINE SA1 SBUF+B2 GET CHARACTER FROM *SBUF* BX5 X5-X1 SB4 B4+B1 INCREMENT OFFSET OF *CLIN* ZR X5,FSL2 IF CHARACTERS MATCH SB4 X7+B1 SB2 B0+ RESET COUNT OF CHARACTERS FOUND SX7 B4 LE B4,B7,FSL1 IF NOT AT END OF LINE EQ FSLX RETURN FSL2 SB2 B2+B1 INCREMENT COUNT OF CHARACTERS FOUND NE B2,B3,FSL1 IF MORE CHARACTERS TO MATCH SX4 B4-B3 EQ FSLX RETURN - MATCH SUCCESSFUL ICE SPACE 4,10 ** ICE - INDEXED CODE EXECUTION. * * ENTRY (B7) = SUBROUTINE ADDRESS. * * EXIT TO SUBROUTINE WITH RETURN ADDRESS SET. * * USES X - 2, 7. * A - 2, 7. ICE SUBR ENTRY/ EXIT SA2 ICEX SET RETURN ADDRESS BX7 X2 SA7 B7 JP B7+1 JUMP TO SUBROUTINE MLT SPACE 4,20 ** MLT - MANAGE LINE NUMBER TABLE. * * ENTRY (FLAGS) = FLAGS FOR *LNT* ENTRY. * (OBLN) = OLD BINARY LINE NUMBER. * (NBLN) = NEW BINARY LINE NUMBER. * * EXIT AN ENTRY IS MADE TO THE LINE NUMBER TABLE. * IF *LNT* BUFFER IS FULL, THE *LNT* IS FLUSHED TO * *ZZZZZG2* AND *NMLS* IS RESET TO ZERO BEFORE ADDING * THE NEW ENTRY. * * USES X - 1, 2, 3, 5, 7. * A - 1, 2, 3, 5, 7. * B - 2. * * CALLS ABS, SFI. * * MACROS WRITEW. MLT SUBR ENTRY/EXIT SA1 NMLS SA3 L.LNTBUF SX1 X1+B1 IX3 X3-X1 PL X3,MLT2 IF BUFFER NOT FULL SA1 LNTBUF SX2 LNTINC RJ ABS TRY TO ALLOCATE MORE SPACE NZ X6,MLT1 IF NOT ENOUGH SPACE LEFT RJ SFI UPDATE FET POINTERS FOR ALLOCATED BUFFER EQ MLT2 PROCESS *LNT* MLT1 SX7 B1+ SA7 LTFILE SX2 LNT1 SA1 F.LNTBUF SA3 NMLS WRITEW X2,X1,X3 WRITE *LNT* OUT TO FILE SX7 B0+ SA7 NMLS MLT2 SA3 NBLN NEW BINARY LINE NUMBER SB2 59-17 ALIGN NEW LINE NUMBER SA1 NMLS NUMBER OF LINES SELECTED SA2 OBLN LX7 X3,B2 LX2 41-17 ALIGN OLD LINE NUMBER BX7 X7+X2 SA5 FLAGS BX7 X5+X7 SA5 F.LNTBUF IX5 X5+X1 SA7 X5+ SX7 X1+1 UPDATE NUMBER OF LINES SELECTED SA7 NMLS EQ MLTX RETURN PLO SPACE 4,25 ** PLO - PROCESS LINE OVERLAP. * * ENTRY SEE EXIT CONDITIONS FOR *RLN*. * * EXIT (LBFILE) = 0, ALL SELECTED AND OVERLAPPED LINES ARE * RESEQUENCED AND IN *EFBUF*. * 1, ALL SELECTED AND OVERLAPPED LINES ARE * RESEQUENCED AND WRITTEN TO *ZZZZZG1*. * (LTFILE) = 0, ALL *LNT* ENTRIES ARE IN *LNTBUF*, IF * ANY EXIST. * 1, ALL *LNT* ENTRIES ARE WRITTEN TO FILE * *ZZZZZG2*. * (SCRFIL) = 0, NO LINES HAVE BEEN DELETED FROM THEIR * ORIGINAL POSITIONS. * 1, THE LINE NUMBERS OF LINES TO BE DELETED * FROM THEIR ORIGINAL POSITIONS ARE * WRITTEN TO FILE *ZZZZZG6*. * * USES X - 0, 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * B - 2, 3, 4, 5, 6. * * CALLS CDD, CLN, MLB, RLN, SLN, SNM, USB. * * MACROS READ, READC, READEI, READO, REWIND, SKIPEI, WRITEC, * WRITER, WRITEW. PLO SUBR ENTRY/EXIT SA3 INCR SA2 NBLN SA1 FNAI BX6 X2 IX2 X2-X1 SA6 PLOA SET BOUNDARY FOR OVERLAP CHECKING NG X2,PLO16 IF NO LINE OVERLAP RJ CDD MX2 B2 BX1 X2*X4 SB2 1RQ SB5 PLOD RJ SNM SET NAME IN MESSAGE * QUERY USER WITH REGARD TO STOPPING. WRITEC O,PLOD PLO1 WRITEC O,PLOE READ I READ IN REPLY READC I,PCKDBF,MXWL+1 READ REPLY INTO BUFFER NZ X1,PLO1 IF UNEXPECTED RESPONSE SA2 CSTI SB2 PCKDBF SB6 MXCIL+1 SB3 X2 RJ USB UNPACK REPLY, ONE CHARACTER PER WORD SB4 B7-B6 SA2 BLNK PLO2 SA3 B4+CLIN GET NEXT CHARACTER BX3 X3-X2 NZ X3,PLO3 IF CHARACTER NOT A BLANK SB4 B4-1 PL B4,PLO2 IF MORE CHARACTERS TO CHECK PLO3 NZ B4,PLO1 IF MORE THAN ONE CHARACTER SA5 CLIN SA1 CSTI GET THE CHARACTER SET SA2 X1+PLOB+1 CHECK FOR *Y* SX3 X2 BX3 X3-X5 ZR X3,PLO5 IF UPPER CASE *Y* AX2 18 BX3 X2-X5 ZR X3,PLO5 IF LOWER CASE *Y* SA2 X1+PLOC+1 CHECK FOR *N* SX3 X2 BX3 X3-X5 ZR X3,PLO4 IF UPPER CASE *N* AX2 18 BX3 X2-X5 NZ X3,PLO1 IF NOT LOWER CASE *N* PLO4 SX5 ERRCNP *COMMAND NOT PROCESSED DUE TO OVERLAP.* EQ ERR TERMINATE IEDIT PROCESSING PLO5 SX6 B1+ SA6 OVLPFG WRITER E,R FLUSH *EFBUF* TO *ZZZZZG1* SX6 B0+ SA6 LBFILE SX2 L SA5 TSF+0 RJ SLN PUT *ZZZZZG0* IN LINE BUFFER FET REWIND X2 SA5 EFN SET EDIT FILE NAME SX2 E RJ SLN REWIND X2,R READEI X2 PLO6 READC E,PCKDBF,MXWL+1 SET LINE INTO BUFFER NZ X1,PLO10 IF EOI ENCOUNTERED BX6 X4 EQ PLO8 CHECK FOR END OF LINE PLO7 READO X2 PLO8 MX0 -12 BX6 -X0*X6 NZ X6,PLO7 IF NOT END OF LINE SA5 PCKDBF RJ CLN EVALUATE THE LINE NUMBER SA2 FNAI IX2 X6-X2 NG X2,PLO6 IF NOT POSITIONED AT OVERLAP POINT SA1 FNUM SX1 X1-FNMO NZ X1,PLO9 IF NOT A *MOVE* FUNCTION NZ X4,PLO6 IF LINE IS TO BE DELETED PLO9 SA1 PLOA IX2 X1-X6 NG X2,PLO10 IF NO MORE OVERLAP SA2 INCR IX6 X1+X2 SA6 PLOA UPDATE OVERLAP BOUNDARY SX2 PCKDBF SB3 L RJ MLB INSTALL OVERLAP LINE INTO BUFFER EQ PLO6 GET NEXT LINE PLO10 SKIPEI E SA1 LBFILE ZR X1,PLO11 IF LINE BUFFER NOT ON FILE WRITER L REWIND X2 PLO11 SX7 B1+ RJ RLN REPLACE OVERLAPPED LINE NUMBERS SX7 B1+ SA7 LBFILE PLO12 WRITER E,R WRITE LINES TO *ZZZZZG1* PLO13 SA1 SCRFIL ZR X1,PLO14 IF NO LINES DELETED FROM ORIGINAL POSITION WRITER SCR1,R WRITE DELETED LINES TO *ZZZZZG6* * FLUSH TRUNCATED LINES IF NECESSARY PLO14 SA3 TRNCFET CHECK FET STATUS MX2 -18 BX3 -X2*X3 SX2 A3+ SX3 X3-3 ZR X3,PLO15 IF BUFFER NEVER WRITTEN TO DISK WRITER X2 PLO15 SA1 BOP ZR X1,PLOX IF NO *LNT* WAS GENERATED SA1 LTFILE ZR X1,PLOX IF *LNT* ENTIRELY IN BUFFER SX2 LNT1 SA1 F.LNTBUF SA3 NMLS WRITEW X2,X1,X3 WRITE REMAINDER OF *LNT* TO DISK WRITER X2,R EQ PLOX RETURN PLO16 SA1 LBFILE ZR X1,PLO13 IF NO NEED TO WRITE OUT SELECTED LINES EQ PLO12 WRITE LINES TO *ZZZZZG1* PLOA CON 0 LINE WITH WHICH RESEQUENCING BEGINS PLOB BSS 0 TABLE OF *YES* RESPONSES VFD 24/0,18/7631B,18/1RY *ASCII* VFD 24/0,18/1RY,18/1RY *NORMAL* VFD 24/0,18/171B,18/131B *ASCII8* PLOC BSS 0 TABLE OF *NO* RESPONSES VFD 24/0,18/7616B,18/1RN *ASCII* VFD 24/0,18/1RN,18/1RN *NORMAL* VFD 24/0,18/156B,18/116B *ASCII8 PLOD BSS 0 DATA C*INSERT LINES OVERLAP EXISTING LINES, AT QQQQQ.* PLOE DATA C*ENTER Y TO CONTINUE OR N TO STOP* PWN SPACE 4,20 ** PWN - PROCESS *WRITEN*. * * *PWN* PACKS THE LINE IN THE STRING BUFFER INTO *PCKDBF* * AFTER STRIPPING OFF THE LINE NUMBER. IF THE FORTRAN * OPTION IS NOT SELECTED, A BLANK IS ALSO STRIPPED OFF. * * ENTRY CLIN = ADDRESS OF UNPACKED LINE. * (FOP) = FORTRAN OPTION. * (X1) = NUMBER OF LINE NUMBER DIGITS. * * EXIT PCKDBF CONTAINS SHIFTED, PACKED LINE. * * USES X - 1, 2, 3. * A - 1, 2, 3. * B - 2, 4. * * CALLS PLB. PWN SUBR ENTRY/EXIT SA3 FOP NZ X3,PWN1 IF FORTRAN SUBSYSTEM SA3 NCOL IX3 X3-X1 ZR X3,PWN1 IF LINE CONSISTS OF A LINE NUMBER ONLY SA3 X1+CLIN SA2 BLNK BX2 X2-X3 NZ X2,PWN1 IF NOT BLANK SX1 X1+B1 INCREMENT STRIPOFF COUNT PWN1 SA3 NCOL SA2 X1+CLIN FIRST USABLE CHARACTER SB2 60 PACK LINE INTO BUFFER IX3 X3-X1 SB4 X3 SA1 PCKDBF RJ PLB EQ PWNX RETURN RLN SPACE 4,25 ** RLN - REPLACE LINE NUMBER. * * ENTRY (X7) = 0, IF USER SELECTED LINES TO BE RENUMBERED. * .NE. 0, IF OVERLAPPED LINES TO BE RENUMBERED. * (LBFILE) = 0, ALL LINES TO BE RESEQUENCED ARE IN * *LNBUF*. * 1, LINES TO BE RESEQUENCED MUST BE READ * FROM THE FILE POINTED TO BY FET *L* * (*ZZZZZG0* OR THE *READ* FILE). * EXIT (LBFILE) = 0, ALL RESEQUENCED LINES ARE IN *EFBUF*. * 1, AT LEAST SOME OF THE RESEQUENCED LINES * HAVE BEEN WRITTEN TO FILE *ZZZZZG1* * USING FET *E*. * (LTFILE) = 0, ALL *LNT* ENTRIES ARE IN *LNTBUF, IF * ANY EXIST. * 1, AT LEAST SOME OF THE *LNT* ENTRIES HAVE * BEEN WRITTEN TO FILE *ZZZZZG2* USING * FET *LNT1*. * (SCRFIL) = 0, NO LINES HAVE BEEN DELETED FROM THEIR * ORIGINAL POSITIONS. * 1, THE LINE NUMBERS OF LINES TO BE DELETED * FROM THEIR ORIGINAL POSITIONS HAVE BEEN * WRITTEN INTO *SCRBB* USING FET *SCR1*. * SOME OF THE ENTRIES MAY HAVE BEEN * FLUSHED TO FILE *ZZZZZG6*. * * USES X - ALL. * A - 1, 2, 3, 4, 5, 6, 7. * B - 2, 3, 4, 5, 6. * * CALLS ABL, CNL, MLB, MLT, SBE, SLN, USB, VPL, WTL. * * MACROS MOVE, READC, READEI, READO, WRITEO. RLN SUBR ENTRY/EXIT SA7 RLNA SX6 B0+ SA6 RLNB INITIALIZE NUMBER OF CHAR TO MOVE SA5 TSF+1 SX2 E RJ SLN SX5 B0+ RJ SBE SET *EFBUF* TO EMPTY SA3 LBFILE NZ X3,RLN1 IF LINE BUFFER ON FILE SA5 L SET EOI STATUS INTO FET SX6 741031B MX4 42 BX6 -X4*X6 BX5 X4*X5 BX6 X5+X6 SA6 A5+ EQ RLN2 DO NOT READ FILE RLN1 READEI L SX6 B0+ SA6 LBFILE RESET *LBFILE* TO ZERO RLN2 SX2 L SX6 B0+ SA6 FLAGS SA6 TRNC READC X2,PCKDBF,MXWL+1 NZ X1,RLN21 IF EOI ENCOUNTERED BX6 X4 RLN3 MX0 -12 BX6 -X0*X6 ZR X6,RLN4 IF EOL ENCOUNTERED READO X2 EQ RLN3 CHECK FOR END OF LINE * GET THE LINE NUMBER. RLN4 SA5 PCKDBF RJ VPL EVALUATE THE PACKED LINE NUMBER SA6 OBLN SA7 RLNC ZR X3,RLN2 IF A DELETED LINE FOUND ON THE *READ* FILE * IF THE FIRST LINE IN THE FILE, THEN CHECK FOR A * LINE NUMBER. SA2 RLNB NZ X2,RLN7 IF NOT THE FIRST LINE IN THE FILE SA3 RLNA ZR X3,RLN5 IF NOT OVERLAPPED LINES SA6 OLLE STORE LOWER BOUNDARY FOR OVERLAPPED LINES RLN5 BX3 X7 MX7 1 NZ X3,RLN6 IF LINE NUMBER PRESENT SX6 B1+ SET UNNUMBERED *READ* FILE FLAG SA6 UNRF SX7 NUMD SA2 FOP SX7 X7+CLIN NZ X2,RLN6 IF FORTRAN SUBSYSTEM SX7 X7+1 RLN6 SA7 RLNB * UNPACK THE LINE AND SET THE TRUNCATE BIT IF NECESSARY. RLN7 SB2 PCKDBF SA2 CSTI SB6 MXCIL+1 SB3 X2+ RJ USB UNPACK LINE INTO STRING BUFFER SB4 B7-B6 SB4 B4+B1 * FIND THE LAST NON-BLANK CHARACTER. SB2 MXCIL SA4 BLNK GE B2,B4,RLN8 IF LINE NOT TOO LONG SB4 MXCIL SX7 B1 SA7 TRNC FLAG LINE AS TRUNCATED EQ RLN9 SET NUMBER OF CHARACTERS IN LINE RLN8 SA3 B4+CLIN-1 BX3 X3-X4 NZ X3,RLN9 IF CHARACTER NOT A BLANK SB4 B4-1 EQ RLN8 CHECK THE NEXT CHARACTER RLN9 SX7 B4+ SA7 NCOL * IF FUNCTION IS A *MOVE* COMMAND OR THE LINE IS AN OVERLAP * LINE, THEN INSTALL THE DELETED LINE NUMBER IN (SCR1). SA3 RLNA SA1 FNUM SX2 X1-FNMO NZ X3,RLN10 IF AN OVERLAPPED LINE NZ X2,RLN11 IF NOT A *MOVE* COMMAND RLN10 SA1 PCKDBF SA2 RLNC SX6 6 CALCULATE MASK SIZE IX2 X2*X6 SB4 X2 MX2 B4 FORM MASK INTO (X2) BX6 X2*X1 WRITEO SCR1 WRITE LINE NUMBER TO SCRATCH FILE SX6 B1+ SA6 SCRFIL * GET NEW LINE NUMBER FOR LINE AND CHECK IF NEW LINE * NUMBER VALUE WOULD BE TOO LARGE. RLN11 SA1 LSRA SET VALUE (BINARY) OF NEW LINE NUMBER SA2 INCR IX7 X1+X2 INCREMENT FOR NEXT LINE NUMBER SX4 MXLN+1 SA7 A1 IX7 X1-X4 COMPARE WITH LARGEST POSSIBLE NUMBER SX5 ERRNTL *LINE NUMBER LIMIT EXCEEDED.* PL X7,ERR IF NUMBER TOO LARGE, ISSUE ERROR MESSAGE SX7 X1+ SA7 NBLN * CONVERT NEW LINE NUMBER TO DISPLAY CODE. RJ CNL CONVERT AND NORMALIZE LINE NUMBER SA6 RLND SAVE LINE NUMBER * MOVE LINE OVER IF NECESSARY. SX2 CLIN SA3 RLNB PL X3,RLN12 IF NO LINE NUMBERS ON LINES SA1 NCOL SA2 RLNC NUMBER OF CHARACTERS IN OLD LINE NUMBER SX5 ERRNLN *NO LINE NUMBER ON LINE.* ZR X2,ERR IF NO LINE NUMBER PRESENT SX3 NUMD+CLIN SX2 X2+CLIN RLN12 IX1 X3-X2 ZR X1,RLN14 IF LINE NUMBERS ARE THE SAME LENGTH SA4 NCOL SB3 MXCIL+1 IX7 X4+X1 SB2 X7 GT B3,B2,RLN13 IF LINE WILL NOT BE TRUNCATED SX6 B1+ SA6 TRNC SX7 MXCIL RLN13 SA7 NCOL UPDATE LENGTH OF MOVED LINE SX7 X7+CLIN COMPUTE STRING LENGTH TO MOVE IX1 X7-X3 ZR X1,RLN14 IF NO CHARACTERS TO MOVE MOVE X1,X2,X3 MOVE LINE OVER * REPLACE LINE NUMBER ON LINE WITH NEW NUMBER. RLN14 SA1 RLND SA2 CSTI MX0 -NBIC SB4 B0 SB5 30 SB2 X2+ SB3 B0+ RLN15 SB4 B4+6 LX6 X1,B4 BX6 -X0*X6 LE B2,RLN16 IF NOT *ASCII8* CHARACTER SET SX6 X6+25B CONVERT CHARACTER TO *ASCII8* RLN16 SA6 CLIN+B3 SB3 B3+1 NE B4,B5,RLN15 IF NOT THROUGH INSERTING LINE NUMBER SA4 BLNK SA2 FOP SA1 RLNB NZ X2,RLN17 IF BLANK NOT TO FOLLOW LINE NUMBER NG X1,RLN17 IF REPLACING EXISTING LINE NUMBER SX7 X4+ SA7 B3+CLIN * ADD PROPER NUMBER OF TRAILING BLANKS TO LINE AND * INSTALL LINE WITH NEW LINE NUMBER INTO *EFBUF*. RLN17 SX2 NUMD RJ ABL SB3 E MX2 1 LINE IS IN CHARACTER BUFFER RJ MLB PUT LINE INTO *EFBUF* SA2 TRNC ZR X2,RLN18 IF LINE WAS NOT TRUNCATED SA1 NBLN RJ WTL WRITE TRUNCATED LINE NUMBER RLN18 SA2 RLNA ZR X2,RLN20 IF NOT AN OVERLAP LINE SA2 FLAGS SX1 B1+ LX1 FOVL-0 BX6 X1+X2 SA6 A2+ SET OVERLAP BIT RLN19 SA2 BOP ZR X2,RLN2 IF *LNT* NOT NEEDED RJ MLT BUILD *LNT* ENTRY EQ RLN2 PROCESS NEXT LINE RLN20 SA1 NNOL SX6 X1+B1 SA6 A1 INCREMENT NUMBER OF NON-OVERLAPPED LINES SA1 FNUM SX1 X1-FNRE NZ X1,RLN19 IF NOT A *READ* FUNCTION SA1 RLNB NG X1,RLN19 IF *READ* FILE HAD LINE NUMBERS EQ RLN2 PROCESS NEXT LINE RLN21 SA1 RLNA ZR X1,RLNX IF NOT PROCESSING OVERLAPPED LINES SA1 OBLN SA2 OLLE LX1 18 MX3 1 BX6 X1+X2 ADD UPPER BOUNDARY FOR OVERLAPPED LINES BX6 X3+X6 SET END OF LINE RANGE TABLE SA6 A2 EQ RLNX RETURN RLNA CON 0 OVERLAP PARAMETER RLNB CON 0 NUMBER OF CHARACTERS TO MOVE LINES OVER RLNC CON 0 NUMBER OF CHAR IN ORIGINAL LINE NUMBER RLND CON 0 NEW LINE NUMBER IN DISPLAY CODE SLF SPACE 4,25 ** SLF - SELECT LINES FROM FILE. * * *SLF* SELECTS ALL LINES FROM THE EDIT FILE WHICH * SATISFY THE USER SPECIFIED CRITERIA. * * ENTRY E = FET POINTING TO THE EDIT FILE. * (LNIA) = LINE NUMBER SPECIFIED BY THE USER AFTER * WHICH SELECTED LINES ARE TO BE INSERTED. * * EXIT (LBFILE) = 0, ALL SELECTED LINES ARE IN *LNBUF*. * 1, ALL SELECTED LINES HAVE BEEN WRITTEN TO * FILE *ZZZZZG0* USING FET *L*. THE FILE * IS LEFT REWOUND. * (FNAI) = FIRST LINE NUMBER FOLLOWING USER SPECIFIED * INSERT POINT. * (LSRA) = LINE NUMBER TO BE ASSIGNED TO THE * FIRST INSERTED LINE. * * USES X - 0, 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * B - 2, 3, 5, 7. * * CALLS CLN, MLB, SBE, SSF. * * MACROS READEI, READC, READO, REWIND, WRITER. SLF SUBR ENTRY/EXIT SLF1 READEI E * THIS MARKS THE BEGINNING OF THE MAIN LOOP. * CLEAR ALL FLAGS AND READ A LINE INTO THE WORKING BUFFER. SLF2 READC E,PCKDBF,MXWL+1 NZ X1,SLF8 IF EOI ENCOUNTERED BX6 X4 SLF3 MX0 -12 BX6 -X0*X6 ZR X6,SLF4 IF END OF LINE ENCOUNTERED READO X2 EQ SLF3 CHECK FOR END OF LINE * CRACK THE LINE NUMBER AND STORE ITS VALUE AND LENGTH. SLF4 SA5 PCKDBF RJ CLN SA2 OBLN IX2 X2-X6 PL X2,SLF9 IF NUMBER .LT. PREVIOUS LINE NUMBER ZR X3,SLF9 IF LINE A NUMBER ONLY SA6 OBLN SA6 NBLN SA1 FNUM SX2 X1-FNMO NZ X2,SLF5 IF A *READ* OR *DUP* FUNCTION NZ X4,SLF7 IF LINE SELECTED BY *MOVE* COMMAND * IF NECESSARY, UPDATE THE LAST LINE NUMBER IN THE FILE. SLF5 SA5 LNIA SX2 X5-MXLN-1 NG X2,SLF6 IF USER SPECIFIED A LINE NUMBER SA6 SLFB EQ SLF7 CHECK IF LINE IS SELECTED * IF NECESSARY, UPDATE THE FIRST LINE NUMBER AFTER * THE INSERT POINT. SLF6 SA3 FNAI SB3 X6+ SB5 X5 GET LINE NUMBER TO INSERT AFTER SB7 X3 GET FIRST LINE NUMBER AFTER INSERT POINT GE B5,B3,SLF7 IF CURRENT LINE BEFORE INSERT POINT LT B7,B3,SLF7 IF CURRENT LINE BEYOND INSERT POINT SA6 FNAI * IF LINE IS SELECTED BASED UPON ITS LINE NUMBER, * PUT THE LINE IN *LNBUF*. SLF7 SA1 FNUM SX1 X1-FNRE ZR X1,SLF2 IF *READ*, PROCESS NEXT LINE ZR X4,SLF2 IF LINE NOT SELECTED SX7 B1+ SA7 SLFA A LINE WAS FOUND SX2 PCKDBF SB3 L RJ MLB ADD LINE TO LINE BUFFER EQ SLF2 PROCESS THE NEXT LINE * FINISH UP AFTER SCAN OF EDIT FILE IS COMPLETED. SLF8 SA1 FNUM SX1 X1-FNRE ZR X1,SLF10 IF A *READ* FUNCTION SA1 SLFA NZ X1,SLF10 IF AT LEAST ONE LINE SELECTED SX5 ERRNLF *NO LINES FOUND.* EQ ERR NO LINES FOUND * SORT EDIT FILE WHEN NECESSARY. SLF9 SX2 L SA5 LBFILE RJ SBE SX6 B0+ SA6 LBFILE SA6 SLFA SX7 -1 SA7 SLFB SA7 OBLN SX6 MXLN+1 SA6 FNAI SB2 E RJ SSF SORT THE EDIT FILE EQ SLF1 BEGIN SELECTION PHASE AGAIN * IF NECESSARY, UPDATE THE LINE NUMBER TO INSERT AFTER. * DETERMINE THE LINE NUMBER TO START RESEQUENCING AT. SLF10 SA1 LNIA SX2 X1-MXLN-1 NZ X2,SLF11 IF INSERT POINT WAS SPECIFIED BY USER SA1 SLFB SX7 X1+ SA7 LNIA SLF11 SA2 INCR IX7 X1+X2 SA7 LSRA SA1 LBFILE ZR X1,SLFX IF LINE BUFFER NOT WRITTEN TO FILE WRITER L WRITE REST OF *LBUF* OUT TO FILE REWIND X2 EQ SLFX RETURN SLFA CON 0 LINES SELECTED FLAG SLFB CON -1 LARGEST LINE NUMBER IN THE FILE SLE SPACE 4,15 ** SLE - SORT *LNT* ENTRIES. * * ENTRY (X1) = NUMBER OF ENTRIES TO SORT. * (B7) = FWA OF *LNT* * * EXIT *LNT* SORTED. * * USES X - 0, 1, 2, 3, 4, 6. * A - 1, 2, 6. * B - 5, 6. SLE SUBR ENTRY/EXIT MX0 18 LX0 -18 SB5 X1+B7 LWA+1 SB6 X1 LE B6,B1,SLEX IF NOT AT LEAST TWO ENTRIES SA2 B7+ GET FIRST ENTRY SA1 A2+B1 GET SECOND ENTRY BX3 X0*X1 SLE1 BX4 X0*X2 IX4 X3-X4 PL X4,SLE2 IF PROPER INSERT POINT FOUND BX6 X2 SA6 A2+1 SA2 A2-B1 SB6 A2-B7 PL B6,SLE1 IF MORE ENTRIES TO CHECK SLE2 BX6 X1 SA6 A2+B1 PLACE ENTRY IN ITS PROPER SLOT SA1 A1+B1 BX3 X0*X1 SA2 A1-B1 SB6 A1-B5 NG B6,SLE1 IF MORE ENTRIES TO SORT EQ SLEX EXIT SLT SPACE 4,20 ** SLT - SORT LINE NUMBER TABLE. * * *SLT* SORTS THE *LNT* INTO ASCENDING ORDER * BASED UPON THE OLD LINE NUMBER FIELD. * * ENTRY (LTFILE) = 0, IF *LNT* IS NOT WRITTEN TO DISK. * 1, IF *LNT* IS WRITTEN TO DISK. * * EXIT *LNT* IS SORTED. * * USES X - 1, 2, 5. * A - 1, 2, 5. * B - 7. * * CALLS SBE, SLE, SLN, SMT. * * MACROS READEI, RENAME, REWIND. SLT1 SA5 TSF+2 PUT *ZZZZZG2* INTO FET *L* SX2 L RJ SLN RENAME X2,TSF+4 RENAME *ZZZZZG2* TO *ZZZZZG4* REWIND X2,R SLT2 READEI X2 READ A SEGMENT INTO *LNBUF* SA2 X2+B1 SX2 X2 SA1 A2+B1 GET *IN* IX1 X1-X2 RJ SMT MERGE SEGMENT WITH NEW *LNT* FILE SX2 L SX5 B0+ RJ SBE SA1 X2 LX1 59-9 PL X1,SLT2 IF MORE ENTRIES TO PROCESS SA5 TSF+0 RJ SLN RESTORE *ZZZZZG0* INTO FET *L* SLT SUBR ENTRY/EXIT SA1 LTFILE NZ X1,SLT1 IF *LNT* WRITTEN TO MASS STORAGE SA2 F.LNTBUF SA1 NMLS SB7 X2+ RJ SLE SORT *LNT* EQ SLTX RETURN SMT SPACE 4,25 ** SMT - SORT AND MERGE LINE NUMBER TABLE. * * WHEN THE LINE NUMBER TABLE BECOMES FULL, IT IS * SORTED AND MERGED WITH THE LINE NUMBER TABLE SCRATCH * FILE. * * ENTRY (X1) = NUMBER OF ENTRIES IN TABLE. * (X2) = FWA OF TABLE TO BE SORT/MERGED. * (LTFET) = FET ADDRESS OF SORT/MERGED *LNT* FILE. * (LT2FET) = FET ADDRESS OF SCRATCH FILE. * * EXIT (LTFET) = FET ADDRESS OF SORTED *LNT* FILE. * (LT2FET) = FET ADDRESS OF SCRATCH FILE. * * USES X - ALL. * A - 1, 2, 4, 5, 6, 7. * B - 6, 7. * * CALLS SLE. * * MACROS READEI, READO, REWIND, WRITEO, WRITER. SMT SUBR ENTRY/EXIT ZR X1,SMTX IF NO ENTRIES IN TABLE SX6 X2 SX7 X1 SA6 SMTA STORE FWA OF TABLE SA7 SMTB STORE NUMBER OF TABLE ENTRIES SA2 LT2FET REWIND X2,R SA2 LTFET REWIND X2,R READEI X2 PREPARE THE TWO FILES SA2 SMTA SA1 SMTB SB7 X2 FWA OF TABLE IX6 X1+X2 SA6 SMTB LWA+1 OF TABLE RJ SLE SORT THE *LNT* MX0 18 LX0 -18 SA1 SMTA SA5 X1 GET THE FIRST TABLE ENTRY SA2 LTFET READO X2 NZ X1,SMT4 IF NO ENTRIES ON THE FILE SMT1 BX3 X0*X5 BX4 X0*X6 IX3 X3-X4 COMPARE THE TWO ENTRIES PL X3,SMT3 IF TABLE ENTRY .GE. THAN FILE ENTRY BX5 X5-X6 BX6 X5-X6 BX5 X5-X6 REVERSE X5 AND X6 SA2 LT2FET WRITEO X2 WRITE TABLE ENTRY TO NEW FILE BX6 X5 SA5 A5+B1 GET NEXT TABLE ENTRY SA4 SMTB SB6 A5 SB7 X4 GT B7,B6,SMT1 IF A VALID TABLE ENTRY SMT2 SA2 LT2FET EMPTY *LNT* FILE TO NEW FILE WRITEO X2 SA2 LTFET READO X2 ZR X1,SMT2 IF ENTRIES REMAINING ON FILE EQ SMT5 FINISH THE SORT SMT3 SA2 LT2FET WRITE FILE ENTRY TO NEW FILE WRITEO X2 SA2 LTFET READO X2 ZR X1,SMT1 IF MORE ENTRIES ON FILE SMT4 BX6 X5 EMPTY THE LINE NUMBER TABLE TO FILE SA2 LT2FET WRITEO X2 WRITE TABLE ENTRY TO FILE SA5 A5+B1 SA4 SMTB SB6 A5 SB7 X4 GT B7,B6,SMT4 IF ENTRIES REMAINING IN TABLE SMT5 SA2 LT2FET WRITER X2 FLUSH BUFFER TO FILE SA1 LTFET SA2 LT2FET BX6 X1 BX7 X2 SA6 A2 SA7 A1 SWITCH (LTFET) AND (LT2FET) EQ SMTX RETURN SMTA CON 0 FWA OF TABLE SMTB CON 0 LWA OF TABLE TITLE MEMORY ALLOCATION. SPACE 4,10 MEM EQU * MANAGED TABLES START ADDRESS TITLE PRESET. PRS SPACE 4,55 ** PRS - PRESET ARGUMENT PROCESSING. * * *PRS* ANALYZES THE COMMAND AND COMMAND LINE BUFFER. THE * FOLLOWING INFORMATION IS EXTRACTED AND STORED. * 1. FILE NAME IN EFN (FOR EDIT FILE NAME) * 2. FLAGS DENOTING OPTIONS SPECIFIED * 3. CHARACTER SET TYPE SPECIFIED * 4. INFORMATION EXTRACTED FROM COMMAND LINE BUFFER * * CELLS FOR THE SPECIFIED OPTIONS ARE SET OR LEFT ZERO * DEPENDING ON THEIR PRESENCES OR ABSENCE, RESPECTIVELY * IN *COPT*. THESE FLAGS ARE SET IN THE FOLLOWING * LOCATIONS - * BOP = FOR B OPTION (BASIC SUB-SYSTEM) * LOP = FOR L OPTION (LIST OPTION) * FOP = FOR F OPTION (FORTRAN SUB-SYSTEM) * * AFTER THE BREAKING UP AND STORING OF THE COMMAND, *FVT* IS * EXECUTED TO FIND VERB IN TABLE (I.E. MATCH THE VERB IN THE * COMMAND LINE TO A VERB IN THE TABLE OF DEFINED VERBS (TDVB)). * WHEN A MATCH IS FOUND, *PVA* IS CALLED TO PROCESS THE VERB * ARGUMENTS. THIS ROUTINE EXECUTES THE ROUTINES ASSOCIATED * -VIA TDVB- WITH THE VERB. * * ENTRY COMMAND STARTING IN RA+2 IN NORMAL DISPLAY CODE, IN * STANDARD SYSTEM FORMAT. * (CLB=) = FWA OF FET FOR COMMAND TO BE PROCESSED * BY IEDIT. * (I) = FWA OF FET FOR INPUT FILE * (WHICH CONTAINS THE FILE TO EDIT). * * EXIT *IEDIT* COMMAND ANALYZED, INFORMATION EXTRACTED * AND STORED. * COMMAND LINE BUFFER INFORMATION EXTRACTED AND * STORED IN APPROPRIATE CELLS AND TABLES. * FUNCTION TO BE PERFORMED ESTABLISHED * (FUNCTION NUMBER RETURNED IN FNUM). * TO ERR - IF A FATAL ERROR CONDITION IS DETECTED. * * USES X - ALL. * A - 1, 2, 3, 4, 5, 6, 7. * B - 1, 2, 3, 4, 5, 6, 7. * * CALLS ARG, FVT, PVA, SST, USB. * * MACROS FILINFO, MEMORY, MESSAGE, READ, REPRIEVE, SETLOF. PRS SUBR ENTRY/EXIT MX6 1 SA2 O+1 SET *FLUSH* BIT LX6 36-59 SB1 1 BX6 X6+X2 SA6 A2 SETLOF LOFPRM SA1 ACTR SET UP FOR CALL TO *ARG* SA4 ARGR SB5 PRSA SB4 X1 RJ ARG PROCESS ARGUMENTS SX5 ERRCSE *COMMAND ARGUMENT ERROR.* NZ X1,ERR IF ARGUMENT ERROR SA1 COPT PROCESS *OP* LIST ZR X1,PRS5 IF NO OPTIONS SPECIFIED MX0 60-18 CHECK FOR INCORRECT *OP=* BX7 X1*X0 ERROR IF 60-18 ALL ZEROES SX5 ERRCSE *COMMAND ARGUMENT ERROR.* ZR X7,ERR IF INCORRECT *OP=* PASSED * PROCESS *OP* PARAMETER CHECKING FOR VALIDITY. SX7 B1 SET FOR USE AS FLAG MX0 6 MASK FOR OPTION PRS1 BX2 X0*X1 LX2 5-59 RIGHT JUSTIFY OPTION ZR X2,PRS5 IF DONE CRACKING *OP* SB5 X2+ SET CURRENT *OP* BEING COMPARED SB2 1RB EQ B2,B5,PRS2 IF *B* PARAMETER SET SB2 1RL EQ B2,B5,PRS3 IF *L* PARAMETER SET SB2 1RF EQ B2,B5,PRS4 IF *F* PARAMETER SET SX5 ERRCSE *COMMAND ARGUMENT ERROR.* EQ ERR *INCORRECT *OP* SPECIFIED* PRS2 SA7 BOP SET FOR *B* OPTION LX1 6 LINE UP LIST TO GET NEXT *OP* EQ PRS1 PROCESS NEXT *OP* PRS3 SA7 LOP SET FOR *L* OPTION SA7 LSTFIL LX1 6 LINE UP LIST TO GET NEXT *OP* EQ PRS1 PROCESS NEXT *OP* PRS4 SA7 FOP SET *F* OPTION SELECTED LX1 6 EQ PRS1 PROCESS NEXT *OP* PRS SPACE 2,5 * VALIDATE AND SET CHARACTER SET TYPE * CSTI = -1 FOR ASCII 6/12 * = 0 FOR NORMAL * = 1 FOR ASCII8 PRS5 SA2 CSCS SX7 6 SA1 PRSC BX6 X2-X1 SX7 1R ZR X6,PRS6 IF NORMAL CHARACTER SET SA1 PRSD SX6 -B1 BX5 X2-X1 ZR X5,PRS6 IF ASCII 6/12 SX7 40B SX6 1 CHARACTER SET MUST BE ASCII8 SA1 PRSE BX5 X2-X1 ZR X5,PRS6 IF ASCII8 SX5 ERRCSE *COMMAND ARGUMENT ERROR.* EQ ERR CHARACTER SET ERROR PRS6 SA6 CSTI SAVE CHARACTER SET TYPE INDICATOR SA7 BLNK REPRIEVE RPB,SET,200B SET *REPRIEVE* PROCESSING MESSAGE =0,1,R CLEAR COMMAND FROM *MS1W* SA1 C+2 *IN* ADDRESS OF BUFFER SA2 A1+B1 ADDRESS OF FIRST WORD OF BUFFER IX3 X1-X2 NZ X3,PRS7 IF COMMAND TO PROCESS SX5 ERRNIV *NON-EXISTANT EDIT VERB SPECIFIED.* EQ ERR PROCESS ERROR PRS7 SA1 CSTI SB2 X2 SB3 X1 SB6 MXCIL RJ USB SA3 USBC SA3 X3 PRS8 SX3 X3-1R NZ X3,PRS9 IF NOT BLANK CHARACTER SA3 A3-B1 EQ PRS8 GET NEXT CHARACTER PRS9 SX7 A3 SA7 USBC SA3 CLIN-1 RJ FVT FIND VERB IN TABLE RJ PVA PROCESS VERB ARGUMENTS SA1 NELR ZR X1,PRS13 IF NO ENTRIES SB7 LRT SB6 X1+ RJ SST= SORT LINE RANGE TABLE ENTRIES * VALIDATE LINE RANGE TABLE ENTRIES. SX5 ERREIE LINE NUMBERS OVERLAP IN RANGE TABLE SB4 B0 SA1 B7 FIRST HIGH ORDER VALUE SB3 X1 FIRST LOW ORDER VALUE AX1 18 HIGH ORDER VALUE OF PAIR SB5 X1+ PRS10 LT B5,B3,PRS11 IF INCORRECT LINE RANGE ENTRY SB4 B4+1 EQ B4,B6,PRS12 IF NO MORE ENTRIES TO VALIDATE SA2 A1+B4 SET NEXT LOW ORDER VALUE SB3 X2 LE B3,B5,ERR IF OVERLAP OF ENTRIES AX2 18 SB5 X2 EQ PRS10 CHECK NEXT ENTRY PRS11 SX5 ERRELR *ERROR IN LINE RANGE.* EQ ERR PROCESS ERROR PRS12 MX0 1 MARK THE END OF *LRT* SA5 LRT+B4-1 BX6 X5+X0 SA6 A5+ REPLACE LAST ENTRY * SET UP FET FOR EDIT FILE WITH LOCAL FILE. PRS13 SX0 3 SET EDIT FILE NAME INTO FET SA5 EFN BX6 X0+X5 SA6 E MEMORY CM,MSTAT,R DETERMINE MAXIMUM MEMORY AVAILABLE SA2 MSTAT SA1 FNUM BX6 X2 AX6 30 SX2 X1-FNRE SA6 CMAX NZ X2,PRS14 IF NOT A *READ* FUNCTION SA2 FILEN SA3 FIPB BX6 X2+X3 SA6 A3 FILINFO FIPB CHECK DEVICE TYPE OF *READ* FILE SA1 FIPB+1 ISOLATE DEVICE TYPE MX2 12 BX1 X2*X1 SX5 ERRNRF *READ FILE EMPTY.* ZR X1,ERR IF FILE NOT ON MASS STORAGE PRS14 SX7 B0+ SA7 MSTAT MEMORY CM,A7,R SX2 MEML FWA OF *PRS* SA1 MSTAT AX1 30 IX6 X1-X2 AVAILABLE SPACE FOR BUFFERS SX7 X1+ LWA FOR TABLES SX6 X6-NTAB ADJUST FOR *MTP* SPARE WORDS SA6 DYNST SA7 F.TEND SA2 BOP SA1 FNUM SA7 CMEM SX3 MEM-/IEDIT1/MEM2 PL X3,PRSX IF OVERLAY NOT LONGER THAN MAIN ROUTINE SX1 X1-MXIL-1 LX1 1 BX1 X1*X2 NZ X1,PRSX IF *BASIC* AND *MOVE*, *DUP*, OR *READ* SA1 LM IX6 X1+X3 SA6 A1 SA2 DYNST IX7 X2-X3 SA7 A2 EQ PRSX RETURN PRSA BSS 0 COMMAND EQUIVALENCE TABLE FN ARG EFN,EFN,400B FILE NAME OP ARG PRSB,COPT,400B OPTIONS CS ARG PRSC,CSCS CHARACTER SET ARG PRSB CON -1 SET -1 IF NO OPTIONS SPECIFIED PRSC DATA C*NORMAL* NORMAL CHARACTER TYPE PRSD DATA C*ASCII* ASCII 6/12 PRSE DATA C*ASCII8* ASCII 8/12 PRSF VFD 42/0LINPUT,18/1 TEST DATA FILE NAME PVA SPACE 4,35 ** PVA - PROCESS VERB ARGUMENTS. * * PVA JUMPS TO THE SUBROUTINES TO PROCESS THE ARGUMENTS FOR * THE VERB. THESE SUBROUTINES ARE OBTAINED FROM THE SET OF * LINES IN THE TABLE CORRESPONDING TO THE VERB THAT WAS FOUND. * * ENTRY (A2) = ADDRESS OF TABLE ENTRY MATCHING VERB IN *CLB=*. * (X2) = *TDVB* ENTRY MATCHING VERB IN *CLB=*. * * EXIT TABLES RELEVANT TO COMMAND BUILT. * NECESSARY VALUES SAVED FOR EXECUTION OF COMMAND. * COMMAND NUMBER SAVED. * COMMAND PARAMETERS VALIDATED. * * USES X - 0, 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * B - 2, 7. * * CALLS GTC, GTS, ICE. * * NOTES *ICE* MAY CALL ANY OF THE FOLLOWING ROUTINES - * 1. *GFN* - GET FILE NAME. * 2. *GIN* - GET INCREMENT. * 3. *GLS* - GET LINES. * 4. *GLI* - GET LINE NUMBER TO INSERT TEXT AFTER. * 5. *GSP* - GET STRING PAIR. * 6. *GSR* - GET SINGLE RANGE OF LINE NUMBERS. * 7. *GSS* - GET STRING FOR SEARCH. PVA SUBR ENTRY/EXIT MX0 -TDISN INCREMENT TO FIRST SUBROUTINE SB2 TDISN-TDISS-1 LX1 X2,B2 BX1 -X0*X1 SB2 X1+ SA2 A2+B2 FIRST PROCESS FOR COMMAND PVA1 BX7 X2 SAVE *TDVB* ENTRY SB7 X2 GET PROCESS ADDRESS SA3 LCIP SA7 LINE SB2 59-TDFPS CHECK FOR END OF SUBROUTINES SA3 X3 LX7 X2,B2 NG X7,PVA2 IF AT END OF FUNCTION PROCESSOR ENTRIES SX7 A2 SAVE ADDRESS IN TABLE OF FUNCTION SA7 ADRF SX7 B1 SA7 SUCC RJ ICE PERFORM FUNCTION * FUNCTION PROCESSORS RETURN HERE. SA2 ADRF RESTORE ADDRESS OF FUNCTION IN TABLE SA1 LINE SA2 X2+B1 LX1 59-TDRQS PL X1,PVA1 IF FUNCTION OPTIONAL SA5 SUCC ZR X5,PVA1 IF PREVIOUS FUNCTION EXECUTED SUCCESSFULLY MX0 TDASN GET INCREMENT TO FWA OF ALTERNATE SYNTAX LX0 TDASS-59 SA1 LINE SX5 ERREIS *INCORRECT SYNTAX.* BX1 X0*X1 LX1 TDSAS-TDASS RIGHT JUSTIFY OFFSET ZR X1,ERR IF THERE IS NO ALTERNATE SYNTAX SA2 TDVB+X1 SET FIRST LINE OF ALTERNATE SYNTAX SA5 LCIV SX7 X5 SX6 B0 SA7 LCIP SA6 NELR EQ PVA1 PROCESS NEXT PARAMETER PVA2 SX7 X2+ SA7 FNUM STORE COMMAND NUMBER RJ GTS SKIP OVER ALL BLANKS ZR X0,PVA3 IF NOT A SEPARATOR SA3 A3-1 PVA3 RJ GTC REREAD THE CHARACTER ZR X4,PVAX IF NO MORE CHARACTERS ON THE LINE SX1 TERA BX1 X1*X4 SX5 ERREIS *ERROR IN EDIT COMMAND SYNTAX* ZR X1,ERR IF NOT A VALID TERMINATOR SA2 CSTI CHECK CHARACTER SET SX1 1R. SX2 X2-1 NG X2,PVA4 IF NOT *ASCII8* SX1 56B PVA4 BX3 X3-X1 NZ X3,PVAX IF TERMINATOR NOT A PERIOD RJ GTC GET THE FOLLOWING CHARACTER ZR X4,PVAX IF END OF THE STRING BX3 X3-X1 NZ X3,PVAX IF NOT AN ELLIPSIS EQ ERR ISSUE *ERROR IN SYNTAX* MESSAGE GFN TITLE VERB ARGUMENT PROCESSORS. GFN SPACE 4,15 ** GFN - GET FILE NAME. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING FILE NAME. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF LEGAL FILE NAME FOUND. * (FILN) = LEGAL FILE NAME FOLDED INTO *NORMAL* * CHARACTER SET. * * USES X - 1, 2, 5, 6, 7. * A - 1, 2, 6, 7. * B - 7. * * CALLS GTS, GTB. GFN2 SA6 FILEN STORE FILE NAME SX7 A3 SX6 B0 SA7 LCIP MARK WHERE SCAN ENDED SA6 SUCC SET SUCCESS FLAG TO TRUE GFN SUBR ENTRY/EXIT RJ GTS GET SEPARATOR ZR X0,GFNX IF SEPARATOR NOT FOUND, RETURN SX7 B0+ SA7 CNVRT SET CONVERSION FLAG RJ GTB GET BLOCK SX5 ERRNRS *NO READ/DESTINATION FILE SPECIFIED.* ZR B2,ERR IF NO CHARACTERS IN BLOCK SB7 MXWS GET MAXIMUM WORD SIZE INTO B7 SX1 LETA+DIGA GET MASK FOR FILE NAME SX5 ERREIF *FILE NAME ERROR.* GT B2,B7,ERR IF WORD TOO LONG BX6 -X1*X6 NZ X6,ERR IF NON-VALID CHARACTERS IN FILE NAME SA1 BLOCK LOAD FILE NAME SA2 EFN GET EDIT FILE NAME SX5 ERRDFN *DUPLICATE FILE NAME.* BX2 X2-X1 BX6 X1 ZR X2,ERR IF DUPLICATE FILE NAME SA2 TSF-1 SX5 ERRRFN *RESERVED FILE NAME.* GFN1 SA2 A2+B1 ZR X2,GFN2 IF END OF TABLE BX2 X2-X1 NZ X2,GFN1 IF NOT RESERVED FILE NAME EQ ERR *RESERVED FILE NAME* GIN SPACE 4,20 ** GIN - GET INCREMENT. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING START OF * INCREMENT BLOCK. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF FUNCTION SUCCESSFUL. * (INCR) = INCREMENT IN BINARY. * * USES X - 5, 6, 7. * A - 6, 7. * B - 2, 7. * * CALLS GLN, GTS. GIN SUBR ENTRY/EXIT RJ GTS GET SEPARATOR ZR X0,GINX IF SEPARATOR NOT FOUND, RETURN RJ GLN NG X6,GINX IF NUMBER NOT FOUND SB2 X6+ SB7 MXIC MAXIMUM INCREMENT LT B2,B1,GIN1 IF INCREMENT TOO SMALL GT B2,B7,GIN1 IF INCREMEMT TOO LARGE SA6 INCR STORE INCREMENT SX7 B0 SX6 A3 SA7 SUCC SET SUCCESS FLAG TO TRUE SA6 LCIP MARK WHERE SCAN ENDED EQ GINX RETURN GIN1 SX5 ERREII *LINE NUMBER INCREMENT ERROR.* EQ ERR ERROR IN INCREMENT GLI SPACE 4,15 ** GLI - GET LINE NUMBER TO INSERT TEXT AFTER. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING SEPARATOR * PRECEDING LINE NUMBER. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF FUNCTION SUCCESSFUL. * (LNIA) = LINE NUMBER TO INSERT AFTER (IF FOUND). * * USES X - 3, 6, 7. * A - 3, 6, 7. * * CALLS GLN, GTS. GLI1 RJ GLN NG X6,GLIX IF NO LINE NUMBER FOUND, RETURN SX7 X6-MXLN-1 ZR X7,GLIX IF ASTERISK FOUND, RETURN GLI2 SA6 LNIA STORE LINE NUMBER SX7 B0 SX6 A3 SA7 SUCC SET SUCCESS FLAG TO TRUE SA6 LCIP MARK WHERE SCAN ENDED GLI SUBR ENTRY/EXIT RJ GTS GET SEPARATOR ZR X0,GLIX IF SEPARATOR NOT FOUND, RETURN RJ GTS CHECK FOR SECOND SEPARATOR ZR X0,GLI1 IF SEPARATOR NOT FOUND SA3 A3-1 SX6 MXLN+1 RETURN *MXLN+1* AS LINE NUMBER EQ GLI2 SET FUNCTION SUCCESSFUL GLS SPACE 4,15 ** GLS - GET LINES. * * *GLS* GETS ONE OR MORE SETS OF LINE RANGES INCLUDING THE * RANGE OF SINGLE LINE NUMBERS AND STORES THOSE RANGES AS * ENTRIES IN *LRT*. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING LINE RANGES. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF AT LEAST ONE LINE NUMBER/RANGE FOUND. * * USES X - 6, 7. * A - 6, 7. * * CALLS GLR. GLS SUBR ENTRY/EXIT GLS1 RJ GLR GET LINE RANGE NG X6,GLSX IF NO LINE NUMBER READ, RETURN SX7 A3 SX6 B0 SA7 LCIP MARK WHERE SCAN ENDED SA6 SUCC SET SUCCESS FLAG TO TRUE EQ GLS1 TRY TO GET ANOTHER LINE NUMBER GSP SPACE 4,15 ** GSP - GET STRING PAIR. * * GSP GETS A PAIR OF STRINGS - ONE TO SEARCH WITH * THE OTHER TO REPLACE THE FIRST VALUE WITH. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING STRING PAIR. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF SUCCESSFUL. * (SBUF) = SEARCH STRING, ONE CHARACTER PER WORD. * (RBUF) = REPLACEMENT STRING, ONE CHARACTER PER WORD. * (SRTFLG) = 1, IF A CHARACTER STRING WAS SPECIFIED. * * USES X - 0, 3, 5, 6, 7. * A - 3, 5, 6, 7. * * CALLS GTB, GCS. * * MACROS WRITEC. GSP1 SX0 A3 WRITEC O,ERRNDF *NO CLOSING DELIMITER FOUND.* SA3 X0+ GSP2 SX7 B0 SET FUNCTION SUCCESS FLAG SX6 A3 SA7 SUCC SET SUCCESS FLAG TO TRUE SA6 LCIP MARK WHERE SCAN ENDED GSP SUBR ENTRY/EXIT RJ GCS GET CHARACTER STRING TO SEARCH FOR SA5 STRD NZ X7,GSPX IF NO SEARCH STRING FOUND, RETURN SX7 RBUF BUFFER TO WHICH BLOCK IS ADDED NG X5,GSPX IF NO CLOSING DELIMITER ON SEARCH STRING SA7 CNVRT RJ GTB GET BLOCK UP TO DELIMITER SX7 B2+ SA5 STRD CHECK THE CLOSING DELIMETER SA7 NCIR STORE NUMBER OF CHARS IN REPLACE STRING NG X5,GSP1 IF CLOSING DELIMETER MISSING SA3 A3+1 EQ GSP2 SET FUNCTION SUCCESSFUL GSR SPACE 4,20 ** GSR - GET SINGLE RANGE OF LINE NUMBERS. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING LINE RANGE. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF LINE NUMBER/RANGE FOUND. * * USES X - 6, 7. * A - 6, 7. * * CALL GLR. GSR SUBR ENTRY/EXIT RJ GLR GET A LINE RANGE NG X6,GSRX IF LINE NUMBER NOT FOUND, RETURN SX7 A3 SX6 B0 SA7 LCIP SET SUCCESS FLAG TO TRUE SA6 SUCC MARK WHERE SCAN ENDED EQ GSRX RETURN GSS SPACE 4,15 ** GSS - GET STRING FOR SEARCH. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING STRING. * * EXIT (LCIP) = ADDRESS OF LAST CHARACTER PARSED. * (SUCC) = 0, IF FUNCTION SUCCESSFUL. * (SRTFLG) = 1, IF CHARACTER STRING SPECIFIED. * * USES X - 5, 6. * A - 5, 6, 7. * * MACROS WRITEC. GSS SUBR ENTRY/EXIT RJ GCS GET SEARCH STRING NZ X7,GSSX IF SEARCH STRING NOT FOUND, RETURN SX6 A3+ SA7 SUCC SET SUCCESS FLAG TO TRUE SA6 LCIP MARK WHERE SCAN ENDED SA5 STRD PL X5,GSSX IF CLOSING DELIMETER FOUND, RETURN WRITEC O,ERRNDF *NO CLOSING DELIMITER FOUND.* EQ GSSX RETURN ABB TITLE PRESET SUBROUTINES FVT SPACE 4,20 ** FVT - FIND VERB IN TABLE. * * FVT SCANS THE *VERB* TABLE LOOKING FOR THE VERB * THAT MATCHES THE ONE IN THE COMMAND BUFFER. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING VERB NAME. * * EXIT ((A2)) = (X2) = LINE IN *TDVB* CONTAINING VERB. * (LCIV) = (LCIP) = ADDRESS OF LAST CHARACTER IN VERB. * * USES X - 0, 1, 2, 4, 5, 6, 7. * A - 1, 2, 7. * B - 6. * * CALLS GTB. FVT2 SX7 A3+ SA7 LCIV STORE ADDRESS OF LAST CHARACTER IN VERB SA7 LCIP MARK WHERE SCAN ENDED FVT SUBR ENTRY/EXIT SX7 B0+ SA7 CNVRT RJ GTB GET VERB SA1 BLOCK SX5 ERRNIV *NON-EXISTENT EDIT VERB SPECIFIED.* ZR B2,ERR IF NO CHARACTERS IN BLOCK SB6 MXWS SX2 LETA GT B2,B6,ERR IF NAME TOO LONG BX6 -X2*X6 NZ X6,ERR IF INCORRECT CHARACTERS FOUND SA2 TDVB MX0 TDVNN MX7 -TDIVN FVT1 BX4 X0*X2 VERB FROM TABLE BX4 X1-X4 ZR X4,FVT2 IF MATCH FOUND BX4 -X7*X2 SB6 X4+ SA2 A2+B6 NEXT TABLE ENTRY WITH VERB ZR X2,ERR IF NO VERB FOUND EQ FVT1 CHECK NEXT ENTRY FOR MATCH GCS SPACE 4,20 ** GCS - GET CHARACTER STRING FOR SEARCH. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING STRING. * * EXIT ((A3)) = (X3) = LAST CHARACTER IN STRING. * (X7) = 0, IF FUNCTION SUCCESSFUL. * (NCIS) = NUMBER OF CHARACTERS IN SEARCH STRING. * (SBUF) = SEARCH STRING, ONE CHARACTER PER WORD. * (STRD) = STRING DELIMITER CHARACTER. * * USES X - 3, 5, 6, 7. * A - 3, 5, 6, 7. * * CALLS GTB, GTC, GTS. GCS SUBR ENTRY/EXIT SX7 B1+ RJ GTS GET SEPARATOR ZR X0,GCSX IF SEPARATOR NOT FOUND, RETURN RJ GTS GET NEXT SEPARATOR ZR X0,GCS1 IF SEPARATOR NOT FOUND SA3 A3-1 GCS1 RJ GTC GET CHARACTER ZR X4,GCSX IF NO CHARACTERS FOUND, RETURN SX5 DLMA BX5 X5*X4 ZR X5,GCSX IF STRING DELIMITER NOT FOUND SX7 X3 SAVE DELIMITER SX6 SBUF SET UP FOR NO ASCII TO NORMAL CONVERSION SA7 STRD SA6 CNVRT RJ GTB GET BLOCK UP TO DELIMITER SX7 B2+ SAVE CHARACTER COUNT OF SEARCH STRING SA5 STRD SA7 NCIS SX7 B0+ NG X5,GCSX IF SECOND DELIMITER NOT FOUND, RETURN SA3 A3+B1 EQ GCSX RETURN GLN SPACE 4,20 ** GLN - GET LINE NUMBER. * * *GLN* GETS A LINE NUMBER AND CONVERTS IT TO BINARY IN *X6*. * AN ASTERISK IS CONVERTED INTO THE VALUE *MXLN+1*. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING LINE NUMBER * * EXIT ((A3)) = (X3) = LAST CHARACTER IN LINE NUMBER. * (X6) = LINE NUMBER READ RIGHT JUSTIFIED (BINARY). * .LT. 0, IF LINE NUMBER NOT READ. * * USES X - 3, 5, 6, 7. * A - 3, 5, 7. * B - 2, 7. * * CALLS DXB, GTB. GLN2 SA3 A3+B1 SA5 CSTI CHECK CHARACTER SET SB2 X5 SB2 B2-B1 SX7 X3-1R* NG B2,GLN3 IF NOT *ASCII8* CHARACTER SET SX7 X3-52B GLN3 NZ X7,GLN1 IF NOT AN ASTERISK SX6 MXLN+1 SET VALUE TO *MXLN+1* GLN SUBR ENTRY/EXIT SX7 B0+ SA7 CNVRT RJ GTB GET LINE NUMBER ZR B2,GLN2 IF NO CHARACTERS FOUND SX5 DIGA GET MASK FOR NUMBER SB7 NUMD BX5 -X5*X6 NZ X5,GLN1 IF NON-DIGIT FOUND GT B2,B7,GLN1 SB7 B1 SA5 BLOCK RJ DXB CONVERT NUMBER TO BINARY SA3 A3 ZR X4,GLNX IF NUMBER CONVERTABLE SX5 ERRELR *LINE RANGE ERROR.* EQ ERR ISSUE *ERROR IN LINE RANGE* MESSAGE GLN1 SX6 -1 SET FAILURE FLAG EQ GLNX RETURN GLR SPACE 4,25 ** GLR - GET LINE RANGE. * * *GLR* GETS A LINE RANGE (INCLUDING THE RANGE OF SINGLE LINE * NUMBERS) AND MAKES A RANGE ENTRY FOR IT IN THE *LRT*. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING LINE RANGE. * * EXIT ((A3)) = (X3) = LAST CHARACTER IN LINE RANGE. * (X6) = .LT. 0, IF FUNCTION NOT SUCCESSFUL. * * USES X - 1, 2, 3, 4, 5, 6, 7. * A - 1, 3, 4, 6, 7. * B - 2. * * CALLS GLN, GTC, GTS. GLR SUBR ENTRY/EXIT SX6 -B1 RJ GTS ZR X0,GLRX IF NO SEPARATOR FOUND, RETURN RJ GLN GET LINE NUMBER NG X6,GLRX IF NUMBER NOT FOUND, RETURN SA6 LROP STORE NUMBER RJ GTC GET CHARACTER ZR X4,GLR2 IF END OF LINE LX4 30 MX5 -NBIC NG X4,GLR1 IF NO DISPLAY CODE EQUIVALENT LX4 NBIC+1 BX1 -X5*X4 SX1 X1-1R. ZR X1,GLR4 IF CHARACTER A PERIOD GLR1 SA3 A3-1 GLR2 SA4 LROP SX2 X4-MXLN-1 NZ X2,GLR3 IF ENTIRE FILE NOT SELECTED SX6 MXLN LX6 18 CONSTRUCT AN *..* *LRT* ENTRY EQ GLR6 APPEND TO *LRT* GLR3 SB2 18 LX4 B2,X6 BX6 X4+X6 CONSTRUCT A SINGLE LINE *LRT* ENTRY EQ GLR6 APPEND TO *LRT* GLR4 RJ GTC GET NEXT CHARACTER SA3 A3-B1 ZR X4,GLR2 IF NO CHARACTER SA3 A3-B1 LX4 30 NG X4,GLR2 IF NO DISPLAY CODE EQUIVALENT LX4 NBIC+1 BX1 -X5*X4 SX2 X1-1R. NZ X2,GLR2 IF NOT A PERIOD SA3 A3+2 RJ GLN GET SECOND LINE NUMBER NG X6,GLR7 IF NO NUMBER FOUND SA4 LROP SX2 X4-MXLN-1 NZ X2,GLR5 IF FIRST NUMBER NOT AN ASTERISK SX4 B0+ GLR5 LX6 18 BX6 X6+X4 GLR6 SA1 NELR SA6 X1+LRT ADD ENTRY TO *LRT* SX7 X1+B1 SA7 A1 ADD ONE TO *LRT* ENTRY COUNT EQ GLRX RETURN GLR7 SX5 ERRELR *LINE RANGE ERROR.* EQ ERR ISSUE *ERROR IN LINE RANGE* MESSAGE GTB SPACE 4,30 ** GTB - GET BLOCK. * * IF (CNVRT) = 0, CHARACTERS ARE CONVERTED TO DISPLAY CODE AND * PACKED INTO *BLOCK* UP TO THE FIRST SEPARATOR, TERMINATOR, * OR DELIMITER. ANY BLANKS FOUND ARE REMOVED. IF * (CNVRT) .NE. 0, IT CONTAINS A STRING BUFFER ADDRESS TO WHICH * CHARACTERS SHOULD BE MOVED. THE CHARACTERS ARE NOT * CONVERTED TO DISPLAY CODE AND BLANKS ARE NOT DISCARDED. * THE CHARACTERS ARE STORED IN THE BUFFER, ONE CHARACTER PER * WORD UNTIL THE CHARACTER IN *STRD* IS FOUND OR THE END OF * THE COMMAND IS REACHED. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING START OF BLOCK. * (CNVRT)= 0, IF BLOCK TO BE CONVERTED TO DISPLAY CODE * AND PACKED INTO *BLOCK* WITH ALL BLANKS * REMOVED. * .GT. 0, IF BLOCK IS NOT TO BE CONVERTED AND * IS TO BE MOVED IN UNPACKED FORM TO THE * ADDRESS IN *CNVRT* * (STRD) = THE DESIRED DELIMITER WHEN *CNVRT* = ZERO. * * EXIT ((A3)) = (X3) = LAST CHARACTER OF BLOCK. * (B2) = COUNT OF CHARACTERS READ IN BLOCK. * (X6) = ATTRIBUTES OF BLOCK. * BLOCK = FWA OF BLOCK OF CHARACTERS OBTAINED * CHARACTERS IN LAST WORD OF *BLOCK* LEFT * JUSTIFIED. * (STRD) = .LT. 0, IF SPECIFIED DELIMETER NOT FOUND. * * USES X - 1, 2, 3, 4, 5, 6, 7. * A - 2, 3, 5, 7. * B - 2, 4, 6, 7. * * CALLS GTC. GTB5 LX7 B7 SA7 BLOCK+B6 STORE LAST WORD OF BLOCK GTB6 MX7 -MXNA BX6 -X7*X6 LEAVE ONLY THE ATTRIBUTES IN *X6* ZR X4,GTB7 IF NO CLOSING DELIMITER FOUND SA3 A3-1 EQ GTBX RETURN GTB7 SX7 -1 SA7 STRD GTB SUBR ENTRY/EXIT SA2 CNVRT SX6 B0 INITIALIZE ATTRIBUTE OF BLOCK SB2 B0 INITIALIZE COUNT OF CHARACTERS IN BLOCK ZR X2,GTB2 IF BLOCK IS TO BE PACKED SA5 STRD SB4 X2-1 GTB1 RJ GTC GET CHARACTER AND ATTRIBUTE ZR X4,GTB6 IF END OF LINE ENCOUNTERED IX2 X5-X3 ZR X2,GTB6 IF SPECIFIED DELIMITER FOUND BX6 X6+X4 ACCUMULATE ATTRIBUTES SB2 B2+B1 INCREMENT COUNT OF CHARACTERS BX7 X3 SA7 B4+B2 ADD CHARACTER TO BUFFER EQ GTB1 GET NEXT CHARACTER GTB2 SB6 B0 SX7 B0 SB7 60 GTB3 RJ GTC ZR X4,GTB5 IF END OF LINE ENCOUNTERED SX1 X3 SA2 CSTI ZR X2,GTB4 IF *NORMAL* CHARACTER SET LX4 30 SX5 ERREIS *ERROR IN EDIT COMMAND SYNTAX* NG X4,ERR IF CHARACTER NOT CONVERTABLE TO *NORMAL* LX4 NBIC+1 MX2 -NBIC BX1 -X2*X4 GET DISPLAY CODE EQUIVALENT LX4 29-NBIC GTB4 SX2 X1-1R ZR X2,GTB3 IF CHARACTER IS A BLANK SX2 SEDE+TERA+CHAA BX2 X2*X4 NZ X2,GTB5 IF DELIMITER, SEPARATOR, OR TERMINATOR BX6 X6+X4 ACCUMULATE ATTRIBUTES SB2 B2+1 INCREMENT COUNT OF CHARACTERS LX7 NBIC BX7 X7+X1 ADD CHARACTER TO BLOCK SB7 B7-NBIC GT B7,GTB3 IF ROOM FOR MORE CHARACTERS IN *X7* SB7 60 SA7 BLOCK+B6 STORE PACKED WORD SB6 B6+B1 SX7 B0 EQ GTB3 GET NEXT CHARACTER GTC SPACE 4,25 ** GTC - GET CHARACTER AND ATTRIBUTE. * * *GTC* GETS THE NEXT CHARACTER IN THE COMMAND. THE * ATTRIBUTES OF THE CHARACTER ARE OBTAINED BY EXTRACTING THE * ENTRY FROM THE ATTRIBUTE TABLE CORRESPONDING TO THAT * CHARACTER. THE ATTRIBUTES ARE RETURNED IN X4 (ONE BIT IS SET * FOR EACH ATTRIBUTE OF THE CHARACTER). FOR ASCII 6/12 AND * 8/12 CHARACTERS, THE HIGH ORDER BITS OF X4 CONTAIN THE * DISPLAY CODE EQUIVALENT OF THAT CHARACTER IF IT EXISTS. * * ENTRY ((A3)) = (X3) = CHARACTER LAST RETRIEVED BY *GTC*. * * EXIT ((A3)) = (X3) = CHARACTER RIGHT JUSTIFIED, ZERO FILL. * (X4) = ATTRIBUTES OF CHARACTER AND DISPLAY CODE * EQUIVALENT (ZERO IF END OF LINE). * AND DISPLAY CODE EQUIVALENT. * * USES X - 2, 3, 4. * A - 2, 3, 4. * B - 5. GTC SUBR ENTRY/EXIT SA2 USBC GET ADDRESS OF END OF LINE SX4 B0 INITIALIZE ATTRIBUTES TO ZERO SB5 X2 SB5 A3-B5 GE B5,GTCX IF END OF LINE, RETURN SA3 A3+B1 GET NEXT CHARACTER SA4 TATC SA2 CSTI DETERMINE CHARACTER SET SB5 X2 GT B5,GTC3 IF ASCII 8/12 CHARACTER SET BX2 X3 ZR B5,GTC2 IF *NORMAL* CHARACTER SET BX4 X3 AX4 NBIC ZR X4,GTC2 IF NO ESCAPE CODE SX4 X4-EC2 SB5 70 OFFSET FOR 76 ESCAPE CODE ZR X4,GTC1 IF ESCAPE CODE 76 SB5 63 OFFSET FOR 74 ESCAPE CODE GTC1 SA4 A4+B5 BX2 X3 MX4 -NBIC BX2 -X4*X2 SET CHARACTER WITHOUT ESCAPE CODE GTC2 SB5 X2+ SA4 A4+B5 GET *6/12* OR *NORMAL* CHAR ATTRIBUTE MX2 30 BX4 X2*X4 SET ATTRIBUTE LX4 30 EQ GTCX RETURN GTC3 MX2 -7 BX2 -X2*X3 SB5 X2 SA4 A4+B5 GET 8/12 CHARACTER ATTRIBUTE MX2 -30 BX4 -X2*X4 EQ GTCX RETURN GTS SPACE 4,15 ** GTS - GET SEPARATOR. * * ENTRY ((A3)) = (X3) = CHARACTER PRECEDING SEPARATOR. * * EXIT ((A3)) = (X3) = SEPARATOR RIGHT JUSTIFIED. * (X0) = 0, IF SEPARATOR NOT FOUND. * .NE. 0, IF SEPARATOR FOUND. * * USES X - 0, 1, 3, 4. * A - 3, 4. * * CALLS GTC. GTS SUBR ENTRY/EXIT SX1 SEPA GET MASK FOR SEPARATOR SX0 B0+ GTS1 RJ GTC GET NEXT CHARACTER ZR X4,GTSX IF NO MORE CHARACTERS, RETURN BX0 X1*X4 NZ X0,GTSX IF CHARACTER A SEPARATOR, RETURN SA4 BLNK BX0 X4-X3 ZR X0,GTS1 IF CHARACTER IS A BLANK GTS2 SA3 A3-B1 SX0 B0 SEPARATOR NOT FOUND EQ GTSX RETURN STORAGE EJECT PRESET WORKING STORAGE ** PRESET WORKING STORAGE. ADRF CON 0 ADDRESS OF CURRENT FUNCTION IN TABLE BLOCK BSS MXWL BLOCK OF CHARACTERS READ FROM COMMAND LINE C BSS 0 CLB= FILEB CLBF,INSZ CLBF BSS INSZ CNVRT CON 0 CONVERT ASCII TO NORMAL FLAG COPT CON 0 CONTROL STATMENT OPTIONS CSCS CON 0 CHARACTER SET FROM COMMAND LINE CON 0 LINE FROM DEFINED VERB TABLE BEING WORKED LROP CON 0 LOW VALUE IN ORDERED PAIR IN RANGE TABLE LCIV CON 0 NUMBER OF CHARACTERS IN VERB LCIP CON 0 STRD CON 0 STRING DELIMITER SUCC CON 0 SUCCESSFUL FUNCTION FLAG, ZERO IF YES TATC EJECT ATTRIBUTE TABLE ** TABLE OF ATTRIBUTES FOR CHARACTERS. TATC BSS 0 NORMAL ASCII ASCII8 DAC I,,CHAA,I,,CHAA CL 00 NUL 000 DAC ,01,LETA,I,,CHAA UC A 01 UC A SOH 001 DAC ,02,LETA,I,,CHAA UC B 02 UC B STX 002 DAC ,03,LETA,I,,CHAA UC C 03 UC C ETX 003 DAC ,04,LETA,I,,CHAA UC D 04 UC D EOT 004 DAC ,05,LETA,I,,CHAA UC E 05 UC E ENQ 005 DAC ,06,LETA,I,,CHAA UC F 06 UC F ACK 006 DAC ,07,LETA,I,,CHAA UC G 07 UC G BEL 007 DAC ,10,LETA,I,,CHAA UC H 10 UC H BS 010 DAC ,11,LETA,I,,CHAA UC I 11 UC I HT 011 DAC ,12,LETA,I,,CHAA UC J 12 UC J LF 012 DAC ,13,LETA,I,,CHAA UC K 13 UC K VT 013 DAC ,14,LETA,I,,CHAA UC L 14 UC L FF 014 DAC ,15,LETA,I,,CHAA UC M 15 UC M CR 015 DAC ,16,LETA,I,,CHAA UC N 16 UC N SO 016 DAC ,17,LETA,I,,CHAA UC O 17 UC O SI 017 DAC ,20,LETA,I,,CHAA UC P 20 UC P DLE 020 DAC ,21,LETA,I,,CHAA UC Q 21 UC Q DC1 021 DAC ,22,LETA,I,,CHAA UC R 22 UC R DC2 022 DAC ,23,LETA,I,,CHAA UC S 23 UC S DC3 023 DAC ,24,LETA,I,,CHAA UC T 24 UC T DC4 024 DAC ,25,LETA,I,,CHAA UC U 25 UC U NAK 025 DAC ,26,LETA,I,,CHAA UC V 26 UC V SYN 026 DAC ,27,LETA,I,,CHAA UC W 27 UC W ETB 027 DAC ,30,LETA,I,,CHAA UC X 30 UC X CAN 030 DAC ,31,LETA,I,,CHAA UC Y 31 UC Y EM 031 DAC ,32,LETA,I,,CHAA UC Z 32 UC Z SUB 032 DAC ,33,DIGA,I,,CHAA 0 33 0 ESC 033 DAC ,34,DIGA,I,,CHAA 1 34 1 FS 034 DAC ,35,DIGA,I,,CHAA 2 35 2 GS 035 DAC ,36,DIGA,I,,CHAA 3 36 3 RS 036 DAC ,37,DIGA,I,,CHAA 4 37 4 US 037 DAC ,40,DIGA,,55,CHAA 5 40 5 SP 040 DAC ,41,DIGA,,66,SEDE 6 41 6 EX 041 DAC ,42,DIGA,,64,SEDE 7 42 7 DQ 042 DAC ,43,DIGA,,60,SEDE 8 43 8 NM 043 DAC ,44,DIGA,,53,CHAA 9 44 9 DS 044 DAC ,45,SEDE,,63,SEDE PL 45 PL PC 045 DAC ,46,SEDE,,67,SEDE MI 46 MI AM 046 DAC ,47,CHAA,,70,SEDE AS 47 AS AP 047 DAC ,50,SEDE,,51,SEDE SL 50 SL OP 050 DAC ,51,SEDE,,52,TERA OP 51 OP CP 051 DAC ,52,TERA,,47,CHAA CP 52 CP AS 052 DAC ,53,CHAA,,45,SEDE DS 53 DS PL 053 DAC ,54,SEDE,,56,SEDE EQ 54 EQ CM 054 DAC ,55,CHAA,,46,SEDE SP 55 SP MI 055 DAC ,56,SEDE,,57,TERA CM 56 CM PD 056 DAC ,57,TERA,,50,SEDE PD 57 PD SL 057 DAC ,60,SEDE,,33,DIGA NM 60 NM 0 060 DAC ,61,SEDE,,34,DIGA OB 61 OB 1 061 DAC ,62,SEDE,,35,DIGA CB 62 CB 2 062 DAC ,63,SEDE,,36,DIGA PC 63 PC 3 063 DAC ,64,SEDE,,37,DIGA DQ 64 DQ 4 064 DAC ,65,SEDE,,40,DIGA UL 65 UL 5 065 DAC ,66,SEDE,,41,DIGA EX 66 EX 6 066 DAC ,67,SEDE,,42,DIGA AM 67 AM 7 067 DAC ,70,SEDE,,43,DIGA AP 70 AP 8 070 DAC ,71,SEDE,,44,DIGA QM 71 QM 9 071 DAC ,72,SEDE,,00,CHAA LT 72 LT CL 072 DAC ,73,SEDE,,77,SEDE GT 73 GT SC 073 DAC I,,CHAA,,72,SEDE AT 74 LT 074 DAC ,75,SEDE,,54,SEDE RVS 75 RVS EQ 075 DAC I,,CHAA,,73,SEDE CF 76 GT 076 DAC ,77,SEDE,,71,SEDE SC 77 SC QM 077 DAC ,74,CHAA,,74,CHAA 7401 AT AT 100 DAC ,76,CHAA,,01,LETA 7402 CF UC A 101 DAC ,,,,02,LETA UC B 102 DAC ,00,CHAA,,03,LETA 7404 CL UC C 103 DAC ,,,,04,LETA UC D 104 DAC ,,,,05,LETA UC E 105 DAC I,,CHAA,,06,LETA 7407 GV UC F 106 DAC ,01,LETA,,07,LETA 7601 LC A UC G 107 DAC ,02,LETA,,10,LETA 7602 LC B UC H 110 DAC ,03,LETA,,11,LETA 7603 LC C UC I 111 DAC ,04,LETA,,12,LETA 7604 LC D UC J 112 DAC ,05,LETA,,13,LETA 7605 LC E UC K 113 DAC ,06,LETA,,14,LETA 7606 LC F UC L 114 DAC ,07,LETA,,15,LETA 7607 LC G UC M 115 DAC ,10,LETA,,16,LETA 7610 LC H UC N 116 DAC ,11,LETA,,17,LETA 7611 LC I UC O 117 DAC ,12,LETA,,20,LETA 7612 LC J UC P 120 DAC ,13,LETA,,21,LETA 7613 LC K UC Q 121 DAC ,14,LETA,,22,LETA 7614 LC L UC R 122 DAC ,15,LETA,,23,LETA 7615 LC M UC S 123 DAC ,16,LETA,,24,LETA 7616 LC N UC T 124 DAC ,17,LETA,,25,LETA 7617 LC O UC U 125 DAC ,20,LETA,,26,LETA 7620 LC P UC V 126 DAC ,21,LETA,,27,LETA 7621 LC Q UC W 127 DAC ,22,LETA,,30,LETA 7622 LC R UC X 130 DAC ,23,LETA,,31,LETA 7623 LC S UC Y 131 DAC ,24,LETA,,32,LETA 7624 LC T UC Z 132 DAC ,25,LETA,,61,SEDE 7625 LC U OB 133 DAC ,26,LETA,,75,SEDE 7626 LC V RVS 134 DAC ,27,LETA,,62,SEDE 7627 LC W CB 135 DAC ,30,LETA,,76,CHAA 7630 LC X CF 136 DAC ,31,LETA,,65,SEDE 7631 LC Y UL 137 DAC ,32,LETA,I,,CHAA 7632 LC Z GV 140 DAC I,,CHAA,,01,LETA 7633 LB LC A 141 DAC I,,CHAA,,02,LETA 7634 VL LC B 142 DAC I,,CHAA,,03,LETA 7635 RB LC C 143 DAC I,,CHAA,,04,LETA 7636 TL LC D 144 DAC I,,CHAA,,05,LETA 7637 BRK LC E 145 DAC I,,CHAA,,06,LETA 7640 NUL LC F 146 DAC I,,CHAA,,07,LETA 7641 SOH LC G 147 DAC I,,CHAA,,10,LETA 7642 STX LC H 150 DAC I,,CHAA,,11,LETA 7643 ETX LC I 151 DAC I,,CHAA,,12,LETA 7644 EOT LC J 152 DAC I,,CHAA,,13,LETA 7645 ENQ LC K 153 DAC I,,CHAA,,14,LETA 7646 ACK LC L 154 DAC I,,CHAA,,15,LETA 7647 BEL LC M 155 DAC I,,CHAA,,16,LETA 7650 BS LC N 156 DAC I,,CHAA,,17,LETA 7651 HT LC O 157 DAC I,,CHAA,,20,LETA 7652 LF LC P 160 DAC I,,CHAA,,21,LETA 7653 VT LC Q 161 DAC I,,CHAA,,22,LETA 7654 FF LC R 162 DAC I,,CHAA,,23,LETA 7655 CR LC S 163 DAC I,,CHAA,,24,LETA 7656 SO LC T 164 DAC I,,CHAA,,25,LETA 7657 SI LC U 165 DAC I,,CHAA,,26,LETA 7660 DLE LC V 166 DAC I,,CHAA,,27,LETA 7661 DC1 LC W 167 DAC I,,CHAA,,30,LETA 7662 DC2 LC X 170 DAC I,,CHAA,,31,LETA 7663 DC3 LC Y 171 DAC I,,CHAA,,32,LETA 7664 DC4 LC Z 172 DAC I,,CHAA,I,,CHAA 7665 NAK LB 173 DAC I,,CHAA,I,,CHAA 7666 SYN VL 174 DAC I,,CHAA,I,,CHAA 7667 ETB RB 175 DAC I,,CHAA,I,,CHAA 7670 CAN TL 176 DAC I,,CHAA,I,,CHAA 7671 EM BRK 177 DAC I,,CHAA 7672 SUB DAC I,,CHAA 7673 ESC DAC I,,CHAA 7674 FS DAC I,,CHAA 7675 GS DAC I,,CHAA 7676 RS DAC I,,CHAA 7677 US TDVB SPACE 4,10 ** TDVB - TABLE OF DEFINED VERBS. * * THIS TABLE DEFINES ALL THE LEGAL VERBS FOR *IEDIT*. * EACH OF THESE LEGAL VERBS EXIST IN ALL ALLOWED FORMS * (I.E. ALL VERBS WITH ABBREVIATIONS HAVE THOSE ABBREVIATIONS * INCLUDED IN THE TABLE.) * THIS TABLE ALSO CONTAINS THE PROCESSES ASSOCIATED WITH * EACH VERB. THE ADDRESS OF THAT PROCESS AND WHETHER IT IS * REQUIRED FOR THAT PROCESS BE CALLED IN ORDER FOR THE * RESPECTIVE VERB TO BE LEGAL. TDVB BSS 0 LOC 0 VERB ALTER,*,((GLS,O),(GSP,R)),FNAL VERB DELETE,*,((GLS,R),(GSS,O),(,A),(GSS,R)),FNDE VERB DUP,,((GSR,R),(GLI,R),(GIN,O),(,A),(GSR,R),(GLI,O)),FNDU VERB LIST,*,((GLS,O),(GSS,O)),FNLI VERB LNH,,((GLS,O),(GSS,O)),FNLI VERB READ,*,((GFN,R),(GLI,R),(GIN,O),(,A),(GFN,R),(GLI,O)),FNRE VERB MOVE,*,((GSR,R),(GLI,R),(GIN,O),(,A),(GSR,R),(GLI,O)),FNMO VERB WRITE,,((GFN,R),(GLS,O),(GSS,O)),FNWR VERB WRITEN,,((GFN,R),(GLS,O),(GSS,O)),FNWN VERB LOC *O ** PRESET COMMON DECKS. *CALL COMCARG SPACE 4,10 MINSZ EQU * OVLDEF OVLY,PBR,1,(BASIC RESEQUENCING ROUTINES.) SPACE 4,5 PBR SPACE 4,15 ** PBR - PERFORM *BASIC* RESEQUENCING. * * EXIT *BASIC* RESEQUENCING COMPLETED. * * USES X - 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * B - 2. * * CALLS PEF, PNL, POL, SLN, SSF. * * MACROS READEI, REWIND, WRITER. PBR SUBR ENTRY/EXIT SX6 L SA6 LBFET SA1 NTL SAVE NUMBER OF TRUNCATED LINES BX6 X1 MX1 42 SA6 PBRA SA3 LBFILE NZ X3,PBR1 IF WRITTEN TO DISK SA5 E SET EOI STATUS IN FET *E* SX6 741031B BX6 -X1*X6 BX5 X1*X5 BX6 X5+X6 SA6 A5 EQ PBR2 PROCESS NON-OVERLAPPED LINES PBR1 REWIND E,R REWIND FILE CONTAINING SELECTED LINES READEI X2 PBR2 SA5 NNOL NUMBER OF NON-OVERLAPPED LINES RJ PNL PROCESS NON-OVERLAPPED LINES SA1 FNUM GET FUNCTION NUMBER SA2 OVLPFG SX1 X1-FNMO NZ X2,PBR3 IF OVERLAPPED LINES ZR X1,PBR4 IF A *MOVE* COMMAND WRITER L FLUSH I/O BUFFER EQ PBR8 CHECK IF TRUNCATED LINE COUNT HAS CHANGED PBR3 RJ POL PROCESS OVERLAPPED LINES PBR4 SA1 FNUM GET FUNCTION NUMBER SA2 LRT GET FIRST *LRT* ENTRY SX1 X1-FNMO SA5 OLLE GET OVERLAPPED LINE RANGE TABLE ENTRY SX6 B1 SET NUMBER OF *LRT* ENTRIES TO ONE NZ X1,PBR6 IF NOT A *MOVE* COMMAND MX1 1 SA3 OVLPFG ZR X3,PBR7 IF NO OVERLAPPED LINES IX3 X5-X2 ASSURE SORTED LINE RANGE TABLE SX6 B1+B1 SET NUMBER OF *LRT* ENTRIES TO TWO PL X3,PBR5 IF *LRT* WILL BE IN ASCENDING ORDER BX3 X2 EXCHANGE *LRT* ENTRIES BX2 X5 BX5 X3 PBR5 BX7 -X1*X2 SA7 A2 STORE *LRT* ENTRY SA2 A2+B1 PBR6 SA6 NELR STORE NUMBER OF *LRT* ENTRIES BX7 X5 SA7 A2 STORE *LRT* ENTRY PBR7 SA5 EFN PUT EDIT FILE NAME INTO FET *E* SX2 E RJ SLN SET LOCAL FILE NAME REWIND X2,R READEI X2 RJ PEF PROCESS ENTIRE EDIT FILE PBR8 SA1 NTL SA2 PBRA IX1 X1-X2 SX6 B1+ SET *WRITTEN TO DISK* FLAG FOR FET *L* SA6 LBFILE ZR X1,PBRX IF TRUNCATED LINE COUNT NEVER CHANGED WRITER TRNCFET FLUSH TRNCFET I/O BUFFER SB2 X2 SORT TRUNCATED LINES RJ SSF SORT SELECTED FILE SA6 NTL STORE NEW TRUNCATED LINE COUNT EQ PBRX RETURN PBRA CON 0 STORAGE FOR TRUNCATED LINE COUNT PEF SPACE 4,15 ** PEF - PROCESS EDIT FILE. * * ENTRY FET *E* REWOUND AND READ INTO I/O BUFFER. * * EXIT BASIC LINE PROCESSING PERFORMED, SELECTED LINES * WRITTEN TO FET *L*, FET *L* SORTED IF NECESSARY. * * USES X - 0, 1, 2, 3, 5, 6, 7. * A - 1, 2, 3, 5, 6, 7. * B - 2, 3, 4, 6, 7. * * CALLS ABL, BLP, CLN, PLB, SSF, USB, WTL. * * MACROS READC, WRITEC, WRITER. PEF SUBR ENTRY/EXIT PEF1 READC E,PCKDBF,MXWL+1 READ LINE FROM FET *E* NZ X1,PEF5 IF EOI ON FET *E* MX0 -12 BX7 -X0*X4 SA7 PEFA SET *CLEAR OUT PARTIAL LINE* FLAG SA5 PCKDBF RJ CLN CHECK IF LINE NUMBER IN LINE RANGE TABLE NZ X4,PEF3 IF LINE IS NOT TO BE PROCESSED SA6 PEFD SAVE BINARY LINE NUMBER SA7 PEFE SAVE NUMBER OF CHARACTERS IN LINE NUMBER SB2 PCKDBF SA1 CSTI CHARACTER SET SB6 MXCIL+1 SB3 X1 RJ USB UNPACK STRING BUFFER SA1 F.LNTBUF FWA OF *LNT* SA2 NMLS NUMBER OF *LNT* ENTRIES SA5 LTFILE SX3 B0+ ZR X5,PEF2 IF *LNT* IS NOT WRITTEN TO DISK SA3 LTFET FET ADDRESS PEF2 SA5 PEFE RESEQUENCE ONE *BASIC* COMMAND IX2 X2+X1 SB2 B7+B1 SB7 X5+CLIN SX5 B1+ SX6 CLIN+MXCIL RJ BLP ZR X2,PEF3 IF NO RESEQUENCING TOOK PLACE SA2 PEFA GET PARTIAL LINE FLAG BX6 X2+X1 SA6 PEFC IF TRUNCATED BY READ IN OR BY *BLP* SX7 B1 SA7 PEFB SET SORT FET *L* FLAG SX7 B7-CLIN ADD BLANKS TO LINE SA2 PEFE SA7 NCOL SAVE NUMBER OF CHARACTERS RJ ABL SB4 X7+ NUMBER OF CHARACTERS NOW IN LINE SA1 PCKDBF PACK LINE INTO BUFFER SA2 CLIN SB2 60 RJ PLB WRITEC L,PCKDBF WRITE CHANGED LINE TO FET *L* SA2 PEFC CHECK IF TRUNCATED BY READ OR BY *BLP* ZR X2,PEF1 IF LINE NOT TRUNCATED SA1 PEFD WRITE TRUNCATED LINE RJ WTL PEF3 SA1 PEFA ZR X1,PEF1 IF NO PARTIAL LINE TO CLEAR OUT PEF4 READC E,PCKDBF,MXWL+1 THROW AWAY REMAINDER OF LINE MX0 -12 BX7 -X0*X4 NZ X7,PEF4 IF EOL NOT YET FOUND EQ PEF1 READ NEXT LINE PEF5 WRITER L FLUSH I/O BUFFER SA1 PEFB ZR X1,PEFX IF NO NEED TO SORT FET *L* SB2 X2+ RJ SSF SORT SELECTED FILE EQ PEFX RETURN PEFA CON 0 PARTIAL LINE FLAG PEFB CON 0 SORT FET *L* FLAG (CHANGED LINES) PEFC CON 0 TRUNCATE BY READ OR *BLP* FLAG PEFD CON 0 BINARY LINE NUMBER PEFE CON 0 NUMBER OF CHARACTERS IN LINE NUMBER PLN SPACE 4,15 ** PLN - PROCESS LINE. * * ENTRY *PCKDBF* HOLDS THE LINE TO BE PROCESSED. * * EXIT BASIC LINE PROCESSING PERFORMED, TRUNCATED LINE * COUNT UPDATED, AND LINE WRITTEN TO FET *L*. * * USES X - 1, 2, 3, 5, 7. * A - 1, 2, 3, 5, 7. * B - 2, 3, 4, 6, 7. * * CALLS ABL, BLP, PLB, USB, VPL, WTL. * * MACROS WRITEC. PLN SUBR ENTRY/EXIT SB2 PCKDBF UNPACK STRING BUFFER SA1 CSTI SB3 X1+ SB6 MXCIL+1 RJ USB SA1 F.LNTBUF RESEQUENCE ONE *BASIC* COMMAND SA2 NMLS SA3 LTFET IX2 X2+X1 SB2 B7+B1 SB7 CLIN+NUMD SX6 CLIN+MXCIL SA5 LTFILE NZ X5,PLN1 IF *LNT* IS WRITTEN TO DISK SX3 B0 SX5 B1 SET SORTED *LNT* PLN1 RJ BLP *BASIC* LINE PROCESSOR ZR X2,PLN3 IF LINE WAS NOT RESEQUENCED SX7 B7-CLIN SA7 NCOL ZR X1,PLN2 IF LINE WAS NOT TRUNCATED SA5 PCKDBF EVALUATE PACKED LINE NUMBER RJ VPL BX1 X6 WRITE TRUNCATED LINE NUMBER RJ WTL PLN2 SX2 NUMD ADD BLANKS TO LINE RJ ABL SB4 X7+ PACK LINE INTO BUFFER SA1 PCKDBF SA2 CLIN SB2 60 RJ PLB PLN3 WRITEC L,PCKDBF WRITE CHANGED LINE TO *L* EQ PLNX RETURN PNL SPACE 4,20 ** PNL - PROCESS NON-OVERLAPPED LINES. * * ENTRY (X5) = NUMBER OF NON-OVERLAPPED LINES. * * EXIT NON-OVERLAPPED LINES PROCESSED. * * USES X - 1, 2, 5. * A - 0, 2. * * CALLS PLN. * * MACROS READC, WRITEC. * * NOTE THE NUMBER OF NON-OVERLAPPED LINES IS HELD IN (A0) * DURING THE LOOP AT *PNL2* SINCE *BLP* USES ALL * REGISTERS EXCEPT (A0) AND (A5). PNL2 READC E,PCKDBF READ LINE FROM FET *E* RJ PLN PROCESS LINE SA0 A0-B1 DECREMENT NON-OVERLAPPED LINE COUNT SX1 A0 NZ X1,PNL2 IF MORE NON-OVERLAPPED LINES PNL SUBR ENTRY/EXIT SA0 X5+ SAVE NUMBER OF NON-OVERLAPPED LINES SA2 UNRF ZR X2,PNL2 IF NOT AN UNNUMBERED *READ* FILE PNL1 READC E,PCKDBF READ LINE FROM FET *E* WRITEC L,PCKDBF WRITE LINE TO FET *L* SX5 X5-1 NZ X5,PNL1 IF MORE NON-OVERLAPPED LINES EQ PNLX RETURN POL SPACE 4,10 ** POL - PROCESS OVERLAPPED LINES. * * ENTRY (X1) = 0, IF A *MOVE* FUNCTION. * = NONZERO, OTHERWISE. * * EXIT OVERLAPPED LINES PROCESSED. * * CALLS PLN, RNE. * * MACROS READC. POL SUBR ENTRY/EXIT ZR X1,POL1 IF A *MOVE* COMMAND RJ RNE REMOVE NON - OVERLAPPED *LNT* ENTRIES POL1 READC E,PCKDBF READ LINE FROM FET *E* NZ X1,POLX IF EOR ON FET *E* RJ PLN PROCESS LINE EQ POL1 READ NEXT LINE RNE SPACE 4,15 ** RNE - REMOVE NON-OVERLAP *LNT* ENTRIES. * * *RNE* REMOVES ALL ENTRIES IN THE LINE NUMBER TABLE * WHICH DO NOT HAVE THE OVERLAP BIT SET. * * ENTRY (LTFILE) = 0, IF THE *LNT* IS BUFFER RESIDENT. * 1, IF THE *LNT* IS MASS STORAGE RESIDENT. * * EXIT *LNT* UPDATED. * * USES X - 0, 1, 2, 6, 7. * A - 1, 2, 6, 7. * B - 7. * * MACROS READEI, READO, REWIND, WRITEO, WRITER. RNE SUBR ENTRY/EXIT SA1 LTFILE NZ X1,RNE3 IF *LNT* RESIDES ON MASS STORAGE SA1 F.LNTBUF SA2 NMLS SX0 B1 LX0 FOVL-0 SET UP OVERLAP BIT MASK SB7 X1 FWA OF TABLE SA1 X1 GET FIRST ENTRY RNE1 BX6 X0*X1 ZR X6,RNE2 IF OVERLAP BIT NOT SET BX6 X1 SA6 B7+ STORE OVERLAP *LNT* ENTRY SB7 B7+1 RNE2 SA1 A1+1 SX2 X2-1 NZ X2,RNE1 IF MORE ENTRIES TO PROCESS SA1 F.LNTBUF SX6 B7 IX6 X6-X1 SA6 NMLS UPDATE NUMBER OF *LNT* ENTRIES EQ RNEX RETURN RNE3 SA2 LT2FET REWIND X2,R REWIND THE SCRATCH FILE SA2 LTFET REWIND X2,R READEI X2 PREPARE THE *LNT* FILE SX0 B1 LX0 FOVL-0 SET MASK FOR THE TRUNCATE BIT SA1 LTFET SA2 LT2FET REVERSE THE FILE NAMES BX6 X1 BX7 X2 SA7 A1+ SA6 A2+ RNE4 SA2 LT2FET READO X2 GET NEXT ENTRY NZ X1,RNE5 IF NO MORE ENTRIES TO PROCESS BX2 X0*X6 ZR X2,RNE4 IF NOT AN OVERLAP ENTRY SA2 LTFET WRITEO X2 ADD THE OVERLAP ENTRY TO THE NEW *LNT* EQ RNE4 PROCESS NEXT ENTRY RNE5 SA2 LTFET WRITER X2 FLUSH THE *LNT* TO THE FILE EQ RNEX RETURN LIST X *CALL COMCBLP TTL IEDIT - IN-LINE EDITOR. MEM2 EQU * MANAGED TABLES START ADDRESS QUAL MAKE *MEML* A GLOBAL SYMBOL * DEFINITION OF MEML IS CHANGED DURING PRESET TO MATCH * ACTUAL OVERLAY SIZES AND UTILIZATION. THE *ERRNG* CHECKS * ARE FOR THE WORST POSSIBLE CASES. MEM2 EQU /IEDIT1/MEM2 MEML EQU MEM MFL= EQU 17400B SSM= EQU 0 ERRNG MEM-MEM2 ERRNG MFL=-MEM-BUFL ERRNG MFL=-MEM-BUFL2 ERRNG MFL=-MEM2-BUFL ERRNG MFL=-MINSZ END