Will renumber GOSUBS, ON ERR GOTO, GOTO,RESTORE, etc. within the BASIC line.
To use this routine, enter RUN, SAVE the code as SAVE “RENUMBER”CODE 64986,383. DELETE 10,9996 and merge line 9998 into your program you wish to renumber.
Gallery
Source Code
10 REM RENUMBER UTILITYfrom "40 Best Machine Code Routines for the ZX Spectrum" by John Hardman & Andrew Hewson, 1982adapted to the TIMEX 2068 by Charles Stelding 1415 S. Baxter Tyler TX 75701 214 593-3331 11 REM This utility will renumberGOSUBS, ON ERR GOTO, GOTO,RESTORE, etc. within the BASIC line. 12 REM To use this routine, enter RUN, SAVE the code as SAVE "RENUMBER"CODE 64986,383, DELETE 10,9996 and merge line 9998 into your program you wish to renumber. 9943 RESTORE 9944: LET addr=64986: PRINT "Loading DATA lines...": FOR j=1 TO 48: READ a$: FOR k=1 TO LEN a$ STEP 2: LET num=(CODE a$(k)-48-(7 AND a$(k)>"9"))*16+(CODE a$(k+1)-48-(7 AND a$(k+1)>"9")): POKE addr,num: LET addr=addr+1: NEXT k: NEXT j: LIST 9944 DATA "2A015B7CB5C82A03" 9945 DATA "5B7CB5C82A535CED" 9946 DATA "5B015BCD4CFF3016" 9947 DATA "4672234E73237123" 9948 DATA "7023E52A035B19EB" 9949 DATA "E1CD41FF18E52A53" 9950 DATA "5C23232323CDEBFE" 9951 DATA "D2B8FE545D060004" 9952 DATA "237EFE2E2003EB18" 9953 DATA "ECFE0E20F2232323" 9954 DATA "2323237EFE3A2804" 9955 DATA "FE0D20EA78FE0428" 9956 DATA "1030E3D5626BF53E" 9957 DATA "30CDEE0AF13CD118" 9958 DATA "EC424BD521000011" 9959 DATA "E803CDE2FE116400" 9960 DATA "CDE2FE1E0ACDE2FE" 9961 DATA "0AD6305F19444D2A" 9962 DATA "535C2323CD4CFF38" 9963 DATA "03E118997EB93007" 9964 DATA "2323CD41FF18EB23" 9965 DATA "7EB838F52B2B4E2B" 9966 DATA "6669C1C5E511E803" 9967 DATA "CDD4FE116400CDD4" 9968 DATA "FE1E0ACDD4FE1E01" 9969 DATA "CDD4FE0397020302" 9970 DATA "03E17D02037C0203" 9971 DATA "9702E1C30FFE2A53" 9972 DATA "5C2323CD4CFFD054" 9973 DATA "5D2323CD41FFE537" 9974 DATA "ED522BEB732372E1" 9975 DATA "18E73E30A7ED5238" 9976 DATA "033C18F8190203C9" 9977 DATA "0A03D62F3DC81918" 9978 DATA "FB7ECD4CFFD0FEEA" 9979 DATA "200D237EFE0D20FA" 9980 DATA "232323232318EAFE" 9981 DATA "222009237EFE2220" 9982 DATA "FA2318DDFE0D28E8" 9983 DATA "CD021628D4FEED28" 9984 DATA "1BFEEC2817FEF728" 9985 DATA "13FEF0280FFEE528" 9986 DATA "0BFEE12807FECA28" 9987 DATA "032318B5237EFE30" 9988 DATA "38AFFE3A30ABC97E" 9989 DATA "CD021628FBFE0D23" 9990 DATA "20F5E5D5ED5B4B5C" 9991 DATA "A7ED52D1E1C97E00" 9998 INPUT "BEGINNING NEW LINE #? ";L: POKE 23298,INT (L/256): POKE 23297,L-(INT (L/256))*256: INPUT "Step? ";L: POKE 23299,L: RANDOMIZE USR 64986