Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 10, NO. 3 / MARCH 1984 / PAGE 252

Outpost: Atari. (computer languages) Arthur Leyenberger.

Outpost: Atari

Hello there. Once again our paths have crossed. Sit down, put your feet up, relax and let's talk shop. Around here we are pretty excited about Atari home computing and like to share what we know.

This month I have a couple of odds and ends to share with you but I want to spend most of the time talking about languages. Computer languages to be sure, but there are many similarities between a spoken language and a computer language. Just as you and I communicate in English, a computer language allows us to communicate with our computers.

For example, words spoken (or entered) into the computer must be spelled correctly or the computer will not understand. Misspelling a computer command or statement is like mispronouncing a word. If the word was unfamiliar to you, you probably would not catch my verbal mistake nor would you understand what I was trying to say.

I have been programming computers of one sort or another for more than ten years and have learned to speak about a half dozen different languages during that time. But every time I sit down to learn a new language I am reminded of going to the beach. Learning a new computer language is like taking a swim in the ocean.

At first you walk up to the surf and look around. You want to see if anyone is already in and how the water is. Then you figure that you might as well get started, so you test the water with your big toe. Not bad. You then wade in up to your knees thinking, "how will I ever get all the way in?'

You continue inching forward until the water is over your hips. The worst is past; you have reached the point of no return. You continue ahead cautiously until you are suddenly engulfed by a wave, and you realize that it is not so bad now that you are in.

Think of a computer language. First you open the manual and try to read it like a novel. No way! You convince yourself that this stuff is totally incomprehensible. So you look around to see who else knows this language. You figure maybe he can help, so you talk to him. What you get is a familiar reply: it is not so bad once you learn it. In fact come on in; the water is fine.

Your next step is to sit in front of the computer, manual at your side, and try a few simple commands. Maybe a few statements such as PRINT, C = A + B, LIST, etc. That is not too hard. So you try a few more statements and commands. Gradually you learn more, and your self-confidence is increased. Maybe you discipline yourself to spend only an hour at the keyboard at each session. Your first successful program comes and goes, and the next thing you know, the wave has enveloped you, and you find yourself working on a program to maybe keep track of your business expenses. That is how it usually is when learning a computer language.

Atari Microsoft Basic II

One of the programming languages of which you should be aware is Atari Microsoft Basic. It is now in a cartridge version, and for about $80 you get a 16K cartridge, an extension disk, a spiralbound user manual, a quick reference guide, and a brief overview.

When the cartridge and the disk are used together, this version of Microsoft Basic is exactly the same as the disk-based version released about two years ago. The main difference is that Atari was unable to fit 18D bytes worth of Microsoft Basic into a 16K cartridge. Therefore, the accompanying disk contains 2K bytes worth of "extension' features. Fortunately, the extension disk is copyable under DOS, so a backup can be made. This is especially useful for combining the extension commands with your own programs on disk. Disk swapping is minimized, and once the disk is inserted into drive 1, it need not be removed until the end of your programming session.

There are ten commands that did not make it into the cartridge that are on the extension disk. They are: AUTO, for automatic line numbering; DEL for deleting individual or blocks of lines; RENUM for renumbering lines; TROFF and TRON for tracing (on and off) the sequential flow of a program; NAME . . . TO for renaming disk files from within Basic itself; VERIFY for comparing a disk file with the current contents of memory; DEF for defining numeric or string functions; NOTE for obtaining the disk sector number and byte count of a DOS file; and PRINT USING for formatted screen or printer output. Seven of these commands are development aids, while three (DEF, NOTE, and PRINT USING) are used from within a program. However, once the extension disk is booted up, the entire language is memory resident.

The other major difference between the current and previous versions is the documentation. The user manual accompanying the previous release was adequate but nothing extraordinary. The new documentation is much easier to understand and use.

For example, the PRINT USING statement was not explained very well in the old manual and consequently was confusing to use. The section pertaining to this command in the new manual is much clearer and includes some examples. Also included in the user manual are tutorial sections on player/missile graphics and character graphics. The separate quick reference guide is especially helpful, well organized, and clearly presented.

When using the Bit-3 80-column board with Atari Microsoft Basic II, there seems to be a problem switching to the 80-column mode in DOS by means of the binary load ON file. When the ON file is loaded, you are returned to Basic but without a screen display. If you then type (very carefully) DOS, L and OFF, which calls DOS and then loads the OFF file, you are put back into 40-column mode with the screen displaying the DOS menu.

The only solution to this problem that I have found is to turn on the 80-column mode with a USR statement. Typing A = USR(54818) from Basic puts you into 80-column mode. As long as you have previously created a MEM.SAV file, you can do your programming and go in and out of DOS while retaining 80 columns.

