Chapter 1
Using SpeedScript

SpeedScript 3.0

All Machine Language Word Processor For the Atari

SpeedScript has become one of the most popular word processors for the Commodore 64, VIC-20, and Apple computers. And now SpeedScript has been translated to run on all eight-bit Ataris with at least 24K, with either disk or cassette (including the 400, 800, 600XL with memory expansion, 800XL, 1200XL, and new XE series). SpeedScript compares favorably with commercial word processors and has some features never seen before in an Atari word processor. It represents unique value in a type-in program.

SpeedScript 3.0, though compact in size (8K), has many features found on commercial word processors. SpeedScript is also very easy to learn and use. You type in everything first; preview and make corrections on the screen; insert and delete words, sentences, and paragraphs; then print out an error-free draft, letting SpeedScript take care of things like margins, centering, headers, and footers.

Typing In SpeedScript

Atari SpeedScript is the longest machine language program we've ever published, but COMPUTE!'s "MLX" entry system helps you type it right the first time. MLX can detect most errors people make when entering numbers. (See the instructions for using MLX in chapter 2.) MLX also lets you type SpeedScript in more than one sitting. Although the program listing is lengthy, we guarantee the effort will be worthwhile.

After you run the Atari version of MLX, answer the first two questions like this:
Starting Address? 7936
Ending Address? 16229
Run/Init Address 7936

Next, you'll be asked "Tape or Disk." SpeedScript can be saved as either a binary file on disk or as a boot tape. Press T for use with a tape drive. If you press D for disk, you'll be asked "Boot Disk or Binary File." Press F to select the Binary File option. Although you could save SpeedScript as an autobooting disk, it makes no sense, because such a disk cannot contain DOS, which is necessary for file-oriented disk access.

The screen will then show the first prompt, the number 7936 followed by a colon (:). Type in each three-digit number shown in the listing. You do not need to type the comma shown in the listing. MLX inserts the comma automatically.

The last number you enter in each line is a checksum. It represents the values of the other numbers in the line summed together. If you type the line correctly, the checksum calculated by MLX and displayed on the screen should match the checksum number in the listing. If it doesn't match, you will have to retype the line. MLX is not foolproof, though. It's possible to fool the checksum by exchanging the positions of the three-digit numbers. Also, an error in one number can be offset by an error in another. MLX will help catch your errors, but you must still be careful.

Typing in Multiple Sittings

If you want to stop typing the listing at some point and pick up later, press CTRL-S and follow the screen prompts. (For disk, MLX will ask you to specify a filename; do not use AUTORUN.SYS until the entire listing is typed in.) Remember to note the line number of the last line you entered. When you are ready to continue typing, load MLX, answer the prompts as you did before, then press CTRL-L. For a boot tape, be sure the cassette is in the tape drive and rewound. For a binary disk file, MLX asks for the filename you gave to the partially typed listing. After the LOAD is complete, press CTRL-N and tell MLX the line number where you stopped. Now continue typing as before.

When you finish all typing, MLX automatically prompts you to save the program. For disks with Atari DOS 2.0 or 3.0, save the completed program with the filename AUTORUN.SYS. This will allow SpeedScript to load and run automatically when the disk is booted.

At this point, MLX has saved either a boot tape or binary disk file. To load your boot tape, remove all cartridges, rewind the tape, and hold down the START button while turning on the power. (On the 600XL, 800XL, and XE series, disable BASIC by holding down both START and OPTION while turning on the power.) When the computer turns on, you'll 1 hear a single beep tone. (On the XL and XE series, make sure the volume is turned up on your TV or monitor.) Press PLAY on the tape drive, then press any key on the keyboard to start the load. SpeedScript will automatically run once the boot is successfully completed.

To use SpeedScript with an Atari DOS disk, you must save or copy it on a disk which also contains DOS.SYS and DUP.SYS. Since you've saved SpeedScript as AUTORUN.SYS, it will automatically load and run when you turn on your computer with this disk in the drive. (On the 600XL, 800XL, and XE series, disable BASIC by holding down OPTION when switching on the computer.) SpeedScript must always be named AUTORUN.SYS in order to load properly with Atari DOS. If you want to prevent it from automatically running for some reason, you can save it with another name, then rename it AUTORUN.SYS later.

