Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

There can be no better time to introduce a column on the Atari Computer than in an issue dedicated to graphics and music. After all, when you have a computer that has built in musical capability for four part harmony and high resolution color graphics with the ability to plot 158 columns and 80 rows in a choice of 16 colors, that is a graphics and music computer!

Visicalc Available

That does not mean that the Atari is limited to graphics and music. At the San Francisco Computer Faire, Adam Osborne conferred the small computer industry’s most prestigious (only?) award, the noble White Elephant, upon Software Arts for the development of Visicalc. The award, for significant contributions to the industry, recognized the program as the first $150 program that justified the purchase of a $10,000 computer. So, if you need an excuse to buy an Atari 800, Visicalc is available.

Star Raiders

That is the excuse you give the Internal Revenue Service, your accountant, and your husband. Truthfully, the reason you bought your Atari was to play Star Raiders (™), the most addictive computer game yet developed.

The game comes as a ROM cartridge with a lavishly illustrated twelve page instruction manual at a cost of $59.95. In addition, you need to purchase a joystick, costing $19.95 for two. The joysticks are not sturdy, and get heavy use, so you can use the spare.

Study of the instruction manual takes about 45 minutes and is essential to adequately understand the game. However, if you have someone available who already knows Star Raiders, it can be learned in 5 minutes by demonstration, if the demonstrator will then give up the machine. That brings you to the point of understanding. To truly master the game might take years.

Your mission is to defend your star bases from the Zylon fighters. You do this by locating the enemy on the Galactic Chart, turning on your defense shields, hyperwarping through space to the enemies’ sector, and engaging them in combat until the best man, woman, or Zylon wins.

You are rated upon your performance based upon the level of play you have chosen, the number of enemy destroyed, the length of time it took you, the number of your starbases that have been destroyed, and the amount of energy you used. Final ratings range from Garbage Scow Captain, class five to Star Commander, class one, with 60 different possible ratings. There are four levels of play, from novice to commander.

The graphics and the sound effects are brilliant. Stars whiz past you, your engines whoosh and your torpedoes explode, your klaxon sounds a red alert, and the enemy fighters speed past you, coming from all angles and all sides, firing their exploding torpedoes. Enemy fighters explode in clouds of blue particles, while the sky flashes red whenever you sustain a hit.

The instrumentation of your ship is also impressive. In addition to your Galactic Chart, which is updated by sub-space radio, your color coded instruments tell you the range to the enemy being tracked on the x, y, and z axis, your velocity, shield status, energy level, the condition of your photon torpedoes, engines, computer, long range scan, and your sub space radio. Your target aquisition computer helps you to steer while hyperwarping through space, as well as indicating the relative position and range to enemy fighters. In addition, upon your request it will shift automatically from forward to aft views from your ship as enemy fighters pass by on attack runs. The joystick allows you to climb, dive, veer right and left, and to combine vertical and horizontal movement, while twenty more keys on the keyboard control speed and function selection.

Star Raiders requires a color monitor or television, as much of the information is color coded and does not show up in black and white. I cannot pin down any definite bugs, although it is often hard to orbit a star base, and I did have a system lockup once in the middle of a game that required me to turn the power off and on again and restart the game.

This game goes beyond the quality of the games you see in video arcades. The sound effects, color, and action are just as good, the physical environment is a bit less impressive, but the real change is the strategy. Since an arcade game must produce $10 an hour in revenue, those games have to be active and short. Grand strategy is not possible. A home computer does not suffer from the same constraint, so the game can actually be better, and Star Raiders is better. The true video arcade addict can justify the purchase of an Atari 400 in a few months of unspent quarters.

If you have an Atari, buy this game! If you don’t have an Atari, sell your car (you’ll never leave home again anyway), put your children up for adoption so they won’t take over the computer, and buy one. Then play Star Raiders until the last stardate fades into the collapse of the universe.

Atari Sound

As a programming feature this month, I’d like to discuss the Atari SOUND command. The format for the sound command is as follows:

SOUND (Voice), (Pitch), (Distortion), (Volume)

You can have up to four voices, or notes, that can be played at the same time, numbered from 0 to 3. Each voice is totally independent of the others.

Pitch can range from 0 to 255, with high C at 29 and low C at 243. Distortion (timbre) can take any even number from 0 to 14. The value 10 gives a pure tone, while other values are used for sound effects. Volume can range from 1, which is hard to hear, to a loud 15. If you are using three or four voices, you should limit the total volume to 32 or less to avoid distortion. To turn the sound off, use the command END or set the volume for that voice to 0.

This program will demonstrate the range of sound available, displaying the value on the screen so that you can note sound effects you would like to use. Really good sound effects will mix several voices.

10 FOR A = 0 TO 14 STEP 2
20  FOR B = 0 TO 255
30   SOUND 0,B,A,8
40   PRINT"SOUND 0,";B;",";A;",8"
50   FOR C = 1 TO 250: NEXT C
60  NEXT B

I like SOUND 0, 6, 0, 8 : SOUND 1, 21, 0, 8 : SOUND 2, 27, 0, 8 : SOUND 3, 40, 0, 8 for an explosion, SOUND 0, 17, 8, 8 for a Phaser, SOUND 0, 30, 8, 14 for a gun shot, SOUND 0, 70, 2, 8 for a truck motor, SOUND 0, 145, 2, (1 to 12 to 1) for an airplane motor, and SOUND 0, 12, 4, 10 for a machine gun, but I am sure you will have your own choices.

Three Dimensional Graphics

Tim Hays has developed a 3 dimensional computer graphics package for Atari computers with the ability to take a data base and view it from different angles. There are four programs in the package, and the fourth one includes a demonstration that was a traffic stopper at the Computer Faire, (see Photo 1), especially in one display that showed the space shuttle in high resolution graphics from 4 different angles.

In order to create your own display, you must dust off your high school geometry and enter the x,y,z coordinates of the starting and ending point of each line. Then you specify the color you desire, the coordinates of the viewer’s locations, and the pitch, bank, and heading for the drawing. The program then calculates the screen starting and ending point for each line and plots it. The program is very sophisticated, and has the ability to calculate partial lines when the lines run off screen.

