Vaughan Family    

Timestream® Maps   

  Home    Biography    People    Places    Multimedia: Making It Work    On the Water    Writings/Presentations

From The Atari Connection: Bits and Pieces

A Column by Tay Vaughan

In this issue of The Atari Connection we begin an exciting new section for and by Atari programmers. Here, beginners and experts alike will find a serious collection of handy routines and short programs that perform useful and interesting programming tasks.

As you study and apply these routines in your own programming efforts, your programming skills will improve and you'll gain easy access ro unexplored fe atures of your Atari Computer. Some routines will be simple utilities for tasks like entering dates and managing names and addresses. Others will help you build players and missiles, change characters in memory, animate figures, or play music. Bits and Pieces can also save you time. It's no secret that computer programming takes time. Professional software programmers use many standardized subroutines that perform common programming tasks. Any technique you can employ that helps eliminate the tedium of writing code that hundreds of programmers have already written is well worth using!

When you take advantage of Bits and Pieces we hope that you will enjoy that same sense of satisfaction and discovery that Thomas Jefferson must have felt when Eli Whitney showed him his new method for assembling muskets. From a pile of disassembled parts, Jefferson picked pieces at random from various bins and assembled a complete working rifle. No longer did each individual component of the musket have to be carefully hand-crafted and fitted! As you build up your collection of these bits and pieces and assemble them into working programs, you may find that your programming becomes quicker, more efficient, and easier.

We also hope to see Bits and Pieces as a place where Atari programmers can show off their bag of tricks and share them with other users. Atari programmers are creative people, proud of their discoveries and accomplishments. So dust off your reference manuals and join in the fun by using and contributing to Bits and Pieces. If you have a few nuggets of logic (or "sweet kernels of brilliance" as one poet programmer has said), Bits and Pieces will allow the rest of the world a peek at your handiwork. Just organize your program or subroutine into the "submission format" outlined on page 29 and mail it to ATARI CONNECTION.

How to Use 'Bits and Pieces' Subroutines

To use most of the subroutines listed in Bits and Pieces simply type the subroutine into your computer and LIST it to cassette or diskette for storage. Then, whenever you wish to use it, ENTER the subroutine into your main program (reserving the appropriate line numbers). LiSTing and ENTERing techniques are discussed in theAtari BASIC Reference Manual on pages 10 and 25.

Be sure to check that the variable names of values and strings in the subroutine don't conflict with those of your main program. Then make the subroutine work for you with a GOSUB to the first line of the subroutine. If you use the subroutine more than once in your main program, you will probably wish to relocate any DIMension statements in the subroutine to the first lines of your main program because you can only DIMension a variable once unless you CLR (Clear) all variables. If IOCBs are used in the subroutine (these are the Input/Output Control Blocks used for diskette, screen, keyboard and other peripheral operations), check that the IOCB number(s) don't conflict with IOCBs already OPEN elsewhere in your main program. If you are lost by now, the Atari BASIC Reference Manual will be able to answer your questions!

Once you master this programming technique, you can amass a useful library of handy standardized routines which you can quickly apply in your own programming work, saving many hours of effort. Don't hesitate to customize a subroutine so that it works precisely as you wish. What the subroutines give you is a kernel of logic which can be tailored to your own special needs!