IBM Cassette BASIC

IBM Cassette BASIC is the BASIC interpreter IBM put in motherboard ROM on the IBM PC (5150), the IBM PC XT (5160), the IBM PC AT (5170) and the IBM PCjr. When the machine finds no disk it can boot from, it starts Cassette BASIC, which is why a PC with no bootable disk drops to a BASIC prompt.[1]
The name comes from its I/O: it can save and load programs on cassette tape only, and cannot read or write diskettes or hard disks. For disk support IBM supplied BASIC and BASICA with PC DOS.[1] IBM's own naming varies. The 5150 Guide to Operations calls it cassette BASIC; the 5160 and 5170 guides call it IBM BASIC; the technical references use both "cassette BASIC" and "resident BASIC".[1][2][3]
Where it lives
[edit | edit source]| Machine | Location | Version |
|---|---|---|
| IBM PC (5150) | Four ROMs at U29, U30, U31 and U32, holding BASIC and nothing else. The BIOS is in U33.[1] | C1.00 on early machines, C1.10 later |
| IBM PC XT (5160) | With the BIOS in ROMs U18 and U19.[2] | C1.10 |
| IBM PC AT (5170) | With the BIOS in U27 and U47.[3] | C1.10 |
| IBM PCjr | In system ROM, using no user memory. The PCjr's Advanced BASIC (Cartridge BASIC) is in a ROM cartridge, also using no user memory.[4] |
The "C" in the version number marks the cassette version.[1] Wikipedia states that early PS/2 models also have Cassette BASIC in ROM;[5] check the technical reference for a particular PS/2 planar.
RAM usage
[edit | edit source]Cassette BASIC runs from ROM but needs RAM for itself, the program and variables. On a 16KB-64KB 5150 motherboard it uses whatever RAM is fitted. On a 64KB-256KB 5150 board, a 5160 and a 5170 it uses 64 KB. It reserves part of that and reports the rest, for example "61404 Bytes free" or "62940 Bytes free".[1][2][3]
Disk BASIC, BASICA and GW-BASIC
[edit | edit source]IBM's disk-based BASIC (BASIC.COM) and Advanced BASIC (BASICA.COM), supplied with PC DOS, add disk support and, in BASICA's case, graphics and sound, but they call into the Cassette BASIC ROM rather than containing a complete interpreter. They do not run on machines without IBM's BASIC ROM, including most compatibles. Microsoft's GW-BASIC is BASICA with the Cassette BASIC code included, so it runs without the ROM.[5] On the PCjr, typing BASICA starts Cartridge BASIC.[5]
The cassette cable is the same one the Radio Shack TRS-80 uses.[1]
Diagnosing a failed BASIC ROM
[edit | edit source]A failed BASIC ROM does not stop a machine that boots from disk, so it can go unnoticed. On a 5150 the symptom depends on the BIOS revision in U33:[1]
| BIOS | Symptom |
|---|---|
| 04/24/81 | Flashing cursor as normal; a few seconds later one long beep and one short beep; about 15 seconds after that a single short beep; no further progress. |
| 10/19/81 | Nothing that points at the BASIC chips. Flashing cursor, then the diskette drive's LED and spindle motor turn on and stay on; inserting a boot diskette does nothing. |
| 10/27/82 | A message naming the chip: U29 "F600 ROM", U30 "F800 ROM", U31 "FA00 ROM", U32 "FC00 ROM". |
If the machine boots to DOS, the 5150ROMS utility checks all four ROMs and detects a ROM fitted in the wrong socket.[1]
Replacing a 5150 BASIC ROM
[edit | edit source]The BASIC ROMs have the same special pinout as the U33 BIOS ROM. A 2732 EPROM is not a substitute: its pinout differs and it holds 4 KB, half of what is needed. A 2764, 27128, 27256 or 27512 works with a suitable adapter, and there are pin-compatible EPROM equivalents that need no adapter.[1]
The IBM part number is printed on each chip. Sets seen by minuszerodegrees.net include:[1]
| Socket | Set 1 | Set 2 | Set 3 | Set 4 |
|---|---|---|---|---|
| U29 | 5700019 | 5700019 | 6359109 | 5000019 |
| U30 | 5700027 | 5000020 | 6359111 | 5000021 |
| U31 | 5700035 | 5700035 | 6359112 | 5000022 |
| U32 | 5700043 | 5700043 | 6359113 | 5000023 |
| Version | C1.00 | C1.00 | not recorded | C1.10 |
References
[edit | edit source]- ↑ 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 IBM 5150: Cassette BASIC, minuszerodegrees.net: ROMs U29 to U32, versions C1.00 and C1.10, RAM usage, naming in IBM's manuals, observed part numbers, EPROM substitution, the cassette cable, failure symptoms by BIOS revision and the 5150ROMS tool.
- ↑ 2.0 2.1 2.2 IBM 5160: Cassette BASIC, minuszerodegrees.net.
- ↑ 3.0 3.1 3.2 IBM 5170: Cassette BASIC, minuszerodegrees.net.
- ↑ IBM, IBM PCjr Technical Reference, section 4 "Compatibility", "Hardware Differences", p. 4-12. Hosted here as File:IBM PCjr Technical Reference.pdf and described at IBM PCjr Technical Reference.
- ↑ 5.0 5.1 5.2 IBM BASIC, Wikipedia (secondary source): Cassette BASIC in the ROMs of the PC, XT and early PS/2 models; Disk BASIC and BASICA requiring the ROM-resident code; GW-BASIC including the Cassette BASIC code so that it runs on machines without it.
Related pages
[edit | edit source]- IBM PC (5150) · IBM PC XT (5160) · IBM PC AT (5170) · IBM PCjr
- IBM PC (5150) Maintenance Guide · IBM PC (5150) Troubleshooting Guide
- IBM PC 5150 Technical Reference · IBM PCjr Technical Reference