BASIC Programming: Difference between revisions

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
imported>Matthias M.
 
imported>Krótki
Added details to "Halcyon Days" citation template.
 
Line 1: Line 1:
{{About|the Atari 2600 cartridge|programming in other BASIC dialects|BASIC|other uses|Basic programming (disambiguation){{!}}Basic programming}}
{{About|the Atari 2600 cartridge|programming in other BASIC dialects|BASIC|other uses|Basic programming (disambiguation){{!}}Basic programming}}
{{more citations needed|date=October 2017}}
{{Use dmy dates|date=July 2017}}
{{Use dmy dates|date=July 2017}}
{{more citations needed|date=October 2017}}
{{Infobox video game
{{Infobox video game
|title        = BASIC Programming
|title        = BASIC Programming
Line 8: Line 7:
|developer    = [[Atari, Inc.]]
|developer    = [[Atari, Inc.]]
|publisher    = Atari, Inc.
|publisher    = Atari, Inc.
|designer    = [[Warren Robinett]]<ref>[https://dadgum.com/halcyon/BOOK/ROBINETT.HTM Interview:Warren Robinett], By James Hague, ''Halcyon Days'', "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."</ref>
|designer    = [[Warren Robinett]]<ref>{{cite book |last=Hague |first=James | date=March 1997 |title=Halcyon Days: Interviews with Classic Computer and Video Game Programmers |title-link=Halcyon Days (book) |chapter=Warren Robinett |access-date=September 15, 2025 |chapter-url=https://dadgum.com/halcyon/BOOK/ROBINETT.HTM |quote=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.}}</ref>
|released    = 1979
|released    = April 1980<ref>{{cite web |title=Atari VCS game release dates |url=https://www.atariarchive.org/atari-vcs-game-release-dates/ |website=Atari Archive}}</ref>
|platforms    = [[Atari 2600]]
|platforms    = [[Atari 2600]]
}}
}}


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


==Details==
==Details==
[[Image:Basicprogramming.png|thumb|upright=2|Main display]]
[[File:Basicprogramming.png|thumb|upright=2|Main display]]


The ''BASIC Programming'' display is divided into six regions:
The ''BASIC Programming'' display is divided into six regions:
Line 74: Line 73:


==External links==
==External links==
* {{atarimania|id=20194}}
* {{webarchive |url=https://web.archive.org/web/20040123023347/http://www.mindspring.com/~sidartha/Basic%20and%20Compumate%20Programming.htm |date=23 January 2004 |title=Compumate FAQ:BASIC PROGRAMME EXAMPLES FOR ATARI 2600 (BASIC PROGRAMMING & CompuMate)}}
* {{webarchive |url=https://web.archive.org/web/20040123023347/http://www.mindspring.com/~sidartha/Basic%20and%20Compumate%20Programming.htm |date=January 23, 2004 |title=Compumate FAQ:BASIC PROGRAMME EXAMPLES FOR ATARI 2600 (BASIC PROGRAMMING & CompuMate)}}


{{BASIC}}
{{BASIC}}


[[Category:1979 software]]
[[Category:1980 software]]
[[Category:Atari 2600]]
[[Category:Atari 2600]]
[[Category:BASIC interpreters]]
[[Category:BASIC interpreters]]

Latest revision as of 11:16, 15 September 2025

Script error: No such module "about". Template:More citations needed Template:Use dmy dates Template:Main otherScript error: No such module "infobox".Template:Main otherScript error: No such module "Check for unknown parameters".Template:Main other

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

Details

File:Basicprogramming.png
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 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.[1] 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:[2]

  • 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: Template:CodettMod2Template:CodettTemplate:Codett92
  • 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 game is provided.

<templatestyles src="Pre/styles.css"/>

1 Hor2←2+Key
2 Template:Codett
3 Template:CodettTemplate:Codett
4 Template:CodettMod2Template:CodettTemplate:Codett92
5 Hor1←Hor1+7
6 Template:Codett

See also

Script error: No such module "Portal".

References

Template:Reflist

External links

Template:BASIC

  1. Controllers - Atari Keypad, Template:Webarchive 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.
  2. Script error: No such module "citation/CS1".