If you’ve bought a disk system, whatever variety, your next problem is what to do with your taped software. Your dealer may tell you that “real soon now” they’ll have disk versions of your favorite software, but don’t bet on it. How to move software from tape to disk?
Obviously, BASIC programs are the easiest. You just change all of your LOAD and SAVE code to match the appropriate commands in your disk operating system, then SAVE to disk. After that, no problem.
What about programs with code (most of the better ones?) This is fairly straightforward, even with a loader that can’t be stopped with BREAK. Start by writing a phony line of code, i.e., 9999 REM. Then MERGE the loader. Try it with several different line numbers for the phony code to make certain you haven’t accidentally overwritten a line of the loader. Then alter the LOAD & SAVE commands to suit your disk system (the Zebra/Portuguese TC2068 system requires LOAD *, SAVE *, and names for everything (no wildcard loads). SAVE the loader to disk. Then turn the computer on and off (absolutely clear everything). If there is a loading screen, and you want to keep it, LOAD “” SCREEN$. When it’s in, SAVE it to disk. Again, clear everything. Then LOAD “” CODE. So far, so simple, right?
Then write a little program, say,
10 FOR a=24500 TO 65534
20 IF PEEK a <>0 PRINT PEEK a, a
30 NEXT a
No, don’t run the thing from now until 3AM. Run it until you get the starting address of the program. Mscript, for example, starts around 32,020 or something. Then restart the program by first in direct mode LET a = (starting address + 5000). Then GOTO 20. If there’s still code and addresses rolling across your screen, say N to “scroll?” and increase the value of a in the direct mode, up another thousand, say. At the first point you get a long stretch of a blank screen, BREAK. Decrease the value of a. If you increased it by 1000, decrease it from that number by 500. GOTO 20 and so on until you get code again. Y to “scroll?” until you get an address followed by a lot of blank screen. That’s most likely the high or ending address of the code. BREAK the program. Write down the high number. Delete the little program by simply hitting the line number and return, i.e., 10 <CR> 20 <CR> 30 <CR>, so as not to disturb your code. If your starting address is 27500 and the ending address 34500, the line is SAVE *”code” 27500,7001. The last number is the number of bytes to save (37500-27500 + 1) (I always save one extra for reasons that will probably escape any decent programmer). The * is TOS’s flag to indicate a save to disk. Your system may differ.
Using this method, I have moved Vu-3d, Flight Simulation, Tech-Draw, Mscript, Chess, and other programs to disk. In Tech Draw and Mscript, the reading and writing code (for pictures and text) is in assembly code and is beyond the scope of this article (or my current ability to program). Assembly programmers will hunt down the load/save routines and change them to suit the disk drive system. Even without those changes, seeing Mscript or Tech-Draw pop up in 10-15 seconds is a major pleasure, as is not worrying about backups, which are a snap to make with a disk system.
Some programs will drive you crazy in trying to get them to run from disk. A cute game by Jeff Naylor (Crisscross) will not work at all. I can save the code without trouble (it starts perilously near the system variables area). I can get the loader but cannot get the two to work together from disk. Jeff put some wild looking code in line 1, a NEW in life 5, so I knew well enough to start somewhere else on either a SAVE “CROSS” LINE or a GOTO to test it. Still didn’t work. I tried eliminating the clever shift to white on white he used in line 1. Bombed. You try. Some programs use some slick tricks in the loader that you can get by, as the use of equations in GOTO statements, as in GOTO PI*PI/3. Just use programming sense. If there’s a RETURN at the end of line 5 with no GOSUB prior, don’t start there. One way to ease your way is to eliminate ONERR GOTO statements from the loader (what kept you from looking at it before you MERGE-ed it).
If anyone has a patch for TECH-DRAW or Mscript, please, PUBLISH IT in the newsletter. The system I use is the Zebra Systems drive (originally developed, in part, for the TC2068). I use an AERCO, so the print driver on MScript was done for that, as is the customized one on Tech-Draw. Any asssistance?