It also required shortening some lines. I find the best way to process such long lines is to make my Wordpad Window a size that I know when I have roughly passed the 128 character limit. Then I just make jumps to subroutines (because Hassett had programmed with very tight line numbering I couldn't simply add lines).
Another quirk of TRS-80 Model 1 Basic is the ability to drop the "THEN" command from IF statements. Hassett did this quite a lot in this program. I had to systematically go through and put THENs on all the IF statements.
Finally, I had to switch all the PRINT commands with messages longer than 32 characters to put their message into an M$ variable and then GOSUB my word wrap routine (lines 1-4). If such messages contain numeric variables, these variables have to be put into a STR$() command and these have to be concatenated with the M$ string using a "+" symbols rather than the ";" symbol normally used in PRINT commands.
I also had to convert the tape cassette save and load routines. For the MC-10 the only way to save and load to tape is to use the CSAVE* and CLOAD* commands which can only save and load the contents of a numeric array. So you need to expand one of the arrays (usually the largest one being saved) to accept any other single variables that are also being saved. In this case the OB array is the bulk of the saved file data, so I simply expanded its size by 6 elements to contain the 6 extra unique variable elements. The result is that the original load routine which looks like this:
74 CLS:INPUT"PRESS <ENTER> WHEN CASSETTE PREPARATIONS ARE MADE ";XX$
must be converted for the MC-10 to look like this:
74 CLS:INPUT"PRESS <ENTER> WHEN CASSETTE IS READY FOR LOADING";XX$
For doing saves you simply reverse the process, so for example ZZ=OB(44,0) becomes OB(44,0)=ZZ, which you do for all the single variables before issuing the CSAVE*OB command.
There were also a number of places where Hassett used FOR/NEXT loops with IF statements that would break out of the loops without completing them. I don't know if this can cause any real problems, but it strikes me as inelegant. I always take something like this:
10 FOR C=1 TO 10:IF P(C)=5 THEN F=C:GOTO100
And change it to something like this to make sure FOR/NEXTs are always completed:
10 FOR C=1 TO 10:IF P(C)=5 THEN F=C:C=10:NEXT:GOTO100
If anyone can tell me if such finickyness on my part is pointless I would appreciate hearing from you.
Anyway, as usual all my programs can be found in the Emulator .c10 format at: https://github.com/jggames