This made it so fast that Bill Gates complained when it outperformed Microsoft BASIC in benchmarks.
[4] That same year, General Electric placed a terminal in the high school that was connected to one of their mainframes running their time-sharing BASIC service, which they were heavily promoting at the time.
After being given three days of access, the students were asked to write letters on why the school should receive a terminal permanently, but their efforts were ultimately unsuccessful.
[1] Some years later, Wozniak was working at Hewlett-Packard (HP) running simulations of chip designs and logic layout for calculators.
For approximately $100,000, one could build up a reasonably equipped machine that could support between 16 and 32 users running BASIC programs.
[5] While expensive, it was still a fraction of the cost of the mainframe machines[b] and, for heavy users, less than the timesharing services.
[9] I sniffed the wind and knew that the key to making my computer good (popular) was to include a high-level language and that it had to be BASIC.
[12] Without any training on how to write a computer language, he used his HP calculator experience to implement a stack machine to interpret expressions.
[14] This was printed shortly after Bill Gates's infamous Open Letter to Hobbyists that suggested that people were robbing him by copying versions of Altair BASIC.
He added commands to read paddle controllers and over a series of quick edits had a version of the game up and running.
While showing it to Jobs, Wozniak demonstrated that he could quickly change the colors that his game used, just by altering the source code.
Mike Markkula said the company would go to the Consumer Electronics Show in Las Vegas if the disk system was ready in time, so Wozniak and Randy Wigginton worked on it non-stop through the 1977 holidays.
Without Wozniak being aware, the company had already arranged a license with Microsoft to receive their recently completed 6502 version of the Altair code.
Wozniak later noted, "My biggest disappointment was going to the awful string functions like LEFT$(VAR, 5) and MID$(VAR2,5,3) instead of my own".
[28] One interesting feature of the editor was that a section of the screen could be set aside as the "window", where live updates took place.
This was normally the entire screen, but it could be limited to a smaller area by POKEing values into memory locations 32 through 35.
[37] Infix operators included + (addition), - (subtraction), * (multiplication), / (division), MOD (remainder) and exponent using the ^ character.
[39] Mathematical functions were sparse; only ABS (absolute value), SGN (sign) and RND (random number) were supported.
[47] This had the advantage of avoiding the need for the garbage collection of the heap that was notoriously slow in MS BASIC[h] but meant that strings that were shorter than the declared length was wasted.
Additionally, the VTAB command worked similar to TAB but added vertical spaces instead of horizontal.
[63] The Integer BASIC ROMs also included a machine code monitor, "mini-assembler", and disassembler to create and debug assembly language programs.
Wozniak hand-assembled the monitor as the Apple II's first program, then used it to write Integer BASIC.
[64] In addition to Integer BASIC, the Apple ROMs contained a custom assembler language known as SWEET16.
This model was used so memory could be addressed via indirect 16-bit pointers and 16-bit math functions calculated without the need to translate those to the underlying multi-instruction 8-bit 6502 code.
Notable among these was the line renumbering routine, which was included in the Programmer's Aid #1 ROM, added to later Apple II models and available for user installation on earlier examples.
[74] Additionally, working solely with integer math provides another major boost in speed.
This is due both to the smaller 16-bit format requiring fewer memory accesses, as well as removing the need to move the floating-point decimal after calculations.
[76] In the Byte Sieve, where math was less important but array access and looping performance dominated, Integer BASIC took 166 seconds while Applesoft took 200.
[79] The following test series, taken from both of the original Rugg/Feldman articles,[76][75] show Integer's performance relative to the MS-derived BASIC on the same platform.
Another large amount of code near the end of the program is concerned with printing the final score.