Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

BASIC Programming

From Wikipedia, the free encyclopedia
This article is about the Atari 2600 cartridge. For programming in other BASIC dialects, seeBASIC. For other uses, seeBasic programming.
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "BASIC Programming" – news ·newspapers ·books ·scholar ·JSTOR
(October 2017) (Learn how and when to remove this message)

1980 video game
BASIC Programming
DeveloperAtari, Inc.
PublishersAtari, Inc.
DesignerWarren Robinett[2]
PlatformAtari 2600
ReleaseApril 1980[1]

BASIC Programming is an Atari Video Computer System (later called theAtari 2600) cartridge that teaches simple computer programming using a dialect ofBASIC. Written byWarren Robinett and released byAtari, Inc. in 1980, thisBASIC interpreter is one of a few non-game cartridges for the console. The Atari VCS'sRAM size of 128 bytes restricts the possibilities for writing programs.

Details

[edit]
Main display

TheBASIC Programming display is divided into six regions:

  • Program is where instructions are typed. It has a maximum of eleven lines of code.
  • Stack shows temporary results of what the program does.
  • Variables stores the values of any variables that the program is using.
  • Output displays any output values that the program creates.
  • Status shows the amount of available memory remaining.
  • Graphics contains two colored squares that can be manipulated by the program.

Input is given through two Atari keypad controllers, which came with special overlays to show how to type the different commands and letters.[3] Programs are restricted to 64 characters in size and normally 9 lines of code, limiting the programs that can be written (users can disable all windows except Program and keep selecting "New Line" until 11 lines of code are present).

Language features

[edit]

VCS BASIC supports the following keywords:[4]

  • Statements:Print
  • Structure:Goto,If-Then-Else
  • Graphics:Clear
  • Functions:Hit,Key
  • Math:+ - × ÷ Mod
  • Relational operators:< > =

Unlike most BASIC implementations of the time:

  • VCS BASIC uses ← instead of = for assignment; e.g.,A←A+1.
  • Statements can be strung together on a line without a delimiter; e.g.,Note←APrintA.
  • AnIf statement can be used as a function, returning a value:Ver1Ver1+IfVer1Mod2Then8Else92
  • If statements can take anElse clause.

Special variable names:

  • Note sounds a musical note, assigned numbers from 0 to 7
    • Numbers assigned toNote are implicitly assigned modulus 8, thus 8 becomes 0, 9 becomes 1, etc.
  • Hor1,Hor2 - the horizontal coordinate of one of two squares
  • Ver1,Ver2 - the vertical coordinate of one of two squares

The language supports 26 unsigned integer variables A to Z. VCS BASIC supports integers from 0 to 99. Math operations wrap, so 99+1 becomes 0, 99+2 becomes 1, etc.

Sample code

[edit]

The following example of aPong game is provided.

1 Hor2←2+Key2IfVer1>90ThenVer1883IfHitThenVer194Ver1Ver1+IfVer1Mod2Then8Else925 Hor1←Hor1+76Goto1

See also

[edit]

References

[edit]
  1. ^"Atari VCS game release dates".Atari Archive.
  2. ^Hague, James (March 1997)."Warren Robinett".Halcyon Days: Interviews with Classic Computer and Video Game Programmers. Retrieved15 September 2025.How long did it take to write?...I hadAdventure sort of done in the fall of 1978, but I wasn't satisfied. I sort of put it on the shelf for the next six months while I did theBASIC Programming cartridge, and finished them both simultaneously, in June 1979.
  3. ^Controllers - Atari Keypad,Archived 15 June 2015 at theWayback Machine Atari KeypadSystem: Atari 2600, Model Number: CX50,Sold in pairs, functionally identical to the Kid's Controller and the Video Touch Pad. Included overlays with commands, meant to be used with Basic Programming.
  4. ^BASIC Programming: Atari Game Program Instructions. Sunnyvale, CA: Atari, Inc. 1979.

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=BASIC_Programming&oldid=1311481745"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp