FACTOID # 22: South Dakota has the highest employment ratio in America, but the lowest median earnings of full-time male employees.
 
 Home   Encyclopedia   Statistics   States A-Z   Flags   Maps   FAQ   About 
   
 
WHAT'S NEW
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > ATARI BASIC
Atari BASIC
Developer: Shepardson Microsystems
Latest Release: Revision C / 1983
Release date: 1979
Platform: Atari 400/800/XL/XE
Genre: BASIC
Media: cartridge
License: Copyright © 1979 Atari Inc.

ATARI BASIC was a ROM resident BASIC interpreter for the Atari 8-bit family of 6502-based home computers. The interpreter originally shipped on an 8 KB cartridge; on later XL/XE model computers it was built in, and would load by default when the machines were booted without other carts in place. The complete commented source code and design specifications of ATARI BASIC had been published early as a book.[1] This marked the first time source code was made available for a commercial language. Image File history File links AtariBasicExample. ... A software developer is a programmer who is concerned with one or more facets of the software development process, a somewhat broader scope of computer programming. ... Shepardson Microsystems, Inc. ... This page refers to the year 1979. ... An Atari 800XL, one of the most popular machines in the series. ... This is a listing of computer and video game genres with brief descriptions and examples from each genre. ... BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... In a variety of electronic equipments, a cartridge (in video game terms, cart, game pack, or Game Pak) can be one method of programming different functionality, providing variable content, or a method by which consumables may be replenished. ... A software license is a legal agreement which may take the form of a proprietary or gratuitous license as well as a memorandum of contract between a producer and a user of computer software. ... Read-only memory (ROM) is a class of storage media used in computers and other electronic devices. ... BASIC (Beginners All-purpose Symbolic Instruction Code) is a family of high-level programming languages. ... An interpreter is a computer program that executes other programs. ... An Atari 800XL, one of the most popular machines in the series. ... The MOS Technology 6502 is an 8-bit microprocessor designed by MOS Technology in 1975. ... TRS-80 Color Computer II The home computer is a consumer-friendly word for the second generation of microcomputers (the technical term that was previously used), entering the market in 1977 and becoming common during the 1980s. ... A kilobyte (derived from the SI prefix kilo-, meaning 1000) is a unit of information or computer storage equal to either 1024 or 1000 bytes. ... In a variety of electronic equipments, a cartridge (in video game terms, cart, game pack, or Game Pak) can be one method of programming different functionality, providing variable content, or a method by which consumables may be replenished. ... It has been suggested that System partition and boot partition be merged into this article or section. ... Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ...

Contents


Background

The machines that would become the Atari 8-bit family had originally been developed as a 2nd generation games console intended to replace the Atari 2600. Ray Kassar, the new president of Atari, decided to challenge Apple Computer Corp. by building a home computer. This meant Atari needed the BASIC programming language, the standard language for many home computers. An Atari 800XL, one of the most popular machines in the series. ... The Nintendo GameCube is an example of a popular video game console. ... The Atari 2600, released in 1977, is the first successful video game console to use plug-in cartridges instead of having one or more games built in. ... Apple Computer, Inc. ... Basic may be: Look up basic in Wiktionary, the free dictionary. ...


Atari did what many of the other home computer companies did: they purchased the source code to Microsoft 8K BASIC with the intent to port it to run on the new machines. This turned out to be more difficult than expected; the 8K code expanded to over 11K when ported from the Intel 8080's instruction set to the Atari's 6502 instruction set, and the maximum cartridge size was 8k of ROM. Six months and many man-hours later, they were almost ready. But Atari had a deadline with the Consumer Electronics Show (CES) approaching and decided to ask for help. Source code (commonly just source or code) is any series of statements written in some human-readable computer programming language. ... Microsoft BASIC is the foundation product of the Microsoft company. ... In computer science, porting is the adaptation of a piece of software so that it will function in a different computing environment to that for which it was originally written. ... Intel C8080A processor. ... An instruction set, or instruction set architecture (ISA), describes the aspects of a computer architecture visible to a programmer, including the native datatypes, instructions, registers, addressing modes, memory architecture, interrupt and exception handling, and external I/O (if any). ...