The program will run on an Atari 400 for low resolution color graphics, but requires 16K of memory for high resolution, and 24K for the demonstration program. A manual, with listings, is provided, and the listings are good study material for programming technique.

The 3-Dimensional Graphics package is a good buy at $29.50 plus $1.50 postage and handling from Sebree’s Computing, 456 Granite Avenue, Monrovia, CA 91016. □


Outpost: Atari

George Blank, Foster Road, Milford, NH 03055


Where do you get more help and information about your Atari? Obviously, Creative Computing is one source, and there are several others. If you are a beginner, the Atari Basic self-teaching guide that came with your computer will get you started. When you send in your warranty card, you will receive the Atari 400/800 Basic Reference Manual, which is much better, and actually answers most of your questions. I had three questions when I first started programming the Atari:

  1. How do you concatenate strings?
  2. How do you array strings?
  3. How do you obtain keyboard input without stopping the program?

Atari had given me the name of someone in the plant to call for questions, so I called and left my questions. Within hours they called back with the answer; “We don’t know.” The next day my preliminary reference manual arrived, and it had answers to all three questions! The answers were not easy to find, but they were there.

  1. To concatenate a string variable, follow these steps:
    1. Dimension the receiving string large enough to hold the combination.
    2. Determine the length of the original string with the LEN function.
    3. Assign the string to be combined to the next location in the receiving string. Here is a program to do it:
      10 DIM A$(10):DIM B$(5)
      20 A$="THIS"
      30 B$="+THAT"
      40 A$(LEN(A$)+1)=B$
      50 PRINT A$
  2. String arrays are difficult in Atari Basic. Essentially, you have to dimension a very large string, store all other string data as substrings, and do your own bookkeeping to keep track of where each item is. The Alpha-numeric Sort routine in Appendix A of the Reference manual uses this method. One advantage of Atari Basic is that there is no arbitrary limit to the size of a string, as there is in Microsoft Basic, so there is a lot of flexibility.
  3. To strobe the keyboard, PEEK location 764 in memory to determine when a key is pressed. To obtain a single character from the keyboard, OPEN the keyboard as an input device and use the GET command:
    10 X=PEEK(764):IF X<255 THEN PRINT X
    20 GOTO 10
    10 OPEN #1, 4, 0, "K:"
    20 GET #1, A
    30 PRINT CHR$(A)

Other sources of information include Compute magazine, which divides its attention between the Pet, the Atari, and the Apple. It is $9 a year, 6 issues, from Compute, 900 Spring Garden Street, Greensboro, NC 27403. SoftSide Publications has announced a game magazine for the Atari, to include several programs in each monthly issue. Write SoftSide: Atari, P.O. Box 68, Milford, NH 03055. The subscription rate is $15 a year.

I have since received the regular Basic Reference Manual, and it is even better than the preliminary one. One nice new feature is an excellent memory map. Some information is still not released, but I get the impression that this is because Atari is reluctant to release it in its preliminary form, not because they are trying to hide something. I know that they have been particularly helpful to friends of mine who have signed non-disclosure forms.

Tutorial Series

One excellent source of information is Iridis. Iridis was first advertised as a magazine, but now describes itself as “a series of tutorials about the Atari Personal Computer.” It is sold, not by subscription, but by individual issues.

Iridis I contains four programs with explanatory articles, three columns, and an explanation of their format for printing control characters. You can purchase it either with the programs on cassette ($9.95) or on disk ($12.95).

The four programs include “Clock,” a high resolution wall clock with moving hands, ticking and chimes; “Zap,” where a joystick-controlled snake moves around the screen eating bits of food and growing; “Logo,” which displays the Iridis logo in dozens of different shades, with instantaneous changes from one color to another; and “Polygons,” which constructs geometric patterns.

Each program is listed, and a “behind the scenes” article following each listing explains the program in detail. These listings are very well done, and contain fascinating glimpses into programming techniques. For example, you can test to see if the START button is pressed by checking to see if memory location 53279 contains anything other than 7.

The three columns are “Novice Notes,” with programming tips for the beginner, “Hacker’s Delight,”, which goes into detail about how the machine works, and “Oddments,” which contains features too short to deserve an article, but too significant to be ignored.

Iridis I comes in manual format, 6 inches by 9 1/2 inches, and contains 32 pages. The print is quite small, and appears to be typeset with a small computer word processor and printer. Except for a chart on the last page showing the Atari control characters, there are no illustrations.

You may order Iridis from The Code Works, Box 550, Goleta, CA 93017

Itty Bits

As a closing feature, here is a calculator program I use frequently to balance my checkbook, do my taxes, and for any other adding machine functions. Although it is very short, it is one of my favorite programs. To clear the memory, enter the present value of the accumulator (B) as a negative number.

10 INPUT A : B=B+A : PRINT B : GOTO 10

Do you have a tiny program that you have found useful? Send it in for future Itty Bits. You won’t win a fortune, but you might see your name in print. □


Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

Apples, Oranges, TRS-80s and the Atari

The Atari, unlike the Pet, TRS-80, Apple, and Heathkit computers, does not have a Basic by Microsoft. This is a mixed blessing, or mixed curse, as you choose to look at it. The graphics and music handling abilities of Atari Basic are a true joy, while the string handling is difficult. Since most programs published in computer magazines like this one are not in Atari Basic, an understanding of the differences is helpful if you wish to convert the programs for your own use. Here are some of the differences between the Atari and the TRS-80, the most common Microsoft Basic computer.

String Handling

In Atari Basic DIM A$(50) means reserve 50 bytes of memory for a single variable named A$. You cannot store a single letter in a string variable unless you dimension it first. One advantage of this is that you can control the length of a string just by the DIM statement, something you cannot do in Microsoft Basic. For example, if you put: 10 DIM ANSWER$(1) Then the computer will store only the first letter in the string even if it receives a whole sentence as a reply. This makes it easy to test an answer: 20 PRINT"ANSWER";:INPUT ANSWER$:IF ANSWER$="N" THEN50 In the TRS-80, memory for all string variables is reserved by a single CLEAR statement, with a default value of 50 bytes reserved automatically even without a CLEAR statement. In the TRS-80, DIM A$(50) means create an array of 51 string variables from A$(0) through A$(50).

