Atari Microsoft BASIC

The Atari Microsoft BASIC and Atari Microsoft BASIC II variants of the BASIC programming language were ROM cartridge or floppy disk packaged versions of the Microsoft BASIC dialect ported to the Atari 8-bit machines. The first version, released 1981, required 32 kB of RAM and was supplied only on floppy disk. The second version, released the next year, had most of the code on a ROM cartridge with additional functions on an optional floppy.
Atari Microsoft BASIC was highly compatible with contemporary BASICs like AppleSoft BASIC and Commodore BASIC, in contrast to their own Atari BASIC which was a somewhat different dialect and incompatible in many ways. Like Atari BASIC, Atari Microsoft BASIC included a number of new commands and features to take advantage of the Atari platform. These were only partially compatible with the similar features of Atari BASIC.
History.
When Microsoft ported their originally Intel 8080-based BASIC to the 6502, they took the time to expand the floating point format from the original 32-bit format to an optional 40-bit format for improved accuracy. Both versions could be compiled from the same code by providing compiler flags; if the 32-bit format used the resulting code was just under 8 kB in length, if the 40-bit format was used, it was closer to 9 kB.
The Atari 8-bit home computers were designed with a slot for an 8 KB ROM cartridge. Atari's programmers struggled to fit Microsoft's BASIC into a single cartridge while also adding features to take advantage of the platform. In the summer of 1978, Atari decided to license another BASIC that would be ready in time for the 1979 launch of the system, and this led them to Shepardson Microsystems Inc. (SMI). SMI quickly decided the job was impossible, and instead proposed creating an entirely new version of BASIC. This became Atari BASIC and was released with the Atari 400 and 800 in 1979.
Atari continued working with the MS code and released a version of it on floppy disk in 1981. In addition to the extended range of standard commands in MS compared to Atari BASIC, the new version added a number of additional commands for graphics and sound and other features of the platform. It also included integer variables and a complete integer math package which offered improved performance. However, as it required at least 32 kB of RAM and only ran from a disk, it was never particularly popular.
A second release, Atari Microsoft BASIC II, moved most of the code onto an expanded 16 kB cartridge and placed an additional 11 kB of more rarely used code on disk, meaning that many programs intended for cross-platform use could now be run from the cartridge alone. Released in 1982, BASIC II also saw little real-world use.
Details.
The underlying interpreter was based on the same 9 KB MOS 6502 code that also formed the basis of Commodore BASIC and AppleSoft BASIC, and was largely compatible with them. A key aspect of this was the string handling system, which was based on the same code as those platforms. In contrast, Atari BASIC used an entirely different system that treated strings as arrays of characters and was not compatible with, not easily ported from, most other systems.
It retained the original 40-bit format floating point math library that replaced the notoriously slow one in the system's operating system ROMs, and thus ran math code at the same speed as other platforms, and much faster than Atari BASIC. It also included an additional integer math package for added performance. The integer math system was triggered when the assignment was to an integer variable, or the literal values were all integers. If either was not true, the integer values would be converted to floating-point, use the floating-point code for the calculation, and then be converted back to integer for storage.
Another notable performance-related improvement was related to loops. Atari BASIC performed these by placing the line number of the on the execution stack, so when the associated was encountered it could find which line to loop back to. In contrast, MS BASIC had always placed the memory location of that line on the stack, allowing it to jump back to the without having to search through the entire program for the matching line. This oddity in Atari BASIC is one of the primary reasons for its slow performance, and because this was not true in Atari Microsoft BASIC, it generally ran much faster than Atari BASIC.
In contrast to Atari BASIC, which parsed at tokenized entire lines when they were typed in, MS BASICs only partially tokenized the source code. When a line was entered, the line number was converted from ASCII to a 16-bit integer, the first program statement was tokenized to a single-byte value, and then the rest of the line was left as text format. The last character had its high-bit set to indicate the end of the line. Depending on the use-case, Atari BASIC's complete tokenization of the line could result in less memory being used to store the program. This difference also meant that many syntax errors would only be noticed at runtime in the MS code, unlike the Atari version where the entire line was checked at edit time. In theory, edit-time compilation should have made Atari BASIC much faster than MS, which re-tokenizes the line every time it is encountered, but this advantage was washed away by the other performance issues noted above.
MS BASIC did not include a system for entering short forms of keywords, unlike Atari BASIC which allowed them to be abbreviated with a period during entry. When the program was ed, the keywords would be expanded out. Commodore's version which added control-character completion to the same end.
Atari Microsoft BASIC added a number of new features to take advantage of the platform. One interesting addition is which waited for the specified number of "jiffies", 1/60ths of a second, and then performed the . It also included the which instead paused while awaiting a memory address to change before proceeding to the next line. had been part of the earliest versions of MS BASIC but not widely used.
Atari Microsoft BASIC included most of the graphics and sound commands from Atari BASIC. Oddly, the original was merged into using the optional format. This means graphics code for Atari BASIC was not compatible. Atari Microsoft BASIC added a number of additional commands for handling player/missile graphics and user-defined character sets that were not available in Atari BASIC.
"Atari Microsoft BASIC" came in two packages:
Although more feature-filled than Atari BASIC, Microsoft BASIC never had the popularity that Atari BASIC had. The biggest problems were:
The cartridge version eliminated the first two requirements, but a disk drive was needed for all of its features.