I’ve written a renumber program for the MT.   The source, executable and a one 
page pdf file can be found at www.GitHub.com/LEJ-Projects/MTRenum 
<http://www.GitHub.com/LEJ-Projects/MTRenum> .

 

Here is what I say in the pdf:

 

MTRenum is a Windows based console program that I designed for renumbering 
BASIC programs written for the TRS-80 Model 100, NEC 8201 and perhaps a few 
other variants.    

I plan on using the CloudT TRS-80 Model 100 emulator for testing and updating 
various old games I’ve come across or developed before testing them on the 
actual hardware.   The programs would be developed on a text editor and tested 
on the emulator.   Having a Windows based renumber program designed for TRS-80 
Model 100 BASIC programs would be quite useful.

I did a half-hearted search for a renumber program and did not find anything 
that had all the features I desired.   I did not think generating a renumber 
program would be all that difficult but there were several small issues to 
overcome which I won’t describe here.   After overcoming these issues and 
learning how trivial they were, it was embarrassing there were issues at all.

I tried my latest version (1.2) on several various BASIC programs I’ve written 
along with a few programs that others have written.  They all renumber 
correctly to an executable program.

Besides renumbering a program, MTRenum will also convert everything to upper 
case except if it is: 1. between quotes; 2. in a DATA statement; or 3. part of 
a comment (remark).   

I also provided the option of removing unnecessary spaces.   If this is 
selected, spaces will be removed everywhere except again between quotes, in a 
DATA statement or part of a comment (remark).   

The lines in the input file do not need to be in order.    This is very handy 
if you want to move subroutines around.  Simply use your text editor to cut and 
paste the subroutine and then renumber it.   References to the new location 
will be updated.

And finally, you do not have to have line numbers on your lines unless they are 
being referenced in another line by the usual line number referencing 
statements (THEN, ELSE, GOTO, GOSUB, RESTORE, etc.).   This is handy when 
writing new code.

The program was written in C.  I compiled it with CodeBlocks and Pelles C.  The 
.exe on the GitHub was compiled with Pelles C.     It should compile on other 
compilers but I haven’t tested them.   Even though the .exe is safe, I’d 
recommend downloading the source and compiling it yourself.   Virus checkers 
get very nervous these days about downloading a ,exe.

 

I hope someone finds this useful.

 

Lloyd

 

Reply via email to