Integer BASIC, written by Steve Wozniak, is the BASIC interpreter of the Apple I and original Apple II computers. Originally available on cassette, then included in ROM on the original Apple II computer at release in 1977, it was the first version of BASIC used by many early home computer owners.
|First appeared||Before 1977|
|Platform||Apple I, Apple II|
The language only supported mathematics using integers, lacking floating point support. Using integers allowed numbers to be stored in a much more compact 16-bit format that could be more rapidly read and processed than the 6- or 9-byte floating point formats found in most BASICs of the era. However, this limited its applicability as a general purpose language.
Integer BASIC was phased out in favor of Applesoft BASIC starting with the Apple II Plus in 1979. This was a licensed but modified version of Microsoft BASIC, which included the floating point support missing in Integer BASIC.
Steve Wozniak first used the BASIC computer language in the late 1960s on a time-sharing computer terminal in his California high school. He read 101 BASIC Computer Games as a member of the Homebrew Computer Club during the 1970s, and decided that any computer he designed would be able to both play the games in the book and run the logic simulations he worked with at Hewlett-Packard (HP). Wozniak knew that Bill Gates had written Altair BASIC for the Intel 8080 microprocessor, and hoped that he would be the first to write one for the MOS Technology 6502.
Wozniak would later describe his language as "intended primarily for games and educational uses". His only experience with BASIC was the few days with the time-sharing system in high school, and without access to any other system. Wozniak had to write the language—which he called "GAME BASIC"—on paper, hand assembling the language into 6502 machine code. Without any training on how to write a computer language, he used his HP experience to implement a stack machine to interpret expressions.
Wozniak had previously studied an HP BASIC manual he borrowed from work, not knowing that the syntax of HP's version of the language was very different from DEC BASIC, the language of 101 BASIC Computer Games, and Altair BASIC. To save time, and because games and logic simulations emphasized integer math, Wozniak removed floating-point routines from GAME BASIC. His interpreter would implement only "16-bit integer" calculations.
Wozniak had previously developed Breakout for Atari in hardware. He hoped to implement the game in his BASIC, so, while designing the Apple II computer, Wozniak added support for color graphics, game paddles, and sound to his language, now named Integer BASIC. (As the language needed 4K RAM, he made that the minimum memory for the Apple II.) While demonstrating the computer and Brick Out to Steve Jobs, Wozniak demonstrated that he could quickly change the colors that his game used, just by altering the source code. Woz later wrote that he had proved that "software was much more flexible than hardware", and that he and Jobs realized that "now, anyone could create arcade games without having to design it in hardware."
Wozniak demonstrated Brick Out at a meeting of the Homebrew Computer Club. He later described it as "the most satisfying day of my life ... It seemed like a huge step to me. After designing hardware arcade games, I knew that being able to program them in BASIC was going to change the world."
The Integer BASIC ROMs also included a machine code monitor, "mini-assembler", and disassembler to create and debug assembly language programs, and an interpreter for a 16-bit bytecode language called SWEET16. Wozniak hand assembled the monitor as the Apple II's first program, then used it to write Integer BASIC.
- Weyhrich, Steven (2001-10-20). "The Apple II". p. 2. Archived from the original on 2007-09-19. Retrieved 2007-09-16.
There were also several program cassettes available to purchase (assuming that you had the cassette interface). These included Wozniak's BASIC (which took about 30 seconds to load)...
- Wozniak, Steve (2014-05-01). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. Retrieved 2 May 2014.
- Wozniak, Steve (May 1977). "System Description / The Apple-II". BYTE. pp. 34–43. Retrieved October 17, 2013.
- Weyhrich, Steven (2001-12-12). "History part 3: The Apple II". Retrieved 2007-09-16.
The [Integer] BASIC, which we shipped with the first Apple II's, was never assembled — ever. There was one handwritten copy, all handwritten, all hand-assembled.
- Williams, Gregg; Moore, Rob (December 1984). "The Apple Story / Part 1: Early History". BYTE (interview). pp. A67. Retrieved 23 October 2013.
- Helmers, Carl (March 1978). "An Apple to Byte". BYTE. p. 18. Retrieved October 17, 2013.