Bug Alert

See all articles from SINCUS v2 n9

What’s that? Bugs in my machine? MY MACHINE? Actually, it’s nothing to be surprised about. Whenever a complex program (like the BASIC Interpreter in the TS2068) is written, there are bound to be a few bugs left inside, no matter how carefully it was developed. If you haven’t found any then you just haven’t worked hard enough. It’s possible that you may have heard people claim they’ve seen mermaids and unicorns. Now, the fact that I’ve never seen any of the above doesn’t mean they don’t really exist, but I’d appreciate it if you’d tolerate my skepticism toward the so called “mythical beasts” like unicorns and mermaids, and error free code! As you might guess, error free code is not to be found in the TS2068. (In case anyone is interested, I’ve taken the cover off my machine, and there aren’t any mermaids or unicorns inside, either!) Back to the bugs, the TS2068 technical manual has a whole chapter on known bugs and corrections. That’s eleven pages, although to be fair, four of these are machine code routines that can fix up the bank switching code stored in RAM. Most of the bugs are rather obscure, having to do with cartridge service, the advanced video monitor, and bank switching, none of which possibly had a chance for thorough debugging at TIMEX. Fortunately, most users will never run into these bugs, and they can be ignored. Some, however, are well worth knowing about.

For starters, let’s point out that it’s easy for errors to crop up when a floating point routine receives (or should send out) a perfect power of two. Try PRINT INT -65536. Note that 65536 is 2 to the 16th power. The manual tells us that this bug only occurs when the result should be -65536. An interesting (though unrelated) analogy may be found in some of the older versions of the ZX-81 which can’t find the proper square root of.25 (.25 is two to the minus 2nd power). Incidentally, the correct answer, .5, is two to the minus first power.

A more interesting (the way trivia is interesting) bug maybe found as follows. ENTER and RUN these two lines:

1  PRINT "Wes"
2 GOTO 1

When the screen fills, it will respond with the “scroll?” prompt. Answer with (CAPS SHIFT) 4. The result is a bit flaky, but not terribly so. Run it again, and answer instead with (CAPSSHIFT) 2. The word RUN will appear on the edit line. Now try to DELETE the RUN. Pretty wild isn’t it? Actually, once RUN appears, you can’t do anything to avoid what follows, short of shutting off the machine. This problem can be avoided by sticking to single key responses, but you may still stumble on this one (I did, several times, without knowing it) if you’re inclined not to notice the “scroll?” prompt.

One bug, though hard to get at, is downright scary. Type SAVE “Wes, leaving off the closing quotation marks. This is incorrect syntax, and the flashing “?” will tell you so when you press ENTER. Now press ENTER 8 more times. The computer crashes and anything you had in it is gone! This problem is worse that it seems. It appears that you are allowed 9 SAVE mistakes in any one session. Other tape commands can cause problems too. Even after you correct your error, it “remembers” how many you’ve already made when you reach the magic total, you crash. If you’re inclined to make such mistakes, especially if you use some of the more complicated forms of SAVE, you might be better off to occasionally power down or RANDOMIZE USR 0 to reset the machine. So SAVE (carefully!) whatever you have first.