Integer BASIC

From Wikipedia, the free encyclopedia

Integer BASIC, written by Steve Wozniak, was the BASIC interpreter included in ROM on the Apple I and original Apple II computer at release in 1977, and as such was the first version of BASIC used by many early home computer owners. Thousands of programs were written in Integer BASIC. Apple originally called it "Apple BASIC"; the name "Integer BASIC" was used for it after Applesoft BASIC (a version of Microsoft BASIC) became available.

When Steve Wozniak, who had earlier been involved with Atari in the development of the original version of Breakout, set as an internal goal in the design of this language to be able to faithfully reproduced that game entirely using BASIC instructions. This is seen in the design of the "low-res" graphic modes and making the Apple I computer one of the first microcomputers to use color graphics. This design goal was realized with the program "Little Brick Out" when it was demonstrated at a meeting of the Homebrew Computer Club in 1976. It should also be noted that Mr. Wozniak did not have any software development tools for the 6502 processor other than an assembly reference manual, and instead wrote out the software with pen and paper and then hand assembled the instructions into raw machine code for the 6502.[1]

The most frequently cited flaw of Integer BASIC was, as one might expect from the name, that its variables were all 16-bit integers and it was very difficult to write a program that could do calculations using floating point numbers. It was therefore very difficult to write financial or math programs. Apple Computer licensed a more full-featured (but also much slower) version of BASIC from Microsoft, introduced some tweaks, named it Applesoft BASIC, and included it in the ROMs of the Apple II Plus, which was released in 1979. Integer BASIC was relegated to a file on a floppy disk that Apple II Plus users could load into a RAM card for backward compatibility, if needed. Applesoft BASIC was included in the ROMs of all subsequent Apple II models, and became the foundation of probably hundreds of thousands of programs.

The Integer BASIC ROMs also included a "mini-assembler" that let programmers type assembly language programs, line by line, which were entered into memory. This was of course far easier than looking up the corresponding opcodes in machine language and typing those in. These ROMs also included an interpreter for a 16-bit bytecode language, called Sweet16, which was very simple, compact and worthy of study. These two features, some cassette tape I/O routines, and a few seldom-used floating point math routines were removed in the transition from the Integer BASIC ROMs to the Apple II Plus ROMs, in order to accommodate the larger size of the Applesoft BASIC interpreter.

On the Apple II platfoms, it was possible to switch between Applesoft BASIC and Integer BASIC by typing either INT (to enter Integer BASIC) or FP (to enter Applesoft BASIC) (though as noted above, later Apples needed to have Integer BASIC loaded into memory first). The command line symbol for Integer Basic was a right-facing arrow ( > ).

[edit] Criticism

While the user inputted code, people who made mistakes in the code line were unable to go back and fix them without starting over. Thus, some more user-friendly BASIC compilers were written for the platform for professionals to use.

[edit] External links

In other languages