Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Applesoft BASIC
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==History== When [[Steve Wozniak]] wrote [[Integer BASIC]] for the [[Apple II]], he did not implement support for [[floating-point arithmetic]] because he was primarily interested in writing games, a task for which integers alone were sufficient.<ref name="wozniak20140501">{{cite web |url = https://gizmodo.com/how-steve-wozniak-wrote-basic-for-the-original-apple-fr-1570573636 |title = How Steve Wozniak Wrote BASIC for the Original Apple From Scratch |website = Gizmodo |date = May 1, 2014 |access-date = May 2, 2014 |author = Wozniak, Steve }}</ref> In 1976, Microsoft had developed [[Microsoft BASIC]] for the [[MOS Technology 6502]], but at the time there was no production computer that used it. Upon learning that Apple had a 6502 machine, Microsoft asked if the company were interested in licensing BASIC, but [[Steve Jobs]] replied that Apple already had one. The Apple II was unveiled to the public at the [[West Coast Computer Faire]] in April 1977 and became available for sale in June. One of the most common customer complaints about the computer was BASIC's lack of floating-point math.<ref>{{Cite magazine |url = https://techland.time.com/2012/04/16/apple-ii-forever-a-35th-anniversary-tribute-to-apples-first-iconic-product/ |title = Apple II Forever: a 35th-Anniversary Tribute to Apple's First Iconic Product |last = McCracken |first = Harry |date = April 16, 2012 |magazine = Time |access-date = June 21, 2019 |language = en-US |issn = 0040-781X }}</ref> Making things more problematic was that the rival [[Commodore PET]] personal computer had a floating point-capable BASIC interpreter from the beginning. As Wozniak—the only person who understood Integer BASIC well enough to add floating point features—was busy with the [[Disk II]] drive and controller and with [[Apple DOS]], Apple turned to Microsoft. Apple reportedly obtained an eight-year license for Applesoft BASIC from Microsoft for a flat fee of $31,000, renewing it in 1985 through an arrangement that gave Microsoft the rights and source code for Apple's [[MacBASIC|Macintosh version of BASIC]].<ref>{{cite web |last = Herzfeld |first = Andy |title = MacBasic – The Sad Story of MacBasic |url = http://www.folklore.org/StoryView.py?project=Macintosh&story=MacBasic.txt |website = Folklore.org |date = February 12, 2014 }}</ref> Applesoft was designed to be backwards-compatible with Integer BASIC and uses the core of Microsoft's 6502 BASIC implementation, which includes using the GET command for detecting key presses and not requiring any spaces on program lines. While Applesoft BASIC is slower than Integer BASIC, it has many features that the older BASIC lacks: * Atomic strings: A string is no longer an array of characters (as in Integer BASIC and [[C (programming language)|C]]); it is instead a [[garbage collection (computer science)|garbage-collected]] object (as in [[Scheme (programming language)|Scheme]] and [[Java (programming language)|Java]]). This allows for string arrays; {{code|DIM A$(10)|basic}} creates an array of ''eleven'' string variables numbered 0–10. * Multidimensional [[array (data type)|arrays]] (numbers or strings) * Single-precision floating-point variables with an 8-bit exponent and a 31-bit significand and improved math capabilities, including trigonometry and logarithmic functions * Commands for high-resolution graphics * <code>DATA</code> statements, with <code>READ</code> and <code>RESTORE</code> commands, for representing numerical and string values in quantity * <code>CHR$</code>, <code>STR$</code>, and <code>VAL</code> functions for converting between string and numeric types (both languages did have the <code>ASC</code> function) * [[User-defined function]]s: simple one-line functions written in BASIC, with a single parameter * Error-trapping: allowing BASIC programs to handle unexpected errors via subroutine written in BASIC Conversely, Applesoft lacks the <code>MOD</code> (remainder) operator from Integer BASIC. Adapting BASIC for the Apple II was a tedious job as Apple received a source listing for Microsoft 6502 BASIC which proved to be buggy and also required the addition of Integer BASIC commands. 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. This was an extremely tedious, slow process and after Call Computer lost the source code due to an equipment malfunction, one of the programmers, Cliff Huston, used his own IMSAI 8080 computer to [[cross assembler|cross assemble]] the BASIC source.<ref>{{cite book |chapter-url = http://apple2history.org/history/ah16/ |title = History of the Apple II |chapter = Chapter 16: Languages |date = July 2010 |access-date = July 6, 2016 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)