Shepardson Microsystems

In September 1978 Atari asked Shepardson Microsystems, Inc. (SMI) to bid on a new custom BASIC. Shepardson had written a number of programs for the 6502-based Apple II, and were in the midst of finishing a new BASIC (the Cromemco 32K structured BASIC). When the specifications were finalized in October of 1978, Paul Laughton and Kathleen O'Brien began work on the new Atari BASIC. The contract specified a delivery date by April 6, 1979 and this also included a File Manager System (later known as DOS 1.0). Atari's plans were to take an early 8K version of Microsoft BASIC to the 1979 CES and then switch to the new Atari BASIC for production. Look up September in Wiktionary, the free dictionary. ... 1978 (MCMLXXVIII) was a common year starting on Sunday (the link is to a full 1978 calendar). ... Shepardson Microsystems, Inc. ... The 1977 Apple II, complete with integrated keyboard, color graphics, sound, a plastic case, and eight expansion slots. ...


The result was a rather different version of BASIC, known as ATARI BASIC. Unlike the MS BASIC which followed DEC conventions, the new BASIC was patterned on Data General's BASIC and had a number of obvious differences. Thanks to a bonus clause in the contract, development proceeded quickly and an 8K cartridge was available just before the release of the machines. Because of the speed in getting Atari BASIC, Atari ended up taking it to CES instead of the pre-production Microsoft BASIC. Digital Equipment Corporation was a pioneering company in the American computer industry. ... Data General was one of the first minicomputer firms from the late 1960s. ...


Shepardson's programmers found bugs in the first-pass review and managed to fix some of them but Atari had already committed BASIC to manufacturing. This initial version became known as Revision A.

  • Revision A - First Atari BASIC cartridge. 8kB ROM.
  • Revision B - Fixed all of the major bugs in Revision A, but introduced a leaking memory bug. Found built-in on the 600XL and early 800XLs. No cartridges.
  • Revision C - Eliminated memory leak in Revision B. Found on later 800XLs, the 800XLF, XEGS and all XE computers. Limited cartridge production run.

A memory leak is a particular kind of unnecessary memory consumption by a computer program, where the program fails to release memory that is no longer needed. ...

Description

ATARI BASIC used a token structure to handle processing. After the user entered a line, BASIC would do syntax checking, then tokenize the statement. This "pre-compiling" reduced memory and enabled faster execution. Variables were stored in the variable name table (VNTP - 82, 8316) and the values were store in the variable value table (VVTP - 86, 8716). The string arrays had their own area (STARP - 8C, 8D16) as did the runtime stack (RUNSTK - 8E, 8F16). Finally, the end of BASIC memory usage was indicated by the MEMTOP (90, 9116) pointer.


The token output buffer (LOMEM - 80, 8116) was used by BASIC for tokenizing a line of BASIC code. 256 bytes in size, any tokenized statement that was larger then the buffer would generate an error (14 - Line too long).


Reserved words

 ABS DRAWTO NEW RESTORE VAL ADR END NEXT RETURN XIO AND ENTER NOT RND ASC EXP NOTE RUN ATN FOR ON SAVE BYE FRE OPEN SETCOLOR CLOAD GET OR SGN CHR$ GOSUB PADDLE SIN CLOG GOTO PEEK SOUND CLOSE GRAPHICS PLOT SQR CLR IF POINT STATUS COLOR INPUT POKE STEP COM INT POP STICK CONT LEN POSITION STRIG COS LET PRINT STOP CSAVE LIST PTRIG STR$ DATA LOAD PUT THEN DEG LOCATE RAD TO DIM LOG READ TRAP DOS LPRINT REM USR 