If you're using Optimized System Software's OS/A+ DOS or a compatible successor, you can give SpeedScript any filename you like. Just use the LOAD command from DOS, and SpeedScript will automatically run. Or you can give it a filename with the extension .COM, such as SPEED.COM. Then you can start up by just typing SPEED at the DOS prompt. You can also write a simple batch file to boot up SpeedScript automatically. Some enhanced DOS packages like Optimized System Software's DOS XL may use so much memory that they conflict with SpeedScript. In this case, you'll need either to use Atari DOS instead on your SpeedScript disks or to reassemble the source code at a higher address to avoid conflicts.

Note: The AUTORUN.SYS file on your DOS master disk is responsible for booting up the 850 Interface Module for RS-232 communications. There is no easy way to combine the 850 boot program with SpeedScript, so you can't access the R: device. We'll show you later how to transfer files over a modem or print to a serial printer.

If you prefer, Atari SpeedScript is available for purchase on disk. To order the disk, use the coupon in the back of this book or call COMPUTE! Publications toll-free at 800-334-0868.

Entering Text

When you run SpeedScript, the screen colors change to black on white. The first line on the screen is black with white letters. SpeedScript presents all messages on this command line. The remaining 18 lines of the screen are used to enter, edit, and display your document. SpeedScript makes use of a special, but little-used, Atari character mode that permits larger, more readable characters with true lowercase descenders. The screen still shows up to 40 columns; only five rows are sacrificed. We think you'll agree that this is the most readable text you've ever seen on an Atari--perfect for word processing. (Technical note: SpeedScript starts at $1F00, and the ANTIC 3 character set is embedded at $2000.)

The cursor, a blinking square, shows where the next character you type will appear on the screen. SpeedScript lets you move the cursor anywhere within your document, making it easy to find and correct errors.

To begin using SpeedScript, just start typing. When the cursor reaches the right edge of the screen, it automatically jumps to the beginning of the next line, just as in BASIC. But unlike BASIC, SpeedScript never splits words at the right edge of the screen. If a word you're typing won't fit at the end of one line, it's instantly moved to the next line. This feature, called word-wrap, or parsing, also helps to make your text more readable.

Scrolling And Screen Formatting

When you finish typing on the last screen line, SpeedScript automatically scrolls the text upward to make room for a new line at the bottom. Imagine the screen as an 18-line window on a long, continuous document. If you've unplugged all cartridges or disabled BASIC as described above, there's room in memory for 3328 characters of text with 24K RAM and up to 27,904 characters on a 48K machine. (Unfortunately, SpeedScript 3.0 cannot make use of the extra memory available in the XL and XE series.) An additional 2K of text memory is available if SpeedScript is loaded from a boot tape. To check at any time how much unused space is left, press CTRL-U (hold down the CTRL key while pressing the U key). The number appearing in the command line indicates how much unused room remains for characters of text.

If you're used to a typewriter, you'll have to unlearn some habits if this is your first experience with word processing. Since the screen is only 40 columns wide, and most printers have 80-column carriages, it doesn't make sense to press RETURN at the end of each line as you do on a typewriter. SpeedScript's word-wrap takes care of this automatically. Press RETURN only when you want to force a carriage return to end a paragraph or limit the length of a line. A return-mark appears on the screen as a crooked left-pointing arrow.

Using the Keyboard

Most features are accessed with control key commands--you hold down CTRL while pressing another key. In this book, control key commands are abbreviated CTRL-x (where x is the key you press in combination with CTRL). An example is the CTRL-U mentioned above to check on unused memory. CTRL-E means hold down CTRL and press E. Sometimes you must also hold down the OPTION button to select a special option of a command, such as OPTION-CTRL-H. Other keys are referenced by name or function, such as DELETE/BACK S for the backspace key, CTRL-CLEAR for the clear-screen key, and cursor left or CTRL-+ for the cursor-left key. (See the "Keyboard Map," for a summary of the keyboard commands.)

Keyboard Map

Some keys let you move the cursor to different places in the document to make corrections or scroll text into view. You can move the cursor by character, word, sentence, or paragraph. Here's how to control the cursor:

- The cursor left/right keys (CTRL-+ and CTRL-*) work as usual; pressing CTRL-* moves the cursor right (forward) one space, and CTRL-+ moves the cursor left (backward) one space.

