IDENT XEDIT,111B,XEDIT,0,0 ABS ENTRY XEDIT ENTRY RFL= SST IR SYSCOM B1 LIST F TITLE XEDIT - EXTENDED INTERACTIVE TEXT EDITOR. *COMMENT XEDIT - EXTENDED INTERACTIVE TEXT EDITOR. COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992. XEDIT SPACE 4,10 ***** XEDIT - EXTENDED INTERACTIVE TEXT EDITOR. * D. W. MEARS 72/08/01. * W. C. WELLS 76/04/29. * REVISED 77/04/01. * B.C. ANTIN 79/03/09. * * XEDIT IS AN INTERACTIVE TEXT EDITOR CAPABLE OF CREATING * AND MODIFYING A TEXT FILE QUICKLY, EASILY, AND ACCURATELY. SPACE 4,10 *** XEDIT IS AN INTERACTIVE TEXT EDITOR CAPABLE OF CREATING * AND MODIFYING A TEXT FILE QUICKLY EASILY AND ACCURATELY. SPACE 4,10 *** XEDIT COMMAND CALL. * * XEDIT,EDITFIL,OPTIONS. * * WHERE EDITFIL IS THE FILE TO BE EDITED. IF THE EDITFIL IS * NOT SPECIFIED, THE PRIMARY FILE IS USED. IF NO PRIMARY IS * FOUND, XEDIT WILL USE *TAPE1*. * * THE OPTIONS ARE - * * OPTION DESCRIPTION/ACTION * ------ ------------------ * * AS TURNS ON ASCII PROCESSING. ASCII IS DEFAULT IF THE * TERMINAL IS IN ASCII MODE. IF IT IS NOT IN ASCII, * THIS PARAMETER WILL TURN ON ASCII FOR XEDIT ONLY. * * B DENOTES BATCH PROCESSING. THIS PARAMETER IS ASSUMED * FOR NON-TELEX ORIGIN JOBS. * * C DENOTES CREATION MODE. THE USER, IN THIS MODE, CAN * CREATE A TEXT FILE FROM AN EMPTY FILE. * * DB DEBUG. INHIBITS INTERRUPT CONTROL. * * FR INSTRUCTS XEDIT TO SCAN THE FIRST LINE OF THE XEDIT * EDIT FILE FOR THE INITIAL COMMAND. XEDIT ASSUMES * THAT THE COMMAND BEGINS WITH THE FIRST NON-BLANK * CHARACTER WHICH OCCURS AFTER 2 CONSECUTIVE BLANKS. * THIS FEATURE ALLOWS THE COMMAND TO BE PLACED INTO A * COMMENT STRING IN MOST LANGUAGES. * NOTE- ONLY ONE COMMAND IS ALLOWED. MULTIPLE COMMANDS * ARE ALLOWED VIA THE Y/Z COMMANDS. ALSO, THIS COMMAND * IS EXECUTED BEFORE ANY COMMANDS FOLLOWING THE * TERMINATOR ON THE *XEDIT* COMMAND. * * LK DENOTES LOOK MODE. IN LOOK MODE, THE EDIT * FILE CAN BE EXAMINED, BUT NOT MODIFIED. * * NH NO HEADER, CANCELS THE ISSUEING OF THE XEDIT VERSION * MESSAGE. * * P CAUSES EDITFIL TO BE RETRIEVED FROM THE PERMANENT * FILE CATALOG. * * I=IFN CAUSES XEDIT TO READ INPUT DIRECTIVES FROM FILE IFN. * * L=LFN CAUSES NORMAL XEDIT PRINTOUT TO BE PLACED ON FILE * LFN INSTEAD OF BEING PRINTED AT THE TERMINAL. * * DEFAULTS FOR THE PARAMETERS DEPEND ON ORIGIN TYPE. * FOR TELEX ORIGIN, XEDIT ASSUMES THE FOLLOWING: * *AS* PARAMETER IS SET (DEPENDING ON CHARACTER SET). * FOR BATCH ORIGIN * *B* PARAMETER IS SET. TO PROCESS ASCII FILES, USE THE * *AS* PARAMETER. * * THE SPECIAL INPUT PROMPT OF A DOUBLE QUESTION MARK WILL BE * ISSUED ONLY IF BOTH THE INPUT AND OUTPUT FILES ARE ASSIGNED * AS TYPE *TT*. * * THE FIRST LINES OF INPUT TO XEDIT MAY BE SPECIFIED ON * THE XEDIT COMMAND. TO DO THIS, FOLLOW THE TERMINATOR OF THE * COMMAND WITH A DELIMITER AND THE LINES OF INPUT SEPARATED BY * THE SAME DELIMITER CHARACTER. SPACE 4 ** CONDITIONAL ASSEMBLY OPTIONS. * * SYMBOL FUNCTION * ------ -------- * * CYBRNET ASSEMBLES A MODIFIED XEDIT FOR USE BY CYBERNET. * * DEBUG IF = 1, ASSEMBLE VARIOUS PIECES OF DEBUGGING CODE. * IF = 0, DO NOT ASSEMBLE DEBUG CODE. * * FILEOV DETERMINES WHERE THE OVERLAYS WILL BE LOADED FROM. * IF = 0, THEN LOAD OVERLAYS FROM LOCAL FILE. FILE * NAME IS CONTAINED IN *ACTR*. * IF = 1, THEN LOAD OVERLAYS FROM THE SYSTEM. * * TIMES ASSEMBLES TIMING CODE. THIS CODE ISSUES THE * ELSAPED TIME BETWEEN ENTRIES INTO THE COMMAND * PARSER. THE IS GIVEN IN THOUSANDTHS OF SECONDS * AND SHOULD BE ASSEMBLED ONLY WITH KRONOS LEVEL 10+ * OR NOS. DEBUG SET 0 NO DEBUG FILEOV SET 1 LOAD OVERLAYS FROM SYSTEM CYBRNET SET 0 CYBERNET VERSION * END OF CONDITIONAL ASSEMBLY OPTIONS. SPACE 4,10 ** REGISTER CONVENTIONS. * * IN GENERAL, THE FOLLOWING REGISTERS CAN BE ASSUMED TO * CONTAIN SPECIFIC INFORMATION, OR ARE AVAILABLE UNDER THE * DESCRIBED CIRCUMSTANCES. * * A5, X5 = DURING THE PARSING OF THE CURRENT COMMAND, THESE * REGISTERS POINT/CONTAIN THE CURRENT CHARACTER UNDER * INVESTIGATION. A NEGATIVE WORD INDICATES AN END * OF COMMAND. THIS CONVENTION FORCES ALL ROUTINES * CALLED BY THE PARSER TO AVOID USING THESE * REGISTERS. A PARTIAL LIST OF THE SUBROUTINES * AFFECTED ARE - * *TOP*, *RDF*, *WTF*, *UPL*, *RTOA*. * ANY ROUTINE WHOSE PARAMETERS ARE COMPLETELY PARSED * WITHIN THE COMMAND ROUTINE CAN USE THESE REGISTERS. * THEY SHOULD NOT BE USED BY ANY SUBROUTINES. * * A0 = SCRATCH REGISTER. ANY COMMAND PROCESSOR CAN USE THIS * FOR SCRATCH PURPOSES. SUBROUTINES ARE NOT * TO USE A0. * * B1 = 1. SPACE 4,10 ** FLAG CONVENTIONS. * * -A FLAG OR TOGGLE IS *ON* IF THE FLAG/TOGGLE IS NEGATIVE. * * -A FLAG OR TOGGLE IS *TRUE* IF THE FLAG/TOGGLE IS NEGATIVE. * * -THE FOLLOWING MATRIX HOLDS FOR THE VARIOUS COMBINATIONS OF * E.CMODE AND E.LMOD WITH REGARD TO E.LINE AND E.STR. * * . E.CMODE = 0 . E.CMODE = 1 * *----------------------------*----------------------------* * E.LMOD=0 . E.LINE = CORRECT LINE IMAGE. E.LINE = CORRECT LINE IMAGE. * . E.STR = GARBAGE . E.STR = CORRECT LINE IMAGE. * . . (EITHER CAN BE USED SAFELY). * *----------------------------*----------------------------* * E.LMOD=1 . THIS CONDITION IS UNDEFINED. E.LINE = GARBAGE . * . --NEVER-- DEFINE IT . E.STR = CORRECT LINE IMAGE. * . . . * *----------------------------*----------------------------* * * THUS, IF E.LMOD = 0, THE CODED LINE CAN BE WRITTEN. * IF E.CMODE = 1, THE LINE IS UNPACKED TO THE STRING BUFFER. * IF E.CMODE = 1 AND E.LMOD = 1 THEN THE LINE *MUST* BE * REPACKED BEFORE USING (E.LMOD IS THEN SET TO 0). SPACE 4,10 ** END OF LINE/STRING CONVENTIONS. * * WITHIN XEDIT, THERE ARE SEVERAL NOTATIONS USED TO DENOTE THE * END OF A LINE, STRING, ETC.. TO AVOID CONFUSION, THE * FOLLOWING IS THE DIFFERENCES BETWEEN THE REPRESENTATIONS. * * A TRUE END OF LINE CONSISTS OF A MASK OF 2 BITS (ALWAYS) * * AN END OF STRING IS DENOTED BY THE CHARACTER ORED WITH A * MASK OF 1 BIT. * * THIS METHOD ALLOWS THE USER TO ALWAYS SET BIT 59 IF HE WANTS * AN END OF LINE, AND YET TELL THE TWO FORMS APART WHEN ONE * HAS TO RESET THE PSEUDO END OF LINE. SPACE 4,10 *** ASSEMBLY CONSTANTS. BUFAL EQU 1401B SCRATCH FILE BUFFER LENGTH BUFBL EQU 1401B SECOND SCRATCH BUFFER LENGTH BUFCL EQU 201B ALTERNATE INPUT BUFFER LENGTH BUFDL EQU 201B COPY BUFFER LENGTH BUFIL EQU 101B INPUT BUFFER LENGTH BUFOL EQU 301B OUTPUT BUFFER LENGTH BUFRL EQU 501B READ BUFFER LENGTH (LOCAL TO OVL2) MINWD EQU 10D MINIMUM LINE WIDTH MAXWD EQU 160D MAXIMUM LINE WIDTH M.ASCII EQU 1 ASCII MODE SETTING M.CODED EQU 0 CODED MODE SETTING NTABS EQU 8 NUMBER OF AVAILABLE TAB STOPS VERSION MICRO 1,,$XEDIT 3.1.00$ ORG 111B TITLE MACROS AND COMMON DECKS. * COMMON DECKS. *CALL COMCMAC *CALL COMSPFM *CALL COMSLFD CHAR SPACE 4,15 ** CHAR - SET UP CALL TO *CHAR=* MACRO TO PRESET CHARACTERS. * * CHAR A,B * * ENTRY *A* = INSTRUCTION IN WHICH SUBSTITUTION WILL OCCUR. * *B* = CHARACTER MNEMONIC TO SUBSTITUTE. * THE REPLACEMENT IS DONE WITH BOOLEAN OR, THUS THE * INVERSE CHARACTER VALUE CAN BE OBTAINED BY SETTING UP * A NEGATIVE FIELD. * * EXIT INSTRUCTION *A* IS ENTERED. * AN ENTRY IS MADE IN THE CHARACTER REPLACEMENT TABLE. NOREF .CH1,.CH2 PURGMAC CHAR CHAR MACRO A,B A .CH1 SET *P IFGT .CH1,59,3 .CH1 SET 0 .CH2 SET *-1 SKIP 1 .CH2 SET * CHAR= .CH1,.CH2,B ENDM CHAR CHAR= SPACE 4,10 ** CHAR= - FORM ENTRY INTO CHARACTER REPLACEMENT TABLE. * * * CHAR= A,B,C * ENTRY *A* = LEFT SHIFT COUNT TO POSITION CHARACTER. * *B* = WORD TO REPLACE INTO. * *C* = ADDRESS OF DESIRED CHARACTER REPLACEMENT WORD. * * EXIT AN ENTRY IS MADE IN CHARACTER REPLACEMENT TABLE. PURGMAC CHAR= CHAR= MACRO A,B,C USE SETCHAR VFD 12/A+2000B,30/B,18/C USE * ENDM CHAR= * INITIALIZE SETCHAR USE BLOCK. USE SETCHAR CHARSET BSS 0 USE * COMMAND SPACE 4,20 ** COMMAND - DEFINE AN XEDIT COMMAND TABLE ENTRY. * * ID COMMAND LONG,SHORT,PARMS,MOD,ADDR,SPECIAL,OVRL * * ENTRY *ID* = XEDIT COMMAND IDENTIFIER. * *LONG* = LONG FORM OF COMMAND. * *SHORT* = SHORT FORM OF COMMAND. * *PARMS* = SPECIFIED PARAMETER CRACKING. * *ADDR* = JUMP ADDRESS FOR ROUTINE. * *MOD* = OPTIONAL MODIFIER FIELD. * *OVL* = OVERLAY NEEDED TO EXECUTE COMMAND, IF NEEDED. * *SPECIAL* = REPEATING PARAMETER WHOSE ARGUMENTS ARE - * *CR* = COMMAND VALID IN CREATION MODE. * *F0* = NUMBER PARAMETER MUST BE FORCED * ZERO, IF COMMAND IS EXECUTED IN *INPUT * MODE. * *LK* = COMMAND VALID ON LOOK MODE. * *IN* = COMMAND VALID IN INPUT MODE. * * EXIT COMMAND TABLE ENTRY IS DEFINED. MXOVL SET 0 SET NUMBER OF OVERLAYS PURGMAC COMMAND MACRO COMMAND,NM,LONG,SHORT,PARMS,MOD,ADDR,SPL,OVRL IFC NE,$SHORT$$,1 IRP SHORT DATA 0L_SHORT IRP IFC NE,$LONG$$,2 DATA 0L_LONG MHELP LONG,SHORT C.A SET PARMS 0 IRP SPL POS /OPTS/SPL+1 VFD 1/1 IRP POS 60 .. IFC NE,$OVRL$$ C.D MICRO 4,4,$_OVRL_$ VFD 2/2,10/-OVL POS 36 VFD 18/NM-1,18/"C.D" CMD_"C.D" RMT QUAL NM BSS 0 QUAL * COMMAND (),(),PARMS,MOD,ADDR,(_SPL_) RMT . IFGT "C.D",MXOVL,1 MXOVL SET "C.D" .. ELSE NM VFD 2/2,10/-C.A POS 36 VFD 18/MOD,18/ADDR .. ENDIF ENDM COMMAND DEVICE SPACE 4,20 ** DEVICE - DEFINE INPUT DEVICE. * * *N DEVICE FET,ACTIVE,CMDPOP * * ENTRY *N* = 1 CHARACTER SYMBOL FOR NAME OF DEVICE. * *FET* = ADDRESS OF FET ASSOCIATED WITH DEVICE, * IF ONE EXISTS. * *ACTIVE* = DEVICE IS ACTIVE (SET ONLY ON *I* DEVICE). * *CMDPOP* = POP STACK IF READ REQUIRED FOR NEXT * COMMAND, ELSE READ LINE IF FOR DATA. * * EXIT N.LINE = FWA OF CODED LINE BUFFER FOR DEVICE. * N.DEV = ADDRESS OF DEVICE DEFINITION FOR * ROUTINE, *STK*. * A DEVICE DEFINITION BLOCK IS GENERATED. PURGMAC DEVICE MACRO DEVICE,N,FET,ACTIVE,CMDPOP N_.LINE BSSZ 33D IFC NE,$CMDPOP$$,1 VFD 1/1 VFD *P/FET N_.DEV BSS 0 IFC EQ,$ACTIVE$$,2 CON -1 SKIP 1 CON 0 VFD 1/0,11/0,30/,18/-1 ENDM DEVICE ERRMSG SPACE 4,25 ** ERRMSG - DEFINE XEDIT ERROR MESSAGES. * * *NAME ERRMSG BELLS,TEXT * * ENTRY *NAME* = THE NAME OF THE ERROR MESSAGE. * *BELLS* = THE NUMBER OF BELLS TO ISSUE BEFORE * THE MESSAGE. * *TEXT* = THE TEXT OF THE MESSAGE. * * THIS MACRO GENERATES A TABLE OF POINTERS TO THE ERROR * MESSAGES (FOR USE BY *EXPLAIN*). THE TEXT OF THE MESSAGES * IS PUT INTO REMOTE BLOCK *ERRMSG*. THIS BLOCK IS ASSUMED TO * BE ASSEMBLED IMMEDIATELY AFTER THE MACRO CALLS. A SIMILIAR * BLOCK IS MADE FOR USE BY THE *NOBELLS* COMMAND. THIS BLOCK * CONTAINS THE ERROR MESSAGES BUT WITHOUT THE BELLS IN THEM. * (THIS TABLE IS IN REMOTE BLOCK *ERROVL*) * IN ADDITION, THE *NO BELLS* TABLE IS ALSO DUPLICATED IN * ANOTHER REMOTE BLOCK CALLED *ERRPRS*. THIS BLOCK IS * DESIGNED TO BE ASSEMBLED IN THE PRESET CODE. THIS ALLOWS * BATCH ORIGIN OUTPUT TO LOOK NICE BY REMOVING ALL THE * BELL SYMBOLS AND CONTROL BYTES. A LEADING BLANK IS ADDED. PURGMAC ERRMSG MACRO ERRMSG,NAME,BELLS,TEXT LOCAL Y ... IFC NE,^_TEXT_^^ .. IFC NE,$NAME$$,1 NAME BSS 0 CON Y ERRMSG RMT .C MICRO 1,,^_TEXT_^ .F MICCNT .C .B SET BELLS*2 .B SET .A-.B .C MICRO 1,.B,^_TEXT_^ .D MICRO .B+1,,^_TEXT_^ Y BSS 0 . IFC NE,$NAME$$,1 VFD 12/0011B DUP BELLS,1 CHAR (VFD 12/0),BL. .. IFLE .F+2,.B,4 .E DECMIC .F .F SET .F*6 VFD .F/_".E"_H_".C"_,*P/ .. SKIP 3 .E DECMIC .B VFD *P/_".E"_H_".C" DATA C^_".D"_^ RMT .. IFC NE,$NAME$$,6 ERROVL RMT ERRMSG 0,(_TEXT_) RMT ERRPRS RMT ERRMSG 0,( TEXT_) RMT ... ELSE .. IFC NE,^NAME^^,10 ERROVL RMT LOC ERRBASE ERRMSG LOC *O RMT ERRPRS RMT LOC ERRBASE ERRMSG LOC *O RMT ERRMSG HERE ... ENDIF ENDM ERRMSG * PRESET REMOTE BLOCKS. ERRMSG RMT .A SET 8 RMT ERROVL RMT .A SET 10 CON ERR KLUDGE FOR PFM RMT ERRPRS RMT .A SET 10 CON ERR KLUDGE FOR PFM RMT ERROR SPACE 4,15 ** ERROR - ISSUE ERROR MESSAGE. * * * ERROR PRIMARY,SECONDARY * * ENTRY *PRIMARY* = PRIMARY MESSAGE ORDINAL. * *SECONDARY* = SECONDARY MESSAGE ORDINAL. * * EXIT THE SPECIFIED ERROR MESSAGE IS ISSUED. * (EXPLAIN) = NEW EXPLAIN ENTRY. * * USES B - 2. * * CALLS IEM. PURGMAC ERROR ERROR MACRO PRI,SEC IFC EQ,$SEC$$,2 R= B2,PRI SKIP 1 R= B2,PRI*100B+SEC RJ IEM ENDM ERROR FERROR SPACE 4,20 ** FERROR - ISSUE FILE ERROR MESSAGE. * * * FERROR NAME,PRIMARY,SECONDARY * * ENTRY *NAME* = FILE NAME. * *PRIMARY* = PRIMARY MESSAGE ORDINAL. * *SECONDARY* = SECONDARY MESSAGE ORDINAL. * FILE MESSAGES CANNOT CONTAIN BELLS. * * EXIT SPECIFIED ERROR MESSAGE IS ISSUED. * (EXPLAIN) = NEW EXPLAIN ENTRY. * * USES A - 1. * X - 1. * B - 2. * * CALLS IFM. PURGMAC FERROR FERROR MACRO NAME,PRI,SEC IFC EQ,$SEC$$,2 R= B2,PRI SKIP 1 R= B2,PRI*100B+SEC R= A1,NAME RJ IFM ENDM FERROR HEREL SPACE 4,10 ** HEREL - ASSEMBLE AND LIST REMOTE TEXT. * * * HEREL * * EXIT REMOTE TEXT IS ASSEMBLED AND LISTED. PURGMAC HEREL MACRO HEREL,NAME LIST G ;A HERE LIST * ENDM HEREL MHELP SPACE 4,15 ** MHELP - ASSEMBLE HELP COMMAND DIRECTORY. * * * MHELP A,B. * * ENTRY *A* = LONG FORM OF THE COMMAND. * *B* = SHORT FORM OF THE COMMAND. IF NULL, NO * ENTRY IS MADE. * * NOTES MHELP ASSEMBLES THE HELP COMMAND DIRECTORY USED BY * THE HELP COMMAND. THIS MACRO PLACES THE INFORMATION * IN THE REMOTE BLOCK, *HELP*, FOR ASSEMBLY IN THE HELP * OVERLAY. PURGMAC MHELP MHELP MACRO A,B LOCAL MH5 IFEQ MH2,3,6 MH5 MICRO 1,,$"MH1"$ HELP RMT DATA C$"MH5"$ RMT MH1 MICRO 1,2,$ $ MH2 SET 0 . IFNE MH2,2 MH3 MICRO 1,12,$_A_ $ MH4 MICRO 1,9,$ $ IFC NE,$B$$,1 MH4 MICRO 1,9,$[_B_] $ . ELSE IFC NE,$B$$,3 MH3 MICRO 1,12,$_A_ $ MH4 MICRO 1,,$[_B_]$ SKIP 2 MH3 MICRO 1,,$_A_$ MH4 MICRO 1,1,$ $ . ENDIF MH1 MICRO 1,,$"MH1"_"MH3"_"MH4"_$ MH2 SET MH2+1 ENDM MHELP NOREF MH2 MH1 MICRO 1,1,$ $ MH2 SET 0 OVERLAY SPACE 4,15 *** OVERLAY - LOAD OVERLAY. * * * OVERLAY NAME,LEVEL,SYSTEM,FWA * ENTRY *NAME* = ADDRESS OF FILE NAME IN *L* FORMAT. * *LEVEL* = OVERLAY LEVEL. * *SYSTEM* IF SPECIFIED, OVERLAY WILL BE LOADED FROM * SYSTEM LIBRARY, AND (NAME) = NAME OF * OVERLAY. * *FWA* IF SPECIFIED = ADDRESS AT WHICH OVERLAY WILL * BE LOADED. * EXIT (X1) = OVERLAY ENTRY ADDRESS. * CALLS OVL=. PURGMAC OVERLAY OVERLAY MACRO N,L,S,F LOCAL A A SET 0 IFC NE,$S$$,1 A SET 1 IFC NE,$L$$ SX6 L LX6 6 SX6 X6+A ELSE 1 SX6 A R= X2,F IFC NE,$N$X1$,1 SA1 N RJ =XOVL= ENDM OVERLAY OVLDEF SPACE 4 ** OVLDEF - DEFINE XEDIT OVERLAY * *ADDR OVLDEF LEVEL,ADDR * * ADDR = LOAD ADDRESS IF NOT FWAOVL * LEVEL = LEVEL OF OVERLAY * TITLE = TITLE OF OVERLAY * PRESET= SET IF THIS OVERLAY HAS SPECIAL PRESET CODE. * IF SO, PRESET CODE SHOULD BE A SUBROUTINE ENTITLED * *PRS* (WILL BE RETURNED JUMPED TO). PURGMAC OVLDEF MACRO OVLDEF,ADDR,LVL,TEXT,PRESET QUAL XEDIT_LVL TTL XEDIT_LVL - TEXT TITLE IFC EQ,$ADDR$$,2 IDENT XEDIT_LVL,FWAOVL,XEDIT_LVL,LVL,0 SKIP 1 IDENT XEDIT_LVL,ADDR,XEDIT_LVL,LVL,0 *COMMENT XEDIT - TEXT IFC EQ,$ADDR$$,2 ORG FWAOVL SKIP 1 ORG ADDR NOREF .A,.B,.F,C.A,C.B,C.C,MH2 CMD_LVL HERE QUAL XEDIT_LVL BSS 0 DEFINE PRESET ENTRY POINT QUAL * SA1 CHARSET RJ ICH IFC NE,$PRESET$$,1 RJ PRS EQ PRM39 USE SETCHAR CHARSET BSS 0 USE * ENDM OVLDEF PARAM SPACE 4,10 ** PARAM - DEFINE PARAMETER SYMBOL FOR COMMAND MACRO. * * *LABEL PARAM NAME * * ENTRY *LABEL* = REGULAR LABEL FIELD. * *NAME* = NAME FOR COMMAND MACRO. THIS BECOMES * *LABEL-PRM*. PURGMAC PARAM MACRO PARAM,LABEL,NAME ;A BSS 0 ;B EQU ;A-PRM. ENDM PARAM PREFIX SPACE 4,15 ** PREFIX - DEFINE PREFIX CHARACTERS. * * * PREFIX CHARS * * ENTRY *CHARS* = PREFIX CHARACTER TO BE DEFINED. * IF ALPHABETIC, MACRO WILL GENERATE BOTH AN * UPPER AND LOWER CASE ENTRY. * IF THE PARAMETER CONTAINS MORE THAT 1 CHARACTERS, THE * MACRO WILL ASSUME THAT THE CHARACTER NEEDS TO BE * PRESET AND WILL GENERATE THE PROPER CODE. * * EXIT PREFIX TABLE IS PUT IN REMOTE BLOCK *PREFIX*. PURGMAC PREFIX PREFIX MACRO CHARS LOCAL A,B A BSS 0 B MICRO 1,,Z_CHARS_Z C MICCNT B . IFPL C-2 PREFIX RMT VFD 42/A CHAR (VFD 18/0),CHARS RMT HELPSP RMT CHAR (VFD 6/0),CHARS VFD 30/5H***** CHAR (VFD 18/0),(//_CHARS) VFD 6/0 RMT . ELSE PREFIX RMT VFD 42/A,18/1R_CHARS IFLE 1R_CHARS,26D,1 VFD 42/A,12/76B,6/1R_CHARS RMT HELPSP RMT VFD 6/1R_CHARS,30/5H*****,18/1R_CHARS,6/0 VFD 6/1R_CHARS,30/5H*****,12/76B,6/1R_CHARS,6/0 RMT . ENDIF ENDM PREFIX SPECIAL SPACE 4,10 ** SPECIAL - DEFINE SPECIAL COMMANDS (1 CHARACTER). * * * SPECIAL CHARS * * ENTRY *CHARS* = SPECIAL COMMAND CHARACTER. * IF THE PARAMETER CONTAINS MORE THAN 1 CHARACTER, THE * MACRO WILL ASSUME THAT THE CHARACTER NEEDS TO BE * PRESET AND WILL GENERATE THE PROPER PRESET CODE. * A SPECIAL COMMAND CANNOT BE ALPHABETIC. PURGMAC SPECIAL SPECIAL MACRO CHARS LOCAL A,B A BSS 0 B MICRO 1,,Z_CHARS_Z C MICCNT B . IFPL C-2 SPECIAL RMT VFD 42/A CHAR (VFD 18/0),CHARS RMT HELPSP RMT CHAR (VFD 6/0),CHARS CHAR (VFD 48/0),(//_CHARS) VFD 6/0 RMT . ELSE SPECIAL RMT VFD 42/A,18/1R_CHARS IFLE 1R_CHARS,26D,1 1 ERR INCORRECT TO HAVE SPECIAL COMMAND BE ALPHABETIC. RMT HELPSP RMT VFD 6/1R_CHARS,48/1R_CHARS,6/0 RMT . ENDIF ENDM SPECIAL SPACE 4 ** INITIALIZE -HELPSP- REMOTE BLOCK. * HELPSP RMT VFD 36/6H*****A,18/1RA,6/0 A POSTFIX VFD 36/6H*****W,18/1RW,6/0 W POSTFIX RMT TITLE FETS AND BUFFERS (CODED AND STRING). * FETS CFET BSS 0 COPY FET FOR *CFF* SFET BSS 0 SCRATCH FET FOR STATUS MACRO PFET BSS 0 SCRATCH FET FOR PFM ROUTINES FT BSS 0 SCRATCH FET FOR PFM ROUTINES CON 1 VFD 12/,6/4,18/50,6/7,18/BUFB CON BUFB FET USED BY *CFF* FOR FAST COPIES CON BUFB OUT CON BUFB+BUFBL MUST AGREE WITH INCOMING EDIT FILE VFD 60/ VFD 60/ VFD 60/ VFD 60/ PFN VFD 60/ USER NAME VFD 42/ PASSWORD VFD 18/ERR ERROR ADDRESS VFD 60/ CONTROL WORD FFET BSS 0 ADDRESS OF FIRST ACTUAL FET * ALL FETS UNTIL LFET MUST BE 7 WORDS LONG FTI BSS 0 INPUT FILEC BUFI,BUFIL,FET=7 INPUT FET FTO BSS 0 OUTPUT FILEC BUFO,BUFOL,FET=7 OUTPUT FET FTD BSS 0 SCRD FILEC BUFD,BUFDL,FET=7 COPY FET * RFET FILEC RBUF,BUFRL,ERP,FET=7 FET IN OVERLAY (OVL2) E.IN BSS 0 FTB BSS 0 SCRB FILEC BUFB,BUFBL,FET=7,EPR INCOMING EDIT FILE E.OUT BSS 0 FTA BSS 0 SCRA FILEC BUFA,BUFAL,FET=7,EPR OUTGOING EDIT FILE LFET BSS 0 ADDRESS OF LAST FET + 7 * INPUT DEVICE DEFINITIONS. I DEVICE INPUT,ON MAIN INPUT DEVICE P DEVICE PREVIOUS COMMAND BUFFER S DEVICE INPUT,,POP SPECIAL INPUT MODE ESCAPE Y DEVICE Y/Z COMMAND BUFFER PURGMAC DEVICE VOID USAGE OF MACRO * OTHER CODED BUFFERS. D.LINE BSSZ 33D DATA LINE BUFFER E.LINE BSSZ 33D EDIT LINE BUFFER * BUFFERS (STRING) VFD 12/2000B,30/0,18/-1 CHAR POINTER AND DELIMITER C.STR VFD 2/3,*P/ END OF LINE MARKER BSSZ MAXWD-1 COMMAND STRING BUFFER VFD 2/3,*P/ END OF LINE MARKER DATA 0 LINE WIDTH D.STR BSSZ MAXWD DATA STRING BUFFER D.STRL EQU *-D.STR DATA STRING BUFFER LENGTH VFD 2/3,*P/ END OF LINE MARKER DATA 0 LINE WIDTH E.STR BSSZ MAXWD EDIT LINE BUFFER VFD 2/3,*P/ END OF LINE MARKER BSSZ 1 SCRATCH CELL FOR LOCATES * NOTE- THIS ARRAY CONTAINS PART OF XEDIT PRESET CODE. * CURRENT LINE WIDTH ENDS AT THE LAST NON-BLANK CHARACTER. DATA 0 CURRENT LINE WIDTH E.SCR BSSZ MAXWD SCRATCH BUFFER (MUST BE AFTER E.STR) VFD 2/3,*P/ END OF LINE MARKER BSSZ 1 SCRATCH CELL FOR LOCATE TITLE STORAGE ALLOCATION. * STRING FIELD POINTERS - MAINTAIN ORDER. P1LP DATA 0 STRING FIELD PARAMETERS P1RP DATA 0 PLEASE MAINTAIN ORDER P2LP DATA 0 P2RP DATA 0 P3LP DATA 0 P3RP DATA 0 * EDIT LINE MODE CONTROL - PLEASE MAINTAIN ORDER. E.NMODE DATA 0 EDIT - NEEDED MODE FOR LINE E.CMODE DATA 0 EDIT - CURRENT MODE E.LMOD DATA 0 EDIT - LINE MODIFICATION FLAG * FILE NAME CELLS. COPY DATA 0 NAME OF LAST COPY FILE IFN DATA 0 CURRENT FILE NAME PARAMETER IRFN DATA 0 FILE TO READ FROM IF FS = .FALSE. ISFN DATA 0 STARTING FILE NAME (EDITFIL) LFN DATA 0 LOGICAL FILE NAME * MARGIN CONTROLS. IW BSS 0 RMARG CON 160 DEFAULT RIGHT MARGIN LMW CON E.STR-1 * MAINTAIN ORDER OF NEXT 2 RMW CON E.STR+160 * WINDOW MARGINS RTWD DATA 0 VALUE OF RIGHT WINDOW MARGIN * MISCELLANEOUS CELLS. AS CON 0 0 = NO ASCII, IF *ASC* THEN RESTORE AT END BATCH DATA 0 .LT. 0 IF USER IS *BCOT* .EQ. 0 IF USER IS *TXOT* .GT. 0 IF USER SELECTED *B* OPTION CHARSFT BSSZ 1 SHIFT FOR ICH. SET IN PRESET COMMAND DATA 0 COMMAND DESCRIPTOR WORD C.ON CON I.DEV POINTER TO CURRENT INPUT DEVICE DF CON 0 * MAINTAIN ORDER OF *DF* AND *DR* DR CON 0 * (DELETE EOF/EOR COUNTERS) ERR BSSZ 5 PFM ERROR MESSAGES EXPLAIN VFD 12/2000B,*P/EXPLAIN ERROR MESSAGE POINTERS EXTA DATA 0 EXIT MODE FLAG FS CON 0 .TRUE. (NEG.) IF READING OFF SCRATCH FILES GLOBAL DATA -1 GLOBAL CHARACTER FOR STRING SEARCHES LNFLAG DATA -1 NEG. - LINE NUMBER MODE, POS - WHERE MODE INDEX DATA 0 ADDRESS OF COMMAND DESCRIPTOR WORD INITZ DATA 0 NON-ZERO WHEN PRESET IS COMPLETE INPCHAR CON -1 INPUT MODE ESCAPE CHARACTER INPMODE CON 1 -1 IF IN INPUT MODE ITOGGLF DATA -1 * MAINTAIN ORDER OF *ITOGGLF/ITOGGLR* ITOGGLR DATA -1 * (PRINT EOR/EOR MESSAGE FLAGS) IWHERE CON 1 LINE COUNTER MCOUNT DATA 0 COUNT OF SUCCESSFUL LOCATES (PER CMD) NOMOD DATA -1 .TRUE. (NEG) IF NO FILE MODS THIS PASS NUMS BSSZ NTABS+1 STORAGE FOR PARAMETERS NXTLINE CON 0 OPTIONAL LINE NUMBER VALUE (IN CMDS) PREFIX CON 1BS1 COMMAND MODIFIER BITS (SEE BELOW) PROMPT CHAR (VFD 6/0),QM. TTY SPECIAL INPUT PROMPT CHAR (VFD 6/0),QM. VFD 6/55B,18/0001B,24/0 SET NO CONTROL BYTE RC DATA -1 .TRUE. (NEG) IF NO DATA READ (RDF/WTF) SCOUNT DATA 0 SLASH PREFIX COUNT SKPCNT DATA 0 SKIP COUNT FOR *-* COMMAND ** SPCP - SPECIFIED PARAMETERS. *T 1/ W, 1/ P, 1/ A, 57/ UNUSED * * W = 1 - WINDOW WAS SPECIFIED (ON A COMMAND). * P = 1 - *P* OPTION SPECIFIED (ON *XEDIT* COMMAND). * A = 1 - FILE IS DIRECT ACCESS (ONLY VALID IF *P* * OPTION SPECIFIED). SPCP DATA 0 TABCHAR DATA -1 * MAINTAIN ORDER OF TABCHAR/TABS TABS CON 11D,18,30D * (TABCHAR AND INITIAL TAB SETTINGS) BSSZ NTABS-2 * ZERO REST OF TABS + 1 END MARKER TLX CON 0 TELEX INTERRUPT FLAG TRIM DATA 0 .LT. 0 IF TRIM OPTION SET TTYIN CON 0 .NZ. IF NOT *TTY* INPUT FILE TSTATUS BSSZ 2 DATA RETURN FROM *TSTATUS* UPDATE DATA -1 NEG. IF UPDATING EDIT FILE VERIFY DATA -1 * MAINTAIN ORDER OF VERIFY FLAGS XVERIFY DATA -1 * .TRUE. (NEGATIVE) IF VERIFYING IF DEF,TIMES,1 TIMING BSSZ 3 SPACE 4 * MISCELLANEOUS MICROS. PTFT DECMIC PTFT PRIMARY FILE TYPE SPACE 4 ** DEFINITION OF COMMAND MODIFIER BITS (PREFIX WORD). * * NOTE- THIS WORD IS ZEROED BEFORE CRACKING ANY COMMAND. QUAL PREFIX PLUS EQU 1 + PREFIX CHARACTER PLUS DECMIC PLUS A EQU 2 A POSTFIX CHARACTER A DECMIC A W EQU 3 W POSTFIX CHARACTER W DECMIC W QUAL * SPACE 4 ** DEFINITION OF SPECIAL BITS USED IN COMMAND DESCRIPTOR. * QUAL OPTS CR EQU 47D COMMAND LEGAL IN CREATION MODE F0 EQU 44D NUMBER FIELD FORCE 0 IN INPUT MODE LK EQU 46D COMMAND LEGAL IN LOOK MODE IN EQU 45D COMMAND LEGAL IN INPUT MODE QUAL * TITLE TABLES AND MESSAGES. ** CHARACTER SET REPLACEMENT TABLE. *T 24/AS, 18/64 C, 18/63 C * * AS = ASCII 6/12 CHARACTER SET. * 64 C = 64 CHARACTER SET. * 63 C = 63 CHARACTER SET. * AM. VFD 24/67B,18/67B,18/67B AMPERSAND BL. VFD 24/7647B,18/7647B,18/7647B BELL (EXTENDED MODE) QM. VFD 24/71B,18/71B,18/71B QUESTION MARK SH. VFD 24/60B,18/60B,18/60B SHARP UA. VFD 24/7402B,18/76B,18/76B UP ARROW * XEDIT MESSAGE TABLE. * * NOTE- ANY SECONDARY MESSAGES DEFINED WITHIN XEDIT * ARE ASSUMED TO BE IN OCTAL. * TOTAL NUMBER OF PRIMARY ERROR MESSAGES MUST BE LESS * THAN 40B. MESSAGE EQU *-1 BASE ADDR OF MESSAGE TABLE LOC 1 PFM. CON ERR KLUDGE FOR PFM ERRORS ARG. ERRMSG 1,(ARGUMENT ERROR) 1 = INPUT MODE - COMMAND HAS COUNT (F0) BFN. ERRMSG 1,(BAD FILE NAME) 1 = BAD FILE NAME 2 = NO FILE NAME 3 = SPECIAL/RESERVED NAME BTL. ERRMSG 1,(BAD TEXT LINE ENCOUNTERED) CNV. ERRMSG 1,(COMMAND NOT VALID) 1 = IN CREATION MODE 2 = IN LOOK MODE 3 = IN INPUT MODE DEL. ERRMSG 1,(DELIMITER) EMI. ERRMSG 1,(FILE FUNCTION INCORRECT) 1 = NOT ALLOWED TO CHANGE FILE 2 = *L* INCORRECT ON DA/MT FILES * PLEASE MAINTAIN ORDER OF NEXT TWO EOF. ERRMSG 0,(--EOF--) EOR. ERRMSG 0,(--EOR--) EOI. ERRMSG 2,(END OF FILE) FCP. ERRMSG 0,(FILENAM REWRITTEN) FCR. ERRMSG 0,(FILENAM CANNOT BE ACCESSED) 1 = FILE IS EXECUTE OR APPEND ONLY FILE 2 = FILE IS NOT LOCAL TO JOB 3 = FILE NOT IN PERM. FILE AREA FLC. ERRMSG 0,(FILENAM IS A LOCAL FILE) FRP. ERRMSG 0,(FILENAM REPLACED) FSV. ERRMSG 0,(FILENAM SAVED) ILL. ERRMSG 1,(INCORRECT PARAMETER) LFM. ERRMSG 0,(LOCAL FILE ERROR) LNNF. ERRMSG 1,(LINE NUMBER NOT FOUND, COMMAND NOT EXECUTED) LNTL. ERRMSG 1,(LINE NUMBER TOO LARGE) NSC. ERRMSG 1,(NO SUCH COMMAND) SNF. ERRMSG 1,(STRING NOT FOUND) STK. ERRMSG 1,(COMMAND STACKING ERROR) TRUNC. ERRMSG 1,(TRUNCATION AT LINE) LOC *O ERRBASE BSS 0 SET MESSAGE BASE ADDRESS ERRMSG NOTE END OF TABLE TITLE COMMAND PARSER - MAIN LOOP. NCM SPACE 4,20 ** NCM - GET NEXT COMMAND. * * ENTRY NONE. * * EXIT TO COMMAND PROCESSING ROUTINE AFTER PARSING * PARAMETERS AND HANDLING ERRORS. * (X1) = COMMAND DESCRIPTOR WORD. * * USES A - 1, 2, 3, 4, 5, 6, 7. * X - ALL. * B - 2, 3, 4, 5, 6, 7. * * CALLS CDD, SCD, VIS. * * MACROS GETJA, WRITEO. NCM BSS 0 ENTRY RJ SCD ASSURE CODED MODE AT START OF COMMAND IF DEF,TIMES SA4 TIMING+1 GETJA TIMING GET ELAPSED TIME SA1 A4 IX1 X1-X4 ELAPSED TIME RJ CDD CONVERT WRITEO OUTPUT MX6 0 LINE FEED WRITEO X2 ENDIF SA1 C.STR-1 COMMAND LINE CONTROL WORD SA4 EXPLAIN UPDATE EXPLAIN WORD R= X6,M.CODED UX1 B7,X1 B7 = CHARACTER POINTER SA6 E.NMODE SET MODE NEEDED TO CODED LE B7,NCL IF READ REQUIRED SA5 A1+B7 BX6 X6-X6 SA6 PREFIX RESET PREFIX WORD SA2 XVERIFY AX4 12 SB6 X1 B6 = DELIMITER CHARACTER BX7 X2 PX6 B0,X4 NG X5,NCM22 IF AT END OF LINE (NO SUCH CMD) SA6 A4 REPLACE EXPLAIN WORD SA2 A5 GET FIRST CHARACTER OF NEW CMD SA7 VERIFY SET VERIFY FLAG BX7 X7-X7 SA7 SCOUNT INITIALIZE SLASH COUNT NG B6,NCM2 IF NO DELIMETER CHARACTER NCM1 NG X2,NCM2 IF END OF LINE REACHED SB5 X2 SA2 A2+B1 NE B5,B6,NCM1 IF NOT DELIMITER CHARACTER SX6 B5+ MX7 1 SET PSEUDO END OF LINE BX6 X6+X7 SA6 A2-1 * PARSE PREFIX CHARACTERS. NCM2 SA3 PREFIXT-1 BX6 X5 SB6 X5 B6 = DELIMITER CHARACTER SA6 PREFIXU SA7 INDEX CLEAR INDEX (TOPNULL 'P4 BUG) NCM3 SA3 A3+B1 SB3 X3 NE B3,B6,NCM3 IF NOT THIS PREFIX CHARACTER AX3 18 SB6 X3 ZR B6,NCM4 IF NOT REALLY PREFIX CHARACTER SA5 A5+B1 PREPARE FOR NEXT CHARACTER JP B6 PROCESS PREFIX CHARACTER * CLOSE PREFIX PARSING. NCM4 SB3 2 SX7 0 CLEAR ASSEMBLY * BEGIN PARSING FOR LINE NUMBER. NCM5 SX0 X5-1R9-1 SX2 X5-1R0 BX0 -X2*X0 PL X0,NCM6 IF NOT A NUMBER LX0 B3,X7 *2 IX7 X0+X7 *5 SA5 A5+B1 LX7 1 *10 IX7 X7+X2 EQ NCM5 CHECK NEXT CHARACTER * SAVE LINE NUMBER AND PARSE COMMAND. NCM6 MX6 1 SA7 NXTLINE SAVE NEXT LINE MX4 26 MX3 -6 NG X5,NCM9 IF AT END OF LINE LX4 -5 POSITION MASK NCM7 BX0 -X3*X5 SB3 X0+4 LX1 B3,X4 PL X1,NCM9 IF NO A-Z BX1 X3*X5 CHECK TO SEE IF ASCII ZR X1,NCM8 IF UPPER CASE LETTER SX1 X1-7600B NZ X1,NCM9 IF NOT LOWER CASE LETTER NCM8 LX6 6 BX6 X6+X0 SA5 A5+1 PL X5,NCM7 IF NOT AT END OF LINE * DETERMINE IF *W* POSTFIX, LEFT JUSTIFY COMMAND. NCM9 BX1 -X3*X6 GET LAST CHARACTER MX0 1 SX7 1BS"W" SX4 X1-1RW ZR X4,NCM10 IF W POSTFIX (W HAS JUSTIFICATION BIT) SB3 X1+ SX7 1BS"A" NE B3,B1,NCM11 IF NOT *A* POSTFIX NCM10 SA4 PREFIX BX6 X3*X6 REMOVE POSTFIX BX7 X7+X4 SA7 A4 REPLACE PREFIX WORD NCM11 LX6 6 LEFT JUSTIFY PL X6,NCM11 IF NOT LEFT JUSTIFIED BX6 -X0*X6 REMOVE JUSTIFICATION BIT * SKIP BLANKS AND FIRST COMMA. STOPS ON FIRST NON-BLANK * CHARACTER OR ON SECOND COMMA. * ASSUMES X0 IS NEGATIVE AT ENTRY. NCM12 NG X5,NCM14 IF END OF LINE SB3 X5-1R 0 = BLANK, 1 = COMMA ZR B3,NCM13 IF BLANK NE B3,B1,NCM14 IF NOT COMMA PL X0,NCM14 IF SECOND COMMA SX0 0 SET COMMA ENCOUNTERED NCM13 SA5 A5+B1 EQ NCM12 CHECK NEXT CHARACTER * LOOK UP COMMAND IN COMMAND TABLE. NCM14 ZR X6,NCM24 IF NO COMMAND SA4 JUMP-1 SA6 JUMPX PRESET COMMAND TABLE NCM14.1 SA4 A4+B1 GET NEXT COMMAND IX3 X4-X6 NG X4,NCM14.1 IF DATA WORD NZ X3,NCM14.1 IF NOT THIS ENTRY NCM15 SA4 A4+B1 PL X4,NCM15 IF NOT DATA CELL ASSOCIATED WITH COMMA SX0 X4 * CODE IS REPLACE AFTER CREATION MODE IS EXITED NCMA SA3 IWHERE EQ NCM16 JUMP TO PRESET TEST NCM RMT ZR X0,NCM23 IF NO JUMP ADDRESS (NO SUCH COMMAND) SA3 UPDATE RMT SX6 A4 SAVE INSTRUCTION INDEX BX3 X3+X4 CHECK LOOK COMMAND PERMISSION NECESSARY SA1 INPMODE BX7 X4 SAVE COPY OF COMMAND DATA WORD LX3 59-/OPTS/LK SA6 INDEX BX1 -X4*X1 NEG. IF IN INPUT AND COMMAND NOT OK LX1 59-/OPTS/IN SA7 COMMAND NG X1,NCM20 IF NOT LEGAL IN INPUT MODE PL X3,NCM21 IF NOT VALID IN LOOK MODE UX4 B6,X4 GET ARGUMENT DESCRIPTOR ADDRESS ZR B6,PST IF NO ARGUMENTS JP B6+PRM. PARSE PARAMETERS * CREATION MODE CODE. * ENTRY (X3) = IWHERE. NCM16 NG X3,NCM18 IF IN CREATION MODE SA3 NCM17 GET INSTRUCTION REPLACEMENT WORD NO BX6 X3 SA6 NCMA RJ VIS VOID INSTRUCTION STACK NCM17 BSS 0 NCM HEREL EQ NCMA+1 JUMP INTO REQULAR CODE NCM18 ZR X0,NCM23 IF NO SUCH COMMAND BX3 -X4*X3 LX3 59-/OPTS/CR POSITION CREATION LEGAL STATUS NG X3,NCM19 IF COMMAND NOT ALLOWED IN CREATION MODE SA3 UPDATE EQ NCMA+1 PROCESS COMMAND * ERROR PROCESSING ROUTINES. NCM19 SB2 CNV.*100B+1 SET *NOT VALID* IN CREATION MODE EQ NER PROCESS ERROR NCM20 SB2 CNV.*100B+3 SET *NOT VALID* IN INPUT MODE EQ NER PROCESS ERROR NCM21 SB2 CNV.*100B+2 SET *NOT VALID* IN LOOK MODE EQ NER PROCESS ERROR NCM22 SA1 C.STR-1 SET READ REQUIRED PX6 B0,X1 SA6 A1 NCM23 SB2 NSC. NO SUCH COMMAND EQ NER PROCESS ERROR * IF NO COMMAND IS FOUND, CHECK FOR SPECIAL COMMANDS. NCM24 NG X5,NCM28 IF END OF LINE (POSSIBLY FINDLN) SA4 SPCMDT-1 BX6 X5 SA6 SPCMDU SB3 X5 NCM25 SA4 A4+B1 SB4 X4 NE B4,B3,NCM25 IF NO MATCH AX4 18 SB4 X4 ZR X4,NCM23 IF NO SUCH COMMAND (NULL) * SKIP BLANKS AND ONE COMMA. NCM26 SA5 A5+1 STEP OVER SPECIAL CHARACTER NG X5,NCM27 IF END OF LINE SB2 X5-1R ZR B2,NCM26 IF BLANK NE B2,B1,NCM27 IF NOT COMMA ZR X4,NCM27 IF SECOND COMMA MX4 0 EQ NCM26 CHECK NEXT CHARACTER NCM27 JP B4 PROCESS SPECIAL COMMAND * CHECK FOR FINDLN COMMAND, ELSE NO SUCH COMMAND. NCM28 SA1 NXTLINE SA2 IWHERE ZR X1,NCM23 IF NOT TO FIND LINE NUMBER SA3 INPMODE NG X2,NCM19 IF IN CREATION MODE BX6 X1 MX7 0 NG X3,NCM20 IF IN INPUT MODE (CANNOT MOVE PTR) SA6 NUMS MOVE PARAMETER SX6 FLN SA7 NXTLINE CLEAR NXTLINE OPTION SA6 COMMAND EQ PRM.+NONE PROCESS COMMAND PRM SPACE 4,20 ** PRM - COMMAND PARAMETER CRACKER. * * ENTRY (A5) = ADDRESS OF CURRENT CHARACTER. * (X5) = CURRENT CHARACTER. * (X7) = COMMAND DESCRIPTOR WORD. * * EXIT IF NO ERROR, TO *PST* OR *PST7*. * IF ERROR, TO *NER* TO PROCESS ERROR. * * USES A - ALL. * X - ALL. * B - 2, 3, 4, 5, 6, 7. * * CALLS GFN, VAL. * * MACROS ERROR, GET, MEMORY, PARAM, RETURN, WRITEC. * * NOTES THIS ROUTINE INITIALIZES PARAMETERS FOR THE VARIOUS * ROUTINES AND IS ENTERED AT SEVERAL PLACES LABELED * AS SUCH. PRMA VFD 27/0,10/-0,2/0,1/1,*P/ NUMBER * MASK PRMB BSSZ 1 SCRATCH CELL AVAILABLE FOR USE BY PARSER PRMC BSS 0 LOC 0 DATA 1RL LOCAL FILE DATA 1RR REPLACE FILE DATA 1RS SAVE FILE DATA 1RC COPYBACK FILE LOC *O PRMCL EQU *-PRMC PRM. EQU *-1 BASE ADDRESS ** STRING PARAMETERS. * * CAN BE ONE OF SEVERAL FORMS WHICH ARE- * 1. /STRING...STRING/COUNT (COUNT OPTIONAL) * 2. /STRING/COUNT (COUNT OPTIONAL) * 3. /STRING/STRING/COUNT (COUNT OPTIONAL) * 4. COUNT (COUNT OPTIONAL) * * THE OPTIONS ARE SELECTED BY USING THE MODIFIER FIELD IN THE * COMMAND DESCRIPTOR WORD. FOR MOST COMMANDS, THE 18 BIT * FIELD CONTAINS ANY DATA NEEDED BY EITHER THE COMMAND * PARSER OR THE COMMAND ROUTINE. HOWEVER- IN THE CASE * OF ANY COMMAND USING THE STRING AND/OR FILE PARAMETER * SPECIFICATION, THE MODIFIER FIELD INFORMATION IS FIXED * AND CONTAINS THE FOLLOWING INFORMATION. * * BIT 16 = FIRST STRING NECESSARY (CAN BE NULL) * BIT 15 = SECOND STRING NEEDED (CAN BE NULL) * BIT 14 = CHECK FOR SPECIAL ... OR --- IN FIRST STRING * BIT 13 = --- OPTION LEGAL * BIT 12 = UNUSED (BUT ONCE WAS- CLEAR COMMANDS IF USED) * BITS 11-5 = UNUSED. * BIT 4 = NO FILE NAME LEGAL. * BIT 3 = SPECIAL FILE NAMES LEGAL. * BITS 2-0 = POST FILE NAME PARAMETER OPTION. * * NOTE- ALL STRING PARSES CALL SUBROUTINE *ASF* TO PRESET * THE CELLS NEEDED BY *LOC*. PRM1 PARAM STRING SA1 COMMAND OBTAIN DESCRIPTOR BX6 X6-X6 CLEAR CELLS SA6 P3RP CLEAR STRING POINTERS SA6 A6-B1 SA6 A6-B1 P2RP SA6 A6-B1 BX7 X1 SA6 A6-B1 P1RP SA6 A6-B1 SA6 NUMS CLEAR COUNT FIELD SA6 PRMB SET POSITIVE LOGIC LX7 59-34 MODIFIER BIT 16 AT SIGN BIT SA0 B0 SET NO DELIMITER MESSAGE NEEDED SB6 X5-1R, NG X5,PRM9 IF END OF LINE (NO STRING) SA4 PRMA ZR B6,PRM9 IF NULL PARAMETER (IE. *,,*) SB3 X5 DELIMITER CHARACTER SX6 A5+B1 SAVE POINTER TO FIRST CHARACTER LX4 B3 SB5 X6 ADDRESS OF FIRST CHARACTER NG X4,PRM9 IF CHARACTER IS 0-9 OR * SA6 P1LP * PARSE FIRST STRING FIELD. PRM2 SA5 A5+B1 SEARCH FOR CLOSING DELIMITER NG X5,PRM3 IF END OF LINE FOUND SB4 X5 NE B3,B4,PRM2 IF NOT DELIMITER SX6 A5 SET LWA+1 FOR FIELD SA5 A5+B1 STEP PAST DELIMITER SA6 A6+B1 CLOSING PARAMETER SB6 X6 SA1 COMMAND LX4 B1,X7 BIT 15 SX6 A5 POINTER FOR POSSIBLE SECOND FIELD PL X4,PRM6 IF NOT SUPPOSED TO HAVE 2 STRING SA6 P3LP SAVE POINTER TO SECOND FIELD EQ PRM4 PARSE SECOND STRING PRM3 SX6 A5 SAVE POINTER SA0 B1 SET DELIMITER MESSAGE NECESSARY SA6 A6+B1 LX4 B1,X7 SHIFT MODIFIER BIT 15 (2 STRINGS) NG X4,PRM13 IF 2 STRINGS NEEDED (ARG ERROR) EQ PRM6 ONE STRING FIELD PRESENT PRM4 SX6 A5 SA0 B1 SET DELIMITER (JUST IN CASE) NG X5,PRM5 IF END OF LINE SB4 X5 SA5 A5+B1 NE B4,B3,PRM4 IF NOT AT DELIMITER SA0 B0 CLEAR DELIMITER MESSAGE REQUIRED PRM5 SA6 P3RP PRM6 SA1 COMMAND CHECK FOR SPECIAL FIELDS SA2 P1LP LX1 59-32 MODIFIER BIT 14 PL X1,PRM9 IF SPECIAL FIELDS NOT USED SA3 A2+B1 P1RP SX4 1R. SB2 X2 LEFT MOST CHARACTER LX1 1 SB3 X3 RIGHT MOST CHARACTER PL X1,PRM7 IF *---* FORM NOT ALLOWED SX4 1R- PRM7 GE B2,B3,PRM8 IF ALL POSITIONS TRIED SA1 B2 SB2 B2+B1 BX1 X1-X4 NZ X1,PRM7 IF NOT CHARACTER SA1 B2 SB2 B2+B1 BX1 X1-X4 NZ X1,PRM7 IF NOT CHARACTER SA1 B2 SB2 B2+B1 BX1 X1-X4 NZ X1,PRM7 IF NOT CHARACTER GT B2,B3,PRM8 IF PAST LAST CHARACTER IN STRING SA1 P1RP SET UP POINTERS SX7 B2-3 SX6 B2 SA7 A1 PUT NEW P1RP SA6 A1+B1 PUT P2LP BX7 X1 SX6 X4-1R. SA7 A6+B1 PUT P2RP SA6 PRMB SET ... OR --- FLAG EQ PRM9 PARSE NUMBER PRM8 SX3 X4-1R- NZ X3,PRM9 IF TRIED ... FORM SB2 X2 RESET FIRST CHARACTER SX4 1R. EQ PRM7 TRY ... FORM * SKIP BLANKS AND FIRST COMMA AND EXIT TO OBTAIN ONE NUMBER PRM9 SX1 A0 ZR X1,PRM10 IF DELIMITER MESSAGE NOT NEEDED ERROR DEL. PRM10 RJ ASF ANALYZE STRING FIELDS NZ B2,NER IF ERROR ENCOUNTERED PRM11 NG X5,PRM.+NUMBER1 IF END OF LINE REACHED SB3 X5-1R ZR B3,PRM12 IF BLANK NE B3,B1,PRM.+NUMBER1 IF NOT COMMA NZ B2,PRM.+NUMBER1 IF SECOND COMMA SB2 1 SET COMMA ENCOUNTERED PRM12 SA5 A5+B1 NEXT CHARACTER EQ PRM11 CHECK NEXT CHARACTER PRM13 SB2 ARG. SET ARGUMENT ERROR EQ NER PROCESS ERROR ** NEXT PARAMETER. * * THIS ROUTINE CHECKS FOR A MINUS SIGN. IF MINUS, IT SETS * *NUMS*+1 EQUAL TO -0, ELSE IT SETS *NUMS*+1 = +0, AND THEN * EXITS TO OBTAIN ONE NUMBER. PRM14 PARAM NEXT MX6 0 SX4 X5-1R- SB5 B1 SET ONE NUMBER PARAMETER NZ X4,PRM15 IF NOT - SIGN SA5 A5+B1 STEP OVER - SIGN MX6 60 SET -0 PRM15 SA6 NUMS+1 EQ PRM17 OBTAIN NUMBER ** NUMERIC PARAMETERS. * * BITS 17-35 CONTAIN NUMBER OF FIELDS TO PARSE. PRM16 PARAM NUMBER SA1 COMMAND GET DESCRIPTOR WORD AX1 18 SB5 X1 PARAMETER COUNT * ENTRY POINT (B5) = NUMBER OF FIELDS. PRM17 SB6 1 SET COUNTER PRM18 RJ VAL SA6 NUMS-1+B6 SB6 B6+1 LE B6,B5,PRM18 IF MORE TO GO EQ PST7 END OF PARSE ** NUMBER1. * * CRACKS OFF 1 NUMBER. ALLOWS MODIFIER FIELD TO BE USED FOR * OTHER FUNCTIONS. PRM19 PARAM NUMBER1 RJ VAL PARSE NUMBER SA6 NUMS SA1 INPMODE PL X1,PST7 IF NOT IN INPUT MODE SA2 COMMAND MX7 60 PREPARE -0 LX2 59-/OPTS/F0 PL X2,PST7 IF NOT TO FORCE 0 SB2 ARG.*100B+1 SET PARAMETER NOT ALLOWED IN INPUT MODE NZ X6,NER IF USER SPECIFIED A PARAMETER SA7 A6 FORCE -0 PARAMETER EQ PST7 EXIT TO POST COMMAND PROCESSOR EQ PRM17 NOTHING ** NUMBER2. * * CRACKS OFF 2 NUMBERS. ALLOWS MODIFIER FIELD TO BE USED FOR * OTHER FUNCTIONS. PRM20 PARAM NUMBER2 SB5 B1+B1 PARAMETER COUNT EQ PRM17 PARSE NUMBERS ** FILE PARAMETER. * * PARSES ONE FILE NAME (WITH OPTIONS). * EXITS TO SPECIFIED OPTIONAL PARAMETERS. PRM21 PARAM ONEFILE BX0 X7 COMMAND DESCRIPTOR LX0 59-21 SPECIAL NAMES OK BIT RJ GFN PARSE FILE NAME SA6 IFN ZR X1,PRM23 IF NAME LEGAL SB2 B6 KLUDGE FOR NOW NZ X6,PRM22 IF NAME IS SPECIAL SX7 B6-BFN.*100B-2 SEE IF NO FILE NAME LX0 -1 *NFN* BIT NZ X7,NER IF NOT *NO FILE NAME* PRM22 PL X0,NER IF NOT VALID PRM23 SA1 COMMAND MX2 -3 OBTAIN POST-FILE OPTIONS AX1 18 BX2 -X2*X1 LX2 -1 SB3 X2+ JP PRM24+B3 JUMP TO POST PROCESSING OPTION PRM24 PL X2,PST7 IF NOTHING TO FOLLOW EQ STRING+PRM. PROCESS STRING FIELD EQ PFMTYPE+PRM. PROCESS PFM SPECIFICATIONS ** PFMTYPE. * * PFMTYPE CRACKS OFF THE LEGAL PFM CODES FOR * USE IN THE *END*, *FILE*, AND *QUIT* COMMANDS. * * THE DATA IS PLACED IN NUMS, WITH THE FOLLOWING * CONVENTION- * * BIT 0 = LOCAL OR L USED. * BIT 1 = REPLACE OR R USED. * BIT 2 = DIRECT OR D USED. * BIT 3 = COPY OR C USED. * * ANY COMBINATION OF ABOVE ARE LEGAL PROVIDING THAT * ONLY ONE LETTER MNENOMICS ARE USED. (HOWEVER, NOT * ALL COMBINATIONS MADE SENSE). PRM25 PARAM PFMTYPE BX6 X6-X6 CLEAR ASSEMBLY SB3 PRMC GET BASE OF MNEMONICS SX4 B1 PRM26 SB2 PRMCL SX0 X5-7600B NG X0,PRM27 IF NOT ASCII CHARACTER SX5 X5-7600B PRM27 SB2 B2-B1 LT B2,PRM28 IF END OF LIST (END OF PARSE) SA1 B3+B2 BX1 X1-X5 NZ X1,PRM27 IF NOT THIS ENTRY LX0 B2,X4 SHIFT CODE SA5 A5+B1 NEXT CHARACTER BX6 X6+X0 PL X5,PRM26 IF MORE TO GO PRM28 SA6 NUMS SET CODES NG X5,PST IF END OF LINE PRM28.1 SA5 A5+1 PL X5,PRM28.1 IF NOT END OF COMMAND EQ PST EXIT ** TOGGLE/SET PARAMETERS. * * VALID CHARACTERS ARE +,- OR NULL. * + = NUMS IS EQUAL TO +1. * - = NUMS IS EQUAL TO -1. * NULL = EQUAL TO +0. PRM29 PARAM TOGGLE NG X5,PRM30 IF END OF LINE SB3 X5-1R+ ZR B3,PRM32 IF + SIGN EQ B3,B1,PRM33 IF - SIGN PRM30 SX6 0 PRM31 SA6 NUMS EQ PST7 EXIT PRM32 SA5 A5+B1 + SIGN PROCESSING SX6 B1 EQ PRM31 SET UP EXIT PRM33 SA5 A5+B1 - SIGN PROCESSING SX6 -B1 EQ PRM31 SET UP EXIT ** CHARACTER PARAMETERS. * * ROUTINE ALLOWS ONE CHARACTER PARAMETER. * IF BIT 18 IS SET IN DESCRIPTOR WORD, THE CHARACTER CANNOT * BE AN ALPHABETIC. * * THE CHARACTER IS PLACED IN *NUMS*. * * NOTE- LOWER CASE LETTERS (IF LEGAL) ARE NOT CONVERTED TO * UPPER CASE. XEDIT VIEWS UPPER/LOWER AS DIFFERENT. * * IF THERE IS NO PARAMETER, *NUMS* IS SET TO -1. PRM34 PARAM CHAR MX6 -1 SET NO CHARACTER NG X5,PRM35 IF NO CHARACTER BX6 X5 LX7 59-18 SA5 A5+B1 SET TO NEXT CHARACTER SB2 ILL. INCORRECT PARAMETER (PRESET) PL X7,PRM35 IF ANY CHARACTER IS LEGAL ZR X6,PRM35 IF COLON SX4 X6-1RZ-1 NG X4,NER IF A-Z (UPPER CASE) SX4 X6-7601B NG X4,PRM35 IF NOT LOWER CASE (.LT. 7601B) SX4 X4-1RZ NG X4,NER IF LOWER CASE PRM35 SA6 NUMS SET CHARACTER EQ PRM40 CHECK FOR NO TRAILING CHARACTERS ** NULL PARAMETER. * * ROUTINE WILL HANDLE OWN PARAMETER CRACKING, HOWEVER, THIS * ROUTINE WILL GIVE THE FIRST CHARACTER ADDRESS AND LAST * CHARACTER ADDRESS (+1) IN *NUMS* AND *NUMS+1*. * IF *NUMS* IS ZERO, THEN THERE IS NO PARAMETER. PRM36 PARAM NULL SX6 A5 GET FWA OF PARAMETER SA6 NUMS NG X5,PRM37 IF NO PARAMETER PRM36.1 SA5 A5+B1 PL X5,PRM36.1 IF NOT AT END OF PARAMETER SX6 A5 SA6 A6+B1 SAVE LWA+1 EQ PRM.+NONE PROCESS NO PARAMETERS PRM37 MX6 0 SA6 A6 REPLACE POINTER EQ PRM.+NONE PROCESS NO PARAMETERS ** LOAD OVERLAY AND RE-GET PARAMETER CRACKING SPECIFICATIONS. * OVERLAY TO LOAD IS IN THE ROUTINE ADDRESS FIELD. * ENTRY (X4) = LOWER 18 BITS CONTAINS OVERLAY NUMBER TO LOAD. PRM38 PARAM OVL SA2 LOVE LAST OVERLAY LOADED SX7 X4+1R0 BX3 X7-X2 ZR X3,PRM39 IF OVERLAY ALREADY LOADED SX0 X4 SA7 A2 .D IFNE DEBUG+FILEOV,0 IF DEBUG MODE OR OVERLAYS FROM SYSTEM SA3 LOVA FORM OVERLAY NAME BX6 X3+X7 LX6 24 LEFT JUSTIFY SA6 LOVC .D ENDIF .E IFEQ DEBUG,1 IF DEBUG ON WRITEC OUTPUT,LOVC-1 .E ENDIF MEMORY CM,LOVB+X0,R OBTAIN NECESSARY FIELD LENGTH .G IFEQ FILEOV,0 IF LOAD FROM LOCAL FILE SA1 ACTR FILE NAME CONTAINING OVERLAY MX2 42 BX1 X1*X2 LX0 6 OVERLAY X1,X0 .G ELSE LOAD FROM SYSTEM OVERLAY LOVC,X0,S .G ENDIF SB7 X1 GET ENTRY POINT (PRESET OVERLAY) JP B7 ENTER OVERLAY PRM39 SA1 COMMAND GET DESCRIPTOR WORD AX1 18 SA4 X1 OBTAIN COMMAND DESCRIPTOR WORD ADDR-1 EQ NCM15 PROCESS COMMAND ** NO PARAMETERS (NONE). * * THIS ROUTINE ASSURES THAT THE CHARACTER POINTER IS POSITIONED * AT AN END OF LINE (PSEUDO OR REAL). PRM40 PARAM NONE * GO TO *PST7*. PST SPACE 4,20 ** PST - POST COMMAND PROCESSOR. * * ENTRY (A1) = C.STR-1. * (A5) = ADDRESS OF CURRENT CHARACTER. * (X5) = CURRENT CHARACTER. * (PREFIX) = PREFIX OPTIONS. * (COMMAND) = COMMAND DESCRIPTOR. * * EXIT TO PROCESS COMMAND, OR TO ERROR ROUTINE. * * USES A - 1, 2, 3, 5, 6. * X - 1, 2, 3, 4, 5, 6. * B - 2, 4, 6, 7. * * CALLS ETL, GLN, MPR, RTDA, VRY. * * MACROS ERROR. PST7 NG X5,PST IF END OF LINE SB4 X5-1R SA5 A5+1 ZR B4,PST7 IF BLANK SB2 ILL. INCORRECT PARAMETER EQ NER PROCESS ERROR, EXIT. PST SA3 C.STR-1 PACK UP LAST COMMAND (PUT INTO LASTCMD) UX3 B6,X3 SB6 A3+B6 FWA OF COMMAND SB7 P.LINE SET LAST PARAMETER RJ RTOA PACK LAST COMMAND * ENTRY FROM SOME SPECIAL COMMAND PROCESSORS. PST1 SB6 B0 PRESET TO *READ REQUIRED* LX4 B1,X5 NEG. IF TRUE END OF LINE NG X4,PST2 IF ABOVE SB6 A5+2-C.STR SET CHARACTER POINTER SX6 X5 REMOVE SPECIAL END OF LINE SA6 A5 PST2 SA3 C.STR-1 RESET FOR ENTRY FROM *PST1* SA1 COMMAND PX6 B6,X3 SB7 X1 ROUTINE ADDRESS SA6 C.STR-1 SAVE POINTER/DELIMITER PL X3,PST3 IF NOT TO ECHO LINE SA1 P.LINE SA3 ETLB SET COMMAND LINE HEADER RJ ETL PST3 SA1 SCOUNT ZR X1,PST4 IF SLASH COUNT ZERO RJ MPR ADVANCE POINTER PST4 SA1 NXTLINE SA2 COMMAND ZR X1,PST5 IF NO ADVANCE TO LINE NUMBER SA3 INPMODE NG X3,NCM20 IF POINTER MOVEMENT NOT ALLOWED, EXIT SA3 IWHERE NG X3,NCM19 IF IN CREATION MODE, EXIT RJ GLN NZ X6,PST6 IF LINE NUMBER NOT FOUND SA2 COMMAND PST5 SB7 X2 (X2) = COMMAND DESCRIPTOR WORD BX1 X2 JP B7 PROCESS COMMAND, EXIT * PROCESS LINE NUMBER NOT FOUND. PST6 ERROR LNNF. ISSUE MESSAGE RJ VRY EQ CER1 RETURN TO ERROR CLEANUP NER SPACE 4,15 ** NER - COMMAND PARSER ERROR PROCESSOR. * * ENTRY (B2) = ORDINAL OF MESSAGE TO PRINT. * * EXIT (B2) = ORDINAL OF MESSAGE PRINTED. * * USES A - 0, 5, 6, 7. * X - 5, 6, 7. * B - NONE. * * CALLS PST. NER SX6 NER2 RE-ENTRY ADDRESS NG X5,NER1 IF AT END OF LINE NER0 SA5 A5+1 PL X5,NER0 IF NOT END OF LINE NER1 MX7 0 CLEAR NXTLINE FLAG SA6 COMMAND SAVE RE-ENTRY SA0 B2 SAVE ERROR MESSAGE SA7 NXTLINE EQ PST FOR PARTIAL PROCESSING, RETURN TO *NER1* NER2 SB2 A0 RE-SET ERROR MESSAGE EQ CER EXIT TITLE PREFIX CHARACTER ROUTINES. ** PREFIX CHARACTERS. * * THE FOLLOWING ROUTINES ARE CALLED TO PROCESS * COMMAND PREFIX CHARACTERS. X SPACE 4,10 ** X - TOGGLE VERIFICATION. * ^X - ALTERNATE FORM. * * ENTRY NONE. * * EXIT TO *NCM*. * * USES A - 4, 6. * B - 4, 6. PREFIX X SA4 XVERIFY TOGGLE MODE BX6 -X4 SA6 A4-B1 EQ NCM2 EXIT PLUS SPACE 4,10 ** + - GET DATA INPUT FROM NEW INPUT LINES. * * ENTRY NONE. * * EXIT TO *NCM*. * * USES A - 1, 7. * X - 1, 7. PREFIX + SA1 PREFIX SX7 1BS"PLUS" BX1 X1+X7 SA7 A1 EQ NCM2 EXIT SLASH SPACE 4,15 ** / - SKIP TO A NEW LINE. * ENTRY NONE. * * EXIT (SCOUNT) = (SCOUNT) + 1. * TO *NCM2* IF NO ERRORS. * TO *NCM19* OR *NER* IF ERRORS. * * USES A - 1, 7. * X - 1, 7. * B - 2. * NOTES SLASH PREFIX PROCESSED IN *PST*. * PREFIX / SB2 ARG.*100B+1 SA1 INPMODE NG X1,NER IF IN INPUT MODE (POINTER MOTION ILLEGAL) SA1 IWHERE NG X1,NCM19 IF IN CREATION MODE SA1 SCOUNT SX7 X1+B1 INCREMENT SLASH COUNT SA7 A1 EQ NCM2 EXIT UPARROW SPACE 4,15 ** UP ARROW - GO TO TOP OF FILE BEFORE PROCESSING. * * ENTRY NONE. * * EXIT (SCOUNT) = 0. * TO *NCM2* IF NO ERRORS. * TO *NCM19* OR *NER* IF ERRORS. * * USES A - 1, 7. * X - 1, 7. * B - 2. PREFIX UA. SB2 ARG.*100B+1 SA1 INPMODE NG X1,NER IF IN INPUT MODE (POINTER MOTION ILLEGAL) SA1 IWHERE NG X1,NCM19 IF IN CREATION MODE BX7 X7-X7 SA7 SCOUNT ZERO SLASH PREFIX COUNT RJ TOP EQ NCM2 EXIT PREFIXT SPACE 4,10 PREFIXT BSS 0 PREFIX HERE ASSEMBLE PREFIX TABLE PREFIXU DATA 0 END MARKER PURGMAC PREFIX VOID USE OF THIS MACRO TITLE SPECIAL COMMAND FORMS. ** SPECIAL COMMANDS- * * THE FOLLOWING COMMANDS PROCESS SPECIAL COMMANDS. - SPACE 4,15 ** - - EXECUTE LAST Y OR Z COMMAND. * * ENTRY AT *DSH1* TO PROCESS *.* COMMAND. * * EXIT TO *PST1* IF NO ERRORS. * TO *CER* OR *NER* IF ERROR. * * USES X - 0, 1, 3, 6, 7. * A - 0, 1, 3, 6, 7. * B - 2. * * CALLS MPR, STK, STL, VAL. SPECIAL (-) SA0 Y.DEV SET ADDRESS OF DEVICE TO STACK * ENTRY (A0) = ADDRESS OF DEVICE TO STACK. DSH1 RJ VAL SB2 ILL. PL X5,NER IF ARGUMENT AFTER LINE COUNT SX7 DSH3 NG X6,DSH2 IF USED PARAMETER 0 NZ X6,DSH2 IF SPECIFIED A NUMBER SX6 1 SET DEFAULT DSH2 SA6 SKPCNT SA7 COMMAND SET COMMAND ADDRESS (RE-ENTER) EQ PST1 CLOSE COMMAND PROCESSING DSH3 SA1 SKPCNT RJ STL PROCESS INTERRUPT ZR X1,DSH4 IF NOT TO ADVANCE POINTER SA3 INPMODE SB2 ARG.*100B+1 NG X3,CER IF NOT VALID IN INPUT MODE SA3 IWHERE SB2 CNV.*100B+1 NG X3,CER IF NOT VALID IN CREATION MODE RJ MPR DSH4 SA1 A0 SET ADDRESS OF DEVICE TO STACK RJ STK STACK DEVICES SB2 STK. EQ CER IF DEVICE IS NOT STACKABLE . SPACE 4,10 ** . - EXECUTE LAST COMMAND. * * ENTRY NONE. * * EXIT TO *DSH1*. * * USES A - 0. SPECIAL (.) SA0 P.DEV SET ADDRESS OF DEVICE TO STACK EQ DSH1 EXIT, EXECUTE LAST COMMAND SPCMDT SPACE 4,10 SPCMDT BSS 0 SPECIAL HERE ASSEMBLE SPECIAL COMMAND TABLE SPCMDU DATA 0 END MARKER PURGMAC SPECIAL VOID USAGE OF MACRO NCL SPACE 4,40 ** NCL - OBTAIN NEXT COMMAND LINE AND PUT INTO *C.STR*. * * NCL READS THE NEXT LINE FROM THE CURRENT INPUT FILE * AND PLACES IT INTO C.STR (C.STR-1 IS UPDATED ALSO). * IF THERE IS NO FET (IE. THE *.* AND *-* COMMANDS), THE * INPUT STACK IS POP-ED AND THE LAST INPUT LINE IS * RE-INSTATED AT ITS PREVIOUS POSITION. IF THERE IS A * FET, *READC* IS CALLED TO READ IN THE NEXT LINE. IF * POSITIONED AT AN EOR,EOF,EOI, THE STACK IS POP-ED IF * NOT THE PRIMARY INPUT SOURCE. * * NDL - OBTAIN NEXT DATA LINE FROM COMMAND LINE AND PUT INTO * C.STR. * * THIS IS A SECOND ENTRY POINT TO *NCL*. SINCE XEDIT ALLOWS * THE USER TO INTERMIX COMMANDS AND DATA, EVERY SO OFTEN * XEDIT NEEDS MORE DATA (WHICH EXISTS ON THE NEXT COMMAND * LINE. THIS ENTRY POINT HANDLES THIS CASE. (DESIGNED TO BE * USED WITH *RDL*.) * * ENTRY NONE. * * EXIT (X1) = 0 IF DATA HAS BEEN READ. * .NE. 0 IF AN EMPTY CR WAS ENCOUNTERED. * RETURNS TO CALLER IF ENTERED VIA *NDL*, * ELSE RETURNS TO *NCM*, UNLESS IN *INPUT* MODE, THEN * RETURNS TO *INP2*. * IF END OF INPUT AND NOT TTY INPUT FILE, TO *ABT*. * * USES A - 1, 2, 3, 4, 5, 6, 7. * X - 1, 2, 3, 4, 5, 6, 7. * B - 6, 7. * * CALLS STL, UPL. * * MACROS PROMPT, READ, READC, WRITEO. NDL DATA 0 NEW DATA LINE ENTRY. THIS WORD IS A FLAG. * IF (NDL) = 0, THEN ENTERED VIA *NCL*, ELSE VIA *NDL*. NCL SA5 C.ON OBTAIN CURRENT INPUT DEVICE SA3 X5-1 GET FET ADDRESS ZR X3,NCL5 IF NO FET (POP STACK) SA1 PROMPT SX2 X3 SET FET ADDRESS BX6 X1 SA4 NDL SX7 X2-INPUT NZ X4,NCL1 IF REQUESTING DATA NG X3,NCL5 IF POP IF ASKING FOR COMMAND NZ X7,NCL1 IF NOT PRIMARY INPUT ZR X6,NCL1 IF NOT TO ISSUE PROMPT WRITEO OUTPUT NCL1 SA1 TTYIN SA3 NCLA SA2 BATCH BX6 X1+X3 SA6 A3 NZ X3,NCL2 IF READ NOT NEEDED SA4 NDL NG X2,NCL1.1 IF IN BATCH MODE NZ X4,NCL1.1 IF ENTERED VIA *NDL* PROMPT OFF TURN OFF PROMPT NCL1.1 READ INPUT,RECALL SA2 BATCH NG X2,NCL2 IF IN BATCH MODE PROMPT ON TURN ON PROMPT NCL2 READC INPUT,X5-34D,33D READ NEW LINE SA3 C.STR-1 RESET CHARACTER INDEX NZ X1,NCL6 IF HIT END OF SOMETHING PX6 B1,X3 RESET CHARACTER INDEX SA6 A3 NCL3 SA1 X5-34D FWA OF STRING SB6 C.STR FWA OF STRING RJ UPL SX1 0 SET SUCCESSFUL READ NCL4 SA2 NDL ZR X2,NCL8 IF ENTERED VIA NCL AX2 30 BX7 X7-X7 SA7 TLX IGNORE INTERRUPT IF DATA LINE SB7 X2 OBTAIN RETURN ADDRESS SA7 A2 CLEAR *NDL* FLAG JP B7 RETURN TO CALLER * POP INPUT STACK NCL5 MX6 1 SET DEVICE IN-ACTIVE SA5 X5 GET NEW DEVICE SA6 A5 IDLE OLD DEVICE SA2 X5+B1 GET OLD C.STR-1 WORD BX7 X5 LX6 X2 SA7 C.ON CHANGE CURRENT DEVICE POINTER SA6 C.STR-1 EQ NCL3 UNPACK AND EXIT * END OF SOMETHING ENCOUNTERED ON INPUT FILE. NCL6 SA2 X5-1 GET FET ADDRESS SX2 X2-INPUT PRIMARY INPUT FOR CMD OR DATA NZ X2,NCL5 IF NOT PRIMARY INPUT FILE SA4 TTYIN NZ X4,NCL7 IF NOT *TTY* INPUT FILE (ABORT) RJ STL EVENTUALLY RETURNS TO *NCL* IF INTERRUPT MX6 0 SET READ REQUIRED SA6 NCLA (X1) .NE. 0 EQ NCL4 READ INPUT FILE NCL7 SB6 =C* END OF INPUT ENCOUNTERED - ABORTED.* EQ ABT ABORT XEDIT NCL8 SA2 INPMODE NG X2,INP2 IF IN INPUT MODE ZR X1,NCM IF NOT EMPTY CARRIAGE RETURN SA1 UPDATE PL X1,NCM21 IF IN LOOK MODE EQ INP1 BEGIN INPUT MODE NCLA DATA 0 READ REQ,D FROM INPUT IF ZERO TITLE COMMAND TABLE. JUMP BSS 0 START OF COMMAND TABLE .ADD COMMAND ADD,A,NUMBER1,,ADD,(IN,F0) .ALN COMMAND ADDLN,ALN,NUMBER2,-1,PLN,,OVL2 .ALNS COMMAND ADDLNS,ALNS,NUMBER2,-2,PLN,,OVL2 .BOTTOM COMMAND BOTTOM,B,NONE,,BTR,(LK) .BRIEF COMMAND BRIEF,BR,TOGGLE,(XVERIFY*2+0),SFG,(CR,LK,IN) .CHANGE COMMAND CHANGE,C,STRING,340000B,CNG,(IN,F0) .CS COMMAND CHANGES,CS,STRING,340000B,CGS,(IN,F0) .COPY COMMAND COPY,,ONEFILE,070011B,CPY,(LK,IN,F0),OVL2 .COPYD COMMAND COPYD,,ONEFILE,070011B,CPY11,,OVL2 .DBADL COMMAND DBADL,DBL,NUMBER1,-1,PBL,,OVL2 .DEFTAB COMMAND DEFTAB,DT,CHAR,(TABCHAR*2+0),SCH,(CR,IN,LK) .DELETE COMMAND DELETE,D,STRING,070000B,DLT .DEL COMMAND DELIMIT,DEL,CHAR,1,DEL,(CR,LK,IN) .DEOF COMMAND DEOF,DF,NUMBER1,DF,DRF .DEOR COMMAND DEOR,DR,NUMBER1,DR,DRF .DLN COMMAND DELETELN,DLN,NONE,0,PLN,,OVL2 .DLB COMMAND DLBLANKS,DLB,NUMBER1,,DLB,,OVL2 .EDIT COMMAND EDIT,,NONE,,PEC,(IN) .END COMMAND END,E,ONEFILE,000022B,EFQ .EXPLAI COMMAND EXPLAIN,,NONE,,EXP,(CR,IN,LK),OVL1 .FBADL COMMAND FBADL,FBL,NUMBER1,1,PBL,(LK),OVL2 .FILE COMMAND FILE,F,ONEFILE,000022B,EFQ .FINDLL COMMAND FINDLL,FLL,NUMBER1,,FLL,(LK) .HELP COMMAND HELP,H,NULL,,HELP,(CR,LK,IN),OVL1 .INPUT COMMAND INPUT,,CHAR,0,INP,(CR) .INSERT COMMAND INSERT,I,NUMBER1,IIB4,IIB,(CR) .IB COMMAND INSERTB,IB,NUMBER1,IIB3,IIB,(IN) .LISTAB COMMAND LISTAB,LT,NONE,,LTB,(CR,LK,IN),OVL2 .LOCATE COMMAND LOCATE,L,STRING,260000B,LCT,(LK) IF DEF,TIMES,1 .LOC COMMAND LOC,,STRING,260000B,LCTA,(LK) .MODIFY COMMAND MODIFY,M,NONE,0,MOD,(IN) .NEXT COMMAND NEXT,N,NEXT,,NXT,(LK) .NOBELL COMMAND NOBELLS,NB,NONE,,NBL,(CR,IN,LK),OVL2 .OCTCHA COMMAND OCTCHANGE,OC,NULL,300000B,OCT,(IN,F0),OVL2 .PRINT COMMAND PRINT,P,NUMBER1,,PNT,(CR,IN,LK,F0) .QMOD COMMAND QMOD,QM,NUMBER1,0,MOD1,(IN,F0) .QUIT COMMAND QUIT,Q,ONEFILE,000022B,EFQ .READ COMMAND READ,,NULL,,RDP,,OVL2 .READP COMMAND READP,,NULL,,RDP,,OVL2 .REPLACE COMMAND REPLACE,R,NUMBER1,,RLP,(IN,F0) .RLN COMMAND REPLACELN,RLN,NUMBER2,1,PLN,,OVL2 .RESTOR COMMAND RESTORE,REST,NONE,,RST .RM COMMAND RMARGIN,RM,NUMBER1,,RMA,(CR,IN,LK) .STOP COMMAND STOP,,NONE,,ABO,(CR,LK) .TABS COMMAND TABS,TAB,NUMBER,NTABS,STB,(CR,LK,IN) .TEOF COMMAND TEOF,,TOGGLE,ITOGGLF,TGL,(CR,LK,IN) .TEOR COMMAND TEOR,,TOGGLE,ITOGGLR,TGL,(CR,LK,IN) .TRIM COMMAND TRIM,,TOGGLE,TRIM,TGL,(CR,LK,IN) .TRUNC COMMAND TRUNCATE,TRUNC,NUMBER1,,TRN,(IN,F0) .TOP COMMAND TOP,T,NONE,,TTN,(LK) .TOPNUL COMMAND TOPNULL,TN,NONE,,TTN .VERIFY COMMAND VERIFY,V,TOGGLE,(XVERIFY*2+1),SFG,(CR,LK,IN) .WEOF COMMAND WEOF,WF,NONE,34B,WRM,(IN) .WEOR COMMAND WEOR,WR,NONE,24B,WRM,(IN) .WHERE COMMAND WHERE,W,NONE,,WHR,(CR,IN,LK) .WM COMMAND WMARGIN,WM,NUMBER2,,SWN,(CR,IN,LK) .Y COMMAND Y,,NULL,,YZP,(CR,LK,IN) .YQMOD COMMAND YQMOD,YQM,NUMBER1,0,MOD2,(IN,F0) .Z COMMAND Z,,NULL,,YZP,(CR,IN,LK) JUMPX DATA 0 VFD 2/3,58/0 INCORRECT COMMAND MARKER SPACE 4 ** ASSEMBLE DATA NEEDED FOR OVERLAYS. * THIS CODE NEEDS TO BE AFTER THE COMMAND DEFINITIONS. LOVA VFD 24/0,30/0LXEDIT,6/0 OVERLAY BASE NAME LOVB VFD 30/MINFL,30/0 MINIMUM BASE FIELD LENGTH C.A SET 1 PREPARE TABLE OF FIELD LENGTHS DUP MXOVL,3 C.D DECMIC C.A VFD 30//XEDIT_"C.D"_/LWA,30/0 C.A SET C.A+1 .H IFEQ DEBUG,1 IF DEBUG ON DATA 10H LOADING .H ENDIF LOVC BSSZ 1 OVERLAY NAME LOVD VFD 6/1,6/,5/,1/1,24/,*P/ LOVE CON 0 LAST OVERLAY LOADED IFEQ FILEOV,3,6 LOVF CON 0 .NE.0 IF OVERLAY LOADED FROM LIBRARY LOVG BSS 0 .I IFEQ DEBUG,1 IF DEBUG ON SCRG FILEC E.SCR,150D,(FET=13D),EPR .I ELSE SCRG FILEC E.SCR,150D,(FET=13D),(USN=LIBRARY),EPR .I ENDIF TITLE COMMAND PROCESSORS. ** ENTRY CONDITIONS TO ALL COMMAND PROCESSORS - * * (X1) = (DECA) - INSTRUCTION DESCRIPTER WORD. * (INDEX) = ADDRESS OF INSTRUCTION DESCRIPTER WORD. ABO SPACE 4,10 ** ABO - PROCESS ABORT COMMAND. * * ENTRY NONE. * * EXIT TO *ABT*. * * USES A - 2. * X - 2. * B - 6. * * MACROS RETURN. ABO SA2 SPCP LX2 59-58 PL X2,ABO1 IF *P* NOT SPECIFIED RECALL SFET SA1 ISFN GET EDIT FILE NAME SX6 B1 SET COMPLETE BIT BX6 X6+X1 SA6 X2 RETURN X2,R RETURN EDIT FILE ABO1 SB6 =C* ABORTED* EQ ABT ABORT XEDIT ADD SPACE 4,15 ** ADD - ADD TEXT TO END OF LINE(S). * * ENTRY (NUMS) = NUMBER OF LINES TO ADD. * * EXIT TO NCM. * * USES A - 1, 2, 6, 7. * X - 1, 2, 3, 4, 6, 7. * B - 4, 6, 7. * * CALLS ITM, RDF, RDL, SAC, SAL, VFY, VRY, WTF. * * ROUTINE REQUESTS ONE LINE OF DATA, AND ADDS IT TO * THE END OF N LINES. THE TRUNCATION MESSAGE IS ISSUED * IF THE RESULTANT LENGTH IS GREATER THAN 160 CHARACTERS. ADD SA1 NUMS SX6 B1 IX6 X1-X6 DECREMENT TO MAKE TESTING EASIER SA6 A1 RJ SAC SET ASCII PROCESSING RJ RDL NZ X1,NCM IF NOTHING ON LINE (RETURN) EQ ADD2 PROCESS ADD ADD1 SA6 A1 REPLACE COUNT RJ WTF RJ RDF ADD2 SA1 E.STR-1 SA2 D.STR-1 SX3 X1-160D BX3 -X3 NUMBER OF AVAILABLE CHARACTERS IX4 X3-X2 SB7 A1 PL X4,ADD3 IF NO TRUNCATION BX2 X3 TRUNCATE DATA LINE ADD3 IX7 X1+X2 GET NEW LENGTH SB6 B7+X1 ADDR OF LAST CHAR IN EDIT LINE MX6 2 SET END OF LINE SB4 X2+B1 INCLUDE END OF LINE ADD4 SA6 B6+B4 SB4 B4-B1 SA1 A2+B4 BX6 X1 NZ B4,ADD4 IF NOT ALL MOVED SA7 E.STR-1 PL X4,ADD5 IF NO TRUNCATION RJ ITM ISSUE TRUNCATION MESSAGE ADD5 SX7 B1 SA7 E.LMOD SET MODIFICATIONS MADE SA7 NOMOD SET FILE MODIFICATIONS MADE RJ VRY VERIFY LINE SA1 NUMS SX6 B1 IX6 X1-X6 NG X6,NCM IF FINISHED EQ ADD1 PROCESS NEXT LINE BTR SPACE 4,25 ** BTR - ADVANCE TO BOTTOM OF CURRENT RECORD. * * ENTRY NONE. * * EXIT TO VRT. * * USES A - 1, 2, 3. * X - 1, 2, 3. * * CALLS RDF, WTF. * * MACROS RECALL. * * THIS ROUTINE TAKES ASSUMES THAT THE END OF RECORD HAS BEEN * ENCOUNTERED WHEN THE FOLLOWING CONDITIONS ARE TRUE. * 1. THE FET IS NOT BUSY * 2. *IN* IS EQUAL TO *OUT* * DUE TO XEDIT,S HABIT OF PASSING OVER NULL RECORD/FILES THESE * CONDITIONS WILL LOCATE THE BOTTOM. * NOTE- XEDIT WILL TREAT AN EOF AS AN EOR IF THERE IS TEXT * IMMEDIATELY BEFORE THE EOF. THIS WAS ASSUMED WITHIN THE * OF THE DESIRED FUNCTION OF BOTTOM. BTR1 RJ WTF ADVANCE TO NEXT LINE RJ RDF BTR SA1 E.IN+2 *IN* SA2 A1+B1 *OUT* IX2 X2-X1 NZ X2,BTR1 IF *IN* NOT EQUAL TO *OUT* (NOT AT END) SA3 E.IN LX3 59-0 NG X3,VRT IF FET IS COMPLETE RECALL A3 WAIT FET COMPLETION EQ BTR FIND BOTTOM CNG/CNS SPACE 4,15 ** CNG/CNS - PROCESS CHANGE AND CHANGES COMMANDS. * * ENTRY (NUMS) = IF VIA *CNG*, NUMBER OF LINES. * IF VIA *CNS*, NUMBER OF STRINGS. * * EXIT TO *NCM*. * IF STRING NOT FOUND, TO *LCT4* * * USES A - 0, 1, 4, 6, 7. * X - 0, 1, 4, 5, 6, 7. * B - 6. * * CALLS CHS, ITM, RDF, TSL, VRY, WTF. CNG SX0 E.SCR+160D SET LWA+1 OF SCRATCH, ENTRY EQ CNG1 PROCESS CHANGE CGS SX0 E.SCR+160D SET LWA+1 OF SCRATCH, ENTRY MX7 1 BX0 X0+X7 SET STRING MODE CNG1 SA0 E.SCR SET FWA OF BUFFER RJ CHS CHANGE STRING(S) ZR B5,CNG5 IF STRING NOT FOUND NZ X5,CNG2 IF NO TRUNCATION SA1 P1RP CHECK IF STRING LENGTHS ARE EQUAL SA4 P1LP IX6 X1-X4 SA1 P3RP SA4 P3LP IX1 X1-X4 IX6 X6-X1 ZR X6,CNG2 IF STRING LENGTHS ARE EQUAL RJ ITM ISSUE TRUNCATION MESSAGE CNG2 SA1 E.SCR SB6 E.STR-1 SX7 B1 * COPY LINE BACK FROM SCRATCH AREA. CNG3 BX6 X1 SB6 B6+B1 SA1 A1+B1 SA6 B6 PL X6,CNG3 IF NOT END OF LINE SB6 E.STR-1 RJ TSL TRIM SPACES OFF LINE SA7 NOMOD SA7 E.LMOD RJ VRY VERIFY THE CHANGE BX6 X0 AX6 59-1 =0 IF REGULAR, =-1 IF STRING MODE SA1 NUMS IX6 X1-X6 IF STRING, INCREMENT SX1 B1 IX7 X6-X1 IX6 X7-X1 NG X6,NCM IF FINISHED SA7 A1+ * ADVANCE POINTER AND CONTINUE. CNG4 BX5 X0 SAVE (X0) RJ WTF RJ RDF BX0 X5 RESTORE (X0) EQ CNG1 CONTINUE CHANGE * PROCESS STRING NOT FOUND. CNG5 SA1 NUMS PL X1,CNG4 IF NOT 0 OPTION EQ LCT4 ISSUE * STRING NOT FOUND.* DEL SPACE 4,10 ** DEL - SET DELIMITER CHARACTER. * * ENTRY (NUMS) = NEW DELIMITER CHARACTER. * * EXIT TO *NCM*. * * USES A - 1, 2, 4, 6. * X - 1, 2, 3, 4, 6. DEL SA2 NUMS MX3 -18 BX2 -X3*X2 REMOVE EXCESS CHARACTERS (IF -1) SA4 C.ON SX4 X4-Y.DEV ZR X4,DEL1 IF NOT CURRENTLY *Y/Z* LINE * NOTE- Y/Z DELIMIT COMMAND TAKES EFFECT * OUTSIDE OF *Y/Z* COMMAND STRING. SA1 C.STR-1 BX1 X3*X1 IX6 X1+X2 SA6 A1 DEL1 SA1 I.DEV+1 BX1 X3*X1 IX6 X1+X2 SA6 A1 SA1 S.DEV+1 BX1 X3*X1 IX6 X1+X2 SA6 A1 EQ NCM EXIT DLT SPACE 4,15 ** DLT - DELETE LINE(S). * * ENTRY (NUMS) = COUNT (-0 = NO ADVANCE). * STRING FIELDS PARSED AND INITIALIZED. * * EXIT TO *NCM*. * * USES A - 1, 6, 7. * X - 1, 5, 6, 7. * B - 4. * * CALLS LOC, RDF, VRY, WTF. DLT1 SA1 NUMS NG X1,LCT4 IF -0 OPTION. (STRING NOT FOUND) RJ WTF DLT2 RJ RDF DLT SB4 E.STR-1 SET FWA SEARCH -1 RJ LOC ZR B5,DLT1 IF STRING NOT IN LINE SA1 NUMS SX7 B1 IX6 X1-X7 DECREMENT COUNT AX5 X1,B1 SA6 A1 SA7 NOMOD SET MODIFICATIONS MADE TO FILE RJ VRY VERIFY DELETED LINE NZ X5,DLT2 IF MORE TO DELETE RJ RDF CREAM EXISTING LINE EQ NCM EXIT DRF SPACE 4,10 ** DRF - DELETE RECORD/FILE MARKS. * * ENTRY (NUMS) = NUMBER TO DELETE. * (X1) = ADDRESS OF DELETION COUNT CELL. * * USES A - 0, 1, 2, 6. * X - 1, 2, 6. * * CALLS RDF, WTF. DRF SA2 NUMS AX1 18 GET CELL ADDRESS SA0 X1 SAVE CELL NZ X2,DRF0 IF NOT ZERO SX2 1 DRF0 BX6 X2 SA6 A0 SET DELETION COUNT DRF1 RJ WTF WRITE CURRENT LINE RJ RDF READ NEXT SA1 A0 NZ X1,DRF1 IF NOT DELETED MX6 0 SA6 NOMOD SET MODIFICATIONS MADE EQ NCM EXIT PEC SPACE 4,15 ** PEC - PROCESS EDIT COMMAND. * * ENTRY NONE. * * EXIT (INPMODE) = 1. * TO *NCM*. * * USES A - 6. * X - 6. * * MACROS WRITEC. PEC SX6 B1 SA6 INPMODE CLEAR INPUT MODE FLAG WRITEC OUTPUT,(=C* EDIT*) EQ NCM EXIT EFQ SPACE 4,20 ** EFQ - END, FILE, AND QUIT PROCESSOR. * * ENTRY (IFN) = FILE NAME PARAMETER. * (NUMS) = OPTIONS. * * EXIT IF TO TERMINATE XEDIT, TO *EXT*. * IF ERRORS, TO *CER* OR *NCM*. * * USES A - ALL. * X - ALL. * B - 2, 6, 7. * * CALLS CFF, PFM=, RDF, TOP. * * MACROS ERROR, FERROR, READ, RECALL, RENAME, * REWIND, STATUS. EFQ SA5 IFN GET SPECIFIED NAME SX6 B1 MX7 0 NZ X5,EFQ0 IF FILE NAME SPECIFIED SA5 ISFN USE *EDITFIL* EFQ0 SA7 SFET+5 CLEAR FNT/FST INFORMATION BX6 X6+X5 SA7 A7+B1 SA6 SFET RECALL E.IN WAIT ALL QUIET STATUS SFET,P OBTAIN INFORMATION SA4 SFET+5 GET FNT ENTRY SA1 SFET+1 MX7 -6 SAVE FILE STATUS BX7 -X7*X4 SA7 EFQB MX6 -8 ISOLATE PFM ERROR CODE MX7 1 SA3 NUMS GET OPTIONS BX1 -X7*X1 CLEAR BIT 59 LX4 -6 POSITION TO FILE TYPE BX6 -X6*X4 OBTAIN FILE TYPE AX1 -12 SHIFT DEVICE TYPE SX0 X6-PMFT =0 IF D.A. FILE ZR X0,EFQ1 IF DIRECT ACCESS FILE SX0 X6-QFFT ZR X0,EFQ1 IF QUEUE FILE SX0 X1-2RMT ZR X0,EFQ1 IF *MT* TYPE FILE SX0 X1-2RNT * (X0) = 0, IF FILE IS D.A., QUEUE, MT OR NT (NEED COPYBACK). * (X5) = FILE NAME. * (X3) = OPTIONS. * (X4) = FNT ENTRY SHIFTED LEFT -6. EFQ1 NZ X3,EFQ2 IF HAVE EXIT TYPE SX3 1BS0 SET DEFAULT OF LOCAL NZ X0,EFQ2 IF NOT DEFAULT OF COPYBACK SX3 1BS3 SET DEFAULT OF COPYBACK * CLEAR *L* FLAG IF *C* FLAG USED. EFQ2 BX6 X3 SX7 B1 LX6 0-3 BX6 X7*X6 GET *C* FLAG BX3 -X6*X3 CONDITIONALLY CLEAR *L* LX1 X3 * CHECK MODIFICATIONS ALLOWED TO FILE. SX7 50000B/100B SB2 EMI.*100B+1 BX7 X7*X4 NZ X7,CER IF NOT ALLOWED TO MODIFY FILE, EXIT EFQ3 NZ X0,EFQ4 IF NOT DA/MT/NT * IF DA/MT/NT MAKE SURE *L* NOT USED. SB2 EMI.*100B+2 LX1 59-0 NG X1,CER IF *L* USED, EXIT * (X3) = EXIT BITS (LOCAL,REPLACE,SAVE,COPYBACK). * (X5) = FINAL FILE NAME. EFQ4 SA2 NOMOD SET NOMOD TO NOMOD .OR. FS SA1 FS IF NOT ON SCRATCH FILE, COPY TO ONE SA0 X3 MOVE EXIT BITS TO A0 BX6 X1*X2 UPDATE NOMOD MX7 0 SA6 A2 SA7 IWHERE SET =0 TO FORCE COPY IF AT LINE 1 RJ TOP COPY FILE TO SCRATCH FILE SX0 A0 SET STATUS BITS TO X0 SA4 EFQA-1 EFQ5 SA4 A4+B1 GET NEXT OPTION ZR X4,EFQ10 IF END OF OPTIONS UX3,B7 X4 SB6 X4 LX1 B7,X0 PL X1,EFQ5 IF OPTION NOT SPECIFIED JP B6 PROCESS OPTION * PROCESS PFM OPTIONS. EFQ6 SA1 E.IN GET LOCAL NAME LX3 18 GET PFM CODE SX7 B1 ERRNZ PTRD-1 BX6 X5+X7 BX7 X7+X1 SET COMPLETE SA7 PFET SET LOCAL NAME SX7 X3 SA6 PFET+8 SET PERMANENT NAME SA0 A6 SAVE FILE NAME ADDRESS SX2 A7 SET FET ADDRESS RJ PFM= MAKE REQUEST SA1 X2 MX6 -8 AX1 10 BX6 -X6*X1 GET PFM ERROR ZR X6,EFQ9 IF VERIFY ACTION ERROR PFM.,X6 ISSUE PFM ERROR MESSAGE EQ EFQ11 END OF COMMAND * PROCESS LFM RENAME OPTION. EFQ7 SA1 EFQB ZR X1,EFQ7.1 IF *AUTO DROP* STATUS SX1 X1-NDST NZ X1,EFQ8 IF STATUS OTHER THAN *NO AUTO DROP* EFQ7.1 SA0 E.IN+6 BX6 X5 SA6 A0 SET NEW NAME INTO FET RENAME E.IN RENAME SCRATCH FILE SA1 X2 SX7 17BS10 BX7 X7*X1 SA7 FS INDICATE NOT READING SCRATCH FILE NZ X7,EFQ7.2 IF ERROR IN *RENAME* SA1 EFQB GET FILE STATUS ZR X1,EFQ9 IF *AUTO DROP* STATUS SETFS E.IN,NAD RESTORE *NO AUTO DROP* STATUS SA1 X2 CHECK FOR ERRORS SX4 17BS10 BX7 X4*X1 ZR X7,EFQ9 IF NO ERRORS IN *SETFS* EFQ7.2 ERROR LFM. EQ EFQ11 END OF COMMAND EFQ8 READ E.IN START READ (ASSUMES NAME IN FET) SX6 B1 BX6 X5+X6 SET COMPLETE SA6 CFET REWIND A6,RECALL RESET COPY FILE MX6 0 SA6 CFET+5 CLEAR JUNK LEFT VIA STATUS SA6 A6+B1 RJ CFF COPY FILE REWIND E.IN RESET EDIT FILE REWIND CFET,RECALL REWIND COPY FILE RECALL E.IN SA0 CFET SET FILE NAME POINTER * VERIFY ACTION. EFQ9 SA1 VERIFY SA4 A4 RESTORE THE *EFQ* OPTION WORD SX2 A0 SET FET ADDRESS PL X1,EFQ5 IF NOT TO VERIFY AX4 18 SA0 A4 SAVE VALUE OF A4 FERROR X2,X4 SA4 A0 RESET A4 EQ EFQ5 GET NEXT OPTION * PROCESS END OF COMMAND. EFQ10 SA1 INDEX SX1 X1-.FILE NZ X1,EXT IF EXIT XEDIT EFQ11 READ E.IN,RECALL RJ RDF EQ NCM PROCESS END OF COMMAND * TABLE OF *EFQ* OPTIONS. * FORMAT IS- * 12/2000B+59-BIT NUMBER,6/PFM CODE,24/VERIFY ADDR,18/ROUTINE EFQA VFD 12/2000B+59-2,6/1,24/FSV.,18/EFQ6 SAVE VFD 12/2000B+59-1,6/6,24/FRP.,18/EFQ6 REPLACE VFD 12/2000B+59-0,6/0,24/FLC.,18/EFQ7 LOCAL VFD 12/2000B+59-3,6/0,24/FCP.,18/EFQ8 COPYBACK DATA 0 EFQB BSS 1 STORAGE FOR EDIT FILE STATUS FLL SPACE 4,15 ** FLL - FIND LONG LINE PROCESSOR. * * ENTRY (NUMS) = NUMBER OF LONG LINES TO FIND. * (IW) = WIDTH. IGNORE LINES OF LENGTH .LE. WIDTH. * * EXIT TO *NCM*. * * USES A - 1, 2, 6. * X - 1, 2, 6. * * CALLS SAC, VFY. FLL RJ SAC SET ASCII PROCESSING FLL1 SA1 E.STR-1 GET CHARS IN CURRENT LINE SA2 IW IX1 X2-X1 PL X1,FLL2 IF LINE TOO SHORT RJ VRY VERIFY LONG LINE SA1 NUMS SX6 B1 IX6 X1-X6 AX1 1 ZR X1,NCM IF COUNT FINISHED, EXIT SA6 A1 FLL2 RJ WTF ADVANCE TO NEXT LINE RJ RDF EQ FLL1 CHECK NEXT LINE FLN SPACE 4,15 ** FLN - ADVANCE TO SPECIFIED LINE NUMBER. * * ENTRY (NUMS) = LINE NUMBER. * * EXIT TO *VRT*. * * USES A - 1. * X - 1, 6. * * CALLS GLN. FLN SA1 NUMS SX6 B1 IX6 X1-X6 PL X6,FLN1 IF LINE NUMBER SPECIFIED SX1 B1+ FLN1 RJ GLN GET LINE NUMBER EQ VRT EXIT, VERIFY LINE IIB SPACE 4,15 ** IIB - *INSERT* AND *INSERT BEFORE* PROCESSOR. * * ENTRY (NUMS) = NUMBER OF LINES TO INSERT. * (X1) = PROCESSOR ADDRESS. * * EXIT TO *NCM*. * * USES X - 1, 2, 6, 7. * A - 0, 1, 2, 6, 7. * B - 7. * * CALLS RDL, TCD, TLB, WTF. * * MACROS WRITEC. * * NOTES A NULL LINE WILL OVERRIDE THE LINE COUNT. IIB BSS 0 ENTRY AX1 18 GET ROUTINE JUMP ADDRESS SA2 NUMS SA0 X1 SET JUMP ADDRESS SX6 B1 IX6 X2-X6 SA6 A2+ IIB1 RJ RDL GET DATA LINE NZ X1,NCM IF A NULL LINE ENCOUNTERED RJ TCD TAB CODED DATA LINE IIB2 SB7 A0 JP B7 EXECUTE PROCESSOR * *INSERT BEFORE* PROCESSOR. IIB3 WRITEC E.OUT,D.LINE PUT LINE JUST RECEIVED SA1 IWHERE UPDATE *IWHERE* SX6 B1 IX6 X1+X6 SA6 A1+ EQ IIB5 PROCESS NEXT LINE * *INSERT* PROCESSOR. IIB4 RJ WTF WRITE EXISTING LINE * MOVE NEW LINE TO *E.LINE*. RJ TLB TRANSFER LINE TO BUFFER IIB5 SA1 NUMS SX6 B1 IX6 X1-X6 BX7 X7-X7 SA6 A1 DECREMENT LINES LEFT SA7 NOMOD SET MODIFICATIONS MADE PL X6,IIB1 IF MORE LINES EQ NCM EXIT INP SPACE 4,15 ** INP - ENTRY INPUT MODE REQUEST. * * ENTRY (NUMS) = ESCAPE CHARACTER. * * EXIT IF ERROR, TO *ABT* OR *CER*. * ELSE, TO *PEC*. * * USES A - 1, 2, 6, 7. * X - 1, 2, 6, 7. * B - 6, 7. * * CALLS RDL, RTA, STK, TAB, UPL, WTF. * * MACROS WRITEC. INP SA1 NUMS MOVE INPUT ESCAPE CHARACTER SA2 BATCH BX6 X1 SB6 =C+ *INPUT* ESCAPE CHAR. REQUIRED - BATCH MODE.+ PL X1,INP0 IF CHARACTER SPECIFIED NZ X2,ABT IF BATCH MODE, EXIT INP0 SA6 INPCHAR SET ESCAPE CHARACTER INP1 MX7 59 SET INPUT MODE SA7 INPMODE WRITEC OUTPUT,(=C* INPUT*) INP2 SA1 PREFIX SX6 1BS"PLUS" .CYB IF DEF,CYBRNET BX6 -X6*X1 CLEAR PLUS PREFIX .CYB ELSE BX6 X6+X1 SET + PREFIX .CYB ENDIF SA6 A1 RJ RDL READ DATA LINE NZ X1,PEC IF (RETURN TO EDIT MODE) SA1 D.LINE SB6 D.STR RJ UPL UNPACK TEXT LINE SA1 D.STR SA2 INPCHAR IX2 X2-X1 SB6 A1-B1 ZR X2,INP3 IF INPUT MODE ESCAPE CHAR MX6 0 SA6 NOMOD SET MODIFICATIONS MADE RJ TAB TAB TEXT LINE RJ WTF SB7 E.LINE SET DESTINATION SB6 D.STR RJ RTA PACK LINE INTO EDIT LINE BUFFER EQ INP2 PROCESS NEXT LINE INP3 SB7 S.LINE PACK COMMAND LINE INTO SPECIAL BUFFER SB6 D.STR+1 AND SKIP ESCAPE CHARACTER RJ RTA SA1 S.DEV RJ STK PROCESS ESCAPED COMMANDS SB2 STK. EQ CER COMMAND STACKING ERROR, EXIT LCT SPACE 4,20 ** LCT - LOCATE SPECIFIED STRING. * * ENTRY (X5) .NE. 0. * (NUMS) = NUMBER OF MATCHES TO FIND. * IF -0, THEN DO NOT ADVANCE POINTER. * (MCOUNT) = 0. * STRING POINTERS ARE INITIALIZED PROPERLY. * * EXIT TO *NCM*. * * USES A - 1, 2, 3, 6, 7. * X - 1, 2, 3, 5, 6, 7. * B - 4. * * CALLS LOC, RDF, VRY, WTF. * * MACROS ERROR. IF DEF,TIMES LCTA BSS 0 TIMING ENTRY SX5 0 SET NOT TO CALL LOC ENDIF LCT BSS 0 NORMAL ENTRY SA1 NUMS NZ X1,LCT1 IF COUNT IS .NE. 0 NG X1,LCT1 IF *0* COUNT WAS SPECIFIED SX6 B1 RESET COUNT TO 1 SA6 A1 LCT1 SB4 E.STR-1 SET FWA-1 FOR SEARCH IF DEF,TIMES,1 ZR X5,LCT1.1 IF IN DEBUGGING MODE RJ LOC SEARCH EXISTING LINE FOR STRING IF DEF,TIMES,1 LCT1.1 BSS 0 ZR B5,LCT3 IF STRING NOT FOUND RJ VRY SA2 MCOUNT SA1 NUMS SX6 B1 IX7 X2+X6 INCREMENT NUMBER OF MATCHES IX6 X1-X6 DECREMENT NUMBER OF LINES SA7 A2 AX1 1 ZR X1,NCM IF FINISHED, EXIT SA6 A1 LCT2 RJ WTF ADVANCE TO NEXT LINE RJ RDF EQ LCT1 SEARCH NEXT LINE * STRING NOT IN LINE. CHECK FOR *0* OPTION. LCT3 SA1 NUMS NZ X1,LCT2 IF NOT *0* OPTION LCT4 ERROR SNF. ENTRY FOR * STRING NOT FOUND.* SA3 C.STR-1 SET TO *READ* FOR NEXT CMD PX6 B0,X3 SA6 A3 EQ NCM EXIT MOD SPACE 4,10 ** MOD - MODIFY LINE(S). * * ENTRY AT *MOD* FOR *MODIFY* COMMAND. * AT *MOD1* FOR *QMOD* COMMAND. * AT *MOD2* FOR *YQMOD* COMMAND. * * USES A - 1, 3, 6, 7. * X - 1, 3, 6, 7. * * CALLS ETL, ITM, MDY, PCN, RDF, RDL, SAC, SCD, VRY, WTF. * ENTRY TO PROCESS *MODIFY* COMMAND. MOD RJ SCD SET CODED FOR SHIFT SX6 1 SA1 E.LINE SA6 NUMS FORCE COUNT TO 1 SA3 MODA SET SHIFT WORD RJ ETL ECHO TEXT LINE EQ MOD2 PERFORM MODIFICATION * ENTRY FOR *QMOD* COMMAND. MOD1 RJ PCN PRINT COLUMN NUMBERS * ENTRY FOR *YQMOD* COMMAND. MOD2 RJ SAC SET ASCII PROCESSING RJ RDL READ DATA LINE NZ X1,NCM IF NOTHING THERE, EXIT MOD3 RJ MDY MODIFY LINE PL B3,MOD4 IF NO TRUNCATION RJ ITM MOD4 SX7 1 SA7 NOMOD SET MODIFICATIONS MADE SA7 E.LMOD SET LINE MODIFICATIONS MADE RJ VRY AND THEN VERIFY IT SA1 NUMS SX6 B1 IX6 X1-X6 AX1 1 ZR X1,NCM IF FINISHED SA6 A1 RJ WTF RJ RDF EQ MOD3 PROCESS NEXT LINE MODA CON 2L +11 PARAMETER FOR *ETL* MOD RMT BATCH PARAMETER DEFINITION CON 3L +17 RMT NXT SPACE 4,10 ** NXT - PROCESS NEXT COMMAND. * * ENTRY (NUMS) = NUMBER OF LINES TO MOVE. * (NUMS+1) = DIRECTION OF MOVE (-0 = BACKWARDS, * +0 = FORWARDS). * * USES A - 1, 2, 6. * X - 1, 2, 6. * * CALLS MPR, VRT. NXT SA1 NUMS MX6 0 SET E.NMODE TO CODED SA2 A1+B1 BX1 X1-X2 OBTAIN PROPER DISPLACEMENT NZ X1,NXT1 IF NOT ZERO DISPLACEMENT (ASSUME 1) SX1 B1 SET *NEXT-1* COMMAND NXT1 SA6 E.NMODE RJ MPR MOVE THE POINTER EQ VRT VERIFY AND RETURN PNT SPACE 4,15 ** PNT - PRINT COMMAND PROCESSOR. * * ENTRY (NUMS) = NUMBER OF LINES TO PRINT. * * EXIT TO *NCM*. * * USES A - 1, 2, 4, 6. * X - 1, 2, 4, 6. * * CALLS RDF, SCD, WTF. * * MACROS WRITEC. PNT SA1 NUMS SA2 IWHERE SX6 B1 IX6 X1-X6 DECREMENT BY ONE (MAKE TESTING EASIER) NG X2,PNT2 IF IN CREATION MODE SA6 NUMS RJ SCD SET CODED LINE FORMAT PNT1 SA4 IW PRINT LINE WRITEC OUTPUT,E.LINE SA1 NUMS SX6 B1 IX6 X1-X6 DECREMENT COUNT NG X6,NCM IF DONE, EXIT SA6 NUMS RJ WTF RJ RDF EQ PNT1 PRINT NEXT LINE PNT2 WRITEC OUTPUT,(=C* NULL LINE - IN CREATION MODE*) EQ NCM EXIT RLP SPACE 4,15 ** RLP - *REPLACE* PROCESSOR. * * ENTRY (NUMS) = NUMBER OF LINES TO REPLACE. * * EXIT TO *NCM*. * * USES X - 2, 6, 7. * A - 2, 6, 7. * * CALLS RDF, RDL, TCD, TLB, WTF. * * NOTES A NULL LINE WILL OVERRIDE THE LINE COUNT. RLP1 RJ WTF COPY DATA LINE TO EDIT FILE * READ EDIT FILE. IF EOI, EXIT TO *NCM*. RJ RDF RLP BSS 0 ENTRY RJ RDL GET DATA LINE NZ X1,NCM IF EMPTY WAS ENCOUNTERED RJ TCD TAB CODED DATA LINE RJ TLB TRANSFER LINE TO *E.LINE* SA2 NUMS DECREMENT LINE COUNT SX7 B1 IX6 X2-X7 IX2 X6-X7 BX7 X7-X7 SA7 NOMOD SET MODIFICATIONS MADE SA6 A2+ PL X2,RLP1 IF LINE COUNT NOT EXHAUSTED EQ NCM EXIT RMA SPACE 4,15 ** RMA - PROCESS RIGHT MARGIN COMMAND. * * ENTRY (NUMS) = NEW VALUE OF MARGIN (0 = RESET TO MAXIMUM). * * EXIT (IW) = THE VALUE OF THE RIGHT MARGIN. * IF NO PARAMETER GIVEN, *MAXWD*. * IF WIDTH IS NOT IN RANGE, TO *CER*, ELSE TO *NCM*. * * USES A - 1, 6. * X - 1, 2, 3, 6. * B - 2. RMA SA1 NUMS SX3 X1-MAXWD-1 NZ X1,RMA1 IF WIDTH SPECIFIED (ELSE DEFAULT TO 160) SX1 160D RMA1 SX2 X1-MINWD BX3 -X3+X2 LX6 X1 SB2 ILL. NG X3,CER IF WIDTH NOT IN RANGE SA6 IW EQ NCM EXIT SWN SPACE 4,15 ** SWN - SET WINDOWS. * * ENTRY (NUMS) = LEFT WINDOW. * (NUMS+1) = RIGHT MARGIN. * * EXIT (LMW) = LEFT WINDOW. * (RMW) = RIGHT WINDOW. * (RTWD) = RIGHT WINDOW MARGIN. * IF ERROR, TO *CER*, ELSE TO *NCM*. * * USES A - 1, 2, 6, 7. * X - 1, 2, 3, 4, 5, 6, 7. * B - 2. SWN SA1 NUMS SA2 A1+B1 IX3 X2-X1 POSITIVE, IF LEFT .LE. RIGHT SX4 X1-1 POSITIVE IF 0 .LT. LEFT SX5 X2-161 NEGATIVE IF RIGHT .LE. 160 BX3 X3+X4 BX3 -X5+X3 * (X3) = POSITIVE, IF 0 .LT. LEFT .LE. RIGHT .LE. 160. SB2 ARG. NG X3,CER IF ARGUMENTS NOT PROPER SX7 X2+ SA7 RTWD SX6 X1+E.STR-2 SET FWA -1 OF START SX7 X2+E.STR SET LWA+1 FOR SEARCH SA6 LMW SA7 A6+B1 EQ NCM EXIT RST SPACE 4,15 ** RST - RESTORE FILE TO PREVIOUS CONDITION. * * ENTRY NONE. * * EXIT TO *NCM*. * (IWHERE) = 0. * (NOMOD) = 73B, INDICATES NO MODIFICATIONS. * * USES A - 6, 7. * X - 6, 7. * * CALLS TOP. RST BX7 X7-X7 SET IWHERE TO 0 (FORCE REWIND) MX6 73B SET *NOMOD* TO INDICATE NO MODIFICATIONS SA7 IWHERE SA6 NOMOD RJ TOP RESET FILES EQ NCM EXIT SCH SPACE 4,10 ** SCH - SET CHARACTER IN WORD. * * ENTRY (NUMS) = CHARACTER FOR PLACEMENT. * (X1) = ADDRESS TO PLACE CHARACTER. * * EXIT TO *NCM* * ((X1)) = (NUMS). * * USES A - 2, 6. * X - 1, 2, 6. SCH AX1 18 SHIFT MODIFIER WORD SA2 NUMS SX1 X1 REMOVE EXCESS CHARACTERS LX1 -1 BX6 X2 SA6 X1+ PUT CHARACTER EQ NCM EXIT SFG SPACE 4,20 ** SFG - SET FLAG. * * ENTRY (X1) = COMMAND DESCRIPTOR WORD, FORM IS - * 24/,17/ADDR,1/MODE,18/ * ADDR = ADDRESS OF THE FLAG TO SET. * MODE = SET, IF *VERIFY* MODE. * CLEAR, IF *BRIEF* MODE. * (NUMS) = +- PARAMETER, * IF NEGATIVE, SET FLAG TO CONDITION OPPOSITE * THAT INDICATED BY *MODE*. * IF POSITIVE, SET FLAG TO CONDITION INDICATED * BY *MODE*. * * EXIT TO *NCM*. * * USES A - 3, 6. * X - 1, 3, 6. SFG AX1 18 SX1 X1 ISOLATE PARAMETER SA3 NUMS GET +- MODE LX1 -1 BX6 X1-X3 OBTAIN PROPER CONDITION SA6 X1 SAVE NEW VALUE EQ NCM EXIT STB SPACE 4,10 ** STB - SET TABS. * * ENTRY (NUMS TO NUMS+NTABS) = TAB SETTINGS DESIRED. * * EXIT (TABS - TABS+NTABS-1) = IF ALL PARAMETERS ARE VALID * NEW TAB SETTINGS. * IF PARAMETERS ARE VALID, TO *NCM*, ELSE TO *CER*. * * USES A - 1, 2, 6, 7. * X - 1, 2, 6, 7. * B - 2, 5, 6, 7. STB SA1 IW SB7 160 DEFAULT LINE WIDTH ZR X1,STB0 IF USING DEFAULT SB7 X1 STB0 SB6 B0 SET VALUE OF LAST TAB SA1 NUMS-1 MX6 0 SA6 NUMS+NTABS ASSURE ZERO MARKER SB2 ILL. ERROR MESSAGE STB1 SA1 A1+B1 ZR X1,STB2 IF END OF LINE (ALL OK) SB5 X1 GT B5,B7,CER IF TAB IS PAST LINE WIDTH LE B5,B6,CER IF TABS IS .LE. LAST TAB SB6 B5 EQ STB1 CHECK NEXT TAB STB2 SA2 NUMS-1 SA6 TABS CLEAR FIRST TAB STB3 SA2 A2+B1 GET NEXT TAB SA6 A6+B1 ZERO NEXT TAB BX7 X2 SA7 A6-B1 PUT CURRENT TAB NZ X2,STB3 IF NOT FINISHED EQ NCM TABS SET, EXIT TGL SPACE 4,15 ** TGL - PROCESS TOGGLES. * * ENTRY (X1) = (DECA), ADDRESS OF WORD TO PROCESS. * (NUMS) = *+* PARAMETER. * IF (NUMS) .GT. 0, SET FLAG TO ON. * IF (NUMS) .LT. 0, SET FLAG TO OFF. * IF (NUMS) .EQ. 0, TOGGLE STATE OF FLAG. * * EXIT TO *NCM*. * * USES A - 2, 3, 6. * X - 1, 2, 3, 6. TGL AX1 18 OBTAIN ADDRESS SA3 NUMS SA2 X1 FLAG TO PROCESS NZ X3,TGL1 IF +- SPECIFIED LX3 X2 MOVE TOGGLE UP TGL1 BX6 -X3 TOGGLE FLAG SA6 A2 EQ NCM EXIT TRN SPACE 4,10 ** TRN - TRUNCATE COMMAND. * * ENTRY (NUMS) = NUMBER OF LINES TO PROCESS. * * USES A - 1, 5, 6, 7. * X - 1, 2, 5, 6, 7. * B - 2, 6. * * CALLS RDF, SAC, TSL, VRY, WTF. TRN BSS 0 ENTRY SA5 IW GET DESIRED WIDTH RJ SAC SET ASCII MODE TRN1 SA1 E.STR-1 GET EXISTING LINE WIDTH IX2 X5-X1 SX7 B1 PL X2,TRN2 IF LINE ALREADY SHORT SB2 X5+1 MX6 2 SA7 E.LMOD SET LINE MODIFICATION SA6 A1+B2 SET NEW END OF LINE SA7 NOMOD SET MODIFICATION MADE TO FILE SB6 E.STR-1 SET LINE WIDTH CELL RJ TSL TRIM SPACES OFF LINE TRN2 RJ VRY VERIFY LINE SA1 NUMS SX6 B1+ IX6 X1-X6 DECREMENT COUNT AX1 1 ZR X1,NCM IF FINISHED, EXIT SA6 A1+ RJ WTF RJ RDF EQ TRN1 RETURN TO PROCESS NEXT LINE TTN SPACE 4,10 ** TTN - TOP AND TOPNULL PROCESSOR. * * ENTRY (INDEX) = COMMAND TABLE INDEX FOR CURRENT COMMAND. * * USES A - 1, 2, 6. * X - 1, 2, 6. * * CALLS TOP. * REWIND FILES, IF *TN*, *TOP* WILL INSERT A BLANK LINE. TTN RJ TOP SA1 INDEX SA2 NOMOD SX1 X1-.TOPNUL POSITIVE, IF *TOPNULL*, MINUS, IF *TOP* * HANDLE CASE WHERE (IWHERE) = 1, AND COMMAND IS *TOP*, * AND (NOMOD) = FALSE. BX6 X1*X2 SA6 A2 EQ NCM EXIT WHR SPACE 4,15 ** WHR - PROCESS WHERE COMMAND. * * ENTRY (IWHERE) = CURRENT LINE COUNT. * * EXIT TO *NCM*. * * USES A - 1. * X - 1, 6. * * CALLS CDD. * * MACROS WRITEC, WRITEO. WHR SA1 IWHERE NG X1,WHR1 IF IN CREATION MODE RJ CDD MX1 12 BX6 -X1*X6 LX6 12 MOVE END OF LINE BYTE WRITEO OUTPUT EQ NCM EXIT WHR1 WRITEC OUTPUT,(=C* 0 - IN CREATION MODE.*) EQ NCM EXIT WRM SPACE 4,10 ** WRM - WRITE RECORD MARK. * * ENTRY (X1) = BITS 18 - 35 CONTAIN DESIRED *CIO* FUNCTION. * * EXIT TO *NCM*. * * USES A - 6. * X - 1, 2, 6, 7. * * CALLS =XCIO=. WRM SX2 FTA SELECT FET AX1 18 SX7 X1 MX6 0 BX7 -X7 SPECIFY AUTO RECALL SA6 NOMOD SET MODIFICATION RJ =XCIO= EQ NCM EXIT YZP SPACE 4,15 ** YZP - Y/Z COMMAND PROCESSOR. * * ENTRY (NUMS) = IF NO PARAMETER, 0 * ELSE, FWA OF PARAMETERS. * (NUMS+1) = LWA OF PARAMETER. * * EXIT IF ERROR, TO *CER*, ELSE TO *STK*. * * USES A - 1, 2, 3, 4, 5, 6, 7. * X - 1, 2, 3, 4, 5, 6, 7. * B - 6, 7. * * CALLS RTA, STK. YZP SA1 NUMS GET FWA OF PARAMETER SA2 A1+B1 GET LWA+1 SA3 X1 DELIMITER CHARACTER ZR X1,YZP2 IF NO PARAMETER SA5 INDEX SA4 X2 LAST CHARACTER SB6 X1+B1 SET FWA OF STRING TO PACK SX5 X5-.Z 0 IF *Z* COMMAND MX7 1 NZ X5,YZP1 IF NOT *Z* COMMAND BX3 X3+X7 SET TO ECHO COMMANDS YZP1 LX6 X3 MOVE DELIMITER/ECHO FLAG SB7 Y.LINE SA6 Y.DEV+1 SET DELIMITER CHARACTER BX7 X7+X4 SET PSEUDO END OF LINE SA7 A4 RJ RTA PACK LINE SA1 NUMS+1 SA1 X1+ GET PSEUDO END OF LINE MX7 1 BX6 -X7*X1 REMOVE PSEUDO END OF LINE LX1 1 NG X1,YZP1.1 IF TRUE END OF LINE SA6 A1+ REPLACE ENTRY YZP1.1 SA1 Y.DEV RJ STK STACK ENTRY. IF NO ERRORS, EXIT. SB2 STK. EQ CER IF STACKING ERROR, EXIT YZP2 SB2 ARG. EQ CER PARAMETER ERROR, EXIT TITLE SUBROUTINES. ABT SPACE 4,15 ** ABT - ABORT XEDIT. * * ENTRY (B6) = ADDRESS OF ABORT MESSAGE. * * EXIT TO *EXT*. * (EXTA) = -1, INDICATES ABORT. * * USES A - 6. * X - 6. * * MACROS WRITEC. * * NOTES DO NOT *RJ* TO THIS SUBROUTINE. ABT SX6 -1 CHANGE EXIT MODE SA6 EXTA WRITEC OUTPUT,B6 ISSUE MESSAGE EQ EXT EXIT XEDIT ASF SPACE 4,20 ** ASF - ANALYZE STRING FIELDS. * * ENTRY (P1LP - P3RP) = POINTERS TO STRINGS. * * EXIT STRING DEFINITIONS CHECKED AGAINST BITS IN COMMAND * MODIFIER WORD. * (LOCA - LOCC) = INITIALIZED FOR USE BY *LOC*. * (SPCP) = NEGATIVE IF WINDOW WAS SPECIFIED. * (B2) = 0 IF NO ERROR ENCOUNTERED, * ELSE, ORDINAL OF ERROR MESSAGE. * IF ERROR, TO *NER*. * * USES A - 1, 2, 3, 4, 6, 7. * X - 0, 1, 2, 3, 4, 6, 7. * B - 2, 3, 4, 5, 6, 7. * * CALLS SAC, VIS. * * NOTES ROUTINE IS DESIGNED TO BE CALLED IMMEDIATELY AFTER * THE STRINGS ARE PARSED VIA *PRM*. ASF11 SA1 COMMAND SA2 P3RP LX1 59-33 MODIFIER 15, 2 STRINGS NEEDED PL X1,ASF IF NOT ABOVE ZR X2,ASF10 IF NOT 2 STRINGS (ARG ERROR) ASF PS ENTRY/EXIT SA3 P1LP SA2 PREFIX ZR X3,ASF9 IF NO STRINGS SA1 GLOBAL MX6 -18 LX2 59-/PREFIX/W (NEXT BIT IS -A-) BX7 -X6*X1 SET GLOBAL LX6 B1,X2 SX4 B0 PL X6,ASF1 IF NOT ANCHOR MX4 1 ASF1 LX7 18 SX1 E.STR-1 SET MINIMUM STARTING-1 BX6 X6+X2 PL X6,ASF2 IF NOT WINDOW/ANCHOR SA1 LMW GET WINDOW LEFT MARGIN ASF2 IX7 X7+X4 BX7 X1+X7 SA7 LOCA SAVE FIRST LOCATE PARAMETER WORD * INITIALIZE *LOCB* AND *LOCC*. * * NOTE- LWA+1 FOR SCAN IS SET VERY HIGH. THIS IS DONE FOR * TWO REASONS. THE FIRST, THIS ROUTINE IS ALSO CALLED BY * *OCTCHANGE*, WHICH MAY USE DOUBLE SIZE BUFFERS, AND THE * SECOND IS THAT IT DOES NOT MAKE MUCH DIFFERENCE AS THE * LOCATE SUBROUTINE, *LOC*, WILL FORCE LWA+1 TO BECOMES THE * EOL CHARACTER OF THE STRING BEING SEARCHED. SA1 P1LP SB2 E.STR+3*MAXWD 1.SET LWA+1 AVAIL FOR SCAN SA3 P2LP SB3 B2 2. SET LWA+1 AVAIL FOR SCAN MX0 1 SA4 RMW OBTAIN WINDOW RIGHT MARGIN+1 SB5 18 SB6 B0 1. STRING LENGTH SB4 X4 LX6 X1,B5 1. FWA COMPARE SB7 B7-B7 2. STRING LENGTH LX7 X3,B5 2. FWA COMPARE SA4 SPCP RESET WINDOW PARAMETER BX1 X7 BX7 -X0*X4 SA7 SPCP BX7 X1 SA1 P1LP SA4 TRIM BX4 X4+X2 NEG. IF WINDOW OR TRIM PL X4,ASF3 IF NOT ABOVE BX6 X0+X6 1. SET TRIM BX7 X0+X7 2. SET TRIM ASF3 PL X2,ASF4 IF NOT WINDOW PROCESSING SA4 SPCP SET WINDOW PARAMETER BX4 X4+X0 BX2 X7 BX7 X4 SA7 SPCP BX7 X2 SB2 B4 SB3 B4 ASF4 LX2 /PREFIX/W-/PREFIX/A SA4 PRMB GET AND/NOT LOGIC FLAG ZR X3,ASF5 IF ONLY ONE STRING NZ X4,ASF5 IF *---* LOGIC BX6 X0+X6 1. SET TRIM (ALL CHARS SIGNIFICANT) ASF5 BX0 X0*X4 LX0 36-59 POSITION FLAG PL X2,ASF6 IF NOT ANCHOR SB2 B4 1. RESET RIGHT MARGIN ASF6 BX7 X7+X0 2. SET POS/NEG LOGIC FLAG SA2 A1+B1 SA4 A3+B1 IX1 X2-X1 IX3 X4-X3 SB6 X1 SB7 X3 SX1 B2 SX3 B3 BX6 X6+X1 BX7 X7+X3 PX6 B6 PX7 B7 SA6 LOCB SA7 A6+B1 SA1 LOCE SET NORMAL SEARCH GT B6,ASF7 IF FIRST STRING NOT NULL NZ X4,ASF8 IF THERE IS A SECOND STRING SA1 LOCF SET NULL SEARCH ASF7 BX6 X1 SA6 LOC+1 CHANGE ENTRY POINT TO *LOC* * RJ VIS VOID INSTRUCTION STACK RJ SAC SET ASCII PROCESSING SB2 B0 SET NO ERROR EQ ASF RETURN ASF8 GT B7,ASF7 IF SECOND STRING NOT NULL EQ ASF10 SET *ARG* ERROR ASF9 SA1 LOCD SET FOUND STRING (NO FIELDS) SA2 COMMAND SB2 B0 SET *ASF* SUCCESSFUL BX6 X1 SA6 LOC+1 RJ VIS VOID INSTRUCTION STACK LX2 59-34 MODIFIER BIT 16, 1 STRING NEEDED PL X2,ASF11 IF NOT ABOVE ASF10 SB2 ARG. SET ERROR EQ ASF RETURN BTL SPACE 4,10 ** BTL - ISSUE *BAD TEXT LINE ENCOUNTERED* MESSAGE. * * ENTRY NONE. * * EXIT TO *NCM*. * * USES B - 2. * * CALLS IEM. BTL SB2 BTL. SET UP ERROR MESSAGE RJ IEM ISSUE ERROR MESSAGE EQ NCM EXIT CER SPACE 4,15 ** CER - COMMAND ERROR PROCESSOR. * * ENTRY (B2) = ERROR MESSAGE ORDINAL. * * EXIT TO *NCM* AFTER POPPING STACK TO MAIN DEVICE AND * READING NEXT COMMAND LINE (VIA *NCL*). * IF BATCH MODE, TO *ABT*. * * USES A - 1, 2, 5, 6, 7. * X - 1, 2, 5, 6, 7. * B - 2, 6, 7. * * CALLS IEM. CER ERROR B2 ISSUE ERROR MESSAGE * ENTRY POINT FOR COMMAND ERROR, BUT ISSUED OWN MESSAGE. CER1 SA2 BATCH ABORT/ELSE RETURN TO MAIN INPUT SB6 =C* BATCH ABORT - COMMAND ERROR.* NZ X2,ABT IF BATCH MODE SA1 INPMODE SB7 -I.DEV SET DEVICE TO CHECK AGAINST PL X1,CER2 IF NOT IN INPUT MODE SA5 C.ON GET CURRENT DEVICE SB7 -Y.DEV SB2 X5+B7 ZR B2,NCL IF *Y/Z* COMMAND DEVICE SB7 -S.DEV SET SPECIAL INPUT DEVICE LINE CER2 SA5 C.ON POP STACK AND GET NEXT COMMAND LINE SB2 X5+B7 COMPARE DEVICES MX6 1 PREPARE TO IDLE DEVICE ZR B2,NCL IF POPPED TO PROPER DEVICE, EXIT SA5 X5 GET NEW DEVICE SA6 A5 IDLE OLD DEVICE SA2 X5+B1 GET OLD C.STR-1 WORD BX7 X5 LX6 X2 SA7 C.ON POP STACK SA6 C.STR-1 EQ CER2 CHECK TO SEE IF AT PRIMARY CFF SPACE 4,20 ** CFF - COPY FAST FILE. * * ENTRY (CFET) LOADED WITH FILE NAME. * AT LEAST ONE READ STARTED ON *E.IN*. * * EXIT FILE COPIED. * BOTH FILES *NOT BUSY*. * * USES A - 1, 2, 3, 6, 7. * X - 1, 2, 3, 6, 7. * * MACROS READ, RECALL, WRITE, WRITEF, WRITER. * * COPIES INCOMING EDIT FILE STARTING AT CURRENT BUFFER * POSITION, TO THE FILE NAME WHICH IS IN *CFET*. * NEITHER FILE IS REWOUND BEFORE COPYING. * WARNING, THIS ROUTINE ASSUMES THAT THE BUFFER POINTERS * FOR THE TWO FILES ARE IDENTICAL - THUS USE ONLY ON *E.IN* * AND *CFET*. CFF PS ENTRY/EXIT SA1 E.IN+2 INITIALIZE OUTPUT FET TO AGREE WITH SA2 A1+B1 THE INPUT FET BX6 X1 SA3 A1-B1 GET *FIRST* LX7 X2 SX3 X3 MASK OUT ADDRESS FIELD OF *FIRST* SA1 A2+B1 GET *LIMIT* SA6 CFET+2 SX1 X1 MASK OUT ADDRESS FIELD OF *LIMIT* SA7 A6+B1 IX6 X1-X3 BUFFER SIZE (LIMIT-FIRST) SA6 CFFA SAVE CALCULATED BUFFER SIZE SA3 E.IN CHECK READ FET STATUS EQ CFF3 CHECK FOR EOR/EOF/EOI AT ENTRY CFF1 SA1 CFET+3 GET WRITE FET OUTPUT POINTER BX6 X1 SA6 E.IN+3 REFLECT WRITE PROCESSING IN READ FET READ E.IN RESTART READ FET RECALL CFET WAIT FOR *WRITE* TO COMPLETE CFF2 SA3 E.IN SET READ FET STATUS SA1 E.IN+2 SA2 CFET+3 INFORM THE TWO FETS ABOUT ACTIVITY BX6 X1 IN THE OTHER FET LX7 X2 SA6 A2-B1 SA7 A1+B1 CFF3 LX3 59-0 PL X3,CFF4 IF READ FET BUSY LX3 59-4-59+0 NG X3,CFF6 IF AT EOR/EOF/EOI * CALL *CIO* FOR *READ* IF SUFFICIENT SPACE IS IN THE BUFFER. IX6 X2-X1 OUT - IN ZR X6,CFF3.1 IF BUFFER IS EMPTY BX3 X6 SA1 CFFA GET BUFFER SIZE AX3 60 SIGN OF (OUT-IN) BX2 X3*X1 BUFFER SIZE IF (OUT.LT.IN), ELSE 0 IX7 X2+X6 SPACE IN BUFFER AX7 7 0 IF .LT. 200B WORDS OF SPACE ZR X7,CFF4 IF NOT ENOUGH SPACE CFF3.1 READ A3 RESTART THE READ FET CFF4 SA3 CFET LX3 59-0 PL X3,CFF5 IF WRITE FET BUSY * CALL *CIO* FOR *WRITE* IF SUFFICIENT DATA IS IN THE BUFFER. SA1 CFET+2 GET *IN* SA2 A1+B1 GET *OUT* IX6 X1-X2 IN - OUT BX3 X6 SA1 CFFA GET CALCULATED BUFFER SIZE AX3 60 SIGN OF (IN-OUT) BX2 X3*X1 BUFFER SIZE IF (IN.LT.OUT), ELSE 0 IX7 X2+X6 AVAILABLE DATA IN BUFFER AX7 7 0 IF .LT. 200B WORDS OF DATA ZR X7,CFF5 IF NOT ENOUGH DATA AVAILABLE WRITE CFET RESTART THE WRITE FET CFF5 RECALL WAIT FOR SOMETHING TO HAPPEN EQ CFF2 CONTINUE COPY * CHECK EOR/EOF/EOI AND PROCESS ACCORDINGLY CFF6 SA1 E.IN+2 UPDATE OUTPUT BUFFER POINTER LX3 59-3-59+4 BX6 X1 SA6 CFET+2 NG X3,CFF7 IF NOT EOR WRITER CFET EQ CFF1 CONTINUE COPY CFF7 LX3 59-9-59+3 NG X3,CFF8 IF EOI WRITEF CFET EQ CFF1 CONTINUE COPY CFF8 RECALL CFET WAIT FOR OUTPUT TO SETTLE EQ CFF RETURN CFFA CON 0 TEMPORARY STORAGE FOR BUFFER SIZE CHS SPACE 4,20 ** CHS - CHANGE STRING(S). * * ENTRY (A0) = FWA OF SCRATCH BUFFER. * (X0) = LWA+1 OF SCRATCH BUFFER. * (SIGN BIT OF X0 = 1 IF *STRING* MODE). * * EXIT (B5) = 0, IF STRING NOT FOUND. * (X5) = 0, IF TRUNCATION OCCURED. * NEW CHANGED LINE (IF STRING FOUND) IN SCRATCH BUFFER. * THE NEW LINE SHOULD BE RUN THROUGH *TSL*. * B5 SHOULD BE TESTED BEFORE X5. * * USES A - 0, 1, 2, 5, 6. * X - 1, 2, 4, 5, 6. * B - 2, 3, 4, 5, 6, 7. * * CALLS LOC. CHS15 SX5 0 SET TRUNCATION OCCURED CHS16 MX6 2 SET END OF LINE IN SCRATCH BUFFER SB5 1 SET STRING FOUND SA6 B6 CHS PS ENTRY/EXIT MX6 0 SB4 E.STR-1 SET FIRST SEARCH ADDR SA5 B4+B1 SA6 CHSB COUNT COUNTER (VOID INFINITE LENGTH) RJ LOC SEARCH FOR STRING SB6 A0 SB3 X0 SA1 LOC+1 ZR B5,CHS IF STRING NOT FOUND, RETURN SB7 X1+ IF C//STR/ FORM, 0 * COPY TO SCRATCH THAT PORTION OF LINE BEFORE MATCH. CHS1 SB2 A5 SX4 B1 GE B2,B4,CHS5 IF ALREADY AT START OF MATCH CHS2 PL X5,CHS3 IF NOT AT END OF EDIT LINE SA5 CHSA SET TO BLANK(SPECIAL CASE) CHS3 LT B6,B3,CHS4 IF NOT FULL SCRATCH BUFFER SX4 X5-1R NZ X4,CHS15 IF TRUNCATION CHS4 BX6 X5 SB2 B2+B1 STEP A5 VALUE SA6 B6 SA5 A5+B1 SB6 B6+X4 CONDITIONALLY INCREMENT SCRATCH POINTER LT B2,B4,CHS2 IF MORE TO COPY * COPY TO SCRATCH THE NEW STRING, PREPARE FOR NEXT SEARCH. CHS5 SB4 B5-B1 SET TO SKIP MATCHED STRING NG X5,CHS6 IF AT END OF EDIT LINE (REMAIN THERE) NG X5,CHS14 IF AT END OF LINE * RESET TO AFTER MATCHED STRING, NEVER PAST EOL CHARACTER. SA5 B5 CHS6 SA2 P3RP SA1 A2-B1 P3LP ZR X2,CHS9 IF NO STRING FOR REPLACEMENT SB2 X1 SB5 X2 GE B2,B5,CHS9 IF NO STRING (NULL) SA1 B2 CHS7 BX6 X1 SB2 B2+B1 LT B6,B3,CHS8 IF END OF SCRATCH BUFFER SX4 X1-1R NZ X4,CHS15 IF TRUNCATION CHS8 SA6 B6+ SB6 B6+X4 CONDITIONALLY INCREMENT SCRATCH POINTER SA1 B2 LT B2,B5,CHS7 IF MORE TO TRANSFER * READY TO LOOK FOR NEXT STRING. CHS9 SA0 B6 UPDATE A0 NG X0,CHS13 IF STRING MODE CHS10 ZR B7,CHS11 IF C//STR/ OPTION RJ LOC CHECK FOR NEXT MATCH SB6 A0 SB3 X0 SA1 CHSB SB7 B1 SET NOT C//STR/ OPTION SX6 X1+B1 AX1 9 SA6 A1 NZ X1,CHS10.1 IF IN INFINITE LOOP NZ B5,CHS1 IF MATCH FOUND CHS10.1 SX4 1 RESET (X4) * COPY REMAINDER OF LINE TO SCRATCH. CHS11 NG X5,CHS16 IF FINISHED LT B6,B3,CHS12 IF END OF SCRATCH BUFFER SX4 X5-1R NZ X4,CHS15 IF TRUNCATION CHS12 BX6 X5 SA6 B6 SA5 A5+B1 SB6 B6+X4 EQ CHS11 CONTINUE COPY * STRING MODE - CHECK TO SEE IF FINISHED. CHS13 SA1 NUMS SX6 B1 IX6 X1-X6 AX1 1 SA6 A1 NZ X1,CHS10 IF MORE STRINGS EQ CHS11 COPY REST OF LINE * CHECK FOR ANY INFINITE LOOPS CHS14 SA1 CHSB SX6 X1+B1 SA6 A1 AX1 9 ZR X1,CHS6 IF NOT INFINITE EQ CHS RETURN CHSA DATA 1R SPECIAL CASE HANDLING VFD 2/-0,*P/ CHSB BSS 1 INFINITE LOOP KLUDGE ETL SPACE 4,20 ** ETL - ECHO TEXT LINE. * * ENTRY (A1) = FWA OF TEXT LINE. * (X1) = TEXT. * (X3) = PREFIX DEFINITIONS (SEE ETLA FOR EXAMPLE). * * EXIT DESIRED TEXT LINE ECHOED AFTER INSERTING UP * TO NINE LEADING CHARACTERS. * * USES A - 1, 6, 7. * X - 1, 2, 3, 4, 6 ,7. * B - 2. * E.SCR. * * MACROS WRITEC. ETL1 BX6 -X4*X1 GET END OF LINE BYTE LX1 B2 SHIFT WORD BX7 -X2*X1 IX7 X7+X3 BX3 X2*X1 SA7 A7+1 SAVE NEXT WORD SA1 A1+B1 READ AHEAD TO NEXT NZ X6,ETL1 IF NOT END OF LINE BX7 X3 SA7 A7+B1 SA6 A7+B1 INSURE PROPER END OF LINE BYTE WRITEC OUTPUT,E.SCR+1 ETL PS ENTRY/EXIT MX2 1 SB2 X3 GET SHIFT COUNT-1 SA7 E.SCR AX2 B2 EXTEND MASK SB2 B2-59 BX3 X2*X3 CLEAR SHIFT COUNT MX4 -12 SB2 -B2 EQ ETL1 WRITE TEXT ETLA CHAR (VFD 6/0),QM. DATA LINE PROMPT VFD 6/1R ,*P/11 ETLB CHAR (VFD 6/0),QM. COMMAND LINE PROMPT CHAR (VFD 6/0),QM. VFD 6/1R ,*P/17 ETL RMT REMOTE FOR BATCH ORIGIN CHAR (VFD 12/1L ),QM. VFD 6/1R ,*P/17 CHAR (VFD 12/1L ),QM. CHAR (VFD 6/0),QM. VFD 6/1R ,*P/23D RMT EXT SPACE 4,15 ** EXT - EXIT XEDIT. * * ENTRY (EXTA) = EXIT CODE. * * EXIT PROGRAM TERMINATED. * * USES A - 0, 1, 2, 4, 5. * X - 0, 1, 2, 3, 4, 5, 6. * * MACROS CSET, DISTC, MESSAGE, RETURN, REWIND, WRITEO, WRITER. * * NOTES ROUTINE RETURNS SCRATCH FILES (SCRA-SCRG), * TURNS OFF ASCII MODE (IF *AS* PARAMETER USED) * AND DOES OTHER HOUSEKEEPING. EXT SA1 COPY ZR X1,EXT1 IF NO COPY FILE WRITER FTD,RECALL CLOSE COPY FILE REWIND X2 EXT1 MX0 3 SA0 FTD SET FIRST FET TO LOOK AT LX0 -21D POSITION A-G MASK SA5 =0LSCR EXT2 SA4 A0 GET FILE NAME BX2 X4-X5 COMPARE NAMES BX1 -X0*X4 CLEAR A-G BITS AX2 18 ZR X2,EXT3 IF NAME IS *SCR* (NOT ONE OF XEDIT,S) BX1 X1-X5 AX1 18 NZ X1,EXT3 IF NOT SRCA-SRCG RETURN A0 EXT3 SA0 A0+7 STEP TO NEXT FET SX3 A0-LFET NG X3,EXT2 IF SCAN NEXT FET * CLEAN UP TELEX SPECIAL STATUS. SA2 PROMPT ZR X2,EXT4 IF DISTC NOT ON SX6 B1 LX6 48 0001 BYTE WRITEO OUTPUT DISTC OFF EXT4 SA1 OUTPUT+2 SA2 A1+B1 IX2 X2-X1 COMPARE *IN* AND *OUT* ZR X2,EXT5 IF NOTHING IN BUFFER TO FLUSH WRITER OUTPUT,R FLUSH BUFFER (WITH RECALL) EXT5 SA2 AS SX2 X2-3RASC NZ X2,EXT6 IF NOT SPECIAL ASCII MODE CSET RESTORE RESTORE INITIAL MODE EXT6 RJ FNL ISSUE DAYFILE MESSAGE MESSAGE (=0),1 CLEAR MESSAGE BUFFER SA1 EXTA NG X1,EXT7 IF ABORT XEDIT ENDRUN END XEDIT EXT7 ABORT ABORT XEDIT GFN SPACE 4,20 ** GFN - GET FILE NAME. * * ENTRY (A5) = ADDRESS OF PRESET CHARACTER. * (X5) = PRESET CHARACTER. * * EXIT (X6) = FILE NAME IF .NE. 0. * = 0, IF RESERVED OR BAD (NOT INCLUDING SPECIAL). * (A1) = ADDRESS OF SPECIAL NAME ENTRY (IF SPECIAL). * 0, THEN NULL. * 1, THEN OUTPUT. * (X1) = NON-ZERO IF SPECIAL, RESERVED OR BAD NAME. * (B4) = 0, IF TOO MANY CHARACTERS IN THE FILE NAME. * = 1, IF SPECIAL CHARACTERS IN THE FILE NAME. * (B6) = ERROR MESSAGE ORDINAL (IF ERROR). * (A5) = ADDRESS OF NEXT NON-BLANK OR SECOND COMMA. * (X5) = NEXT NON-BLANK CHARACTER OR SECOND COMMA. * * USES A - 1, 5. * X - 1, 3, 4, 5, 6, 7. * B - 4, 6. GFN7 NG X5,GFN8 IF AT END OF LINE SB4 X5-1R ZR B4,GFN8 IF BLANK NE B4,B1,GFN3.1 IF SPECIAL CHARACTER GFN8 LX6 6 PL X6,GFN8 IF NOT LEFT JUSTIFIED BX7 X7-X7 SET NO COMMA FOUND GFN9 SX4 X5-1R ZR X4,GFN10 IF BLANK CHARACTER SX4 X5-1R, NZ X4,GFN11 IF NOT COMMA NZ X7,GFN11 IF 2ND COMMA SX7 1 SET COMMA ENCOUNTERED GFN10 SA5 A5+1 PL X5,GFN9 IF NOT END OF LINE GFN11 MX7 1 REMOVE POSITION BIT BX6 -X7*X6 SB6 B0 INDICATE NO ERROR LX6 12 LEFT JUSTIFY NAME SA1 GFNA-1 PRESET TO LIST OF RESERVED NAMES ZR X6,GFN6 IF NO FILE NAME GFN12 SA1 A1+B1 ZR X1,GFN IF END OF LIST BX3 X6-X1 AX4 B1,X3 NZ X4,GFN12 IF NOT THIS FILE NAME LX3 -1 AX3 59 BX6 X3*X6 IF BAD, WILL ZERO - ELSE LEAVE IT ALONE SB6 BFN.*100B+3 SET -RESERVED FILE NAME- GFN PS ENTRY/EXIT BX6 X6-X6 CLEAR ASSEMBLY SB6 B0 SET NO ERROR (END OF LINE) NG X5,GFN6 IF END OF LINE SX6 4000B SET POSITION INDICATOR GFN1 ZR X5,GFN4 IF BAD FILE NAME SX4 X5-1R9-1 GFN2 PL X4,GFN3 IF NOT ALPHANUMERIC LX6 6 BX6 X6+X5 NG X6,GFN3.2 IF TOO MANY CHARACTERS SA5 A5+1 PL X5,GFN1 IF NOT END OF LINE EQ GFN7 GET FILE NAME GFN3 SX3 X5-7601B NG X3,GFN7 IF LESS THAN 7601B SX4 X3-1RZ PL X4,GFN7 IF .GT. LOWER CASE Z SX5 X3+B1 GET LOWER CASE LETTER EQ GFN2 TEST CHARACTER * BAD FILE NAME PROCESSING. GFN3.1 SB4 B1+ EQ GFN4 PROCESS BAD FILE ERROR GFN3.2 SB4 B0+ GFN4 SB6 BFN.*100B+1 SET -BAD FILE NAME- GFN5 SX6 B0 CLEAR FILE NAME MX1 1 SET ERROR FLAG EQ GFN RETURN GFN6 SB6 BFN.*100B+2 SET -NO FILE NAME- EQ GFN5 CLEAR FILE NAME * RESERVED FILE NAMES. GFNA DATA 0LSCRA,0LSCRB,0LSCRC,0LSCRD,5LINPUT DATA 0LSCRE,0LSCRF,0LSCRG * FILES REQUIRING SPECIAL HANDLING. GFNB CON 4LNULL+1 CON 6LOUTPUT+1 GFNBL EQU *-GFNB NUMBER OF SPECIAL NAMES DATA 0 END MARKER GLN SPACE 4,30 ** GLN - GET LINE NUMBER (ADVANCE TO IT). * * ENTRY (X1) = LINE NUMBER TO FIND. * IF SIGN BIT SET, THEN ASSUMED CALLED FROM *MPR* * WHICH IMPLIES- * 1. THAT THE VERIFY FLAG IS ALREADY SET UP. * 2. THAT X1 CONTAINS THE ABSOLUTE LINE POSITION. * 3. THAT THE FILE IS ALREADY REWOUND IF NEEDED. * * EXIT (X6) = 0 IF LINE NUMBER FOUND. * * USES A - 1, 2, 6, 7. * X - 1, 2, 3, 6, 7. * * CALLS RDF, TOP, WTF. * * ROUTINE WILL REWIND THE FILE IF THE LINE NUMBER LIES * BEFORE THE CURRENT POINTER POSITION. IF THE USER * IS IN *WHERE* MODE, THIS ROUTINE WILL POSITION * THE FILE TO THE SPECIFIED LINE. * * NOTES UNLESS CALLED FROM *MPR*, THIS ROUTINE WILL * AUTOMATICALLY CANCEL THE VERIFICATION OF EOR/EOF,S * IF THE FILE NEEDS TO BE RESET. THIS IS DONE BY * SHIFTING *VERIFY* RIGHT AND THEN CLEARING THE SIGN * BIT (VERIFY OFF) - WHEN EXITING *GLN*, BIT 58 IS * SHIFTED TO BIT 59 (RESTORING PREVIOUS VERIFICATION). * GLN9 SA1 VERIFY RESTORE OLD VERIFICATION STATUS LX7 B1,X1 SA7 A1 GLN PS ENTRY/EXIT MX6 1 BX6 -X6*X1 STRIP OFF SIGN BIT MX7 0 SA6 GLNA SAVE LINE TO FIND SA7 GLNB SAVE *NOT REWOUND* FLAG ZR X6,GLN IF NO LINE NUMBER TO FIND NG X1,GLN7 IF CALLED FROM *MPR* SA2 VERIFY AX2 60 EXTEND FLAG STATUS BX6 X2 SA6 A2+ SA1 LNFLAG PL X1,GLN7 IF PROCESSING AS IWHERE. GLN1 SA1 E.LMOD NZ X1,GLN3 IF LINE IS UNPACKED SA1 E.LINE GET LINE NUMBER BX6 X6-X6 CLEAR ASSEMBLY MX7 -6 CHARACTER MASK * ASSEMBLE LINE NUMBER FROM PACKED WORD. GLN2 LX1 6 BX2 -X7*X1 GET CHARACTER ZR X2,GLN5 IF END OF NUMBER SX3 X2-1R9-1 NEGATIVE IF OK SX2 X2-1R0 POSITIVE IF OK BX1 X7*X1 REMOVE PRESENT CHARACTER BX3 -X2*X3 PL X3,GLN5 IF CHARACTER IS NOT NUMBER BX3 X6 LX6 2 *4 IX6 X6+X3 *5 LX6 1 *10 IX6 X6+X2 ADD NEW CHARACTER EQ GLN2 ASSEMBLE NEXT CHARACTER * ASSEMBLE LINE FROM STRING. GLN3 SA1 E.STR BX6 X6-X6 CLEAR ASSEMBLY MX7 -10 CHARACTER COUNT GLN4 NG X1,GLN5 IF END OF LINE SX3 X2-1R9-1 SX2 X2-1R0 AX7 1 DECREMENT CHARACTER COUNT BX3 -X2*X3 NEGATIVE IF NUMBER PL X3,GLN5 IF NOT A NUMBER BX3 X6 LX6 2 *4 IX6 X6+X3 *5 SA1 A1+B1 NEXT CHAR. LX6 1 IX6 X6+X2 ADD NEXT NUMBER NZ X7,GLN4 IF NOT 10 CHARACTERS * CHECK TO SEE IF GOT LINE NUMBER. GLN5 SA1 GLNA IX6 X6-X1 PL X6,GLN6 IF ON OR PAST NUMBER RJ WTF RJ RDF EQ GLN1 CHECK NEXT LINE GLN6 ZR X6,GLN9 IF FOUND LINE NUMBER SA2 GLNB NZ X2,GLN9 IF RESET FILE AT LEAST ONCE MX6 -1 SA6 A2 RJ TOP SA1 VERIFY MX6 1 BX6 -X6*X1 CLEAR EOR/EOF VERIFICATION SA6 A1 EQ GLN1 SEARCH FROM TOP OF FILE * IF REALLY IN *IWHERE* MODE. GLN7 SA1 GLNA SA2 IWHERE IX6 X2-X1 PL X6,GLN8 IF AT OR PAST POSITION RJ WTF RJ RDF EQ GLN7 GET NEXT LINE GLN8 ZR X6,GLN9 IF FOUND RJ TOP RESET AND RE-TRY SA1 VERIFY MX6 1 BX6 -X6*X1 CLEAR AUTO VERIFICATION SA6 A1 EQ GLN7 GET NEXT LINE GLNA DATA 0 LINE NUMBER TO FIND GLNB DATA 0 RESET FILE FLAG ICH SPACE 4,10 ** ICH - INITIALIZE CHARACTERS. * * ENTRY (A1) = FWA OF PARAMETER LIST. * (X1) = FIRST WORD OF PARAMETERS. * * EXIT CHARACTERS LOADED INTO PROPER CELLS. * * USES A - 1, 2, 3, 6. * X - 1, 2, 3, 6. * B - 6, 7. ICH1 SA2 CHARSFT OBTAIN SHIFT VALUE SB6 X2 ICH2 SA2 X1 GET REPLACEMENT CHARACTER UX1,B7 X1 GET SHIFT COUNT AX2 B6 AX1 18 SX2 X2 REMOVE EXCESS CHARACTER SA3 X1 WORD TO MODIFY LX2 B7 SHIFT INTO POSITION SA1 A1+B1 BX6 X3-X2 ADD CHARACTERS SA6 A3 NZ X1,ICH2 IF MORE TO LIST ICH PS ENTRY/EXIT NZ X1,ICH1 IF THERE IS A TABLE EQ ICH RETURN IEM SPACE 4,15 ** IEM - ISSUE EXPLAIN ERROR MESSAGE. * * ENTRY (B2) = ERROR MESSAGE ORDINAL IN THE FOLLOWING FORMS - * FORM 1 - 18/PRIMARY ORDINAL. * FORM 2 - 13/PRIMARY ORDINAL,5/SECONDARY ORDINAL. * * EXIT (EXPLAIN) = UPDATED ERROR MESSAGE ENTRIES. * MESSAGE ISSUED. * * USES A - 1, 4, 6. * X - 1, 4, 6. * B - 2. * * MACROS WRITEC. IEM PS ENTRY/EXIT SA1 EXPLAIN SX4 B2 AX4 6 LX1 -12 SHIFT EXPLAIN WORD NZ X4,IEM1 IF GOTTEN PRIMARY SX4 B2 IEM1 PX6 B2,X1 PUT NEW EXPLAIN ENTRY SA6 A1 SA4 MESSAGE+X4 GET MESSAGE STARTING ADDR WRITEC OUTPUT,X4 ISSUE MESSAGE EQ IEM RETURN IFM SPACE 4,15 ** IFM - ISSUE FILE MESSAGE. * * ENTRY (X1) = FILE NAME TO USE (LOWER 18 CAN BE GARBAGE). * (B2) = ERROR MESSAGE (SEE *IEM* FOR FORMATS). * * EXIT (EXPLAIN) = UPDATED EXPLAIN ERROR MESSAGE ENTRIES. * MESSAGE ISSUED. * * USES A - 2, 3, 4, 6. * X - 1, 2, 3, 4, 6, 7. * B - 3. * * MACROS WRITEC. IFM PS ENTRY/EXIT SX4 B2 AX4 6 SA2 EXPLAIN LX2 -12 NZ X4,IFM1 IF NOT LONGER FORM SX4 B2 IFM1 SA3 MESSAGE+X4 GET MESSAGE POINTER PX6 B2,X2 SA3 X3 GET FIRST WORD OF MESSAGE MX7 6 BX7 X7*X3 GET UPPER CHARACTER MX2 42 SA6 A2 SB3 60-12 ZR X7,IFM2 IF CHARACTER IS 00B (FIRST PART OF 0007B) BX6 X7 LX7 2 SB3 60-6 BX7 X7*X6 NEGATIVE IF UPPER CHARACTER = 55B (BLANK) NG X7,IFM2 IF BATCH STYLE MESSAGE SB3 B0 IFM2 BX1 X2*X1 REMOVE LOWER 18 BITS SX6 B1 SA4 =01010101010101010101B IX6 X1-X6 SPACE FILL FILE NAME BX6 X6-X1 AX6 6 BX6 X4*X6 BX7 X6 SA4 =10H LX6 5 IX7 X6-X7 BX6 X6+X7 BX4 X6*X4 MASK BLANKS FOR LOWER BITS LX7 B3,X2 BX3 -X7*X3 REMOVE EXISTING FILE NAME BX4 X4*X2 REMOVE LOWER 18 BITS OF BLANKS IX4 X4+X1 MERGE BLANKS WITH FILENAME LX4 B3 POSITION NAME BX6 X4+X3 MERGE INTO MESSAGE SA6 A3 WRITEC OUTPUT,A6 ISSUE MESSAGE EQ IFM RETURN ITM SPACE 4,15 ** ITM - ISSUE TRUNCATION MESSAGE. * * ENTRY (IWHERE) = LINE POSITION. * * EXIT MESSAGE ISSUED. * * USES A - 1, 6. * X - 1, 6. * B - 2. * * CALLS CDD, IEM. ITM PS ENTRY/EXIT SA1 IWHERE RJ CDD SA1 MESSAGE+TRUNC. MX6 -12 BX6 X6*X4 SET EOL BYTE SB2 TRUNC. SA6 X1+2 PLACE POSITION (CHANGE MESSAGE) RJ IEM EQ ITM RETURN PCN SPACE 4,10 ** PCN - PRINT COLUMN NUMBERS. * * ENTRY NONE. * * EXIT COLUMN NUMBERS PRINTED. * * MACROS WRITEC. PCN PS ENTRY/EXIT WRITEC OUTPUT,PCNA WRITEC X2,PCNB EQ PCN RETURN PCNA CON 3H 0,2H 1,2H 2,2H 3,2H 4,2H 5,2L 6 PCNB BSS 0 DATA H* 12345678901234567890123456789012345678* DATA C*90123456789012345678901234567890* PCNAL EQU *-PCNA ERD SPACE 4,15 ** ERD - PROCESS END OF FILE READ. * * ENTRY AT *ERD*. * AT *ERD1*. * AT *ERD5*. * * EXIT TO *TOP*. * TO *TOP1.1* IF IN LOOK MODE. * * USES A - 1, 2, 4, 6, 7. * X - 2, 4, 6, 7. * B - 6. * * CALLS RDF. * * MACROS READ, RECALL, REWIND, WRITER. ERD PS ENTRY SA1 *-1 MX7 0 BX6 X1 COPY ENTRY WORD TO EXIT WORD SA7 DF NO MORE DELETES OF EOF-S SA6 TOP EXIT WORD SA7 DR NO MORE DELETES OF EOR-S SA4 UPDATE PL X4,TOP1.1 IF IN LOOK MODE * ENTRY FROM *TOP*. ERD1 SA2 RC NZ X2,ERD2 IF NO DATA READ WRITER E.OUT ERD2 SA4 E.IN LX4 59-9 PL X4,ERD9 IF EOI NOT SET REWIND E.OUT REWIND E.IN,RECALL RECALL E.OUT SA1 FS CHECK READ FILE NAME STATUS NG X1,ERD4 IF NAME TOP1 SA4 E.OUT SA1 ERDA MX2 42 BX6 X4-X1 BX6 X2*X6 REMOVE UNWANTED NZ X6,ERD3 IF NOT A MATCH SA1 A1+1 GET OTHER SCRATCH NAME ERD3 BX6 X1 MX7 60 SA6 E.IN SA7 FS REWIND A6,RECALL REWIND FILE TO BE WRITTEN ON ERD4 SA1 E.OUT SWITCH FILE NAMES IN FETS SA2 E.IN BX6 X1 BX7 X2 SA6 A2 SA7 A1 * ENTRY FROM *TOP*. ERD5 SA1 INDEX SX6 B1 RESET *IWHERE* MX7 60 SA6 IWHERE SA7 NOMOD SET NO MODIFICATIONS SX1 X1-.QUIT ZR X1,ERD6 IF QUIT COMMAND SX1 X1+.QUIT-.END ZR X1,ERD6 IF END COMMAND SX1 X1+.END-.FILE NZ X1,ERD7 IF NOT FILE COMMAND ERD6 RECALL E.IN EQ TOP EXIT ERD7 READ E.IN MX6 1 SA6 RC SET *NO DATA READ* FLAG SA1 INDEX SB6 X1-.TOPNUL ZR B6,ERD8 IF TOPNULL COMMAND RJ RDF EQ TOP EXIT ERD8 SX6 2R BX7 X7-X7 LX6 -12 SA7 E.LMOD SET NO LINE MODIFICATION SA6 E.LINE SET BLANK LINE AS EXISTING SA7 E.CMODE SET CURRENT MODE EQ TOP EXIT * XEDIT SHOULD NEVER JUMP TO HERE. ERD9 SB6 =C* XEDIT INTERNAL ERROR (ERD). NOTIFY CONSULTANT.* EQ ABT ABORT, EXIT ERDA CON 0LSCRA+1 CON 0LSCRB+1 ERDB BSS 1 LOC SPACE 4,15 ** LOC - LOCATE STRING SPECIFIED. * * ENTRY (X3) = NUMBER OF CHARACTERS IN LINE. * (X4) = EDIT LINE STARTING ADDRESS - 1. * (X5) = FIRST CHARACTER OF EDIT LINE. * (B4) = DESIRED STARTING ADDRESS - 1 FOR SEARCH * (E.STR). * (LOCA - LOCC) = PARAMETERS. * (SPCP) = NEGATIVE IF WINDOW WAS SPECIFIED. * * EXIT (B4) = FWA OF MATCH (IN E.STR). * (B5) = LWA +1 OF MATCH (IN E.STR). * 0, IF STRING NOT FOUND. * * USES A- 1, 2, 3, 4, 7. * X- 1, 2, 3, 4, 6, 7. * B- 2, 3, 4, 5, 6, 7. * * CALLS LST. LOC9 SB5 0 SET STRING NOT FOUND LOC PS ENTRY/EXIT * THERE ARE THREE OPTIONS, EACH SET BY CODE MODIFICATION. * THE THREE WORDS ARE GIVEN BELOW. LOC RMT LOCD SB5 1 THERE ARE NO STRINGS EQ LOC EXIT LOCE SA4 LOCA NORMAL STRING SEARCH REQUIRED SA3 E.STR-1 LOCF EQ LOC8 NULL STRING ROUTINE - VFD *P/0 SPECIAL FLAG (SEE CHS) RMT BSSZ 1 ALLOCATE SPACE FOR WORD SB7 X4+ LEFTMOST STARTING ADDRESS - 1 SB2 X3+E.STR ADDRESS OF END OF LINE SA1 TRIM SA2 SPCP NG X1,LOC1.1 IF *TRIM* FLAG SET PL X2,LOC1.1 IF WINDOW NOT SPECIFIED * BLANK FILL LINE OUT TO THE SPECIFIED WINDOW. SA2 RTWD SET TO RIGHT WINDOW MARGIN ZR X2,LOC1.1 IF WINDOW NOT SPECIFIED SB3 X3 SET TO LENGTH OF LINE SB6 X2 GE B3,B6,LOC1.1 IF LINE IS LONGER THAN WINDOW SB3 B6-B3 SB3 B2+B3 SX6 1R SET TO BLANK LOC1 SA6 B2 SB2 B2+B1 NE B2,B3,LOC1 IF NOT FILLED TO RIGHT WINDOW MX6 2 SET END OF LINE INDICATOR SA6 B2 LOC1.1 SA2 A4+B1 1/TRIM,11/LENGTH,12/,18/COMPARE,18/R.MAR AX4 18 GE B7,B4,LOC1.2 IF LEFT START = MAX(DESIRED,WINDOW) SB7 B4 LOC1.2 UX6,B6 X2 STRING LENGTH, X6 = TRIM FLAG SA1 B7 SET STARTING CHARACTER-1 (E.STR) AX2 18 SB3 X6 RIGHT MARGIN (VIA WINDOW/ANCHOR) PL X4,LOC2 IF NOT ANCHOR MODE SB3 B3+B6 ADD LENGTH OF STRING SB3 B3-B1 COMPENSATE FOR EXTRA WORD IN ADDITION LOC2 SA2 X2 GET STARTING ADDR OF COMPARE STRING GE B2,B3,LOC3 IF RIGHT MARGIN NOT PAST LINE WIDTH SB3 B2 RESET TO LINE WIDTH LOC3 LX7 X2 SA7 B2+B1 SET COMPARE (IMMEDIATELY AFTER EOL) SB5 B5-B5 SET FAILURE SX7 X4 PUT GLOBAL CHARACTER ZR B6,LOC4 IF NO STRING RJ LST LOCATE STRING NZ B7,LOC IF STRING NOT FOUND (FAILURE) SB4 A1 SET FIRST CHARACTER OF MATCH SB5 A1+B6 SET LWA+1 SB7 B5-1 SX4 0 SET NO ANCHOR LOC4 SA3 LOCC 1/TRIM,11/LENGTH,30/STARTING,18/MARGIN UX6,B6 X3 (X3) = TRIM, (B6) = LENGTH AX6 18 NG X4,LOC5 IF ANCHOR (AND NULL FIRST STRING) SB3 X3+ RESET RIGHT MARGIN LOC5 SA2 X6 GE B2,B3,LOC6 IF TO SET TO MINIMUM (MARGIN,LINE WIDTH) SB3 B2 LOC6 ZR B6,LOC IF NO SECOND STRING SX4 X7 LX7 X2 SA7 B2+B1 SET COMPARE AFTER END OF STRING SX7 X4 RESTORE GLOBAL CHARACTER SA1 B7+ SET POINTER FOR SECOND STRING RJ LST LX6 59-18 SB5 A1+B6 SET ENDING CHARACTER NG X6,LOC7 IF NEGATIVE LOGIC ZR B7,LOC IF POSITIVE AND FOUND IT EQ LOC9 SET FAILURE LOC7 NZ B7,LOC IF NEGATIVE AND NOT FOUND EQ LOC9 STRING NOT FOUND * SEARCHING FOR NULL STRING. FOUND ONLY WHEN AT * THE BEGINNING OF A LINE/WINDOW (DEPENDING ON TRIM SET). LOC8 SA4 LOCA SB7 X4 SB5 X4+B1 SET LWA+1 OF SEARCH SA2 TRIM GT B4,B7,LOC9 IF STARTING PAST MINIMUM (FAIL) SB4 X4+1 SET FWA OF MATCH PL X2,LOC IF NOT TRIM (SUCCESSFUL) MX2 2 CHECK FOR EOL BX2 X2-X5 ZR X2,LOC9 IF NOT EOL SA1 E.STR-1 GET LINE WIDTH SB3 X1+E.STR GE B7,B3,LOC9 IF PAST LAST NON-BLANK (FAIL) EQ LOC RETURN LOC HEREL ASSEMBLE ENTRY OPTIONS ** LOCA - LOCC - LOCATE DEFINITION CELLS. * * FORMAT FOR THE THREE WORDS IS- * * 1/A,11/ ,12/,18,GLOBAL ,18/L.MARGIN. * 1,T,11/L,12/,18,COMPARE ,18/R.MARGIN. * 1/T,11/L,12/,18,COMPARE ,18/R.MARGIN. * * WHERE- * *A* = 1 IF ANCHOR IS SET. * *T* = 1 IF TRIM SET (ALL CHARS IN STRING SIGNIFICANT). * *L* = LENGTH OF ASSOCIATED STRING. * *GLOBAL* = THE CHARACTER THAT MATCHES ALL. * *COMPARE* = FWA IF ASSOCIATED STRING (IN COMMAND). * *RMARGIN* = ADDRESS OF LEFTMOST POSSIBLE STARTING * CHARACTER-1. * *L.MARGIN* = ADDRESS OF RIGHTMOST POSSIBLE ENDING * CHARACTER+1. LOCA BSSZ 1 LOCATE ENVIRONMENT WORD LOCB BSSZ 1 FIELD ONE DEFINITION LOCC BSSZ 1 FIELD TWO DEFINITION LST SPACE 4,20 ** LST - LOCATE STRING IN EDIT LINE. * * ENTRY (A1) = FWA-1 OF START OF SCAN IN EDIT LINE. * (A2) = FWA OF COMPARE STRING IN COMMAND LINE. * (X2) = FIRST WORD OF STRING IN COMMAND LINE. * (X6) = NEGATIVE IF TRAILING GLOBAL/BLANKS ARE * IMPORTANT. * (X7) = GLOBAL CHARACTER (MUST NOT BE MASK OF 2). * (B3) = LWA+1 AVAILABLE FOR SCANNING (USUALLY EOL). * (B6) = LENGTH OF COMPARE STRING. * ASSUMES THAT THE FIRST CHARACTER OF THE COMPARE * STRING HAS BEEN PLACED AT EOL+1. * * EXIT (A1) = FWA OF POSSIBLE MATCH. * (B6) = LENGTH-1 OF POSSIBLE MATCH. * (B7) = 0, IF MATCH. * IF (A1)+1 .GE. (B3) AT ENTRY, THEN IF THE COMPARE * STRING IS BLANK/GLOBAL AND TRIM IS OFF, THEN THE * RESPONSE IS - * (B7) = 0 (SUCCESSFUL MATCH). * (A1) = (A1) AT ENTRY. * (B6) = 0. * * USES A - 1, 3, 4. * X - 1, 3, 4. * B - 6, 7. LST4 SA1 A1+B1 MOVE START OF STRING POINTER BX3 X1-X2 ZR X3,LST6 IF MATCH IX3 X2-X7 ZR X3,LST6 IF FIRST COMPARE IS GLOBAL LST5 SA1 A1+B1 MOVE START OF STRING POINTER IX3 X1-X2 NZ X3,LST5 IF NOT A MATCH LST6 SB7 A1-B3 DETERMINE LENGTH OF EDIT LEFT SB7 -B7 LT B7,B6,LST8 IF NOT ENOUGH SPACE LEFT FOR MATCH SB7 B6-1 LST7 ZR B7,LST IF END OF STRING (MATCH) SA3 A1+B7 SA4 A2+B7 SB7 B7-B1 IX3 X3-X4 ZR X3,LST7 IF MATCH (TRY NEXT) NG X7,LST4 IF GLOBAL NOT USED (IN STACK) IX4 X4-X7 ZR X4,LST7 IF COMPARE IS GLOBAL EQ LST4 CONTINUE LST8 NG X6,LST2 IF TRAILING CHARACTERS SIGNIFICANT SX4 B7-1 NG X4,LST3 IF PAST LWA AVAILABLE SB6 B6-B1 DECREASE COMPARE STRING SA4 A2+B6 SX3 X4-1R ZR X3,LST6 IF LAST COMPARE IS BLANK (REMOVE IT) IX3 X4-X7 ZR X3,LST6 IF LAST COMPARE IS GLOBAL (REMOVE IT) LST PS ENTRY/EXIT SB7 A1-B3 CHECK A1 VS B3 SB7 B7+B1 LT B7,LST4 IF STARTING NOT PAST LAST CHARACTER NG X6,LST2 IF TRIM (FAILURE) SA1 A1+B1 CHANGE POINTER SB7 B0 SET SUCCESSFUL LST1 LE B6,LST IF COMPARE IS ALL BLANKS/GLOBAL SB6 B6-B1 SA4 A2+B6 SX3 X4-1R ZR X3,LST1 IF COMPARE IS BLANK IX3 X4-X7 ZR X3,LST1 IF COMPARE IS GLOBAL LST2 SB7 B1 SET STRING NOT FOUND EQ LST BEGIN SCANNING LST3 SA1 B3-B1 EQ LST+1 RESTART SCAN AT END OF LINE MDY SPACE 4,15 ** MDY - PROCESS MODIFY DIRECTIVES. * * ENTRY (E.STR) = ORIGINAL LINE (UNPACKED). * (D.STR) = DIRECTIVES LINE (UNPACKED). * * EXIT (B3) = NEGATIVE, IF TRUNCATION ENCOUNTERED. * (E.STR) = NEW TEXT LINE. * * USES A - 1, 2, 6. * X - 1, 2, 6, 7. * B - 2, 3, 4, 6. * E.SCR. * * CALLS TSL. MDY5 SX6 1R SET BLANK CHARACTER MDY6 GT B3,B4,MDY1 IF AT END OF BUFFER SA6 B3 SB3 B3+B1 SET TO NEXT PLACE TO SAVE MDY7 SA2 A2+B2 GET NEXT *E.STR* CHARACTER NO PL X2,MDY8 IF NOT AT END OF LINE SX6 1R SB2 B0 SET TO NOT ESCAPE END OF LIE BX2 X2+X6 GET END LINE (WITH BLANK) MDY8 SA1 A1+B1 GET NEXT DIRECTIVES CHARACTER SX6 X2 MOVE CURRENT TEXT CHAR SX7 X1-1R ZR X7,MDY6 IF SPACE DIRECTIVE NG X1,MDY16 IF END OF DIRECTIVE LINE CHAR (SX7 X1-0),SH. ZR X7,MDY7 IF SHARP (DELETE TEXT CHAR) CHAR (SX7 X1-0),AM. ZR X7,MDY5 IF AMPERSAND (SET TEXT TO BLANK) BX6 X1 SB6 X1+B5 B5 = -UP ARROW NZ B6,MDY6 IF CHARACTER (REPLACE TEXT) MDY9 SA1 A1+B1 GET NEXT DIRECTIVES CHAR (SX3 X1-0),SH. BX6 X1 SX7 B6+B1 SET NUMBER OF CHARACTERS SCANNED NG X1,MDY10 IF END OF DIRECTIVES SB6 B6+B1 INCREMENT COUNT OF CHARACTERS SCANNED ZR X3,MDY11 IF SHARP GT B3,B4,MDY2 IF PAST 160 CHARACTERS SA6 B3 SB3 B3+B1 EQ MDY9 LOOP MDY10 SX6 1R NZ B6,MDY14 IF SOMETHING WAS AFTER THE UPARROW SX7 X7+B1 INCREMENT CHARACTER COUNT SA2 A2-B2 RESET CHARACTER POINTER EQ MDY12 ELSE INSERT ONE SPACE MDY11 SX7 B6+B1 NE B6,B1,MDY14 IF NOT (UP ARROW)(SHARP) SX7 B1 RESET COPY COUNTER MDY12 GT B3,B4,MDY4 IF POSSIBLE TRUNCATION SA6 B3 SB3 B3+B1 MDY13 SA2 A2+B2 GET NEXT E.STR CHARACTER PL X2,MDY14 IF NOT END OF LINE SB2 B0 SX6 1R BX2 X2+X6 MDY14 SX6 X2 SX7 X7-1 MDY15 PL X7,MDY12 IF MORE TO MOVE PL X1,MDY8 IF MORE DIRECTIVES * END OF DIRECTIVES, COPY REST OF TEXT. MDY16 NG X2,MDY19 IF END OF TEXT GT B3,B4,MDY3 IF END OF BUFFER SX6 X2+ SA6 B3 SB3 B3+B1 MDY17 SA2 A2+B1 GET NEXT TEXT SX6 X2 EQ MDY16 CONTINUE COPY * SET TRUNCATION FLAG AND CLEANUP. MDY18 SB2 -1 * SET END OF LINE AND COPY BACK TO *E.STR*. MDY19 MX6 2 NO SA6 B3+ SA6/SA1 *MUST* BE IN THIS ORDER SB6 E.STR SA1 E.SCR MDY20 BX6 X1 SB6 B6+B1 SA1 A1+B1 SA6 B6-B1 PL X6,MDY20 IF NOT FINISHED SB6 E.STR-1 SET LINE WIDTH CELL SB3 B2 MOVE TRUNCATION FLAG RJ TSL TRIM ANY TRAILING SPACES MDY PS ENTRY/EXIT CHAR (SB5 -0),UA. SB2 B1 SET NOT AT END OF TEXT LINE SB3 E.SCR SET NEXT SAVE CHAR ADDR SB4 E.SCR+159 SET LWA SA1 D.STR-1 SA2 E.STR-1 EQ MDY7 BEGIN LOOP * HANDLE SPECIAL CASES OF FULL BUFFER, ADDING CHARACTERS. MDY1 SX7 X6-1R ZR X7,MDY7 IF SPACE (NO TRUNCATION) EQ MDY18 TRUNCATE MDY2 SX7 X6-1R ZR X7,MDY9 IF SPACE (NO TRUNCATION) EQ MDY18 TRUNCATE MDY3 SX7 X6-1R ZR X7,MDY17 IF SPACE (NO TRUNCATION) EQ MDY18 TRUNCATE MDY4 SX7 X6-1R ZR X7,MDY13 IF SPACE (NO TRUNCATION) EQ MDY18 TRUNCATE MPR SPACE 4,15 ** MPR - MOVE POINTER. * * ENTRY (X1) = NUMBER OF LINES TO MOVE. * * EXIT IF (X1) IS NEGATIVE AT ENTRY, THE FILE IS REWOUND. * * USES A - 1, 3, 4, 6, 7. * X - 1, 2, 3, 4, 6, 7. * * CALLS GLN, TOP. * * NOTES IF (X1) = -0 AT ENTRY, THIS ROUTINE WILL FORCE A COPY * TO THE NEXT SCRATCH FILE AND RETURN THE POINTER * TO THE CURRENT POINTER POSITION. MPR1 SA1 GLNA RETRIEVE DESIRED LINE FROM HOLDING RJ GLN ADVANCE TO LINE MPR PS ENTRY/EXIT SA3 IWHERE SA4 VERIFY MX2 1 IX6 X3+X1 GET DESIRED *IWHERE* VALUE BX7 X2*X1 GET DIRECTION OF MOVE SX3 B1 IX3 X6-X3 PL X3,MPR0 IF MOVING TO A LEGAL POSITION SX6 B1 SET DESIRED TO 1 MPR0 IX6 X6+X2 SET SIGN BIT (*MPR* FLAG) AX4 60 EXTEND STATUS OF VERIFY SA6 GLNA HOLD DESIRED POSITION BX7 -X7*X4 SET TEMPORARY VERIFICATION STATUS SA7 A4 RESET VERIFICATION FLAG PL X1,MPR1 IF FORWARD MOTION RJ TOP EQ MPR1 MOVE TO DESIRED POSITION RDF SPACE 4,30 ** RDF - READ EDIT FILE LINE. * * ENTRY LINE CONTROL (*E.NMODE*, ETC) SET. * * EXIT LINE READ INTO *E,LINE*. * IF *E.NMODE* = ASCII, THEN THE LINE IS UNPACKED * TO *E.STR*. * THIS ROUTINE USUALLY EXITS NORMALLY. IF THE ROUTINE * ENCOUNTERS THE END OF INFORMATION, THE ROUTINE EXITS * TO *NCM*, UNLESS PRESETTING, THEN TO *RDF2*. * IF IN CREATION MODE, THIS ROUTINE RETURNS WITHOUT * READING. * * USES A - 1, 2, 3, 4, 6, 7. * X - 1, 2, 3, 4, 6, 7. * B - 2, 4, 6, 7. * * CALLS CIO=, ERO, RTB, STL, UPL, VIS. * * MACROS READ, READC, WRITEC. * * NOTES FILE MARKS WILL BE RETAINED ACROSS THE FILE UNLESS * THE CORRESPONDING COUNTER IS SET (DF/DR). * IN ADDITION, IF IN VERIFY MODE (AND TOGGLE SET), THE * MESSAGE --EOR--/--EOF-- WILL BE PRINTED. * AFTER EACH TEXT LINE IS READ, *TLX* (TELEX INTERRUPT) * IS CHECKED. IF SET, ROUTINE EXITS TO *NCM*. RDF11 SA1 TLX ZR X1,RDF IF NO INTERRUPT RJ STL PROCESS INTERRUPT RDF PS ENTRY/EXIT * FIRST WORD OF ROUTINE IS REPLACED WHEN OUT * OF CREATION MODE. SA1 IWHERE PREPARE FOR CREATION MODE CHECK EQ RDF1 CHECK CREATION MODE RDF RMT NORMAL CODE FOLLOWS SB0 0 TEMPORARY SB0 0 RMT READC E.IN,E.LINE,33D SB4 X1+B1 NG B4,RDF9 IF AT EOI * WORD IS REPLACED IF TO VERIFY EOR/EOF. RDFA NE B4,B1,RDF3 IF EOR/EOF SB7 E.LINE RJ RTB TRIM OFF TRAILING BLANKS SA1 E.NMODE GET NEEDED MODE MX6 0 SA3 IW SA6 A1+B1 SET CURRENT MODE TO CODED SA6 A6+B1 SET NO MODIFICATIONS SA6 RC SET DATA READ ZR X1,RDF11 IF CODED MODE DESIRED SA1 E.LINE CONVERT TO ASCII SB6 E.STR RJ UPL SA6 E.STR-1 SET NUMBER OF CHARS IN LINE SX7 B1 SET CURRENT MODE TO ASCII SA7 E.CMODE SET CURRENT MODE OF LINE EQ RDF11 CHECK FOR INTERRUPT * CREATION MODE CHECK. RDF1 NG X1,RDF IF IN CREATION MODE SA2 INITZ ZR X2,RDF2 IF INITIALIZING (CREATION MODE POSSIBLE) SA1 RDFG CHANGE INSTRUCTIONS BX6 X1 SA6 RDF+1 CHANGE CREATION MODE CHECKER RJ VIS VOID INSTRUCTION STACK RDF2 BSS 0 RDFG BSS 0 RDF HEREL JP RDF+2 CONTINUE PROCESSING * EOF/EOR ENCOUNTERED. RDF3 SB7 B6-E.LINE NZ B7,BTL IF ENCOUNTERED NON-TEXT LINE ZR B4,RDF3.1 IF EOF SB4 B1+ SET (B4) = EOR TYPE RDF3.1 SA1 ITOGGLF+B4 SA2 VERIFY BX6 X1*X2 PL X6,RDF4 IF NO VERIFICATION SA3 RDFE SX6 B4 BX7 X3 SA7 RDFA RESET CODE AT RDFA SA6 RDFB RJ VIS VOID INSTRUCTION STACK RDF4 SA4 UPDATE PL X4,RDF6 IF IN LOOK MODE SA3 DF+B4 DELETION COUNT SA4 RDFC+B4 ZR X3,RDF5 IF NOT DELETING RECORD MARK SX6 B1+ IX6 X3-X6 SA6 A3 REPLACE COUNTER EQ RDF6 READ, DELETE RECORD MARK RDF5 SX2 E.OUT MX6 1 BX7 -X4 SET FUNCTION AND AUTO-RECALL SA6 RC SET NO DATA READ RJ CIO= RDF6 READ E.IN EQ RDF2 RESTART ROUTINE * VERIFY EOR/EOF. RDF7 SA1 RDFB MX6 1 SX7 B4 PX7 B6,X7 SA7 RDFD SAVE B4 NG X1,RDF8 IF NOTHING TO VERIFY SB4 EOF.+X1 SA3 EXPLAIN SA4 MESSAGE+B4 GET MESSAGE POINTER AX3 12 SA6 A1 CLEAR MESSAGE FLAG PX7 B4,X3 SA7 A3 REPLACE EXPLAIN WORD WRITEC OUTPUT,X4 RDF8 SA1 RDFF RESET INSTRUCTION WORD SA2 RDFD RETRIEVE STATUS OF B4 BX6 X1 SB4 X2 UX2,B6 X2 RETRIEVE *B6* SA6 RDFA RJ VIS VOID INSTRUCTION STACK JP RDFA CONTINUE AND VOID STACK * EOI ENCOUNTERED. RDF9 BX6 X6-X6 MX7 1 SA6 DF DELETE NO MORE EOF,S SA7 RDFB SET NO VERIFICATION NECESSARY SA6 DR DELETE NO MORE EOR,S SA1 INITZ ZR X1,/PRESET/PRF1 IF PRESETTING XEDIT SA4 EXPLAIN SB2 EOI. AX4 12 SA3 MESSAGE+B2 PX6 B2,X4 SA6 A4 WRITEC OUTPUT,X3 ISSUE *END OF FILE* MESSAGE SA1 IWHERE AX1 1 ZERO IF CREATION MODE OR IWHERE = 1 ZR X1,RDF10 IF NO FILE RJ ERD PROCESS END OF FILE EQ NCM EXIT * EOI AND NOTHING IN FILE. RDF10 SB6 =C* YOU DELETED THE ENTIRE FILE.* EQ ABT ABORT XEDIT RDFB DATA -1 EOF/EOR ENCOUNTERED (LEVEL NUMBER) RDFC CON 34B,24B CIO CODES FOR WRITEF/WRITER RDFD BSSZ 1 STORAGE FOR B4 WHEN VERIFYING RDFE EQ RDF7 CODE TO CAUSE EOR/EOF MESSAGE ON RE-ENTRY RDFF NE B4,B1,RDF3 IF EOR/EOF (EXACT IMAGE OF *RDFA*) SB7 E.LINE RDL SPACE 4,30 * RDL - READ DATA LINE INTO *D.LINE*. * * ENTRY NONE. * * EXIT (X1) = READC X1 REGESTER CONVENTION AS FOLLOWS - * (X1) = 0 FOR TRANSFER COMPLETE. * (X1) = -1 IF EOF DETECTED ON FILE. * (X1) = -2 IF EOI DETECTED ON FILE. * (X1) = ADDRESS PLUS ONE OF LAST WORD TRANSFERED TO * WORKING BUFFER, IF EOR WAS DETECTED ON FILE * BEFORE TRANSFER WAS COMPLETE. * IF (X1) .NE. 0, THEN *D.LINE* IS NOT CHANGED. * TO *ABT* IF FATAL ERROR. * IF (X1) = 0, THEN THE FOLLOWING IS ALSO DONE - * IF *E.NMODE* = 1 (ASCII), THEN THE DATA LINE IS * UNPACKED TO *D.STR*, AND THE DATA LINE WIDTH IS * ENTERED INTO *D.STR*. * * USES A - 1, 2, 3, 4, 6, 7. * X - 1, 2, 3, 4, 6, 7. * B - 2, 3, 5, 6, 7. * * CALLS NDL, RTB, RTOA, UPL. * * MACROS READ, READC. RDL8 SX7 2R SET BLANK LINE AS LINE LX7 -12 SA7 D.LINE RDL9 SA2 A2 PX6 B0,X2 SA6 A2 *C.STR*-1 MX1 0 SET SUCCESSFUL READ * CHECK DESIRED MODE OF LINE. RDL10 SA2 E.NMODE ZR X2,RDL IF CODED SA1 D.LINE SB6 D.STR RJ UPL UNPACK DATA LINE MX1 0 SET SUCCESSFUL READ SA6 D.STR-1 SET LENGTH RDL PS ENTRY/EXIT SA1 PREFIX SA2 C.STR-1 LX1 59-/PREFIX/PLUS UX3 B3,X2 .CYB IF DEF,CYBRNET PL X1,RDL4 IF + PREFIX GET DATA FROM COMMAND .CYB ELSE NG X1,RDL4 IF + PREFIX (READ REQUIRED) .CYB ENDIF LE B3,RDL3 IF POINTER FLAG IS READ SA4 A2+B3 GET NEXT CHARACTER FROM COMMAND LINE SB4 X2 DELIMITER NG X4,RDL8 IF AT END OF LINE SB6 A2+B3 GET FIRST CHARACTER SB7 D.LINE SET DESTINATION FOR RTOA RDL1 SB5 X4 EQ B5,B4,RDL2 IF FOUND DELIMITER SB3 B3+B1 SA4 A2+B3 GET NEXT CHARACTER PL X4,RDL1 IF NOT AT END OF LINE SB3 -B1 SET POSITION RDL2 MX6 1 SB2 A4 SET END OF DATA LINE ADDRESS BX6 X6+X4 SB3 B3+B1 SET NEXT AVAILABLE CHARACTER SA6 A4 SET PSEUDO END OF LINE PX7 B3,X2 SA7 A2 REPLACE CHARACTER POINTER RJ RTOA PACK DATA LINE TO D.LINE ZR B3,RDL9 IF AT REAL END OF LINE SA2 B2 MX1 0 SET READ SUCCESSFUL SX6 X2 CLEAR PSEUDO END LINE SA6 A2 EQ RDL10 CHECK MODE OF LINE * READ REQUIRED FROM COMMAND LINE SOURCE. RDL3 RJ NDL ZR X1,RDL+1 IF NOT , RETRY READ EQ RDL ELSE RETURN * READ REQUIRED FROM PRIMARY INPUT SOURCE. RDL4 SA1 NCLA SA3 TTYIN BX6 X1+X3 SA6 A1 REPLACE READ REQ,D FLAG NZ X1,RDL6 IF READ NOT NEEDED RDL5 READ INPUT,RECALL RDL6 READC INPUT,D.LINE,33D READ DATA ZR X1,RDL7 IF SUCCESSFUL SA2 TTYIN SB6 =C* BATCH MODE ABORT. END OF RECORD ENCOUNTERED.* SA3 TLX MX6 0 SA6 A3 CLEAR INTERRUPT STATUS NZ X2,ABT IF NOT *TTY* INPUT FILE NZ X3,RDL5 IF INTERRUPTED EQ RDL RETURN RDL7 SB7 D.LINE RJ RTB TRIM TRAILING BLANKS BX7 X7-X7 MX1 0 SET SUCCESSFUL READ SA7 TLX IGNORE INTERRUPTS EQ RDL10 CHECK MODE OF LINE RTA SPACE 4,10 ** RTA - CONVERT 160K1 TO C FORMAT (MAX 33 WORDS). * * ENTRY (B6) = INCOMING STRING ADDRESS. * (B7) = OUTGOING STRING ADDRESS. * * EXIT STRING IS CONVERTED. * * USES A - 1, 6. * X - 1, 2, 6, 7. * B - 4, 6, 7. RTA PS ENTRY/EXIT RTOA EQU RTA SB4 6 SHIFT VALUE BX6 X6-X6 CLEAR ASSEMBLY MX7 1 POSITION INDICATOR SX1 B0+ INITIALIZE FOR POSSIBLE BLANK LINE EQ RTA2 BEGIN CONVERSION RTA1 LX7 6 SHIFT POSITION BX6 X6+X1 MERGE CHARACTERS PL X7,RTA2 IF NOT FULL WORD SA6 B7 SB7 B7+1 BX6 X6-X6 CLEAR ASSEMBLY RTA2 BX2 X1 SA1 B6 GET NEXT CHARACTER NG X1,RTA4 IF END OF BUFFER REACHED RTA3 LX6 6 SB6 B6+1 AX2 B4,X1 ZR X2,RTA1 IF NO ASCII ESCAPE CHARACTER LX7 6 LX6 6 PL X7,RTA1 IF ASCII CAN FIT INTO THIS WORD LX6 -6 SHIFT ASSEMBLY BACK LX1 -7 BX6 X6+X2 LX7 6 AX1 60-7 REMOVE ASCII ESCAPE SA6 B7 SAVE WORD SB7 B7+B1 BX6 X1 EQ RTA2 LOOP, PROCESS NEXT WORD RTA4 SB6 B6-1 RESET CHARACTER POINTER ZR X2,RTA6 IF LAST CHARACTER WAS A COLON RTA5 SA1 =40004000400040004000B SA6 B7 BX2 X1*X7 NZ X2,RTA7 IF ON BYTE BOUNDRY RTA6 SX1 1R EQ RTA3 BLANK FILL TO BYTE BOUNDARY RTA7 NG X7,RTA IF WORD IS FULL, RETURN RTA8 LX7 12 LX6 12 PL X7,RTA8 IF NOT LEFT JUSTIFIED SA6 B7 ZR X6,RTA IF ASSURE A ZERO WORD, RETURN BX6 X6-X6 SA6 A6+B1 EQ RTA RETURN RTB SPACE 4,15 ** RTB - REMOVE TRAILING BLANKS FROM A CODED LINE. * * ENTRY (B6) = LWA+1 OF CODED LINE. * (B7) = FWA OF CODED LINE. * * EXIT UNSIGNIFICANT BLANKS REMOVED FROM LINE. * * USES A - 1, 2, 3, 6, 7. * X - 1, 2, 3, 4, 6, 7. * B - 3, 5, 6. * * CALLS RTA, UPL. * * NOTES THIS ROUTINE IS DESIGNED TO BE CALLED IMMEDIATELY * FOLLOWING A CALL TO *RDC*. THE ONLY PRESET NEEDED * IN THAT CASE IS TO SET B7. B6 IS SET VIA *RDC*. RTB7 SA1 B6-B1 GET NEXT WORD SB6 A1 LT B6,B7,RTB5 IF BEGINNING OF LINE RTB8 BSS 0 BX6 -X2-X1 111111 WHERE BLANK BX4 X3*X6 100000 WHERE POSSIBLE BLANK BX6 -X3*X6 011111 WHERE POSSIBLE BLANK LX4 -5 000001 WHERE POSSIBLE BLANK IX6 X4+X6 100000 WHERE BLANK BX6 X3*X6 100000 ONLY WHERE BLANK ZR X6,RTB5 IF NO BLANKS SX4 B3 IX4 X1-X4 FIND LEFT MOST BIT BX4 X1-X4 REMOVE EXCESS UPPER BITS AX4 1 POSITION MASK BX4 X3*X4 100000 ONLY WHERE RIGHT 00B BX6 X6+X4 MERGE BLANKS AND 00B BX4 X6-X3 40 WHERE NOT (BLANK.OR.RIGHT 00) LX4 -1 IX6 X4-X7 FIND LEFT MOST BIT BX4 X4-X6 REMOVE EXCESS UPPER BITS AX4 5 POSITION MASK BX6 -X4*X1 REMOVE CHARACTERS FROM WORD IX1 X6-X1 COMPARE INITIAL AND FINAL ZR X1,RTB4 IF NO CHANGE SA6 A1 REPLACE WORD SB3 B0 SET ZERO SEARCH OFF NG X4,RTB7 IF THIS WORD ENTIRELY ZEROED BX7 X4 CHECK LAST CHARACTER FOR 00B AX7 6 BX4 X7-X4 77 AT LAST CHAR REMOVED SA3 =00770077007700770077B BX7 X4*X3 NZ X7,RTB9 IF LAST CHAR REMOVED IS ODD-ADD BLANK LX4 6 BX7 X6*X4 =0 IF LAST CHARACTER IS 00B NZ X7,RTB IF NEXT TO LAST NOT 00B BX3 X4 ADD 2 BLANKS LX4 -6 LX3 -12 BX4 X4+X3 RTB9 BX2 X4*X2 ADD 1 OR 2 BLANKS IX6 X6+X2 SA6 A1 RTB PS ENTRY/EXIT SA1 B6-B1 NZ X1,RTB0 IF WORD CONTAINS DATA SB6 B6-B1 * CHECK FOR AUTOMATIC TRUNCATION TO 160 CHARACTERS. RTB0 SX7 B6-B7 SB3 B1 SET CHECK FOR TRAILING 00,S SX7 X7-16D NG X7,RTB3 IF .LT. 16 WORDS SIGNIFICANT NO TRUNCATE SA2 AS SX6 2R PREPARE BLANKS ZR X2,RTB2 IF NOT IN ASCII MODE (TRUNCATE) SA2 =74747474747474747474B SA3 =01010101010101010101B SB5 B6-1 * SEARCH FOR 74/76 CODES. RTB1 SA1 B5 GET CURRENT WORD BX4 -X1*X3 ISOLATE COMPLEMENT OF LOWER BIT BX7 X2*X1 GET UPPER 4 BITS LX4 2 SB5 B5-B1 IX4 X4+X7 BX4 X4*X3 NZ X4,RTB6 IF WORD CONTAINS ASCII GE B5,B7,RTB1 IF MORE TO CHECK RTB2 LX6 -12 ASSURE TRUNCATION BUT HANDLE COLON SA6 B7+16D SB6 A6+B1 RESET LWA+1 POINTER RTB3 SA2 =10H SA3 =40404040404040404040B SX7 B1 EQ RTB7 REMOVE TRAILING BLANKS RTB4 NZ X4,RTB IF TRAILING ZEROS LOOKED FOR AND FOUND * HERE IF NO BLANKS FOUND IN WORD. RTB5 NZ B3,RTB IF NO CHANGES MADE SX6 2R PLACE BLANK IN LAST WORD. JUST IN CASE LX6 -12 OF POSSIBLE 00B CHARACTER IN CURRENT WORD SA6 A1+B1 EQ RTB RETURN * PROCESS TRUNCATION WHEN UNPACK NECESSARY. RTB6 SA1 B7 SET FIRST WORD SB6 E.SCR SET TO SCRATCH AREA SB3 B7 SAVE FWA OF CODED BUFFER RJ UPL SB6 E.SCR SB7 B3 RJ RTA RE-PACK TRUNCATED LINE EQ RTB RETURN SAC SPACE 4,15 ** SAC - SET ASCII MODE LINE AND READS. * * ENTRY NONE. * * EXIT LINE IN *E.STR* BUFFER, * *E.NMODE* SET TO ASCII. * * USES A - 1, 6, 7. * X - 1, 6, 7. * B - 6. * * CALLS UPL. SAC PS ENTRY/EXIT SA1 E.CMODE SX6 B1 BX1 X1-X6 SA6 A1-B1 SET E.NMODE TO ASCII ZR X1,SAC IF LINE ALREADY UNPACKED MX7 0 SA6 A1 SET CURRENT MODE TO ASCII SA7 A1+B1 SET NO LINE MODIFICATIONS * UNPACK LINE. SA1 E.LINE SB6 E.STR RJ UPL UNPACK LINE SA6 E.STR-1 SET NUMBER OF CHARACTERS IN LINE EQ SAC RETURN SCD SPACE 4,10 ** SCD - SET CODED LINE. * * ENTRY NONE. * * EXIT CURRENT LINE IN *E.LINE*. * *E.CMODE* SET TO CODED. * * USES A - 1, 2, 6. * X - 1, 2, 6. * B - 6, 7. * * CALLS RTA. SCD PS ENTRY/EXIT SA1 E.CMODE MX6 0 SA2 A1+B1 GET E.LMOD SA6 A1-B1 SET E.NMODE TO CODED SA6 A1 SET CURRENT MODE TO CODED ZR X2,SCD IF NO LINE MODIFICATIONS SA6 A1+B1 SET NO MODIFICATIONS SB6 E.STR SB7 E.LINE RJ RTA PACK LINE EQ SCD RETURN STL SPACE 4,15 ** STL - PROCESS TLX INTERRUPTS. * * ENTRY NONE. * * EXIT RETURNS TO CALLER IF NO TLX INTERRUPT SENSED, * ELSE REWINDS THE OUTPUT BUFFER AND EXITS TO *CER1* TO * POP THE INPUT STACK. * * USES A - 1, 2, 6. * X - 1, 2, 6. * * MACROS DISTC, RECALL. STL PS ENTRY/EXIT MX6 0 SA2 TLX ZR X2,STL IF NO INTERRUPT, RETURN SA6 A2 DISTC ON,TLX RECALL OUTPUT SA1 =XOUTPUT+1 MX6 -18 BX6 -X6*X1 SA6 A1+1 IN=OUT=FIRST SA6 A6+1 EQ CER1 GET NEXT INPUT LINE, EXIT STK SPACE 4,15 ** STK - STACK INPUT DEVICES. * * ENTRY (A1) = NEW DEVICE ADDRESS (EG. *I.DEV*). * * EXIT RETURNS IF DEVICE IS NOT AVAILABLE (USUALLY BUSY), * ELSE, ROUTINE EXITS TO NCM TO PROCESS THE NEW DEVICE. * * USES A - 1, 3, 4, 6, 7. * X - 1, 3, 4, 6, 7. * B- 7. * * CALLS UPL. * * NOTES THIS ROUTINE ASSUMES THAT .LINE FOR THE DEVICE HAS * BEEN PRE-LOADED WITH THE SPECIFIED COMMAND LINE. STK PS ENTRY/EXIT SA3 C.STR-1 MOVE TO DEVICE WORD SA4 C.ON GET POINTER TO CURRENT DEVICE BX6 X3 SA6 X4+1 * UNSTACK ANYTHING THAT CAN BE SAFELY REMOVED. STK1 SA3 X4+B1 GET CHARACTER POINTER WORD SX6 X4-I.DEV UX7,B7 X3 B7 .LE. 0, IF READY TO READ NEXT LINE ZR X6,STK2 IF ON PRIMARY INPUT DEVICE GT B7,STK2 IF DEVICE NOT AT END OF LINE SA3 X4-1 OBTAIN FET POINTER FOR DEVICE BX6 X3 AX3 60 EXTEND *CMDPOP* FLAG BX6 -X3*X6 0, IF OK TO POP DEVICE NZ X6,STK2 IF (FET) .AND. (.NOT. *CMDPOP*) * POP STACK AND RE-TEST. MX6 1 SA4 X4 GET NEW DEVICE SA6 A4 IDLE OLD DEVICE SA2 X4+B1 GET NEW C.STR-1 WORD BX7 X4 LX6 X2 SA7 C.ON RESET ACTIVE DEVICE POINTER SA6 C.STR-1 RESET CHARACTER POINTER EQ STK1 UNSTACK * PUSH NEW ENTRY ONTO STACK. STK2 SA1 A1 SX6 A1 BX7 X4 SA4 A1+B1 NEW DELIMITER WORD PL X1,STK IF REQUESTED DEVICE IS STILL ACTIVE SA6 C.ON RESET C.ON SA7 A1 PUT STACK ENTRY PX6 B1,X4 RESET CHARACTER POINTER SA6 C.STR-1 SA1 A1-34D SET FWA OF CODED LINE SB6 C.STR RJ UPL UNPACK LINE EQ NCM PROCESS NEW LINE, EXIT TAB SPACE 4,20 ** TAB - TAB INPUT LINE ACCORDING TO TAB SETTINGS. * * ENTRY (B6) = FWA-1 OF TEXT LINE. * * EXIT LINE TABBED. * TRAILING SPACES ARE NOT DELETED. * (X7) = 0 IF NO TRUNCATION. * * USES A - 1, 3, 4, 6, 7. * X - 1, 2, 3, 4, 6, 7. * B - 3, 4, 5, 7. * E.SCR. * * CALLS TSL. TAB1 SA1 A1+1 GET NEXT SA6 B3 SB3 B3+B1 LT B3,B4,TAB2 IF NOT 160 CHARACTERS WORTH SX7 X6-1R NZ X5,TAB5 IF NOT BLANK (TRUNCATE) SB3 B4+ TAB2 BX6 X1 IX2 X1-X3 NZ X2,TAB1 IF NOT TAB CHARACTER TAB3 ZR X4,TAB1 IF END OF TABS SB5 X4+E.SCR-1 SA4 A4+B1 LT B5,B3,TAB3 IF PAST EXISTING TAB SA1 A1+B1 LE B5,B3,TAB2 IF CURRENTLY POINTING AT TAB TAB4 SA7 B3 BLANK TO TAB POSITION SB3 B3+B1 LT B3,B5,TAB4 IF NOT AT TAB POSITION PL X1,TAB2 IF MORE DATA SX7 0 SET NO TRUNCATION TAB5 MX6 2 SA1 E.SCR PREPARE TO COPY BACK SA6 B3 TAB6 BX6 X1 SB7 B7+B1 SA1 A1+B1 SA6 B7-B1 PL X6,TAB6 IF MORE RJ TSL TRIM TRAILING SPACES TAB PS ENTRY/EXIT SA3 TABCHAR SX7 B0 SET NO TRUNCATION SB7 B6+B1 NG X3,TAB IF NO TAB CHARACTER IS DEFINED SA4 A3+B1 SA1 B6+B1 SET FIRST CHARACTER IN LINE SB3 E.SCR SX7 1R SB4 E.SCR+160D EQ TAB2 PROCESS TABS TCD SPACE 4,15 ** TCD - TABULATE CODED DATA LINE. * * ENTRY (D.LINE) = DATA LINE. * * EXIT (C.LINE) = TABBED LINE. * * USES A - 1, 3. * X - 1, 3. * B - 6, 7. * E.SCR. * * CALLS RTA, TAB, UPL. TCD PS ENTRY/EXIT SA3 TABCHAR NG X3,TCD IF NO TAB CHARACTER SA1 D.LINE SB6 D.STR RJ UPL SB6 D.STR-1 RJ TAB TABULATE SB7 D.LINE SB6 D.STR RJ RTA REPACK LINE EQ TCD RETURN TLB SPACE 4,10 ** TLB - TRANSFER DATA LINE TO *E.LINE* BUFFER. * * EXIT LINE TRANSFERRED FROM *D.LINE* TO *E.LINE*. * * USES X - 1, 2, 6, 7. * A - 1, 6, 7. * B - 5, 6. TLB SUBR ENTRY/EXIT SB5 B0 SB6 D.LINE MX2 -12 SB7 E.LINE TLB1 SA1 B6+B5 LX7 X1 BX6 -X2*X1 SA7 B7+B5 SB5 B5+B1 NZ X6,TLB1 IF NOT END OF LINE SA6 E.CMODE SET CURRENT MODE TO CODED SA6 A6+1 SET NO LINE MODIFICATIONS EQ TLBX RETURN TOP SPACE 4,15 ** TOP - MOVE POINTER TO TOP OF FILE. * * ENTRY AT *TOP*. * AT *TOP1.1* FROM *ERD*. * * EXIT TO *ERD1* IF EOI ENCOUNTERED. * TO *ERD5* IF END OF FILE. * * USES A - 1, 2, 3, 4, 6, 7. * X - 0, 1, 2, 3, 4, 6, 7. * B - 6, 7. * * CALLS CFF, ERD, WTF. * * MACROS READ, RECALL, REWIND, WRITEF, WRITER, WRITEW. TOP PS ENTRY/EXIT SA2 IWHERE LINE COUNT SA3 INDEX SUBSCRIPT OF LAST CONNAND SX3 X3-.TOPNUL ZR X3,TOP1 IF TOPNULL COMMAND SX6 B1 IX2 X2-X6 ZR X2,TOP IF ALREADY AT TOP, RETURN TOP1 SA1 NOMOD PL X1,TOP2 IF THERE WERE MODS. READ REST OF FILE * ENTRY FROM *ERD*. TOP1.1 REWIND FTA,RECALL REWIND FTB,RECALL EQ ERD5 PROCESS END OF FILE TOP2 RECALL E.IN RECALL E.OUT RJ WTF WRITE CURRENT LINE EQ TOP6 TRANSFER FILE TOP3 READ E.IN RESTART READ TOP4 RECALL WAIT FOR CIO TO DO SOMETHING EQ TOP6 TRANSFER FILE TOP5 WRITEW E.OUT,B6,B7 WRITE BUFFER SX7 X0 MOVE E.IN(OUT) POINTER MX6 0 SA7 E.IN+3 UPDATE OUT SA6 RC SET DATA READ TOP6 SA1 E.IN+2 IN SA2 A1+B1 OUT SX0 X1 IX6 X1-X2 IN-OUT (CONSECUTIVE WORDS IN BUFFER) PL X6,TOP7 IF (IN-OUT) IS LARGEST BLOCK SA3 A2+B1 LIMIT SA4 A1-B1 FIRST IX6 X3-X2 LIMIT-OUT SX0 X4 TOP7 SB6 X2 SET STARTING ADDRESS SB7 X6 SET WORD COUNT NZ B7,TOP5 IF WORDS TO TRANSFER SA4 E.IN LX4 59-0 PL X4,TOP4 IF FILE BUSY SA1 E.IN+2 SA2 A1+B1 RECHECK POINTERS BX1 X1-X2 NZ X1,TOP6 IF CIO JUST FINISHED LX4 0-3 NG X4,TOP8 IF EOF OR EOI WRITER E.OUT FLUSH BUFFER EQ TOP9 READ FILE TOP8 LX4 3-4 PL X4,TOP3 IF FULL BUFFER LX4 4-9 NG X4,ERD1 IF AT EOI WRITEF E.OUT FLUSH BUFFER TOP9 READ E.IN BEGIN READ OF NEXT SECTION OF FILE RECALL E.OUT WAIT FOR WRITE FET TO SETTLE SA1 X2 MX7 1 SA7 RC SET NO DATA READ BX6 X1 MOVE FILE NAME TO *CFET* SA6 CFET RJ CFF COPY REMAINDER OF FILE EQ ERD1 PROCESS EOI ENCOUNTERED TSL SPACE 4,15 ** TSL - TRIM SPACES OFF LINE (STRING BUFFER). * * ENTRY (A6) = FWA OF END OF LINE CHARACTER. * (X6) = MASK OF 2. * * EXIT LINE TRIMMED. * (E.STR-1) = NEW LINE LENGTH. * * USES A - 1, 6. * X - 1, 6. * B - 2. TSL1 SB2 B2-B1 POSITION BACK TO NEXT CHARACTER LE B2,B6,TSL2 IF AT START OF LINE -1 SA1 B2 SX1 X1-1R ZR X1,TSL1 IF CHARACTER WAS A BLANK TSL2 SA6 B2+B1 PUT NEW END CHARACTER SX6 B2-B6 GET NEW LENGTH SA6 B6+ SET NEW LENGTH TSL PS ENTRY/EXIT SB2 A6 EQ TSL1 PROCESS TRIM UPL SPACE 4,30 ** UPL - UNPACK LINE TO ASCII BUFFER. * * ENTRY (A1) = FWA OF CODED LINE. * (X1) = FIRST WORD OF CODED LINE. * (B6) = FWA STRING BUFFER. * * EXIT (X6) = COUNT OF SIGNIFICANT CHARACTERS. * (B5) = FWA OF BUFFER (NULL LINE IF (B5) = (B6)). * (B6) = ADDRESS OF END OF LINE MARKER. * (B7) = IF .GT. 0, THEN LWA OF BUFFER. * IF (B7) = (B6), THEN BUFFER IS FULL. * IF (B7) = 0 AND (B2) .LT. 0, THEN 3 OR MORE TRAILING * BLANKS WERE REMOVED. * LINE UNPACKED WITH ASCII ESCAPE CHARACTERS INCLUDED * IN WORDS WHERE NEEDED. * END OF LINE TERMINATOR (MASK OF 1) AFTER LAST * NON-BLANK CHARACTER (OR AT END OF BUFFER - (B7)). * * USES A - 1, 2, 6. * X - 0, 1, 2, 3, 4, 6, 7. * B - 2, 5, 6, 7. * * NOTES LINES ARE ASSUMED TO BE 160 CHARACTERS LONG. * ASCII MODE WILL BE USED IF (UPLA) = 2B, * NORMAL MODE IS USED IF (UPLA) = 100B. * TRAILING SPACES ARE NOT CONSIDERED SIGNIFICANT. * TRAILING 00B CHARACTERS (COLON/64 CHARACTER SET) ARE * SIGNIFICANT ONLY IF THERE IS A NON-00B CHARACTER * FOLLOWING THEM IN THE CODED LINE. THIS AGREES WITH * THE DEFINITION OF THE END OF LINE BYTE. UPL1 SX7 X7-76B TEST FOR ASCII ZR X7,UPL6 IF ASCII UPL2 SA6 B6 SAVE ASSEMBLY SB6 B6+B1 GE B6,B7,UPL8 IF SAVED LAST CHARACTER UPL3 LX1 6 GET NEXT CHARACTER BX6 -X2*X1 SB2 B2-B1 DECREMENT COUNT BX7 X6+X0 IF ESCAPE = 76B UPL4 PL B2,UPL1 IF NOT LAST CHARACTER OF WORD ZR X4,UPL10 IF END OF LINE REACHED UPL5 SA1 A1+B1 GET NEXT WORD SB2 9 RESET CHARACTER POSITION BX4 -X3*X1 0, IF END OF LINE NZ X7,UPL1 IF NOT PROCESSING ASCII EQ UPL2 IF ON SECOND PART OF ASCII * PROCESS ASCII CHARACTER. UPL6 LX1 6 GET NEXT CHARACTER SB2 B2-B1 DECREMENT COUNT BX7 -X2*X1 LX6 6 SHIFT ESCAPE OVER IX6 X6+X7 FORM ASCII WORD MX7 0 SET ON SECOND PART OF ASCII PL B2,UPL2 IF NEW WORD NOT NEEDED EQ UPL4 GET NEXT WORD * END OF BUFFER REACHED. * DETERMINE SIGNIFICANCE OF LAST CHARACTER. UPL7 MX6 2 SA6 B6 SET LAST CHARACTER EQ UPL13 FINISH UNPACK OPERATION UPL8 NZ X6,UPL10 IF LAST CHARACTER .NE. 0 NZ X4,UPL7 IF MORE FOLLOWS, LAST 0 IS COLON UPL9 LX1 6 SEE IF MORE CHARACTERS FOLLOW BX6 -X2*X1 SB2 B2-1 NZ X6,UPL7 IF CHARACTER FOLLOWS, 0 IS COLON PL B2,UPL9 IF MORE IN WORD, ELSE LAST IS NOT COLON * END OF LINE REACHED. TRIM 00B AND BLANKS. UPL10 SB6 B6-B1 SKIP TRAILING ZEROS SA1 B6 GET LAST CHARACTER LT B6,B5,UPL12 IF PAST START OF BUFFER ZR X1,UPL10 IF 00B CHARACTER SB7 B0 SET POSSIBLE BLANKS TRIMMED SB2 B6-B1 UPL11 SX1 X1-1R SKIP TRAILING BLANKS NZ X1,UPL12 IF NOT BLANK SB6 B6-B1 SA1 B6 GE B6,B5,UPL11 IF NOT PAST START OF BUFFER UPL12 SB6 B6+1 PUT MARK AFTER LAST NON-BLANK MX6 2 SA6 B6 UPL13 SX6 B6-B5 GET CHARACTER COUNT NZ B7,UPL IF NOT CHECKING TRAILING BLANKS SB2 B6-B2 UPL PS ENTRY/EXIT SA2 UPLA MX3 -12 END OF LINE MASK SB5 B6 MARK FIRST CHARACTER POSITION SX0 X2 SET MODE OF UNPACK MX2 -6 CHARACTER MASK BX4 -X3*X1 TEST FOR END OF LINE SB2 9 SET CHARACTER POSITION SB7 B6+MAXWD SET LWA+1 EQ UPL3 PROCESS UNPACK UPLA CON 100B SET NO ASCII (RESET IN PRESET IF NEEDED) VAL SPACE 4,15 ** VAL - EVALUATE NUMERIC STRING. * * ENTRY (A5) = FWA OF NUMERIC STRING. * (X5) = FIRST WORD OF NUMERIC STRING. * * EXIT (A5) = LWA+1 OF NUMERIC STRING. * (X5) = ((A5)). * (X6) = NUMBER EVALUATED. * = -0, IF NUMBER 0 WAS SPECIFIED. * * USES A - 5. * X - 3, 4, 5, 6, 7. * B - 2, 3, 4. * * NOTES THIS ROUTINE CONVERTS AN ASTERISK (*) TO 2**30 - 1. * VAL1 SX4 X5-1R9-1 SX3 X5-1R0 BX4 -X3*X4 PL X4,VAL2 IF NOT A NUMBER LX4 B2,X6 *4 IX4 X6+X4 *5 SA5 A5+B1 NEXT CHARACTER LX4 1 *10 SX7 X7+B1 SET CHARACTER ENCOUNTERED FLAG IX6 X4+X3 PL X5,VAL1 IF NOT END OF LINE VAL2 ZR X7,VAL3 IF NO NUMBERS ENCOUNTERED NZ X6,VAL4 IF NOT JUST 0 USED MX6 60 SET -0 FLAG EQ VAL4 END OF NUMBERS VAL3 SX7 X5-1R* NZ X7,VAL4 IF NOT * SA5 A5+1 STEP OVER * MX6 -30 BX6 -X6 SET * EQUIVALENT VAL4 SB4 X5-1R ZR B4,VAL5 IF BLANK NE B4,B1,VAL IF NOT COMMA NZ B3,VAL IF SECOND COMMA VAL5 SA5 A5+B1 SB3 B3+B4 SET COMMA FLAG PL X5,VAL4 IF NOT END OF LINE VAL PS ENTRY/EXIT BX6 X6-X6 CLEAR ASSEMBLY SB2 B1+B1 MX7 0 CLEAR CHARACTER ENCOUNTERED SB3 B0 SET NO COMMA PL X5,VAL1 IF NOT END OF LINE EQ VAL RETURN VIS SPACE 4,10 ** VIS - VOID INSTRUCTION STACK. * * *VIS* SHOULD BE CALLED IMMEDIATELY AFTER ALL INSTRUCTION * MODIFICATIONS TO VOID THE INSTRUCTION STACK. VIS SUBR ENTRY/EXIT EQ VIS RETURN VRT SPACE 4,10 ** VRT - VERIFY LINE AND RETURN TO *NCM*. * * ENTRY NONE. * * EXIT TO *NCM*. * * CALLS VRY. * * NOTES DO NOT RETURN JUMP TO THIS ROUTINE. VRT RJ VRY VERIFY LINE EQ NCM EXIT VRY SPACE 4,15 ** VRY - VERIFY XEDIT OPERATIONS. * * ENTRY NONE. * * EXIT CURRENT LINE WRITTEN OF *VERIFY* TRUE. * THE LINE IS PACKED IF NEEDED AND HOUSEKEEPING DONE. * * USES A - 1, 4, 6. * X - 1, 4, 6. * B - 6, 7. * * CALLS RTA. * * MACROS WRITEC. VRY1 WRITEC OUTPUT,E.LINE VRY PS ENTRY/EXIT SA4 VERIFY PL X4,VRY IF NOT IN *VERIFY* MODE SA1 E.LMOD ZR X1,VRY1 IF NO MODIFICATIONS OR PACKED SA1 A1-1 ZR X1,VRY1 IF CODED FORMAT SB6 E.STR RE-PACK LINE SB7 E.LINE MX6 0 SET LMOD TO NO LINE MOD SA6 A1+B1 E.LMOD RJ RTOA EQ VRY1 WRITE LINE WTF SPACE 4,15 ** WTF - WRITE EDIT LINE. * * ENTRY (IWHERE) = IF CREATION MODE, .LE. ZERO. * ELSE, LINE COUNT. * * EXIT (IWHERE) = IF CREATION MODE, 1. * IF UPDATING, (IWHERE) + 1. * * USES A - 1, 2, 3, 6, 7. * X - 1, 2, 3, 6, 7. * B - 6, 7. * * CALLS RTOA, VIS. * * MACROS WRITEC WTF2 WRITEC E.OUT,E.LINE WTF3 SA3 IWHERE BUMP IWHERE SX7 B1 IX7 X3+X7 SA7 A3 WTF PS ENTRY/EXIT SA1 UPDATE PL X1,WTF3 IF NOT UPDATING FILE. * WORD IS REPLACED AFTER FIRST ENTRY. WTFA SA1 WTFB EQ WTF1 PRESET CODE * NORMAL CODE FOLLOWS. WTF RMT SA1 E.LMOD ZR X1,WTF2 IF NO MODIFICATION RMT SA1 A1-B1 ZR X1,WTF2 IF IN CODED MODE SB6 E.STR SB7 E.LINE RJ RTOA RE-PACK LINE MX6 0 SA6 E.LMOD SET NO MODIFICATIONS EQ WTF2 WRITE LINE * PRESET CODE. WTF1 SA2 IWHERE BX6 X1 SX7 B1 SA6 WTFA REPLACE PRESET JUMP RJ VIS VOID INSTRUCTION STACK PL X2,WTF+1 IF NOT CREATION MODE SA7 A2 SET IWHERE = 1 MX6 0 SA7 NOMOD SET MODIFICATIONS MADE SA6 RC SET DATA READ EQ WTF RETURN (NO LINE TO WRITE OUT) WTFB BSS 0 WTF HEREL TITLE SPECIAL PURPOSE SUBROUTINES. LCB SPACE 4,25 ** LCB - LOAD CIRCULAR BUFFER. * * ENTRY (A2) = ADDRESS OF OUT. * (A3) = ADDRESS OF FIRST. * (A4) = RETURN ADDRESS. * (B4) = OUT. * * EXIT TO RETURN ADDRESS -1 IF CONTINUATION READ. * TO RETURN ADDRESS IF EOR/EOF. * (X1) = LAST WORD ADDRESS OF WORKING BUFFER. * = -1 IF EOF. * = -2 IF EOI. * * MACROS READ, RECALL. * * NOTES ROUTINE IS COPIED FROM COMCRDW. * REQUEST READ IF BUFFER IS EMPTY, NOT BUSY AND NOT * EOR/EOF. IF BUFFER IS BUSY, RECALL AND RETURN. * MODIFIED TO RETURN EOI STATUS IF FET UNDER * INVESTIGATION HAS A ZERO FILENAME. (ASSUMES OPTIONS * SUCH AS I=0 USED). LCB= SA1 A3-B1 CHECK BUFFER STATUS SX6 B4 STORE OUT LX1 59-0 SA6 A2 NG X1,LCB2 IF BUFFER NOT BUSY SX6 -2 PREPARE EOI STATUS ZR X1,LCB8 IF NO FILE NAME (EG. L=0 USED) RECALL LCB1 SB2 A4-B1 CONTINUE READ JP B2 RETURN LCB2 SA1 A2-B1 RE-READ IN SB3 X1 NE B3,B4,LCB1 IF BUFFER NOT EMPTY SA1 A3-B1 CHECK BUFFER STATUS LX1 59-4 NG X1,LCB3 IF EOR/EOF/EOI READ A3-B1 XEDIT ONLY USES READ FUNCTION SB2 A4-B1 JP B2 RETURN LCB3 LX6 B1,X1 SA1 A3 SET IN = OUT = FIRST SX7 X1 SA7 A1+B1 SX1 -B1 SET EOF RESPONCE SB2 A4 SET RETURN ADDRESS NG X6,LCB4 IF EOF MX2 -4 SX1 B6 LX6 -14+4 BX2 -X2*X6 SB3 X2+ EQ B3,B1,LCB6 IF LEVEL 1 LCB4 SX2 A3-B1 RESET (X2) SA7 A7+B1 NG X1,LCB7 IF EOF/EOI LCB5 JP B2 RETURN LCB6 SA7 A7+B1 STORE OUT READ A3-B1,R RESTART TELETYPE READ SB2 A4-B1 JP B2 RETURN LCB7 LX6 3-9 PL X6,LCB5 IF NOT EOI LX1 1 SET -2 RESPONSE JP B2 RETURN LCB8 SB2 A4 BX1 X6 MOVE EOI STATUS JP B2 RETURN RDX SPACE 4,20 ** RDX - READ EXIT. * * ENTRY (A2) = ADDRESS OF OUT. * (A3) = ADDRESS OF FIRST. * (A4) = RETURN ADDRESS. * (X3) = FIRST. * (B3) = IN. * (B4) = OUT. * (B5) = LIMIT. * * EXIT TO RETURN ADDRESS. * * MACROS READ. * * NOTES ROUTINE COPIED FROM COMCRDW. * EXIT FROM READ SUBROUTINE TO CALLER. * IF CIRCULAR BUFFER IS BUSY, OR EOR/EOF IS SENSED, NO * ACTION IS TAKEN. OTHERWISE, THE WORD COUNT REMAINING * IN THE BUFFER IS CHECKED AND A READ FUNCTION ISSUED. * IF NECESSARY. RDX= SA1 A3-B1 CHECK BUFFER STATUS SX6 B4 LX1 59 SA6 A2 STORE OUT SX2 A3-B1 RESET (X2) PL X1,RDX1 IF BUFFER BUSY LX1 -4 NG X1,RDX1 IF EOR/EOF/EOI SET SA1 A2-B1 REREAD IN SB3 X1 * IF BUFFER IS NOT BUSY, CHECK SIZE AND ISSUE READ. SX6 B3-B4 (IN-OUT) SB2 X3 (LIMIT-FIRST) LX3 X6,B1 2*(IN-OUT) SX7 B5-B2 AX6 60 SIGN OF (IN-OUT) BX4 X6-X7 INVERT BUFFER IF OUT >= IN IX6 X4-X3 BUFFER SIZE - 2*(IN-OUT) AX7 9 NG X6,RDX1 IF BUFFER THRESHOLD NOT REACHED ZR X7,RDX1 IF BUFFER NOT BIG ENOUGH TO READ AHEAD READ X2 READ FILE RDX1 SX1 B0 RESPONSE =0 SB2 A4 JP B2 RETURN SPACE 4 * COMMON DECKS NEEDED GLOBALLY. *CALL COMCCDD *CALL COMCCFD *CALL COMCCIO *CALL COMCCPM *CALL COMCCUA *CALL COMCEDT *CALL COMCLFM *CALL COMCOVL *CALL COMCPFM *CALL COMCRDC *CALL COMCSYS *CALL COMCWTC *CALL COMCWTO *CALL COMCWTW *CALL COMCZTB SPACE 4 IF -DEF,ACCTE,3 TITLE PRESET AND BUFFER ALLOCATION. QUAL$ BSS 0 COMMON DECK QUAL DONE BY XEDIT QUAL PRESET ** NOTE- PRESET RESIDES IN TWO LOCATIONS. THE MAJOR AREA * RESIDES IN THE OUTGOING EDIT FILE BUFFER. THE OTHER * SECTION DEALS ONLY WITH THE LAST MINUTE DETAILS WHICH * COULD BE WIPED OUT BY USING THE EDIT FILES. THIS CODE * RESIDES IN THE D.STR ARRAY. PRF SPACE 4,20 ** PRF - PRESET EDIT FILE. * * ENTRY AT *PRF*, IF FILE IS LOCAL. * AT *PRF3*, IF *C* PARAMETER USED. * AT *PRF4*, IF *P* PARAMETER USED. * (D.STR) = EDIT FILE NAME. * * EXIT TO *NCM* TO PROCESS COMMANDS. * TO *ABT* IF FATAL ERROR. * * USES A - 1, 2, 3, 4, 5, 6, 7. * X - 1, 2, 3, 4, 5, 6, 7. * B - 3, 6, 7. * * CALLS GFN, RDF, RDL, RTA, SFN, STF STK, UPL. * * MACROS ATTACH, DISTC, GET, READ, RECALL, RENAME, * REWIND, STATUS, WRITEC. ORG D.STR FILE PRESET PRF EQ PRF8 PROCESS LOCAL FILE * BAD FILE READ. PRF1 REWIND E.IN,RECALL READ X2,RECALL READ X2,RECALL SA1 X2 LX1 59-9 POSITION EOI BIT SX4 PRFB * FILE NOT XEDIT-ABLE. PL X1,PRF6 IF ABOVE SA1 E.IN+2 CHECK IN POINTER SX1 X1-BUFB NZ X1,PRF6 IF DATA ON FILE PRF2 BSS 0 IF DEF,CYBRNET,2 WRITEC OUTPUT,PRFC * EMPTY FILE/CREATION MODE ASSUMED SKIP 2 SX4 PRFC * EMPTY OR FILE NOT FOUND. EQ PRF6 CREATE FILE * ENTER IF *C* PARAMETER SPECIFIED (CREATION MODE). PRF3 SA1 UPDATE SB6 PRFE * UPDATE/CREATION MODE CONFLICT.* PL X1,ABT IF ABOVE REWIND E.IN,RECALL REWIND E.OUT,RECALL REWIND SCRATCH FILES SA1 PRFA PUT NAME INTO FET SX7 1031B NOT BUSY, EOI ENCOUNTERED SX6 -B1 BX7 X7+X1 SA6 IWHERE SET CREATION MODE FLAG SA7 E.IN SA6 RC SET NO DATA READ SA6 FS SET NOT READING OFF EDIT FILE EQ PRF10 COMPLETE INITIALIZATION * ENTER IF *P* PARAMETER SPECIFIED. PRF4 SA1 PRFA OLSCRB SA2 IFN MX7 59 BX7 -X7+X1 SET *NOT BUSY* SA7 FS SET READING OFF SCRATCH FILE LX6 X2 SA7 FT SA6 FT+8 GET FT SA3 X2 SX1 36000B LOAD MASK BX6 X1*X3 ZR X6,PRF5 IF FILE GOTTEN SA1 UPDATE PL X1,PRF4.1 IF IN LOOK MODE ATTACH X2,,,,W EQ PRF4.2 CHECK FOR ERROR PRF4.1 ATTACH X2,,,,R PRF4.2 SA3 X2 SX1 36000B BX6 X1*X3 SX4 ERR SET ERROR MESSAGE TO PFM NZ X6,PRF6 IF ABOVE MX7 1 SET *ATTACH* BIT LX7 57-59 SA7 SPCP SA1 FT+8 MX6 42 RENAME FOR D.A. EXIT PROBLEMS SX7 B0 BX1 X6*X1 SA7 FS SET READING OFF PRIMARY FILE RENAME FT,X1 PRF5 SA1 FT GET NAME MX6 42 SX7 B1 BX2 X6*X1 CLEAR LOWER BITS IX7 X2+X7 SET COMPLETE RECALL E.IN SA7 E.IN PUT NEW FILENAM INTO FET SA1 SPCP SET *P* AS SPECIFIED PARAMETER MX7 1 LX7 58-59 BX7 X1+X7 SA7 A1 EQ PRF9 SET UP FILE FOR EDITING * PROCESS EDITFIL ERROR. * (X4) = ADDRESS OF ERROR MESSAGE. PRF6 WRITEC OUTPUT,X4 ISSUE MESSAGE SA1 PRFF SX6 X1-1 DECREMENT RETRY COUNT SA6 A1+ ZR X1,PRF13 IF EXCEEDED RETRY LIMIT PRF7 WRITEC OUTPUT,PRFH * NAME EDIT FILE RJ RDL READ A LINE (NOTE- PRELIX + INITIALLY SET) NZ X1,PRF7 IF HIT A CARRIAGE RETURN SA1 D.LINE SB6 E.STR *E.STR* USED AS SCRATCH RJ UPL SA5 E.STR RJ GFN GET SPECIFIED EDITFIL NAME SX4 =C* RESERVED FILE NAME.* SB6 B6-303B ZR B6,PRF7.1 IF RESERVED FILE NAME SX4 PRFL NZ B4,PRF7.1 IF SPECIAL CHARACTERS SX4 PRFM PRF7.1 NZ X1,PRF6 IF FILE NAME ERROR SA6 IFN NG X5,PRF8 IF END OF LINE MX3 -6 EXTRACT LOWER CASE PART OF CHARACTER BX5 -X3*X5 SX4 X5-1RC ZR X4,PRF3 IF *C* USED SX4 X5-1RP ZR X4,PRF4 IF *P* USED * NO PARAMETER USED PRF8 SA1 IFN PUT EDIT NAME INTO FET MX7 59D BX7 -X7+X1 SET FET *NOT BUSY* RECALL E.IN MX6 0 SA7 E.IN SET NAME INTO FET SA6 FS SET READING OFF EDIT FILE RJ STF SET TERMINAL FILE NZ X6,PRF9 IF EDITFIL NOT TYPE *TT* SA1 E.IN MX6 42 BX1 X6*X1 RJ SFN SPACE FILE NAME SX4 =C* FILENAM CANNOT BE ASSIGNED TO THE TERMINAL.* LX6 -6 SA6 X4 INSERT FILE NAME INTO MESSAGE EQ PRF6 PROCESS EDITFIL ERROR PRF9 REWIND E.IN,RECALL REWIND BOTH SCRATCH FILES REWIND E.OUT,RECALL BX7 X7-X7 SA7 E.IN+5 INITIALIZE STATUS RESPONCE CELLS SA7 A7+B1 STATUS E.IN,P SA1 E.IN+5 GET FNT ENTRY OF EDITFIL ZR X1,PRF2 IF FILE NOT THERE BX6 X1 LX1 59-14D EXECUTE ONLY FLAG SX4 PRFJ * CANNOT EDIT EXECUTE ONLY FILES NG X1,PRF6 IF ABOVE READ E.IN MX6 1 SA6 RC SET DAT READ RJ RDF READ INITIAL LINE PRF10 SA1 IFN MOVE FILE NAME BX7 X1 SA7 IRFN SA7 ISFN SA7 INITZ SET INITIALIZATION COMPLETE PRF10.1 SA1 JOPR * EQ PRF11 (DB PARAMETER SPECIFIED) MX2 -12 LX1 0-24 BX1 -X2*X1 ISOLATE ORIGIN TYPE SX1 X1-TXOT NZ X1,PRF11 IF NOT TELEX ORIGIN DISTC ON,TLX * PROCESS *FR* PARAMETER. PRF11 SA1 PRFG ZR X1,NCM IF *FR* NOT USED SA1 E.LINE SB6 E.STR RJ UPL SA1 E.STR-1 SB6 A1+1 * LOCATE FIRST CHARACTER AFTER 2 CONSECUTIVE BLANKS. PRF12 SA1 A1+B1 SB3 A1-B6 NG X1,NCM IF END OF LINE REACHED, EXIT SX2 X1-1R ZR X2,PRF12 IF CHARACTER WAS A BLANK SB6 A1+B1 LE B3,B1,PRF12 IF NOT AT LEAST 2 CONSECUTIVE BLANKS SB6 B6-B1 SET TO FIRST CHARACTER SB7 P.LINE RJ RTA PACK COMMAND LINE SA1 P.DEV SET COMMAND TO PREVIOUS COMMAND RJ STK STACK DEVICES AND EXIT TO NCM .J IFEQ DEBUG,1 IF DEBUG ON WRITEC OUTPUT,PRFK .J ENDIF EQ NCM EXIT, PROCESS COMMANDS * BATCH MODE - RETRY COUNT ABORT. PRF13 SB6 PRFI * BATCH MODE - RETRY COUNT EXCEEDED. EQ ABT ABORT XEDIT PRFA DATA 0LSCRB PRFB DATA C* FILE NOT XEDIT-ABLE.* IF DEF,CYBRNET,2 PRFC DATA C* EMPTY FILE/ CREATION MODE ASSUMED.* SKIP 1 PRFC DATA C* EMPTY OR FILE NOT FOUND.* PRFE DATA C* LOOK/CREATION MODE CONFLICT.* PRFF CON -1 RETRY COUNT. STOP WHEN 0 (SET IN PRESET) PRFG DATA 0 .NE. 0 IF *FR* USED PRFH DATA 10HNAME EDIT VFD 24/4HFILE,12/0001B,24/ PRFI DATA C* BATCH ABORT - RETRY COUNT EXCEEDED.* PRFJ DATA C* CANNOT EDIT EXECUTE ONLY FILES.* PRFK DATA C+ *FR* COMMAND STACKING ERROR.+ PRFL DATA C* INCORRECT CHARACTERS IN FILE NAME.* PRFM DATA C* TOO MANY CHARACTERS IN FILE NAME.* ERRPL *-D.STR-D.STRL-1 IF PRF OVERFLOWS SCRATCH ARRAY ORG * RESET ORIGIN QUAL * SPACE 4 * XEDIT BUFFERS. USE BUFFERS FLUSH LITERALS BUFA EQU * OUTGOING EDIT FILE BUFB EQU BUFA+BUFAL INCOMING EDIT FILE BUFI EQU BUFB+BUFBL PRIMARY INPUT FILE BUFO EQU BUFI+BUFIL OUTPUT FILE MINFL EQU BUFO+BUFOL+1 MINIMUM FL FOR XEDIT BUFC EQU MINFL ALTERNATE INPUT FILE BUFD EQU BUFC+BUFCL COPY/READ FILE MAXFL EQU BUFD+BUFDL MAX FL FOR MAIN PROGRAM RFL= EQU MINFL+1 INITIAL FIELD LENGTH FWAOVL EQU MAXFL+2 MINIMUM OVERLAY FIELD LENGTH PRS SPACE 4,15 ** PRS - PRESET XEDIT AND BEGIN EXECUTION. * * ENTRY NONE. * * EXIT TO *PRF*. * * USES A - ALL. * X - ALL. * B - 1, 2, 3, 4, 5, 6. * * CALLS ARG, ICH, UPL, VIS. * * MACROS ABORT, CSET, GETFNT, GETJA, MEMORY, MESSAGE, * MOVE, OPEN, TSTATUS, WRITE, WRITEC. XEDIT SB1 1 ENTRY QUAL PRESET IF DEF,TIMING,1 GETJA TIMING MEMORY CM,,RECALL,RFL= SA1 PRSS GET TOOLNAME FOR *FNL* CALL RJ INT STORE INITIAL *CUA* VARIABLES BX6 X6-X6 CLEAR BUFFER CONTROL WORD SA6 PRSI SA1 B1+B1 MX0 42 BX2 X0*X1 NZ X2,PRS2 IF FILE NAME PRESENT PRS1 GETFNT PRSA SA1 PRSI+1 GET FILE NAME BX2 X0*X1 NZ X2,PRS2 IF FILE FOUND SA3 PRSI NG X3,PRS1 IF FILE NOT FOUND SA2 PRSB =0LTAPE1 PRS2 SX7 B1 SA3 ACTR BX7 X2 SB4 X3-1 SET NUMBER OF PARAMETERS SA7 IFN PUT INCOMING NAME LE B4,PRS4 IF 1 PARAMETER OR LESS SA4 3 SB5 PRSC RJ ARG PROCESS ARGUMENT TABLE RJ VIS VOID INSTRUCTION STACK ZR X1,PRS4 IF NO ERRORS SA0 PRSD C* ERROR IN XEDIT ARGUMENTS.* * PRESET ERROR ROUTINE - (A0) = ADDRESS OF MESSAGE. PRS3 RJ FNL ISSUE ACCOUNTING MESSAGE MESSAGE A0 ISSUE MESSAGE TO DAYFILE ABORT * IF *NH* PARAMETER, (PRS4) = EQ PRS5. * PRS4 WRITEC OUTPUT,PRSN XEDIT HEADER MESSAGE * CHECK FOR FILE NAME CONFLICTS PRS5 SA0 PRSF * FILE NAME CONFLICT.* SB2 FFET-7 SB3 LFET-7 PRS6 SB2 B2+7 STEP TO NEXT OUTSIDE FET ADDRESS GE B2,B3,PRS8 IF LOOPED THROUGH ALL FILES SA1 B2+ SB4 B2+7 PRS7 SA2 B4 GET INNER LOOP FET NAME BX3 X1-X2 SB4 B4+7 ZR X2,PRS7.1 IF NO FILE THERE (L=0) ZR X3,PRS3 IF FILE NAMES COMPARE (ERROR) PRS7.1 LE B4,B3,PRS7 IF NOT FINISHED WITH INNER LOOP FET EQ PRS6 CHECK NEXT FILE NAME FROM FET-S * PRESET INPUT AND OUTPUT FETS. PRS8 SA1 OUTPUT SET UP RA+2 WITH FILE TO BE FLUSHED MX2 42 SX6 A1 BX2 X1*X2 BX6 X2+X6 MX7 0 SA6 B1+B1 SA7 A6+B1 OPEN INPUT,READNR,RECALL SA1 OUTPUT ZR X1,PRS9 IF NO NAME PRESENT OPEN OUTPUT,ALTERNR,RECALL WRITE OUTPUT,* HANDLE OPEN BUG * DETERMINE ASCII/CHARACTER SET/ORIGIN CODES. PRS9 GETJO PRSR SA2 BATCH SA1 PRSR SX6 X1-TXOT BX6 X6+X2 0, IF *TXOT*, ELSE BATCH SA6 A2 SA1 CSMR CHARACTER SET MODE SB2 18D 64 CHARACTER SET OFFSET NG X1,PRS10 IF 64 CHARACTER SET SB2 B0 63 CHARACTER SET OFFSET PRS10 SA5 AS ZR X6,PRS11 IF TXOT AND *B* PARAMETER NOT USED BX6 X6-X6 SET NO ASCII ZR X5,PRS14 IF NO ASCII DESIRED MX6 1 SET ASCII FLAG FOR *PRS14* SB2 36D SET 64/ASCII EQ PRS14 PRESET CHARACTERS PRS11 TSTATUS TSTATUS SA1 TSTATUS MX3 -6 AX1 3*6 PRS11.1 BX6 -X3*X1 DETERMINE IF TERM TYPE HAS A *D* LX1 -6 ZR X6,PRS11.1 IF NOT CHARACTER + SX4 X6-1RD NZ X4,PRS12 IF NOT ...D TERMINAL TYPE SB2 B0 SET OLD CHARACTER SET SA6 A5 TURN ON ASCII FLAG (NON ZERO) EQ PRS14 PRESET CHARACTERS PRS12 SA1 A1+B1 SX2 4 BX6 X2*X1 NZ X6,PRS13 IF ASCII FLAG SET ZR X5,PRS14 IF ASCII NOT REQUIRED CSET ASCII SX6 3RASC SET SPECIAL ASCII FLAG PRS13 SA6 A5 SET ASCII FLAG SB2 36 SET 64/ASCII * PRESET CHARACTERS DEPENDENT ON CHARACTER SET. PRS14 SX7 B1+B1 SA1 CHARSET ZR X6,PRS14.1 IF ASCII NOT ON SA7 UPLA SET UNPACKS TO ASCII MODE PRS14.1 SX6 B2 SAVE SHIFT VALUE MX7 0 SA6 CHARSFT SA7 CCDR+8 PLACE END OF LINE RJ ICH INITIALIZE CHARACTERS * MOVE COMMAND IMAGE TO *C.STR* AND ANALYZE. SA1 CCDR SB6 C.STR SET STRING DESTINATION RJ UPL MOVE 9,CCDR,I.LINE MOVE COMMAND IMAGE SA1 C.STR-1 MX7 1 SB2 B1 SET CHARACTER POINTER SA7 C.STR SET DEFAULT END OF LINE SA7 C.STR+80 ALLOW ONLY 80 CHAR ON COMMAND PRS15 SB2 B2+B1 INCREMENT POINTER SA2 A1+B2 NG X2,PRS20 IF END OF LINE SX3 X2-1R. ZR X3,PRS16 IF . SX3 X2-1R) NZ X3,PRS15 IF NOT ) PRS16 SA2 A2+B1 GET DELIMITER CHARACTER SB2 B2+2 SET POINTER TO CHARACTER AFTER DELIMITER BX4 X2 NG X2,PRS20 IF END OF LINE SX3 X2-1R ZR X3,PRS20 IF BLANK (ASSUME IGNORE REST OF COMMAND) SX6 B1 AX4 6 .CYB IF DEF,CYBRNET + SX7 1R^ UP ARROW INVALID DELIMITER CHARACTER ZR X4,PRS16.1 IF CHARACTER NOT ASCII SX7 7402B SET FOR ASCII UP ARROW SX6 7601B SET LOWER CASE A .CYB ELSE ZR X4,PRS16.1 IF CHARACTER IS NOT ASCII SX6 7601B SET LOWER CASE A .CYB ENDIF PRS16.1 IX3 X2-X6 NEGATIVE IF NOT ALPHABETIC SX6 X6+26D IX4 X2-X6 POSITIVE IF NOT ALPHABETIC BX3 -X3*X4 NEGATIVE IF DELIMITER IS ALPHABETIC .CYB IF DEF,CYBRNET NG X3,PRS17 IF DELIMITER IS ALPHA USE ; IX6 X7-X2 UP ARROW CHECK ZR X6,PRS17 IF YES THEN USE ; SX7 X2-1R/-1 POSITIVE IF DELIMITER ABOVE / SX6 X2-1R0 NEGATIVE IF BELOW 0 BX6 X7-X6 POSITIVE IFF BOTH SIGNS SAME PL X6,PRS18 IF NOT +,-,*, OR / USE DELIMITER PRS17 SX2 1R; USE SEMI-COLON SB2 B2-1 MOVE POINTER BACK PRS18 PX6 B2,X2 FORM C.STR WORD .CYB ELSE NG X3,PRS19 IF INCORRECT DELIMITER CHARACTER PX6 B2,X2 FORM C.STR WORD .CYB ENDIF SA6 A1 PUT C.STR-1 MX2 -18 ECHO 4,P=(I.DEV,S.DEV) SA1 P+1 SET DELIMITERS IN OTHER DEVICES BX1 X2*X1 IX7 X1+X6 SA7 A1 EQ PRS20 CHECK INPUT AND OUTPUT FILES * INCORRECT DELIMITER CHARACTER. PRS19 SA1 BATCH SA0 PRSG * INCORRECT DELIMITER CHARACTER.* NZ X1,PRS3 IF BATCH MODE WRITEC OUTPUT,A0 ISSUE MESSAGE TO TERMINAL PRS20 SA1 INPUT+1 CHECK INPUT/OUTPUT = *TT* SA2 OUTPUT+1 MX6 1 BX1 -X6*X1 BX2 -X6*X2 AX1 48 AX2 48 SX7 X1-2RTT SX2 X2-2RTT IX2 X2+X7 MX6 0 ZR X2,PRS21 IF BOTH ARE *TT* SA6 PROMPT CLEAR ISSUING OF SPECIAL PROMPT SA7 TTYIN SET STATUS OF INPUT FET MOVE 2,PRSM,PRFH CHANGE *NAME EDIT FILE* MESSAGE SX7 B1 IF EITHER NOT *TT*, ALLOW ONE RETRY SA7 PRFF PRS21 SA1 BATCH ZR X1,PRS22 IF TELEX ORIGIN MOVE PRSHL,PRSH,MESSAGE+1 MOVE BATCH ERROR MESSAGES MOVE 2,PRSO,ETLA CHANGE BATCH ECHO STATUS MOVE 1,PRSP,MODA CHANGE BATCH MODIFY SHIFT PRS22 EQ PRF PRESET FILE PRSA VFD 38/0LDUMMY,1/1,3/,18/1 DUMMY GETFNT FET VFD 36/,6/10B,18/PRSI BSS 6 VFD 12/1+2*1+1,6/,18/1S"PTFT",2/,1/1,1/,1/,1/,18/PRSI BSS 4 PRSB DATA 0LTAPE1 PRSC BSS 0 ARGUMENT TABLE AS ARG -ACTR,AS B ARG -PRSR,BATCH C ARG -PRSJ,PRF DB ARG -PRSL,PRF10.1 FR ARG -ACTR,PRFG I ARG INPUT,INPUT L ARG OUTPUT,OUTPUT LK ARG -PRSZ,UPDATE NH ARG -PRSQ,PRS4 P ARG -PRSK,PRF ARG PRSD DATA C* ERROR IN XEDIT ARGUMENTS.* PRSF DATA C* FILE NAME CONFLICT.* PRSG DATA C* INCORRECT DELIMITER CHARACTER.* PRSH BSS 0 BATCH ERROR MESSAGE TABLE ERRPRS HERE PRSHL EQU *-PRSH PRSI BSS 1+2*1+1 PRSJ EQ PRF3 *C* PARAMETER PRSK EQ PRF4 *P* PARAMETER PRSL EQ PRF11 *DB* PARAMETER PRSM DATA C* NAME EDIT FILE* PRSN DATA C* "VERSION"* PRSO BSS 0 ETL HEREL ECHO HEADER WORDS PRSP BSS 0 MOD HEREL ECHO MODIFY WORD PRSQ EQ PRS5 *NH* PARAMETER PRSR DATA 100B PSEUDO BATCH PRSZ DATA 0 SET LOOK MODE PRSS VFD 60/PRST ADDRESS OF TOOLNAME PRST VFD 60/0HXEDIT TOOLNAME FOR *CUA* MESSAGE USE SETCHAR DATA 0 SET END MARKER USE * SPACE 4 * COMMON DECKS NEEDED IN PRESET. *CALL COMCARG *CALL COMCDXB *CALL COMCMVE QUAL * *CALL COMCSFN *CALL COMCSTF SPACE 4 .MH2 EQU MH2 OVLDEF 1,(USER INFORMATION ROUTINES) SPACE 4 ** DEFINE ALTERNATE CHARACTER REPLACEMENTS. *T 24/AS, 18/64 C, 18/63 C * * AS = ASCII 6/12 CHARACTER SET. * 64 C = 64 CHARACTER SET. * 63 C = 63 CHARACTER SET. AM. VFD 24/67B,18/67B,18/67B AMPERSAND FN. VFD 24/2RTH,18/2RTH,18/2RTH END OF HELP FILE NAME QM. VFD 24/71B,18/71B,18/71B QUESTION MARK SH. VFD 24/60B,18/60B,18/60B SHARP UA. VFD 24/7402B,18/76B,18/76B UP ARROW SPACE 4 MH2 SET .MH2 TITLE MACROS LOCAL TO OVERLAY. ENDHELP SPACE 4,10 ** ENDHELP - CLOSE EXPLAIN ENTRY. * * * ENDHELP * * ENTRY (A) = A MICRO CONTAINING THE NAME OF THE * EXPLAIN ENTRY. * * EXIT A SYMBOL IS EQUATED TO THE LENGTH OF THE MESSAGE. * * NOTES THIS MACRO IS TO BE USED END AN EXPLAIN ENTRY. PURGMAC ENDHELP ENDHELP MACRO "A"_L EQU *-"A"_A ENDM ENDHELP EXPP SPACE 4,15 ** EXPP - DEFINE PRIMARY EXPLAIN ENTRY. * * * EXPP NAME * * ENTRY *NAME* = NAME OF ERROR MESSAGE. * * NOTES MACRO INITIALIZES THE DEFINITION FOR THE MESSAGE * TEXT. THE *ENDHELP* MACRO IS USED TO CLOSE THE * DEFINITION. THE TABLE FORMATS ARE PLACED IN AN * UNLABELED REMOTE BLOCK. PURGMAC EXPP EXPP MACRO NAME NAME_A BSS 0 A MICRO 1,, NAME RMT ORG TMSG+NAME-1 VFD 12/2000B+NAME_L IF DEF,NAME_S,1 VFD 30/NAME_S VFD *P/NAME_A ORG * RMT ENDM EXPP EXPS SPACE 4,10 ** EXPS - DEFINE SECONDARY EXPLAIN ENTRY TEXT. * * * EXPS NAME,LEVEL * * ENTRY *NAME* = NAME OF ERROR MESSAGE. * *LEVEL* = LEVEL FOR MESSAGE (1-31). * * NOTES MACRO SERVES SAME PURPOSE AS *EXPP*. PURGMAC EXPS EXPS MACRO NAME,LEVEL IF -DEF,NAME_S,1 NAME_S BSS 32D NAME_LEVEL_A BSS 0 A MICRO 1,, NAME_LEVEL RMT ORG NAME_S+LEVEL_B VFD 12/2000B+NAME_LEVEL_L,*P/NAME_LEVEL_A ORG * RMT ENDM EXPS EXPLAIN SPACE 4,20 ** EXP - PROCESS EXPLAIN COMMAND. * * ENTRY (EXPLAIN) = EXPLAIN ERROR MESSAGE POINTERS. * * EXIT TO *NCM*. * * USES A - 0, 1, 4, 6. * X - 0, 1, 2, 4, 5, 6, 7. * B - 2, 3, 7. * * MACROS WRITEC, WRITEO, WRITEW. * * NOTES EXPLAIN ISSUES A MORE DETAILED STATEMENT CONCERNING * THE LAST 4 XEDIT MESSAGES. EACH TIME THE EXPLAIN * COMMAND IS USED, XEDIT WILL GIVE THE LAST ENTRY, AND * REMOVE IT FROM THE STACK (THUS THE NEXT EXPLAIN WILL * ISSUE THE ENTRY FOR THE PREVIOUS MESSAGE.) THIS * COMMAND WILL WORK ONLY FOR THE LAST NON-EXPLAIN * COMMAND. EXP SA1 EXPLAIN ENTRY LX1 12 POSITION LAST ENTRY UX1 B7,X1 (B7) = EXPLAIN ENTRY MX7 -24 LX1 12 BX6 X7*X1 REMOVE THIS EXPLAIN ENTRY SA6 A1 REPLACE STACK LE B7,NCM IF NO ENTRY ON STACK, EXIT SX0 B7 ........PS/.........P LX0 -6 S........P/P......... SX2 X0 = PRIMARY IF THERE IS A SECONDARY NZ X2,EXP0 IF THERE IS A SECONDARY SX0 B7 /.........P EXP0 BX2 X7*X0 S........./.......... LX2 6 .........S/.......... SA1 TMSG-1+X0 GET PRIMARY MESSAGE INDEX ZR X1,EXP2 IF NO ENTRY FOR THIS ERROR SA0 X1 SET MESSAGE ADDRESS UX3,B2 X1 GET MESSAGE LENGTH ZR X2,EXP1 IF NO SUB-INDEX AX1 18 ZR X1,EXP1 IF NO SUB-TABLE SB3 X1 SA1 X2+B3 GET SUB-INDEX MESSAGE TABLE ENTRY ZR X1,EXP1 IF NO ENTRY UX3 B2,X1 SET LENGTH SA0 X1 SET ADDRESS EXP1 SX5 B2 SAVE LENGTH MX6 0 WRITEO OUTPUT ISSUES LINE FEED WRITEC X2,EXPA * EXPLANATION OF- SA4 MESSAGE+X0 WRITEC X2,X4 ECHO OFFENDING ERROR MESSAGE WRITEW X2,A0,X5 ISSUE EXPLANATION EQ NCM EXIT * NO EXPLAIN ENTRY FOUND. EXP2 WRITEC OUTPUT,EXPB SA4 MESSAGE+X0 WRITEC X2,X4 EQ NCM EXIT EXPA DATA C* EXPLANATION OF-* EXPB DATA C* NO ENTRY FOUND FOR* TMSG BSSZ 40B SPACE 4 ** EXPLAIN ENTRY DEFINITIONS. EXPP ARG. DATA C* USUALLY MEANS THE USE OF AN EMPTY STRING IN THE* DATA C* FIRST STRING OF A CHANGE OR LOCATE COMMAND.* ENDHELP EXPP BFN. DATA C* FILE NAME WAS NOT OF PROPER FORM OR IT WAS A* DATA C* FILE NAME WHICH IS RESERVED BY XEDIT.* ENDHELP EXPP BTL. DATA C* THE EDIT FILE CONTAINS AT LEAST ONE LINE OF * DATA C* DATA THAT IS NOT IN A FORM XEDIT CAN UNDERSTAND.* ENDHELP EXPP CNV. DATA C* DURING CERTAIN MODES WITHIN XEDIT, SOME COMMANDS* DATA C* ARE DISABLED.* ENDHELP EXPP DEL. DATA C* MISSING STRING DELIMITER IN THE STRING FIELD OF* DATA C* A COMMAND. A DELIMITER IS ASSUMED AFTER THE LAST* DATA C* NONBLANK CHARACTER OF THE COMMAND LINE.* ENDHELP EXPP EMI. DATA C* SPECIFIED IF DEFAULT FILE FUNCTION IS INCORRECT* DATA C* ON SPECIFIED OR DEFAULT FILE.* ENDHELP EXPP EOF. DATA C* AN END OF FILE MARK HAS BEEN READ FROM THE EDIT* DATA C* FILE, AND, UNLESS A DEOF COMMAND WAS BEING* DATA C* PROCESSED, IT HAS BEEN RETAINED.* ENDHELP EXPP EOR. DATA C* AN END OF RECORD MARK HAS BEEN READ FROM THE EDIT* DATA C* FILE, AND, UNLESS A DEOR COMMAND WAS BEING* DATA C* PROCESSED, IT HAS BEEN RETAINED.* ENDHELP EXPP EOI. DATA C* THE EDITOR HAS GONE PAST THE LAST LINE OF THE FILE* DATA C* WHILE TRYING TO COMPLETE PROCESSING OF THE LAST* DATA C* COMMAND. PROCESSING OF THAT COMMAND IS STOPPED AND* DATA C* THE POINTER IS MOVED TO THE TOP OF THE FILE.* ENDHELP EXPP FCP. DATA C* THE SPECIFIED FILE HAS BEEN REWOUND AND RE-COPIED.* DATA C* THIS IS THE DEFAULT ACTION FOR THE END, FILE, AND* DATA C* QUIT COMMANDS IF THE FILE IS EITHER DIRECT ACCESS* DATA C* OR A MAGNETIC TAPE FILE.* ENDHELP EXPP FCR. DATA C* THE SPECIFIED FILE IS EITHER AN EXECUTE OR APPEND* DATA C* ONLY FILE; OR IS EITHER NOT A LOCAL FILE, OR A* DATA C* PERMANENT FILE DEPENDING ON THE SPECIFIED COMMAND* DATA C* OPTION.* ENDHELP EXPP FLC. DATA C* THE SPECIFIED FILE HAS BEEN MADE A LOCAL FILE.* DATA C* FOR THE END, FILE, AND QUIT COMMANDS, THIS* DATA C* FUNCTION IS DEFAULT FOR INDIRECT ACCESS FILES.* ENDHELP EXPP FRP. DATA C* THE PERMANENT FILE COPY HAS BEEN REPLACED.* ENDHELP EXPP FSV. DATA C* A PERMANENT FILE COPY HAS BEEN SAVED.* ENDHELP EXPP ILL. DATA C* USUALLY MEANS A NONNUMERIC CHARACTER IN A NUMERIC* DATA C* FIELD OR EXTRA INFORMATION IN A COMMAND.* ENDHELP EXPP LFM. DATA C+ THE SYSTEM LOCAL FILE PROCESSOR HAS DETECTED AN+ DATA C* ERROR. PLEASE REPORT THE PROBLEM, ALONG WITH AS* DATA C* MUCH INFORMATION AS POSSIBLE REGARDING THIS XEDIT* DATA C* RUN, TO A CONSULTANT.* ENDHELP EXPP LNNF. DATA C* THE SPECIFIED LINE NUMBER COULD NOT BE LOCATED.* ENDHELP EXPP LNTL. DATA C* IN THE ALN, ALNS, OR RLN COMMAND, THE LINE* DATA C* NUMBER BECAME GREATER THAN 99999.* ENDHELP EXPP NSC. DATA C* THE COMMAND IS INCORRECT OR AN IMPROPER SEPARATOR* DATA C* WAS USED AFTER THE COMMAND.* ENDHELP EXPP PFM. DATA C* ERROR IN PERMANENT FILE OPERATION.* ENDHELP EXPP SNF. DATA C* IF A 0 IS USED FOR THE REPEAT COUNT ON ANY STRING* DATA C* SEARCH COMMAND, AND THE STRING IS NOT IN THE* DATA C* CURRENT LINE, XEDIT ISSUES THE ABOVE MESSAGE* DATA C* AND DOES NOT ADVANCE THE POINTER. (ALSO, ANY* DATA C* REMAINING COMMANDS ON A DELIMITED COMMAND* DATA C* LINE ARE IGNORED. IN ADDITION, THE 0 IS USED* DATA C* IF USING THE INPUT MODE ECSAPE CHARACTER.* ENDHELP EXPP STK. DATA C* AN ATTEMPT WAS MADE TO RECURRSIVELY USE AN INPUT* DATA C* SOURCE. AN EXAMPLE OF THIS IS-* DATA C* Y/PRINT/Y-WHERE-* DATA C* IN THE EXAMPLE, THE Y/Z COMMAND ATTEMPTS TO CALL* DATA C* ANOTHER Y/Z COMMAND, WHICH IS INCORRECT.* ENDHELP EXPP TRUNC. DATA C* AS A RESULT OF A COMMAND, THE LINE WHOSE POSITION* DATA C* IS GIVEN HAS BEEN TRUNCATED TO 160 CHARACTERS.* DATA C* THIS ACTION OCCURS AUTOMATICALLY WHENEVER A LINE* DATA C* IS EXTENDED WITHIN XEDIT TO INCLUDE MORE THAN* DATA C* 160 CHARACTERS.* ENDHELP SPACE 4 ** ARGUMENT ERROR SECONDARY EXPLANATIONS. EXPS ARG.,1 F0 CONFLICT IN INPUT MODE DATA C+ WHILE USING THE COMMAND ESCAPE CHARACTER OF+ DATA C+ *INPUT* MODE TO ENTER COMMANDS, THE MOVEMENT OF+ DATA C* THE POINTER IS DISALLOWED. FOR THIS REASON, XEDIT* DATA C* FORBIDS USERS FROM ENTERING ANY REPEAT COUNT ON* DATA C+ ANY COMMANDS (FOR EXAMPLE - THE *LOCATE* OR + DATA C+ *CHANGE* COMMANDS). ALSO VOIDED ARE ANY PREFIX+ DATA C* CHARACTERS WHICH POSITION THE POINTER.* ENDHELP SPACE 4 ** BAD FILE NAME SECONDARY EXPLANATIONS. EXPS BFN.,1 BAD FILE NAME DATA C* THE FILE NAME ENTERED CONTAINS EITHER INCORRECT* DATA C* CHARACTERS, OR IS TOO LONG.* ENDHELP EXPS BFN.,2 NO FILE NAME DATA C* THE COMMAND IS MISSING A REQUIRED FILE NAME.* ENDHELP EXPS BFN.,3 RESERVED FILE NAME DATA C* THE FILE NAME ENTERED IS ONE WHICH IS RESERVED BY* DATA C* XEDIT. A PARTIAL LIST INCLUDES- INPUT, OUTPUT,* DATA C* SCRA, SCRB, ... SCRF, SCRG AND (FOR COPY AND* DATA C* COPYD COMMANDS) THE EDIT FILE NAME.* ENDHELP SPACE 4 ** COMMAND NOT VALID SECONDARY EXPLANATIONS. EXPS CNV.,1 DATA C* WHILE CREATING A FILE UNDER XEDIT, VARIOUS COM-* DATA C* MANDS ARE DISABLED AS THEY ATTEMPT TO REFERENCE* DATA C* OR MODIFY PARTS OF THE FILE WHICH DO NOT EXIST.* DATA C* CREATION MODE IS AUTOMATICALLY EXITED UPON ENTRY* DATA C* OF THE FIRST TEXT LINE (USE THE INSERT OR INPUT* DATA C* COMMANDS).* ENDHELP EXPS CNV.,3 DATA C* WHILE USING THE INPUT MODE COMMAND ESCAPE OPTION,* DATA C* ANY COMMAND WHICH MOVES THE POINTER IS NOT ALLOWED.* DATA C* THE COMMAND SPECIFIED IS THUS INCORRECT.* ENDHELP SPACE 4 ** EMI - FILE FUNCTION INCORRECT SECONDARY EXPLANATIONS. EXPS EMI.,1 DATA C* THE SPECIFIED FILE CANNOT BE UPDATED. THIS CAN* DATA C* RESULT IF THE FILE IS LOCK OR NOT IN WRITE MODE.* ENDHELP EXPS EMI.,2 DATA C+ THE *L* PARAMETER IS INCORRECT ON DIRECT ACCESS+ DATA C* OR MAGNETIC TAPE FILES.* ENDHELP SPACE 4 ** FILE CANNOT BE ACCESSED SECONDARY EXPLANATIONS. * EXPS FCR.,1 DATA C* THE FILE IS AN EXECUTE OR APPEND ONLY FILE THUS* DATA C* IS NOT ACCESSABLE.* ENDHELP EXPS FCR.,2 DATA C* THE FILE IS NOT PRESENTLY LOCAL TO THE JOB. ALSO,* DATA C* WHEN IF THE FILE IS DIRECT ACCESS (AND CURRENTLY* DATA C* ATTACHED) THE FILE CANNOT BE ACCESS FROM THE* DATA C* PERMANENT FILE AREA.* ENDHELP EXPS FCR.,3 DATA C* THE FILE IS NOT OBTAINABLE FROM THE PERMANENT* DATA C* FILE AREA.* ENDHELP SPACE 4 ** PFM SECONDARY EXPLANATIONS. EXPS PFM.,1 (FILE) BUSY. DATA C* DIRECT ACCESS FILE IS ATTACHED ELSEWHERE IN WRITE* DATA C* MODE.* ENDHELP EXPS PFM.,2 (FILE) NOT FOUND. DATA C* SPECIFIED FILE COULD NOT BE FOUND.* ENDHELP EXPS PFM.,4 (FILE) NOT ON MASS STORAGE. DATA C* SPECIFIED FILE DOES NOT RESIDE ON A MASS STORAGE* DATA C* DEVICE.* ENDHELP EXPS PFM.,5 (FILE) ALREADY PERMANENT. DATA C* THERE IS ALREADY A FILE EITHER SAVED OR DEFINED* DATA C* UNDER THE DESIRED NAME. TRY USING THE RENAME* DATA C* PARAMETER.* ENDHELP EXPS PFM.,10 USER ACCESS NOT VALID DATA C* USER IN NOT VALIDATED TO SAVE FILES AND/OR TO* DATA C* ACCESS A REMOVABLE DEVICE.* ENDHELP EXPS PFM.,12 FILE TOO LONG. DATA C* THE SPECIFIED FILE IS TOO LONG TO BE SAVED OR* DATA C* REPLACED.* ENDHELP EXPS PFM.,16 PF UTILITY ACTIVE. DATA C* DUE TO ACTIVITY WITHIN THE SYSTEM, THE SPECIFIED* DATA C* PERMANENT FILE OPERATION CANNOT BE DONE AT THE* DATA C* PRESENT TIME. THE OPERATION SHOULD BE RETRIED* ENDHELP EXPS PFM.,20 CATALOG OVERFLOW - FILES. DATA C* YOU HAVE EXCEEDED YOUR VALIDATED LIMIT FOR THE* DATA C* MAXIMUM NUMBER OF PERMANENT FILES.* ENDHELP EXPS PFM.,21 CATALOG OVERFLOW - SIZE. DATA C* THE CUMULATIVE SIZE OF THE INDIRECT ACCESS FILES* DATA C* IN YOUR CATALOG HAVE EXCEEDED YOUR VALIDATION* DATA C* LIMIT.* ENDHELP EXPS PFM.,23 I/O SEQUENCE ERROR. DATA C* PLEASE NOTIFY A CONSULTANT OF THIS ERROR,* DATA C* ENCLOSING (IF POSSIBLE) A HARD COPY OF YOUR* DATA C* SESSION. PLEASE RETRY YOUR COMMAND.* ENDHELP EXPS PFM.,30 TRACK LIMIT DATA C* PERMANET FILE DEVICE HAS RUN OUT OF TRACKS. PLEASE* DATA C* NOTIFY CONSULTANT AS SOON AS POSSIBLE.* ENDHELP EXPS PFM.,31 FILE LENGTH ERROR DATA C* ERROR IN PERMANENT FILE. NOTIFY CONSULTANT AS SOON* DATA C* AS POSSIBLE. PLEASE DO NOT USE THE SPECIFIED FILE.* ENDHELP EXPS PFM.,33 DIRECT ACCESS FILE ERROR DATA C* ERROR IN SYSTEM DIRECT ACCESS FILE DEFINITION.* DATA C* PLEASE NOTIFY CONSULTANT AS SOON AS POSSIBLE.* ENDHELP EXPS PFM.,34 REPLACE ERROR DATA C* NOTIFY CONSULTANT.* ENDHELP EXPS PFM.,35 PFM ABORTED DATA C* PERMANENT FILE MANAGER ABORTED. RETRY OPERATION.* ENDHELP HELP SPACE 4,30 ** HELP - PROCESS XEDIT HELP COMMAND. * * ENTRY (IN - IN+80) = COMMAND LINE. * (LSEP) = SUBSCRIPT OF SEPARATOR. * * EXIT HELP ENTRY LISTED. * * USES A - 1, 2, 3, 5, 6, 7. * X - ALL. * B - 2, 3. * * CALLS HTI. * * MACROS CSET, GET, OPEN, READ, READW, RECALL, REWIND, * STATUS, WRITEC, WRITER, WRITEW. * * NOTES HELP PICKS THE COMMAND OFF THE ARGUMENT OF THE HELP * COMMAND. IF NO COMMAND IS SPECIFIED, A LISTING OF ALL XEDIT * COMMANDS AND COMMAND ABBREVIATIONS AND PREFIX CHARACTERS IS * GIVEN. IF A COMMAND OR PREFIX CHARACTER IS SPECIFIED ON THE * HELP COMMAND, IT IS COMPARED WITH THOSE IN THE XEDIT COMMAND * TABLE AND THE UNABBREVIATED FORM IS SELECTED. XEDITI FILE * IS THEN GOTTEN FROM THE LIBRARY IF IT IS NOT ALREADY LOCAL. * THE FILE IS THEN SEARCHED FOR A MATCHING COMMAND AND THE * COMMAND ENTRY IS PRINTED OUT. NOTE - PAGEINATION LINES ARE * FLAGGED WITH A *>*. THE LINE BEFORE EACH COMMAND ENTRY IS * FLAGGED WITH A *-* IN COLUMN 35. HELP SA1 NUMS RESTORE A5 POINTER SA2 A1+B1 MX7 1 ZR X1,HLP21 IF NO PARAMETER SA2 X2 SA5 X1 NG X5,HLP21 IF NO PARAMETER BX6 X7+X2 SA6 A2 SA1 A5+B1 CHECK NEXT CHARACTER PL X1,HLP0 IF NOT END OF LINE MX1 0 CLEAR CHARACTER HLP0 SX4 X5-1R0 SX3 X5-1R+ SX2 X5 MOVE CHARACTER LX2 6 BX2 X2+X1 SB2 X2 BX3 -X4*X3 NEG. IF NUMBER SA2 HLPA NG X3,HLP11 IF A NUMBER SB3 X2 HLP1 EQ B3,B2,HLP12 IF SPECIAL CHARACTER SA2 A2+B1 SB3 X2 NZ X2,HLP1 IF NOT END OF LIST MX6 1 PREPARE TO PARSE COMMAND MX4 26 MX3 -6 LX4 -5 PREPARE CHARACTER MASK HLP2 BX0 -X3*X5 REMOVE ASCII SB3 X0+4 LX1 B3,X4 SHIFT MASK PL X1,HLP4 IF NOT A-Z BX1 X3*X5 ZR X1,HLP3 IF NOT ASCII CHARACTER SX1 X1-7600B NZ X1,HLP4 IF NOT LOWER CASE A-Z * MERGE CHARACTERS. HLP3 LX6 6 BX6 X6+X0 SA5 A5+1 PL X5,HLP2 IF MORE CHARACTERS * CHECK FOR LEGAL PARAMETER. HLP4 BX1 -X3*X6 ISOLATE LAST CHARACTER OF COMMAND MX0 1 SX4 X1-1RW ZR X4,HLP5 IF *W* POSTFIX SX4 X1-1RA NZ X4,HLP6 IF NOT *A* POSTFIX HLP5 BX6 X3*X6 REMOVE POSTFIX HLP6 LX6 6 PL X6,HLP6 IF NOT LEFT JUSTIFIED BX6 -X0*X6 REMOVE POSITION BIT SA1 JUMP SEARCH COMMAND TABLE SA6 JUMPX SET NAME AT END HLP7 BX3 X1-X6 SA1 A1+B1 NZ X3,HLP7 IF NOT A MATCH NG X3,HLP7 IF COMPARED A INFORMATION WORD NG X1,HLP9 IF PRESENTLY ON AN INFORMATION WORD HLP8 BX6 X1 SA1 A1+B1 PL X1,HLP8 IF NOT AT AN INFORMATION WORD HLP9 SX1 X1 ZR X1,HLP10 IF COMMAND NOT IN TABLE EQ HLP13 PROCESS COMMAND HLP10 SA6 HLPF WRITEC OUTPUT,HLPE EQ NCM CONTINUE * PROCESS NUMERIC PARAMETER. HLP11 SX6 1R$ LX6 -6 EQ HLP13 PROCESS COMMAND * PROCESS SPECIAL COMMAND. HLP12 MX3 42 BX6 X2*X3 ISOLATE SEARCH PATTERN: EQ HLP13 PROCESS COMMAND. HLP13 SA1 NUMS+1 SA2 X1 SX7 X2 LX2 1 NG X2,HLP13.1 IF REAL EOL SA7 A2 HLP13.1 SA2 HLPK SA6 HLPH COMMAND TO SEARCH FOR SA6 A2 NZ X2,HLP14 IF XEDITI ALREADY GOTTEN STATUS XEDITI SA1 XEDITI SX3 7776B BX3 X3*X1 NZ X3,HLP14 IF FILE GOTTEN GET XEDITI,,,,,,IP HLP14 OPEN XEDITI,READNR,RECALL REWIND XEDITI,R READ XEDITI SA5 HLPH COMMAND TO SEARCH FOR LX6 X5,B1 SB2 B1+B1 BX7 X6+X5 LX4 X7,B2 SA3 HLPI =10HHHHHHHHHHH BX6 X4+X7 LX7 -2 BX4 X6+X7 BX3 X3*X4 BIT 3 OF CHAR SET IF CHAR NOT ZERO AX7 X3,B1 BX0 X5 MASK BX4 X7+X3 LX7 X4,B2 BX6 X4+X7 AX7 X4,B2 BX0 X6+X7 COMMAND MASK HLP15 MX6 0 SA6 E.SCR+3 READC XEDITI,E.SCR,8 ZR X1,HLP16 IF NO EOF/EOR RECALL X2 WRITEC OUTPUT,HLPG EQ NCM EXIT HLP16 SA1 HLPJ ZR X1,HLP17 IF HELP ENTRY EXPECTED SA1 E.SCR+3 SA3 =6L - BX6 X1-X3 LX6 6*6 SHIFT CHARACTER AFTER - TO CHARACTER 9 AX6 6 PROCESS CBR/CCR DIFFERENCE SA6 HLPJ SET HELP ENTRY EXPECTED IF - IN COL 35 EQ HLP15 READ NEXT LINE HLP17 SA1 E.SCR ZR X1,HLP15 IF BLANK LINE BX2 X1 LX2 2*6 SX2 X2-2R ZR X2,HLP15 IF LINE BEGINS WITH 2 BLANKS AX1 54 SX6 X1-1R>-777700B ZR X6,HLP15 IF PAGINATION SA6 HLPJ CLEAR HELP ENTRY EXPECTED FLAG SA1 A1 BX3 X1-X5 CHECK FOR COMMAND MATCH BX6 X0*X3 NZ X6,HLP15 IF NO MATCH BX7 X0 AX7 6 BX7 -X0*X7 MASK FOR NEXT CHARACTER * NO COMMAND IS .GE. 9 CHARACTERS IN LENGTH. SA2 =10H BX2 X1-X2 COMPARE WITH BLANK BX3 X7*X1 BX2 X7*X2 ZR X3,HLP17.1 IF NEXT CHARACTER IS 00B NZ X2,HLP15 IF NEXT CHARACTOR IS NOT BLANK (55B) HLP17.1 SA1 CSMR PL X1,HLP18 IF 63 CHARACTER SET SA2 BATCH NZ X2,HLP18 IF BATCH MODE SA1 AS ZR X1,HLP18 IF ALREADY IN NORMAL CHARACTER SET MODE CSET NORMAL * A MATCH IS FOUND IN THE XEDIT HELP FILE. LIST ENTRY. HLP18 WRITEC OUTPUT,E.SCR RJ HTI CHECK FOR INTERRUPT HLP19 READC XEDITI,E.SCR NZ X1,HLP20 IF EOF/EOR SA1 E.SCR+3 SA2 =6L - BX3 X1-X2 LX3 6*6 AX3 6 REMOVE CHARACTOR 36 ZR X3,HLP20 IF END OF ENTRY SA1 E.SCR AX1 54 SB2 X1-1R>-777700B ZR B2,HLP19 IF PAGEINATION EQ HLP18 WRITE NEXT LINE HLP20 RECALL XEDITI EQ HLP23 EXIT HLP21 SA1 CSMR PL X1,HLP22 IF 63 CHARACTER SET SA2 BATCH NZ X2,HLP22 IF BATCH MODE SA1 AS ZR X1,HLP22 IF ALREADY IN NORMAL MODE CSET NORMAL HLP22 BSS 0 WRITEW OUTPUT,HLPC,HLPD HLP23 RJ HTI CHECK FOR INTERRUPT SA1 CSMR PL X1,NCM IF 63 CHARACTER SET, EXIT SA2 BATCH NZ X2,NCM IF IN BATCH MODE SA1 AS ZR X1,NCM IF TERMINAL WAS IN NORMAL MODE WRITER OUTPUT,RECALL CSET ASCII EQ NCM RETURN HLPA BSS 0 HELPSP HERE ASSEMBLY SPECIAL FORMS DATA 0 D OPSYN DATA HLPC BSS 0 D C*THE FOLLOWING IS A LIST OF ALL XEDIT COMMANDS AND IN BRACKETS,* D C*THEIR ABBREVIATIONS.* D C* * MHELP (.) MHELP (-) HELP HERE DATA C$"MH1"$ ASSEMBLE LAST LINE D C* * D C*ANY COMMAND MAY BE PREFIXED BY ANY NUMBER OR COMBINATION OF * D 30HTHE PREFIX CHARACTERS - *X*, * VFD 30/5H/*, * CHAR (VFD 6/0),UA. VFD 24/4H*, O DATA C-R *+*.- D C* * D C*A COMPLETE WRITEUP ON XEDIT IS AVAILABLE ON THE LIBRARY FILE* VFD 30/5H#XEDI CHAR (VFD 12/0),FN. VFD 18/3H.# D C* * D C*INFORMATION FOR A SPECIFIC COMMAND OR PREFIX CHARACTER MAY BE* D C*OBTAINED BY ENTERING THE COMMAND -* VFD 24/4H CHAR (VFD 6/0),QM. CHAR (VFD 6/0),QM. VFD 24/4H HEL DATA 10HP,CMD - VFD 42/7HOR- CHAR (VFD 6/0),QM. CHAR (VFD 6/0),QM. VFD 6/1R DATA C*H,CMD* D C*WHERE CMD IS THE PREFIX OR POSTFIX CHARACTER OR THE COMMAND* D C*TO BE EXPLAINED.* HLPD EQU *-HLPC HLPE DATA H*COMMAND NOT FOUND -* HLPF DATA C*COMMAND * HLPG DATA H*NO HELP ENTRY FOUND FOR -* HLPH DATA C*COMMAND * HLPI DATA 10HHHHHHHHHHH HLPJ DATA 0 HELP ENTRY EXPECTED FLAG HLPK DATA 0 IF ZERO, GET XEDITI FILE SPACE 4,20 ** HTI - *HELP* COMMAND TELEX INTERRUPT PROCESSOR. * * ENTRY NONE. * * EXIT RETURNS TO CALLER IF NO TLX INTERRUPT SENSED, * ELSE REWINDS THE OUTPUT BUFFER, RESETS THE * CHARACTER SET AND EXITS TO *CER1* TO POP THE * INPUT STACK. * * USES A - 1, 2, 6. * X - 1, 2, 6. * * MACROS CSET, DISTC, RECALL. HTI PS ENTRY/EXIT. MX6 0 SA2 TLX ZR X2,HTI IF NO INTERRUPT, RETURN SA6 A2 DISTC ON,A2 RECALL OUTPUT SA1 =XOUTPUT+1 MX6 -18 BX6 -X6*X1 SA6 A1+B1 IN=OUT=FIRST SA6 A6+B1 SA2 BATCH NZ X2,CER1 IF IN BATCH SA2 AS ZR X2,CER1 IF ALREADY IN NORMAL CHAR SET MODE CSET RESTORE EQ CER1 EXIT, POP INPUT STACK XEDITI BSS 0 CHAR= 24D,XEDI,FN. -TI- OR -64- XEDI FILEB XBUF,1001B,FET=12,USN=LIBRARY,EPR USE BUFFERS XBUFL EQU 1001B XBUF EQU * XEDITI BUFFER LWA EQU XBUF+XBUFL+17B USE SETCHAR DATA 0 SET END OF CHARACTER PRESET USE * HERE ASSEMBLE THE DEFERRED EXPLAIN ENTRY DATA OVLDEF 2,(LOW USAGE COMMANDS) TITLE LOCAL FETS AND STORAGE. ** FETS. RFET FILEC RBUF,BUFRL,EPR,FET=7 TITLE COMMAND PROCESSORS. CPY SPACE 4,15 ** CPY - COPY/COPYD PROCESSORS. * * ENTRY (COPY) = NAME OF LAST COPY FILE. * * EXIT TO *NCM*, COPY COMPLETE. * * USES A - 0, 1, 2, 3, 4, 5, 6. * X - ALL. * * CALLS LOC, RDF, VFY, WTF. * * MACROS REWIND, WRITEC, WRITER. CPY11 MX6 0 SET NOMOD WHEN USING COPYD SA6 NOMOD CPY SA5 IFN SA3 ISFN SB2 BFN.*100B+3 * RESERVED FILE NAME * SA2 COPY BX3 X5-X3 ZR X3,CER IF COPY TO EDIT FILE BX0 X2-X5 =0 IF COPY TO SAME FILE LX6 X5 SX7 B1 SA6 A2 SAVE COPY FILE NAME BX5 X5+X7 MERGE COMPLETE BIT ZR X0,CPY1 IF CONSECUTIVE COPIES ZR X2,CPY1 IF NO PREVIOUS COPY FILE WRITER FTD,RECALL REWIND FTD,RECALL CPY1 SA0 FTD SET FET ADDRESS SA1 GFNB * DETERMINE IF THE FILE NAME IS A SPECIAL ONE. CPY2 BX2 X1-X5 AX2 17 ZR X2,CPY10 IF SPECIAL NAME SA1 A1+B1 NZ X1,CPY2 IF MORE IN LIST BX6 X5 ZR X0,CPY3 IF CONSECUTIVE COPIES SA6 FTD PUT NAME INTO FET REWIND A6,RECALL * PREPARE FOR A COPY OPERATION. CPY3 SA1 INDEX SX5 X1-.COPY =0 IF NOT TO DELETE CPY4 RJ LOC ATTEMPT TO LOCATE LINE ZR B5,CPY8 IF NOT FOUND SX1 A0-OUTPUT ZR X1,CPY5 IF OUTPUT (IF VERIFY = DUPLICATE LINES) RJ VRY VERIFY LOCATE CPY5 WRITEC A0,E.LINE PLACE LINE SA1 NUMS SX6 B1 IX6 X1-X6 AX1 1 ZR X1,CPY9 IF COUNT FINISHED SA6 A1 CPY6 NZ X5,CPY7 IF *COPYD* COMMAND RJ WTF CPY7 RJ RDF EQ CPY4 PROCESS NEXT LINE * LINE IS NOT FOUND. CPY8 SA1 NUMS NG X1,LCT4 IF STRING NOT FOUND WRITEC A0,E.LINE EQ CPY6 COPY LINE * CLEANUP FROM COMMAND. CPY9 ZR X5,NCM IF NOT COPYD RJ RDF CREAM EXISTING LINE EQ NCM EXIT * PROCESS SPECIAL FILES. CPY10 SA3 A1+CPYA-GFNB SA4 X3 GET ACTUAL NAME TO USE AX3 18 BX6 X4 SA0 X3 SET FET TO USE SA6 FTD EQ CPY3 PERFORM COPY * TABLE OF SPECIAL FILE OPERATIONS. * VFD 42/FET ADDR,18/FILE NAME CPYA VFD 42/FTD,18/=0 *NULL* FILE VFD 42/OUTPUT,18/=0 *OUTPUT* FILE A SET *-CPYA BSSZ GFNBL-A SCRATCH REST (WILL EXPLODE IF USED) DLB SPACE 4,10 ** DLB - DELETE LEADING BLANKS. * * ENTRY (NUMS) = NUMBER OF LINES TO PROCESS. * * EXIT TO *NCM*. * * USES A - 1, 6, 7. * X - 1, 5, 6, 7. * B - 2, 3. * * CALLS RDF, SAC, WTF. DLB SA1 NUMS SX6 B1 IX6 X1-X6 + SA6 A1 MX5 -0 SET NO MODIFICATIONS RJ SAC SET ASCII PROCESSING DLB1 SA1 E.STR-1 SB3 -1R SX7 -1 RESET CHARACTER COUNTER DLB2 SA1 A1+B1 SEARCH FOR FIRST NON-BLANK SB2 B3+X1 NG X1,DLB6 IF END OF LINE (ALL BLANKS) ZR B2,DLB2 IF CHARACTER IS A BLANK SX6 A1-E.STR ZR X6,DLB4 IF NO LEADING BLANKS DLB3 BX6 X1 REPACK CHARACTERS SX7 X7+B1 INCREMENT CHARACTER COUNT SA6 E.STR+X7 SA1 A1+B1 PL X6,DLB3 IF NOT AT END OF LINE SX6 B1 MX5 0 SET MODIFICATIONS MADE TO FILE SA7 E.STR-1 SET NUMBER OF CHARACTERS IN LINE SA6 E.LMOD SET MODIFICATION MADE TO LINE * CHECK FOR MORE LINES TO PROCESS. DLB4 SA1 NUMS SX6 B1+ IX6 X1-X6 SA6 A1 NG X6,DLB5 IF FINISHED RJ WTF RJ RDF EQ DLB1 PROCESS NEXT LINE DLB5 SA1 NOMOD UPDATE MODIFICATION STATUS BX6 X5*X1 SA6 A1 EQ NCM EXIT * PROCESS TOTALLY BLANK LINE. DLB6 MX5 0 SET MODIFICATION TO FILE RJ RDF READ NEXT LINE SA1 NUMS SX6 B1+ IX6 X1-X6 NG X6,DLB5 IF FINISHED SA6 A1 EQ DLB1 PROCESS NEXT LINE LTB SPACE 4,15 ** LTB - LIST TAB SETTINGS. * * ENTRY (TABS) = TAB SETTINGS. * * EXIT TO *NCM*. * * USES A - 1, 2, 5, 6, 7. * X - 1, 2, 3, 4, 5, 6, 7. * B - 4, 5, 6, 7. * * CALLS CDD. * * MACROS WRITEC. LTB BSS 0 SB1 1 SA5 TABS SB6 LTBA+1 SB7 B0 LTB1 SA1 A5+B7 PUT CURRENT TABS INTO MESSAGE MX5 0 ZR X1,LTB2 IF END OF TABS RJ CDD CONSTRUCT MESSAGE LX4 60-6 BX5 X4 SB7 B7+B1 SA1 A5+B7 ZR X1,LTB2 IF END OF TABS RJ CDD SB4 6*4 SB4 B4-B2 LX6 B4,X6 MX7 6*6 BX5 X7*X5 BX6 -X7*X6 BX6 X6+X5 SA6 B6 SB6 B6+B1 SB5 8 SB7 B7+B1 LT B7,B5,LTB1 IF NOT FINISHED WITH TABS MX5 0 LTB2 BX7 X5 SA7 B6 MX7 0 SA7 B6+B1 PUT EOL AFTER LAST TAB SA1 TABCHAR PUT CURRENT TAB CHARACTER INTO MESSAGE PL X1,LTB3 IF TAB CHARACTER IS DEFINED SX1 1R LTB3 LX1 7*6 MX6 6 SA2 LTBA LX6 7*6+6 BX7 -X6*X2 PUT LOWER PART OF CHARACTER BX7 X7+X1 LX6 6 BX3 X6*X1 NZ X3,LTB4 IF NOT ASCII CHARACTER SX1 1R LX1 8*6 POSITION LTB4 BX7 -X6*X7 BX7 X7+X1 SA7 A2 WRITEC OUTPUT,LTBA EQ NCM EXIT LTBA DATA 10H TABS BSSZ NTABS/2+2 NBL SPACE 4 ** NBL - CHANGE ERROR MESSAGES TO CONTAIN NO BELLS. * * ENTRY NONE. * * EXIT TO *NCM*. * * USES A - 1. * X - 1. * * MACROS MOVE. * * NOTES THIS COMMAND SWITCHES THE ERROR MESSAGES ISSUED TO A * TIME SHARING TERMINAL TO THOSE CONTAINING NO BELLS. * THIS COMMAND FROM A BATCH JOB FUNCTIONS AS A NO-OP. NBL SA1 BATCH NZ X1,NCM IF BATCH ORIGIN MOVE NBLAL,NBLA,MESSAGE+1 SWITCH MESSAGES EQ NCM EXIT NBLA BSS 0 TABLE OF ERROR MESSAGES ERROVL HERE NBLAL EQU *-NBLA OCT SPACE 4,20 ** OCT - PROCESS OCTCHANGE COMMAND. * * ENTRY (NUMS) = FWA OF PARAMETERS. * (NUMS+1) = LWA OF PARAMETERS. * * EXIT TO *NCM*, IF CHANGE COMPLETE. * TO *CER*, IF ARGUMENT ERROR. * TO *LCT4*, IF STRING NOT FOUND. * * USES A - 0, 1, 5, 6, 7. * X - ALL. * B - 4, 6, 7. * * CALLS ASF, CHS, RCP, RDF, RTA, RTR, SCP, VAL, * VRY, WTF. * * MACROS MOVE. * * NOTES *OCT* PROCESSES ONLY A SUBSET OF CHANGE OPTIONS. OCT BX7 X7-X7 CLEAR CELLS MX6 0 SA6 P1LP SA7 P2RP SA6 A6+B1 SA7 A7+B1 SA6 A6+B1 SA7 A7+B1 RJ SCP SET COMMAND PAREMETERS ZR X1,OCT12 IF NO PARAMETERS SX6 D.STR+1 SB6 B0 SET FIRST PASS MX1 1 SET POSITION SA7 D.STR SET FWA OF CREATED STRING -1 SA6 P1LP SET FIRST STRING POINTER BX7 X7-X7 CLEAR ASSEMBLY * CONVERT OCTAL DIGITS. OCT1 NG X5,OCT2 IF END OF PARAMETERS/LINE SX4 X5-1R0 SX3 X5-1R7-1 LX7 3 BX3 -X4*X3 NEGATIVE IF OCTAL NUMBER PL X3,OCT2 IF NOT A NUMBER BX7 X7+X4 MERGE SA5 A5+B1 LX1 30 UPDATE POSITION PL X1,OCT1 IF ON FIRST POSITION SA7 A7+B1 SAVE ASSEMBLY BX7 X7-X7 EQ OCT1 LOOP OCT2 PL X1,OCT12 IF ON SECOND HALF (ERROR) SX6 A7+B1 GET LWA+1 FOR STRING SA6 A6+B1 SAVE ADDRESS * SKIP TRAILING BLANKS/ONE COMMA. OCT3 SB4 X5-1R ZR B4,OCT4 IF BLANK NE B4,B1,OCT5 IF NOT COMMA NZ X7,OCT5 IF NOT FIRST COMMA OCT4 SX7 B4+X7 UPDATE COMMA STATUS SA5 A5+B1 EQ OCT3 PROCESS NEXT CHARACTER * CHECK WHICH FIELD. OCT5 BX7 X7-X7 RESET ASSEMBLY SB6 B6+B1 NE B6,B1,OCT6 IF ON SECOND FIELD SX6 A7+B1 SA6 P3LP SET SECOND POINTER EQ OCT1 PARSE SECOND STRING OCT6 RJ VAL GET REPETITION COUNT SA6 NUMS SAVE COUNT PL X5,OCT12 IF NOT END OF COMMAND RJ ASF GET STRING PARAMETERS NZ B2,OCT12 IF ERROR IN ANALYSIS RJ RCP RESET COMMAND PARAMETERS SX6 M.CODED SA6 E.NMODE SET BACK TO CODED * BEGIN TO OCTCHANGE. OCT7 SB7 9 SA1 E.LINE BREAK LINE INTO 6 BIT PARTS MX3 -12 SX6 B1 SET SOMETHING IN X6 MX2 -6 BX4 -X3*X1 GET END OF LINE BYTE SA6 E.STR-1 SA0 OCBUF SET FWA OF SCRATCH BUFFER OCT8 LX1 6 BX6 -X2*X1 SB7 B7-B1 SA6 A6+B1 PL B7,OCT8 IF MORE IN WORD ZR X4,OCT9 IF END OF LINE SB7 9 RESET CHARACTER COUNT SA1 A1+B1 BX4 -X3*X1 EQ OCT8 BREAK UP NEXT WORD OCT9 SA1 A6-B1 MX6 2 OCT9.1 SA1 A1-B1 ZR X1,OCT9.1 IF LAST NON-BLANK NOT FOUND SA6 A1+B1 SX7 A6-E.STR SET NUMBER OF CHARACTERS IN LINE SA7 E.STR-1 SX0 OCBUF+320D SET LWA+1 OF BUFFER RJ CHS CHANGE STRING(S) ZR B5,OCT13 IF STRING NOT FOUND * COPY NEW LINE BACK INTO *E.STR*. SA1 OCBUF MX7 0 SA6 E.STR-1 SA7 NOMOD SET MODIFICATIONS MADE OCT10 BX6 X1 SA1 A1+B1 SA6 A6+1 PL X6,OCT10 IF MORE SB6 E.STR SB7 E.STR REPACK TO SAME (RTA DOES NOT CHECK LENGTH) RJ RTA REPACK LINE SB7 E.STR RJ RTB TRIM LINE MOVE 33D,E.STR,E.LINE RJ VRY SA1 NUMS SX6 B1 IX6 X1-X6 AX1 1 ZR X1,NCM IF CHANGE COMPLETE, EXIT SA6 A1 OCT11 RJ WTF RJ RDF ADVANCE TO NEXT EQ OCT7 PROCESS NEXT OCTCHANGE OCT12 SB2 ARG. RJ RCP RESET END OF LINE EQ CER PROCESS ERROR * PROCESS STRING NOT FOUND. OCT13 SA1 NUMS PL X1,OCT11 IF NOT 0 OPTION EQ LCT4 EXIT, STRING NOT FOUND PBL SPACE 4,15 ** PBL - PROCESS BAD LINE COMMANDS. * * ENTRY (X1) = COMMAND DESCRIPTOR WORD. MODIFIER FIELD IS - * -1 FOR DELETE BAD LINE (DBADL). * +1 FOR FIND BAD LINE (FBADL). * (NUMS) = NUMBER OF LINES TO PROCESS. * * USES A - 1, 2, 6. * X - 1, 2, 3, 4, 5, 6. * * CALLS RDF, SCD, VRY, WTF. * PBL AX1 18 SX5 X1 X5 = COMMAND TYPE RJ SCD SET CODED LINE PBL1 SA1 E.LINE MX2 -6 LX1 6 BX3 -X2*X1 GET FIRST CHARACTER SX4 X3-1R9-1 NEGATIVE, IF OK SX3 X3-1R0 POSITIVE, IF OK BX3 -X3*X4 NEGATIVE, IF OK NG X3,PBL3 IF LINE NUMBER AT START RJ VRY PL X5,PBL2 IF FBADL COMMAND RJ RDF CREAM EXISTING LINE MX6 0 SET MODIFICATIONS MADE SA6 NOMOD PBL2 SA1 NUMS SX6 B1+ IX6 X1-X6 AX1 1 ZR X1,NCM IF FINISHED, EXIT SA6 A1+ NG X5,PBL1 IF DBADL COMMAND PBL3 RJ WTF RJ RDF EQ PBL1 PROCESS FBADL PLN SPACE 4,20 ** PLN - PROCESS LINE NUMBER COMMANDS. * * ENTRY (X1) = COMMAND DESCRIPTOR WORD. * COMMAND MODIFIER (BITS 35-18) CONTAINS THE FUNCTION. * =-2, ADDLNS. * =-1, ADDLN. * = 0, DELETELN. * = 1, REPLACELN. * EXIT TO *CER*, IF ERROR. * * USES A - 1, 2, 3, 6, 7. * X - ALL. * B - 2, 5, 6, 7. * * CALLS CDD, RDF, TOP, WTF. PLN AX1 18 SX5 X1 SX7 30 DEFAULT BIT COUNT SA7 PLNB MX6 30 DEFAULT CHARACTER SIZE SB2 X1+B1 PL B2,PLN0 IF NOT ADDLNS MX6 36 LENGTHEN CHARACTER MASK PLN0 SA6 PLNA RJ TOP REWIND FILES SA1 NUMS MX7 0 BX6 X1 SA2 A1+B1 NZ X6,PLN0.1 IF STARTING LINE NUMBER NOT ZERO SX6 B1 SET TO DEFAULT PLN0.1 SA7 NOMOD SET MODIFICATIONS FLAG SA6 A1+ BX7 X2 NZ X7,PLN0.2 IF STEP IS NOT ZERO SX7 B1 PLN0.2 SA7 A2 NG X5,PLN6 IF NOT TO DELETE LINE NUMBER * REMOVE LINE NUMBER. PLN1 SA1 E.LINE REMOVE LINE NUMBERS SA2 =40404040404040404040B BX3 X2*X1 4X IF BIT 5 IS SET SB5 60-5 LX4 B5,X3 000001 IF BIT 5 WAS SET IX4 X3-X4 011111 IF BIT 5 WAS SET BX4 X4+X3 111111 IF BIT 5 WAS SET SA3 =05050505050505050505B BX6 X4-X1 COMPLEMENT CHARS .GE. 40B IX6 X6+X3 1XXXXX IF A NUMBER BX3 X2*X6 100000 IF A NUMBER LX4 B5,X3 000001 IF A NUMBER IX4 X3-X4 011111 IF A NUMBER BX4 X4+X3 111111 IF A NUMBER MX6 1 PL X4,PLN9 IF NO LINE NUMBER PLN2 AX6 6 EXTEND MASK BX7 -X4*X6 ZR X6,PLN3 IF ALL WORD IS NUMBERS ZR X7,PLN2 IF NOT FINISHED WITH MASK PLN3 LX4 B1,X6 MASK OFF EXTRA BIT BX4 X6*X4 CX0 X4 SB7 X0 SHIFT TO LEFT JUSTIFY WORD MX3 -12 END OF LINE CHECKER BX0 -X3*X1 0, IF THIS IS LAST WORD IN LINE BX6 -X4*X1 REMOVE LINE NUMBER LX6 B7 LEFT JUSTIFY REMAINING LX4 B7 POSITION MASK PLN4 ZR X0,PLN5 IF LAST WORD OF LINE SA1 A1+B1 BX0 -X3*X1 LX1 B7 BX2 X4*X1 IX7 X2+X6 BX6 -X4*X1 SA7 A1-B1 EQ PLN4 PROCESS NEXT WORD IN LINE PLN5 SA6 A1+ PLN6 ZR X5,PLN9 IF NOT ADDING LINE NUMBERS SA1 NUMS GET BASE SA2 A1+B1 INCREMENT IX6 X1+X2 SA6 A1+ RJ CDD SA3 PLNB SA2 PLNA SB7 X3+ GE B7,B2,PLN6.2 IF LINE NUMBER FITS WITHIN FIELD PLN6.1 ZR X2,PLN10 IF MASK ALREADY MAXIMUM SIZE SB7 B7+6 INCREMENT FIELD SIZE SX7 B7 SA7 A3 AX2 6 EXTEND MASK BX7 X2 SA7 A2+ LT B7,B2,PLN6.1 IF STILL LARGER THAN FIELD PLN6.2 SA3 =66666666B BLANK .EOR. 0000 BX3 -X2*X3 TRIM MASK TO FIELD SIZE LX3 B2 JUSTIFY MASK CX4 X2 DETERMINE SIZE SB6 E.LINE SET FWA BX6 X6-X3 SB5 B7-60D SB7 X4-60D SA1 B6+ GET FIRST WORD AX6 B5 SB5 B6+33D SET LWA+1 MX3 -12 END OF LINE BYTE MASK BX6 X2*X6 REMOVE EXCESS PLN7 BX4 -X3*X1 AX1 B7 BX7 -X2*X1 IX7 X7+X6 BX6 X2*X1 SA1 B6+B1 SA7 B6 SB6 B6+B1 ZR X4,PLN8 IF END OF LINE FOUND LT B6,B5,PLN7 IF NOT END OF BUFFER PLN8 SA6 B6+ PLN9 RJ WTF STEP TO NEXT LINE RJ RDF PL X5,PLN1 IF TO DELETE LINE NUMBERS EQ PLN6 ADD NEW LINE NUMBERS PLN10 BX7 X7-X7 RESTORE FILE MX6 -1 SET NO MODS SA7 IWHERE SA6 NOMOD RJ TOP SB2 LNTL. LINE NUMBER TOO LARGE EQ CER EXIT PLNA DATA 0 MASK STORAGE PLNB DATA 0 FIELD SIZE STORAGE RDP SPACE 4,20 ** RDP - READ/READP PROCESSOR. * * ENTRY (NUMS) = FWA OF PARAMETERS. * (NUMS+1) = LWA OF PARAMETERS. * * EXIT TO *NCM*. * * USES A - 0, 1, 2, 3, 4, 6, 7. * X - 0, 1, 2, 3, 4, 6, 7. * B - 2, 5, 6, 7. * * CALLS GAF, GFN, MPR, RCP, RTB, SCP, WTF. * * MACROS FERROR, READ, READC, RECALL, RETURN, REWIND, * STATUS, WRITER. * * NOTES READ/READP READS ALTERNATE FILES INTO EDIT FILE. RDP SA4 INDEX SA0 X4-.READP RJ SCP SET COMMAND PARAMETERS SB2 BFN.*100B+2 NO FILE NAME ZR X1,CER IF NO PARAMETERS MX6 0 SA6 NOMOD SET MODIFICATIONS MADE * GET NEXT FILE NAME AND CONTINUE. RDP1 RJ GFN SB5 B6-BFN.*100B-2 SA3 COPY ZR B5,RDP12 IF ENCOUNTERED END OF LIST BX7 X3-X6 =7 IF USING COPY FILE BX4 X6 NZ X1,RDP11 IF ERROR IN FILE NAME SA6 IFN SAVE NAME SA2 E.IN BX2 X2-X6 AX2 18 ZR X2,RDP13 IF WANT TO READ CURRENT EDIT FILE NZ X7,RDP2 IF NOT READING COPY FILE SA7 A3 CLEAR COPY FILE NAME WRITER FTD,RECALL RDP2 SB2 A0 NZ B2,RDP3 IF FILES ARE LOCAL SA4 =0LSCRF RJ GAF GET OR ATTACH FILE NZ X6,RDP10 IF FILE NOT OBTAINED SA4 =0LSCRF * FILE OBTAINED, CHECK READ ACCESS. * (X4) = LOCAL FILE NAME. RDP3 MX6 0 SX7 B1 SA6 SFET+5 CLEAR FNT/FST INFORMATION BX7 X7+X4 SA6 A6+B1 SA7 RFET SA7 SFET STATUS A7,P SB6 FCR.*100B+2 SA1 SFET+5 ZR X1,RDP10 IF FILE NOT FOUND SX2 240000B SB6 FCR.*100B+1 BX2 X2*X1 NZ X2,RDP10 IF NOT ALLOWED TO READ FILE REWIND RFET,RECALL RDP4 READ RFET RDP5 RECALL RFET RDP6 SA1 RFET+2 SEE IF ANY MORE DATA ON FILE SA2 A1+B1 BX1 X1-X2 NZ X1,RDP7 IF THERE IS DATA ON FILE SA1 RFET LX1 59-0 PL X1,RDP5 IF FET BUSY LX1 0-4 PL X1,RDP4 IF NOT END OF SOMETHING LX1 4-3 NG X1,RDP9 IF NOT EOR ON FILE READ RFET,RECALL SA1 RFET+2 LOOK AHEAD FOR NEXT NON-NULL RECORD SA2 A1+B1 BX1 X1-X2 ZR X1,RDP9 IF EMPTY RECORD/FILE OR EOI FOUND RJ WTF WRITER E.OUT,RECALL EQ RDP8 READ LINE RDP7 RJ WTF RDP8 READC RFET,E.LINE,33D READ NEXT LINE NZ X1,BTL IF BAD TEXT LINE FOUND SB7 E.LINE RJ RTB CLEAN UP LINE JUST READ EQ RDP6 PROCESS LINE * PROCESS END OF FILE READ. RDP9 REWIND RFET,RECALL SB2 A0 NZ B2,RDP1 IF NOT *READP* RETURN RFET,RECALL EQ RDP1 PROCESS NEXT FILE * PROCESS ERROR AND PROPER TERMINATION. RDP10 FERROR IFN,B6 EQ RDP12 FINISH PROCESS RDP11 ERROR B6 RDP12 RJ RCP RESET LINE PARAMETERS EQ NCM EXIT * PROCESS READ REQUEST ON CURRENT EDIT FILE. RDP13 MX1 60 SET -0 RJ MPR COPY EDIT FILE TO SCRATCH SA4 IFN RELOAD FILE NAME EQ RDP2 PROCESS COPY TITLE SUBROUTINE LOCAL TO OVERLAY. GAF SPACE 4,15 ** GAF - GET/ATTACH FILE. * * ENTRY (X4) = SCRATCH NAME. * (X6) = PERMANENT FILE NAME. * * EXIT (X6) = 0, IF FILE OBTAINED. * (B6) = ERROR ORDINAL IF (X6) .NE. 0. * * USES A - 3, 6, 7. * X - 1, 3, 6, 7. * B - 6. * * MACROS ATTACH, GET. GAF PS ENTRY/EXIT SA6 PFET+8 SET PERM. NAME MX7 -1 BX7 -X7+X4 SA7 PFET SET LOCAL NAME GET A7 SA3 X2 SX1 36000B BX6 X1*X3 ZR X6,GAF IF GOTTEN, RETURN ATTACH X2,,,,R ATTACH IN READ MODE SA3 X2 SX1 36000B BX6 X1*X3 SB6 FCR.*100B+3 SET ERROR ORDINAL EQ GAF RETURN RCP SPACE 4,15 ** RCP - RESET COMMAND PARAMETERS. * * ENTRY (NUMS+1) = ADDRESS OF WORD CONTAINING LWA+1 * OF COMMAND LINE. * * EXIT END OF COMMAND FLAG RESET IF NEEDED. * * USES A - 1, 2, 6. * X - 1, 2, 6. * * NOTES SINCE *SCP* SETS (NUMS+1) = 0 IF THERE * ARE NO PARAMETERS, THIS ROUTINE CAN BE CALLED * IF THIS IS TRUE (WILL LOSE UPPER BITS OF WORD 0). RCP PS ENTRY/EXIT SA1 NUMS+1 SA2 X1 SX6 X2 LX2 1 NG X2,RCP IF REAL EOL, RETURN SA6 A2 EQ RCP RETURN SCP SPACE 4,15 ** SCP - SET COMMAND PARAMETERS. * * ENTRY (NUMS) = FWA OF PARAMETERS. * (NUMS+1) = LWA+1 OF PARAMETERS. * * EXIT (A5) = IF PARAMETERS ARE PRESENT, FWA OF PARAMETERS. * (X5) = FIRST WORD OF PARAMETERS. * (X1) = IF NO PARAMETERS, 0. * END OF PARAMETERS SET IN LAST WORD OF PARAMETERS. * * USES A - 1, 2, 5, 6. * X - 1, 2, 5, 6, 7. SCP1 SX6 0 SA6 NUMS+1 SCP PS ENTRY/EXIT SA1 NUMS SA2 A1+B1 MX7 1 ZR X1,SCP1 IF NO PARAMETERS SA2 X2 SA5 X1 BX6 X7+X2 SET END OF STRING SA6 A2 EQ SCP RETURN TITLE LOCAL COMMON DECKS AND BUFFERS. ** COMMON DECKS. * *CALL COMCMVE USE SETCHAR DATA 0 SET END OF CHARACTER PRESET USE * BUFFERS SPACE 4 ** BUFFERS. * USE BUFFERS .A MAX MAXWD*2+1,BUFRL OCBUF BSS 0 RBUF BSS 0 BSSZ .A+1 LWA EQU *+17B SET OVERLAY LWA END