.MCALL .MODULE .MODULE SLP,VERSION=05,COMMENT=,AUDIT=YES ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. .SBTTL SOURCE PATCH EDITOR .ENABL LC .AUDIT .SLPPRE,.SLPIO,.SLPSUB,.SLPERR,.POSIT,.TPAR,.TPMAC ; Edit History: ; ; 001 12-Feb-80 09:19 Metsch, James (29602) [240,122] ; Initialize trap vectors for XM ; (001) ; 002 08-Aug-80 02:49 PM Kent, Jeff [240,94] ; Redefine W level user error traps. ; (002) ; 003 12-Nov-80 03:30 PM Kent, Jeff [240,94] ; Create [1,23]SLP-W-Audit trail overwrites existing audit trail ; (003) ; 004 02-Feb-81 10:33 AM Jeff Kent [240,94] ; Bump version number to match patch to SLPSUB. ; (004) ; ; 21-FEB-85 George Thissell Jr. ; Allow for possible date rollover ; ; 8-MAR-85 George Thissell Jr. ; Fix device-full error message ; ; Edit History ; ; Who Date Module Reason ; ; JT 26-Apr-78 ALL RT-11 version created ; ; CG01 15-Feb-79 SLP Add /T option ; SLPSUB ; ;- .SBTTL Data Areas .MCALL .CLOSE, .LOOKUP, .EXIT ; ; Patchable defaults for several parameters go here so easily found ; DEFLSZ:: 133. ; line buffer size DEFASZ:: 12. ; audit trail size DEFPAD:: 72. ; margin to start audit trail ; ; PSECT list ; .PSECT TAB .PSECT TXT .PSECT $STATE,D .PSECT $KTAB,D .PSECT $KSTR,D .PSECT IMPURE,D .PSECT .LIBC. ; Library code .PSECT PATCH ; Patch space .PSECT ; ; Bits found in $SWTCH. ; AP$ND==000001 ; turn off auditing. Set by /A (1=YES) DB$LE==000002 ; double space line listing. Set by /D (1=YES) BL$NK==000004 ; blank fill to pad lines. Set by /B (1=YES) OU$TP==000020 ; output file was specified LL$ST==000040 ; line listing file was specified CHAN2= 000100 ; a file was specified as the third output file (BAD) SR$CO==000200 ; source file was specified CR$FI==000400 ; correction file was specified NL$ST==001000 ;Turn off EOL blank, tab stripping (/T) ;CG01 DL$BK==002000 ; Delete .BAK file (/N) CK$SMS==004000 ; Checksum on source file (/C) CK$SMC==010000 ; Checksum on command file (/C) ; ; Bits found in $FLAGS ; DATAF==000001 ; Data before the "-" in correction file DASHF==000002 ; Dash found in correction file DOUSL==000004 ; Double slash (//) used in command file ; ; Global Read/Write variables ; CLRBEG: ; start of zeroed variables $CFNMB::.BLKW 1 ; correction input file line number $FLAGS::.BLKW 1 ; Control flags $LNDEL::.BLKW 1 ; number of lines deleted $LNUMB::.BLKW 1 ; current line number $PLNMB::.BLKW 1 ; line in current page $SWTCH::.BLKW 1 ; option switch word BUFSTR::.BLKW 1 ; Start of I/O buffers WCNT:: .BLKW 1 ; Number of words for I/O CCK.CM::.BLKW 1 ; Computed checksum on command file CCK.IN::.BLKW 1 ; Computed checksum on source file CHAN:: .BLKW 1 ; Channel number CKSUM:: .BLKW 1 ; Temp storage area for checksum FIRWRD::.BLKW 1 ; First word of command file ICK.CM::.BLKW 1 ; Input checksum on command file ICK.IN::.BLKW 1 ; Input checksum on source file CLREND: ; end of zeroed variables SAVPTR::.BLKW 1 ; Save pointer for // SAVCNT::.BLKW 1 ; Save count for // SAVBLK::.BLKW 1 ; Save block number for // $AUBEG::.BLKW 1 ; address of audit trail first byte $AULGH::.BLKW 1 ; length of audit segment. Set by /S $LNADR::.BLKW 1 ; address of line buffer $LNEND::.BLKW 1 ; address of end of line buffer $LNSIZ::.BLKW 1 ; line buffer size. Set by /L $NEW:: .BLKW 1 ; address of the audit trail prototype $PDLGH::.BLKW 1 ; position of audit trail. Set by /P SAVCOM: .BLKW 4 ; Save area for previous command file IOAREA: .BLKW 2 ; EMT area for .GVAL ; ; ASCIZ line listing page header ; $HEADG:: VERSION:.NLCSI PATLEV=:.-2 TOG: .BYTE 11, 11, 11 ; null byte to print version ;**-1 .EVEN COMLIN: .BLKB 81. ; command line buffer ; ; Control byte string ; CNTRL: .ASCII ' ERROPT: .BYTE 0 ILL.SW: .ASCII 'Invalid option: /' EROPT1: .BYTE 0,0 ; switch for invalid option NO.VAL: .ASCII 'Value required: /' EROPT2: .BYTE 0,0 ; switch for value required ILL.VA: .ASCII 'Invalid value specified with option: /' EROPT3: .BYTE 0,0 ; switch for invalid value .EVEN LIMITS: .LIMIT ; low and high limits GVAL: 34 * 400 ; .GVAL area to get USRLOD 266 DEFTYP: .RAD50 'MACMACLST' ; default extensions 0 DISPAT: A, B, C, D, L, N, P, S, T, ILLSWT ; option dispatch vector ;CG01 ; ; Table of masks to set $SWTCH bits when seeing what files were specified ; MASKS: CR$FI ; (4) patch file SR$CO ; (3) source file CHAN2 ; (2) extra file LL$ST ; (1) line listing file OU$TP ; (0) output file ; ; Table of buffer descriptor addresses to initialize if corresponding ; bits are set. ; DSCTAB: $OBUF-4, OU$TP $LBUF-4, LL$ST $SBUF-4, SR$CO $CBUF-4, CR$FI 0 SLSL:: .ASCIZ &//& ; Double slash .EVEN .SBTTL Start Address .MCALL .PRINT .GVAL .SRESET .SETTOP .CSIGEN .RCTRLO .CSISPC .MCALL .GTIM TRAPPC == 34 ; trap vector PC ;001 TRAPPS == 36 ; trap vector PS ;001 INITSP = 42 ; addr of initial SP value JSW = 44 ; Job Status Word HIGHAD = 50 ; task high limit RMON = 54 ; address of RMON S.VER == 276 ; Offset from RMON to monitor version number PRIVER: ; come here on blank CSI line MOV #TOG,R1 ; point to toggle byte MOVB (R1),R2 ; save old toggle CLRB (R1) ; nullify it .PRINT #VERSION ; print ASCIZ string MOVB R2,(R1) ; restore toggle ; ; RESTART address ; NOP ; ; $SLIPR is an all-important intersection of several paths through the editor. ; Control comes here: ; When the program is first run ; When monitor command RESTART is given. ; After a fatal error has occured ; When the terminate edit command ('/') is given. ; When a CSI command line specifies no files ; $SLIPR:: ; start address MOV @#INITSP,SP ; reset SP MOV #$ERMSG,@#TRAPPC ; set up trap vector - PC ;001 CLR @#TRAPPS ; set up trap vector - PS ;001 MOV @#RMON,R1 ; get start of RMON ;001 BIT #10000,300(R1) ; running under XM monitor? ;001 BEQ 1$ ; no ;001 BIS #140000,@#TRAPPS ; yes,set user mode bits in TRAP;001 1$: BIS #20000,@#JSW ; set re-enter bit ;001 .SRESET ; away go handlers, tentative fi .GTIM #IOAREA,#IOAREA ; Check for possible date rollover ; Check for the correct version of RT-11 ; .GVAL #IOAREA,#S.VER ; Get the system version number BIC #^C377,R0 ; Clear the update number CMP R0,#5 ; Is it the right version? BGE 13$ ; Branch if so CLR R0 ; Say no optional error msg WARN E$VER ; Give error CLR R0 ; Hard exit .EXIT ; Get out quick ; Get a command line, parse it, get handlers, open up files ; 13$: .RCTRLO BIT #DOUSL,$FLAGS ; // used? BEQ 3$ ; If not, branch .CSIGEN LIMITS+2,#DEFTYP,$LNADR,#COMLIN BR 4$ ; Continue 3$: .CSIGEN LIMITS+2,#DEFTYP,#0,#COMLIN 4$: TSTB COMLIN ; if command line exists BNE 42$ ; continue JMP PRIVER ; else print version ; Get RAD50 of updated source file name. ; 42$: MOV R0,R5 ; R5 -> just above handlers .CSISPC #OUTFIL,#DEFTYP,#COMLIN ; get RAD50 BIT #DOUSL,$FLAGS ; // used? BEQ 48$ ; If not, branch MOV #4,R2 ; Loop counter MOV #COMFIL,R0 ; Get new command file MOV #SAVCOM,R1 ; Get old command file 44$: CMP (R0)+,(R1)+ ; Are they the same? BNE 46$ ; If not, branch DEC R2 BGT 44$ BR 48$ ;They're the same 46$: CLR $FLAGS CLR SAVBLK ; don't read the file again MOV #-1,R0 ; optional error message MOV #SAVCOM,R2 ; filename to print FATAL E$RDER 48$: MOV #OUTFIL,R1 ; Get output file MOV #$OLDFIL,R0 ; copy updated output file name MOV (R1)+,(R0)+ ; to $OLDFIL MOV (R1)+,(R0)+ MOV (R1)+,(R0)+ MOV (R1),(R0)+ MOV #OUTFIL,R1 ; Get output file MOV (R1)+,(R0)+ ; move RAD50 again MOV (R1)+,(R0)+ ; to area for .RENAME MOV (R1),(R0) MOV #COMFIL,R0 ; Get new command file MOV #SAVCOM,R1 ; Get command file save area MOV (R0)+,(R1)+ ; Save the command file name MOV (R0)+,(R1)+ MOV (R0)+,(R1)+ MOV (R0),(R1)+ ; If there are at least 8K bytes between handlers and USR, do a ; .SETTOP up to the USR so it won't swap. If less than 8K, .SETTOP up ; to RMON. This way we don't cause the USR to swap if we don't have to. ; MOV #GVAL,R0 ; R0 -> .GVAL area .GVAL ; R0 = USR load address MOV R5,R1 ADD #20000,R1 ; do we have at least 8K bytes? CMP R1,R0 BLOS 5$ ; branch if yes, not a small system MOV @#RMON,R0 ; otherwise claim up to RMON 5$: TST -(R0) ; juggle since .SETTOP inadaquacy .SETTOP ; claim up to USR or RMON ; ; Initialize defaults ; MOV #CLRBEG,R1 ; zero variables 10$: CLR (R1)+ CMP R1,#CLREND BNE 10$ MOV DEFLSZ,$LNSIZ ; must be at least $PDLGH+$AULGH MOV DEFASZ,$AULGH ; must be at least 8 MOV DEFPAD,$PDLGH ; must be multiple of 8 MOV #$SWTCH,R3 ; R3 -> switch word ; ; Check channels 0 thru 4 for openness and set the corresponding ; bit in $SWTCH if open. ; CLR R4 ; R4 = file counter MOV #MASKS,R1 ; R1 -> mask table MOV #4,R2 ; check chans 4,3,2,1,0 20$: MOV R2,R0 ; see if open EMT 374 ; with a .WAIT R2 BCS 30$ ; and branch if not BIS (R1),(R3) ; set bit INC R4 ; and bump files specified counter 30$: TST (R1)+ ; R1 -> next entry in table DEC R2 ; got 'em all? BGE 20$ ; branch if zero or greater ; ; If channels 2 or 5-10 were specified, they are extra. ; 40$: BIT #CHAN2,(R3) ; if a file is open on channel 2 BNE EXTRA ; it's extra MOV #5,R1 ; check channels 5 thru 10 for openness 50$: MOV R1,R0 ; .WAIT R1 EMT 374 BCC EXTRA ; and branch if open INC R1 ; since only two input files are allowed CMP R1,#10 BLE 50$ .SBTTL Decode the Options .ENABL LSB ; At this point: ; ; R3 -> flag word ; R4 = number of files specified (0,1,2,3,4) ; R5 -> bottom of free memory ; MOV (SP)+,R0 ; R0 = number of options 10$: BEQ SWTDON ; branch if no more CLR CKSUM ; Clear temp checksum storage MOV (SP)+,R1 ; R1 = option symbol MOVB R1,ERROPT ; in case of error BIC #40,R1 ; make sure upper case MOVB R1,DEFAULT ; to ensure a match MOV #OPTTAB,R2 ; R2 -> list of valid option symbols 20$: CMPB R1,(R2)+ ; find a match in the list BNE 20$ ; must be a match! SUB #OPTTAB,R2 ; R2 = offset+1 ASL R2 ; R2 = word offset+2 TST R1 ; set CC for value presence JMP @DISPAT-2(R2) ; call the processor for the symbol BACK: TST R1 ; if option had a value BPL 30$ TST (SP)+ ; get rid of it 30$: DEC R0 ; one less option BR 10$ ; see if more EXTRA: CLR R0 ; no optional message FATAL E$EXTR ; more than one input file (no return) .DSABL LSB .SBTTL Command Option Processors ;+ ; INPUTS: ; R1 -> option character from stack ; R3 -> flags word $SWTCH ; (SP) -> option value (if one) ;- ; ; /A disable audit trail generation ; A: BIS #AP$ND,(R3) ; set no audit flag BR BACK ; ; /B use blanks instead of tabs to pad to right margin ; B: BIS #BL$NK,(R3) ; set blank pad flag BR BACK ; ; /C checksum wanted ; C: BPL 4$ ; Branch if no value given MOV @SP,CKSUM ; Save provided checksum 4$: MOV R1,-(SP) ; Save R1 SWAB R1 ; Get file data in even byte BICB #200,R1 ; Clear bit 15 BEQ ILLSWT ; If output file used, error CMPB R1,#1 ; List file used? BEQ ILLSWT ; If yes, error CMPB R1,#3 ; Checksum on input file? BNE 8$ ; If not, branch BIS #CK$SMS,(R3) ; Flag it MOV CKSUM,ICK.IN ; Save input source file checksum BR 10$ ; continue 8$: BIS #CK$SMC,(R3) ; Flag command file checksum MOV CKSUM,ICK.CM ; Save input command file checksum 10$: MOV (SP)+,R1 ; Restore R1 BR BACK ; Continue ; ; /D double space the line listing file ; D: BIS #DB$LE,(R3) ; set double space output flag BR BACK ; ; /L:n allow source lines of up to n bytes (not counting terminator) ; L: BPL NOVAL ; branch if not MOV (SP),$LNSIZ ; set max line length BR BACK ; ; /N suppress .BAK file ; N: BIS #DL$BK,(R3) ; say no .BAK file BR BACK ; and continue ; ; /P:n start audit trails in column n ; P: BPL NOVAL ADD #7,(SP) ; round up to next tab stop BCS ILLVAL BIC #7,(SP) MOV (SP),$PDLGH ; set audit trail position BR BACK ; ; /S:n allow a maximum of n characters in the audit trail ; S: BPL NOVAL CMP (SP),#8. ; must be at least 8 BHIS 10$ ; branch if OK MOV #8.,(SP) ; must be at least 8. 10$: MOV (SP),$AULGH ; set audit buffer length BR BACK ; ;CG01+ ; /T disable end-of-line blank and tab stripping ; T: BIS #NL$ST,@R3 ;Set the nostrip bit BR BACK ; ;CG01- .SBTTL Option Error Processing .ENABL LSB ILLSWT: MOV #ILL.SW,R1 ; "Invalid option" msg MOVB ERROPT,EROPT1 ; Get switch JSR PC,5$ ; print message FATAL E$SWIT ; report error NOVAL: MOV #NO.VAL,R1 ; "No value" MOVB ERROPT,EROPT2 ; Get switch JSR PC,5$ ; print message FATAL E$NOVA ; report error ILLVAL: MOV #ILL.VA,R1 ; "Invalid value" MOVB ERROPT,EROPT3 ; Get switch JSR PC,5$ ; print message FATAL E$ILVA ; report error 5$: .RCTRLO .PRINT #SLPF .PRINT R1 RETURN .DSABL LSB ; ; All options have checked OK (individually). Now check that combinations ; are good. ; SWTDON: MOV $PDLGH,R0 ; check option values ADD $AULGH,R0 BCC 10$ 5$: CLR R0 ; no optional error message FATAL E$LNSM ; audit trail exceeds line 10$: CMP R0,$LNSIZ BHI 5$ ; and branch if bad .SBTTL Size Memory ; Use the rest of memory for buffers. ; ; At this point: ; ; R3 -> flag word ; R4 = number of files specified (0,1,2,3,4) ; R5 -> bottom of free space ; TST R4 ; if files were specified BNE 20$ ; continue JMP $SLIPR ; Else go no further 20$: MOV @#HIGHAD,R2 ; get task high limit TST (R2)+ ; and point right above it MOV R5,$LNADR ; set line buffer address ADD $LNSIZ,R5 ; and claim memory for the buffer MOV R5,$LNEND ; save end of line buffer addr INC R5 ; make a byte for null CMP R5,R2 ; did we go over fence? BHI NOMEM ; branch if so MOV R5,$NEW ; set audit trail buffer address ADD $AULGH,R5 ; and claim memory INC R5 ; one byte for null CMP R5,R2 ; over fence? BHI NOMEM ; branch if so INC R5 ; make r5 -> word boundary BIC #1,R5 SUB R5,R2 ; R2 = number of bytes in free memory SWAB R2 RORB R2 ; R2<0:7> = number of blocks in free memory CLR R0 ; clear counters CLR R1 30$: ADD R4,R1 ; do division to see how many INC R0 ; blocks can be allocated to each buffer CMPB R1,R2 BLOS 30$ DEC R0 ; R0 = number of blocks per buffer BEQ NOMEM ; can't have no blocks per buffer! SWAB R0 ; R0 = number of words per buffer MOV R0,WCNT ; Save I/O word count ASL R0 ; R0 = number of bytes per buffer ; ; Allocate block buffers to the files (from one to four specified) ; ; R5 is the start of free memory available to I/O buffers for the ; specified files ; MOV R5,BUFSTR ; Save I/O buffer start MOV #DSCTAB,R1 ; R1 -> (descriptor, bit) table 40$: MOV (R1)+,R2 ; R2 -> a buffer descriptor BEQ 60$ ; zero means end of list BIT (R1)+,(R3) ; if this file was specified BEQ 40$ MOV R5,(R2)+ ; set freep for output buffers MOV R0,(R2)+ ; set numfree for output buffers TST (R2)+ ; skip chan, func word CLR (R2)+ ; block no. = 0, MOV R5,(R2)+ ; buffer address of I/O buffer MOV R0,(R2) ; word count ROR (R2) ADD R0,R5 ; update free memory pointer BR 40$ 60$: CLR $SBUF-2 ; clear numleft for input buffers CLR $CBUF-2 MOV #NEW,R0 ; set default audit trail MOV $NEW,R1 ; into audit trail buffer 70$: MOVB (R0)+,(R1)+ ; move in default BNE 70$ ; until end of string BR CKTST ; continue NOMEM: CLR R0 ; no optional message FATAL E$CORE ; not enough memory (no return) .SBTTL CKTST Compute checksum (if one is wanted) CKTST:: BIT #CK$SMS!CK$SMC,$SWTCH ; Checksum wanted? BEQ 50$ ; If not, branch MOV R3,-(SP) ; Save address of $SWTCH BIT #CK$SMC,$SWTCH ; Command file checksum? BEQ 20$ ; If not, branch MOV #4,CHAN ; Command file channel number CALL RDFIL ; Compute checksum MOV CKSUM,CCK.CM ; Save it TST ICK.CM ; An input checksum? BEQ 5$ ; If not, branch CMP ICK.CM,CCK.CM ; Are they the same? BEQ 10$ ; If yes, branch CLR R0 ; No optional error message FATAL E$CCKE ; Error, go out 5$: MOV #COMFIL,R0 ; RAD50 filename in R0 CALL CHKPRI ; Print checksum message 10$: .CLOSE CHAN ; Close channel .LOOKUP #EMTBLK,CHAN,#COMFIL ; Reopen file BCC 20$ ; IF no error, branch MOV #-1,R0 ; Optional error message MOV #COMFIL,R2 ; Filename in R2 FATAL E$RDER 20$: BIT #CK$SMS,$SWTCH ; Source checksum wanted? BEQ 40$ ; Branch if not MOV #3,CHAN ; Source file channel number CALL RDFIL ; Compute checksum MOV CKSUM,CCK.IN ; Save it TST ICK.IN ; An input checksum? BEQ 25$ ; If not, branch CMP ICK.IN,CCK.IN ; Are they the same? BEQ 30$ ; If yes, branch CLR R0 ; No optional error message FATAL E$SCKE ; Error, go out 25$: MOV #SRCFIL,R0 ; RAD50 filename in R0 CALL CHKPRI ; Print checksum message 30$: .CLOSE CHAN ; Close channel .LOOKUP #EMTBLK,CHAN,#SRCFIL ; Reopen file BCC 40$ ; IF no error, branch MOV #-1,R0 ; Optional error message MOV #SRCFIL,R2 ; Filename in R2 FATAL E$RDER 40$: MOV (SP)+,R3 ; Restore address of $SWTCH 50$: TST SAVBLK ; If SAVBLK = 0, (// not used) BEQ 60$ ; continue MOV #$CBUF,R0 ; // was used, so need MOV SAVPTR,POINTR(R0) ; command file pointer MOV SAVCNT,COUNT(R0) ; and count MOV SAVBLK,BLKNUM(R0) ; and highest blk read 60$: .SBTTL Main Body of Actual Editor .ENABL LSB ; Now that a working environment has been set up, process commands. ; The session is terminated when '/' is entered and control is trans- ; ferred to $SLIPR. ; ; At this point: ; ; R3 -> flag word ; BIT #CR$FI,(R3) ; if no correction file BEQ 4$ ; go play with source file SLPR11: MOV #$CBUF,R0 ; R0 -> command buffer descriptor CALL $GETLN ; get command into line buffer BCS 30$ ; branch if EOF MOV R0,$AUBEG ; store audit trail address BIT #AP$ND,(R3) ; append audit trail? BNE 10$ ; branch if not CALL $PADLN ; else pad the line to right margin MOV $NEW,R1 ; and move in audit trail 11$: MOVB (R1)+,(R0)+ BNE 11$ 10$: MOV $LNADR,R0 ; R0 -> the command line MOV @R0,FIRWRD ; Save 1st 2 chars CMP @R0,SLSL ; Is it a double slash?(//) BEQ 4$ ; If yes, treat like / MOVB (R0)+,R5 ; R5 = the first character MOV #CNTRL,R4 ; dispatch off first character JOL 2$ ; shift? (<) JOL 4$ ; file mark? (/) JOL 6$ ; minus? (-) JOL 7$ ; enable audit trail? (%) JOL 8$ ; disable audit trail? (\) 1$: CALL $PUTLN ; put line in output file BIS #DATAF,$FLAGS ; data found in command file BR SLPR11 ; go again ; ; Shift command (<) ; Shift the line buffer left one character. ; 2$: MOV R0,R1 ; R1 -> second character DEC R1 ; R1 -> first character 25$: MOVB (R0)+,(R1)+ ; move left BNE 25$ ; until null BR 1$ ; go output line 30$: CLR R0 ; no optional error message FATAL E$CEOF ; give warning ;002 ; fall through to copy file ; ; File mark (/) ; Copy the rest of the source file to the output files. ; 4$: BIT #DASHF,$FLAGS ; Any update text? BNE 43$ ; If yes, branch CLR R0 ; No optional error message WARN E$NUTF ; Warn the user 43$: BIT #SR$CO,(R3) ; if no source file BEQ 5$ ; nothing to copy 45$: CALL $GTCFL ; get source line BCS 5$ ; branch if EOF or not specified BIT #AP$ND,(R3) ; if compress, BNE 47$ CALL $CMPRS ; compress 47$: CALL $PUTLN ; put line on output and list files BR 45$ ; and get next line 5$: CALL $FLUSH ; flush and close output files CMP SLSL,FIRWRD ; Did we get //? BEQ 9$ ; If yes, branch JMPSLP: JMP $SLIPR ; and return to driver ; ; Position/deletion command (-N or -N,M) ; 6$: BIT #DASHF,$FLAGS ; "-" already found? BNE 65$ ; If yes, branch BIS #DASHF,$FLAGS ; Say the "-" found BIT #DATAF,$FLAGS ; Data before the "-"? BEQ 65$ ; If not, continue MOV #-1,R0 ; Optional error message MOV #COMFIL,R2 ; Print a filename WARN E$CBDH ; Warning 65$: CALL $POSIT ; position file BR SLPR11 ; continue ; ; Enable audit trail (%) ; 7$: BIT #AP$ND,(R3) ; audit trail enabled? BEQ SLPR11 ; if yes, noop CLR $LNDEL ; clear deletion count BIC #AP$ND,(R3) ; enable audit trail BR SLPR11 ; and continue ; ; Disable audit trail (\) ; 8$: BIS #AP$ND,(R3) ; disable audit trail BR SLPR11 ; continue ; ; Get new CSI line from command file (//) ; 9$: BIS #DOUSL,$FLAGS ; Say // being used MOV #$CBUF,R0 ; R0 -> command file descriptor CALL $GETLN ; Get new CSI line into buf MOV #$CBUF,R0 ; R0 -> command file descriptor MOV POINTR(R0),SAVPTR ; Save command file pointer MOV COUNT(R0),SAVCNT ; and count MOV BLKNUM(R0),SAVBLK ; and block # JMP $SLIPR .DSABL LSB .SBTTL PATCH PSECT .PSECT PATCH .BLKW 64. ; Patch space .END $SLIPR