In the TRS-80, the maximum length of a string ranges from 241 to 256 bytes, depending on circumstances. The Atari is limited only by memory available. This means that the Atari can make up for the lack of string arrays through a process of storing substrings in a very long string. One advantage of the Atari is that string sorting is potentially faster, as the TRS-80 has to pause and reorganize its string space.

Related to the string length is the restriction of a TRS-80 program line to 241 to 255 characters, while the Atari observes a different approach and limits you to 120 characters. Since some TRS-80 programmers like to put a whole subroutine in a single line, you would have to do a bit of reshuffling to translate their programs to an Atari. The lack of an ELSE command (see below) further restricts this approach in the Atari.


Neither the Atari nor the TRS-80 have a built-in speaker, as does the Apple II. The Atari sends sound effects through a television set speaker. If you are using a monitor that does not have a speaker, you do not have sound. Common practice with the TRS-80 is to connect an amplifier to the cassette output port.

The real difference in sound is that the Atari has a built-in sound capability allowing four completely separate voices at the same time with over 20,000 sound options, including a wide range of musical notes for each voice, while TRS-80 Basic can only alternate voltages at the cassette output port with OUT statements or machine language subroutines. Harmony is very difficult with the TRS-80, but easy in the Atari.


It is not really fair to compare TRS-80 graphics to the Atari, as the TRS-80 is strictly medium resolution black and white while the Atari has high resolution color. To fairly represent Microsoft Basic, the Apple should be included in the discussion. One advantage the TRS-80 does enjoy is easy mixing of text and graphics on the screen, which is more difficult with the Apple and the Atari. Also, the TRS-80 has a built-in video memory that does not require user memory, while the Apple and Atari require user memory and, in high resolution, lots of it.

The Atari has 16 different graphics modes, and some of the graphics in the Atari ROM cartridges, including the motion through space in Star Raiders and the ability of the basketball players to overlay each other in Basketball, promise more graphics power than any other popular home computer. Right now, a side-by-side comparison of Apple and Atari graphics seems a standoff because the Atari graphics are not yet documented and explained, but if this kind of graphics ability becomes accessible to the end user, the Atari will be the obvious choice.

A common problem in high resolution graphics is that it requires a lot of memory to store a detailed image. The normal sacrifice limits the number of colors available in hi-res so you need less memory to store color information. The Atari limits you to two colors in high resolution, while the Apple gives you four. However, the Atari allows you to choose your color and tint and even allows you to change the color of an image on the screen instantly by changing a color register that tells the computer what color to make the image. The Apple cannot match this ability.

My personal favorite among the graphics commands of the Atari is the DRAWTO statement, which draws a line from the last plotted point on the screen to any other point. More or less the same ability is present in the HLIN and VLIN commands in the Apple, though not as easily, nor as fast. In the TRS-80, it is necessary to write a subroutine to plot each point individually.

Text Handling

Text handling in the Atari is not as convenient as the Microsoft Basics. The TRS-80 is particularly good at text formatting and printing. Microsoft Basic allows you to include text in an INPUT statement, like this: 10 INPUT"What is your answer";A$ Atari Basic requires a separate print statement: 10 PRINT"What is your answer";:INPUT A$ The TRS-80 allows you to print directly at any point on the screen with PRINT @: 10 PRINT @ 572,"X MARKS THE SPOT" The Atari requires you to position the cursor first, then print your message: 10 POSITION 8,12:PRINT "X MARKS THE SPOT"

Still another difference in text handling is the power of Microsoft Basic’s PRINT USING command, allowing you to specify automatic print formatting with a fixed number of decimal points, floating dollar signs, fixed spacing, and other conveniences. These things have to be done by manipulating a string in Atari Basic.

I have begun to experiment with a whole new approach to text in the Atari that may be even more convenient. The Atari allows you to treat the keyboard, the video memory, and any other I/O device as a file. I suspect that once I get used to this. I will not really mind giving up PRINT USING.

There is a more definite limitation to the Atari in one of the key text handling areas, and that is in word processing. Forty columns per line is simply not as convenient as the longer lines on some other computers. The problems here are color and expense. It is much easier and cheaper to give text processing ability and sharp resolution to a computer which does not use a video modulator and does not use color. The Heathkit H-89 with 24 lines of 80 characters has much sharper letters than the Atari, yet the Atari limits you to a mere 38 to 40 characters. A lot of this problem could be overcome by designing the Atari to be used only with a high quality color monitor, but that would price it right out of the consumer market. My own solution is to use a different computer for word processing, including the writing of these columns.

Jumps and Subroutines

One of the areas in which Atari Basic enjoys an advantage over Microsoft Basic is in the ability to transfer control to another line through a variable. This has a lot of potential. Look at these comparisons:

Atari               TRS-80
20 GOSUB BASKET     20 GOSUB 600
10 RATING=          10 RA=INT(BA/5)
   880 + 4 * BASKET
20 GOTO RATING      20 ON RA GOTO 900,
                       920, 940

The above example illustrates another difference. In Atari Basic, a variable name may be up to 120 characters long, while the TRS-80 allows only 6 and tests only the first two. In the Atari, VALUE1 and VALUE2 are different variables. In the TRS-80, they are the same.

However, the advantage here is not altogether to the Atari. Radio Shack’s Level II Basic allows an ELSE statement, while the Atari does not.

Atari                TRS-80
10 IF A=5 THEN 50    10 IF A=5 THEN 50
20 GOTO 100             ELSE 100


A major strength of Atari Basic over Microsoft Basic is in its generalized output routines. This is due to a feature known to mainframe programmers as device orientation. In Atari Basic, PRINT is a generalized output command. While the default device is the video screen, the computer doesn’t really care whether it is printing to a line printer, a modem, a cassette tape, a disk file, or the screen. You can even use a variable to shift from one to another in your program, virtually at will. The general format of an OPEN statement hints at the power here:

10 OPEN (Reference number), (input/output/both), extra printer code), device type), device number): (file name).(extension)

Disk file opening might look like this:

10 OPEN#2,8,0,"D3:LESSON.BAS"

Chapter 5 in the Atari reference manual gives a more detailed explanation.

What do all these differences mean? My answer is: “Not a whole lot!” Nearly anything that can be done in one Basic can be done in any other Basic, even a limited one like IBM Basic. It just takes extra effort, a little understanding of what the other program is trying to accomplish, and a little creative ingenuity.


