Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Integer BASIC
BASIC interpreter of the Apple I and original Apple II computers

Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers, originally distributed on cassette in 1976 and later embedded in ROM. It was notable for supporting only integer arithmetic using a fast 16-bit format, unlike the floating-point numbers common in contemporaries such as Microsoft BASIC. This performance advantage even drew criticism from Bill Gates. Integer BASIC treated strings as arrays accessed through array slicing, a feature shared with HP Time-Shared BASIC and contrasting with DEC-derived BASICs. Initially known as GAME BASIC, it was superseded by Applesoft BASIC starting with the Apple II Plus in 1979.

We don't have any images related to Integer BASIC yet.
We don't have any YouTube videos related to Integer BASIC yet.
We don't have any PDF documents related to Integer BASIC yet.
We don't have any Books related to Integer BASIC yet.
We don't have any archived web articles related to Integer BASIC yet.

History

As a senior in high school, Steve Wozniak's electronics teacher arranged for the leading students in the class to have placements at local electronics companies. Wozniak was sent to Sylvania where he programmed in FORTRAN on an IBM 1130.3 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.4

Some years later, Wozniak was working at Hewlett-Packard (HP) running simulations of chip designs and logic layout for calculators.5 HP made major inroads in the minicomputer market with their HP 2000 series machines running a custom timesharing version of BASIC. For approximately $100,000, one could build up a reasonably equipped machine that could support between 16 and 32 users running BASIC programs.6 While expensive, it was still a fraction of the cost of the mainframe machines7 and, for heavy users, less than the timesharing services.8 HP followed this with the HP 9830, a desktop-sized machine for US$10,000 (equivalent to $81,000 in 2024) that also ran BASIC, which Wozniak had access to.9

In January 1975 the Altair 8800 was announced and sparked off the microcomputer revolution. In March, Wozniak attended the first meeting of the Homebrew Computer Club and began formulating the design of his own computer. One of the most important pieces of software for the Altair, and one of the most heavily pirated, was Altair BASIC from the recently formed Microsoft.10 Wozniak concluded that his machine would have to have a BASIC of its own, which would, hopefully, be the first for the MOS Technology 6502 processor. As the language needed 4 KB RAM, he made that the minimum memory for the design.11

Wozniak's references for BASIC were a copy of 101 BASIC Computer Games and an HP BASIC manual.12 He did not know that HP's BASIC was very different from the DEC BASIC variety used in 101 Games, which was also the basis of Microsoft BASIC for the Altair. Based on these sources, Wozniak began sketching out a syntax chart for the language. The design initially included floating-point support, but still hoping he might publish the first BASIC on the 6502 and become "a star", he decided to abandon floating-point and write a separate integer math system to save a few weeks programming time.13

Wozniak would later describe his language as "intended primarily for games and educational uses".14 Referring to it throughout development as "GAME BASIC", Wozniak wrote the code by hand, translating the assembler code instructions into their machine code equivalents and then uploading the result to his computer.15 Without any training on how to write a computer language, he used his HP calculator experience to implement a stack machine to interpret expressions. Once the basic routines were up and running, he worked on the other commands one-by-one in a modular fashion. With every visit to the Homebrew club, he demonstrated a few more features added in the last month.16

In early 1976 ads for its Apple I computer, Apple Inc made the claims that "our philosophy is to provide software for our machines free or at minimal cost"17 and "yes folks, Apple BASIC is Free".18 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.19

Wozniak had helped Steve Jobs, who worked for Atari, with a redesign of Breakout.20 At some later point, he decided to see whether one could write the game in BASIC. He added commands to read paddle controllers and over a series of quick edits had a version of the game up and running. To improve its playability, he added a speaker to make clicks when the ball hit things. While showing it to Jobs, Wozniak demonstrated that he could quickly change the colors that his game used, just by altering the source code. Wozniak 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."21

Wozniak did complete a floating-point library for the 6502 and published it in the August 1976 edition of Dr. Dobb's Journal.22 This library was later made part of the ROMs for the Apple II.23 Wozniak began work on back-porting the floating-point code into Apple BASIC, but got sidetracked in the task of designing a floppy disk controller for what became the Disk II. 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.24

When he returned to the topic of floating-point in BASIC, Jobs complained it was taking too long. Without Wozniak being aware, the company had already arranged a license with Microsoft to receive their recently completed 6502 version of the Altair code. Examining the MS code, Wozniak decided that it was easier to add graphics support to their code than add floating-point his own BASIC, as the latter required hand-patching of the original machine code while MS's was written in assembler and more easily modified. The development of Apple's BASIC ended in favor of what became Applesoft BASIC. 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".2526

