Classic Computer Magazine Archive COMPUTE! ISSUE 67 / DECEMBER 1985 / PAGE 84

BASIC XE For Atari XL & XE

Robert L. Riggs

Requirements: Atari XL or XE computer with at least 64K RAM. Disk drive recommended.

About two years ago, Optimized Systems Software brought out an extended BASIC cartridge for Atari computers. As a sequel to OSS's disk-based BASIC A+ introduced back in 1981, the BASIC XL cartridge was fantastic. It added 45 new commands and wrapped up Atari BASIC, BASIC A +, and Microsoft BASIC in one neat package. Furthermore, BASIC XL was made upwardly compatible with Atari BASIC, so it would run existing Atari BASIC programs. I discovered that games previously typed in from magazines—and abandoned because of their sluggish pace—ran at near-arcade speeds with BASIC XL. And it still offered Microsoft-style string handling, auto line numbering, block line deletions, and a host of other features.

When Atari introduced its 130XE this year, OSS upgraded BASIC XL for the new 128K machine. The result, BASIC XE, runs on all the XL computers but also adds commands to take advantage of the 130XE's expanded memory. The most important new command is XTEND. After you've typed or loaded a program into memory on the 130XE, you can use this command to move the program into the alternate 64K bank. At that point, your program and data space are separate—the former occupying the alternate 64K, and the latter occupying the main 48K (leaving about 35K free for data and strings). An optional third parameter for PEEK and POKE statements gives you access to any section of the 130XE's memory—the four extended banks of 16K or the main 48K RAM.

Of course, the XTEND command works only on the 130XE, not on the XL computers. Also, if you save a BASIC XE program which has been XTENDed, you can't load it back with either BASIC XL or Atari BASIC.

Like its predecessor, BASIC XE offers several additions to the Atari BASIC vocabulary, including ELSE, WHILE, ENDIF, ENDWHILE, PRINTUSING, TAB, and TRACE/TRACEOFF. Atari's player/missile graphics are made easier to use via commands like MISSILE, BUMP, HITCLR, PMCOLOR, PMGRAPHICS, PMMOVE, PMWIDTH, and PMCOLOR.

Another extremely powerful instruction is SET. It lets you exercise control over a variety of system-level functions. You can quickly and easily disable or enable the BREAK key, change tab stop settings for the comma in PRINT statements, alter the prompt character for INPUT, automatically DIMension strings, and instruct the LIST formatter to indent structured statements. BASIC XE also has DOS commands, including DIR (directory), ERASE, PROTECT, UNPROTECT, and RENAME.

Memory Magic

There's much more. You get commands like DPEEK/DPOKE (for PEEKing and POKEing double-byte values), ERR (for reporting errors), FIND (a search command), HSTICK/VSTICK (for the joysticks), and SYS (for jumping directly to a memory address). And unlike Atari BASIC, BASIC XE lets you type your programs in lowercase or reverse characters. No more hitting the CAPS or reverse key after an annoying syntax error!

Normally you'd expect such a powerful BASIC to consume much more memory than standard 8K Atari BASIC. But the 16K BASIC XE cartridge cleverly bank-selects its ROM so that it displaces only 8K of RAM. Also, some of the commands (such as most of those for player/missile graphics) are stored on a disk that comes with the cartridge. Although you don't absolutely need a disk drive to use the BASIC XE cartridge, you won't be able to use these extra commands without one.

Among the extended commands on disk are a SORT statement that accepts numeric arrays as well as string arrays; a FAST command that tells BASIC XE to precompile the program currently in memory, so programs run several times faster than with Atari BASIC; RENUM, for renumbering BASIC programs; LVAR, to list variable names; RGET and RPUT, for reading or writing whole records with devices; and MOVE, a block memory transfer.

The manual thoroughly explains BASIC XE and is carefully indexed. The more you use BASIC XE, the more you realize it should have been built into the 130XE in the first place. If you intend to do much BASIC programming, especially on the 130XE, BASIC XE is a must.

Optimized Systems Software
1221B Kentwood Avenue
San Jose, CA 95129