System Input/Output

ATARI BASIC interacts with the system via the Central Input/Output functions (CIO). Some of the functions have a corresponding BASIC reserve word (OPEN, CLOSE, GET, PUT, etc). The Input/Output channels were known as Input/Output Control Blocks (IOCB). Although there were eight IOCBs, a number of them were reserve. IOCB 0 was for the screen editor and couldn't be accessed from BASIC (although it could from Machine Code). IOCB 7 was used by built in BASIC commands for IO (eg LPRINT, SAVE, LOAD, CSAVE, CLOAD). IOCB 6 was used for accessing the Graphics device in Graphics mode. And when using SpartaDOS, IOCB 4 and 5 were used for console input and output redirection.


Example: Opens the cassette for reading in BASIC

 OPEN #1,4,0,"C:" 

For the other CIO functions, BASIC uses the XIO statement for access. This included screen functions, serial (RS-232) functions as well as disk operations like format or deleting a file.


Example: Fill command in BASIC

 XIO 18,#6,12,0,"S:" 

String handling

ATARI BASIC differs from Microsoft-style BASICs primarily in the way it handles strings. Strings were character arrays, like those in Data General-like systems. The C programming language also treats strings as character arrays. While this is in theory much faster than MS's solution, it was also much harder to port BASIC programs to the machine because ATARI BASIC didn't directly support string arrays. Finally, according to Bill Wilkinson, the decision to go with strings larger than 255 characters in size made string arrays unfeasible. Data General was one of the first minicomputer firms from the late 1960s. ... The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language (often, just C) is a general-purpose, procedural, imperative computer programming language developed in the early 1970s by Dennis Ritchie for use...


On the upside they were easy to work with, using "slicing" commands. A$ referred to the entire string, whereas A$(4,6) "sliced" out the three characters, 4, 5 and 6. In general this was a more elegant solution than MS BASIC's LEFT$, MID$, and RIGHT$ solution. Another difference was that the Atari strings, like C arrays, were 0-indexed while MS strings were 1-indexed. This may be seen as a somewhat dual edged sword: "Real Programmers" enumerate arrays from zero, but BASIC programmers wanting to convert MS BASIC programs to the Atari had to strive to avoid "Off-by-one error" when dealing with text strings. The term Real Programmer is a sarcastic, sometimes pejorative term used by computer programmers to describe an archetypical, hardcore programmer. ... An off-by-one error in computer programming is an avoidable error in which a loop iterates one too many or one too few times than desired. ...


Sound and graphics

Other features of ATARI BASIC, in comparison to the BASICs of some competing machines at the time, were its built-in support of simple sound effects and high-resolution graphics as well as peripherial units like joysticks, paddles, and floppy disk drives. Other home computer users were often left with cryptic POKE's for such programming. In computing, PEEK is a BASIC programming language function used for reading the contents of a memory cell at a specified address. ...


Program editing

What happens when a line containing a syntax error is entered
What happens when a line containing a syntax error is entered

When not running a program, Atari BASIC is in intermediate mode, where lines can be entered (with a line-number) or immediate commands can be entered (without a line-number) that are executed immediately. If the user enters a line containing a syntax error, then the interpreter re-prints the line with the string "ERROR- " at the start (or after the line-number if the syntax error is entered on a line) and the first character of the token following the erroneous token is displayed with the foreground and background colours swapped. Image File history File links AtariBasicError. ... A syntax error refers to a mistake in a statements syntax. ... It has been suggested that this article or section be merged with Tokenizing. ...


Most Atari BASIC statements may be abbreviated when entered. The language used a clever system for this, which did not require a second set of abbreviated tokens (keywords) as did most other languages. Instead they sorted the token list such that the most popular command for any particular letter was at the top of the list, and when searching for a token they stopped at the first one that matched. The user could then enter keywords abbreviated with a period, for instance P. would expand to PRINT, whereas PL. would expand to PLOT. Like most microcomputer BASICs, programs were stored in a tokenized (semi-compiled) form, and since the short-form was not an actual separate token, when the program was later LISTed the short forms would be expanded its "full" form. However, unlike most BASICs, Atari Basic tokenized everything, not just the keywords. This included variables as well.