When the Apple II shipped in the summer of 1977, Integer BASIC was supplied in ROM, while Applesoft BASIC shipped on cassette. This changed with the introduction of the Apple II Plus in 1979, when Applesoft was put in the ROM.27

Description

Program editing

Like most BASIC implementations of the era, Integer BASIC acted as both the language interpreter as well as the line editing environment. When BASIC was running, a > command prompt was displayed where the user could enter statements.2829 Unlike later home computer platforms, BASIC was not the default environment when the Apple II started, it normally started in the monitor. BASIC was started by pressing Ctrl+BReturn.30

Statements that were entered with leading numbers are entered into the program storage for "deferred execution",31 either as new lines or replacing any that might have had the same number previously.32 Statements that were entered without a line number were referred to as commands, and ran immediately.33 Line numbers could be from 0 to 32767,3435 and lines could contain up to 128 characters.36

Integer BASIC also included the AUTO command to automatically enter line numbers at a given starting number like AUTO 100, adding 10 to the last number with every new line. AUTO 300,5 would begin numbering at line 300 by fives; 300, 305, etc. Automatic numbering was turned off by entering MAN.37

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.38 This feature could be used to create an editable text area while the rest of the screen was in graphics mode.39

Debugging

As in most BASICs, programs were started with the RUN command, and as was common, could be directed at a particular line number like RUN 300.40 Execution could be stopped at any time using Ctrl+C41 and then restarted with CONtinue, as opposed to the more typical CONT.42

For step-by-step execution, the TRACE instruction could be used at the command prompt or placed within the program itself. When it was turned on, line numbers were printed out for each line the program visited. The feature could be turned off again with NOTRACE.43

A somewhat unusual feature was the DSP (for "display") command. When encountered in a program, from that point on any changes to a variable's value would be displayed. For instance, DSP X would display the value of X every time it changed, along with the line number where the change occurred.44 As with TRACE, DSP was turned off with NODSP.45

Variable names

Where Dartmouth BASIC and HP-BASIC limited variable names to at most two characters (either a single letter or a letter followed by one digit), and where MS-BASIC allowed a letter followed by an optional letter or digit (ignoring subsequent characters), Integer BASIC was unusual in supporting any length variable name (e.g., SUM, GAMEPOINTS, PLAYER2). The only caveat was that variable names could not contain reserved words; for example, THISCOLOR and COLORFUL were invalid variable names because they contained the keyword COLOR, a system command.46 Additionally, lines were limited to 128 characters, so variable names could not exceed that length.47

Mathematics

Integer BASIC, as its name implies, uses integers as the basis for its math package. These were stored internally as a 16-bit number, little-endian (as is the 6502). This allowed a maximum value for any calculation between -32767 and 32767; although the format could also store the value -32768, BASIC could not display that number. Calculations that resulted in values outside that range produced a >32767 ERR.48

Infix operators included + (addition), - (subtraction), * (multiplication), / (division), MOD (remainder) and exponent using the ^ character. Binary operators included AND, OR and NOT. Binary comparisons included the standard set of =, >, <, >=, <=, <> and the HP-inspired #, which was equivalent to <>.49

Only single-dimension arrays were allowed, limited in size only by the available memory.50 Mathematical functions were sparse; only ABS (absolute value), SGN (sign) and RND (random number) were supported.51 In contrast to MS-derived versions, where the parameter was ignored and RND always returned a value 0..<1, Integer BASIC used the parameter; RND(6) returned an integer from 0 to 5.52

Strings

Integer BASIC's string handling was based on the system in HP BASIC. This treated string variables as arrays of characters which had to be DIMed prior to use. This is similar to the model in C53 or Fortran 77.54 This is in contrast to MS-like BASICs where strings are an intrinsic variable-length type.55 Before MS-derived BASICs became the de facto standard, this style was not uncommon; North Star BASIC56 and Atari BASIC57 used the same concept, as did others.

Strings in Integer Basic used a fixed amount of memory regardless of the number of characters used within them, up to a maximum of 255 characters.58 This had the advantage of avoiding the need for the garbage collection of the heap that was notoriously slow in MS BASIC59 but meant that strings that were shorter than the declared length resulted in wasted memory.

Substring access was provided through array slicing syntax. For instance, PRINT A$(0,5) printed the first six characters of A$, characters 0 through 5.606162 Concatenation was provided using the same system, A$(5)="ABC" replaced any characters starting at position 5 with the string "ABC".63 This contrasts with the DEC/MS-style string handling which uses string functions like MID$ to access substrings and + for concatenation.6465