One of the first Atari games is still one of the best. In Atari Basketball, you use the joystock controller to move around the court, dribble, shoot, pass, block shots, and steal the ball. The exceptional graphics and animation of this game make it a favorite demonstrator at computer stores, so many of you have already seen it.

How well does it play? The answer is that it is relatively easy to beat, but not easy to trounce. The computer is set up to play better when it is behind than it does when it is ahead, so it offers a good challenge until you get really good. However, once you can consistently trounce the computer, you’ve only begun the real fun!

The best feature of Basketball is that it allows one to four people to play at the same time. There are five options:

  1. One player against the computer
  2. Two players against the computer
  3. Two players against one player and the computer
  4. Two players against two players (no computer player)
  5. One player against one player (no computer player).

After all, if you let your best friend play Star Raiders, it may be weeks before you get a chance at the computer again! With Basketball, you can both play at the same time. Teams of two are even more fun. This is one of the best computer games available for more than one player.

Basketball requires one joystick controller for each person playing and is available for $39.95.


Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

Learning at Atari Academy

Atari takes the educational market seriously, with a wide selection of educational courses. Among the courses announced are:

The ranges indicated are only general, based upon Atari’s advertising and my own initial reactions. For example. Atari claims a level of elementary, secondary and adult college for the U.S. Government course. My own reaction to it is that, while it is certainly understandable by a reasonably intelligent fourth grader and helpful to an adult, it is most reasonably aimed at high school level.

Each course consists of four cassette tapes, which contain both digital and audio information. You need the educational system master cartridge, supplied with the Atari 800, $30 extra for the Atari 400, to use the course material, as the master cartridge allows the processing of the audio and digital tracks at the same time.

The instructions for each course are quite simple. You put the educational system master cartridge in the computer and turn it on, put the cassette in the recorder and press play, press the start button on the computer, and when the computer asks a question, answer by pressing 1, 2 or 3. The instructions, which are the same four-page brochure for all the courses, also list a brief outline of each course. I would like to see more explanatory material, perhaps a booklet with supplementary readings, with each course.

Each lesson consists of text which is displayed on the screen accompanied by narration, essentially the same as the text. At regular intervals throughout the lesson, questions are asked, two or three answers are displayed on the screen, and the tape recorder stops. The student answers the question by typing 1 to select the answer on the left. 2 for the answer in the middle of the screen, or 3 for the answer on the right. If the wrong answer is selected, the computer beeps to indicate the need to try again. When the right answer is selected, the tape starts again and continues, frequently with a comment such as “That is correct,” “Yes,” or “Right.” Because the tape recorder is starting, the first word is often slurred.

The material is well written and well narrated, and occasional limited graphics break up the text. The effect is one of a talking book that stops to ask questions and waits for the right answer before continuing. Each lesson lasts about half an hour.

I did not review the whole series, but tried selected lessons from several of them. Here is a summary of my impressions.

In the Great Classics series, each tape contains lessons on two books. The books are Julius Caesar and Macbeth by Shakespeare, Ivanhoe, Treasure Island, Mutiny on the Bounty, A Tale of Two Cities, Robinson Crusoe, Last of the Mohicans, Moby Dick, David Copperfield, Don Quixote, The War of the Worlds, The Three Musketeers, 20,000 Leagues Under the Sea, The Red Badge of Courage, and William Tell. In each case, the basic story is told in half an hour, along with questions to help emphasize turning points and key ideas. Important quotes are included in the lesson.

I can remember as a child that the way to “cheat” in English literature was to read the Classic comic book for the current book to be read. As a confirmed bookaholic from the age of six, I was never tempted to avoid the book by such a summary. In the case of Treasure Island, I read the book, saw the movie, read the comic book, and studied the Atari lesson. The book was by far the most satisfying experience, and I dwelt for hours over the Wyeth illustrations. The movie was less satisfying, and the comic much less satisfying. The lesson was work, not joy, although it did emphasize the main features of the course. My impression of the course is that it is equivalent to an unsophisticated imitation of the Cliff’s notes series.

I did complete the Supervisory Skills course, more out of duty than enthusiasm, and found that the lessons seem pedantic after a few hours of exposure. The material was reasonably well organized, informative, and useful, but not stimulating. Philosophically, those who believe that learning ought to be work and not play should feel satisfied with the lessons. The educational series uses a different cassette loading format, and it is not as reliable as the standard format. A number of times during the lessons, the computer lost track of the digital track, and continued on with the audio lessons without writing to the screen. Usually I could restart the digital by resetting the computer and hitting the start button again.

These courses will probably prove to be an excellent resource for pupils who have difficulty reading, summarizing the core content of the material and providing drill right afterwards. For those with good reading skills, a good book on the subject would probably be a better investment. I would much rather see a good historical simulation, such as a game requiring you to play the part of a ship captain in the rum, molasses, and slave trade of the 1700s, than have someone tell me the story and ask me questions afterwards.

Programming Feature - Real Time Clock

A real time clock can be very handy as a programmer’s tool. Many clock functions can be done with timing loops, but the computer can only do one thing at a time, and it is very touchy programming to use timing loops with complex tasks. If you own an Apple, you can buy a real time clock for $200. If you own a TRS-80, you can spend $300 for the expansion interface and get one. If you are handy with electronics, you can probably connect a digital watch to almost any computer. However, if you own an Atari, keep your wallet in your pocket and your soldering iron on the workbench, for the Atari has not one, but five built-in timers.

All you need for an Atari real-time clock is software to use these timers. The timers are a two-byte serial input/output timer located at memory location 536, three two-byte countdown timers at locations 538, 540, and 542, and a three-byte video-display frame counter at memory location 18. All values given are decimal. The countdown timers are preempted by some interrupt actions, so the other two are best for keeping accurate time. The easiest to use is the frame counter, which also has the advantage of an extra byte of information.

The frame counter is organized with the most significant byte at location 18 and the least significant byte in location 20. Location 20 is updated 60 times each second, location 19 every time location 20 reaches a count of 256, and location 18 every time location 19 reaches a count of 256.

