community
directory
books
authors
images
encyclopedia

Email:
Password:
Register

Knowledgerush Search

 

Google
  Web knowledgerush


Search for images of Applesoft BASIC programming language


Message boards   Post comment

Applesoft BASIC programming language

The first BASIC dialect on the Apple II computer was Integer BASIC, coded and hand-assembled by Steve Wozniak, one of the founders of Apple Computer. It could only handle numbers between -32767 and 32767 and had some limitations with respect to string arrays, but it was fast and bug-free.

Enter Bill Gates and Microsoft. Apple was looking for a new version of BASIC for the Apple II Plus computer with 48 KB of RAM. After their success with Altair BASIC, Microsoft was the BASIC vendor of choice at the time; Apple licensed a 10 KB assembly language version of BASIC called "Applesoft." It was similar to BASIC implementations on other 6502-based computers: it used line numbers, spaces were not necessary in lines, plus it had some killer features that Integer BASIC lacked:

  • Atomic strings. A string is no longer an array of characters (like in C); it is instead a garbage-collected object (like in Scheme and Java). This allows for string arrays; DIM A$(10) got you a vector of ten string variables.
  • Multidimensional arrays.
  • Single-precision floating point variables with an 8-bit exponent and a 31-bit significand. Along with this came a trigonometry library.
  • High-resolution graphics.
  • CHR$, ASC, STR$, and VAL functions for converting between string and numeric types
  • No more writing LET

Why weren't many action games written in Applesoft BASIC?

  • In this era of carefully counting clock cycles and limited memory, it was silly to write speed-dependent programs that ran only through a runtime interpreter.
  • Integer variables had to be converted to reals before math could be performed on them; they were then converted back to integers. Slowly. Microsoft did not special case this.
  • So-called shape tables are a slow alternative to bitmaps. No provision existed for mixing text and graphics, except for the limited "Hardware split screen" of the Apple II (four lines of text at the bottom of the screen). No provision was added in the 128 KB Apple IIe and Apple IIc models' BASIC interpreters for the new machines' extra memory and double-resolution graphics, or for the Apple IIGS's 16-color mode. (Beagle Bros offered machine-language workarounds for these problems.)
  • The program was stored as a linked list of lines; a GOTO took O(n) (linear) time.
  • No sound support.
  • The closed source movement was just beginning; software publishers found it was harder to crack a compiled binary than an interpreted source.

Here's Hello World in Applesoft BASIC:

10 TEXT:HOME 20 ?"HELLO WORLD"

External links

Source: http://everything2.com/?node=Applesoft+BASIC

Referenced By

Apple II | Apple II family | Apple IIc | Apple IIe | BASAIC programming language | BASIC | BASIC language | BASIC programming language | Coleco Adam | Dartmouth BASIC programming language | Integer BASIC programming language | ROM BASIC programming language

 

Compose Your Message

Your Email Address or Pen Name (optional):
Subject:
Your Message:
 

 

 

 

 

 

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Applesoft BASIC programming language".

 

Contact UsPrivacy Statement & Terms of Use

 
Copyright © 1999-2003 Knowledgerush.com. All rights reserved.