The Atari Microsoft Basic II language, documentation, and packaging are well done. Having it on a cartridge will eliminate most of the previous complaints. Specifically, the inability to make a backup disk of the language, which discouraged the development of any serious software, has now been eliminated.


Another language worthy of mention is the new Atari Logo. This long-awaited language is unique compared to other implementations of Logo, in that it allows up to four turtles to be on the screen at once, has a two-voice sound capability, and permits the turtles to be dynamically controlled.

Logo, like Pilot, is finding itself in schools. For children, or as a first language, it really cannot be beat. This is because it is easy to use, and provides quick feedback. Take error messages for example. In Basic, misspelling a command like LOAD would result in the computer responding with a Syntax Error message. In Logo, if you typed LAD instead of LOAD, the response would be I DON'T KNOW HOW TO LAD which is obviously much more friendly and less intimidating to the novice. It also is more helpful since it points out the source of the error.

For $100, Logo comes with a 16K cartridge and two glossy spiral-bound manuals. One is a 215-page reference manual, and the other is a 156-page book entitled, Atari Logo: Introduction to Programming Through Turtle Graphics. A rather complete quick reference guide is also included.

Logo is similar to Lisp in that procedures may be named and later used as if they were built-in commands, and that lists are used for printing and recursion (a part of a program calling itself). Unlike Basic, Logo allows parameters to be passed between procedures. To write a procedure to create a square, I would use the following steps:








ST means show turtle and TO MYSQUARE initiates the ability to write a procedure. Each of the first four lines tells the turtle to move forward 30 units and then rotate to the right 90 degrees. Using abbreviations and the idea of a list to repeat a series of steps, the following is a shorter, equivalent program:



> REPEAT 4 [FD 30 RT 90]


Once this procedure has been defined, I can simply use MYSQUARE as a new command. In fact, I can use it in a new more complex procedure. The following procedure draws a square 12 times and turns right 30 degrees after each square.





So far I have defined two procedures. Either one may be used by just typing its name or including it as part of another procedure. The other Logo commands are equally easy to use. The manual, which teaches programming via turtle graphics, is well written. Variables are used in an understandable way. If I wanted to modify my square drawing procedure to include the capability for specifying the length of each side, I would change the program to the following:




The following program shows all four turtles drawing in three different colors at the same time. The background cycles through 26 of the 128 colors. The program will continue until you press the BREAK key.


> TELL 0

> ST PU SETPOS [50 50]

> TELL 1

> ST PU SETPOS [-50 50]


> TELL 2

> SET PU SETPOS [50 -50]

> TELL 3

> ST PU SETPOS [-50 -50]


> TELL [0 1 2 3]



> WAIT 360


TELL lets you talk to a particular turtle, 0 through 3. PU is pen up. SETPOS places the turtle on the screen at the coordinates given. SETPN means set the pen number. PENCOLOR, SMALLB, and CHGCOLOR refer to procedures listed below. PD is pen down, and WAIT is a delay in 60ths of a second. Typing ALLFOUR will start the program once all of the procedures have been entered.

Here is a very short program that demonstrates the dynamic aspect of Logo. The turtles may be given commands while they are moving. For example, typing TELL 0 LT 30 SETSP 150 will make turtle 0 turn left 30 degrees and increase its speed to 150. Try experimenting with some of the other commands.


> TELL [0 1 2 3] ST SETSP 25


There is much more to Logo than the few examples I have presented here. I have not even mentioned the TOOT command for sound, for example.

Logo is a very accessible language for chidren. I have seen children spend hours in front of the screen trying out different procedures and ideas. It takes only a few minites to learn enough about Logo to start being creative.

Listings 1, 2, and 3 are procedures to get you started. Try to figure out what they do, then run them and incorporate them in some programs of your own.

Listing 1.







Listing 2.


> FS

> IF :SIZE > 80 [STOP]

> PD


> PU

> REPEAT 2 [LT 90 FD 5]

> RT 180


> HT


Listing 3.


> IF :CODE > 127 [SETBG 74 STOP]


> WAIT 60



Head Games

For a long time I have stayed away from text adventure games. I thought that they must be pretty dull because there are no graphics on the screen. And besides, it takes hours and hours to complete one. Boy, was I wrong in a big way.

I have recently begun playing PLANETFALL by Infocom. Perhaps a better description is that I have recently become hooked on Planetfall. The game is superlative. It is humorous and witty. If you enjoy science fiction and a challenge, Planetfall deserves a closer look. For a complete review of this excellent adventure game see the December issue of Creative Computing.

