Classic Computer Magazine Archive ANTIC VOL. 6, NO. 6 / OCTOBER 1987

Antic Prompter ST

Giving Yourself That Cronkite Confidence

by Patrick Bass, ST Resource Technical Editor

Cartoon They make it look so easy. Every night, your local newscasters stare deeply into the TV camera and tell you what happened that day without once looking at the notes they hold. How do they do it? Do they memorize all their stories before the show? Of course not. The text of what they have to say is displayed in big letters on a screen next to the TV camera, and the newscaster reads his or her story right off this screen.

The device that performs this work is called a prompter. Elsewhere in this issue of Antic you'll find Gregg Pearlman's article detailing the Video Prompter produced by Q-TV Prompting Systems, and Heidi Brumbaugh's program and article showing how to get a video prompting program running on the Atari 8-bit computers.

This month The ST Resource presents Antic Prompter ST, the ST version of Heidi's 8-bit Antic Prompter. It's written in GFA BASIC, runs on any color or monochrome Atari ST system, and will smoothly scroll ST text files (using very large letters) up the TV screen at speeds ranging from very slow to faster than most people can talk.


There are two ways to get a copy of Antic Prompter ST up and running in your Atari ST. First, you may type in Listing 1, STPROMPT.BAS, using GFA BASIC. Second, those of you who get the Antic Disk edition may copy the program STPROMPT.PRG from side B of the 5.25 inch Antic Monthly disk to your own 3.5 inch ST disk using LinkLine. The instructions for using LinkLine to copy files are contained inside the HELP file on side B.

If you choose GFA BASIC to enter Listing 1, type the program in carefully and save a copy to disk before you run it. While we don't have a TYPO program for GFA BASIC yet, GFA BASIC will check the syntax on each line you type in automatically. However, be careful with variable names and constant values, as these cannot be checked for accuracy by GFA BASIC.


When you run Antic Prompter ST, the screen will clear and then present a typical File Selector box for you to select the text file to show. Either type in or click on a filename to select it. If the file is present on the disk, the screen will clear again, and the file text will begin to scroll slowly up the screen in large letters.

You may control the speed of the scroll with the numeric keys on the ST keyboard. The keys 0 through 9 control how slowly or quickly the text scrolls up, with [0] being the fastest and [9] being the slowest. When your file has finished scrolling past, a small alert box will pop up and ask if you wish to display another file. If you don't, click on the exit button. While Antic Prompter ST is displaying a file, you may stop it by holding down either mouse button for about a second.


ScreenshotExamine Listing 1. This is the source code to Antic Prompter ST written with GFA BASIC. Let's go over the code here section by section and discover what it does.


This part of the source code gives us a place to assign initial values to variables and create space to save program information. Notice that this section is where the program will make decisions depending on what resolution you power up in. For example, if you power up in low resolution, the program will ask you to switch to medium resolution and then drop back to the Desktop.

Keep in mind the resolution differences between medium and high. Both are 640 dots wide, but the highres screen has twice as many dots vertically (400) as opposed to 200 for medium-res. There is a system call to return the current screen resolution, called XBIOS(4). This call returns a zero for low-res, a one for medium resolution and a two for high-res. To write this program so it can operate in medium- or high-res, I first assume medium-res and then multiply any reference to the vertical scale by multiplying it by the number returned by the XBIOS(4) call.


This procedure will present the File Selector box for you to enter the filename of the file you wish to show on Antic Prompter ST. It also presents a few boxes of helpful information on the use of the File Selector, allows you to choose the file and then exits.


Now we get to the main section of the code. If the file you ask for really does exist, the program will clear the screen, open the disk file you asked for, and determine the length of the disk file. Next, it will write the name of the file you asked for onto the screen as a reminder to you of which file was actually opened.

Now we fall into the main REPEAT loop. First, check to see if a keystroke has been pressed. If one has, check to see if it was a numeric key between one and nine. If it was indeed a numeric key, use the value of the key (times ten) as the delay value between lines displayed onscreen.

Otherwise erase the string we'll use for the next line to be displayed. Next, actually go to the disk and get the next line of characters (up to the next carriage return) and place it into Raw_input_line$. Then actually place the line onscreen with the Format_new_line call, and subtract the length of this line from the total size of the text file the program is currently displaying. Continue the REPEAT loop until we have displayed the entire file.


To actually smooth-scroll the ST screen, we use the Block Move command in GFA BASIC to grab screen memory running from one line from the top of the screen down to the bottom, and move it one line up. Everything else on the screen moves along with it, producing the scroll up.


Y'know, I just remembered that last month I wrote another practical program for the Atari ST ("Pursuit Of The Graf STrivial"). If I don't watch out, people may start thinking an Atari computer is good for more than just games, eh?