- The cursor up/down keys (CTRL-minus and CTRL-=) move the cursor to the beginning of either the next or previous sentence. Press CTRL-minus to move the cursor up (backward) to the beginning of the previous sentence. Press CTRL-= to move the cursor down (forward) to the beginning of the next sentence.

- SHIFT-+ moves the cursor left (backward) to the beginning of the previous word. SHIFT-* moves the cursor right (forward) to the beginning of the next word. If you get confused, just look at the arrows on the keys for a reminder.

- SHIFT-minus moves the cursor up (backward) to the beginning of the previous paragraph. SHIFT-= moves the cursor down (forward) to the beginning of the next paragraph. Again, look at the arrows on these keys for a reminder. A paragraph always ends with a return-mark.

- The START button, pressed once, moves the cursor to the top (start) of the screen without scrolling. Pressed twice, it moves the cursor to the start of the document.

- CTRL-Z moves the cursor to the end of the document, scrolling if necessary. It's easy to remember since Z is at the end of the alphabet.

For special applications, if you ever need to type the actual character represented by a command or cursor key, press ESC before typing the CTRL key. Press ESC twice to get the ESCape character, CHR$(27).

Correcting Your Typing

Sometimes you'll have to insert some characters to make a correction. Use CTRL-INSERT to open up a single space, just as in BASIC. Merely position the cursor at the point where you want to insert a space, and press CTRL-INSERT.

It can be tedious to use CTRL-INSERT to open up enough space for a whole sentence or paragraph. For convenience, SpeedScript has an insert mode that automatically inserts space for each character you type. In this mode, you can't type over characters; everything is inserted at the cursor position. To enter insert mode, press CTRL-I. To cancel insert mode, press CTRL-I again. To let you know you're in insert mode, the black command line at the top of the screen turns blue.

Insert mode is the easiest way to insert text, but it can become too slow when inserting near the top of a very long document because it must move all the text following the cursor position. So SpeedScript has even more ways to insert blocks of text.

One way is to use the TAB key. It is programmed in SpeedScript to act as a five-space margin indent. To end a paragraph and start another, press RETURN twice and press TAB. TAB always inserts; you don't need to be in insert mode. You can also use TAB to open up more space than CTRL-INSERT. (You cannot set or clear tab stops in SpeedScript as you can with the normal screen editor.) No matter how much space you want to insert, each insertion takes the same amount of time. So the TAB key can insert five spaces five times faster than pressing CTRL-INSERT five times.

There's an even better way, though. Press SHIFT-INSERT to insert 255 spaces (it does not insert a line; use RETURN for that). You can press it several times to open up as much space as you need. And SHIFT-INSERT is fast. It inserts 255 spaces as fast as CTRL-INSERT opens up one space. Now just type the text you want to insert over the blank space. (You don't want to be in CTRL-I insert mode when you use this trick; that would defeat its purpose.)

Since the DELETE/BACK S key (backspace) is also slow when working with large documents (it, too, must move all text following the cursor), you may prefer to use the cursor-left key to backspace when using this method.

After you've finished inserting, there may be some inserted spaces left over that you didn't use. Just press SHIFT-DELETE/BACK S. This instantly deletes all extra spaces between the cursor and the start of following text. It's also useful whenever you need to delete a block of spaces for some reason.

Erasing Text

Press DELETE/BACK S by itself to erase the character to the left of the cursor. All the following text is pulled back to fill the vacant space.

Press CTRL-DELETE/BACK S to delete the character on which the cursor is sitting. Again, all the following text is moved toward the cursor to fill the empty space.

These keys are fine for minor deletions, but it could take all day to delete a whole paragraph this way. So SpeedScript has two commands that can delete an entire word, sentence, or paragraph at a time. CTRL-E erases text after (to the right of) the cursor position, and CTRL-D deletes text behind (to the left of) the cursor.

To use the CTRL-E erase mode, first place the cursor at the beginning of the word, sentence, or paragraph you want to erase. Then press CTRL-E. The command line shows the message "Erase (S,W,P): RETURN to exit." Press S to erase a sentence, W for a word, or P for a paragraph. Each time you press one of these letters, the text is quickly erased. You can keep pressing S, W, or P until you've erased all the text you wish. Then press RETURN to exit the erase mode.