As many of the features that would be provided by string functions were instead provided by array slicing, the selection of string functions was reduced. LEN returned the length of a string66 and ASC returned the ASCII numeric code for the first letter in a string.67 It lacked an equivalent of the CHR$ that returned the ASCII character with a given numeric code.68

Graphics and sound

When launched, the only game controller for the Apple was the paddle controller, which had two controllers on a single connector. The position of the controller could be read using the PDL function, passing in the controller number, 0 or 1, like A=PDL(0):PRINT A, returning a value between 0 and 255.6970

The Apple machines did not include dedicated sound hardware, only a simple "beeper". Producing sounds was accomplished by PEEKing the memory-mapped location of the speaker, -16336.71 Repeatedly PEEKing that value produced tones, and the manual suggested using a mathematical expression to do this, like S=PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336).72

Support for graphics was more detailed. Graphics mode was turned on with the GR statement and off with TEXT.73 Drawing was modal and normally started by issuing a command to change the color, which was accomplished by setting a pseudo-variable; COLOR=12 would set the drawing color to 12, light green. One could then PLOT 10,10 to produce a single spot of that color,74 HLIN 0,39 AT 20 to draw a horizontal line at row 20 that spanned the screen, or VLIN 5,15 AT 7 to draw a shorter vertical line down column 7.75 A=SCRN X,Y returned the color of the screen at X,Y.7677

Input/output

Integer BASIC lacked any custom input/output commands, and also lacked the DATA statement and the associated READ. To get data into and out of a program, the input/output functionality was redirected to a selected card slot with the PR#x and IN#x, which redirected output or input (respectively) to the numbered slot. From then on, data could be sent to the card using conventional PRINT commands and read from it using INPUT.78

Other notes

Integer BASIC included a TAB feature, which positioned the cursor on a given column from 0 to 39. It differed from the versions found in most BASICs in that it was a command with a following number, as opposed to a function with the value in parentheses; one would move the cursor to column 10 using TAB 10 in Integer BASIC79 whereas in MS this would be PRINT TAB(10). Additionally, the VTAB command worked similar to TAB but added vertical spaces instead of horizontal. For unexplained reasons, in this case the coordinates were from 1 to 24 rather than 0 to 23.80

Integer BASIC included a POP command to exit from loops.81 This popped the topmost item off the FOR stack. Atari BASIC also supported the same command,82 while North Star BASIC used EXIT.83

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.848586

Reserved words

Apple BASIC

Apple BASIC had the following commands:87

AUTO val1, val2 CLR [CLEAR] DEL val1, val2 LIST val1, val2 RUN val1 SCR [SCRATCH / NEW] HIMEM = expr LOMEM = expr (LET) var = expr INPUT (prompt,) var1, var2 ... PRINT item(s) TAB expr FOR var = expr1 TO expr2 STEP expr3 NEXT var IF expr THEN statement IF expr THEN line number GOTO expr GOSUB expr RETURN DIM var1(expr1), var2(expr2) ... REM text END POKE expr1, expr2 CALL expr Functions: ABS(), SGN(), PEEK(), RND(), LEN()

Integer BASIC

Integer BASIC added the following:8889

COLOR = expr CON [CONTINUE] DSP GR HLIN expr1, expr2 AT expr3 MAN NEW [replaces SCR] NOTRACE PLOT expr1, expr2 POP TEXT TRACE VLIN expr1, expr2 AT expr3 Function: ASC(), PDL(), SCRN(X,Y)

Implementation

Integer BASIC read the lines typed in by the user from a buffer and ran them through a parser which output a series of tokens. As part of this process, simple syntax errors were detected and listed. If the parsing was successful, the line number (if present) was converted from ASCII decimal format into a 16-bit integer and any keywords into a 7-bit integer token.90

Some keywords were represented by multiple tokens; for instance, where Microsoft BASIC had one token for the keyword PRINT, Integer BASIC had three tokens: one if the keyword was followed by no arguments, one if followed by an arithmetic expression, and one if followed by a string literal.91

Numeric literals, like the value 500, were converted into their 16-bit (two-byte) binary representation, in this case, $01F4 hexadecimal. To indicate this was a value and not a keyword, a single byte between $B0 and $B9 was inserted in front of the two-byte value.92 String literals, like "HELLO WORLD" were instead converted by setting the high bit of each character so that A was stored as $C1. Variable names were converted in the same fashion, with the letters converted to have their high-bit turned on, and any digits in the name represented by the corresponding $B0 through $B9, so that the variable A5 would be tokenized as $C1B5.93