As their ads proclaim, the graphics inside your head are far better than those appearing on any video screen. This is also true for other Infocom adventures including: Starcross (science fiction), Deadline and The Witness (mystery), and Suspended and Enchanter (fantasy). You owe it to yourself to own at least one of these marvelous text adventure games from Infocom. You will be in for hours of enjoyment. And now for something completely different.

The Commodore Connection

You are probably asking yourself why the name Commodore is appearing in the Atari column? Normally I would not even think of such a heretical act lest my loyal Atari readers string me up by my Basic bariables.

But there is a good reason to mention the word, if only in a hushed whisper, because they have a video monitor that is simply fantastic. I am of course referring to the Model 1702 (formerly the 1701) color monitor. This little beauty makes the Atari computer look like the king of the graphics machines that it truly is. Somehow, I find it ironic that Atari has to rely on Commodore to make its computer look good. I guess that is show biz. Come a little closer and let me tell you why I like this tube.

The model 1702 is a 13 NTSC color video monitor measuring 14 1/2 X 14 1/2" X 15 1/2 and weighing about 32 pounds. On the rear of the unit are three RCA phono jacks for luminance, chrominance, and audio imput. There is also a slide switch for selecting medium or high-resolution mode. On the front are two additional RCA phono jacks for composite video and audio input. Behind a flip down panel are the usual controls you would expect to find: tint, color, brightness, contrast, horizontal position, vertical hold, and volume.

To describe how well the Commodore monitor works, I must first explain the video signals that are produced by the Atari computer. Those of you who are familiar with this topic are excused for the next four paragraphs. For the rest of you, here it is.

The Atari 800 computer has several types of video output. RF or Radio Frequency is sent through the cable that is permanently attached to the computer. The RCA phone plug on this cable plugs into the antenna switch box on the back of your television. RF is really a variety of different signals, including the brightness of the picture (luminance), color (chrominance), audio, TV synchronization, and modulation.

Your TV set takes this signal and breaks it down into the components. The quality of the picture you see on the screen is a result of how well your TV performs this process and its convergence capability. Convergence is simply the ability of the TV picture tube to focus a signal on the screen. An RF signal fed to your TV, generally produces a low-to medium-resolution image.

Another type of video output generated by your Atari computer is called composite video. This medium-resolution signal is made up of color, brightness, and synchronization. It is available at the monitor jack on the 800 on pins 4 and 2 (ground). The third type of signal coming out of your computer is called composite luminance. This signal lacks color information and is typically used for monochrome monitors. It yields the sharpest and brightest picture possible. Pin 1 of the 5-pin D.I.N. jack carries the signal.

The other signal that is produced by the Atari computer is called composite chrominance, or chroma. It is found on pin 5 of the jack. This signal has only color information. Normally, it is not used because few video monitors can accept it. By the way, pin 3 of the D.I.N. jack is the audio signal. If you want to hear the best sounds you ever heard from any computer, run leads from pins 2 and 3 into the auxiliary input of an amplifier and crank up the volume. I guarantee you will be impressed.

Okay, now you need a cable that has a 5-pin D.I.N. plug on one end and four RCA jacks on the other. You can make your own if you wish (see Figure 1 for the Atari D.I.N. jack pinouts). I know of one source for this type of multi-jack cable. It is Gemini Enterprises, 86 Ridgedale Ave., Cedar Knolls, NJ 07927. The cable costs $9.95 (plus $1.50 shipping) and is part #AC54.

Once the Luma, Chroma, and audio plugs are connected to the back of the monitor and the composite video plug is attached to the front, you are all set. With the rear slide switch set to "rear', you will see the most stunning and crisp picture that rivals that of an expensive RGB monitor. Boot up Q-Bert, Pole Position, Axis Assassin, or Donkey Kong and marvel at the quality of the high-resolution video image. It is so good it really has to be seen to be appreciated.

When the rear slide switch is set to the "front' position, you are using the composite video outpur of the Atari and the quality is about the same as a very good TV set. When you are running software that uses artifacting, a technique used to get multiple colors out of a single mode, the Commodore monitor must be set in this mode. Otherwise you will have only a black and white image on the screen.

I am very excited about this video monitor. It has the best quality image I have seen on any color nonitor. The audio section of the monitor is just as good. You can turn the volume up and not have to suffer the distortion that is usually heard on TVs and other monitors. I highly recommend this non-Atari peripheral, which carries a suggested retail price of about $300.

That's a wrap for this month. Next month I will shed some light on a game that has been called the sleeper of 1983: Planet Missionary by Magical Software. I will also revies some new software from an unusual source, a supermarket, and have a few other surprises. Until then, happy programming.

Photo: Figure 1. Atari 800 monitor jack.