Renumbering Routine

Author(s): Steven Kaye
Publication: LISTing Newsletter
Date: June - July 1991
Pages: 3

Attach these lines to the end of a basic program. Enter GOTO 9991- in the immediate mode – and the computer will renumber any basic program counting in intervals of 5.

If you wish to change the numbering interval, change the value of N and the 5 in line 9995.

Remember to change GOTOs and GOSUBs after the program has been renumbered.

Created by: Steven Kaye; Submitted by and with permission from the ZX USERS Group of New York.

9991 LET B=16509
9992 LET N=5
9993 POKE B,INT (N/256)
9994 POKE B+1,N-256*INT (N/256)
9995 LET N=N+5
9996 LET B=B+1
9997 IF 256*PEEK B+PEEK (B+1)=9990 THEN STOP
9998 IF PEEK (B-1)=118 THEN GOTO 9993
9999 GOTO 9996

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.