Thus each count in location 20 represents 1/60th of a second, location 19 represents 256/60ths of a second, and location 18, 65536/60ths of a second. To use the clock, we need merely multiply the contents of 18 by 65536, 19 by 256, and the contents of 20, add the contents of 20, and then divide the resulting count into seconds, minutes, hours or other units of time. If we want a timer, we can POKE zeroes into the three locations to start the count. If we want a clock, simply calculate the number of sixtieths of a second since midnight and POKE that number into the three locations. Here is a short program that uses the frame counter for a timer:

100 POKE 20,0:POKE 19,0:POKE 18,0
120 A=PEEK(20):B=PEEK(19):C=PEEK(18)
130 TIME=(A+B*256+C*65536)/60
140 POSITION 0,6
160 GOTO 120


If you want to be careful about accuracy, POKE location 20 first to time an event that takes place before the POKE, and last for an event that follows the POKE. Then add or subtract 60ths of a second to A in line 120 to adjust for timing inaccuracy. For example, if it took one third of a second to calculate and print the result after our PEEK statement in line 120, we could add 20/60ths of a second in this fashion:

120 A=PEEK(20) + 20 : ...

There is still one serious limitation on accuracy. It is possible that location 18 or 19 could be updated in between PEEKs and throw the calculation off by 18.2 minutes or 4.3 seconds, respectively. If this is a major problem, the solution is to use a USR routine in machine language.

Image Computer Products

We are starting to see companies with experience in consumer marketing offering products for the Atari. One such entrant is Image Computer Products, with an initial offering of six packages that will work in the Atari 400 or 800.

Mind Master is a version of Bagels and the name is reversed to avoid someone else’s trademark. The 8K version is for two players. The 16K version allows one to four players, and the computer can be one of the players.

All Star Baseball is for two players The 16K version uses joy sticks and includes the option of curving the ball back and forth on the pitch, and a graphic fielding routine. Both versions suffer severely from the computer recognizing input from the wrong player. In the 8K version, if either player holds a key down, the other cannot move. This makes it easy to strike a batter out by denying him a chance to swing. In the 16K fielding routine, the computer responds to both joysticks, so the batter can prevent the other from fielding the ball properly. Despite these weaknesses, this is a favorite of my 6-and-7 year-old sons.

Wall Street Challenge is a stock market simulation giving stock with different personalities and charting of the market index. Players buy and sell in an attempt to make the most money. Two players are allowed in the 8K version, and up to eight in the 16K version.

Strategy Pack I contains two games. Roman Checkers is a computer version of the game CBS sells as Othello. If two people play, the computer flips all the counters and keeps count. You can also play against the computer, though it plays a weak game. Frame Up is a strategy number game in which each player in turn selects a number from a grid. One player must select from the same horizontal row that the other player selected from, and the second player must choose from the remaining numbers in the vertical row of the last pick. The computer can play, and is a tough opponent.

The other two packages are Skill Builder I with two number games for children and Strategy Pack II with four variations on moving line games. All programs are written in Basic, and come attractively packaged with an instruction manual. The two Strategy Packs and Skill Builder cost $19.95, while the single games cost $14.95.

Buying Memory

If you are using your computer for anything other than the ROM pack games like Star Raiders or the Educational Series, you will probably find that the 8K of memory in your computer is not enough. Graphics Modes 8, 9, 10, 11, 24, 40, and 56 all use 7900 bytes of memory just for the screen display. You could make room for more program by using mode 2, which only uses 261 bytes, but you can pretty much count on adding memory. I recommend the 16K cartridges as a better buy than the 8K ones. The disk operating system takes up another 10K of memory for disk users.

My prediction is that most cassette system owners will end up with 24K of memory (one additional cartridge) and most disk users with 40K (two additional cartridges). This is important, as people who write programs need to gear their programs to the potential market. People who are currently writing 16K programs will probably lose out to those writing more sophisticated programs for 24K. Of course, the present market is for good 8K programs, but that will not last.

Do NOT put more than 40K of memory in your Atari 800. Not only is it extravagant to discard an 8K module to buy a 16K, it also is a useless task. That last 8K of memory is preempted by the left ROM cartridge, so that you cannot have more than 40K of memory with Basic or the Assembler. In the future, when cartridges are available for the right hand slot, they will preempt another 8K of memory, limiting the user to 32K.

New Englanders Arise!

Any Atari owners in the Boston area who are interested in a User Group are invited to write to me. The Boston Computer Society is forming an Atari User’s Group. Just send a postcard or 3 by 5 card with your name, address, and phone number and mention that you are interested. I prefer a card because it is easier to file. □


Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

View from the Outpost

Our favorite computer is rapidly developing a strong following. Atari’s obvious quality, excellent dealer support, serviceability, and the rapid introduction of programs and peripherals are convincing people that it is the best of the current lot of personal computers. The Software Exchange recently ran a poll in its catalog and found that of the people considering the purchase of a computer, about 75% were considering the Atari, while no other brand even came close. Apple had about 25%, and the TRS-80 about 5%. The figures add up to more than 100% because many people were considering more than one computer. Who would believe, after watching the other personal computers over the past three years, that Atari would produce so much good software so fast?

New peripherals announced include a dual double density floppy disk for $1495. This one unit has the same storage as four single drives, and you could even chain four units for 1.3 Megabytes of disk storage. Other significant new products include two printers, one very inexpensive one with thermal paper and good graphics, and the other with a high quality dot matrix print that I consider good enough for writing letters at a price of $995. There is also an expansion unit for connecting a modem or parallel or serial printer, and a terminal ROM cartridge for connecting your Atari to a time sharing computer.

I sympathize with the busy folks at Atari who are producing and supporting all these products. I have already collected over 1000 pages of preliminary documentation, and I don’t see how they even produced it, much less how they can edit and publish it. If you are still lacking essential information about your computer, just be patient. A flood of information has been released, and if Atari doesn’t get it out soon, the magazines will.

String Array Demonstration

Gordon Link of Rochester, New York wrote to ask if I would say more about using string arrays and demonstrate how to do it. I hesitate to do it, because I am sure that by the time this column appears, my present technique will appear clumsy, but here is a sample program. If you make major improvements in efficiency, let me know, and I will pass the technique along.

