본문으로 건너뛰기
게임 · 리뷰 · 데이터베이스
포럼
BASIC Programming cover
← 게임 아카이브

BASIC Programming

🌐 원어 표시 중 이 기사는 아직 한국어로 번역되지 않았습니다. 원본 버전을 보고 계십니다. 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 […]

01
개요

게임 소개

🌐

원어 표시 중

이 기사는 아직 한국어로 번역되지 않았습니다. 원본 버전을 보고 계십니다.

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

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. 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:

  • 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+IfVer1Mod2Then8Else92
  • 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.

1 Hor2←2+Key
2 IfVer1>90ThenVer1←88
3 IfHitThenVer1←9
4 Ver1←Ver1+IfVer1Mod2Then8Else92
5 Hor1←Hor1+7
6 Goto1

See also

  • List of Atari 2600 games
  • Spectravideo CompuMate
  • Family BASIC

참고 자료

외부 링크

  • Compumate FAQ:BASIC PROGRAMME EXAMPLES FOR ATARI 2600 (BASIC PROGRAMMING & CompuMate) at the Wayback Machine (archived 23 January 2004)
커뮤니티 / 토론

대화에 참여하기

의견을 남겨주세요

Gamer24H 검색

3자 이상 입력하세요.

탐색

디자인 설정

테마 색상 선택

자동 mode follows your device and switches to Xbox, PlayStation, or Nintendo colors on matching stories. Your manual choice stays on this device.

🌍 언어 선택 25 개 언어
🔍