8 POKE 23582,43: OUT 126,3: OUT 126,21
9 LET baud=300: LET div=1.8432E6/2/16/baud: OUT 125,div: PRINT #4;CHR$ (27);"[4w": PRINT #4;CHR$ (27);"[0;132s": STOP
@290 GO TO 16340: REM Renumber M. Druckenmiller Sr. Ver.2.0 21APR86
@291 LET paddr=addr: LET addr=naddr: LET pline=line: PRINT AT 11,10;addr: IF line>= fltr THEN LET nln=nln+inc
@292 LET line=256*PEEK addr+PEEK (addr+1): LET len=256*PEEK (addr+3)+PEEK (addr+2): LET naddr=addr+4+len: PRINT AT 13,10;line;" ": PRINT AT 15,10;len;" "
@293 IF F$(1)<> "1" THEN IF line>= fltr THEN LET F$(1)="1": LET fltr=line: LET faddr=addr: PRINT AT 1,6;fltr
@294 IF F$(2)<> "1" THEN IF line>lltr THEN LET laddr=addr: PRINT AT 1,20;lltr: LET F$(2)="1": LET lltr=pline: PRINT AT 1,20;lltr
@295 IF addr>= vars OR line>= limit THEN GO TO 16356
@296 IF F$(5)="T" THEN GO TO 16301
@297 IF F$(1)="1" THEN IF addr
@298 IF F$(2)="1" THEN IF addr>laddr THEN GO TO 16356
@299 IF pass<3 THEN IF (line>lltr OR line
@300 IF pass>= 3 THEN IF (line>lnln OR line
@301 LET lc=lc+1: PRINT AT 17,12;lc;" "
@302 IF pass<> 2 THEN GO TO 16309
@303 DIM T$(8): LET T$(2 TO 7)=STR$ line: LET T$(1)="N": GO SUB 16316
@304 IF F$(4)="=" THEN LET N$(c+1 TO c+7)=STR$ nln: LET N$(c)="="
@305 IF F$(4)="<> " THEN FOR q=1 TO LEN N$ STEP 8: IF O$(q)="N" THEN IF line>VAL O$(q+1 TO q+6) AND N$(q)<> "=" AND N$(q)<> ">" THEN LET N$(q+1 TO q+6)=STR$ nln: LET N$(q)=">"
@306 IF F$(4)="<> " THEN NEXT q
@307 IF line>= fltr AND line<= lltr THEN LET a=INT (nln/256): LET b=nln-(256*a): POKE addr,a: POKE addr+1,b
@308 GO TO 16291
@309 IF pass=0 THEN GO TO 16291
@310 LET n=addr+4
@311 FOR n=n TO naddr: PRINT AT 11,10;n;" ": LET T=PEEK n: LET u=PEEK (n-1): LET v=PEEK (n-5): LET y=t
@312 IF t=12 OR t=225 OR t=229 OR t=236 OR t=237 OR t=240 THEN IF v=13 OR u=203 OR u=58 OR n-4=26710 THEN GO TO 16325
@313 IF t=202 THEN IF u=34 THEN GO TO 16325
@314 IF t=234 THEN IF u=58 OR u=203 OR v=13 THEN GO TO 16291
@315 NEXT n: GO TO 16291
@316 LET F$(4)="<> ": IF LEN O$=0 THEN RETURN
@317 FOR c=1 TO LEN O$ STEP 8: IF O$(c+1 TO c+6)=T$(2 TO 7) THEN LET F$(4)="=": RETURN
@318 NEXT c: RETURN
@319 LET baddr=n: LET X$="": FOR n=n+1 TO naddr: LET t=PEEK n
@320 IF t=14 THEN LET T$(1)="N": GO TO 16323
@321 IF t=13 OR t=42 OR t=43 OR t=44 OR t=45 OR t=47 OR t=58 THEN LET T$(1)="A": GO TO 16323
@322 LET X$=X$+CHR$ (PEEK N): NEXT n
@323 LET blen=LEN X$: IF T$(1)="N" THEN LET x=(256*(PEEK (n+4@324 LET T$(2 TO 7)=X$: RETURN
@325 DIM T$(8): IF pass<> 1 THEN GO TO 16334
@326 GO SUB 16319: IF T$(1)="A" THEN GO TO 16328
@327 LET x=VAL T$(2 TO 7): IF x>lltr OR x
@328 GO SUB 16316: IF F$(4)="<> " THEN LET O$=O$+T$: LET O$(LEN O$)=CHR$ (1)
@329 IF F$(4)="=" THEN LET O$(c+7)=CHR$ (CODE O$(c+7)+1)
@330 IF F$(8)="Q" OR T$(1)="A" THEN GO TO 16332
@331 IF LEN STR$ nln>blen THEN GO SUB 16367: CLS : LET lc=lc-1: PRINT ''"Press space bar and use EDIT to"'"Lengthen Number Field by: "'LEN STR$ nln-blen;" spaces. After EDITing ENTER"''": GO TO 16355"'': LET naddr=addr: LIST line
@332 IF y=12 THEN LET y=0: LET n=n+1: GO TO 16325
@333 GO TO 16311
@334 GO SUB 16319: IF T$(1)="A" THEN GO TO 16311
@335 GO SUB 16316: IF F$(4)="<> " THEN GO TO 16311
@336 LET x=VAL N$(c+1 TO c+6): LET X$=STR$ x
@337 IF blen>= LEN X$ THEN FOR q=1 TO LEN x$: POKE baddr+q,CODE X$(q): NEXT q: FOR q=q TO blen: POKE baddr+q,32: NEXT q
@338 LET a=INT (x/256): LET b=x-(a*256): POKE baddr+blen+4,b: POKE baddr+blen+5,a: IF y=12 THEN LET y=0: LET n=n+1: GO TO 16325
@339 GO TO 16311
@340 DIM F$(8): DIM T$(8): LET O$=T$: INK 0: PAPER 7: BORDER 7: CLS : INPUT "Inverse Display? ";X$: IF X$="Y" THEN INK 7: PAPER 0: BORDER 0: CLS
@341 LET tlc=0: LET inc=10: LET prog=256*PEEK 23636+PEEK 23635: LET vars=256*PEEK 23628+PEEK 23627: LET faddr=prog: LET naddr=prog: LET laddr=vars
@342 LET pline=1: LET paddr=prog: LET pass=0: LET line=1: LET lc=0: LET addr=faddr
@343 LET s=0: LET limit=16274: LET lltr=limit: LET lnln=limit: LET fltr=1: LET fnln=fltr: GO SUB 16365
@344 INPUT "First Line To Renumber";X$: IF X$<> "" THEN LET x=VAL X$: IF x>fltr THEN LET fltr=x
@345 GO SUB 16365: INPUT "Last Line To Renumber";X$: IF X$<> "" THEN LET x=VAL X$: IF x
@346 GO SUB 16365: IF lltr<= fltr THEN BEEP .5,21: PRINT AT 18,0;"Last Line To Renumber must be"'"Greater then First Line To Re-"'"number": GO TO 16344
@347 INPUT "First New Line Number";X$: IF X$<> "" THEN LET x=VAL X$: IF x>fnln THEN LET fnln=x
@348 GO SUB 16365: INPUT "Last New Line Number";X$: IF X$<> "" THEN LET x=VAL X$: IF x
@349 GO SUB 16365: IF lnln<= fnln THEN BEEP .5,21: PRINT AT 18,0;"Last New Line Number must be"'"greater then First New Line"'"Number": GO TO 16347
@350 LET nln=fnln: INPUT "Increment";X$: IF X$<> "" THEN LET inc=VAL X$: IF inc<1 THEN LET inc=1
@351 GO SUB 16365: IF F$(7)<> "1" THEN GO TO 16291
@352 LET F$(7)="1": IF ((lnln-fnln)+1/inc)-lc<0 THEN PRINT AT 18,0;"Not enough new line numbers."'"Max Increment is: ";INT (lnln-fnln)/lc: GO TO 16350
@353 LET lc=0: GO SUB 16365: INPUT """Q"" For Quick Vers. ";F$(8)
@354 INPUT """T"" For Total Renum ";F$(5)
@355 GO SUB 16365: GO TO 16292
@356 IF pass=3 THEN LET lnln=pline: GO SUB 16365: COPY : GO SUB 16362: GO SUB 16367: STOP
@357 LET nln=fnln: LET pass=pass+1: PRINT AT 9,6;pass;" "
@358 LET addr=prog: IF F$(5)<> "T" THEN LET addr=faddr
@359 IF pass=1 THEN LET tlc=lc: GO TO 16352
@360 LET lc=0: IF pass=2 THEN DIM N$(LEN O$)
@361 GO TO 16292
@362 CLS : FOR N=1 TO LEN N$ STEP 8: LET S$=N$(n+1 TO n+6)
@363 PRINT #3;O$(N);" ";O$(n+1 TO N+6);" = ";N$(N+1 TO N+6);TAB 24;CODE O$(n+7)
@364 NEXT N: RETURN
@365 CLS : PRINT "Renumber:"'"From: ";fltr,"To: ";lltr''"Using:"'"From: ";fnln,"To: ";lnln;" MAX"''"Incrementing by: ";inc
@366 PRINT AT 9,0;"Pass: ";TAB 6;pass''"Address: ";TAB 10;addr''"Line: ";TAB 10;line''"Length: ";TAB 10;0''"Line Count: ";lc;TAB 20;"Total: ";tlc: RETURN
@367 PRINT #0;"Press Any Key To Continue";
@368 LET X=CODE INKEY$ : BEEP .1,14: BEEP .1,21: BEEP .1,28: IF x<> 0 THEN RETURN
@369 GO TO 16368
@370 SAVE "Renumber-H": SAVE "Renumber-H": REM "May 23, 1989 29:40"