100 DIM A$(10) : DIM B$(10) : DIM C$(100)
110 FOR D=1 TO 10
120 A$="          " : READ B$ : A$(1,LEN(B$)) = B$
130 C$(D * 10 - 9, D * 10) = A$
140 NEXT D
150 DATA Zero,One,Two,Three,Four
160 DATA Five,Six,Seven,Eight,Nine
220 IF E<0 THEN 210
230 IF E>9 THEN 210
240 PRINT C$(E * 10 + 1, E * 10 + 10)
250 GOTO 200

It is necessary to insert ten spaces in the holding string (A$) in line 120 for two reasons. First, if you run the program without it, you will end up with little hearts filling in the space after your letters. Second, the Atari only considers a string dimensioned as far as data has been inserted into it, even if the DIM statement reserves more space. Without the spaces to fill up locations 95 to 100 in C$, the computer will crash with a string dimension error in line 240 if you type in a 9.

This means that if you use strings of random length and store them in a fixed array, you must be careful to pad any trailing blanks with spaces. This creates a new problem. If you want to use your strings without the trailing blanks, you must strip them off. One method is to start at the end of the string and test until you find a character that is not blank. This demonstration program will show how.

10 GR.0 : DIM A$(10) : DIM B$(10)
20 A$ = "TEST       "
30 C = LEN(A$)
40 IF A$(C,C)=" " THEN C=C-1 : GOTO 40
50 B$ = A$(1,C)
70 PRINT A$;A$;A$;A$
80 PRINT B$;B$;B$;B$

Of course this routine would crash if the string were all spaces, but it is easy to limit C to 1 if you need to do that.

Input/Output (casual readers beware)

Another reader, Arthur McGraw of Whitehall, Ohio, sent in a circuit diagram for an inexpensive light sensor. Atari has a light pen available for $75, but you experiment with the same principle for a few cents (See Figure 1).

This particular circuit was used to track the intensity of the sun throughout the day. The parts needed are a cadmium sulfide photo cell and a capacitor. The capacitor extends the range of the converter.

 1 2 3 4 5
  o o o o o
   6 7 8 9
   o o o o   Controller
     | | |     Jack 1
     | | |
     | = |.01 uF
     | |_|
     |   |
     |   |
      |_|    CDS
    [_____]  Photo cell

      ^ ^   Sunlight
     ^   ^

    Figure 1

Pins 1 to 4 of each of the 4 controller jacks are connected to a 6520 peripheral interface adaptor. Jacks 1 and 2 are connected to Port A at memory location D300 (hexadecimal) and jacks 3 and 4 are connected to Port B at D301. The control register is located at D302 for Port A and D303 for Port B. If the appropriate bit in the control register is a 0, you access the direction register for the port. Set the direction bits to 1 for output and 0 for input. Then set the control register bits to 1 to access the port instead of the direction register. Here is a sample program to show how to use the ports.

10 POKE 54018, 255 : REM Point Control Register A to Data Direction Register A
20 POKE 54016, 0 : REM Set Port A (Jacks 1 and 2) for data input
30 POKE 54018, 0 : REM Point Control Register A to I/O port A
40 X = PEEK(54018) : REM Set variable X to input value.
50 POKE 54018, 255 : REM Point Control Register A to Data Direction Register A
60 POKE 54016, 0 : REM Set Port A for data output
70 POKE 54018, 255 : REM Point control register A to I/O Port A
80 POKE 54016, 18 : REM Data output. Sends bit pattern 0010 to jack one and 0001 to jack two.

Printer Interface

Macrotronics has taken advantage of the joystick ports to provide an inexpensive printer interface. They provide a tiny circuit board that includes only two connectors and eight transistors to plug into controller ports 3 and 4. A ribbon cable leads to the printer connector, with three connectors available; Trendcom, Centronics 730 series, and other Centronics. Because the ports are spaced differently, you must specify whether you want the interface for the Atari 400 or Atari 800.

Software is provided on cassette tape to enable you to operate the printer. The software is easy to use, with detailed instructions for using it to modify your disk operating system to route all printer output to the interface. If you are using cassette tape, you will have to load the program separately each time you want printed output. The program is unsophisticated in other respects. I wanted to produce line listings for SoftSide magazine in forty column format instead of eighty column format, but will have to write my own print driver to do it.

At $69.95, the interface is a good alternative to Atari’s more complete expansion interface at $219, and it does allow you to use most parallel printers. The only difficulty I had was in determining which way to plug the cable into the printer. The package also includes a banner demonstration program.

Programmer’s Aid

The Atari suffers from a problem common to all other personal computers that are designed to connect to a standard color TV set. It is not easy to read the letters on the screen. The reason for this is that television sets contain a trap that limits the amount of information that can be scanned each second. This is done to allow many different television stations to share small parts of the electromagnetic spectrum. However, it limits the amount of information your computer can send to the screen to a rough display of less than 1000 letters unless you modify the TV, and a computer that requires you to modify your television set might not be popular.

One device that I have found very useful for making the letters readable is the Green Window, available from several suppliers for $19.95. This green plastic filter fits over the front of the TV set and makes the letters easier to read. I just tape mine on when I am programming, so that I can take it off when I am working with color or playing a game.

I have tried cheaper products that do the same thing, such as the Green Screen, but they are not as good. While the Green Window is hard plastic, about ¼ of an inch thick, the others are made of flexible plastic film that bends and reflects light in distracting patterns. The others also do not seem to offer as much contrast.

Atari’s Editor-Assembler

Atari was kind enough to lend me an advance copy of their editor/ assembler for evaluation. I did not have the final version, but an EPROM cartridge with a photocopy of a rough draft of the manual, so some features may change.

The package includes several parts to make a convenient assembly language development system. In addition to the Editor and the Assembler, there is also a Debugging monitor and a Mini Assembler. The manual noted that users are expected to be familiar with 6502 assembly language. If you are not, you will need a course or book such as Programming the 6502 by Rodnay Zaks of Sybex.

The first program in the package is the Writer/ Editor. This allows you to enter your programs, correct errors, and access the disk operating system to save your programs. While it is possible to save your programs on cassette, the package assumes that most users will have disk systems. The editor includes handy functions such as “SIZE”, which tells you the starting location in memory of the current line buffer, the start of the edit text buffer, and the highest available location in memory.

