Applesoft BASIC - Sample Code

Sample Code

Hello World in Applesoft BASIC could be entered as the following:

10 TEXT:HOME 20 ?"HELLO WORLD"

Multiple commands could be included on the same line of code if separated by a colon (:). The ? can be used in Applesoft BASIC (and almost all versions of Microsoft BASIC) as a shortcut for "PRINT", though spelling out the word is not only acceptable but canonical—Applesoft converted "?" in entered programs to the same token as "PRINT" (thus no memory is actually saved by using "?"), thus either would appear as "PRINT" when a program was listed. The program above would appear in a LIST command as:

10 TEXT : HOME 20 PRINT "HELLO WORLD"

This article includes text from Everything2, licensed under GFDL.

When Applesoft BASIC was initially released in mid-1978, it came on cassette tape and could be loaded into memory via the Apple II's machine language monitor. 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.

Read more about this topic:  Applesoft BASIC

Famous quotes containing the words sample and/or code:

    The present war having so long cut off all communication with Great-Britain, we are not able to make a fair estimate of the state of science in that country. The spirit in which she wages war is the only sample before our eyes, and that does not seem the legitimate offspring either of science or of civilization.
    Thomas Jefferson (1743–1826)

    Motion or change, and identity or rest, are the first and second secrets of nature: Motion and Rest. The whole code of her laws may be written on the thumbnail, or the signet of a ring.
    Ralph Waldo Emerson (1803–1882)