Integer BASIC

The Apple Integer BASIC, the BASIC interpreter of the Apple I - there invite from the cassette - and the original Apple II model - there permanently installed in ROM shipped with the computer at the factory. The Integer BASIC language is based in syntax and semantics to HP- BASIC, the BASIC dialect developed by Hewlett Packard in the 1970s; However, the Integer BASIC interpreter itself is a completely unique creation.

Genesis

When Apple co-founder and developer Steve Wozniak designed the Apple I, small computers had neither monitor nor user interface; Competing devices such as the Altair 8800 brought from home with at best rudimentary input and output routines, they were typically programmed via toggle switch byte by byte in machine language. Wozniak learned in the Homebrew Computer Club from the BASIC interpreter that Bill Gates had written for the Altair; this was but for the Apple I is not useful because the Altair BASIC ran only on an Intel 8080 processor and not on the MOS Technology 6502 processor of the Apple I. Woz wanted Gates now do the same and have to be the first to was able to present a BASIC for the 6502, although he was actually at home rather in the Fortran programming language. As a further impetus it gives to the book " 101 BASIC Computer Games" by David H. Ahl.

Because Wozniak was actually hardware developers and hardly had knowledge in software development, he went an intuitive approach to the project: he analyzed Manuals for HP -BASIC and ran it from a syntax for its BASIC interpreter. He decided to simply keep the language: Integer BASIC could only handle 16- bit integers, floating-point arithmetic he saved from. It took about four months to develop and coded the interpreter first in a notebook, and then enter it byte by byte. Part of the code was also a small monitor program for machine language. As part of the Integer BASIC Wozniak also implemented a small but versatile virtual machine called "Sweet 16" that emulated a fictitious 16- bit processor with 16 registers in a few hundred bytes of machine code. Many operations of the interpreter could be much more compact formulated as in native 6502 code, so that the total memory requirements significantly decreased in the 16 -bit pseudo-code.

Wozniak described the development of the Integer BASIC later as the greatest technical challenge of his entire professional life. All the code fit together with the ROM routines for screen display, keyboard control etc. in 8 KB of memory.

Integer BASIC was not compatible with the BASIC dialect of Microsoft, which was based on the BASIC computer manufacturer DEC. Wozniak says that it only discovered this when he tried to transfer the programs from " 101 BASIC Computer Games" on the Apple and failed. As the first program he adapted to the game Star Trek to his computer.

Development

For the Apple II in 1977, published the Advanced Wozniak Integer BASIC to some graphics commands to control the new lores graphics mode and the paddles; this he went out again before more practically, he implemented exactly the commands that he needed to write a useful breakout clone in BASIC. At that time there at Apple nor the opinion before, the high-resolution HiRes graphics mode will be better left to the machine language programmers, as on a 1 MHz computer an interpreted BASIC was basically too slow in order to create nice HiRes programs. Gradually it was recognized by that many users were more likely to be interested in a simple than at a fast graphics programming.

In addition to Integer BASIC for the Apple II Apple offered soon nor a "Programmer 's Aid # 1" ( programming help No. 1) called extension that consisted of another ROM chip. This provided support for sound and music, for high-resolution graphics, including a simple vector graphics, and a set of tools, for example for testing the memory chips of the computer, for joining two programs for subsequent renumbering of lines of code and so on. However, all these options were implemented via machine language subroutines, that could only be accessed via cryptic CALL instructions and thus integrated themselves not very good in the existing BASIC. Other chips of this kind, with other priorities such as business or science, were being considered, but no more appeared.

By the end of 1977 Apple offered in addition to the built-in Integer BASIC one purchased by Microsoft BASIC interpreter, because their own attempts at further development had not borne fruit: Wozniak was the only one who really understood the code of Integer BASIC, but he was at the development of the new floppy drive for the Apple still urgently needed. The derived from the Microsoft BASIC and added some Apple-specific commands Applesoft BASIC was significantly slower and less economical in memory consumption, but offered the sorely missed floating point arithmetic and commands to display the high-resolution " HiRes " graphic mode of the Apple II with 280 x 192 pixels - integer BASIC was without detours via machine language only to control the " lores " graphic mode with 40 x 48 pixels in the situation.

First Applesoft BASIC was obtained as a program cartridge, then soon also on diskette as well as ROM plug-in card, which is no more precious RAM more was needed for that. Many users soon went on to take out the ROM chips of this plug-in card and insert directly into the motherboard, instead of the Integer BASIC chips. The greater popularity of Apple Soft BASIC was finally recognized by Apple: With Applesoft BASIC on the motherboard ( and more memory ), Apple sold the computer from 1979 as an Apple II . In this and all later models of the Apple II series, however, Integer BASIC, including the " programming help No. 1", continue to be loaded on demand from disk.

  • Apple
  • BASIC
  • Historic software

Pictures of Integer BASIC

73071
de