The second program is the Assembler. This takes your assembly language program and turns it into numbers that the computer can understand. For example, you might want to load the number in the accumulator to prepare it for an arithmetic operation. The accumulator is a storage location in the actual computer chip that holds a value to be operated on. Using the editor, you would enter your “source program” (in assembly language, using the instruction) LDA #0. When you run the assembler, it would look at that instruction and create an “object program” (of numbers for the computer.) Our LDA #0 would be converted into the numbers 169, 0. The number 169 tells the computer to LoaD the Accumulator (LDA) with the number stored in the next memory location. The 0 is the number.

LDA #0 is assembly language, and it is fairly easy for humans to understand. The numbers 169, are machine language, and are easier for the computer to understand. The purpose of the assembler is to make things easier for both the computer and the programmer by translating assembly language into machine language.

The third piece of the package is the debugging monitor. Since computers never make mistakes, and people always do, Atari thoughtfully provided this program to help you find out where you went astray. Among other things, the monitor will let you look at memory in several different ways, single step through your program looking for your mistake, and even convert all those confusing numbers back into assembly language with a disassembler.

The final program in the package is the mini-assembler. Just like an assembler, the mini-assembler converts assembly language into machine language. The difference is that it does it one instruction at a time, as you enter the command, without the features of an editor.

I have never used another 6502 assembler, though I have programmed in Z-80 and 6800 assembly language. I found the Atari package convenient and easy to use, and I really appreciated the built in monitor, debugger, and disassembler. There were only two things I did not like. First, it was difficult to program on a screen that is only 36 characters wide. I would personally prefer 72 characters, so that I could include enough comments on my code to understand it the next time I see it without cluttering up the display. The other shortcoming is the lack of a symbol table in the assembler output. A symbol table would be very desirable, as it is a nuisance to look for a label in the listing of a long program. I consider the program well worth the $59.95 price.


Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

Report from the Forward Observer

Atari is working on a Pascal for their computers, scheduled to be released in the first half of 1980 if all goes right. Their Pascal will not be USCD Pascal, but will have a number of differences. It will compile into either P-Code or 6502 machine language.

Disk Operating System 2 should be ready about the time this column appears. The primary problem with DOS 1 is that random files do not work, although the new DOS is significantly faster and uses less operating memory. The memory is saved by using overlay methods, keeping some of the DOS out on the disk unless it is needed. The new DOS will cost present disk owners $25 (Part number CX 8104). There is another problem involved. The speedup of the DOS requires a different formatting routine. Unfortunately, the old formatting routine is in ROM, so the only way to take advantage of the higher speed is to buy formatted disks direct from Atari. The scheduled price is $25 for 5 (Part number CX 8110).

Another scheduled Atari project is a mailing to all registered Atari owners containing information on software publishers and others supporting the Atari computers. With projects like this and Atari releasing documentation to warranty card registrants, it is important to return your registration card. If they don’t have your address, they can’t send you anything!

Atari has been negotiating with Microsoft for a new Atari Basic. If things go smoothly, look for the new Basic in mid 1981.

SoftSide magazine began to cover the Atari computer with their August issue by printing three complete games and several articles. Regular coverage of the Atari is promised. More information should be available in their ad elsewhere in this issue.

They Said it Couldn’t be Done!

My taste in poetry can be decidedly lowbrow, but I have always liked this little ditty:

They said it couldn’t be done
So he went right to it.
He took that thing that couldn’t be done ...
And couldn’t do it.

James Garon of SoftSide has a different tale to tell. According to the Atari manual, graphics 8 gives you only two shades of one color. James discovered that when you draw a vertical line in an odd numbered column, it is a different color from a vertical line in an even numbered column, and drawing in both columns gives still another color. Here is a little program to demonstrate the method:

20 COLOR 1
30 FOR X = 1 TO 319 STEP 2
40 PLOT X,0 : DRAWTO X,40
60 FOR X = 0 TO 318 STEP 2
70 PLOT X,41 : DRAWTO X,80
90 FOR X = 0 TO 319
100 PLOT X,81 : DRAWTO X,120
110 NEXT X
130 GOTO 130

According to the friendly experts at Atari, if you use assembly language it is possible to get 128 colors on the screen at the same time in high resolution.

Visicalc Update

Visicalc should be ready from Personal Software by the time this column appears, or shortly thereafter. Since Doug Green wrote an excellent review in the August issue of this magazine, I will not review it, but simply report that I have been using a preliminary copy with the instructions from the Apple version, and it is the same program.

Visicalc is the first Atari program I have encountered with its own disk operating system. You use it without a ROM cartridge, and it boots and loads automatically from the disk.

Intelligence Report

Four of the things that make the Atari computers special are custom integrated circuits built into the computer. These four chips go by the names PIA, ANTIC, CTIA, and POKEY. Many of the features that set the Atari apart from earlier and more primitive personal computers are located in this hardware.

The PIA chip controls information going to and from the joysticks, paddles, or controller jacks and also handles interrupt requests. There are two standard peripheral interface adaptors (That is what PIA means). In last month’s column I described how to use these ports.

The ANTIC chip controls direct memory access for fast graphics and transfers of information, the non maskable interrupts, vertical and horizontal scrolling of your TV set, and contains the position registers for the light pen.

The CTIA chip offers priority control so that objects can overlap, such as the basketball players in Atari Basketball. It can also control up to 4 “players” and 4 “missiles”. A player is an object that can be displayed on the screen which is a maximum of eight bits (or graphics blocks) wide. A missile is an object that is no more than 2 bits (blocks) wide. There is no limit on height. The four missiles can be combined into a fifth player, as is done in the basketball game to form the ball. This chip also maintains the colors and luminances of the objects, detects collisions between the objects, and controls their horizontal position. Yet another function of this busy chip is to monitor the keyboard switches and paddle and joystick triggers.

The POKEY chip is responsible for scanning the keyboard, controlling the serial port to the printer, disk drives, and cassette recorder, converting the position of the eight paddle controls to a number the computer can read, creating the sound for the four audio channels, updating the internal timers, and random number generation.

The actual use of these chips for fancy graphics is too complex for this column. However, those of you who seek more information can find a description of ANTIC graphics in the August 1980 issue of Byte, written by Chris Crawford and Lane Winter of Atari. Beware; the method is much too tough for beginners.