The CTRL-D delete mode works similarly, but deletes only one word, sentence, or paragraph at a time. First, place the cursor after the word, sentence, or paragraph you want to delete. Then press CTRL-D. Next, press S, W or P for sentence, word, or paragraph. The text is immediately deleted and you return to editing. You don't need to Press RETURN to exit the CTRL-D delete mode unless you pressed this key by mistake. (In general, you can escape from any command in SpeedScript by simply pressing RETURN.) CTRL-D is most convenient when the cursor is already past what you've been typing.

The Text Buffer

When you erase or delete with CTRL-E or CTRL-D, the text isn't lost forever. SpeedScript remembers what you've removed by storing deletions in a separate area of memory called a buffer. The buffer is a fail-safe device. If you erase too much or change your mind, just Press CTRL-R to restore the deletion. However, be aware that SpeedScript remembers only the last erase or delete you performed.

Another, more powerful use of this buffer is to move or copy sections of text. To move some text from one location in your document to another, first erase or delete it with CTRL-E or CTRL-D. Then move the cursor to where you want the text to appear and press CTRL-R. CTRL-R instantly inserts the contents of the buffer at the cursor position. If you want to copy some text from one part of your document to another, just erase or delete it with CTRL-E or CTRL-D, restore it at the original position with CTRL-R, then move the cursor elsewhere and press CTRL-R to restore it again. You can retrieve the buffer with CTRL-R as many times as you like. If there is no room left in memory for inserting the buffer, you'll see the message "Memory Full."

Important: The CTRL-E erase mode lets you erase up to the maximum size of the buffer (2K for disk, about 6K for tape), and CTRL-E also removes the previous contents of the buffer. Keep this in mind if there's something in the buffer you'd rather keep. If you don't want the buffer to be erased, hold down the OPTION key while you press CTRL-E. This preserves the buffer contents and adds newly erased text to the buffer.

If you ever need to erase the contents of the buffer, press CTRL-K (kill buffer).

The Wastebasket Command

If you want to start a new document or simply obliterate all your text, hold down OPTION while you press SHIFT-CLEAR (that's not a combination you're likely to press accidentally). SpeedScript asks, "ERASE ALL TEXT: Are you sure? (Y/N)." This is your last chance. If you don't want to erase the entire document, press N or any other key. Press Y to perform the irreversible deed. There is no way to recover text wiped out with Erase All.

Search and Replace

SpeedScript has a Find command that searches through your document to find a selected word or phrase. A Change option lets you automatically change one word to another throughout the document.

OPTION-CTRL-F (find) activates the search feature, OPTION-CTRL-C (change) lets you selectively search and replace, and CTRL-G (global) is for automatically searching and replacing.

Searching is a two-step process. First, you need to tell SpeedScript what to search for, then you trigger the actual search. Hold down OPTION and press CTRL-F. The command line prompts "Find:". Type in what you'd like to search for, the search phrase. If you press RETURN alone without typing anything, the Find command is canceled.

When you are ready to search, press CTRL-F. SpeedScript looks for the next occurrence of the search phrase starting from the current cursor position. If you want to hunt through the entire document, press START twice to move the cursor to the very top before beginning the search. Each time you press CTRL-F, SpeedScript looks for the next occurrence of the search phrase and places the cursor at the start of the phrase. If the search fails, you'll see the message "Not Found."

CTRL-C works together with CTRL-F. After you've specified the search phrase with OPTION-CTRL-F, press OPTION-CTRL-C to select the replace phrase. (You can press RETURN alone at the "Change to:" prompt to select a null replace phrase. When you hunt and replace, this deletes the located phrase.) To search and replace manually, start by pressing CTRL-F. After SpeedScript finds the search phrase, press CTRL-C if you want to replace the phrase. If you don't want to replace the phrase, don't press CTRL-C. You are not in a special search and replace mode. You're free to continue writing at any time.

CTRL-G links CTRL-F and CTRL-C together. It first asks "Find:", then "Change to:", then automatically searches and replaces throughout the document, starting at the cursor position.

There are a few things to watch out for when using search and replace. First, realize that if you search for the, SpeedScript finds the embedded the in words like therefore and heathen. If you changed all occurrences of the to cow, these words would become cowrefore and heacown. If you want to find a single word, include a space as the first character of the word, since almost all words are preceded by a space. Naturally, if you are replacing, you need to include the space in the replace phrase, too.