Performance

Atari BASIC was slower than that of other BASICs. Most of these problems stemmed from two particularly poorly implemented bits of code, one for handling loops like the FOR...NEXT that required the system to re-scan the entire program to find the starting point once again every time through the loop, and a particularly poor implementation of the multiply code that was used throughout the math libraries. Several commercial and shareware BASICs were available on the platform that addressed these issues, resulting in performance that was 3 to 5 times faster than the Atari version.


Atari BASIC also didn't support integer variables, all numeric operations and numeric values were in floating point. Atari BASIC relied on the Atari OS's built-in floating point routines (BCD notation), which were slow. Atari later sold a diskette-based version of MS BASIC, Atari Microsoft BASIC, and later managed to fit it onto a cartridge as well, but no compiler or runtime was available for redistribution. A floppy disk is a data storage device that is composed of a ring of thin, flexible (i. ... The Atari Microsoft BASIC and Atari Microsoft BASIC II variants of the BASIC programming language were cartridge or floppy disk packaged versions of the industry standard Microsoft BASIC dialect adapted to the Atari 800 and later Atari computers of that architecture. ...


See also

BASIC A+ was developed by Optimized Systems Software of USA, to provide the Atari 8-bit family with an extended BASIC compatible with, but faster than, the simpler ROM-based Atari BASIC. While Atari BASIC came on an 8 KB ROM cartridge, BASIC A+ was delivered on floppy disk and... Optimized Systems Software (OSS) was a small company producing operating systems and programming languages for the Atari 8-bit and Apple II computer families. ... Turbo-Basic XL is an advanced version of BASIC for the Atari 8-bit family of home computers. ...

Tips

  • In the XL/XE models, BASIC could be disabled by holding down the OPTION key while booting the computer. XEGS powered without the keyboard would disable BASIC.
  • The program States and Capitals initially did not work with the 600XL computer. This was caused by the Revision B BASIC being slightly larger memory-wise than the older Revision A, causing the States and Capitals program to abort with a "out of memory" error. The solution was to insert the older Revision A BASIC cartridge until Atari could fix the States and Capitals program!

References

  • Wilkinson, Bill (1983). The Atari BASIC Source Book. Compute! Books. ISBN 0-942386-15-9.
  • The ATARI BASIC Reference Manual. Atari Inc. (1980). [1]
  • Wilkinson, Bill. Inside Atari DOS. COMPUTE! Books (1982). ISBN 0-942386-02-7. [2]
  • De Re Atari Chapter 10: ATARI BASIC – A detailed description of the dialect and interpreter

External links


  Results from FactBites:
 
Atari BASIC - Wikipedia, the free encyclopedia (1639 words)
ATARI BASIC was a ROM resident BASIC interpreter for the Atari 8-bit family of 6502-based home computers.
Atari did what many of the other home computer companies did: they purchased the source code to Microsoft 8K BASIC with the intent to port it to run on the new machines.
Atari later sold a diskette-based version of MS BASIC, Atari Microsoft BASIC, and later managed to fit it onto a cartridge as well, but no compiler or runtime was available for redistribution.
ATARI 400 & 800 (4161 words)
Atari claims its 400 and 800 series computers are the first of a new generation of home/personal computers.
Atari Basic checks command syntax quite carefully at the time of input and, if it detects an error, highlights it with a marker at the part of the line at fault.
Atari isn't telling though, so it will be left to some bright programmers to get inside the software and then to spill the beans.
  More results at FactBites »

 
 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments

Want to know more?
Search encyclopedia, statistics and forums:

 


Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m