Programming Feature

Larry Seftor of Alexandria, Virginia works by programming a Texas Instruments ASC Computer in Fortran. At home he plays with an Atari 400. Larry sent in an error handling routine to share with other Atari owners.

If the error is simply an input error (error code 8), the program returns to the same line and tries again. Otherwise, it prints out the error number, the line the number is in, and then lists the line for editing. This basic technique can be expanded to handle many other kinds of errors as you seek to make your programs fail safe. If you are maintaining a glossary of computer terms, you should know that this process goes by the esoteric and highly technical term of “Idiot proofing”.

10 TRAP 1000 (First line of program)
(Your program fits here)
1000 TRAP 1000 : ET = PEEK(195) * 256 + PEEK(186)
1010 EL = PEEK(187)
1030 GOTO EL

Outpost: Atari

George Blank, Foster Road, Milford, NH 03055

Intercepted message from an unidentified suborbital earth vehicle on stardate 1980.360/0120Z

10 GR. 7
20 C. 3
30 PL. 40,65
40 DR. 120,65
50 DR. 80,5
60 POS. 40,65
70 POKE 765,3
80 XIO 18,#6,0,0,"S:"
90 C. 2
100 PL. 76,6
110 DR. 85,2
120 DR. 75,2
130 DR. 83,6
140 DR. 80,0
150 DR. 77,6
160 PL. 79,3
170 DR. 81,3
180 SE. 0,12,2
190 C. 1
200 F. Y=78 TO 82
210 PL. Y,65
220 DR. Y,80
230 N. Y
240 PR.,
250 F. X=1 TO 15
260 REA. Y
270 PR. CHR$(Y);
280 N. X
290 D. 77,101,114,114,121,32,67,104,114,105,115,116,109,97,115

Transmission Report

TO: All Outposts

FROM: Headquarters

SUBJECT: Defective message traffic from Outpost Atari

TEXT: The following difficulties have been reported in previous transmissions from Outpost Atari:

Report of August 1980 — “For Apple HLIN and VLIN are for lo-res only. For hi-res HPLOT TO is as good as anything Atari has.” Fred Gerlach, Houston, TX

Report of September 1980 — “You said that a USR machine language routine was needed for timer accuracy: no need! Merely calculate time twice (2 sets of PEEKs); if they differ by more than one second, loop until they don’t.” Wilson Dillaway, Johsonville, NY.

“You stated that one should NOT put more than 40K of RAM into an Atari 800 because the last 8K is used for ROM cartridges. The Atari is a sophisticated machine and will allow access to the last 8K of RAM if there are no cartridges present, and to 4K of that if only one cartridge is present. For Atari VisiCalc we strongly recommend the additional memory” Bob Frankston, VisiCalc Co-author.

Programming Hint

With the powerful screen editing capabilities of the Atari, there are times when you want to edit some lines frequently. For example, you might want to try different color hues and luminances until you get the ones that look best. Here is a routine that allows you to RUN your program, then press enter to LIST it. The RUN is printed at the end of the list so that you can just press RETURN on that line to restart.

20000 DIM XX$(1):INPUT XX$

Philosophical Essay — Computer Comparisons

One of the most serious illnesses in our national thought process is our philosophical bent toward positivism. Positivism is the attempt to reduce all of life to numbers, so that is can be compared mathematically. This virulent American disease tends to overvalue that which is easily quantifiable, and overlook that which is difficult to express mathematically.

For example, I know of a law firm that would have been able to use a small computer profitably, but decided not to buy because other law firms in the area had minicomputers. The decision was made, not on the basis of ability to do the job, but strictly on the basis of price tag. For this lawyer to buy a less expensive computer would be to lose face with his competition. Price is easily quantifiable. An Atari computer system might cost $3,000 while an IBM system might cost $300,000. While this certainly out to be considered in a purchase decision, the abilities of the individual computer is a far more important decision.

In our typically American positivistic way, we have sought to quantify the abilities of different computers. Certainly, some good tests have been established, giving us benchmarks and price-performance ratios. But this is often carried to the point of ridiculousness. Does it really matter that Brand X can sort a 1000 element array in 22 seconds while Brand Y takes 29 seconds? It might, if you are going to spend a lot of time waiting for your computer to sort 1000 element arrays. However, there are probably circumstances in which it might be more sensible to buy Brand Y because it comes in a color that matches the rest of the office!

I am not saying that we should ignore quantitative data in the purchase of a computer. I certainly don’t. For example, I think that the length of the warranty period, the number of nearby service centers, the cost of service, and a lot of other quantitative information is helpful in a computer purchase. But I think people who are comfortable with computers have a special tendency to rely too much on numbers.

Probably the best way to test a computer is actually to use it. You will probably find some things you really like, and other things you hate. For example, I am currently typing this article on a non-Atari microcomputer. With it’s sharper definition of letters, longer text lines, and excellent word processing software, the other computer is a better choice than the Atari for word processing. However, I find times when I can barely tolerate the other computer. Perhaps the biggest annoyance is shoddy power supplies that constantly hum and buzz. The Atari is much better built. In addition, the other computer generates so much television interference that I can only use the Atari when the rest of the family is home.

Recently, at SoftSide magazine, we have discovered an excellent stress test for comparing computers subjectively. It is the process of trying to write an entire program in a single line. Please note that I am not recommending this as good programming practice. Programming in one line is highly dependent on fancy tricks and does not make for elegant or easy to read programs. But it does rapidly show up certain strengths and limitations of the particular computer.

With the Atari, we have found it possible to put a program in a single line that includes continuous graphics, sound effects, and imaginative use of color. We have also found that the Atari is wasteful of memory space, and we really miss having IF THEN ELSE construction. We have also discovered a lot of fascinating tricks that are also bad programming practice. Among the tricks are using POKE instead of SETCOLOR to set colors and using abbreviations to write lines that are so long that they cannot be edited because the Atari expands them to fill more than three lines.

There is a great temptation to use numbers when we have a computer available, because the computer can produce such elaborate reports. But I strongly request that we resist the positivistic impulse, and a good place to begin our resistance is in the decision to buy the computer in the first place. Let us save our society from inundation in meaningless statistics!