IBM BASIC Versions
I would like to know the difference between IBM BASIC and BASICA.
Glenn Kupsch, Jr.
IBM has created four different versions of BASIC for the PC and PCjr. They are known as cassette BASIC, disk BASIC, advanced BASIC (BASICA), and cartridge BASIC. Cassette BASIC is the simplest version. It resides in 32K of ROM and does not permit any disk commands or graphics other than plain text. If you boot up a PCjr without a BASIC cartridge, it activates cassette BASIC automatically. Cassette BASIC is rarely used on the PC, since few, if any, PCs were sold without a disk drive (in fact, the PC XT doesn't have a cassette port at all). However, you can activate cassette BASIC on the PC by booting the computer without a disk in the drive.
Disk BASIC must be loaded from disk, and requires at least 32K of RAM as well as a disk drive. Disk BASIC includes the commands in cassette BASIC as well as a timer function and support for RS-232 communications and two additional printers. BASICA, or advanced BASIC, is the most comprehensive version of IBM BASIC for the PC. It requires 48K of RAM and a disk drive. In addition to the disk BASIC commands, BASICA supports event trapping, which lets you monitor several different kinds of events (keyboard, joystick, light pen, timer, and RS-232 activity) in the background. Music and advanced graphics operations are also made available through commands such as PLAY, CIRCLE, PUT, GET, PAINT, and DRAW.
If you boot up a PCjr with a BASIC cartridge, the computer activates cartridge BASIC—an enhanced version of BASICA which supports the PCjr's extra features. In addition to most BASICA commands, cartridge BASIC offers extra screen modes and new graphics commands such as PCOPY, PALETTE, and PALETTE USING.
You can tell what version of BASIC you're using by looking at the version identifier in the BASIC startup message. The identifier C stands for cassette; D stands for disk; A stands for advanced BASIC; and J stands for cartridge BASIC (the J signifies junior). Some versions of IBM BASIC have gone through one or more revisions. The number after the identifier tells you which revision you are using. For instance, cassette BASIC on the PCjr is Version C1.20, while the PCjr's cartridge BASIC identifies itself as Version Jl.OO, indicating that cassette BASIC was revised twice but cartridge BASIC has not yet been revised.
With minor exceptions, the more advanced versions of IBM BASIC understand all the commands in simpler versions. Thus, most cassette BASIC or disk BASIC programs run with BASICA on the PC or cartridge BASIC on the PCjr. But the reverse is not necessarily true. The PCOPY command, for example, is unique to cartridge BASIC, so it's not available in any other version. One exception to the general rule of upward compatibility appears in cartridge BASIC, which doesn't support the SHELL command found in both disk BASIC and BASICA.
Certain BASIC statements also require extra hardware. On the PC, a serial interface card is required for RS-232 communications, and a color/graphics card is necessary for color graphics. On the PCjr, you must have an internal modem in order to use telecommunications programs or the built-in terminal emulator (activated with the command TERM).
The PC and PCjr know whether you have the hardware needed to support special BASIC commands. If you attempt to use RS-232 or graphics features without the right hardware, the computer responds with the error message Illegal function call or Device unavailable. In other cases, BASIC informs you that you're trying to do the impossible. Disk BASIC, for example, generates the error message Advanced feature when you attempt to execute a statement found only in BASICA.
The PCjr is a special case when it comes to booting BASIC. Since it's designed for cartridge BASIC, it intercepts any attempt to boot other versions from disk. When you type BASIC or BASICA at the DOS prompt, the PCjr ignores your request and activates cartridge BASIC instead. However, there's a simple trick that allows you to run BASICA on the PCjr (to take advantage of the SHELL command, for instance). Simply copy BASICA onto a disk and rename it as BASICB; then type BASICB from the DOS prompt. Actually, any letter will do in place of the A in BASICA. By renaming disk BASIC as BASICD (or anything other than BASIC or BASICA) you can also run that version of BASIC on the PCjr.