If the line was entered without a line number, the code was then executed directly from the buffer. If it had a line number, it was copied from the buffer into the program storage area.94

The runtime interpreter used two stacks for execution: one for statement keywords and the other for evaluating the parameters. Each statement was given two priorities: one that stated where it should occur in a multi-step operation, like a string of mathematical operations to provide order of operations, and another that suggested when evaluation should occur, for instance, calculating internal values of a parentheses formula. When variables were encountered, their name was parsed and then looked up in the variable storage area. If it was not found, it was added to the end of the list. The address of the variable's storage, perhaps freshly created, was then placed on the evaluation stack.95

ROM details

SWEET16

Main article: SWEET16

In addition to Integer BASIC, the Apple ROMs contained a custom assembler language known as SWEET16. SWEET16 is based on bytecodes that run within a simple 16-bit virtual machine. 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. The entire virtual machine was written in only 300 bytes. Code can call SWEET16 by issuing a subroutine call, and then return to normal 6502 code when the 16-bit operations are complete.96

SWEET16 was not used by the core BASIC code, but was later used to implement several utilities. 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.97

Floating point

Although Integer BASIC contained its own math routines, the Apple II ROMs also included a complete floating-point library located in ROM memory between $F425-$F4FB and $F63D-$F65D. The source code was included in the Apple II manual. BASIC programs requiring floating-point calculations could CALL into these routines.98

Performance

Because Integer BASIC processed more of the original source code into tokens, the runtime was faster than versions that required additional runtime parsing. For comparison, Tiny BASIC tokenized only the line number,99 while MS BASICs tokenized only the keywords. So for instance, while Integer BASIC would convert the line 100 GOTO 200 entirely into tokens that could be immediately read and performed, in MS BASIC only the line number and GOTO would be tokenized, the "200" was left in its original ASCII format and had to be re-parsed into a 16-bit integer every time the line was encountered.100

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. As many computer benchmarks of the era were small and often performed simple math that did not require floating-point, Integer BASIC trounced most other BASICs.101

On one of the earliest known microcomputer benchmarks, the Rugg/Feldman benchmarks, Integer BASIC was well over twice as fast as Applesoft BASIC on the same machine.102 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.103 A review of Galfo Systems' Integer BASIC Compiler found that it produced code that is about 1.5 to eight times faster than compiled Applesoft BASIC, ten times faster than interpreted Integer BASIC, and 15 times faster than interpreted Applesoft.104 Integer BASIC did not appear in the Creative Computing Benchmark, which was first published in 1983, by which time the language was no longer included with Apple computers.105

The following test series, taken from both of the original Rugg/Feldman articles,106107 show Integer's performance relative to the MS-derived BASIC on the same platform.

SystemCPUBASICTest 1Test 2Test 3Test 4Test 5Test 6Test 7
Apple II6502 @ 1 MHzInteger BASIC1.33.17.27.28.818.528.0
Apple II6502 @ 1 MHzApplesoft BASIC1.38.516.017.819.128.644.8

Here is a summary of what each test did:

  • Test 1: for/next loop to 1000.
  • Test 2: if/then loop with compare to 1000.
  • Test 3: same as 2 with added multiplication, division, addition subtraction by same variable.
  • Test 4: same as 3 with added multiplication, division, addition subtraction by constants.
  • Test 5: same as 4 with added subroutine call.
  • Test 6; same as 5 with added inner loop.
  • Test 7: same as 6 with added table population.

Sample code

The following is a version of Breakout written in the 1977 version of Integer BASIC for the Apple II, which was listed in the Apple II Mini Manual.108 There are a number of known bugs in this version.109

The program starts by setting the display to TEXT and then CALL -936 to clear the screen. Lines 20 through 27, and the associated subroutines at line 100 and 200, are the color selection code Wozniak demonstrated for Jobs. Line 30 sets up the text window with POKE 32,20110 and then uses a series of COLOR and VLIN statements to draw the playfield and the score display in the text window. The entire main loop runs from line 40 through 90 with associated subroutines. Another large amount of code near the end of the program is concerned with printing the final score. Other notes of interest include the # (not-equal) comparisons on line 20, the production of a high-pitch sound using a string of PEEKs on line 65 compared to a lower-pitched tone using a loop on line 70, and the mix of graphics and text on a single display.111

