IBM Basic (full name: The IBM Personal Computer Basic) is a programming language first released by IBM with the IBM Personal Computer (model 5150) in 1981. IBM released four different versions of the Microsoft BASIC interpreter, licensed from Microsoft for the PC and PCjr. They are known as Cassette BASIC, Disk BASIC, Advanced BASIC (BASICA), and Cartridge BASIC. Versions of Disk BASIC and Advanced BASIC were included with IBM PC DOS up to PC DOS 4. In addition to the features of an ANSI standard BASIC, the IBM versions offered support for the graphics and sound hardware of the IBM PC line. Source code could be typed in with a full screen editor, and very limited facilities were provided for rudimentary program debugging. IBM also released a version of the Microsoft BASIC compiler for the PC, concurrently with the release of PC DOS 1.1 in 1982.
Contents |
Appeared in | 1981 |
---|---|
Developer | Microsoft (for IBM) |
Influenced | IBM Disk BASIC, IBM BASICA, GW-BASIC |
IBM Cassette BASIC came in 32 kilobytes (KB) of read-only memory (ROM), separate from the 8 KB BIOS ROM of the original IBM PC, and did not require an operating system to run. Cassette BASIC provided the default user interface if there was no floppy disk drive installed, or if the boot code did not find a bootable floppy disk at power on. The name Cassette BASIC came from its use of cassette tapes rather than floppy disks to store programs and data. GW-BASIC is the standalone, compatible successor to IBM Cassette BASIC, which does not require ROM to run. Cassette BASIC was built into the ROMs of the original PC and XT, and early models in the PS/2 line. It only supported a cassette tape interface for loading and saving programs, which was unavailable on models after the original Model 5150. The entry-level version of the 5150 came with just 16 KB of random-access memory (RAM), which was sufficient to run Cassette BASIC. However, Cassette BASIC was rarely used because few PCs were sold without a disk drive, and most were sold with PC DOS and sufficient RAM to at least run Disk BASIC—many could run Advanced BASIC as well.
Appeared in | 1981 |
---|---|
Developer | Microsoft (for IBM) |
Influenced by | IBM Cassette BASIC |
Influenced | IBM BASICA, GW-BASIC |
IBM Disk BASIC (BASIC.COM) was included in the original IBM PC DOS and required 32 KB of RAM, DOS and the 32 KB Cassette BASIC ROM to run. The name Disk BASIC came from its use of floppy disks rather than cassette tapes to store programs and data. Disk-based code corrected errata in the ROM-resident code and added floppy disk and serial port support. GW-BASIC is a completely disk-based compatible successor of IBM Disk BASIC that doesn't require ROM-resident code to run. Neither version of IBM BASIC would run on on non-IBM computers or later IBM models, since those lack the needed ROM BASIC.
Screen shot of IBM BASICA on an IBM PC |
|
Appeared in | 1981 |
---|---|
Developer | Microsoft (for IBM) |
Influenced by | IBM Cassette BASIC, IBM Disk BASIC |
Influenced | GW-BASIC |
Platform | IBM Personal Computer |
OS | PC-DOS |
IBM BASICA (BASICA.COM) (Advanced BASIC) was also included in the original IBM PC DOS, and required 48 KB of RAM and the ROM-resident code of Cassette BASIC. It added functions such as diskette file access, storing programs on disk, monophonic sound using the PC's built-in speaker, graphics functions to set and clear pixels, draw lines and circles, and set colors, and event handling for communications and joystick presses. BASICA would not run on non-IBM computers (even so-called "100% compatible" machines) or later IBM models, since those lack the needed ROM BASIC.
Early versions of PC DOS included several sample BASIC programs demonstrating the capabilities of the PC, including the BASICA game DONKEY.BAS.
GW-BASIC, launched in 1983, was a Microsoft product distributed with non-IBM MS-DOS computers, and supported all the graphics modes and features of BASICA on computers that did not have the IBM Cassette BASIC.
The successor to BASICA for MS-DOS and PC-DOS versions was QBasic, launched in 1991, which was a stripped-down version of the Microsoft QuickBASIC compiler that could not save executable files.
A ROM cartridge version of BASIC was only available on the IBM PCjr (shipped 1984) and supported the additional graphics modes and sounds possible on that platform.[1]
Cassette BASIC loads when a PC or PCjr is booted without a bootable disk or cartridge. Disk BASIC and Advanced BASIC load when their command name (BASIC and BASICA respectively) is typed at a DOS command prompt (except PCjr, which activates Cartridge BASIC instead), with some optional parameters to control allocation of memory. When loaded, a sign-on identification message displays the program version number, and a full-screen text editor starts (see images, right). The function keys are assigned common commands, which display at the bottom of the screen. Commands may be typed in to load or save programs, and expressions can be typed in and executed in direct (immediate) mode. If a line of input starts with a number, the language system stores the following line of text as part of program source, allowing a programmer to enter in an entire program line by line, entering line numbers before each statement. When listed on screen, lines are displayed in order of increasing line number. Changes can be made to a displayed line of program source code by moving the cursor to the line with the cursor keys, and typing over the on-screen text. Program source is stored internally in a tokenized form, where keywords are replaced with a single byte token, to save space and execution time. Programs may be saved in compact tokenized form, or optionally saved as DOS text ASCII files that can be viewed and edited with other programs. Like most other DOS applications, IBM Basic is a text-mode program and has no features for windows, icons, mouse support, or cut and paste editing.