Applesoft BASIC

The first version of Applesoft was released in 1977 on cassette tape and lacked proper support for high-resolution graphics.

It is this latter version, which has some syntax differences and support for the Apple II high-resolution graphics modes, that is usually synonymous with the term "Applesoft."

The Apple II was unveiled to the public at the West Coast Computer Faire in April 1977 and became available for sale in June.

[2] Making things more problematic was that the rival Commodore PET personal computer had a floating point-capable BASIC interpreter from the beginning.

Since Apple had no 6502 assembler on hand, the development team was forced to send the source code over the phone lines to Call Computer, an outfit that offered compiler services.

The programmer may designate variables as integer by following them with a percent sign, in which case they use two bytes and are limited to a range of -32768 to 32767; however BASIC internally converts them back to floating point when performing calculations, while each percent sign also takes an additional byte of program code, so in practice this feature is only useful for reducing the memory usage of large array variables, as it offers no performance benefit.

Like other implementations of Microsoft BASIC, Applesoft discards spaces (outside of strings and comments) on program lines.

Through several early models of the Apple II, Applesoft BASIC did not support the use of lowercase letters in programs, except in strings.

The Apple II disk operating system, known simply as DOS, augments the language to provide such abilities.

The name "SCORE" for a variable is interpreted as containing the OR Boolean operator, rendered as SC OR E. "BACKGROUND" contains GR, the command to invoke the low-resolution graphics mode, and results in a syntax error.

Programs can, however, store a machine-language routine to be called to generate electronic musical tones spanning several octaves.

High resolution allows arbitrary lines and vector-based shape tables for drawing scaled and rotated objects.

A deficiency with error-trapping via ONERR means that the system stack is not reset if an error-handling routine does not invoke RESUME, potentially leading to a crash.

[1] Few action games were written in Applesoft BASIC, in large part because the use of floating-point numbers for all math operations degrades performance.

Applesoft BASIC programs are stored as a linked list of lines; a GOTO or GOSUB takes linear time.

Unlike Integer BASIC, Applesoft does not convert literal numbers (like 100) in the source code to binary when a line is entered.

in Applesoft BASIC can be entered as the following: Multiple commands can be included on the same line of code if separated by a colon (:).

When the enhanced Apple II+ replaced the original II in 1979, Applesoft was now included in ROM and automatically started on power-up if no bootable floppy disk was present.

Conversely, Integer BASIC was now removed from ROM and turned into an executable file on the DOS 3.3 disk.

All command names are of the form PLTx such that GR, COLOR=, PLOT, HLIN and VLIN are called PLTG, PLTC, PLTP, PLTH, and PLTV, respectively.

To maintain consistency with Integer BASIC, the "Ok" prompt from Microsoft's code was replaced by a ] character.