5 TEXT: CALL -936: VTAB 4: TAB 10: PRINT "*** BREAKOUT GAME ***": PRINT 7 PRINT " OBJECT IS TO DESTROY ALL BRICKS WITH 5 BALLS": FOR N=1 TO 7000: NEXT N 10 DIM A$(20),B$(20): GR: PRINT: INPUT "HI, WHAT'S YOUR NAME? ",A$:A=1:B=13:C=9:D=6:E=15: PRINT "STANDARD COLORS,"; A$; 20 INPUT "? ",B$: IF B$#"N" AND B$#"NO" THEN 30: FOR I=0 TO 39: COLOR=I/2*(I<32): VLIN 0,39 AT I 25 NEXT I: POKE 34,20: PRINT: PRINT: PRINT: FOR I=0 TO 15: VTAB 21+I MOD 2: TAB I+I+1: PRINT I;: NEXT I: POKE 34,22: VTAB 24: PRINT: PRINT "BACKGROUND"; 27 GOSUB 100: A=E: PRINT "EVEN BRICK";: GOSUB 100: B=E: PRINT "ODD BRICK";: GOSUB 100: C=E: PRINT "PADDLE";: GOSUB 100: D=E : PRINT "BALL";: GOSUB 100 30 POKE34,20:COLOR=A:FORI=0TO39:VLIN0,39ATI:NEXTI:FOR I=20TO34STEP2:TAB I+1:PRINT I/2-9;:COLOR=B:VLIN 0,39 AT I:COLOR=C:FOR J=I MOD 4 TO 39 STEP4 35 VLIN J,J+1 AT I: NEXT J,I: TAB 5: PRINT "SCORE = 0": PRINT: PRINT: POKE 34,21: S=0: P=S: L=S: X=19: Y=19: X=19 40 COLOR=A:PLOTX,Y/3:X=19:Y=RND(120):V=-1:W=RND(5)-2:L=L+1:IFL>5THEN140:TAB6:PRINT"BALL #";L:PRINT:FORI=1TO100:GOSUB200:NEXTI:M=1:N=0 50 J=Y+W: IF J>=0 AND J<120 THEN 60: W=-W: J=Y: FOR I=1 TO 6: K=PEEK(-16336): NEXT I 55 IF PEEK(-16287)>127 THEN SW=1-SW 60 I=X+V: IF I<0 THEN 400: GOSUB 200: COLOR=A: K=J/3: IF I>39 THEN 70: IF SCRN(I,K)=A THEN 90: IF I THEN 120: N=N+1: V=(N>9)+1: W=(K-P)*2-5:M=1 65 Z = PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336): GOTO 90 70 FOR I=1 TO 6: M=PEEK(-16336): NEXT I: I=X: M=0 80 V=-V 90 PLOT X,Y/3: COLOR=E: PLOT I,K: X=I: Y=J: GOTO 50 99 PRINT "INVALID. REENTER"; 100 INPUT " COLOR (0 TO 15)",E: IF E<0 OR E>15 THEN 99: RETURN 120 IF M THEN V=ABS(V): VLIN K/2*2,K/2*2+1 AT I: S=S+I/2-9: VTAB 21: TAB 13: PRINT S 123 Q = PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336)-PEEK(-16336) 124 IF S<720 THEN 80 130 PRINT "CONGRATULATIONS, YOU WIN.": GOTO 150 140 PRINT "YOUR SCORE OF ";S;" IS ";: GOTO 141+S/100 141 PRINT "TERRIBLE!": GOTO 150 142 PRINT "LOUSY.": GOTO 150 143 PRINT "POOR.": GOTO 150 144 PRINT "FAIR.": GOTO 150 145 PRINT "GOOD.": GOTO 150 146 PRINT "VERY GOOD.": GOTO 150 147 PRINT "EXCELLENT.": GOTO 150 148 PRINT "NEARLY PERFECT." 150 PRINT "SAME COLORS";: GOTO 20 200 IF SW THEN 220: Q=(PDL(0)-5)/6: IF Q<0 THEN Q=0 205 IF Q>=34 THEN Q=34: COLOR=D: VLIN Q,Q+5 AT 0: COLOR=A: IF P>Q THEN 210: IF Q THEN VLIN 0,Q-1 AT 0: P=Q: RETURN 210 IF P=Q THEN RETURN: IF Q#34 THEN VLIN Q+6,39 AT 0: P=Q: RETURN 220 Q=(Y-5)/3+RND(3)*SGN(W)*(X<10 AND V<0): IF Q<0 THEN Q=0: GOTO 205 400 FOR I=1 TO 80: Q=PEEK(-16336): NEXT I: GOTO 40