SpeedScript also distinguishes between uppercase and lowercase. The word Meldids does not match with meldids. SpeedScript will not find a capitalized word unless you capitalize it in the search phrase. To cover all bases, you will sometimes need to make two passes at replacing a word. Keep these things in mind when using CTRL-G, since you don't have a chance to stop a global search and replace.

Storing Your Document

Just press CTRL-S to store a document. You'll see the prompt "Save: (Device:Filename)>". Type C: for cassette or D: plus a legal Atari filename for disk. If you use the same name as a file already on disk, that file will be replaced by the new one. CTRL-S always saves the entire document. The cursor position within the document is not important.

When the SAVE is complete, SpeedScript reports "No errors" if all is well or gives a message like "Error #144" if not. Check your DOS or BASIC manual for a list of error numbers and their causes.

Loading a Document

To recall a previously saved document, press CTRL-L. Answer the "Load: (Device:Filename)>" prompt with the filename. Again, remember to include the C: for cassette or D: for disk. SpeedScript loads the file and should display "No errors." Otherwise, SpeedScript reports the error number.

The position of the cursor is important before loading a file. Documents start loading at the cursor position, so be sure to press START twice or OPTION-SHIFT-CLEAR (Erase All) to move the cursor to the start of text, unless you want to merge two documents. When you press CTRL-L to load, the command line turns green to warn you if the cursor is not at the top of the document.

To merge two or more files, simply load the first file, press CTRL-Z to move the cursor to the end of the document, and then load the file you want to merge. Do not place the cursor somewhere in the middle of your document before loading. A load does not insert the text from tape or disk, but overwrites all text after the cursor position. The last character loaded becomes the new end-of-text pointer, and you cannot access any text that appears ahead of this pointer.

Since SpeedScript stores files in ASCII (American Standard Code for Information Interchange), you can load any ASCII file with SpeedScript. You could write a BASIC program with SpeedScript, save it on disk, then use ENTER to read the file from BASIC. In BASIC, you can store a program in ASCII form with LIST "D:filename" for disk or LIST "C:" for tape, ready to load with SpeedScript. You can even load files produced by most other word processors, and most other Atari word processors can read SpeedScript files. You can make full use of SpeedScript's editing features to prepare ASCII files for the Atari Assembler/Editor, MAC/65, and most other Atari assemblers. And SpeedScript files can be transferred via modem with your favorite telecommunications program that handles ASCII.

Disk Commands

Sometimes you forget the name of a file, or need to delete or rename a file. SpeedScript provides a unique mini-DOS for your convenience. Just press CTRL-M (menu). SpeedScript reads the entire disk directory and puts it on the screen in three columns. A large cursor shows you which file is currently selected. Use the cursor keys to move the cursor to the file you want to select. A menu at the bottom of the screen shows you what keys you need to press. Press CTRL-D to delete the selected file, R to rename, L to lock, U to unlock, or F to format the disk. You can load the selected file by pressing CTRL-L. The position of the cursor within your document is not important when loading a file from the menu--SpeedScript always erases anything you previously had in memory.

Any changes you make to the directory will not show up until you call up the directory again. Press either 1, 2, 3, or 4 to update the directory from drives 1-4. This also sets the default disk drive, the drive accessed for further changes. When you're ready to return to writing, press either ESC or the RETURN key.

Additional Features

SpeedScript has a few commands that don't do much, but are nice to have. CTRL-X exchanges the character under the cursor with the character to the right of the cursor. Thus, you can fix transposition errors with a single keystroke. CTRL-A changes the character under the cursor from uppercase to lowercase or vice versa.

Press CTRL-B to change the background and border colors. Each time you press CTRL-B, one of 128 different background colors appears. Press CTRL-T (text) to cycle between one of eight text luminances. The colors are preserved until you change them or reboot SpeedScript.

