# BASIC Programming

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/BASIC_Programming
> Markdown URL: https://mediated.wiki/source/BASIC_Programming.md
> Source: https://en.wikipedia.org/wiki/BASIC_Programming
> Source revision: 1311481745
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

This article is about the Atari 2600 cartridge. For programming in other BASIC dialects, see [BASIC](/source/BASIC). For other uses, see [Basic programming](/source/Basic_programming_(disambiguation)).

This article needs additional citations for verification. Please help improve this article by adding 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 Developer Atari, Inc. Publishers Atari, Inc. Designer Warren Robinett[2] Platform Atari 2600 Release April 1980[1]

***BASIC Programming*** is an Atari Video Computer System (later called the [Atari 2600](/source/Atari_2600)) cartridge that teaches simple computer programming using a dialect of [BASIC](/source/BASIC). Written by [Warren Robinett](/source/Warren_Robinett) and released by [Atari, Inc.](/source/Atari%2C_Inc.) in 1980, this [BASIC interpreter](/source/BASIC_interpreter) is one of a few non-game cartridges for the console. The Atari VCS's [RAM](/source/Random-access_memory) size of 128 bytes restricts the possibilities for writing programs.

## Details

Main display

The *BASIC Programming* display is divided into six regions:

- **Program** is where instructions are typed. It has a maximum of eleven lines of code.

- **[Stack](/source/Call_stack)** shows temporary results of what the program does.

- **[Variables](/source/Variable_(computer_science))** 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

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.

- An If statement can be used as a function, returning a value: Ver1←Ver1+IfVer1[Mod](/source/Modulo_operation)2Then8Else92

- If statements can take an Else clause.

Special variable names:

- Note sounds a musical note, assigned numbers from 0 to 7 - Numbers assigned to Note 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

The following example of a *[Pong](/source/Pong)* game is provided.

1 Hor2←2+Key
2 IfVer1>90ThenVer1←88
3 IfHitThenVer1←9
4 Ver1←Ver1+IfVer1[Mod](/source/Modulo_operation)2Then8Else92
5 Hor1←Hor1+7
6 Goto1

## See also

- [Video games portal](https://en.wikipedia.org/wiki/Portal:Video_games)

- [List of Atari 2600 games](/source/List_of_Atari_2600_games)

- [Spectravideo CompuMate](/source/CompuMate)

- [Family BASIC](/source/Family_BASIC)

## References

1. **[^](#cite_ref-1)** ["Atari VCS game release dates"](https://www.atariarchive.org/atari-vcs-game-release-dates/). *Atari Archive*.

1. **[^](#cite_ref-2)** Hague, James (March 1997). ["Warren Robinett"](https://dadgum.com/halcyon/BOOK/ROBINETT.HTM). [*Halcyon Days: Interviews with Classic Computer and Video Game Programmers*](/source/Halcyon_Days_(book)). Retrieved 15 September 2025. How long did it take to write?...I had *Adventure* 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 the *BASIC Programming* cartridge, and finished them both simultaneously, in June 1979.

1. **[^](#cite_ref-3)** [Controllers - Atari Keypad](https://atariage.com/controller_page.html?ControllerID=4&SystemID=2600), [Archived](https://web.archive.org/web/20150615042830/https://atariage.com/controller_page.html?ControllerID=4&SystemID=2600) 15 June 2015 at the [Wayback Machine](/source/Wayback_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.*

1. **[^](#cite_ref-4)** *BASIC Programming: Atari Game Program Instructions*. Sunnyvale, CA: Atari, Inc. 1979.

## External links

- [Compumate FAQ:BASIC PROGRAMME EXAMPLES FOR ATARI 2600 (BASIC PROGRAMMING & CompuMate)](https://web.archive.org/web/20040123023347/http://www.mindspring.com/~sidartha/Basic%20and%20Compumate%20Programming.htm) at the [Wayback Machine](/source/Wayback_Machine) (archived 23 January 2004)

v t e Dialects of the BASIC programming language (list) Classic Microsoft Microsoft BASIC TRS-80 BASICs (Level I, Level II/III) Thomson BASIC 1.0 Texas Instruments TI-BASIC (calculators) TI Extended BASIC (aka XBasic) TI-BASIC 83 Hewlett-Packard HP Time-Shared BASIC Rocky Mountain BASIC HP Basic Locomotive Software Locomotive BASIC Mallard BASIC Microcomputers Atom BASIC Integer BASIC North Star BASIC SCELBAL Minicomputers BASIC-11 Business Basic (B32, Data General) Data General Extended BASIC Southampton BASIC System Wang BASIC Time-sharing computers BASIC-PLUS VSI BASIC for OpenVMS SUPER BASIC CALL/360:BASIC Other AlphaBasic Astro BASIC BASICODE BAL Casio BASIC CBASIC PBASIC SDS BASIC Tiny BASIC UBASIC ZBasic Extenders BASIC 8 Simons' BASIC Super Expander Super Expander 64 YS MegaBasic Procedure- oriented Proprietary AmigaBASIC AMOS BASIC ASIC BasicX Beta BASIC FutureBASIC GRASS Liberty BASIC LSE MapBasic Mobile BASIC OWBasic PowerBASIC PureBasic SmileBASIC Tiger-BASIC True BASIC Turbo Basic WordBASIC Free and open source Basic-256 Basic4GL BBC BASIC V DarkBASIC Indic BASIC Open Programming Language SdlBasic SmallBASIC QB64 wxBasic XBasic Xblite Yabasic With object extensions Proprietary AutoIt Chipmunk Basic GLBasic LotusScript Morfik PowerBASIC VBA VBScript VB 5 for Microsoft Excel 5.0 VSTO VSTA Embedded Visual Basic Free and open source BlitzMax FreeBASIC Microsoft Small Basic Mono-Basic OpenOffice Basic Roslyn RAD designers Proprietary CA-Realizer Visual Basic (classic) NS Basic RapidQ Visual Basic .NET (Mercury) Xojo Free and open source B4X (Basic4android, Basic4ppc) Gambas WinFBE, Visual FB Editor Defunct Altair BASIC Applesoft BASIC Apple Business BASIC Atari BASIC Atari Microsoft BASIC Atari ST BASIC BASIC A+ BASIC XE BASIC XL BASIC Programming (Atari 2600) BBC BASIC Benton Harbor BASIC Chinese BASIC Commodore BASIC Color BASIC Dartmouth BASIC Disk Extended Color BASIC Extended Color BASIC Family BASIC GFA BASIC GW-BASIC IBM BASIC JR-BASIC MacBASIC MBASIC MSX BASIC MS BASIC for Macintosh QBasic QuickBASIC S-BASIC Sinclair BASIC STOS BASIC SuperBASIC TI BASIC (TI 99/4A) Turbo-BASIC XL Vilnius BASIC

---
Adapted from the Wikipedia article [BASIC Programming](https://en.wikipedia.org/wiki/BASIC_Programming) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/BASIC_Programming?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