Notes

Citations

Bibliography

References

  1. Weyhrich 2001. - Weyhrich, Steven (12 December 2001). "History part 3: The Apple II". Retrieved 2007-09-16. http://apple2history.org/history/ah03/

  2. Or as Bill Gates put it, "more powerful BASIC... using floating point".[3] /wiki/Bill_Gates

  3. Baum, Allan (18 July 2016). "Oral History of Allen Baum" (Interview). Interviewed by David Brock. p. 12.

  4. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  5. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  6. "Passing the 10-year mark". MEASURE Magazine. Hewlett Packard. October 1976. http://hpmemoryproject.org/news/tenyears_comp/measure_page_00.htm

  7. An IBM 370/155 cost over $2 million in 1970 (equivalent to $16,000,000 in 2024).[6]

  8. Tymshare charged about $10 per hour (equivalent to $81 in 2024) for accessing their systems,[7] while smaller services could be found for about $5.[8]

  9. Williams & Moore 1984, p. A71. - Williams, Gregg; Moore, Rob (December 1984). "The Apple Story / Part 1: Early History". Byte. pp. A67 – A71. Retrieved 23 October 2013. https://archive.org/stream/byte-magazine-1984-12/1984_12_BYTE_09-13_Communications#page/n461

  10. Fisk, Nathan (2009). Understanding Online Piracy. ABC-CLIO. p. 14. ISBN 9780313354748. 9780313354748

  11. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  12. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  13. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  14. Wozniak 1977. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  15. Weyhrich 2001, 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.. - Weyhrich, Steven (12 December 2001). "History part 3: The Apple II". Retrieved 2007-09-16. http://apple2history.org/history/ah03/

  16. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  17. "The Apple 1 Project". http://apple1.chez.com/Apple1project/Gallery/Gallery.htm

  18. "Apple I Computer Ad". 30 November 2009. http://www.gadgetspage.com/comps-peripheral/apple-i-computer-ad.html

  19. Bunnell, David (September 1975). "Across the Editor's Desk". Computer Notes. 1 (4). Albuquerque NM.: MITS: 2. Archived from the original on March 23, 2012. https://web.archive.org/web/20120323162008/http://startup.nmnaturalhistory.org/gallery/notesViewer.php?ii=75_9&p=2

  20. "Classic Gaming: A Complete History of Breakout". GameSpy. Archived from the original on August 13, 2013. Retrieved April 19, 2010. https://web.archive.org/web/20130813113450/http://classicgaming.gamespy.com/View.php?view=Articles.Detail&id=395

  21. Wozniak 2014. - Wozniak, Steven (1 May 2014). "How Steve Wozniak Wrote BASIC for the Original Apple From Scratch". Gizmodo. https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636

  22. Raskin, Roy; Wozniak, Steven (August 1976). "Floating Point Routines for the 6502". Dr. Dobb's. pp. 17–19. https://archive.org/details/dr_dobbs_journal_vol_01/page/n207/mode/2up

  23. Apple II Reference Manual. Apple Computer. January 1978. pp. 94–95.

  24. Wozniak 2018. - Wozniak, Steven (3 January 2018). "Apple BASIC". Woz.org. http://woz.org/letters/apple-basic/

  25. Wozniak 2018. - Wozniak, Steven (3 January 2018). "Apple BASIC". Woz.org. http://woz.org/letters/apple-basic/

  26. The string handling was not "his own", but the same system used by HP BASIC.

  27. Hertzfeld 1985. - Hertzfeld, Andy (June 1985). "The sad story of MacBasic". Folklore. https://www.folklore.org/StoryView.py?project=Macintosh&story=MacBasic.txt

  28. Raskin 1978, p. 11. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  29. To make it clear which BASIC was running, Applesoft used the ] prompt.

  30. Raskin 1978, p. 12. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  31. Raskin 1978, p. 46. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  32. Raskin 1978, pp. 49–55. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  33. In what MS referred to more descriptively as "immediate mode". /wiki/Direct_mode

  34. Raskin 1978, p. 48. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  35. Helmers says the lowest line number is 1.[26]

  36. Raskin 1978, p. 118. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  37. Raskin 1978, pp. 65–67. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  38. Raskin 1978, p. 124. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  39. Wozniak 1977, "This mixed mode provides a 40 by 40 color graphics grid plus four lines of scrolling text at the bottom of the screen.". - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  40. Raskin 1978, p. 100. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  41. Raskin 1978, p. 15. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  42. Raskin 1978, p. 52. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  43. Raskin 1978, p. 107. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  44. Raskin 1978, pp. 100, 101. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  45. Helmers 1978, p. 24. - Helmers, Carl (March 1978). "An Apple to Byte". Byte. pp. 18–24, 30–32, 35, 40–46. https://archive.org/stream/byte-magazine-1978-03/1978_03_BYTE_03-03_Computer_Music_Systems#page/n19/mode/2up

  46. Raskin 1978, p. 38. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  47. Raskin 1978, p. 118. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  48. Raskin 1978, p. 27. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  49. Raskin 1978, p. 61. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  50. Raskin 1978, p. 94. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  51. Raskin 1978, p. 40,120. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  52. Raskin 1978, p. 40. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  53. "Strings". learn-c.org. https://www.learn-c.org/en/Strings

  54. Brooks, Steve. "Characters & Strings in Fortran" (PDF). University of Hawaii. http://math.hawaii.edu/~dale/190/characters_formats.pdf

  55. "Integer, Floating Point and String Variables". C64 Programmer's Manual. Commodore. https://www.masswerk.at/nowgobang/2020/commodore-basic-variables

  56. North Star BASIC version 6 (PDF). North Star Corporation. 1977. Archived from the original (PDF) on 2020-03-05. Retrieved 2020-03-03. https://web.archive.org/web/20200305045335/https://itelsoft.com.au/north_star_manuals/North_Star_BASIC_Version_6.pdf

  57. The ATARI BASIC Reference Manual. Atari Inc. 1980. Archived from the original on 2005-05-01. Retrieved 2020-04-14. https://web.archive.org/web/20050501034651/http://www.strotmann.de/twiki/bin/view/Infothek/AtBasicReferenceMa

  58. Raskin 1978, p. 89. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  59. And completely broken in some versions.[48]

  60. Raskin 1978, p. 88. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  61. Raskin 1978, p. 88. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  62. HP also allowed [ and ] in place of ( and ).

  63. Raskin 1978, p. 92. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  64. altair 8080 basic manual (PDF). MITS. April 1977. p. 30. http://chiclassiccomp.org/docs/content/computing/MITS/MITS_Altair8800Basic4.1Reference_April1977.pdf

  65. It also contrasts with Dartmouth BASIC which used the CONVERT command to convert a string into an array of ASCII values which the user then manipulated and converted back to string format with a second CONVERT. /wiki/Dartmouth_BASIC

  66. Raskin 1978, p. 89. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  67. Raskin 1978, p. 120. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  68. Mini 1977, p. 17. - Apple II Mini Manual. Apple. 1977. https://archive.org/details/Apple_II_Mini_Manual/

  69. Raskin 1978, p. 36. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  70. The manual suggests, but does not outright state, that the actual range of values is less than 0 to 255.[54]

  71. The negative number is a side-effect of the integers being stored in signed format, so any memory location over 32767 appeared as a negative value in BASIC.[55]

  72. Raskin 1978, p. 84. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  73. Raskin 1978, p. 31. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  74. Raskin 1978, p. 32. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  75. Raskin 1978, p. 33. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  76. Raskin 1978, p. 120. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  77. Note the odd syntax of the SCRN, which is technically a function because it returns a value, but does not use function-like syntax which would be A=SCRN(X,Y).

  78. Raskin 1978, p. 120. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  79. Raskin 1978, p. 73. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  80. Raskin 1978, p. 74. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  81. Raskin 1978, p. 120. - Raskin, Jef (1978). Apple II BASIC Programming Manual (PDF). Apple Computer. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Basic%20Programming%20Manual.pdf

  82. Atari BASIC Reference Manual (PDF). Atari. 1983. p. 25. http://www.atarimania.com/documents/Atari-Basic-Reference-Manual-Rev-C.pdf

  83. North Star BASIC version 6 (PDF). North Star Corporation. 1977. p. 8. Archived from the original (PDF) on 2020-03-05. Retrieved 2020-03-03. https://web.archive.org/web/20200305045335/https://itelsoft.com.au/north_star_manuals/North_Star_BASIC_Version_6.pdf

  84. Wozniak 1977, p. 42. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  85. Helmers 1978, p. 18. - Helmers, Carl (March 1978). "An Apple to Byte". Byte. pp. 18–24, 30–32, 35, 40–46. https://archive.org/stream/byte-magazine-1978-03/1978_03_BYTE_03-03_Computer_Music_Systems#page/n19/mode/2up

  86. Weyhrich 2001. - Weyhrich, Steven (12 December 2001). "History part 3: The Apple II". Retrieved 2007-09-16. http://apple2history.org/history/ah03/

  87. "PRELIMINARY APPLE BASIC USERS MANUAL". October 1976. https://archive.org/details/applei_basicman

  88. "APPLE II BASIC PROGRAMMING MANUAL". 1978. https://archive.org/details/apple-ii-basic-programming/page/n1/mode/2up

  89. "APPLE II REFERENCE MANUAL" (PDF). http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20Reference%20Manual%20-%20Woz.pdf

  90. Wozniak 1977, p. 42. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  91. Paul R. Santa-Maria. "Apple II Integer Basic Disassembly" (PDF). Retrieved 2020-09-14.[permanent dead link] https://www.callapple.org/docs/ap2/special/integerbasic.pdf

  92. The first digit of the original value was used to select a value from 0 to 9, so in this example, the token would be $B5 for the first digit of 500.

  93. Wozniak 1977, p. 42. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  94. Wozniak 1977, p. 42. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  95. Wozniak 1977, p. 42. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  96. Wozniak 1977, p. 43. - Wozniak, Steven (May 1977). "System Description / The Apple-II". Byte. pp. 34–43. https://archive.org/stream/byte-magazine-1977-05/1977_05_BYTE_02-05_Interfacing#page/n35/mode/2up

  97. Apple Programmers Aid (PDF). Apple. 1978. http://www.classiccmp.org/cini/pdf/Apple/Apple%20Programmers%20Aid%20Book.pdf

  98. Apple II Reference Manual (PDF). January 1978. pp. 94–95. http://www.classiccmp.org/cini/pdf/Apple/Apple%20II%20(Redbook)%20Reference%20Manual%2030th%20Anniversary.pdf

  99. Allison, Dennis (1976). "Build Your Own BASIC". Dr. Dobb's Journal. Vol. 1, no. 1. p. 11. https://archive.org/details/dr_dobbs_journal_vol_01/page/n11

  100. Hardiman, Roger. "Altair BASIC 3.2 (4K) - Annotated Disassembly". p. 1.11. Archived from the original on 5 November 2001. https://web.archive.org/web/20011105014524/http://www.rjh.org.uk/altair/4k/int_dis_11.htm

  101. Bill Gates complained about this, stating that it was unfair to compare Integer BASIC to a "real" BASIC like MS.[75] /wiki/Bill_Gates

  102. Rugg, Tom; Feldman, Phil (June 1977). "BASIC Timing Comparisons… information for speed freaks". Kilobaud. pp. 66–70. https://archive.org/details/kilobaudmagazine-1977-06

  103. Gilbreath, Jim (September 1981). "A High-Level Language Benchmark". Byte. p. 192. https://archive.org/details/byte-magazine-1981-09/page/n181

  104. Taylor, Joseph H.; Taylor, Jeffrey S. (September 1982). "A Comparison of Five Compilers for Applesoft BASIC". BYTE. pp. 440–464. Retrieved 2024-12-30. https://archive.org/details/byte-magazine-1982-09/page/n438/mode/1up?view=theater

  105. Ahl, David (November 1983). "Benchmark Comparison Test". Creative Computing. p. 260. https://archive.org/details/creativecomputing-1983-11/page/n271/mode/2up

  106. Rugg, Tom; Feldman, Phil (June 1977). "BASIC Timing Comparisons… information for speed freaks". Kilobaud. pp. 66–70. https://archive.org/details/kilobaudmagazine-1977-06

  107. Rugg, Tom; Feldman, Phil (October 1977). "BASIC timing comparisons… revised and updated". Kilobaud. pp. 20–25. https://archive.org/details/kilobaudmagazine-1977-10

  108. Mini 1977, pp. 65–67. - Apple II Mini Manual. Apple. 1977. https://archive.org/details/Apple_II_Mini_Manual/

  109. "Breakout, Annotated". GitHub. 16 August 2021. https://github.com/cmosher01/Apple-II-Source/blob/master/docs/breakout.md

  110. Meaning the text starts at line 20 of 24 lines on the screen, leaving four lines of text at the bottom.

  111. For a list of the various CALLs, PEEKs and POKEs that performed common operations on the Apple II, see Peeks, Pokes, Calls And Programming Notes, Charles Turley, 15 December 1996. https://mirrors.apple2.org.za/ground.icaen.uiowa.edu/Collections/1WSW/MEGA.PEEKS.AND.POKES.html