If your TV suffers from overscanning, some characters on the left or right margin may be chopped off. Atari SpeedScript lets you widen and narrow the width of the screen. Press OPTION-CTRL-+ (the cursor-left key) to decrease the width of the screen. Each time you press it, the text is reformatted, and the left and right screen margins are adjusted by one character. You can decrease the width all the way down to two characters (although if your screen overscans that much, it's time to buy a new TV). To increase the width, to a maximum of 40 (the default width), press OPTION-CTRL-* (the cursor-right key).

One disadvantage of word-wrapping is that it's hard to tell exactly how many spaces are at the end of a screen line. When a word too long to fit on a line is wrapped to the next line, the hole it left is filled with "false" spaces. That is, the spaces are not actually part of your text and won't appear on paper. If you want to distinguish between true spaces and false spaces, press CTRL-O (on/of). The false spaces become tiny dots. You can write and edit in this mode if you wish, or turn off the feature by pressing CTRL-O again.

Atari SpeedScript disables the BREAK and inverse-video keys when you're entering or editing text. The inverse-video key was disabled because it is frequently pressed by accident on the 800 and 800XL models. If you want to enter inverse-video characters, hold down SELECT while typing the keys.

Atari 400 and 800 owners will notice that the action of the CAPS/LOWR key has been changed in SpeedScript. It works like the CAPS key on the XL and XE models. Press it once to switch to uppercase, and again to switch to lowercase. In other words, the CAPS/LOWR key toggles between uppercase and lowercase. You can still use SHIFT-CAPS/LOWR to force entry to all uppercase. CTRL-CAPS/LOWR has no effect.

Pressing SYSTEM RESET returns you to SpeedScript without erasing your text when using Atari DOS. With OS/A+ DOS, SYSTEM RESET returns you to the DOS command prompt. You can get back to SpeedScript without losing any text if you type RUN at the prompt.


If you already think SpeedScript has plenty of commands, wait until you see what the printing package offers. SpeedScript supports an array of powerful formatting features. It automatically fits your text between left and right margins which you can specify. You can center a line or block it against the right margin. SpeedScript skips over the perforation on continuous-form paper, or it can wait for you to insert single-sheet paper. A line of text can be printed at the top of each page (a header) and/or at the bottom of each page (a footer), and can include automatic page numbering, starting with whatever number you like. (See page 19 for a summary of the formatting commands.)

SpeedScript can print on different lengths and widths of paper, and single-, double-, triple-, or any-spacing is easy. You can print a document as big as can fit on a tape or disk by linking several files together during printing. You can print to the screen or to a file instead of to a printer. Other features let you send special codes to the printer to control features like underlining, boldfacing, and double-width type (depending on the printer).

But with all this power comes the need to learn additional commands. Fortunately, SpeedScript sets most of these variables to a default state. If you don't change these settings, SpeedScript assumes a left margin of 5, a right margin position of 75, no header or footer, single-spacing, and continuous-paper page feeding. You can change these default settings if you want (see below). Before printing, be sure the paper in your printer is adjusted to top-of-form (move the paper perforation just above the printing element). One additional note: Some printers incorporate an automatic skip-over-perforation feature. The printer skips to the next page when it reaches the bottom of a page. Since SpeedScript already controls paper feeding, you need to turn off this automatic skip-over-perf feature before running SpeedScript, or paging won't work properly.

To begin printing, simply press CTRL-P. SpeedScript prompts "Print: (Device:Filename)>". You can print to almost any device, even disk or cassette. If you enter E (for Editor), SpeedScript prints to the screen, letting you preview where lines and pages break. Enter P to Print for most printers. If your printer is attached, powered on, and selected (online), SpeedScript begins printing immediately. To cancel printing, hold down the BREAK key until printing stops. You can use CTRL-1 to pause printing. Press CTRL-1 again to continue.

If you need to print to an RS-232 printer, just print to a disk file, then boot up your DOS master disk and use the copy selection to copy the print file to the R: device. You can also write BASIC programs to read and process a printed disk file. Remember, a Print to disk is not the same as a Save to disk.

Formatting Commands

The print formatting commands must be distinguished from normal text, so they appear onscreen in inverse video with the text and background colors switched. As mentioned above, the regular inverse-video key is not used for entering inverse-video text. Instead, hold down the SELECT key while typing the format key. All lettered printer commands should be entered in lowercase (unSHIFTed). During printing, SpeedScript treats these characters as printing commands.

There are two kinds of printing commands, which we'll call Stage 1 and Stage 2. Stage 1 commands usually control variables such as left margin and right margin. Most are followed by a number, with no space between the command and the number. Stage 1 commands are executed before a line is printed.

Stage 2 commands, like centering and underlining, are executed while the line is being printed. Usually, Stage 1 commands must be on a line of their own, although you can group several Stage 1 commands together on a line. Stage 2 commands are by nature embedded within a line of text. Again, remember to hold down SELECT to enter the boldface characters shown here.

Stage 1 Commands

l Left margin. Follow with a number from 0 to 255. Use 0 for no margin. Defaults to 5.

r Right margin position, a number from 1 to 255. Defaults to 75. Be sure the right margin value is greater than the left margin value, or SpeedScript will go bonkers.

t Top margin. The position at which the first line of text is printed, relative to the top of the page. Defaults to 5. The header (if any) is always printed on the first line of the page, before the first line of text.

b Bottom margin. The line at which printing stops before continuing to the next page. Standard 8-1/2 X 11 inch paper has 66 lines. Bottom margin defaults to line 58. Don't make the bottom margin greater than the page length.

p Page length. Defaults to 66. If your printer does not print six lines per inch, multiply lines-per-inch by 11 to get the page length. European paper is usually longer than American paper-- 11-5/8 or 12 inches. Try a page length of 69 or 72.

s Spacing. Defaults to single-spacing. Follow with a number from 1 to 255. Use 1 for single-spacing, 2 for double-spacing, 3 for triple-spacing.

@ Start numbering at page number given. Page numbering normally starts with 1.

? Disables printing until selected page number is reached. For example, a value of 3 would start printing the third page of your document. Normally, SpeedScript starts printing with the first page.

x Sets the page width, in columns (think across). Defaults to 80. You need to change this for the sake of the centering command if you are printing in double-width or condensed type, or if you are using a 40-column or wide-carriage printer.

n Forced paging. Normally, SpeedScript prints the footer and moves on to the next page only when it has finished a page, but you can force it to continue to the next page by issuing this command. It requires no numbers.

m Margin release. Disables the left margin for the next printed line. Remember that this executes before the line is printed. It's used for outdenting.

w Page wait. This command should be placed at the beginning of your document before any text. With page wait turned on, SpeedScript prompts you to "Insert next sheet, press RETURN" when each page is finished printing. Insert the next sheet, line it up with the printhead, then press RETURN to continue. Page wait is ignored during disk or screen output.

j Select automatic linefeeds after carriage return. Like w, this command must be placed before any text. Don't use this command to achieve double-spacing, but only if all text prints on the same line.

i Information. This works like REM in BASIC. You follow the command with a line of text, up to 255 characters, ending in a return-mark. This line will be ignored during printing and is handy for making such notes to yourself as the filename of the document.

h Header define and enable. The header must be a single line of text (up to 254 characters) ending in a return-mark. The header prints on the first line of each page. You can include Stage 2 commands such as centering and page numbering in a header. You can use a header by itself without a footer. The header and footer should be defined at the top of your document, before any text. If you want to prevent the header from printing on the first page, put a return-mark by itself at the top of your document before the header definition.

f Footer define and enable. The footer must be a single line of text (up to 254 characters) ending in a return-mark. The footer prints two lines prior to the last line of each page. As with the header, you can include Stage 2 printing commands, and you don't need to set the header to use a footer.

g Go to (link) next file. Put this command as the last line in your document. Follow the command with the filename, including D: for disk. After the text in memory is printed, the link command loads the next file into memory. You can continue linking in successive files, but don't include a link in the last file. Before you start printing a linked file, make sure the first of the linked files is in memory. When printing is finished, the last file linked to will be in memory.

Stage 2 Commands

These commands either precede a line of text or are embedded within one.

c Centering. Put this at the beginning of a line you want to center. This will center only one line ending in a return-mark. Repeat this command at the beginning of every line you want centered. Centering uses the page-width setting (see above) to center the line properly. To center a double-width line, either set the page width to 40 or pad out the rest of the line with an equal number of spaces. If you use double-width, remember that the spaces preceding the centered text will be double-wide spaces.

e Edge right. This works in the same manner as centering, but it blocks the line flush with the right margin.

# When SpeedScript encounters this command, it prints the current page number. You usually embed this within a header or footer.

u A simple form of underlining. It works only on printers that recognize CHR$(8) as a backspace and CHR$(95) as an underline character. Underlining works on spaces, too. Use the first u to start underlining and another one to turn off underlining.

Formatting Commands (Enter with SELECT)

Command (Default)
b bottom margin (58)
c centering
e edge right
f define footer
g goto linked file
h define header
i information
j select linefeeds
l left margin (5)
m margin release
n next page
p page length (66)
r right margin (75)
s spacing (1)
t top margin (5)
u underline toggle
w page wait (off)
x columns across (80)
# page number
@ starting page number (1)
? print starting with # (1)

Fonts and Styles

Most dot-matrix printers are capable of more than just printing text at ten characters per inch. Some printers have several character sets, with italics and foreign language characters. Most can print in double-width (40 characters per line), condensed (132 characters per line), and in either pica or elite. Other features include programmable characters, programmable tab stops, and graphics modes. Many word processors customize themselves to a particular printer, but SpeedScript was purposely designed not to be printer-specific. Instead, SpeedScript lets you define your own Stage 2 printing commands.

You define a programmable printkey by choosing any character that is not already used for other printer commands. The entire uppercase alphabet is available for printkeys, and you can choose letters that are related to their function (like D for double-width). You enter these commands like printer commands, by holding down SELECT while you type them. The printkeys are like variables in BASIC.

To define a printkey, just hold down SELECT while you type the key you want to assign as the printkey, then an equal sign (=), and finally the ASCII value to be substituted for the printkey during printing. Now, whenever SpeedScript encounters the printkey embedded in text, it prints the character with the ASCII value you previously defined.

For example, to define the + key as the letter z, you first look up the ASCII value of z (in either your printer manual or in any Atari manual). The ASCII value of the letter z is 122, so the definition is

(inverse +) = 122

Now, anywhere you want to print the letter Z, substitute the printkey:

Gad+ooks! The +oo is +any!

This would appear on paper as

Gadzooks! The zoo is zany!

More practically, here's how you could program italics on an Epson MX-80-compatible printer. You switch on italics by sending an ESC (a character with an ASCII value of 27), then the character 4. You turn off italics by sending ESC 5. So define SHIFT-E as the escape code. Anywhere you want to print a word in italics, bracket it with printkey E, then 4, and printkey E, then 5:

The word E4italicE5 is in italics

You can similarly define whatever codes your printer uses for features like double-width or emphasized mode. For your convenience, four of the printkeys are predefined, though you can change them. Keys 1-4 are defined as 27, 14, 15, and 18, common values for most printers. On most printers, CHR$(27) is the ESCape key, CHR$(14) starts double-width, CHR$(15) either stops double-width or starts condensed characters, and CHR$(18) usually cancels condensed characters.

SpeedScript actually lets you embed any character within text, so you may prefer to put in the actual printer codes as part of your text. To set italics, you could just press ESC twice, then 4. The ESC key appears in text as a mutant E. Double-width has a value of 14, the same value as CTRL-N. To start double-width, just embed a CTRL-N. Remember that you must press ESC before any CTRL key to get it to appear in text. CTRL keys appear as small "shadowed" capital letters. These characters, though, are counted as part of the length of a line, and excessive use within one line can result in a shorter than normal line. It can be more convenient to use the printkeys, since if you ever change printers, you have to change only the definitions of the keys.

Keep one thing in mind about printkeys: SpeedScript always assumes it is printing to a rather dumb, featureless printer, the least common denominator. SpeedScript doesn't understand the intent of a printkey; it just sends out its value. So if you make one word within a line double-width, it may make the line overflow the specified right margin. There's no way for SpeedScript to include built-in font and typestyle codes without being customized for a particular printer since no set of codes is universal to all printers.

Hints and Tips

It may take you awhile to fully master SpeedScript, but as you do, you'll discover many ways to use the editing and formatting commands. For example, there is a simple way to simulate tab stops, say, for a columnar table. Just type a period at every tab stop position. Erase the line with CTRL-E, then restore it with CTRL-R multiple times. When you are filling in the table, just use word left/word right to jump quickly between the periods. Or you can use the programmable print-keys to embed your printer's own commands for setting and jumping to tab stops.

You don't have to change or define printer commands every time you write. Just save these definitions and load this file each time you write. You can create many custom definition files and have them ready to use on disk. You can create customized "fill-in-the-blank" letters. Just type the letter, and everywhere you'll need to insert something, substitute a unique character, such as an * or a CTRL character. When you're ready to customize the letter, use Find to locate each symbol and insert the specific information. Instead of typing an oft-used word or phrase, substitute a unique character, then use CTRL-G to globally change these characters into the actual word or phrase. You can even use SpeedScript as a simple filing program. Just type in all your data, flagging each field with a unique character. You can use Find to quickly locate any field.

Return to Table of Contents | Previous Chapter | Next Chapter