Classic Computer Magazine Archive ST-Log ISSUE 35b / SEPTEMBER 1989 / PAGE 18




As I poise the mouse to run ST Writer, I hear a voice from the kitchen. "Hey, can you help with the groceries?" Eager to dispel my current computer-addict image, I proceed to the car and bring in the groceries. One thing (submarine sandwich) leads to another (Miller Lite), and it is eight hours later that I return to my ST.

I scream. A dim trash can has appeared in the upper right-hand corner of the ST Writer menu screen as well as the edit screen. I know that some of my prose is lacking, but what is ST Writer trying to tell me? Just this: "Your monitor now has a trash can permanently burned into it because you left it on for eight hours."

Two precautionary measures would have avoided this disaster. The most obvious, of course, would have been to turn the computer off. The other alternative would have been to install a screen-saver program so that if there was no keyboard or mouse input for a period of time, it would take evasive action, shutting off the screen.

The next day I installed a screen-saver program, and it worked like a charm. When I did not hit a key or move the mouse for about ten minutes, the screen went black. Sometimes, however, I found myself reaching over to turn on a computer that was simply blacked out by the screen-saver program.

Then, in a computer shop, I saw a Mac II that had been idle for a while. It seemed to be showing a fireworks demo. The patterns were randomly generated, creating an interesting and varied series of explosions. I became addicted to the show as I awaited the next unique pattern—until I hit a key and instantly saw the Mac II desktop. The salesman informed me that what I had seen was simply a screen-saver program.

During the next six months, I worked on a commercial program that loaded in a lot of compressed data. Anyone who has loaded a compressed picture in DEGAS Elite knows how slow this process can be. I needed to find a method of entertaining the user during the loading, and the idea of using a fireworks effect struck me. I implemented this idea, and the beta-testers found it interesting. No more boredom while data loaded. I knew then what I had to do: develop a screen saver like the one I had seen on the Mac.

Typing it in

Listing 1 is an ST BASIC program that'll create your copy of the Ultimate Screen Saver. Type it in, then use ST Check (found elsewhere in this issue) to check your work. When you're sure the program is typed properly, run it. The SAVER.PRG program file will be written to the disk in Drive A.

Listing 2 is the assembly language source code for the Ultimate Screen Saver. You don't need to type it in. It is included only for those people who are interested in assembly language programming.

Using the program

The program SAVER.PRG can either be put in your auto folder or run from desktop. The actual code stays resident in the computer and is installed as a vertical blank interrupt. If there are no more interrupt vector slots available, the program will not install. The fireworks will be invoked after about a nine-minute period, after which there is no keyboard event or mouse movement. Any key press or mouse movement resets the counter or resets the original screen.

I hope you enjoy the show!

Richard Leinecker is a math instructor and the senior programmer for IntraCorp, Inc., in Miami, Florida. He has published a number of software titles, including a gambling simulation, and several books containing hardware projects for the ST.