U.S.A. S3.00 CANADA S3.50
L'LLLi:;ULCZ;.L L'LLCZU<.C:L:^^q:T^iaiuL L VniiiiLOt
# Atari Stock Portfolio
# Computer Combat Games
^ Education Wrap-up
ooks for Atari
e^^"°:
New Low Price $149.95
mpp-ioooc
R5
Auto Answer/ Auto Dial
Direct Connect to Phone Line
No Atari 850'" Interface Module Needed
Free 1 hr. subscription to
THE SOURCE™
Free CompuServe DemoPak™
1 year warranty
Connects to Joystick Port
Works on ALL Atari Computers
"^^v^ -
■^'S^-
SOPHISTICATED SMART TERMINAL SOFTWARE ON CARTRIDGE
FEATURES:
Supports XMODEM Protocol ASCII/ATASCII Translation Allows Transfer of Files Larger than Mennory Upload /Download of Text and Programs 100% Machine Language
Multiple Buffers^ Off-Line Editing Variable Baud Rate Parity Options Full/Half Duplex
Onlv 393.95
^^^^^
Replaces Atari 850™ Interface Module
Compatible with all software
3 foot cable with Centronics plug (compatible with Epson, NEC, Prowriter, etc.)
2 year warranty
Connects to serial bus on computer
Daisy chains with other Atari peripherals
Works on ALL Atari Computers
Atari 850, THE SOURCE, and CompuServe DemoPak are trademarks of Atari, inc. Readers DinesI and CompuServe. . M icrobits is not affiliated witti Atari. Readers Digest or CompuServe.
WATCH OUT ATARI ! AT-D2 HAS LANDED !
^^
^\V-P
IRAK'S floppy and hard disk drive systems for the Apple and IBM-PC are available at many Computerland and oftier fine stores worldwide.
. . .WITH IT'S FLEET OF THE MOST ADVANCED SINGLE AND DOUBLE DENSITY DRIVE SYSTEMS IN THE UNIVERSE - TOTALLY COMPATIBLE WITH ATARI* COMPUTER MODELS 400, 800, 600XL, 1200XL, 1400XL, AND 1460XL.
DOCK YOUR FAVORITE PRINTER DIRECTLY TO OUR DRIVE'S BUILT-IN PARALLEL PRINTER INTERFACE, THERE'S NO NEED TO BUY AN EX- PENSIVE ATARI 850 MODULE.
THE COMMAND CONTROL PANEL FEATURES READ, WRITE AND DENSITY INDICATORS, A TRACK COUNTER TO LOCATE EVERY BIT OF YOUR DATA AND A TOUCH-SENSITIVE SWITCH TO PROTECT IT,
WARP SPEED OF UP TO 18 TIMES FASTER THAN ANY OTHER ATARI DRIVE IS ACHIEVED WITH OUR OPTIONAL TURBO-CHARGED SOFTWARE,
►AWESOME POWER — DESTROY A PLANET OR LEARN HOW ONE IS CREATED, BALANCE YOUf? CHECKBOOK OR WRITE A BESTSELLER, LEARN A NEW LANGUAGE OR CREATE ONE,
IT'S MAGNIFICENTLY SIMPLE! — JUST PLUG IT
IN AND LIFT-OFF! ■Atari ISO registered trademark of Atari. Inc. ■ :
TRAK GIVES YOU THE MOST STORAGE FOR |
|
YOUR DOLLAR! |
|
c^ 500 |
SINGLE DENSITY DOUBLE DENSITY ^^H |
^g_i^l |
|
t}: 300 8 200 |
-P 11 |
OUR FLAGSHIP, AT-D2, WITH TWICE THE STOR- AGE CAPACITY OF THE ATARI 810 DRIVE PLUS A PRINTER INTERFACE AND COMMAND CON- TROL PANEL, HAS A VALUE OF OVER $1000 YET COSTS LESS THAN S500!
SEE YOUR DEALER NOW FOR A TEST FLIGHT, OR
coll toll free: 1-800-323-4853
in Illinois, coll collect: 1-312-968-1716 TWX 910-222-1848 ,
microcomputer corporation 1511 Ogden Ave Downers Grove, IL 60515
k
Live the Fantasy and the Adventure.
STRATEGIC SIMULATIONS INC. PRESENTS A FANTASY ADVENTURE GAME: QUESTRON™
ONE OF THE FINEST CHAPTERS IN THE NEVER-ENDING SAGA OF THE BATTLE BETWEEN GOOD AND EVIL
starring YOU as THE HERO • MESRON, THE GOOD WIZARD • MANTOR, THE EVIL SORCEROR
AND HIS HORDES OF HERO-CRUNCHING MONSTERS • Written and directed by CHARLES .DOUGHERTY
ON 48K DISK FOR YOUR APPLE® II WITH APPLESOFT ROM CARD. APPLE IH-. lie, OR APPLE III. ALSO FOR ATARI® HOME COMPUTERS.
APPLE® version now showing at a computer/software or game store near you. ATARI® version coming Spring 1 984.
^Bll
THIS GAME RATED POSITIVELY GREAT.
ideal for Fantasy Adventurers of all ages.
APPLE is a registered trademark of Apple Computer, inc.
If there are no convenient stores near you, VISA & Mastercard holders can order direct by calling 800-227-1 61 7. ext 335 (toll free). In California, call 800-772-3545, ext. 335. QUESTRON'" goes for $49.95, plus $2.00 for shipping and handling.
nient stores near you, VISA & Mastercard To order by mail, send your check to: STRATEGIC SIMULATIONS
ycalling800-227-1617,ext.335(tollfree). iNC, 883 Stierlin Road, BIdg. A-200, Mountain View, CA 94043.
72-3545, ext. 335. QUESTRON'" goes for (California residents, add 6.5% sales tax.) Ail our games carry a "14-
shipping and handling. day satisfaction or your money back" guarantee.
WRITt lOR A FREE COLOR CATALOG Of ALL OUR GAMES.
^^.
page 44
pase 19
1 |
^ |
|
1 -^•.TT'*'^ |
f\ |
^^ ^^ Thc> AlARI Rccrir ]rrc> ffrriiapvi
\
The ATARI Resource February 1984 volume 2, number n -^
|f E A T U R E S |
|
A GREETING CARD FOR ALL SEASONS by William L Henson |
26 |
Say it on cassette |
|
FOLLOW THAT STOCK by Eric Verheiden |
31 |
A spreadsheet for your stock portfolio |
|
MONEY MATTERS by Warwick Wakeman |
37 |
Atari recl<ons with personal finance |
|
TYPO by Bill Wilkinson |
42 |
Type your prosram once |
|
ATARI AT WAR by Karl Wiegers |
44 |
The wild world of conflict simulation |
A |
FAST FINGERS by Craig Chamberlain |
48 |
Autoboot with a ghost at the keyboard |
|
PHONE BOOK by Jerry White |
54 |
Simulate string arrays in Atari BASIC |
|
CHARACTER GRAPHICS by Chris Chabris |
60 |
Redefine the set any way you choose |
|
DEPARTMENTS |
|
INSIDE ATARI |
|
IT'S OFFICIAL by David F. Barry |
13 |
STARTING LINE |
|
A CINDERELLA STORY by Fred Pinho |
15 |
EDUCATION |
|
THE END OF ODD MAN by John and Mary Harrison |
19 |
LOGO/PILOT |
|
LOGO BOOKS by Ken Harms |
23 |
IN THE PUBLIC DOMAIN |
|
THE GANTLET by Stephen Groll • V^BONUS GAME** GALACTIC GLOOP by Guy Aitchison |
70 78 |
TAPE TOPICS |
|
THE 410 HI-REL MOD by Carl Evans |
76 |
SYSTEMS GUIDE |
|
NIGHTMARE DETOUR by David and Sandy Small |
83 |
ASSEMBLY LANGUAGE |
|
DRAWTO FILL by Joseph Tucker |
89 |
I/O BOARD . HELP!
pase 23
PUBLIC DOMAIN SOFTWARE .
NEW PRODUCTS
PRODUCT REVIEWS
6 |
ADVERTISERS LIST |
110 |
10 |
LISTING CONVENTIONS |
119 |
93 |
SHOPPER'S GUIDE |
113 |
94 96 |
MICROSCREENS |
114 |
^^ ^^ Tfie ATARI Resource
riihli>hr
I/O BOARD
S,«i IVn Class l\
Send addi
James Capparell
Robert DeWitt
Christopher Rauber
Tedmu.d Cpv l\lilnr
David Dubcnuan
tdlUllLll Asitil.lM
Caitlin Morgan
Editorial Clnk
Aria Ertz
C.iiHlnhuliNf: l.dtiun
Carl Evans
Ken Harms
John & Mary Harrison
David & Sandy Small
Jerry White
An nnrclnr
Marni Tapscott
PindlulU)'! .S;*/;.m;,mo-
Kyle Bogertman
Contributing tilnslr,tlurf
Beatrice Benjamin
Bill Boyer
John Musgrove
Ccivr
Marni Tapscott Les Torok
Sid'S, liplin,,:.
Julianna Hoftnian
Shildw,;;
Augustus Jones V.J. Briggs
Adt't'rtlsin^'Vrndlii:tiiiit Catirdinatur
Linda Tapscott
Adi'i'rttiitiii S:ilrs
Steve Randall
iiutLptntlLiii pcrKuliL il iim iliilLiird in ill \tiri, IriL \l \l(l IS 1 n Rliiii.uk nl pni. \ll r(.kri!Kts m Ann jiu'lIikis ,>n-
I! ItklTl uKlJ UkI slldllUi lu so tlOU'J.
kliiulry I'lS-l
V.ikmii : NumiHT II
lTIC-[lu \I\RI Rss„uici 1 |)iihl.sluil
re timts pu \t ir In W I 11 I'ul.lisliiiij.,,
offitts la lot iilJ u s'I StLoiul SiiLvi.
IS o I \ 'Mill" ISS\ iris ^s'" SrsomI
1 i,s piisl H ^ n Ir.iKisu. ( ililonu.i .uij
ddin..ii il 111 iihiif, ..llists l'( )S I MAsrhR:
1 uii;t lo ANTIC s: t Second Srrcot,
Sm h iiiusu, I \ ')4!07.
F.dirorial sulnnissions should inclujL' proj^r.lrn
ng on disk or c;isseilf. and u\l tilt- on iiR'di.i
paper II text was preparcti wnli a \Mird
ssor. Media will be rcnnned il sell-jcldressed
pd mailer is supplied. ANTIC assumes no
ibiliiy tor uiisolieiled e.liroriai material.
Copvriglif- l')84 by ANTIC I'tiblislims. All Rights Reserved. I'mni-d ni USA.
General Offices (41.5) 957-()SS6
Advertising Sales {4\5) 661-.34()0
Credit Card Siibstriptiotis
^ outside California (800) 227-1617 ext. 133
B inside California (800) 772-3545 ext. 133
INTERFACE ALTERNATIVES
I have an Atari 800, and have recently purchased an Epson RX-80 printer. Can you suggest alternatives to the 850 (Atari) and the MPP-UOO (Microbits Peripherals) interfaces. I want to take into consideration future additions to the system. Also, which disk drives are the best choices for the Atari?
R. P. Stein
Audubon, PA
Axiom makes a $99 printer interface. We haven't evaluated it yet, but expect to shortly. Also, several disk drives have built-in printer interfaces. Two of these are the Fercotn (special model) and the Trak. We haven't yet evaluated the per- formance of these drives, but are plan- ning to publish a disk drive survey in the near future. See "Mission Redux: Disk Drive Daze" (ANTIC, December 1983) for a survey of disk drives from the point ofviewoftheprofessionaiprogrammer. -ANTIC ED
COMPUTERIZED GRADING
In the October 1983 issue of ANTIC, the authors of "Flip Side" hint at the exist- ence of programs that keep track of grades for a semester. Where can I find these programs?
Don Sward Northfield, MN
We're aware of two commercial products that perform classroom record-keeping chores: Easy Grader Rev. 1.1 (AFX) and Teacher's Gradebook (Dynacomp, Inc.). -ANTIC ED
THE BEST YET!
Congratulations on your December issue! It's your best ever. I've been read- ing ANTIC since you started, and it's been great fun to watch you grow.
Jerry Dea
Secretary
Atari Anonymous —
A Users Group
Upland, CA
TYPO HELPER
antic's debugging program, "TYPO," is an excellent tool, but it's a little slow. Most people have to run it several times to find all of their typos and, because it checks the entire program each time, a lot of time is wasted checking portions of the code that you already know are correct. But by changing line 32110 and adding line 32175 (see below), you can force TYPO to start checking at a line number that you specify.
This line number should match a beginning line number of one of the ranges in the Typo Table for the listing involved. Please note that these new lines add a variable to TYPO; as a result, the variable checksum provided by this modified version of TYPO will not match the one printed in the magazine. Therefore, you should use the original version of TYPO until the two variable checksums are identical. Then you can use ENTER to merge these modified lines into the program:
32110 INPUT Q$:? "Starting Line Number";:INPUT STLINE: OPEN #QF,12,0,Q$: QREM = 0
32175 IF QLINE<STLINE THEN QADDR = QADDR + PEEK (QADDR -f- 2):G. 32170
Ron Bishop Owasso, OK
Thanks for the useful tip. By the way, a revised version of Bill Wilkinson's article on TYPO ("TYPO Revisited, Again") appears in this issue for the benefit of our many new readers. It explains how to use TYPO to check other program listings published in ANTIC and to check itself.
-ANTIC ED
FOND OF OUR FONT
I'd like to compliment you on your monospaced program listings. Together
continued on page 8
ANTIC, The ATARI Resource
•VI R»l»
'^ 'M^
ATARI 5200
TI99/4A
ATARI 400/800/600XL
INTELUVISION
COMMODORE VIC 20
ATARI 2600
i>o t an
cfmKsr 10!
COMMODORE 64
COLECOVISION
HOW TO
GET Q*BERT"OUT OF
TOUR SYSTEM.
If you've been wanting to play Q*bert, but haven't been able to find it available for your home system, your time has come. Because now you can keep Xi V^^^r? v°n things hopping with any of these popular home video and computer formats. ^,,^^^^,,^
Get going to your nearest video store and get Q*bert ■ today And while you're there, check out Parker ' Brothers' POPEYEf FROGGER,™ TUTANKHAM; and SUPER COBRA.™ All the great Arcade Action '1^B||RICER games, now in all the great home formats. BROTHERS ^
r„k™VUi™kairart™arkofCol»coIndusliiesInc ©1983ParkerBrothers, Beverly,MA01915JntellivisionisatrademarkofMaUelJncXommodoreV!C20andComraotee64areliademark5OfCoi™^^
nji\ m\xii\%
with your customized font and "TYPO," they make ANTIC by far the easiest magazine to copy programs from. Thanks for a great magazine.
Brian Weiss
Pierre, SD
ROCKING ROMS
I've always been convinced that ROM cartridges are more rugged than cassette or disk media, but I was recently sur- prised to find that my Missile Command and Star Raiders cartridges wouldn't work. Missile Command put white squares on the screen, and Star Raiders generated only the familiar blue Memo- Pad. And, of course, the 90-day warran- ties for the games had long since expired.
Since I'm an electronics technician, I decided to do some experimenting. I started with Star Raiders, and tried pressing [RESET] and re-inserting the cartridge several times. No luck. Then I realized that if the Memo-Pad was com- ing up, the computer must think there was not a cartridge in the left slot. Since Star Raiders was plugged into the slot, I realized that something was not mak- ing proper contact.
I removed the cartridge's metal lid and looked inside. Everything looked okay, so I pried each of the two ROM chips a little and then carefully pushed them back into their sockets. Then I re- assembled the cartridge and headed back to my 800.
I plugged the cartridge back in, and was greeted by the slow drone of the engines at Warp Three, and a front view of the galaxy with no Klingons in sight. Success! Moments later, the same fix worked for Missile Command. It ap- pears that "wiggling" the ROM chips up and down a bit can save a "bad" cartridge from the trash bin. So before giving up on your malfunctioning cartridges, try rocking your ROMs.
David Mundy St. Ann, MO
AEROBIC COMPUTING
I've been using the Suncom Aerobic Joy- stick with my Atari 800, and it does a great deal to relieve the tedium of my half-hour exercise routine every morn- ing. Galaxian has provided me with a lot of entertainment during these ses- sions, but I'd like to try some other games for variety's sake. Can you suggest any games that take advantage of this joy- stick's special capabilities? The most important thing to remember is that the faster you pedal, the faster the fire but- ton shoots. Also, you can't aim very precisely when you're pedalling away at 20 miles per hour.
Helen Phillips
Arvada, CO
The Aerobic Joystick should work best with games that require rapid and con- tinual pressing of the fire button. This type of game is also ideal for testing joysticks and modules that add a "rapid- fire" capability to your system. Zaxxon (DataSoft) and Defender (Atari) both fit the bill nicely and are terrific games as well. -ANTIC ED
IN THE DATA FILE DUMPS
I'm trying to learn data file programming using Atari Microsoft BASIC. In an earlier letter, I asked if there was a way to produce a program that allows you to use a user-defined variable for the file name in the OPEN #iocb,"D:filename" file-access command. The book I was using at the time described how to do this in Microsoft-80, but the OPEN command is entirely different. You ad- vised me to use a string variable in place of the file specification in the OPEN command. Unfortunately, I don't know what you mean by the term "file specifi- cation." Would it be possible for you to give me a specific example of the correct format? I'd also like to be able to specify what type of file to open.
Jerry Steinberg
Brooklyn, NY
If you want the user to input only the file name, you must insert the device specification (i.e., D:) in front of the fiilename. This is done via string manipulation.
The best solution we've found is to include a routine that checks for the device specification. If it is not present, the routine adds it.
Once you've derived the proper file specification (including device specifica- tion and filename), use the string vari- able, without quotes, as follows:
20 OPEN #l,N$OUTPUT
For further information on string manipulation, see Chapter 10 of your Microsoft BASIC manual.
-ANTIC ED
KOALA IS COMPATIBLE
I recently purchased the Koalapad for my Atari, and I'm very impressed by it. How- ever, I'm dismayed by the fact that its picture-storing method is incompatible with other graphics programs, such as DataSoft's Micro-Painter. Do you know of a remedy?
Alek Grguric
Don Mills, Ont. , Canada
You're in luck! You can store pictures that were created with Koalapad's Micro Illustrator program in a standardized format which is compatible with any program that can load a Graphics 8 or Mode E (Micro-Painter) screen. When you want to save your picture, go to Micro Illustrator's icon menu and posi- tion the cursor over the disk symbol. Then press [INSERT] on your com- puter's keyboard. This will save your current picture to disk in standard for- mat as a file named PICTURE.
This remedy was submitted by Robert H. Watson of Brooklyn, NY. He also noted that you can load any file named PICTURE by moving the cursor to the disk symbol and pressing [CLEAR],
continued on pase 10
ANTIC, The ATARI Resource
EPYX GAMES
^eaac
^terfis«»>a>y*»
^-kg^fjufj^M^,
^ GatewayioApslial
^f!>rK
Bpyx
^^mi^J^am
^fM
TyTJ
^i^wf STARflRE FIREONE
e#a9f!3t^^
I I/:
ONE
£f^ STARf IR
epm 6atcwayteAp»»<«"
If you're one of those EPYX customers who keeps going back for more, we have good news for you.
Between now and February 29, 1984, we're offering you any computer game from this Hst. . . absolutely free.
It's simple. Just buy one of our computer games from your local retailer, then send us the box label showing number and computer type. Also, include the dated cash register receipt for the game. Most importantly, fill out the special order form telling us which FREE game you want, along with your name and address.
Buy one, get one free. Are you game for a deal like this?
coMPuraiiOFTWAm
Strategy Games for the Action-Game Player
Check the EPYX game you would like to receive free.
Atari
Morloc's Tower
Dragon's
Eye
Crypt
of the
Llndead
The
Night- his
mare
King
Arthur's ii.«
Heir
Escape F^'rorn
Vulcan's
iale Hit;
nisuD i)i-sk LJ
Disk LJ
D
D
D
Name
Address City^
TlusulflMiiV d.-liv.-.viinrc
Apple (Disk Only)
Morloc's
Tower
Dragon's
Eye
Sorcerer
of Siva
Fore
Commodore 64
Curse ofRa
Sword of Fargoal
Disk [_!
c„s.n
Disk Lj
c..,n
Crush, DhkLJ Crumble ca™. d & Chomp
IfiM (Disk Only)
Curse ofRa , Rescue at Rigel
VIC-20 (Cassette Only)
Rescue at Rigel Ricochet Crush, Crumble & Chomp
Radio Shack (Cassette Only)
Invasion
Orion
Morloc's
Tower
Sorcerer
of Siva
Rescue
at Rigel
New
World
Please print or type your name in the space provided below. Send this form with your dated cash register receipt and box label to: EPYX Game Offer
RO. Box 814
Young America, MN 55399
State
Zip
I only 111 llif Contiuenlal UiuKnl Slales. Offi,'riK viiid whi-rc prohiliiled by law. PIc.-ih-.' allow : iiiiu' Dffci Kxpir,'', S-Vfiniiiry 29. 1984. All (onus must be ruci-ivi'd by March :n. 198.1. U y iilci 1.-; ivcfivL'd, we ri-ic-rvc ihe riglil toaiibstitule ;i similar product.
!i lo ('iKht wPL'ks fill .irtinli'ctiun is not
1/0 boarb
but this didn't ivork when we tried it. If you load a picture created with Micro Illustrator into Micro-Painter, you'll get an error message and the picture's colors will not look right, because the four appended color bytes that Micro-Painter expects are not present. However, the entire picture can be loaded, and its colors can be adjusted. —ANTIC ED
MINDING THE MODEM
I recently purchased a 1200-baud Hayes Smart Modem. What do I need to con- nect it to my Atari 800 and run it? Please bear in mind that I'm a babe in the woods.
Milton Yuan Rutherford, NJ
You'll need an Atari 850 interface to con-
nect your Smart Modem to your Atari; TELETALK, by DataSoft, is one of several programs that will allow you to control the modem. For more informa- tion on the subject, see "Atari Terminal" (ANTIC, May 1983, page 32) and watch for our May issue this year, which will focus on the latest developments in the field of communications.
-ANTIC ED
HELP!
GTIA-SKETCHPAD BUGS
I've found a couple of minor bugs in "GTIA Sketchpad" (ANTIC, December 1983). If you move the cursor to the top of the screen in the "Doodle" mode while you're pressing the joystick's fire button (to create a wide line), you get an error message. To remedy this, change line 800 as follows:
800 IF YP<N1 THEN YP = 148
If you move the cursor to the far left of the screen while pressing the fire but- ton, it doesn't wrap around. To fix this, make the following changes to line 790:
790 IF XP<N1 THEN XP = 78
These changes should make debug- ging easier.
Will Cronenwett Norman, OK
TAKE IT FROM THE TOP
There is a minor flaw in "Air Raid 2000" (ANTIC, November 1983) by Erik Wolpaw. The title of the game flashes on the screen constantly. This is distracting and hard on the eyes. To remedy this,
simply change the inverse-video title of the game in lines 1120 and 1370 to nor- mal video.
All in all, however, I'd like to con- gratulate Erik on a job well done — keep it up!
Bill Mason
Redding, CA
WRONG ADDRESS
In the "ANTIC Pix Controllers" survey (December 1983), we gave an incorrect address for Questar Controls, Inc., the manufacturer of the Questar Control Console and the Blaster. Their correct address is: 799 Main St., Half Moon Bay, CA 94019.
A LOT OF ROT
The listing for my new "DOS Sectors to Forth" article (ANTIC, page 32, Oc- tober 1983) contains a misprint at the end of the fourth line. The word "tROT" should be "<ROT." This command causes a left rotation of the stack — in other words, it moves the top of the stack to the third position from the top. This word can be implemented as "LROT" in
some versions, and is defined as:
: <ROT ( Nl N2 N3 - N3 Nl N2 ) ROT ROT ;
Bill Van Hassel New Hope, PA
EPSON RX-80 PRICE
We provided incorrect price information on the Epson RX-80 printer in our recent "Printer Survey" (ANTIC, January 1983). The correct prices are %399 for the standard model and $599 for the RX-80 with the friction feature. The $299 price was an authorized intro- ductory sale price.
TAG
In the game "Tag" (ANTIC, November 1983, p. 84), the screen is supposed to clear after every minute of play. How- ever, due to an oversight, it does not. To effect this feature, change line 95 to:
95 POKE 540,60:5 = S -I- 1:IFS = 60 THEN M = M + 1:?#6;CHR$(125): S = 0
H
10
ANTIC, The ATARI Resource
TAKE
V\ ^-
NA/lTl-l IMIGI-IT iWlSSlOIM
^m
You deserve the best. You've earned it. Now reward yourself with a session of Night Mission PINBALL, the most realistic and challenging arcade simulation ever conceived! ■ Stunning graphics and dazzling
^ — — - ■■ >^ sound effects put Night Mlission PINBALL in a class by itself. Game features: multi-
t""[!^iim,T-" 1 ball and multi-player capabilities, ten different professionally designed levels of play, \ m' ^ > ^- and an editor that lets you create your own custom modes. ■ So take a break with ' r°'\\' Night Mission PINBALL from SubLOGIC. Winner of E/ecfronte Games magazine's
«!»=■ ||r ,. ij\ \ :
1983 Arcade Award for Best Computer AudioA/isual Effects.
See your dealer . . .
or write or call for more information. For direct orders please add $1 .50 for shipping and specify UPS or first class mail delivery. Illinois residents add 5% sales tax. American Express, Diner's Club, t»/lasterCard, and Visa accepted.
Order Line: 800/637-4983
[iflfeLOGIC
713 Edgebrook Drive Champaign IL 61820
(217) 359-8482 Telex: 206995
At LAST!!! A Real Flight Simulator!!!
— From The Creators of HELLCAT ACE!
A real flight simulator allows you the pilot to accomplish Takeoff s, Landings, Cross-Country Navigation, and Emergency Procedure practice under Clear (VFR), Cloudy (IFR), and Cross-Wind conditions. SOLO FLIGHT is such an advanced simulation that uses realistic three dimensional terrain graphics, actual configuration instrument panel, multiple air navigation maps, and accurate aircraft performance characteristics to provide the challenge, thrill, excitement, and joy of the flight experience!!!
• Extensive flight manual including Basic Flying, Instrument Flying, Maps, and Charts.
• Three geographical air navigation areas each with multiple airports and multiple runways.
• Dual Radio Navigation (VOR) and Instrument Landing System (ILS).
• On-screen flight path review between flights.
• Multiple Landing Approach Charts and Design-your- own approach feature.
• Takeoffs and Land- ings under all weather conditions.
• Cross-Country Navigation via Landmarks, VOR Stations and Dead Reckoning.
• Emergency Pro- cedure Practice.
• Air Mail delivery game to test your flying skills.
• Landing ratings for smoothness and speed.
• For all Atari computers. Commodore 64, Disk and Cassette
. . . $34.95.
, u l_ Ul I I
Look for MicroProse's two new exciting real time combat simulations — M7G ALLEY ACE & NATO COMMANDER.
Write or call for our Free Catalog.
If you cannot find our games at your local store, you can order by MasterCard or VISA, Money Order, COD or Check. Add $2.50 for Postage and Handling. Maryland Residents add 5% Sales Tax.
MicroProse Software
DEALER INQUIRIES INVITED.
10616 Beaver Dam Road, Hunt Valley, MD 21030
(301) 667-1151
ATARI and Commodore 64 arc the registered trademarks of ATARI, Inc. and Commodore Business Machines
INSIDE ATARI
IT'S OFFICIAL!
Atari joins the U.S. Olympic Team
by DAVID F. BARRY
The 1984 Summer Olympics have not yet opened in Los Angeles, but Atari is already having a major impact on the Olympic effort. As befits a company of Atari's stature, it is sponsoring the U.S. Women's Volleyball Team, which is con- sidered to be one of the top contenders for the gold medal in this Olympic sport. This sponsorship is only one of several agreements Atari has entered into with the Los Angeles Olympic Organizing Committee (L.A.O.O.C.) for the 1984 Summer Games.
Atari has also contracted with the L.A.O.O.C. to be the Summer Games' sole sponsor of home computers, arcade games and home video games. This con- tract gives Atari the right to use the Olympic symbol, language, and logo on any of its promotional materials.
In addition. Atari has contracted with ABC Sports to air 25 commercials dur- ing the Winter Olympics in in Sarajevo, Yugoslavia (February 8-19), and 60 commercials during the Summer Olym- pics in Los Angeles (July 28 to August 12). Consequently, it should be difficult to watch the 1984 Olympics on televi- sion without being aware that Atari is on the scene!
Atari is also donating approximately S75 ,000 worth of equipment to be used in conjunction with the Summer Games.
David F. Barry is a technical writer in the computer field, and the author of an upcoming book on the word-processing program Wordstar.
Thus far. Atari has arranged to provide computer games for use by athletes in the Olympic Village, and to set up arcade games at the ABC International Broad- cast center for use by some 2,000 media representatives from around the world. To further dramatize its commitment to the U.S. Women's Volleyball team.
Atari is sponsoring the team's current cross-country tour, which pits the women against some of America's top- ranked, men's collegiate varsity teams. In support of this commitment on the part of Atari, team members will be wearing Atari patches on their uniforms.
continued on next page
February 1984
13
TM OiMIMND
NOW YOUR ATARI PUTS LINE-BY-LINE CONTROL OF TAX PREPARATION AT YOUR FINGER TIPS.
INSIDE ATARI
Calculations are automatic. All you do Is enter your fox information. Tax Command does all mottiematical calculations for you. Build-in tax tables eliminate guesswork. No
more finding ttie rlgtit column down and rlgtit
line across. Tax Command tias ttie 1040 tax
fables built rlgfit In. So it zeros in
on your refund (or fax payment)
amount automatically.
Tax Command is tost, easy! Just
fill in ffie blanks. If you moke a Practical Pragrams, Ire.
<qp
mistake, no problem. Just go bock and retype your entries. Everyffiing is re- calculated for you. You'll find the 1040. Scfiedule A. Capitol Gains & Losses. Income Averaging. And more. Anyone wtio can read can use Tax Command. And the best feature of all. . .just $24.95 plus $2.00 for shipping and handling. Wisconsin residents add 5% tax. Specify computer type, . tope or disk.
P.O. Box 93104-N • Milwaukee, Wl 53203 • (414) 278-0829 Available at tine computer stores everywhere, or by ordering direct.
KB 400" $89.95
Exact Atari™ keyboard layout — Full Year Warranty Ne^^! Speed Blaster tm rapid fire joystick add on $12.95
l6kATR8000 $299.95
64k ATR8000 w/CP/M .... $449.95
OS/A -I- 4.1 $ 49.95
l-SW'Tandon Drive $249.95
2-5 i4"Tandon Drives . ... $449.95
8" Drives CALL
4-Connector Drive Cable .... $35.00
2-Connector Drive Cable .... $25.00
8" Drive Adapter $19.95
Parallel or Serial Cable $29.00
TELEPHONE
309/343-4! 14
Weekdays 9am-5pm Saturday 9am- 1 2pm
Central Time
KB 400 & Speed Blaster are Trademarks of At to-Soft
SEND CHECK OR MONEY ORDER TO:
flTTQ-SOR
832 E. Third Street Galesburg, Illinois 61401
PLEASE ADD:
$3.50 Postage & Handling COD — $2.00 additional
Illinois Customers
5% Sales Tax
American
Express Accepted
Trademarkof Atari, In
The tremendous strides that the Women's Volleyball Team has made in recent years are due in large part to its computerized training camp. At the Goto Research Center in Goto de Gaza, California (70 miles south of Los Angeles), computers are providing coaches and trainers with such detailed images of their athletes' performance that the word "guesswork" is quickly dis- appearing from the Olympic vocabulary. Five years ago, the Women's Volleyball Team was unranked in world competi- tion. Today, it is an internationally recognized contender for the Olympic gold medal.
The computerized facilities in Goto de Gaza operate under the guidance of Dr. Gideon Ariel, a pioneer and renowned leader in the field of biomechanics, the computerized study of human movement.
Dr. Ariel uses high-speed cameras to film the movements of athletes. The frames of film are then projected onto a special screen, traced with a magnetic pen, fed into a computer for analysis, and then output as "three-dimensional" stick figures. The result is a highly- precise, graphic image of the physical movement involved. From these images. Dr. Ariel can determine such elusive variables as the optimal angle at which to spike a volleyball, or the most efficient way to make a lateral move on the volley- ball court. He does this by comparing the graphic image of the actual motion with a hypothetical "optimum" motion developed in the laboratory. His aim, which fits in well with the ideals of the Olympics themselves, is to bring the actual closer to the optimum.
Dr. Ariel has also used biomedical analysis to study opposing volleyball teams. In the process, he has dissected their movements, studied their strengths and weaknesses, and provided fresh new insights about their styles of play to the rapidly improving U.S. Women's Team.
Stay tuned for more news about Atari's involvement in the 1984 Olym- pics in a future issue of ANTIC. In the meantime, you may begin to find your- self looking at your Atari in a different light. After all, it's now the Official Home Computer of the 19 84 Olympics.
14
ANTIC, The ATARI Resource
STARTING LINE
A QNDERELLA
STORY
The half-life of a computer drudge
by FRED PINHO
Most computer owners know that a computer needs a "language," such as BASIC, to function. These languages are the "belles of the ball." But, as in the fairy tale, there is also an unsung drudge in the computer that these languages need to be able to do their thing. This hard- working servant goes by various names: Master Control Program, Operating System, System Monitor, etc. Atari chose to call their version simply, the Operating System (OS).
WHAT IS THE OS?
The OS is a gut-level program that manages the resources of the computer and controls communications with the computer's peripherals. A peripheral is a hardware device such as a keyboard, television, joystick, cassette drive, disk drive, or printer.
At the heart of a personal computer is the microprocessor, often referred to as the Central Processing Unit (CPU). In the Atari computers, the 6502 chip is the CPU. While a BASIC program is interacting with this chip, there are many housekeeping activities that must be monitored and controlled. These tasks range from controlling the TV display
¥red Pinho is a biochemical research engineer and a self-taught programtner who is interested in BASIC and assembly language. The Atari 800 is his first computer.
to establishing communications with a cassette recorder. If the programmer had to keep track of all of these activities as well as his or her program, programming would be very tedious. Thus, operating systems evolved to take some of this burden away from the programmer.
Any operating system is a group of machine-language programs. Machine language is the microprocessor's mother (and only) tongue. The Atari's 6502 chip is an 8-bit microprocessor. This means that it handles and processes eight bits
continued on next page
February 1984
15
STARTING LINE
of information (one byte) at a time. These eight pieces of information are expressed in binary notation. That is, the processor is only concerned about whether a bit is on (set) or off. There are no intermediate values to consider. Set- ting these bits in various combinations causes various circuits within the chip to be opened or closed. For our purposes, a byte expresses numbers in binary nota- tion as follows:
V
Decimal value if bit is set
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
T |
26 |
2= |
24 |
23 |
2' |
2' |
2° |
J
Value as a power of 2
Note that each bit doubles in value as we go from right to left. We are, in effect, counting in powers of two. If a bit is not set, the value of that bit is zero. Thus, to determine the value of a byte, add up the values of all the bits that are set. Remember, position counts.
With this system, the highest number that can be represented in eight bits is 255, if all bits are set. But note that 256 numbers can be expressed. All bits off equals zero, and to the computer, zero is as important a number as any other. This may sound trivial, but as you get into more advanced programming, keep- ing this fact in mind can save you a lot of debugging time.
WHAT CAN IT DO?
Contrary to popular lore, the CPU doesn't really "know" numbers (binary or otherwise). All it knows is that volt- ages on certain lines cause predeter- mined changes to take place in other cir- cuits. Chip designers have taken care to see that the results of these circuit changes can be interpreted in various ways. Once a value is in the accumulator, many other operations are possible. For example, if you send the value 169 to the 6502 chip, followed by the value 10, the chip will "load" 10 into a part of itself called the "accumulator."
The chip's repertoire is extremely limited. Basically, it can add, subtract.
compare two numbers, perform simple versions of IF/THEN and GOSUB com- mands, and move data around in memory. These talents certainly won't qualify the 6502 for a stage career. Yet, from its humble (but very fast) skills, all the wonderful graphics and computa- tional capabilities of today's software have evolved.
Physically the Atari OS is contained in several integrated circuit (IC) chips that are separate from the CPU. In the Atari 800, the OS is easily removable. It resides on the first large cartridge (sometimes called a board) in the memory bay under the removable top. Ranked behind it are the RAM car- tridges. The OS is stored in fixed posi- tion in memory (locations 55296- 65535); this position is located at the very top of the available memory space.
SPECIALTY CHIPS
What are the resources that the OS must manage? In addition to the microproces- sor chip and RAM memory, there are four specialized chips that aid the 6502 in performing its job. These are ANTIC (that name sounds familiar!), GTIA, POKEY and PIA. The workings of these components must be integrated with those of the 6502, a job at which the OS excels. A short description of each of the specialty chips is given below:
GTIA (memory locations 53248-53505)
This Television Interface Chip was designed to process the video signal. Early versions of the Atari had a CTIA. The difference between the two chips is that GTIA supports Graphics Modes 9-11, while CTIA does not. Basically, GTIA converts digital commands from ANTIC into a video signal that is sent to the television.
The data from ANTIC contains infor- mation for the Graphics Mode desired. While processing this data, GTIA adds its own information, which includes color values and Player/Missile graphics. GTIA also provides collision detection. (Collision for the Player/Missile system is defined as two objects overlapping on the screen.) Finally, this busy little chip
monitors the console keys.
ANTIC
(locations 54272-54783)
This chip is actually a specialized micro- processor in its own right. It controls the screen display through instructions to C/GTIA. ANTIC has its own mini- program called the display list. Upon a graphics call from BASIC, the Operating System sets up the display list at a specific spot in RAM. The display list then tells ANTIC exactly how to set up the TV screen and where to find the data to be displayed. ANTIC retrieves the display data and instructions from the display list and translates them into instructions for C/GTIA.
POKEY
(locations 53760-54015)
POKEY is the digital I/O (Input/Out- put) chip. It has a multitude of functions. The chip has four independent sound channels. Each channel has a frequency register and a control register that regu- late sound volume and distortion. You access these through the SOUND com- mand from BASIC. You can also POKE directly into these registers if you wish. POKEY reads values from the joysticks and paddle controllers. It also scans the keyboard for input, operates random numbers and handles serial I/O (i.e., communication with peripherals, such as a cassette recorder). "Serial" simply means that data is sent one bit at a time. "Parallel" means that more than one bit is sent at a time — usually eight bits in the Atari.
PIA
(locations 54016-54271)
The Peripheral Interface Adapter is a specialized microprocessor chip used to control the four controller jacks (the plugs used to connect joysticks and paddles).
It is now time to explore the subter- ranean caverns of the Operating System itself. Let's take our flashlights and maps and explore each of the main elements of the OS.
continued on page 18
16
ANTIC, The ATARI Resource
* Popular Computing, November, 1982 t Apple Sofcilk, April. 1982
Everyone's talking about The Home Accountant:
Is it because it's the #1 bestselling home finance package in the world? Or because it's extremely thorough and powerful and easy to use? Or because it's great for home and business use? Or because it has up to 200 budget categories and handles up to 5 checking accounts?
Yes. But there are a lot more reasons why people buy The Home Accountant. And why you will, too.
Because The Home Accountant can literally save you hours of time. And take the headache out of handling your finances. Wliether it's setting up a budget, cataloging your expenses, balancing your checkbooks or handling your credit cards and money market funds. For personal or business use.
The Home Accountant will even print net worth and financial state- ments. Not to mention being a lifesaver at tax time. Especially when you're able to transfer information onto Continen- tal's The Tax Advantage™ program and figure out what you owe. Quickly.
In short, The Home Accountant is the most effective software program there is for managing your money. And man- aging it easily.
Stop by your Continental Software dealer today and pick up The Home Accountant. You'll see what everyone's talking about.
The Home Accountant is available for Apple Il/IIe, IBM PC/XT, Atari 400/800/1200XL, Osborne® TRS-80 Models III/4, Commodore 64, Texas
Instruments Professional, Zenith Z-100/110, Compaq and KayPro compu- ters. Actual budget capacities will vary with each computer.
For your free 48 page booklet, "Tips For Buying Software," please write Continental Software, 11223 South Hindry Avenue, Los Angeles, CA 90045, 213/417-8031, 213/417-3003.
Continental
Software
A Divi.sion of Arrays, Inc. tIi,'Ho"*^'
iltanrage art rculsltted ti;
vMiu. ufConllnenul Software. A|
J^ii^^
STARTING LINE
A CINDERELLA STORY
continued from page 16
MONITOR
Don't confuse this with a television monitor. When you turn on your com- puter (this is called a "coldstart"), the computer must be set up in a standard way before it can release control to a language (such as BASIC). The monitor is a machine-language program that per- forms this vital function. One of its first actions is to determine how much RAM it has to work with. This is done by checking the first byte of each 4K block of memory. If a value can be stored and recovered from that byte, that 4K block is assumed to be functional.
The total memory available, counted in "pages," is stored at memory location 106 (called RAMTOP). A page of memory is defined as 256 contiguous bytes whose first byte is evenly divisible by 256. To find the total memory avail- able for your use, multiply the value found in RAMTOP by 256. You'll find that available memory is always less than the amount installed in the computer. This is because some of the memory is appropriated for use by the OS, the 6502 chip and BASIC.
The monitor performs many other functions during a coldstart. It clears all of RAM (by setting each location to zero) and initializes "pointers" (locations that contain the address of a particular table or routine). It then proceeds to initialize (set up) the device handlers. These are machine-language routines that control the editor, screen, keyboard, serial printer and cassette recorder. The monitor also determines whether a car- tridge is installed and, if so, prepares for its subsequent use. Finally, it checks to see if a machine-language program needs to be "booted" in from cassette or disk.
BOOTING
The term "boot" is a piece of jargon that derives from the word "bootstrap," which was made famous by the phrase, "lifting yourself up by your own bootstraps." Bootstrapping is a technique by means of which a program brings itself into an operating state by its own action. Thus, the monitor contains a bootstrap loader.
a routine that is capable of reading the initial instructions of another machine- language program. The program being read is set up so that its initial instruc- tions cause the rest of the program to be loaded (i.e., it is a "bootable" program).
When all of this has been accom- plished, the monitor releases control to the installed cartridge or the booted pro- gram. If neither is present, the Operating System goes into "memo pad" mode. In this mode, anything you type will appear on the screen, but nothing else will happen.
The monitor also handles the RESET sequence, which occurs when you press the [SYSTEM RESET] key. This is termed a "warmstart." Many of the func- tions of a coldstart are also performed during RESET. One of the big differ- ences is that RESET clears only the RAM area used bv the OS. Your BASIC program is not wiped out, as it would be if you turned off the computer.
There are a number of tricks we can play with the monitor. For example, we can go through the coldstart sequence without shutting off the computer. Simply POKE a one into location 580 and then press the [RESET] key (but remember that you'll erase any program in memory!). This has a number of uses. If you POKE this location from within a program, you can prevent users from gaining control of the program while it's running. If they press [RESET], the pro- gram will be erased and they'll have to start over. A more sophisticated use of this technique is to use it with a disk- booted program. In this case, if the [RESET] key is pressed by accident (or design), all is not lost. The coldstart sequence will automatically reboot the program.
INTERRUPT PROCESSING
The interrupt system is one of the most powerful tools available to the creative programmer. This capability is built right into the 6502 microprocessor chip. As computer jargon goes, the term "interrupt" is descriptive. There are two special pins (electrical connections) on the 6502. When the normal voltage to
either of these pins is lowered, this "interrupt" signal tells the microproces- sor that some outside event is demand- ing its attention. The 6502 completes the instruction it is working on and then saves necessary information so that it can eventually return to the correct place within the main program. It then goes to a pair of specific memory locations where it finds the address of a machine- language routine to execute. The chip begins executing the machine-language instructions at the new address until it encounters the code for an RTI (Return from Interrupt) instruction. When the RTI is found, the chip goes back to the main program, retrieves the saved data, and then nonchalantly continues on as if nothing had happened. Since the inter- rupt routine is short and the micro- processor is very fast, the observer isn't even aware that the chip is playing hookey from the main program.
Corresponding to the two 6502 pins, there are two types of interrupts:
NMI (NonMaskable Interrupt) IRQ (Interrupt Request)
The IRQ's can be turned off so that the chip won't respond to them. This is done by a machine-language command which, unfortunately, disables all the IRQ's. NMI interrupts cannot be turned off at the processor chip. But to allow for greater flexibility in interrupt usage, the folks at Atari routed many of the interrupts through the helper chips. For example, some NMFs can be controlled by POKE commands to certain control registers before they reach the 6502. ANTIC controls the NMI's; POKEY and PIA handle the various IRQ's.
VBI'S AND DLI'S
Two NMI's provide the bulk of the graphics and animation power that is available to machine-language program- mers. These are the Vertical Blank Inter- rupt (VBI) and Display List Interrupt (DLI). An understanding of VBI's re- quires a short disgression into the work- ings of your television.
The television screen is lit by an elec- tron beam that sweeps across the face of the TV tube and hits phosphors. A full
continued on page 92
18
ANTIC, The ATARI Resource
EDUCATION
THE END OF ODD MAN
Scoring and reward routines wrap it up
by JOHN and MARY HARRISON
"The End of Odd Man" is the fourth installment in a series designed to teach the basics of writing educational soft- ware. The basis of the series is a program called Odd Man Out. Portions of the program appeared in the December 1983 and January 1984 issues of ANTIC. The final portion of the pro- gram, to be merged with the previous parts, is contained in Listing 1 at the end of this article. Listing 1, therefore, is not a complete program, and will not run on its own. The RAM requirements of the completed program are 24K (cas- sette) or 32K (disk). -ANTIC ED
In the "Odd Man" series, we've discussed a number of techniques that can be used to improve the quahty of user-written educational software. This month we'll conclude our discussion of this topic, and the program Odd Man Out, by covering the remainder of the program and recapping some of the highlights of the series, which began in the November 1983 issue.
THE MAKING OF
ODD MAN
So far we've presented, in bits and pieces, a program designed to develop visual discrimination skills in preschool chil- dren. If we add scoring and reward rou-
John and Mary Harrison are parents, teachers and Atari hobbyists. Mary teaches math and computer science at the high school level. John holds an M.S. in computer science and develops educa- tional software. They coordinate the "Education Department for ANTIC
tines to the portions of the program that have already appeared, Odd Man Out will be complete. Let's take a look at how this can be done.
Last month, we introduced Odd Man's joystick-movement and answer- select routine (lines 2500-2840). If we now add lines 2860-3080 (see Listing 1), the program will be able to determine if the correct shape has been selected, and to display a "happy" or "sad" face in response. In addition, the program
will now keep track of the number of in- correct answers; this number is used in the reward routine.
Because the happy and sad faces are redefined characters, some additional work is required to enter the new charac- ter values. This is accomplished in lines 160, 600, 1360 and 4500-4600 of List- ing 1. We've used the same techniques developed in "Odd Man Reforms" (ANTIC, December, 1983) to draw,
continued on next pase
February 1984
19
EDUCATION
define and store the values for these new characters.
REWARDING A JOB WELL DONE
If a child is going to play Odd Man Out more than once, the game must give the child a sense of accomplishment. Paren- tal praise is the child's most important rev^^ard, of course, but it never hurts to have the Atari computer offer a few kind words. Because of this, we designed a simple reward routine that incorporates the child's name. The computer clears the screen and then prints:
YEAH
"NAME"
"NUMBER RIGHT"
Three stars appear on the screen above the child's name if he or she has answered at least eight questions correctly. If nine answers are correct, a series of small dots explode in a display of Atari fireworks. A perfect score causes this display to flash and a siren to sound. The child simply presses the fire button to return to the menu after the reward sequence has been completed.
The reward routine is contained in lines 3100-4120. This segment of the program takes advantage of the fact that standard Atari characters are stored in the same manner as those we have created for Odd Man Out. It appears that the reward sequence mixes graphics and text on the screen, but we actually used the Graphics 5 mode to "draw" the letters used in the display.
The subroutine in lines 3760-3920 is used to display the text stored in DISPS. By determining the X and Y coordinates (PXO,PYO), the text can be centered on the screen. Next, each letter in the reward message is broken down into a series of numbers that describe the bit map of the character. This allows it to be plotted on the screen. The characters are originally drawn in one color. Different color registers are then used to generate the reward display's pulsating effect.
TRACKING A CHILD'S PROGRESS
One of our goals for Odd Man Out was
to make it possible to monitor a child's progress in playing the game. As a result, we've provided a simple, yet effective, monitoring system as part of the pro- gram. Lines 700-760 open RECORD. DAT, the file that is used to store data concerning a child's progress. Lines 4060-4080 write this information to disk after each complete game. This occurs without the child's knowledge, and is thus not a distraction as he or she plays (and learns).
The monitoring program is contained in Listing 2. To review your child's progress, type RUN "DiMONITOR. BAS". The program will read the data from the disk and display it for you. You are given the option to delete this data after you've examined it.
SUMMARY
This concludes our series on Odd Man and the writing of educational software for preschool children. Listing 1 contains new code that needs to be added to the program listings that were published in the December and January issues. If you've been entering the various parts of the program as the Odd Man series has developed, you need only enter Listing 1 to complete the program. (The January installment explains how to merge the December and January segments of the listing.)
Now let's look back on what we set out to accomplish with the Odd Man series and how these goals were met.
In "Odd Man Out" (ANTIC, Novem- ber 1983), we discussed the process of selecting an educational topic that is appropriate for the Atari computer to handle. Not every educational topic can, or should, be presented in this way; you shouldn't try to do the impossible. You should be imaginative, however.
Once you've selected a topic, you need to set specific objectives and stick to them. Programs of limited and well- defined scope are the easiest ones to write and use.
Your first step is to decide what kind of educational software you want to develop. Do you want to create a drill- and-practice program, a tutorial, a simulation, or a combination of these choices? Then, when you've finished the program, write a detailed description of what it does, and how it does it. Other- wise, you'll find yourself looking at the code six months later and wondering how and why the program was written.
In "Odd Man Reforms" (ANTIC, December 1983), we described a specific technique that we have found to be use- ful in the writing of educational soft- ware. The Atari computer has the ability to easily redefine character sets. This reduces the burden that is usually en- countered by programmers who want to display figures on the screen. Since we used this technique extensively in Odd Man Out, we put a great deal of thought into the assignment of locations for re- defined characters within the Atari character set. 'We wanted to ensure that the standard numerals and letters would be available as required and that they would not require any additional manipulations.
Last month, in "Odd Man At Play," we discussed simple character anima- tion. We used this technique to add some game elements to the program to in- crease its level of interest for young children. In this application, the flexi- bility of the Atari character set was again evident.
This month's installment ties up the loose ends and concludes the listings for Odd Man Out. We hope that the tech- niques we've discussed will be useful to you in your own endeavors. Perhaps they'll even provide you with a starting point for that educational program you've been planning to write, but didn't know how to approach. Finally, we hope that those of you with young children will find that Odd Man Out is a worth- while and challenging educational pro- gram, and that it will help your children develop their visual discrimination skills.
20
ANTIC, The ATARI Resource
EDUCATION
Requires 24K RAM (cassette) or 32K RAM (disk)
in RPM ****************************
20 REM *
30 REM * ODD MAN OUT *
40 REM * RY *
50 REM * JOHN AND MARY HARRISON
60 REM * *
70 REM * FOR *
80 REM * ANTIC MAGAZINE *
90 REM * *
95 REM ****************************
160 DIM FACES ( 48 )
600 FOR I-l TO 48:READ X : F A C E $ ( I , I ) =C H
R$(X) :NEXT I
700 TRAP 720:OPEN #4 , 9 , 0 , " D : R E C 0 R D . 0 AT
":GOTO 760
720 REM TRAP ROUTINE IF RECORD.DAT DOE
S NOT EXIST
740 CLOSE #4:0PEN #4 , 8 , 0 , "D : R E C 0 R D . D AT II
760 TRAP 40000
780 REM INPUT CHILD'S NAME
800 GRAPHICS 0:OPEN #5,4, 0,"E:"
820 POSITION 2,5:? "Hello. What is yo
ur name? "; : INPUT #5;NAME$
840 POSITION 2,7:? "Plug your joystick
Into port number 1 and press the fire
button to begin." 860 IF STRIG(0)<>0 THEN 860 1070 FOR DEL = 1 TO 25 : NEXT DEL 1360 RAMS ( 209 , 256 )=FACE$ ( 1 , 48 ) 2860 POSITION INT ( LE ) M + S+l CH0ICE = 7 ) , 8 : ? #6 ;"\ "
2880 POSITION 9,1:? #6;": ;" 2900 IF INT(LE)<>ODD THEN 3000 2920 POSITION 9,2:? #6;"<=" 2940 FOR K=121 TO 0 STEP -5:S0UND 0,K, 12,8:S0UND 1 ,K + 5 , 12, 8:NEXT K:SOUND 0,0 , 0, 0:SOUND 1,0,0,0 2960 FOR DEL=1 TO 75:NEXT DEL 2980 POSITION 9,1:? #6;" ":POSITION 9
,2:? #6;" ":? "S":RETURN
3000 POSITION 9,2:? #6;">?"
3020 FOR K=1 TO 30:SOUND 0 , 6 0 , 1 2 , 7 : S 0 U
ND 0,60,12 ,8:NEXT K:SOUND 0,0,0,0
3040 IF FLAG=0 THEN WR 0 NG=WR 0 NG+1 : F L AG
= 1
3060 POSITION 9,1:? #6;" ":POSITION 9
,2:? #6;" "
3080 POSITION INT(LE ) *4 + 3+( CH0ICE = 7 ) , 8
:? #6;"[":? "El":GOTO 2540
3100 REM REWARD ROUTINE
3120 POKE AF , 0
3140 GRAPHICS 21:F0R 1=0 TO 2:SETC0L0R
1,4, 6:NEXT I:SETCOLOR 4 , 7 , 0:C = 1 3160 DISP$="YEAH":PY0=22:G0SUB 3760 3180 DISP$=NAME$: PY0=31 :GOSUB 3760 3200 IF WRONG=0 THEN 3240 3220 DISP$ = " RIGHT": DISP$ ( 1 , 1 )-STR$ ( 1 0-WRONG ) :GOTO 3260
3240 DISP$-"PERFECT"
3260 PYO-40:GOSUB 3760
3280 REM ROUTINE FOR ATLEAST 8 RIGHT
3300 IF WR0NG>2 THEN 4060
3320 COLOR 1:PL0T 40,0:DRAWTO 40,10:PL
OT 35 , 5:DRAWT0 45 , 5
3340 COLOR 2:PL0T 42,3:DRAWT0 38,7:PL0
T 38 ,3:DRAWT0 42, 7
3360 REM ROUTINE FOR ATLEAST 9 RIGHT
3380 IF WR0NG>1 THEN 4060
3 4 00 COLOR 1:PL0T 10,12:DRAWTO 2 0,12:P
LOT 15, 7:DRAWT0 15,17
3420 COLOR 2:PL0T 17,g:DRAWT0 13,15:PL
OT 13, 9:DRAWT0 17,15
3440 COLOR 1:PL0T 60,12:DRAWTO 70,12:P
LOT 65 , 7:DRAWT0 65,17
3460 COLOR 2:PL0T 67,9:DRAWT0 63,15:PL
OT 63,9: DRAWTO 67,15
3480 REM ROUTINE FOR 1 0 RIGHT
3500 IF WRONG>0 THEN 4060
3520 SETCOLOR 2,3 ,4:C0L0R 3
3540 FOR LP-1 TO 1 5 : X-I NT ( 8 0 * RN D ( 0 ) ) : Y
-INT( 20*RND( 0) )
3560 GOSUB 3g40:PLOT X,Y:NEXT LP
3580 REM SOUND EFFECTS FOR PERFECT SCO
RE
3600 LO=°50
3620 FOR 1-1 TO 20: FOR J = 0 TO 13
3640 SETCOLOR 0, J , 8
3660 SETCOLOR 1 , J+1 , 8
3680 SETCOLOR 2 , J + 2 , 8
3700 SOUND 0,LO, 1 0, 14:L0-L0-1 :IF L0<35
THEN LO=50 3720 NEXT J:NEXT I:SOUND 0,0,0,0 3740 GOTO 4060
3760 PXO=(80-LEN(DISP$)*10)/2:PX-PXO:C = 1 :COLOR C
3780 FOR 1 = 1 TO L E N ( D I S P $ ) : P Y-=P Y 0 3800 CHAR=ASC(DISP$(I,I))-32:PTR=CHAR* 8 + 1
3820 FOR J=PTR TO PT R+7 : B I TM-A S C ( R 0M$ ( J , J ) ) :DIV=1 28 3840 FOR K-1 TO 8
3860 IF BITM/DIV>=1 THEN PLOT PX,PY:BI TM=BITM-DIV
3880 DIV-DIV/2:PX-PX+1 :NEXT K:PX=PXO:P Y=PY+1 3900 C=3-C
3920 COLOR C:NEXT J : P X0 = PX0 + 1 0 : P Y=1 4 : C OLOR 1:NEXT IlRETURN 3940 REM EXPLOSION SOUND
3960 SOUND 2 , 75 , 8 , 1 5: V1 = 1 5: V2 = 1 5: V3-15 : ICR = 0. 079
3980 SOUND 0,20, 8 , VI iSOUND 1,40,8,V2:S OUND 2 , 70, 8, V3
4000 V1-V1*ICR:V2=V2*(ICR+0.05):V3-V3* ( ICR + 0. 08 )
4020 IF V3>1 THEN 3980 4040 SOUND 0 , 0, 0 , 0 : SOUND 1 , 0 , 0 , 0 : S 0 U N D
2,0,0,0: RETURN
continued on next page
February 1984
21
EDUCATION
4060
OK F
4080
ONG
4100
4120
4140
4160
4500
4520
4540
4560
4580
4600
REM CONDUCT RECORD KEEPING AND LO OR JOYSTICK INPUT TO CONTINUE ? #4;NAME$:? #4;CH0ICE:? #4;10-WR
i<>0 THEN 4100 CLOSE #4:END
IF STRIG
GOTO 880
GRAPHICS
REM
DATA 0,7,24,32,76,76,64,64
DATA 0,224,24,4,50,50,2,2
DATA 64,72,68,67,32,24,7,0
DATA 2,10,18,226,4,24,224,0
DATA 64,67,68,70,32,24,7,0
DATA 2,194,34,18,4,24,224,0
TYPO TABLE
Va r
i a b I e
Line
10
700
2860
3040
3280
3460
3700
3940
4120
c h e n urn
k s urn
a n g e
00
360
020
260
440
680
920
100
600
859076
Code
HL
VM
01 LX
VO VC GI RM LU
e n g t h
401
518
596
512
537
451
485
521
209
10 REM *****************************
20 REM *
30 REM * ODD MAN OUT MONITOR
40 REM * *
50 REM *
60 REM *
70 REM *
80 REM *
90 REM •
100 REM *
1 1 0 REM *
1 20 REM *
130 REM *****************************
140 DIM NAME$( 20) ,Z$(5)
150 OPEN #5 , 4 , 0,"E:"
160 TRAP 320
170 OPEN #2,4, 0,"D:RECORD.DAT"
180 TRAP 40000
190 GRAPHICS 0:POKE 752,1:REM POKE 16,
112: POKE 53774,112
200 POSITION 11,1:? "[
BY
JOHN AND MARY HARRISON FOR ANTIC MAGAZINE
ODD MAN OUT REPOR
210 POSITION 2, 3j?JJiIJH": POSITION 20, 3 : ? "[QQI wmiiia" : ?
220 TRAP 350 230 CTR=0
240 INPUT #2;NAME$: INPUT #2 ; L E V E L : I N P U T #2;SC0RE 250 X-20-LEN(NAME$)
260 ? NAME$;:POKE 201, X:? ,LEVEL;:POKE 201,9:? , SCORE
270 280 290 300 31 0 320 330
n.p
D
340 U END 350 360 370 ";P PEE 380 390 400 41 0 d
420 :RE 430
Va r
CTR=CTR+1
IF CTR<15 THEN 240 ? "Press RETURN to INPUT #5;Z$ ? "S":GOTO 2 00 REM FILE DOES NOT IF PEEK( 1 95)<>1 70 EEK( 195 ) ;" IN LINE
c 0 n t i u e
EXIST TRAP THEN ? "ERROR 1 70":CLOSE #2:
EN
? "FILE NABLE TO
REM OUT
POKE 84,
IF PEEK( EEK( 195) ; K( 187 )
CLOSE
? "Pr
INPUT
? "Do i n
RECORD.DAT DOES NOT EXIST PROVIDE REPORT .": CLOSE #2
OF DATA TRAP 20:POKE 201,10: 195)0136 THEN
POKE 752, ? "ERROR
IN LINE ";PEEK(186)+256*
#2
ess RETURN #5;z$:? "1 you want
format ion?
to continue
IF Z$ ( 1 CORD. DAT' END
1 )="Y" ': CLOSE
to delete
";: INPUT
THEN OPEN
#2
the s #5 ; z$ #2,8,
tore
0,"D
TYPO TABLE
i a b 1 e c h e c i(s um - |
= 147064 |
|
Line num range |
Code |
Length |
10 - 1 20 |
VB |
420 |
130 - 240 |
BM |
413 |
250 - 360 |
QW |
443 |
370 - 430 |
BL |
31 8 |
□
22
ANTIC, The ATARI Resource
LOGO/ PILOT
LOGO BOOKS
The lowdoivn on Atari Logo
by KEN HARMS
When Atari decided to implement Logo, it chose to make its version compatible with Apple Logo, which is produced by LCSI and sold by Apple. In fact, LCSI also wrote Atari's Logo. Although this means that we're forced to live with a few Apple-like quirks in our version of Logo, it also means that virtually all of Apple's Logo programs run under Atari Logo. In addition, most of the LCSI-oriented Logo books also fit our needs. Just as Atari intended, this element of com- patibility between the two languages provides Atari users with access to a wealth of classroom-support materials, books, and other sources of valuable information.
ATARI LOGO'S KINFOLK
This month, I'll delve into a stack of Logo books and highlight the ones you may want to consider for your classroom or family. But first, a warning. Although all Logos are related, some relatives are closer than others.
Atari Logo's closest relative is Apple Logo. Books based on this language (often referred to as "LCSI-Logo") are 99% "upward compatible." In effect, this means that Atari Logo can do everything
Ken Harms, our Contributing Editor for the Logo/PILOT department, is Vice President of Administration for the Cali- fornia Division of the American Cancer Society.
that Apple Logo can do. But Atari Logo also offers extra features that Apple Logo doesn't — including animated turtles, multiple turtles, and more.
The Logo books produced by Krell/
Terrapin are Atari Logo's next closest relation. TI's Logo requires even more translation. And the TRS Color Com- puter's Logo isn't even a full Logo; it's
continued on next page
February 1984
23
LOGO/PILOT
just a turtle-graphics package. My judg- ment is that the average Atari user will find that the LCSI/Apple Logo books are completely satisfactory, while the Krell/ Terrapin books are acceptable. Per- sonally, I'd leave the rest of the books alone, except those that have sections which explain how to translate material into either Apple or Atari Logo.
A LITTLE HELP FROM YOUR FRIENDS
One of the best support sources for Atari Logo users is the Young People's Logo Association (1208 Hillsdale Dr., Rich- ardson, Texas 75081). A membership ($9/year for students 18 or younger, $25/year for adults) provides you with a hefty monthly newsleter, software ex- change privileges and access to a bulle- tin board.
All of these materials are dedicated exclusively to Logo/PILOT. Although it supports several machines, each issue of the newsletter is loaded with Atari Logo programs and information, and the soft- ware exchange includes 30 disks of Atari Logo programs. A member can purchase a disk (or tape) for $10, or, even better, can send in a personal program on a disk/tape (along with return postage) and receive a disk/tape of his or her choice with 12 to 15 programs on it. And anyone can log onto the bulletin board by calhng (214) 783-7548 after 7:00 pm (CST). There's no cost for use of the board (but you pay your own phone bills, of course). It lists a number of special interest groups for Atari Logo and Atari PILOT. The board is currently set up to accept messages and handle electronic mail, but it will soon allow members to upload and download Atari programs.
BOOKS FROM YPLA
Jim Muller, the founder of the Young People's Logo Association (YPLA), is also coauthor, with Bearden and Mar- tin, of The Turtle Source Book (200 pages, Reston Books, $21.95). This excellent workbook-style manual is designed for the elementary classroom but can probably be used by most fami- lies, if an interested adult is present. The books does a good job of covering turtle
graphics, and is one of the few books on the subject whose language level is appropriate for youngsters.
LIST PROCESSING AND MORE
Apple Logo by Harold Abelson (217 pages, Byte/Neforan Hill, $15.95) is one of the few books on Logo that covers list processing as well as turtle graphics. Although Atari users will have to con- vert the sections on I/O and paddle use to Atari Logo, Abelson provides us with a rich vein of new words (commands) for Logo, and a lucid explanation of ad- vanced list handling. He also covers numerical calculations and program- logic controls by means of examples that I found helpful.
All in all, this is a well-rounded, solid book; the language level is high school or above, and the pages are dense with text. I'm hoping to see an Atari version soon. (By the way, watch out for Logo for the Apple II by the same author. It's based on MIT's Logo and is not quite as useful as Apple Logo, although it does supply a conversion table).
LEARNING WITH ATARI LOGO
Learning with (Atari) Apple Logo by Daniel Watt (358 pages, McGraw Hill, $19.95) is an excellent text for teaching Logo to a class or a parent, child, spouse or friend. Watt combines cartoons with numerous "Helper's Hints" that teach the "helper" to help the learner. The result is that both will learn. The book's language level — simple in the cartoon sections and adult in the Helper's Hint sections — is appropriate. Like Apple Logo, it helps you to build an excellent repertoire of words (commands), and it includes one of the best explanations I've seen of the names, objects and values used in Logo.
Watt also provides a simple game, SHOOT, which should be of interest and value to the budding Logo programmer.
This book is well illustrated and con- tains many interesting projects and pieces of good advice for teachers. I wasn't able to find the Atari version on
the book shelves, but I was impressed with the Apple text. Watt's Learning with Logo is based on Krell's Logo and, therefore, isn't as helpful, but it's still useful if it's all you can find.
The Source Book also includes off- computer exercises that help to intro- duce the concepts of turtle graphics. In addition, a number of stickers are in- cluded with the workbook; for example, it includes numerals that can be attached to the CRT screen to make a clock/time- reading program come alive. Finally, where appropriate, the book's activity pages are reproducible, so that a full classroom can use a single source book.
Although I haven't seen a copy yet, Reston Books should have a second YPLA book out by the time this column reaches you. 123 My Computer and Me (Reston Books, $10.95), by Donna Bearden, is a "fun" companion to the Source Book. It's designed for the in- dividual Logo explorer in the eight-to- twelve age group. Like the Source Book, it stresses turtle graphics.
DISCOVERING ATARI LOGO
Discovering Apple (Atari) Logo by David D. Thornburg (173 pages, Addison- Wesley, $14.95) is probably the most complete, and the most beautiful, treat- ment of turtle graphics you can find. An Atari version of the book should be avail- able by the time you read this, but it wasn't in yet at any of the book stores I visited.
Thornburg explores the Logo user's world of shapes and planes with an eye that is always sensitive to the "larger meaning of things." Although some pas- sages may be difficult for youngsters, all will benefit from the author's insights and will enjoy the beautiful patterns that his always-simple programs create. Thronburg covers many advanced topics, including "tiles," tessellations, "squrals," fractals, trees, arcs, cricles, and spirals, and he makes them both under- standable and inspiring. He's also the only person I know of who's come up with a convincing explanation of why you need to know about prime numbers: you can use them to draw stars! Twelve
24
ANTIC, The ATARI Resource
LOGO/PILOT
color photos enhance an already enjoy- able book.
A LOGO PRIMER
Apple Logo Primer by Gary Bitter and Nancy Watson (206 pages, Reston Books, $14.95) offers a unique ap- proach: It includes a section for the com- plete novice, one for people who are generally familiar with Logo, and a third section on the history of the language. Graphic outputs are illustrated by screen photos (most books use printed graphics) that are realistic but often muddy. The section on list processing is short but helpful.
One of the book's nice touches is that the authors assign memorable words, such as "Open a blank" for Control O, to help users learn Logo's "weird" con- trol commands. The practice activities made me feel like I was back in school. The language is occasionally tough for kids — "alternative" is used instead of "choice," and "identical results" is used in place of "the same thing" — but advanced sixth graders should be able to handle it. The primer's strongest fea- ture, in my opinion, is an excellent index/glossary that often tells you what you need to know without forcing you to turn to the referenced pages. Its excel- lent cover-reference cards round out a thoughtful approach.
NON-LOVE AT FIRST SIGHT
Introductory Logo by Peter Ross (241 pages, Addison-Wesley, $12.95) looked interesting at first sight. Unfortunately, that's as far as I got. Its dot-matrix print- ing looked so ugly that I didn't read the text.
SUMMARY
Several excellent Logo texts are currently available, and more are on the way. In particular, you should watch for Atari- specific editions of existing Apple books. I'll continue to review materials as they become available. In the meantime, the books I've mentioned this month should provide a good foundation for your Atari Logo library. Q
February 1984
tz\
^. m k A
•J %/iTil y L«K
^lil
COMING!
Did you know that the
Atari Computers are the Official
home computers of the 1984 SUMMER OLYMPICS?
Well, what are you going to
do about it?
Exercise your Atari and your brain. Show us your Stuff!
If it is truly Olympian, we will print
your article, program, game or art in
ATARI
25
A GREETING CARD FOR ALLSE
^ ^..IV.
\
Say it oncassette
by WILLIAM L. HENSON
Did you ever wake up in the morning with the sinking Isensation that it's Valentine's Day (or Mother's Day, or a special birthday) and you've forgotten to buy a card for someone? Or worse, did you realize that the loved one in question would attribute your dereliction of duty to your having spent too many hours in front of your Atari? The only solution to this dilemma is to leap out of bed and resort to the All-Occasion Card. This life-saving program allows
William L. Henson is an attorney who specializes in contract disputes. He became hooked on personal computers after meeting Chris Crawford in the summer of 1978. An Atari 800 joined the family in 1982. His wife Julie and five-year- old daughter Elizabeth are also Atari enthusiasts.
you to make a selection from ten differeiit b3grour^7and permits you to write a message of up to three lines of hori- zontally scrolling text.
After you LOAD the program, your first task is to assign characters to A$, B$ and C$ in lines 460-480. For the best results, these line lengths should not be changed and your messages should be centered.
Your next task is to RUN the program. Each data line has a descriptive string leader that describes the character it creates. Lines 2.50-280 read and print these labels with their corresponding line numbers. You're then asked to enter the line number of the background you wish to use.
Lmes 320-390 relocate the Graphics 1 and 2 character set
continued on page 28
26
ANTIC, The ATARI Resource
Computers may be the world's best spellers, but thiey're the world's worst spelling teachers.
Or at least they used to be. Until Chatterbee.
Chatterbee is a unique piece of home computer software that not only makes teaching pos- sible, it makes learning fun. For little people. And big people, too.
If that sounds like some- thing you've never heard of before, you're right. You haven't. Because Chatterbee
does something that no other spelling software can do. Talk.
It's equipped with a custom- ized version of theS.A.M. speech synthesizer, developed by Don't Ask for Tronix to provide voice output. Instead of drawing pictures, scrambling words, beating around the bush or playing "Hangman" Chatterbee teaches spelling the sensible, old-fashioned way. Each word is spoken, then
put in a contextual sentence. Just like a spelling bee. With one important difference.
Since there's no classroom, there's no pressure. And no embarrassment.
Each of the 2500 words have been selected from current edu- cational literature. And there's an internal scoring system that automatically places each player at the right level of difficulty and challenge.
The external scoring system rewards success and turns the whole thing into a game, complete with music.
Chatterbee. The spelling bee without the sting.
Hear today, spell tomorrow.
Za'^^ &^^^f VAJm (l^.. W^d^TTim/'rimOb^-fp^^y f^^^J^ ^ °2^^^?^-2^- %x^'y^ff ^f
A GREETING CARD FOR ALL SEASONS continued from page 26
to RAM. Line 360 calculates the address of the background character (or space) for the lower-case graphics set. Line 410 discards the data label. Lines 420-440 customize the back- ground character with chosen data. The last number in each data line selects a color for the character. This number is POKEd into Color Register 0.
Line 490 selects lower case. Line 500 allows the background color to vary randomly (if the REM is removed). Line 510 varies the text color. Luminances for text and background are set to ensure that the text never "merges" with the background.
Lines 520-630 print the message strings. The loop creates the illusion that messages scroll from right to left. This scroll- ing is a bit uneven, but the card's recipient is usually too pleased to notice this. (The elimination of one message line and variation of the delay loop at line 620 may help matters somewhat. ) Three message lines seem to be the limit for simple BASIC.
Of course, there is no reason that other characters cannot be used. For purposes of experimentation, you can modify any line of data. For example, draw an 8 x 8 block on a piece of graph paper. Color the blocks in any way you wish. Treat each line as a binary number (empty = 0, full = 1). Translate each line to decimal form, and list a data line. Then substitute your new numbers for the first eight numbers in the data line.
To experiment with color, change the last number in the data line. Replace the old label with your new one. Then RUN the program and choose your line.
If you wish to use Graphics 1, subtract one from line 350. To "proportion" the page, add three to each POSITION state- ment in lines 530-610.
Any good thing can be run into the ground, of course. But by varying the backgrounds on the All-Occasion Card, you can ensure that it won't grow stale too soon. The number of times you should use the card depends on two factors: How many Atari owners you know, and how brave you are. In addi- tion, the All-Occasion Card can be used as an interesting display at meetings and other social gatherings.
The most economical means of delivering the card is via cassette. Don't forget to provide loading instructions. And remember, on those special occasions when disaster seems to be guaranteed, the All-Occasion Card is here to help. Requires 16K RAM
ALL OCCASION CARD * BY WILLIAM HENSON *
ANTIC MAGAZINE
FEBUARY, 1984
95
96
97
98
99
100
,26
110
REM REM REM REM REM DATA
*********************
SMILE, 0,60,90,126,90,102,60,0 DATA TREE, 0,0, 24, 60, 126, 24, 24, 0,20
120 DATA CAKE , 0, 0, 42 ,42 , 42 , 1 27 , 1 27 , 1 27
,57
130 DATA 1000,28,28,28,28,42,73,0,0,25
0
140 DATA CAR, 0, 0,56,68, 1 27, 127,34, 0, 70
150 DATA PICKUP, 0, 0, 12, 1 0, 1 27, 1 27 ,34 , 0
,87
160
156
170
,0,2
180
, 38
1 90
52
200
210
220
230
240
250
260
270
280
290
300
31 0
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
51 0
520
530
540
550
560
570
580
590
600
61 0
620
630
640
DATA VAN, 0,0, 126, 125, 127, 127, 34,0,
DATA SHAMROCK, 0,24, 24, 124, 124, 16, 8
1 2
DATA PUMPKIN, 4, 8, 60, 90, 126,66,60,0
DATA HEART, 0,54, 127, 127, 62, 28, 8,0,
DIM A$( 20)
DIM B$( 20)
DIM C$(20)
DIM D$( 20)
GRAPHICS 0
FOR C=100 TO 190 STEP 1 0
RESTORE C
READ C$ : PRINT C; " " ; C$
NEXT C
PRINT "SELECT BACKGROUND #"
INPUT X
RESTORE X
RAMTOP=PEEK( 1 06)
CBASE=RAMT0P-4
POKE 106,CBASE
GRAPHICS 18
CADR=CBASE*256
FOR C=0 TO 1023
POKE CADR+C, PEEK( 57344+C)
NEXT C
SPACE=CADR+64*8
READ C$
FOR C=0 TO 7
READ DTA: POKE (SPACE + C) ,DTA
NEXT C : READ DTA: POKE 708, DTA
D$ = " ■ : D$(20)=D$: D$(2)=D$
A$=" happy mother's day
B$=" from
C$=" elizabeth and bill
POKE 756,CBASE+2
REM SETCOLOR 0 , I NT ( ( 1 4 * R N D ( 1 ) ) ) , 2
SETCOLOR 1 ,INT( ( 14*RND( 1 ) ) ) ,8
FOR X=1 TO 19
POSITION 0, 3
? #6; A$(X) ; :? #6; A$( 1 ,X)
POSITION 0,4 : ? #6 ; D$
POSITION 0,6
? #6;B$(X) ; : ? #6;B$( 1 ,X)
POSITION 0,7:? #6 ; D$
POSITION 0,9
? #6; C$(X) ; : ? #6; C$( 1 ,X)
POSITION 0,10:? #6;D$
FOR L-1 TO 55 : NEXT L
NEXT X
GOTO 500
TYPO TABLE
Va r
i a b I 8 c h e
Line n um
95
170
290
41 0
530
c k s um
range
160
280
400
520
640
230327 Code KB YY DM LW OY
Length 394 255 198 336 344
□
28
ANTIC, The ATARI Resource
© Copyright, ComouClub 1983. All rights reserved.
Atari is a registered trademark of Warner Communications, Inc.
THE GREATEST AIARIGAME OFALLTIVIE.
Object: Capture more programs than
from any other source. Score: The best prices for programs win.
AG
ctually, every member of CompuClub is a winner, because no one pays lower prices for Atari® programs than our members.
And no other source offers as many programs, with a descriptive catalog cov- ering every piece of software we offer! CompuClub has hundreds of Atari® programs: games, education and busi- ness. It's an astonishing selection, but just as incredible are our prices and our catalog.
Prices always at least 25% below retail
Fact is, usually our prices on selected programs are even lower than that. And we're always running sales with savings of at least 50% from ff)e list price on some of your favorite programs.
And there are several ways to pay: MasterCard, Visa, or the ever popular check or money order
Arinotated catalog, updated every 45 days
We don't like to knock the competi- tion, even by implication, but there are definite advantages to a CompuClub membership. One of the best of them is our catalog, which not only offers an unbelievable number of programs, but includes a description of each and every one of them.
In fact, the catalog is so big and filled with so much information that we phnt a separate price list. And we keep adding so many programs that we have to update the catalog nine times a year dur- ing the course of your membership.
Think of it! No more wondehng what's behind the fancy label, no more shooting in the dark or depending on the word of a clerk who may not be familiar with the program you're interested in.
Exclusivity for Atarf® owners
We're not trying to be all things to all people. We are definitely the best thing since the floppy disk for Atari® owners, and only Atari® owners. CompuClub is very exclusive.
Our catalog is thick with hundreds of Atari® programs, and only Atari® pro- grams. No more fumbling your way through thickets of strange symbols and codes for the different computers every- body else's catalogs try to cover
The rules
The rules are simple. To play the CompuClub "game," you've got to be a
member Anyone can join, as long as they fork over a mere five bucks, and agree to buy three programs dunng the year of membership. Order and buy your pro- grams at any time during the year but we're sure with our selection and prices that you'll want to get going right away
Five dollars buys you a one-year mem- bership, exclusive Atari® program offer- ings, a fully annotated catalog with 9 updates dunng the year, a current price list (and any necessary updates), a sub- scription to our newsletter and dis- counted prices at all times, including announcements of our pehodic sales, which feature savings of 50% off and more.
You can join by filling out the coupon below, or get an instant membership by calling our toll-free number and giving us your MasterCard or Visa identifying num- ber We'll forward your registration and sales order materials, your catalog and price list, so you can begin ordering right away
That's all there is to it.
If you think you play a good game, you've got to join CompuClub. It's easy to play and it saves you money
We think it's the best Atari® game going, because with us, everybody wins.
Please make your check payable to CompuClub Payment enclosed D check D money order. Bill my D MasterCard D Visa ID #
CompuClub, PO Box 652, NatickMAOI760 ATTN; Dept. AT
I want to play the greatest Atari® game of all. Please enroll me in CompuClub for one year, and rush my registration material, catalog and price list to me. I agree to buy any three programs during the
Signature
City
Zip
-DiskD TapeO
Ifyou are not satisfied in any way with the conditions of your membership, you may cancel before ordering any programs from CompuClub. Your membership fee of $5 will be cheerfully refunded.
To join by phone, call toll-free.
800-631-3111
Please have your MasterCard or Visa card
ready when you call. In Massachusetts, call 1-617-879-5232. We will forward your membership materials after confirming authorization for your charge.
T.M.
A PROFESSIONAL GRAPHICS -CHARTING AND STATISTICAL ANALYSIS PROGRAM FOR ATARI® PERSONAL COMPUTERS
B/Graph is for professionals in Marketing Sales, Administration, Forecasting, Accounting and General Management.
• Home and Small Business
• Educators, Students
• Hobbyists
B/Grapfi can create
• Bar ctiarts
• 3-D BarCfnarts
• Segmented Bar cfiarts
• Pie charts
• Line Graphs
• Scatter Graphs
• Market Graphs (High-Low- Close)
Instant conversion between all graph types without re-entering data.
B/Graph can perform
• Statistical analysis
• Regression analysis
• Exponential smoothing
• Moving averages
• Graphing of 1 -3 factors with up to 100 data points.
Save graphs as data files or high-res screens. B/Graph Features
• Automatic labelling
• Re-labelling
• Custom labelling
• Full screen editor
• Multiple graph overlays
• Automatic or manual labelling
• Automatic and manual scaling
• Automated slide shows
• Grid overlays
• Multiple graph overlays
• Total screen color control
B/Graph works with graphics printers from
• Centronics
NHOME SOFTWARE INCORPORATED
2485 Dunw/in Drive, Unit 8, Mississauga, Ontario,
Canada, L5L 1T1
(416)828-0775
• Epson/Prowriter
• C. Itoh/Nec
• Seikosha
• Visicalc D.I.F. files
• User written programs
B/Graph comes with comprehensive professionally written documentation. A complete tutorial on Graphing/Charting and Statistics.
User registration with full program support.
©1983 I rata Press Ltd.
n
^'■'
w*
M«<
'\f»
tt«
>f»»rtv
'<**^«* s*
-« 'fi
J } I'* k%*i,^ / **^fe' %/ .*'A, «/-..
... "^liw^MS
TIhe Stock Portfolio Spreadsheet makes it easy for you to keep track of your portfolio of stocks. It lists stocks alpha- betically by ticker symbol and includes fields for all perti- nent data. Room for 200 stocks is provided (with a 40K Atari). Several summary figures are also provided, and you can add other summary fields if you like. The final report can be listed to either the screen or a printer, or can be stored to disk. Cassette users can store this data by incorporating the changes noted later in the article. Stored reports can also be read and updated with this program.
ENTERING THE PROGRAM
Listing 1 below is the BASIC program. Listing 2 is the relocat- able assembly-language sort routine found in the DATA state- ments at the end of Listing 1, and need not be typed in to
Eric Verheiden is the author of Vervan's utility programs (CASDUP, CASDIS, FULMAP, DISASM, DJSDUP, and DOWNLD) and of the forthcoming Secrets of Atari I/O (IjG). He holds a Ph.D. from the California Institute of Technology and works for an aerospace firm in .Southern California.
by ERIC VERHEIDEN
use the spreadsheet. After you type in Listing I, use TYPO to find any typing errors, and SAVE a backup copy for safety.
USING THE PROGRAM
The first prompt requests a U for "Update Old File" or C for "Create New File." C erases any previously saved data on the disk. For all prompts, press [RETURN] after responding. The next prompt reads: ADD, CHANGE, LIST, PRINT, or SAVE.
ADDING ENTRIES
If you choose A in response to the last prompt, you are asked to input a symbol for your new stock. This can be from one to six characters long; different symbols must be supplied for multiple entries of a single stock (e.g. , Atari!, Atari2, Atari3). Next, you are prompted to enter the number of shares, cost per share, and current price of the stock. The next prompt asks you to supply the annual dividend per share. After doing this, you'll be returned to the main menu.
continued on next pase
February 1984
CHANGING AND DELETING ENTRIES
If you choose this option, you must specify which entry is to be changed by entering its symbol. Next, type D to delete the entry or M to modify it. If you choose the latter, you will be presented with the same series of prompts described above (under "Adding Entries"). To change a parameter, type in the new value followed by [RETURN]. If you simply press [RETURN] in response to any prompt, the old value will be retained.
LISTING, PRINTING, AND SAVING
To list your report to the screen, choose L from the main menu. On a 40-column screen, the entries for individual stocks are hard to read, but the summary figures are more legible. The "Print" option produces an 80-column listing on a printer. Before ending a session with the spreadsheet, the updated listing should be stored to disk with the Save command. The program uses the file name STOCK.DAT. If a larger number of entires are to be added or modified, I recommend that you Save your data several times during the session to protect against its accidental loss.
CASSETTE OPERATION
You should reserve three cassettes for use with the Stock Port- folio Spreadsheet; one for the program, one for the old port- folio listing, and one for the new portfolio listing. Change lines 120 and 990 to read:
120 OPEN #3,4,0,"C:"
990 CLOSE #3: OPEN #3,8,0,"C:"
To update the old listing, select U from the main menu. After the beep, load the tape containing the old portfolio listing, press PLAY on the recorder, and then press [RETURN] on the computer.
To save the new listing to tape, load a blank cassette into the recorder and press RECORD and PLAY. Then choose S from the main menu. After the double beep, press [RETURN]. Patience is required for these operations, because cassette storage is quite slow.
ADDING NEW SUMMARY LINES
Insert new lines in the program starting with line 1411. Quan- tities available for manipulation are GSHR (total shares),
GCOS (total cost), GVAL (total current value), and GINC (total income). For example, if you call a new quantity GXXX, add these lines:
1411 GXXX = expression
1412 S$ = STR$(GXXX):GOSUB 1430: PRINT #3;" description ";S$
This will display the quantity to within two decimal places of accuracy. For three-place accuracy, replace GOSUB 1430 with GOSUB 1460 in line 1412. If you want a percent symbol to appear after the new quantity, append ;"%" to line 1412.
MACHINE-LANGUAGE SORT ROUTINE
Listing 2 provides the source code for the sort routine used in the spreadsheet in Assembler Editor syntax. The routine is relocatable and can sort up to 255 items. Assuming that the sort routine is contained in a string A$ (as in the spread- sheet), the format for calling it is:
X = USR(ADR(A$),ADR(SYMB$),NREC,RECLEN)
Here, SYMBS is a string that contains NREC fields of RECLEN characters each. NREC and RECLEN must not exceed 255. The ordering of the sorted records is stored at address X, as returned by the sort routine. The sorter pro- duces record indices from zero to NREC— 1, so to load the Kth-ordered record you must set IREC = PEEK(X + K-1) + 1 and load record IREC.
The routine uses a version of a radix sort and is very fast, since it does not perform actual data movement, but com- putes an ordering.
Starting with the least-significant bytes of the entries, the program alternately counts the occurrences of each byte ($00-$FF), and then calculates a cumulative partial sum. This is used to take entries in the old ordering and put them into a new ordering, according to the byte under examination. The ordering is finished when this process has been completed for the most significant byte.
The program uses indirect addresses in FRO for the "old ordering," FRl for the "new ordering," and FR2 for the accu- mulated counts. The sign bit of FRO -I- 2 is used as a flag for pass 1 or 2 (plus or minus). FRO + 3 contains the current offset into the entries for sorting. Other floating-point registers are used for intermediate results. The entire sort routine is 151 bytes long.
Requires 16K cassette & 24K disk
10 REM ** STOCK PORTFOLIO **
1 5 REM • SPREADSHEET
20 REM • BY ERIC VERHEIDEN *
25 REM * ANTIC MAGAZINE
30 REM * FEBUARY , 1 984
35 REM *********************
40 DIM SYM$(6) ,ISYM$(6) ,ISTR$( 1 ) ,INP$(
90) ,S$( 10) , A$(256)
50 DIM SHAR(200) ,SYMB$( 1200) ,COSTSH(Z0
0) ,TCOST(200)
60 DIM PRICESH ( 200) , CURRVAL ( 200) , YIELD
( 200), DIV( 200), INCOME ( 200 ),CHANGE( 200)
E OR QR C=0: GOT
70 GOSUB 1530
80 PRINT •QPDATE OLD FIL
W FILE" ; : INPUT ISTR$
90 IF ISTR$="C" THEN NRE
100 IF ISTR$<>"U" THEN 8
110 TRAP 290:NREC=-1
120 OPEN #3,4, 0,"D : STOCK
1 30 INPUT #3 ; INP$ : IF INF
140 NREC=NREC+1
150 IF NREC=0 THEN 130
1 60 GOSUB 1 70 : GO TO 130
170 S$=INP$(1,5):SHAR(NREC)=VAL(S$
EATE NE 0 300
. DAT"
$-"" THEN 290
32
ANTIC, The ATARI Resource
180 SYMB$(6*NREC-5)=IMP$(7,12) 580 FOR I=IREC TO NREC-1
190 S$ = INP$(14,20) :COSTSH(NREC)=VAL(S$ 590 S H A R ( I ) -S H A R ( 1 + 1 ) : C 0 STS H ( I ) =C 0 STSH
) (I+l)
200 S$ = INP$(33,40) :PRICESH(NREC)=VAL(S 600 T C 0 ST ( I ) =T C 0 ST ( 1 + 1 ) : P R I C E S H ( I ) =P R I
$) CESH(I+1)
210 S$ = INP$(58,63) :DIV(NREC)=VAL(S$) 610 CU R R V A L ( I ) =C U R R V A L ( 1 + 1 ) : Y I E L D ( I ) =Y
220 TCOST(NREC)=SHftR(NREC)*COSTSH(NREC IELD(I+1)
) 620 DIV(I)=DIV( I + l ) : INCOME(I)=INCOME(I
230 CURRVAL(MREC)=SHAR(NREC)*PRICESH(N + 1 ) : C H A NG E ( I ) =C H ANG E ( I + l ) : N E XT I
REC) 630 NREC=NREC-1 : GO TO 300
240 YIELD(NREC)=1 00*DIV(NREC) /PRICESH( 640 NREC=NREC+1
HREQ) 650 PRINT "NEW S YMB 0 L " ; : S YMB $ ( 6 * N R E C-5
250 INCOME{NREC)=SHAR(NREC)*DIV(NREC) ) =S YMB $ ( 6 * I R E C-5 , 6 * I R E C ) : I N P UT SYM$
260 CHANGE(NREC)=0:IF C OSTS H ( N R E C ) =0 T 660 IF LEN(SYM$)>0 THEN IF A S C ( S YIV1$ ( 1 )
HEN 280 )=32 THEN S YM$ ( 1 ) =S YM$ ( 2 ) : G 0 TO 660
270 CHANGE(NREC)=100*(PniCESH(NREC)-CO 670 IF LEN(SYM$)-0 THEN 700
STSH(NREC) )/COSTSH(NREC) 680 IF LEN(SYM$)<6 THEN S YM$ ( L E N ( S YM$ )
280 RETURN +1 ) =" " : G 0 T 0 680
290 CLOSE #3:IF NREC<0 THEN PRINT " F I L 690 S YMB $ ( 6 * N R E C-5 ) =S YM$
E NOT FOUND' -GO TO 80 700 PRINT "NEW S H A R ES" ; : S H A R ( N R E C ) =S H A
300 PRINT "QDD, QHANGE, QIST, QRINT OR R ( I R E C ) : I N P UT INP$
HAVE" ; iINPUT ISTR$ 710 IF LEN(INP$)>0 THEN S H A R ( N R E C ) =V A L
310 If'iSTR$="P" THEN 950 (INP$)
320 IF ISTR$-"L" THEN 970 720 PRINT "NEW C 0 ST" ; : C OSTS H ( N R E C ) =C0 S
330 IF ISTR$="S" THEN 990 TS H ( I R E C ) : I N P UT INP$
340 IREC = NREC + 1 : IF IREC>200 THEN PRINT 730 IF LEN(INP$)>0 THEN COSTS H ( N R E C ) =V
"TOO MANY RECORDS" : STOP AL(INP$)
350 IF ISTR$ = "A" THEN 790 740 PRINT "NEW CURRENT P R I C E" ; : P R I C ES H
360 IF ISTR$<>"C" THEN 300 ( N R E C ) = P R I C E S H ( I R E C ) : I N P U T INP$
370 PRINT "STOCK TO C H A N G E" ; : I N P UT ISY 750 IF LEN(INP$)>0 THEN P R I C E S H ( N R E C ) =
M$ VAL(INP$)
380 IF LEN(ISYM$)>0 THEN IF ASC(ISYM$( 760 PRINT "NEW D I V I D E N D" ; : D I V ( N R E C ) =D I
1))=32 THEN ISYM$(1 )-ISYM$(2) :G0 TO 38 V ( I R E C ) : I N P UT INP$
0 770 IF LEN(INP$)>0 THEN D I V ( N R E C ) = V A L (
390 IF LEN(ISYM$)<6 THEN I S YM$ ( L E N ( I S Y INP$)
M$)+1)=" "GO TO 390 780 GOSUB 220:GO TO 560
400 IREC-0 790 NREC=NREC+1 : IREC=NREC
410 IREC-IREC+1 : IF IREC>NREC THEN PRIN 800 PRINT " S YMB 0 L" ; : I N P UT SYM$
T "STOCK NOT FOUND":GO TO 300 810 IF LEN(SYM$)>0 THEN IF ASC(SYM$(1)
420 SYM$ = SYMB$(6*IREC-5,6*IREC) )=32 THEN S YM$ ( 1 ) =S YM$ ( 2 ) : G 0 TO 810
430 IF SYM$<>ISYM$ THEN 410 820 IF LEN(SYM$)<6 THEN S YM$ ( L E N ( S YM$ )
440 PRINT SHAR(IREC);" SHARES ";SYM$ +1)=" ":G0T0 820
450 S$ = STR$(COSTSH{IREC) ) :GOSUB 1460:P 830 S YMB $ ( 6 * I R E C-5 ) =S YM$
RINT "COST PER SHARE $";S$ 840 PRINT " SH A R ES" ; : I N P UT X:SHAR(IREC)
460 S$=STR$(TCOST(IREC) ): GOSUB 1460:PR =X
INT "TOTAL COST $";S$ 850 PRINT " CO ST" ; : I N P UT X : C 0 S T S H ( I R E C )
470 S$ = STR$(PRICESH( IREC) ): GOSUB 1460: =X
PRINT "CURRENT PRICE PER SHARE $";S$ 860 PRINT "CURRENT P R I C E" ; : I N P UT X:PRI
480 S$=STR$(CURRVAL(IREC) ) :GOSUB 1460; CESH(IREC)=X
PRINT "CURRENT VALUE $";S$ 870 PRINT " D I V I D E N D" ; : I N P U T X:DIV(IREC
490 S$ = STR$(YIELD( IREC) ) iGOSUB 1460:PR )=X
INT "CURRENT YIELD ";S$;"%" 880 T C 0 ST ( I R E C ) =S H A R ( I R E C ) * C 0 STS H ( I R EC
500 S$=STR$(DIV(IREC) ) iGOSUB 1460:PRIN )
T "DIVIDEND PER SHARE $";S$ 890 C U R R V A L ( I R E C ) -S H A R ( I R E C ) * P R I C E S H ( I
510 S$ = STR$( INCOME( IREC) ): GOSUB 1460:P REC)
RINT "INCOME $";S$ 900 Y I E L D ( I R E C ) = 1 0 0 * D I V ( I R E C ) / P R I C E S H (
520 S$ = STR$(CHANGE(IREC) ) :GOSUB 1460:P IREC)
RINT "NET CHANGE " • S $ ; " »/o" 910 I N C OME ( I R E C ) =S H A R ( I R E C ) * D I V ( I R E C )
530 TRAP 300:PRINT "QELETE OR [flO D I F Y E 920 C H A N G E ( I R E C ) = 0 : I F C 0 ST S H ( I R E C ) =0 T
NTRY" ; : INPUT ISTR$ HEN 940
540 IF ISTR$ = "M" THEN 640 930 C H A N G E ( I R E C ) = 1 0 0 * ( P « I C E S H ( I R E C ) -C 0
550 IF ISTR$<>"D" THEN 530 S T S H ( I R E C ) ) / C 0 S T S H ( I R E C )
560 IF IREC-NREC THEN 630 940 GO TO 300 570 SYMB$(6*IREC-5)=SYMB$(6*IREC+1) continued on pase 35
February 1984
33
N«v<r h^Me |i| seen so m^^ no*H.t\i) ch^ract-irs ux-th such
|h064 V023 C30S6X 1.24 CI C2 C3 C4 CS
Now you can take complete advantage of ttie mode 4 color character graphics capabilities of your Atari 48K 800 or 1200XL disc-based computer! This system provides total control over character generation and graphics mixing, with such features as:
■ AUTOMATIC CHARACTER FILE: ANTICA-4 lets you design character graphics without having to set up or catalogue your character-file, knows when you need a new character or simply an edit, and makes characters keyboard assignable.
■ AUTOMATIC MULTI-CHARACTER MATTING: This feature lets you perfectly matte moving characters over a moving background, for full character and graphics mixing.
■ MULTI-CHARACTER PICTURE ANIMATOR: Name your moving pictures, put them in motion, and watch your creations automatically matte themselves over a full color animated background. Your animations edit easily and automatically.
■ MACRO-MICRO CONTROL: The field can be any shape and several times larger than the screen. Work your field with character resolution in the Macro mode, or build your characters with an enlarged view in the Micro mode.
FINE-LINE DRAWING: Make fine-line drawings over complex backgrounds in any of your colors while ANTICA4 continuously and automatically updates your character file. ■ INTER-MODAL CONSISTENCY: Regardless of the character source. Ai 'it ;•; i: lets you easily switch between the editor, animation and building modes without loss of system integrity. PLUS: Full function matting editor. PLUS: Five speed fine-scrolling field. PLUS: Full color and luminosity control, with proportional dimming. PLUS: DOS compatibility.
AND MUCH MORE: Multi-character field-fill, automatic field or cursor- wipe replacement of characters or backgrounds, combined characters, the list goes on and on. You have an incredibly creative system at your command. It's simply a treat to watch it work!
NOUIN is proud to offer this fantastic package for $49.95. ANTICA-4 arrives with a full character set and file of animated pictures. Ask for it at your computer store or order direct from us toll-free.
PO Box 22889 Seattle. Washington 98122
1-206-323-8270
Outside Washington call toll-free
1-800422-5525
Visa and Mastercharge accepted. Atari® is a registered trademark of Atari, Inc.
agjaKigi'
TAL COST 1 01 0 PRI INCOM 1020 IF 1030 X=U 1040 GSH =1 TO NR 1050 IRE 1060 S$= R( IREC) : 1 070 INP 1080 1090 1100 1110 OST(
INP S$ = J = 1 S$ = IREC
FOLLOW THAT STOCK continued from pase 33 950 CLOSE #3 : OPEN #3 , 8 , 0 , " P : " 960 GOTO 1 000
970 CLOSE #3 : OPEN #3 , 8 , 0 , " E : ■ 980 GO TO 1 000
990 CLOSE #3:0PEN #3 , 8 , 0 , " 0 : S T 0 C K . D A T" 1000 PRINT #3;" #SHR SYMBOL COST/SH TO PRICE/SH " ;
NT #3;'CURR VALUE "/oCHG DIV/SH
E YIELD"
NREC=0 THEN 300
SR( ADR ( AS) , ADR( SYMB$) ,NREC , 6)
R=0: GCOS=0: GVAL=0: GINC=0: FOR K
EC
C=PEEK( X+K-1 )+1
STR$(SHAR(IREC)) :GSHR=GSHR+SHA
INP$(1)="
$( 6-LEN(S$) )=S$ : INP$( 6)=" "
$( 7 )=SYMB$( 6*IREC-5 , 6*IREC)
STR$ ( COSTSH ( IREC ) ) : J0LD=1 0
7 : GOSUB 1440
STR$(TCOST(IREC) ) :GCOS = GCOS + TC
)
1120 J=29 ; GOSUB 1 450 1 1 30 S$ = STR$( PRICESH ( IREC) ) 1140 J=36. GOSUB 1440
1150 S$=STR$(CURRVAL(IREC) ) :GVAL=GVAL+ CURRVAL ( IREC ) 1 160 J = 48 : GOSUB 1450
1170 J=CHANGE(IREC):S$=STR$(J+SGN(J)/2 ) : GOSUB 1460
1180 S$ ( I )=■■%■■: IN P$ ( 51 )=■■ ■■:INP$(5 7-LEN( S$ ) )=S$ : J0LD=54 1 190 S$ = STR$ ( DIV( IREC) ) 1200 J=60: GOSUB 1440
1210 S$=STR$( INCOME (IREC)) .GINC=GINC+I NCOME ( IREC ) 1220 J = 71 : GOSUB 1450
STR$ ( YIELD ( IREC ) )
7: GOSUB 1 440 : INP$ ( 80)='"/o'
NT #3 ; INP$ : NEXT K
NT #3:PRINT #3;'GRAND TOTAL SH
GSHR
STR$(GCOS ): GOSUB 1430:PRINT #3
TOTAL COST $";S$
STR$(GVAL) : GOSUB 1430:PRINT #3
TOTAL VALUE $" ; 8$
STR$(GINC). GOSUB 1430:PRINT #3
TOTAL INCOME $" ; S$
L=1 00* ( GVAL-GCOS ) /GCOS
STR$( GDEL ): GOSUB 1460:PRINT #3
E INCREASE " ; S $ ; " "/o"
E=1 00*GINC/GVAL
STR$(GYIE) : GOSUB 1460:PRINT #3
E YIELD •■; S$ ;■■%■■
E=1 00*GINC/GCOS
STR$(GYIE) : GOSUB 1460:PRINT #3
/COST •• ; S$ ;"0/o"
E = GINC/1 2
STR$ ( GYIE) : GOSUB 1430:PRINT #3 PER MONTH $" ; S$
E=GINC/52
STR$ ( GYIE ): GOSUB 1430:PRINT #3 PER WEEK $■■ ; S$
E=GINC/2080
S$ = J = 7 PRI PRI
S$ =
1 230 1 240 1 250 1 260 ARES 1270 -•'GRAND 1280 S$= ;"GRAND 1290 S$= ;"GRAND 1300 GDE 1310 S$= ;• AVER AG 1320 GYI 1330 S$= :" AVE RAG 1340 GYI 1350 S$= ;•• INCOME 1360 GYI 1370 S$= ; ■INCOME 1380 GYI 1390 S$= ;■ INCOME 1400 GYI
1410 S$ = STR$(GYIE) : GOSUB 1430:PRINT #3
; " INCOME PER HOUR $ " ; S$
1 420 CLOSE #3 : GO TO 300
1430 GOSUB 1460 : S$ = S$( 1 , 1 + 2) : RETURN
1440 GOSUB 1 450 : J0LD = J0LD+1 : RETURN
1450 GOSUB 1460 : INP$( JOLD + 3 )=■•
■■.INP$(J + 1-I)=S$:J0LD = J. RETURN 1460 FOR 1=1 TO 10:IF I>LEN(S$) THEN S $( I )= ■ .■ : GO TO 1490 1470 IF ASC(S$( I) )=46 THEN 1490 1 480 NEXT I : GO TO 1510 1490 IF LEN(S$)=I THEN S $ ( 1 + 1 ) =" 0 0 ■ 1500 IF LEN(S$)=I + 1 THEN S $ ( I + 2 ) =" 0' 1510 IF LEN(S$)>I+3 THEN S$=S$(1,I+3) 1 520 RETURN
1530 DATA 104,104,133,244,104,133,243, 1 04
1540 DATA 104,133,242,104,104,133,216, 1 33
1550 DATA 215,198,215,166,89,202,134,2 1 3
1560 DATA 202,134,231,202,134,225,160, 0
1570 DATA 132,212,132,230,132,224,132, 214
1580 DATA 152,145,212,200,208,250,24,1 02
1590 DATA 214,160,0,152,72,36,214,16 1600 DATA 3,24,113,224,170,104,145,224 1610 DATA 138,200,208,240,162,0,138,16 8
16 2 0 DATA 177,212,72,133,217,169,0,133 1630 DATA 219,160,7,10,38,219,6,217 1640 DATA 144,7,24,101,216,144,2,230 1650 DATA 219,136,16,239,24,101,243,13 3
1560 DATA 218,165,219,101,244,133,219, 1 64
1670 DATA 215,177,218,168,177,224,72,2 4
1680 DATA 105,1,145,224,104,168,104,14 5
1690 DATA 230,232,228,242,144,192,36,2 14
1700 DATA 16,165,165,213,166,231,134,2 13
1710 DATA 133,231,198,215,16,152,96 1 720 FOR 1=1 TO 151 1730 READ X : A$( I )=CHR$(X) : NEXT I 1 740 RETURN
TYPO TABLE
Variable |
checksum = |
- 1286082 |
|
Line |
n urn range |
Code |
Length |
10 |
- 90 |
XM |
446 |
1 00 |
- 210 |
M |
380 |
220 |
- 330 |
32 7 |
|
340 |
- 450 |
439 |
|
460 |
- 570 |
4 8 4 |
|
580 |
- 690 |
Xk |
516 |
700 |
- 810 |
VT |
4 08 |
820 |
- 930 |
AH |
361 |
940 |
- 1050 |
SH |
449 |
~ |
continued on next pase |
February 1984
35
.i*.
1060 1 180 1300 1420 1540 1660
1000 101 0 1 020 1 030 1040 1050 1060 1070 1080 1090 1 100 1110 1 120 1 130 1 140 1 150 1 1 60 1170 1 1 80 1 1 90 1200 1210 1220 1230 1240 1250 1 260 1270 1280 1 290 1300 1310 1320 1330 1340 1350 1360 1370 1380 1390 1400 141 0 1420 1430 1440 1450 1460 1470 1480 1490 1500 1510 1520 1 530 1 540 1 550
1170 1290 1410 1 530 1650 1740
8« SI XH WH IL UD
Listing 2 -$600
372 459 457 423 414 262
SAVMSC
FR0
FRE
FR2
FR1
CIX
INBUFF
$58 $D4 $DA $E0 $E6 $F2 $F3
X=USR( 1536, ADR( A$) ,N, L )
A$ N L X
PASS0
PASS 1 PASS2
SET1
ENTRIES TO BE SORTED NUMBER OF ENTRIES LENGTH OF ENTRIES ADDRESS OF POINTER TABLE
PLA PLft STA PLA ST* PLA PLA ST A PLA PLA STA STA BiO LDX DEX STX DEX STX DEX STX LDY STY STY STY STY TYA STA INY BNE
CLC ROR LDY TYA PHA BIT BPL
CLC
INBUFF+1 INBUFF
CIX
FR0 + 4 FR0 + 3 FR0 + 3 SAVMSC+1
FR0+1
FR1 + 1
FR2 + 1
#0
FR0
FR1
FR2
FR0 + 2
( FR0 PASS0
FR0 + 2
#0
FR0 + 2 NADD
) .Y
1560
1570
1580
1590
1600
1610
1620
1 630
1640
1 650
1660
1670
1 680
1690
1700
1710
1 720
1730
1740
1750
1 760
1 770
1 780
1 790
1800
1810
1 820
1830
1840
1850
1860
1870
1880
1890
1900
1910
1920
1930
1940
1950
1960
1970
1980
1990
2000
2010
2020
2030
2040
2050
2060
2070
2080
2090
2100
2110
2120
2130
2140
2150
2160
2170
2180
2190
NADD
ORDR
SHFT
NEXB
ADC TAX PLA STA TXA INY BNE
LDX TXA TAY LDA PHA STA LDA STA LDY ASL BOL ASL BCC
CLC ADG BCC
INC DEY BPL
CLC ADC STA LBA ADC STA LDY LDA TAY LDA PHA CLC ADC STA PLA TAY PLA STA INX CPX BCC
BIT BPL
LDA LDX STX STA DEC BPL RTS
. END
(FR2) ,Y (FR2) ,Y
SET1
#0
(FR0)
FR0 + 5
#0
FRE+1
#$07
A
FRE + 1
FR0 + 5
NEXB
FR0 + 4 NEXB
FRE+1
SHFT
INBUFF
FRE
FRE+1
INBUFF+1
FRE+1
FR0 + 3
(FRE) ,Y
(FR2) ,Y
#1 (FR2),Y
(FRl) ,Y
CIX ORDR
FR0 + 2 PASS2
FR0+1 FR1 + 1 FR0+1 FRl+1 FR0 + 3 PASS1
□
36
ANTIC, The ATARI Resource
nal finance
by WARWICK WAKEMAN
TIhe recent economic recession has brought home to the average person how important it is to be aware of per- sonal finance. The issues of uncertain investment returns, inflation and unreasonable mortgage rates are complex, and most of us are not financial professionals with access to the tables and charts that can ease the pain of complicated mathematical calculations. If you're like me, you lapse into a funk when brought face to face with an algebraic equation involving "principal, interest and time."
Knowing that my Atari 800 would not be the least bit fazed by such a confrontation, I collected a series of financial equa- tions, wrote a few subroutines, added a touch of color, and came up with the following menu-driven program. While it won't solve your financial dilemmas, it might make your struggles less burdensome.
PROGRAM DESCRIPTION
The program opens with an invitation to choose one of several options: "WHAT WILL MY INVESTMENT BE WORTH?"; "VALUE OF REGULAR SAVINGS"; "ANNUITY IN- COME"; and so on. One menu choice leads the user to a
brief description of how each option can be used. For example, "DEVALUATION OF THE $ BY INFLATION" not only determines the effect of inflation on your savings, it also can calculate the depreciation of a piece of property, such as the family car. By using this option in conjunction with "GROWTH RATE OF MONEY," you can obtain an accurate picture of the actual increase (or decrease) in the value of an investment over a given period of time.
The program is written in very basic BASIC. It is simply a series of subroutines tied together by a menu. The calculat- ing routines (lines 100, 300, 500, 700, 900, and UOO) in the program can be changed to meet your specific requirements. Osborne/McGraw-Hill's Some Common BASIC Programs (Atari Edition) contains a number of programs you may find useful. TAB Books' The Most Popular Subroutines in BASIC is also crammed full of usable formulas.
TAKE APART
Lines 0-25: Give the program a title.
Lines 30-95: Menu information; requests user input and
continued on next page
February 1984
37
directs the program to the chosen menu option. The pro- gram error traps each INPUT hne (see hnes 95 and 120, for example).
Lines 100-195: This section does the work involved in the first menu choice. After requesting user input, it computes the figures you need (Hnes 155, 160 and 175) and prints the answer on the screen (fines 170 and 180).
Line 190: This subroutine (GOSUB 3000) asks the user to stay with this choice, ask for further directions, or return to the main menu. All of the routines are set up in virtually the same way.
Line 2000: This final menu selection (menu choice 7: line
Requires 16K RAM
1 REM *** MONEY MATTERS ****
2 REM * BY WARWICK WAKEMAN *
3 REM * ANTIC MAGAZINE
4 REM * FEBUARY ,1984 *
5 REM **********************
8 GRAPHICS 1+1 6 : SETCOLOR 2,4,4
9 POSITION 6,5:? #6 ; " F I N A N C I A L"
10 POSITION 4,7:? #6 ; ■ C A L C U L AT I 0 N0' 15 POSITION 9,12:? #6 ; "|j||'
20 POSITION 6,14:? #6 ; " WA RWI C K ! •
25 FOR X=1 TO 75 STEP 0.05:NEXT X:?
30 GRAPHICS 0:SETCOLOR 2,4,4:? :? :?
35 PRINT "THIS PROGRAM WILL COMPUTE FI
NANCIAL-
40 PRINT - CALCULATIONS FOR INVESTMEN
T AND"
BORROWING - ? : ? "CHOOSE:" : ?
Q. WHAT WILL MY INVESTMENT BE W
VALUE OF REGULAR SAVINGS" ANNUITY OR PENSION INCOME- HOW MUCH DO I OWE ON MY LOAN
GROWTH OF INTEREST BEARING I
DEVALUATION OF THE $ BY INFL
FURTHER DETAIL ON 1 THROUGH
45 ? 50 ? 55 ? ORTH? 60 ? 65 ? 70 ? ?"
75 ? NVEST 80 ? ATION 85 ? 7 ." 90 TRAP 50: INPUT X
95 ON X GOTO 10 0,300,500,700,900,1100, 2000
100 GRAPHICS 0:SETCOLOR 2,13,6:? :? 105? Q
110? 115? "ORIGINAL INVESTMENT $
120 TRAP 115: INPUT OA
1 2 5 ? " I N T E R E S T R A T E »/o
1 30 TRAP 125: INPUT I
135 ? -COMPOUNDING PERIODS PER YEAR #
1 40 TRAP 1 35 : INPUT N
145 ? "TOTAL YEARS #
FUTURE WORTH OF AN INVESTMEN
85) provides you with details about how to use each option, and suggests further applications. If you don't want this section in your program, eliminate line 85, omit 2000 from line 95, and eliminate lines 2000 to 2285. Lines 3000-3135: After each calculation, these two sub- routines lead the user back into the program to continue with the function, get more information or return to the main menu. If you choose to eliminate the "FURTHER DETAIL" routine (fines 2000-2285), then lines 3010, 3030, 3110 and 3130 should be omitted and fines 3015, 3035 and 3135 changed.
150 TRAP 145: INPUT T
1 55 I = I/N*0. 01
160 FW=OA* ( l+I )a(N*T)
165 ?
170 ? "UHillilMlTililin = $" ;
175 ? INT ( FW* 1 00+0 . 6 ) * 0 . 01
180 ? "UMi^'liMin ";T;" QJQJQ"
185 ?
190 GOSUB 3000
195 GOTO 1 1 0
3 0 0 6 R APHICS 0:SETCQLOR 2,2,4 : ?
305 ?
FUTURE VALUE OF REGULAR SAVINGS
310?
315 ? "AMOUNT EACH DEPOSIT
320 TRAP 315: INPUT D
325 ? " INTEREST RATE
330 TRAP 325 : INPUT I
335 ? "DEPOSITS PER YEAR
340 TRAP 335 : INPUT N
345 ? "NUMBER OF YEARS TO SAVE
%•■
#■■
#"
350 TRAP 345 : INPUT T
355 I=I/N*0. 01
360 FV = D* ( ( 1 + 1 )a( N*T)-1 )/I
365 ?
37 0 ? umiiiiM'niin - i^ ■
375 ? INT ( FV* 1 00+0 . 6 ) * 0 . 01
380 ? "HMJ.'liMin ";T;" QQ]|Q'
385 ?
390 GOSUB 3000
395 GOTO 31 0
500 GRAPHICS 0:SETCOLOR 2,5,4:? :?
505 ?
tJHiTI"
510?
515 ? "AMOUNT OF PLANNED WITHDRAWALS $
AMOUNT REQO FOR ANNUITY OR PEN
520 TRAP 515: INPUT PW
525 ? "EXPECTED INTEREST RATE
530 TRAP 525 : INPUT I
535 ? "PLANNED WITHDRAWALS PER YEAR
540 TRAP 535 : INPUT N
%
38
ANTIC, The ATARI Resource
545 ? "NUMBER OF YEARS TO MATURITY
550 TRAP 545 : INPUT T
555 1=1*0.01
560 AR=PW*N/I*(1-1/((1+I/N)a(N*T)))
565 ?
57 0 ? "lAH;»AIII['i»IJH*H['HJiM!iaiMii = ^
575 ? INT(100*AR+0.6)*0.01
580 ? "ODE " ; N*T ;
#
WITHDRAWALS IN
585 ?
590 GOSUB 3000
595 GOTO 51 0
700 GRAPHICS 0: SETCOLOR 2,1,3:?
7 05 ? ■■
710?
715 ? "REGULAR PAYMENT
BALANCE OWING ON A LOAN
720 TRAP 715: INPUT RP
725 ? "ORIGINAL AMOUNT BORROWED
730 TRAP 725 : INPUT P
735 ? "NUMBER OF PAYMENTS PER YEAR
740 TRAP 735 : INPUT N
745 ? "ANNUAL INTEREST RATE
»/o
750 TRAP 745 : INPUT I
755 ? "TOTAL NUMBER OF PAYMENTS MADE #
760 TRAP 755 : INPUT T
765 1=1/100
770 J=I/N
775 B0=P*(1+J)aT-RP*((1+J)aT-(1+J))/J-
( 1 *RP)
780 ?
7 85 ? "l!fJ»!lL'IWHVlli'li = ^ \
790 ? INT ( BO* 1 00+0 . 6 ) * 0 ■ 01
795 ? "QSOa ";T;" lJl'ii'HJIi!<"
800 ?
805 GOSUB 3000
810 GOTO 710
900 GRAPHICS 0:SETCOLOR 2,3,2:? :?
9 05 ? " iminviiMiiM^'iiii.'i»i"
910?
915 ?
920 ? "INITIAL AMOUNT $" ;
925 TRAP 920: INPUT P
930 ?" INTEREST RATE »/o" ;
935 TRAP 930: INPUT R
940 LET N=1
945 LET A=P* ( 1+R/1 00)aN
950 ?
9 55 ? mU =■ #" ; N
960 ?
965 ? -rifTilini = $" ;A
970 LET N=N+1
975 ?
980 ? "FOR ADDITIONAL YEARS, HIT 1"
985 ? "TO CONTINUE PROGRAM, HIT 2"
990TRAP980:INPUTX
995 IF X=1 THEN 945
1000 IF X=2 THEN GOSUB 3000
1005 GOTO 91 5
1100 GRAPHICS 0:SETCOLOR 2,14,2:? :?
1105 ?
1110? " $ lil*'l:lBilil«lilL»lM;ft*iMil»l'II1
1115 ?
1120 ? "ORIGINAL VALUE $'
1 125 TRAP 1120: INPUT OV
1 1 3 0 ? " I N F L A T I 0 N R A T E %"
i 135 TRAP 1130: INPUT I
1140? "YEARS #"
i 145 TRAP 1140: INPUT T
1150?
1155 DV-INT(100*OV*(1-I/100)aT+0.B)*0.
01
1160 ? "IrH'HllllITiri = £1" ; D V
1165 ? "IIM'J!llMlir^:T:" EEQjQ"
1170 ? : ?
1175 ? "FOR ADDITIONAL YEARS, HIT 1"
1180 ? "TO CONTINUE PROGRAM, HIT 2"
1 185 TRAP 1175: INPUT X
1 190 IF X-1 THEN 1 21 0
1195 IF X=2 THEN GOSUB 3000
1 200 GOTO 1 120
1205 ? : ?
1210 ? "ENTER NUMBER OF ADDITIONAL YEA
R S - " ;
1215 TRAP 1210: INPUT N
1220 ? "ENTER INFLATION RATE FOR ADDIT
I 0 N A L YEARS - %" ;
1225 TRAP 1 220: INPUT I
1230 DV-INT(100*DV*(1-I/100)aN+0.6)*0.
01
1235 LET T=T+N
1240 ? :?
1245 ? "liM'illUlllilMiH $";0V;" = Q";DV
1250 ? "FfMWn^ " :T:" BBQJE"
1 255 ?
1 260 GOTO 1 175
2000 GRAPHICS 0:SETCOLOR 2,10,1:? :?
2005 ? " THIS PART OF THE PROGRAM WI L L GIVE FURTHER DETAILS ON THE
CALCULATIONS":? :? CHOOSE :" 1. WHAT WILL MY INVESTMENT BE
VARIOUS 201 0 ? 2015 ?
WORTH?" 2 02 0 ? " 2 2 02 5 ? " 3 2 03 0 ? " 4 AN?" 2 03 5 ? " 5
INVEST" 2 04 0 ? " 6 FLATION"
2045 ? " 7 . BACK TO MAIN MENU" 2050 TRAP 2005 : INPUT Z
2055 ON Z GOTO 2 10 0,2140,2170,2205,223 5,2260,30
2100 GRAPHICS 0:COLOR 1:SETC0L0R 2,13, 6
continued on page 41
VALUE OF REGULAR SAVINGS- ANNUITY OR PENSION INCOME- HOW MUCH DO I OWE ON MY LO
GROWTH OF INTEREST BEARING
DEVALUATION OF THE $ BY IN
February 1984
39
"Exodus: Ultima III, with a superior plot to match its superior gaming system, is a great game ... it sets new standards for fantasy gaming state of the art."
Softline, November/December 1983
"Caverns of Callisto is a very challenging and enjoyable arcade game. I hope Origiij Systems can continue to provide pro(
of such quality." Core, Dccembe ''**
Apple, Atdr.i,„Com64,
MONEY MATTERS continued from page 39
2265 ?
INFLATION
DEVALUATION AT RATE OF
2105 ? : ? ■
sisoai" : ?
2110 ? " This e worth of an d futuretime. 2115 ? "I can e r m deposit,
FUTURE WORTH OF AN INVE
function will compute th investment at a specifie The original investmen"; be asavings account, a t bondsor a retirement fund
2120 ? : ?
i ma t e the or a piece
21 25
t he
t h e 21 30 21 35 2140 : ? : ? 2145 ?
2150 ? future
It may also future value o of real estate ? " Just enter what appreciation rate is
be used to est f an antique
you i n
estimate place of
INTEREST RATE
GOSUB 3100 GOTO 1 00 GRAPHICS
0 : COLOR 1 : SETCOLOR 2,2,4
FUTURE VALUE OF REGULAR
This function will compute the value of regular equal amounts deposited in an interest ";
2155 ? "bearing investment
savings account, insurance
retirement savings plan."
2160 GOSUB 31 00
2165 GOTO 300
2170 GRAPHICS 0:COLOR 1:SETC0L0R
• ? • ?
such as a policy or
2,5,4
MINIMUM ANNUITY INVESTMENT
2175 ? : ?
2180 ? "This function will compute the amount required to provide regular in come over a specified period of"; 2185 ? " time such as pension payment s. It can also be used to determine the amount required to provide"; 2190 ? " living expenses while attend! ng college or university." 2195 GOSUB 31 00 2200GOTO500 ■: ;• 2205 GRAPHICS 0:COLOR 1:SETC0L0R 2,1,3
• 7 9
221 0
rwiim
221 5 ba I i e d 2220 2225 2230 2235 : ?
2240 2245 n e y i n 2250 2255 2260 2: ?
BALANCE REMAINING ON A
? "This function will compute the anceowing on a loan after a specif number of payments such as a";
? " bank loan or a mortgage."
GOSUB 3100
GOTO 700
GRAPHICS 0:COLOR liSETCOLOR 2,3,2
7
GROWTH RATE OF MONEY
7
? "This function will show how mo grows year by year when placed interest bearing investment." UB 3100 0 900
a n GOS GOT GRAPHICS 0:COLOR 1:SETC0L0R 2,14
7
2270
e f f e t can 2275 p me n t ate i 2280 2285 3000 3005 ?"
3010 S?" 3015 3020 3025 3030 3035 3100 3105 3110 S"
3 115 3120 3125 3130 3135
? "This function will compute the ct on inflation on the doller. I
also be used to calculate "; ? "depreciationon a piece of equi
Just enter the depreciation r n place of the QJUJy^J^Bjm^" GOSUB 3100 GOTO 1100 ? : ? : ? "CHOOSE : " ? "1. CONTINUE WITH THIS FUNCTION
? "2. FURTHER DATA ON CALCULATION
? "3 . BACK TO MAIN MENU?"
TRAP 3000: INPUT Y
IF Y=1 THEN RETURN
IF Y=2 THEN 2000
IF Y=3 THEN 30
? : ? "CHOOSE :"
? " 1 . TO USE THIS FUNCTION"
? "2. FURTHER DATA ON CALCULATION
? "3. BACK TO MAIN TRAP 3040: INPUT A IF A=1 THEN RETURN IF A=2 THEN 2000 IF A=3 THEN 30
MENU-
TYPO TABLE
Va r
i a b I e
Line
1
35
95
1 55
31 5
375
535
595
755
900
960
1110
1 170
1 230
2025
21 20
2160
221 5
2275
31 05
c h e n urn
ck r a 30 90 15 31 37 53 59 75 81 95 1 1 1 1 12 20 21 21 22 22 31 31
sum nge
5
05
65
25
20
15
55
10
70
00
35
219221 Code UO PH NB UZ PB BY PR PA IX WC HF JT JY YB FD EM HO TZ AC HN
Length 444 446 382 262 313 303 327 329 278 25S 247 332 297 406 563 528 532 609 365 1 79
□
February 1984
41
Type your program once
by BILL WILKINSON
TIYPO is designed to help you find the typing errors you make when entering the BASIC programs pub- hshed in ANTIC. TYPO generates a table of values called a "Typo Table," which includes a variable checksum, line-number ranges, codes and lengths. Compare your table with the appropri- ate Typo Table in ANTIC. (A different table accompanies each BASIC listing.) If the two are not identical, you've prob- ably made a "typo" that needs to be corrected.
HOW TO USE TYPO
These instructions apply when you use TYPO to test other programs. See the next section for instructions on how to use TYPO to check itself.
1. Enter the program listing exactly as shown.
2. LIST this program to disk (LIST "DTYPO.LST") or cassette (via LIST "C:"). When using a cassette, reserve an entire blank cassette for TYPO.
"TYFO" first appeared in Volume 1, Number 3 of ANTIC, and was reprinted in Volume 2, Number 1. Now that our listings are set in a monospaced font, we reprint it here as a service to our many new readers. Bill Wilkinson, Vice- President and Technical Director of Optimized Systems Software, Inc., was one of the original designers of Atari BASIC. -ANTIC ED
3. Type NEW to clear memory.
4. Type in a program from ANTIC.
5. LIST this program to disk (LIST "D:NAME") or cassette (LIST"C:"). Type NEW and reenter the program (ENTER "D:NAME" or ENTER "C:").
6. Append the TYPO program onto the end of the program from the disk (ENTER "DTYPO.LST") or cassette (ENTER "C:").
7. Type GOTO 32000. You will be prompted for "File for output." Type [S] [RETURN] for screen output or [P] [RETURN] to send output to the printer. Your Typo Table will then be printed to the appropriate device. Com- pare your table with the one published with the BASIC listing. If they agree, you're finished and the program should run.
8. If any values in the two tables do not agree, note the variable-checksum value and keep it handy.
9. Examine the lines which have codes and/or lengths that disagree. Cor- rect any errors.
10. If and only if the variable check- sum you noted agrees with the one in the magazine, return to Step 7 (above) and try again.
U. If the variable checksums do not agree, you must go to Step 5 (above) and perform the listing and reentering ritual! You may skip Step 6, however, since (pre- sumably) you have already merged the two programs with LIST and ENTER.
HOW TO USE TYPO ON ITSELF
L Follow Steps 1-3 above.
2. Load the saved TYPO (ENTER "DTYPO.LST" or ENTER "C:").
3. Change 32000 to 32500 in lines 32180 and 32200. This alteration ap- plies 07ily when you use TYPO to check itself.
4. Go to Step 7 (above).
WHAT TYPO IS TELLING YOU
This program is fussy! It counts every period, comma, and space. It also cares about the order in which you type in pro- gram lines! The order in which variable names are stored depends on the order in which the lines were typed. If this order is altered, the values of the tokens and subsequent checksums will also be changed.
The variable checksum is used to cor- rect for this by producing a checksum that depends on the order in which vari- ables are stored. If your checksum doesn't agree, you have either entered lines in the wrong order or misspelled a variable name. In either case, you must correct your error(s) and then go through the LIST/NEW/ENTER sequence to ensure that the variables are in the cor- rect order.
The length shown is the number of bytes in the tokenized program that are
42
ANTIC, The ATARI Resource
encountered by TYPO within the indi- cated line-number range. The two-letter code is essentially a checksum of "length" bytes within that same range. If the length is correct but the code is wrong, you may have made a spelling or punctuation error. Be careful: since all keywords and operators (including two-
character operators such as "<>") are tokenized as one byte, the length may stay the same even though you type SET- COLOR for CLR. You may use abbre- viations for keywords (see "Appendix A" of the BASIC Reference Manual) as long as the LISTed result conforms to the magazine listing.
If the length bytes disagree, you have added or deleted characters. If nothing obvious shows, pay special attention to characters in quoted strings and/or REM statements. It is easy to omit a space or punctuation in a REMark, thinking that "REMs don't matter." But to TYPO, they do.
32000 REM Type Your Program Once — "T
YPO"
32100 CLR :DIM 0$ ( 2 0 ) : 0 F-7 : C L OS E #0F:?
"File for output "; 32110 INPUT 0$:OPEM #0 F , 1 2 , 0 , Q$ : Q R EM=0 32130 0CNT=1:FOR Q A D D fl = P E E K ( 1 3 0 ) +2 5 6 * P EEK(131) TO PEEK( 132)+256*PEEK( 1 33)-1 32140 QSUM=QSUM+PEEK(0ADOR)*QCNT:0CNT= 0CNT+1:NEXT QADDR
32150 ? #0F ;"Va r i a b I e checksum = ";OSU M: ? #0F
32160 (JADDR = PEEK{136)+256*PEEK(137):? #0F;" Line num range Code Length
32170 01-INE = PEEK(QADOR)+256*PEEK( QADDR
+ 1)
32180 IF OLINE>=32000 THEN END
32190 OLEN=0:QSUM=OLEN:OCNT=QLEN:? #gF
■ " " • 0 L I N E " ~ " ■
32200 IF NOT (Oc'nT<12 AND OLEN<500 AN
D OLIME<32000) THEN 32270
32220 0LEN=0LEN+PEEK(0ADDR+2):QCNT=QCN
T-i-1
32230 IF PEEK(QADDR-h4)=0 AND QREM THEN
0ADDR=0ADDR+PEEK(0ADDR+2):G0T0 32260 32240 FOR OADDR = OADDR TO Q A D D R + P E E K ( 0 A DDR+2 )-1
32250 OSUM=QSUM+PEEK(OADDR) :NEXT QADDR 32260 Q$=STR$(QLINE):QLINE=PEEK(QADDR) -t-256*PEEK( QADDR + 1 ) :GOTO 32200 32270 QSUM=0SUM-676*INT(QSUIVI/676):QCNT =INT( QSUM/26 )
32280 ? #QF;Q$ , CHR$(65+QCNT) ;CHR$ ( 65+Q SUIVI-26*0CNT) ;" ";QLEN 32290 GOTO 32180
TYPO TABLE
Variable checksum = 50796
Line num range Code Length
32000 -32200 QD 518
32220 - 32290 WQ 310
□
CASADAPTER
"IT REALLY WORKS!"
CASADAPTER is a cassette interface that al- lows you use your own cassette recorder or stereo with the Atari 400/800/1200®. CASADAPTER will handle motor control, audio and data channels.
♦34.95
48K
RAM BOARD FOR:
THE ATARI 400® M15.00
COMPUTER PRODUCTS
Add 52.50 shipping.
Send checl< or money order
C.O.D. accepted
New York State Residents
add 7% tax
®Atari Is a trademark of
Atari, Inc.
12 Scamridge Curve Buffalo, New York 14221 (716) 632-3441
Dealer Inquiries Invited •Product of Gemini Software
*MAGIC DUMP Is a screen dump utility that allows you to dump a Hi-Resolution graphics picture to a printer in a variety of different sizes. MAGIC DUMP is used in the RIGHT hand cartridge slot, so it is always ready to use.
MAGIC DUMP will work with all Epson printers and Gemini printers, the Centronics 739 printer, and the Prowriter or N.E.C. printers. igg gg
*GTIA DRAW is a drawing program that uses all the features of Atari's® new GTIA chip. GTIA DRAW will give you three extra graphics modes. Mode 9 (16 luminances and one color). Mode 10 (8 luminances and color), or Mode 11 (16 colors and one lumi- nance). GTIA DRAW will allow you to:
• Add text to pictures
• Blank horizontal or vertical lines
• Shift the screen in any direction
• 'ZOOM' in on certain areas of a picture
• Fill portions of a screen
• Work on two different screens simultaneously
«49.95
*THE DRUMESISER is a unique sound synthesizing tool that allows the creation of sounds such as a drum, piano, organ, harpsichord, or electronic syn- thesizers. The different types of sounds created are limited by the user's imagination and ambition. THE DRUMESISER comes with an Editor, which allows you to create your own sounds, a Player, which will allow you to play the different instru- ments, and the Memory Options, which make it pos- sible for you to playback any sounds that you have recorded.
M9.95
February 1984
43
The wild world of conflict simulation
by KARL WIEGERS
It's no secret that the microcomputer has revolutionized the games people play. Game designers moved quickly from the prototypical Pong to the enor- mous selection of computer games avail- able today, and as a result the TV screen has replaced many game boards. Most of the computer games that are currently available are arcade-style maze or shoot- em-up games, but an increasing number of "adventure" games are being intro- duced. I use this term to include science fiction, fantasy and conflict-simulation games (the polite term for war games). War games have been used for genera- tions by armies to simulate impending battles and to help formulate strategies and tactics.
WHAT IS A WAR GAME?
The war gamer has several hundred board games from which to choose, and they cover almost every conceivable con- flict, both real and hypothetical, from ancient times to the far future. These games consist of four main features: a map that represents the batde area, card- board counters or miniature figures that represent the opposing forces, dice and combat-results tables that are used to determine the outcome of battles, and
Karl E. Wiegers, Ph.D., is a research chemist for Eastman Kodak and an A tart hobbyist. He writes for a number of computer publications.
a hefty book of rules. These games can be classified according to several schemes: the scale of combat, the histori- cal period involved, or the type of com- bat simulated (naval, armored, air, etc.)
GAME-DESIGN CONSIDERATIONS
A war-game designer faces a continual struggle between the requirements of realism and playability. For example, a detailed board game of tactical air-to-air combat can involve many minutes of planning and execution by the players, even though a single game-turn might represent only a few seconds of real time. On the other hand, an Atari owner can take joystick in hand and play a real-time simulation of World War II fighter com- bat. The graphics and immediate re- sponse that a computer can provide offer a much better three-dimensional "feel" than is ever possible with a board game.
Air combat games for the Atari in- clude Spitfire Ace, Wingman, and Mig Alley Ace (all MP). The latter two fea- ture split screens in a two-player mode. The biplanes of World War I reappear in Blue Max (S), which features 3-D diagonal scrolling, Flying Ace (MG), and Eagles (SSI). And these games will soon be joined by Fighter Command (SSI), a very advanced reenactment of the Batde of Britain.
Similar features are included in games involving submarine combat, such as Sea
Dragon (AI) and Submarine Comman- der (T). Sea Dragon scrolls through 24 sequendal map screens to provide a vivid representadon of undersea warfare. Sub- marine Commander allows you to evade depth charges and pursue enemy mer- chant ships.
Computerized combat games are more realistic than board games for other reasons as well. Combat units in most war games have a number of basic- strength values that represent capabilities for attack, defense, and overall morale. But board games usually don't account for smaller variations in the performance of a given unit under different sets of cir- cumstances. In contrast, when you play The Batde of Shiloh (SSI) on your Atari, you can assign one of four different levels of risk (for both attack and defense) to each of your units. This greatly broadens the range of potential outcomes in each combat action.
A computer is also an ideal tool for introducing the "fog of war" into a war game. This term refers to the element of uncertainty and randomness that is a constant aspect of real combat and that adds spice and realism to a simulation. In North Ariantic Convoy Raider (MG) and Midway Campaign (MG), the com- puter controls enemy naval units which you must seek out and destroy while avoiding your own destruction. The computer limits the amount of informa-
continued on page 46 iq
44
ANTIC. The ATARI Resource
ATARI AT V/AR
continued from page 44
tion that you're able to obtain about its moves. This provides a high level of sus- pense, as well as an element of variation from game to game. In contrast, the ran- domizing techniques used in board games are relatively primitive: You roll dice to determine search results, invert units on the game board to mask their identities (but not their presence) from your opponent, and sometimes enlist a third person to serve as a referee while you and your antagonist sit in separate rooms.
A computer war-game designer must also take into account the concept of play balance; in other words, each player must have a chance to win the game, or it will soon lose its appeal. As Chris Crawford (the guru of game design at Atari) points out, the illusion of win- nability must be present.
The designers of computer war games have solved this problem by incorporat- ing randomizing techniques into the games and by providing for complex per- formance capabilities on the part of tac- tical units. These elements make for good balance in computer-war simula- tions. In the world of computer war games, the results at Waterloo or Gettys- burg are not inevitable; there is still hope for the underdog. In addition, the differ- ent levels of difficulty offered by such games allow players of different abilities to introduce handicaps, and thus to maintain play balance.
THE PRO'S AND CONS OF THE COMPUTER
Most board games use a combat-results table (CRT) to resolve the vagaries of combat. The CRT shows the probabili- ties of various outcomes when a certain attack strength is matched against a par- ticular defense under given conditions. A roll of the dice then selects one of these possible results. But a computer can pro- vide a much more detailed tabulation of combat results than is possible with the tables used in board games.
In addition, the computational speed of the computer eliminates a great deal of the tedium from the unfolding of a war game. In Eastern Front 1941 (APX), the Atari determines the results of many
individual battles in a matter of seconds. Doing the same calculations by hand could easily involve thirty minutes of examining unit strengths, cross-referenc- ing numbers in tables, and roUing dice. Even with the aid of the computer, war games tend to take much longer to play than either the designers or the players expected. However, use of the computer allows players to store their game and take a temporary leave of absence from the front.
In large board games, it often becomes tedious and time-consuming to monitor the status of your combat units. But many of the computer games mentioned here can instantly provide you with the tables that indicate the current status of your forces. The computer also elimi- nates the shuffling of paper that often plagues board games. In addition, the computer can monitor the supply status of each unit, as in games such as Tigers in the Snow (SSI). This adds dramati- cally to the realism and complexity of the simulation with virtually no sacrifice in playability.
One area in which board games are still far superior to computer war games is the map. Even the most outstanding applications of Atari graphics are hard- pressed to match the detailed and often beautiful maps used in many board games. Most of the maps used in board games feature a hexagonal grid that is superimposed upon the terrain to regu- late movement and combat. Although, in principle, the computer can free you from such arbitrary restrictions, in fact such freedom is not yet found in many games. Even the sophisticated Eastern Front 1941 reverts to a mere modifica- tion of the primitive (by board game standards) use of squares to regulate the positioning of units. Unfortunately, there is only so much detail that can be placed into 48K of memory.
With a board game, it is possible to see all portions of a map (even a large map) at once, and to easily assess the overall situation. This is not possible with the small display area and the resolution offered by a TV screen. One way that game designers alleviate this problem is to create maps that can be scrolled, so that the TV screen is simply a window into a much larger playing area. Superb examples of map scrolling
are found in Eastern Front 1941 and Legionnaire (MG), which matches ten of Caesar's fearsome legions against a computer-controlled army of barbarians.
Another solution is to provide a map and counters along with the computer game, as is done in Tanktics (MG) and Dnieper River Line (MG), two armored- combat games set in World War II.
Computer graphics simply cannot compete with paper and artwork when it comes to stationary displays. On the other hand, computer game maps can be altered simply by switching to a new character set of map symbols. In this way, Eastern Froiit 1941 shows the effects of the changing seasons with vivid visual displays that cannot be duplicated by the hardcopy maps of board games.
PICK A WAR, ANY WAR
Certain subjects are perennial favorites with war gamers, and the selection of games for the Atari reflects that fact. The Russian front in World War II, for example, holds a particular fascination, and games for the Atari are available on several levels: the strategic (Eastern Front 1941), the operational (Dnieper River Line), and the tactical (Tanktics). Another 1941-Russian-front simulation. Panzers East (MG), is due to be released soon.
Armored combat is always popular, as is witnessed by Tanktics, the upcom- ing tactical tank-to-tank World War II game T.A.C. (MG), and Armor Assult (E), which covers hypothetical tank com- bat in the near future. Close Assult (MG) simulates infantry combat in World War II on the tactical level. Another game on this subject. Computer Ambush (SSI), is scheduled for release soon. In this tactical-level game, you'll be able to equip soldiers with weapons and com- bat charcteristics of your own choosing.
A number of other significant World War II battles have captured the interest of computer gamers. These include the North African encounters of Rommel and Montgomery (Knights of the Dessert-SSI), the Battle of the Bulge (Tigers in the Snow), and the gigantic D-Day invasion (Battle for Normandy- SSI).
Dozens of board games can be found on the American Civil War, but only the Battle of Shiloh appears to have been
46
ANTIC, The ATARI Resource
covered so far for the Atari. Both The Battle of Shiloh and Shiloh 1862 (DY) deal with this critical battle in Tennessee. In Shiloh 1862, you direct Union soldiers
and artillery against Confederate forces under General Atari.
An assortment of other wars from mankind's past and future can be re-
ERA^^ TITLE |
PUB. |
SCALE |
TYPE |
|
Ancient |
Legionnaire |
MG |
Operational |
Land |
Napoleonic |
Paris in Danger |
MG |
Strategic/Tactical |
Land |
Napoleonic |
Leipzig 1813 |
DY |
Operational |
Land ; |
Napoleonic |
Waterioo 1815 |
DY |
Operational |
Land |
18th Cent. |
Broadsides |
SSI |
Tactical |
Sea |
Civil War |
The Battle of Shiloh |
SSI |
Operational |
Land |
Civil War |
Shiloh 1862 |
DY |
Operational |
Land |
World War I |
Blue Max |
S |
Tactical |
Air |
Wodd War I |
Flying Ace |
MG |
Tactical |
Air * |
World Wir I |
Eagles |
SSI |
Tactical |
Air |
Worid War II |
Hellcat Ace |
MP |
Tactical |
Air |
World War II |
Spitfire Ace |
MP |
Tactical |
Air |
World War 11 |
Fighter Commander |
SSI |
Strategic |
Air , |
World War II |
Submarine Commander |
T |
Tactical |
Sea |
World War II |
Fathom's 40 |
DS |
Tactical |
Sea |
World Wir II |
North Atlantic Convoy Raider |
MG |
Operational |
Sea |
World War II |
Midway Campaign |
MG |
Operational |
Sea |
World War II |
Tanktics |
MG |
Tactical |
Armor |
World War II |
Dneiper River Line |
MG |
Operational |
Armor |
World War II |
T.A.C. |
MG |
Tactical |
Armor |
World War II |
Eastern Front 1941 |
APX |
Strategic |
Land |
World War II |
Panzers East |
MG |
Strategic |
Land |
Worid War II |
Knights of the Desert |
SSI |
Operational |
Land |
Worid War II |
Tigers in the Snow |
SSI |
Operational |
Land |
Worid War II |
Battle for Normandy |
SSI |
Operational |
Land |
Worid War II |
Close Assault |
MG |
Tactical |
Land |
Worid War II |
Computer Ambush |
SSI |
Tactical |
Land |
1 Worid War II |
Operation Whirlwind |
B |
Tactical |
Land |
Korean War |
MIG Alley Ace |
Ml' |
Tactical |
Air |
Vietnam War |
V.C. |
MG |
Tactical |
Land |
Modern |
Wingman |
MP |
Tactical |
Air ' % |
Hypothetical |
B-1 Nuclear Bomber |
MG |
Strategic |
Air |
Hypothetical |
COMMBAT |
AI |
Tactical |
Armor |
Hypothetical |
Sea Dragon |
AI |
Tacrical |
Sea |
Hypothetical |
Armor Assault |
E |
Tactical |
Armor |
Hypothetical |
War |
AI |
Operational |
Air/Land |
Hypothetical |
Nuke war |
MG |
Strategic |
All |
Hypothetical |
NATO Commander |
MP |
Strategic |
Land |
\ Hypothetical |
Germany 1985 |
SSI |
Strategic |
Land |
^ Game publishers shown by their initials are |
||||
AI =Ad |
venture Internadonal |
MG =] |
Vlicrocomputer G |
ames |
m
APX = Atari Program Exchange MP
B = Broderbund Software S
DS =Datasoft SSI
•Y =Dynacorap T = Epyx
= MicroProse Software = Synapse Software = Strategic Simulations, Inc. = Thorn E.M.I.
fought or foreshadowed on your Atari. Legionnaire, for example, brings the campaigns of Caesar to your home com- puter. The Napoleonic wars are always popular; among the offerings in this genre are Paris in Danger (MG), Leipzig 1813 (DY) and 'Waterloo 1815 (DY). The upcoming Broadsides (SSI) is a game of naval combat from the Age of Sail; it features both arcade-style action and authentic simulations that allow you to make the kind of decisions that real sea captains once made. The Vietnam War is reenacted in V.C. (MG). You com- mand air cavalry and field artillery units in a tactical simulation of the controver- sial war that so intimately engaged friend and foe, soldier and civilian.
HYPOTHETICAL WAR
In addition to simulations of real wars, there are always hypothetical scenarios to consider, as if there hasn't been enough real conflict in human history to simulate. You're able to anticipate the outcome of a' collision of the super- powers in Germany 1985 (SSI). Simi- larly, NATO Commander (MP) is a real- time strategic simulation of a hypo- thetical Warsaw Pact invasion of Western Europe.
I mentioned earlier that the category of adventure games also includes science fiction and fantasy games. Several near- future hypothetical scenarios, such as the strategic-level game Nukewar (MG), bridge the gap between the recreation of past conflicts and the realm of pure conjecture.
CONCLUSION
As you can see, adapting detailed con- flict-simulation games to a microcom- puter is not easy. Many problems involv- ing realism and playability must be resolved. Even so, a widening variety of these games is available for the Atari. The coinputer can greatly increase ease of play in such games by handling monotonous details, but even Atari graphics pale in comparison with those of a well-executed board game. Real- time simulations and 3-D games, espe- cially those involving air and sea com- bat, are often much more fun on the computer, though. In fact, I think I'll go shot down some Zeroes now! Where's my flack jacket? Q
February 1984
47
Autoboot with a ghost at the keyboard
%
P|icture the following. Seated at 'your Atari computer, you insert the BASIC cartridge and turn the system on. The normal sequence of events ensues, whereupon the familiar prompt "READY" appears on the screen. Suddenly, you hear the keyboard clicking, as if invisible fingers were press- ing the keys, and the words "OR NOT, HERE I COME!" appear. More cHck- ing follows, and you see direct-mode commands to BASIC being typed in and immediately executed. You may even find that your disk drive or cassette machine has been activated to LOAD or RUN files! Is it a ghost? No, it's just Fast Fingers (FF), a revolutionary new con- cept in autoboot programs for the Atari.
ABOUT AUTOBOOT PROGRAMS
An autoboot program is one that is auto- matically executed when the computer is powered on. If you use DOS 2. OS in a disk-based system, you're probably aware that DOS looks for a program named AUTORUN.SYS upon booting. If AUTORUN.SYS exists on the disk, DOS will attempt to load and run it as a machine-language program before transferring control to a cartridge or loading DURSYS. If your system is cassette-based, you may have run auto- boot programs by pressing and holding [START] as you turn on the computer. The most common type of AUTO- RUN.SYS program, available as a one- sector file on the DOS 2. OS Master Disk, loads the RS-232 handler from the 850
February 1984
by CRAIG CHAMBERLAIN
interface if it's turned on. Another com- mon type executes a line of BASIC com- mands by taking temporary control of the screen editor. Fast Fingers works by taking control of the keyboard instead, and lets you preprogram an entire se- quence of keyboard entries (including cursor and screen editor controls and the [RETURN] key) to be executed as the autoboot file. The autoboot file can be executed with any language, including PILOT and the Assembler Editor car- tridge, or even in MEMO R\D mode!
HOW TO USE FAST FINGERS
Type in the Fast Fingers listing below very carefully. Use TYPO to check for typing accuracy, and SAVE a copy and put it away for safekeeping before you RUN the program.
Now RUN it. The first prompt re- quests that you enter an input-device specification. For now, enter K for key- board (a colon isn't necessary since there is no filename in this case). Next, the screen clears and the READY prompt appears. Don't be fooled — the program is still running. At this point, every key- stroke that produces a legal ATASCII character is being recorded.
If you are using cassette, type CLOAD [RETURN] [RETURN] RUN [RE- TURN] . I f you're using disk, type RUN "D:GAME [RETURN]. (Don't type a period after [RETURN], though.) You may replace GAME with the name of any BASIC tokenized file you wish to run.
Now both cassette and disk users should hold down [CTRL] and press [3]. This generates an end-of-file code, and terminates your input. A message is now printed that tells you how many key- strokes were recorded.
The next prompt asks whether you're using cassette or disk. Respond with C or D. If you're using disk, make sure the disk to which AUTORUN.SYS is to be written is in the drive. Next, both cassette and disk users should press [RETURN].
One of FF's special features is that it lets disk users append their AUTORUN. SYS file to one that already exists (e.g., the standard type that loads the RS-232 handler). If an AUTORUN.SYS file is present on the disk when you press [RETURN] (after the most-recently- described prompt), you'll see the prompt "APPEND?" Responding to this with Y appends your file to the end of the pre- viously existing one. A possible appli- cation for this is loading the RS-232 handler and then automatically loading and running a terminal program. You could even have FF set your terminal con- figuration and dial a number for you!
The next two prompts ask for the load and patch addresses. Press [RETURN] for now to use the default parameters. These will be discussed more fully later in this article.
The last prompt asks for a speed value between one and nine. The fastest speed. One, means that keystrokes will be typed in at a maximum rate of sixty per second at boot time. Speed Nine types one key
continued on next page
49
every four seconds. Press [RETURN] for the default speed of Three.
After you press [RETURN] for the speed prompt, the program will write the boot file. Cassette users should make sure that you've depressed the RECORD and PLAY buttons on your recorder; when the computer beeps twice, press [RETURN]. When this is finished, the "real" READY prompt appears. At this point, cassette users should CSAVE a BASIC program without changing the tape's position. Disk users should make sure that your disk contains the game program and DOS files.
BOOTING - CASSETTE USERS
Turn everything off, including the 850 interface. Insert the cartridge into the computer. Then insert the cassette, re- wind it and press the PLAY button. Next, hold down [START] and turn on the computer simultaneously. You can release the key when you hear the beep. Now press [RETURN]. The autoboot program will load and execute, where- upon the following sequence should occur (if you followed the example and typed in CLOAD and RUN previously):
1. The command CLOAD will appear on the screen as if it were being typed in on the keyboard. Accompanying key- clicks will sound, and [RETURN] will be pressed.
2. The computer will beep, [RE- TURN] will be pressed again and the BASIC program will load.
3. After the program is loaded, the command RUN will appear, [RE- TURN] will be pressed and the program will start.
BOOTING - DISK USERS
The disk booting procedure is quite simple. DOS, when loaded, loads and executes AUTORUN.SYS, which takes over the keyboard and runs your pro- gram with the command previously given, RUN"D:GAME.
APPLICATIONS
One interesting experiment is to have Fast Fingers type in a program for you, then RUN it and respond to prompts. When in record mode, type in a short program that requests user input, then
type RUN, and then type a response for the programmed input. Note that, when in record mode, immediate-mode BASIC commands do not take effect. While you're typing in the program, try using cursor controls to change a line after it's been entered. When the autoboot pro- gram executes, you'll see your program being entered, edited, RUN, and re- sponded to, as if by a ghost!
If you've written a menu-oriented pro- gram that requires keyboard input, FF provides an ideal auto-demonstration mode for showing someone how the pro- gram works. Fast Fingers can provide an entire sequence of keystrokes that demonstrate the program's various fea- tures, and the original program need not be modified at all.
Librarians for user's groups will find this next application to be very useful. By creating an autoboot file that consists of pairs of commands, such as LOAD "D:filename [RETURN] and CSAVE [RETURN] [RETURN], you can trans- fer groups of disk files to cassette auto- matically, while leaving the computer unattended!
ALTERNATE INPUT DEVICE
At the first prompt (for input-device specification), you may supply the name of an alternate input device, such as C or D:filename. This allows you to pre- pare and save a text file for use with Fast Fingers beforehand. If you supply an alternate specification. Fast Fingers will load the file and display it on the screen.
LOAD AND PATCH ADDRESSES
The default load address for cassette systems is 1792 (decimal); for disk systems it is 13312. The initialization code that installs the patch (57 bytes), the patch itself (56 bytes), and the key- stroke data (one byte per keystroke) are loaded at this address. Thus, the number of contiguous free bytes needed to load the program is 113 plus the keystroke count. If, for example, you're using cas- sette and your application requires the RS-232 handler, which loads at 1792 (decimal), you must specify a higher load address such as 4000 (decimal).
The "patch address" is the address at which the FF machine-code routine (the
patch) and the keystroke data are stored. The default value is 1536 (decimal), which is the start of Page 6, an area of memory that is usually free for program- mer's user. If your program uses Page 6, or your keystroke count exceeds 200, you must locate a patch elsewhere. One possible location would be above a lowered RAMTOR
HOW IT WORKS
Every sixtieth of a second (or one "jiffy"), after the monitor has finished drawing one frame, the Atari Operating System (OS) generates a Vertical Blank Inter- rupt. This period of time is very short by human standards, but it's long enough for the computer to take care of a number of important housekeeping operations. One such task is to check the keyboard for a keypress. Whenever a key is pressed, the corresponding hardware keycode of that key is stored in location 764 (decimal). When the OS is asked to input a character from the keyboard, it gets the keycode from location 764, con- verts it to an ATASCII character, and sets location 764 to 255, which means that the key has been read. FF also monitors location 764 during the vertical blank. If it finds a 255, it gets the keycode for the next character from its data buffer and places it in location 764. This makes the OS think that a key has been pressed. FF continues to do this until the data buffer is empty, whereupon control is passed to BASIC or the current application.
LIMITATIONS OF FAST FINGERS
FF will work only with legal ATASCII characters. Therefore, the following key- strokes should not be used: [CTRL]-[1], [CTRL]-[3] through [CTRL]-[0], [CTRL]-[?], [CAPS/LOWR], the inverse key, all keys with both [SHIFT] and [CTRL] pressed, and the [SHIFT] and [CTRL] keys pressed alone.
FF supports lower case by automati- cally generating a keycode for the [CAPS/LOWR] key the first time a lower- case letter is used. It will remain in the lower-case mode until it reaches the end of the keycode data. Upper case will still work, though, because the keycodes im- ply that [SHIFT] is being pressed.
Inverse video is also supported, but it
50
ANTIC, The ATARI Resource
creates a minor problem. When input data alternates between inverse and nor- mal characters, FF generates a keycode for the inverse key. But if the switch be- tween normal and inverse video occurs at the beginning of a line in BASIC, the character after this keycode occasionally goes undetected by the system at boot time (when higher speeds for keypresses are used). I haven't been able to discover the reason for this. Possible solutions are to press the inverse key before pressing [RETURN] on the previous line, to make the first inverse character optional (such as a space), or to use a slower speed.
FF can call the MEMO PAD (the com- mand is BYE), but cannot return to BASIC by itself. It can also call DUP (the command is DOS), but it will be de- Requires 16K RAM
activated when it returns to BASIC.
When entering text from the keyboard in Fast Fingers, you need press [ESCAPE] only once to invoke that character, rather than two times as is usually the case. To make FF produce only one [ESC] keystroke, remove the following two statements from line 310 of the program:
B$(L) = CHR$(28):L = L-Fl
If you want to use the end-of-file key- code ([CTRL]-[3]) in your data file, change the Q = 160 in line 350 to Q = 154 and press [CTRL]-[,] when the EOF keycode is desired.
FF cannot simulate a press of the [BREAK] key.
While the autoboot program created by FF is running, the keyboard is dis-
abled to prevent a conflict with the keycodes coming from FF. You can change this with POKEs to locations 16 (POKMSK) and 53774 (IRQEN). POKE both with 64 to enable the keys, 128 to enable [BREAK], 192 to enable both, and 0 to disable both. The key- board is automatically re-enabled when FF runs out of keystroke data.
SUMMARY
Your imagination is the only limit to Fast Finger's possibilities. Given FF's prac- tically automatic implementation, it's an easy matter to make your computer exe- cute any command sequence, run pro- grams, or simply perform acrobatics with the cursor. Turning on your com- puter was never so much fun!
95 REM ***** FAST FINGERS *****
96 REM * BY CRAIG CHAMBERLAIN *
97 REM * ANTIC MAGAZINE
98 REM * FEBUARY, 1984
99 REM ************************
100 ? CHR$(125):? 'FAST FINGERS BOOT F ILE MAKER':? "by Craig Chamberlain 8/1
/8 3" ; ?
110 DIM M(112) ,A(70) ,F$(16) : FOR K = 0 TO
112:READ P : M ( K ) = P : N E XT K:FOR K=1 TO 7 0: READ P: A(K)=P: NEXT K
120 DIM B$(FRE(0)-250) :L = 1 :SHIFT = 64:CT RL=1 28 :MODE=0 : LC=0 200 ? "PLEASE ENTER INPUT DEVICE SPEC"
INPUT F$:IF F$="" THEN 200 210 ? CHR$(125):? "READY" :TRAP 700:OPE N #1 ,4, 0, F$ :TRAP 460 300 GET #1 , P : ? CHR$( P) ;
310 IF P = 27 THEN B $ ( L ) =C H R $ ( 2 8 ) : L = L-H : Q=28 : GOTO 450
315 IF P>27 AND P<32 THEN Q=A(P+28):G0 TO 450
320 IF P>124 AND P<128 THEN O=A(P-60): GOTO 450
325 IF P>154 AND P<160 THEN Q=A(P-95): GOTO 450
330 IF P>252 THEN Q = A ( P- 1 8 5 ) : G 0 T 0 450 340 INV=0:IF P>127 THEN P=P- 1 2 8 : I N V= 1 345 IF INVoMODE THEN MO D E= 1 -MO D E : B $ ( L )=CHR$ ( 39 ) : L = L-H
350 IF P=0 THEN 0=1 60: GOTO 450 355 IF P<27 THEN Q = C T R L-h A ( P ) : G 0 T 0 450 360 IF P=32 THEN 0=33:GOTO 450 365 IF P<40 THEN 0 = S H I F T + A ( P-5 ) : G 0 T 0 4
5 0
370 IF P = 40 THEN 0 = S H I F T-n A ( 3 6 ) : G 0 T 0 45
0
375 IF P = 41 THEN Q = S H I F T + A ( 2 7 ) : G 0 T 0 45
0
380 IF P<48 THEN Q = A ( P-5 ) : G OT 0 450
385 IF P<58 THEN Q = A ( P-2 1 ) : G OT 0 450 390 IF P<65 THEN 0 = A ( P- 1 5 ) : G 0 T 0 450 395 IF P<91 THEN 0=S H I F T+ A ( P-6 4 ) : G OT 0
45 0
400 IF P<97 THEN 0 = A ( P-4 1 ) : G 0 T 0 450
405 IF P=123 THEN Q=130:GOTO 450
410 IF P = 1 24 THEN 0 = 79 : GOTO 450
415 IF LC = 0 THEN L C= 1 : B $ ( L ) =C H R $ ( 6 0 ) : L
= 1 + 1
420 0=A( P-96)
450 B$(L)=CHR$(0):L=L+1:GOTO 300
46 0 IF PEEK( 195)0136 THEN 7 00
470 B$(L)=CHR$(255) : CLOSE #1:P0KE 694, 0:POKE 702,64:?
480 ? "TOTAL: ";L;" K E Y S T R 0 K E S" : I F L>2 00 THEN ? "WARNING: TOO BIG FOR PAGE S
IX"
500 ? :? "CASSETTE OR DISK";:INPUT F$;
P=ASC(F$):IF P<67 OR P>68 OR F$="" THE
N 500
510 C = 1 1* ( P = B7) : LA = 13312: IF C THEN LA =
1792: GOTO 520
512 WM=8:0PEN #1 , 6 , 0 , " D : A U T 0 R U N . S Y S" : I
NPUT #1;F$:CL0SE #1:IF F$(2,2)<>" " TH
EN 520
514 ? "APPEND" ;: INPUT F$:IF F$ = "" THEN
? "NO" : GOTO 520 516 WM=8+(F$(1 , 1 )="Y" ) : IF F$(1,1)<>"Y"
AND F$( 1 , 1 )<>"N" THEN 514 520 ? "LOAD ADDRESS (";LA;") ";:TRAP 5 30: INPUT LA 530 PA=1536:? "PATCH ADDRESS (";PA;")
; :TRAP 540: INPUT PA 54 0 1 = 3 : ? "SPEED 1-9 (" ; I ;" ) " ; :TRAP 5 50:INPUT I:IF I<1 OR I>9 OR I<>INT(I) THEN 540 550 P=1:F0R K=1 TO I:P=P*2:NEXT K:M(60
)=P/2-1
continued on next pase
February 1984
51
560 GOS OSU 570 3:G T(P 600 NT( 610 1 ,2 620 56 ) 630 ,IN 640 PUT EAD 650 ? # 660 #1 690 700 R : 710
)=I 800
0,1 142 801
? :L UB 71 B 710
GOSU GSUB A/256
LA = L LA/25
OPEN 55: PU
EA = L : PUT
OPEN T((L +
PUT
#1 ,1
P : PU
FOR 1 ; B$ ;
PUT , 2 : PU
CLOS
? "E END
READ NT( A/
DATA 62, 55 ,252,
DATA
A = LA 0: A = : A = L B 71 710:
) :M( A-C: 6):T
#1, T #1 A + 1 1 #1 , I
#1, 250) #1 ,P NT(( T #1 K = 0 : IF #1 ,2 T #1 E #1 RROR
+ C : A LA + 1 A + 29 0: A = A = PA 51) = LO = L RAP WM, 0 , 255 2 + L : NT( E 8,12 /128 A + 55 PA + 5 ,P:N TO 1 C TH 26 : P ,L0: : TRA ■ ; P
= LA + 5 13:G0 : GOSU PA + 56 + 14 : G PA-25 A-256 700:1 , " D : A : PUT PUT # A/256 8,'C: ) : PUT -256* 5)/25 EXT K 1 2 : PU EN 69 UT #1 PUT # P 400 EEK( 1
7 : GOSUB SUB 710: B 71 0 : A = :GOSUB 7 OSUB 71 0 6*INT(PA *INT(LA/ F C THEN UTORUN.S #1 , LO : PU 1 , EA-256 ) : GOTO 6 " : PUT #1 #1 ,L0: P INT( (PA+ 6) : FOR K
710: A = PA :
A = PA + 56 : G
LA + 32
1 0 : A = PA + 1
:M(49)=IN
/256)
256) : HI=I
630 YS" : PUT # T #1 ,HI *INT( EA/2 50
,0: PUT #1 UT #1 ,HI 55)/256) : = 1 TO 5: R
T #1 ,M(K) : NEXT K : 1,227: PUT
,2: PUT # 1 ,HI
00:CLR : 95) : TRAP
END 40000: CL
I :M( I )=A-256* 256) : RETURN
165,16,41,63, ,189,57,6,157, 2,232,142, 255 ,
113,6,232,208
INT(A/256) :M(I + 1
133,16,141,14,21 57,6,202,16,247, 2,189,113,6,157 ,6,238,29,6,238,
WE NEED ORIGINAL IDEA COMPUTER GAME
MASTERS READY FOR MARKETING AND
WORLD-WIDE DISTRIBUTION.
• LARGE ADVANCE MONIES PAID!
• TOP ROYALTIES PAID!
• TOP PROMOTION - TOP DISTRIBUTION!
Send Sample Product to: COMPUTER PRODUCT DEVELOPMENT CORP P.O. BOX 1111, CHATSWORTH, CA 91311
32,6,201 ,255,20 8,237,169,7, 16 2,6, 160,5 7, 32, 92, 228, 24, 96, 165, 20, 41, 1,208, 46
802 DATA 174,252,2,232,208,40,174,113, 6,238,70,6,208,3,238,71 ,6, 142,252,2,23 2,208,23,169,64,141 ,190,2, 165,16,9
803 DATA 192,133,16,141,14,210,169,7,1 6 2,228,160,98,32,92,228,76,98,228,96
810 DATA 63,21,18,58,42,56,61,57,13,1, 5,0,3 7,3 5,8, 10,4 7,4 0,6 2,4 5,11 , 16,4 6,2 2 ,43,23,50,31 ,30,26,24,29,27,51 ,53
811 DATA 48,7,6,32,14,34,38,66,2,54,15 ,55,102,117,96,70,98,71,78,162,142,143 ,134, 135,12,116,119,172, 108, 118,52
812 DATA 44,158,180,183
820 DATA 12,15,28,31,37,40,70,73,78 830 DATA 169,60,141,2,211
TYPO TABLE
Va
riable check Line n urn r a 95 - 21 300 - 36
sum n g e
365 450 51 6 570 640 801 81 2
42 51 56 63 80 81 83
34241 Code LA OH YT ZQ PO GW XF 6K GV
Length 565 509 493 51 8 505 529 553 500 74
BUFFERED- 4K RAM buffer.
COMPATIBLE-With all ATARI computers and all software.
STANDALONE- Needs no 850 ' Interface and no modifications to your computer. PROGRAMMABLE- Allows customization such as special character sets — now with customizer diskette.
EASY-TO-USE- Connect it to the serial bus and a Centronics compatible printer -and PRINT!
ONLY $169.95!
INTERFAST-I is
p trademark of Advanced tnierfacp Devices. Inc.
^Hl IS a reg'stered trademark of Ata ■I 850 InleHace filodule n
I ADVAWCED INTERFACE DEVrCES I
P. O. Box 2188 Melbourne, Fl. 32902 (305) 676-1275
□
INTERFAST-r
The Printer Interface for Your ATARI *
52
ANTIC, The ATARI Resource
''^'#^fe^itft^^?j?fc^
f^-
p
lemember that tire you kicked...?
It certainly remembers, and it s not ^actly happy about it. And your steam iron? It's sick of being tied up. The way you wrap that cord tightly around it and -Aen shove it in the closet. They're mad. Kshting mad. And they're organizing for ;: the attack in Megamania for Atari home computers and the 5200.
Faster and faster they come, and from everchanging directions. You've got to shoot to stay alive.
They've organized those ice cream sandwiches you left in the back of the freezer, the dice you said were bad luck. Your peaceful home is a hotbed of discontent. And telling the tire you're sorry isn't going to help.
Designed by Steve Cartwright, adapted by Glyn Anderson. ' Megamania "" for Atari Home Computers and the »^ 5200: '
Atari" andSZO" Atari, I no
^ ' \^
^ ^
jBjita ,.
glcliVisioK
We put you in the game.
PETONE^BO
Simulate string arrays Inmari BASIC
by JERRY WHITE
Many ANTIC readers have asked how to simulate a string array un Atari BASIC. This program, called TELEPHON, will serve as a tutorial on string arrays and string manipulation. But for those of you who just want to type in and use this handy little program, I'll begin with some instructions.
PROGRAM INSTRUCTIONS
TELEPHON will run on any Atari com- puter with BASIC installed. Either a cassette recorder or disk drive is re- quired. A printer is optional.
The program begins by asking where your data will be stored. Type [C] for cas- sette or [D] for disk. TELEPHON uses INPUT commands and does not have a sophisticated keyboard handler. Be sure to respond using only normal (not inverse), uppercase characters, and press the [RETURN] key after each entry.
A menu of choices will appear on the
Jerry White is a Contributing Editor to ANTIC. His programs are available from several software companies, notably Adventure International and Educational Software.
screen. A display near the top of the screen shows the number of records currently in memory and the number of records available. A record consists of a name and a telephone number. The in- formation in each record is broken up into five "fields," as shown in Table L Also shown are the corresponding vari- able names and lengths for each field.
P Table 1 ^ |
— i |
|
FIELD |
SIRING |
MAXLEN |
Last name |
LASTS |
12 |
First name |
FIRSTS |
12 , |
Area code |
AREAS |
3 1 |
Exchange |
EXCHS |
3 |
Number |
PNUMS a |
wma^^ |
We do not yet have a data file, so we begin with Menu Choice 1, which directs the program to enter new data. This is also the choice to use whenever you add records. After you have created and saved a TELEPHON data file by writing it onto tape or disk, you will begin each session by using Menu Choice 2 to load your data into memory.
You will then be prompted to enter data into the fields described above. After the five items have been entered, the program will return to the menu
screen. Notice that the display near the top of the screen now indicates that one record is in memory and that one fewer record is available. Enter a few more records using Menu Choice 1, but not too many. We want to make sure that your program is working perfectly before you type in your whole telephone book.
After entering a few records, save your data by using Choice 3 on the menu. A message will appear on the screen that tells you to press the [START] key when your input/output device is ready. Cas- sette users should insert a blank tape, re- wind it to the beginning, and then press the [PLAY] and [RECORD] buttons simultaneously. Disk users must make sure that a diskette with an ample number of free sectors is ready in Drive L Our program will use the disk file- name "TELEPHON.DAT", but you can choose your own filename. When the [START] key is pressed, cassette users will hear the familiar series of beeps. Press [RETURN] to begin the process of writing your data onto tape.
Whenever you load data using Menu Choice 2, any records in memory will be lost. Be sure that you always use this choice first.
If you make an error while entering data. Choice 4 allows you to correct it.
54
ANTIC, The ATARI Resource
The program will ask for the "last name" of the record to be altered, and will search through each record until a match is found. Upon finding a match, the pro- gram displays an entire record. If this is the record to be altered, respond with [Y]; if not, respond with [N]. If you type [N], the search will continue. If you type [Y], you may then reenter the data cor- rectly. This procedure can also be used to update your files when your friends change their telephone numbers.
Menu Choice 5 tells the program to sort your data by last name. This makes it easier to find a specific record when you print your data using Menu Choice 6. Those of you with printers will find this program particularly useful. You will be asked to type [S] to display your telephone directory on the screen, or [P] to include a listing to your printer. The listing can replace your old personal tele- phone book.
To freeze the display while using Choice 6, press the [CTRL] and [1] keys. Repeat this procedure to continue.
Menu Choice 7 ends the program and returns control to the BASIC cartridge. TELEPHON was written entirely in Atari BASIC. The [SYSTEM RESET] and [BREAK] keys function normally when it is in use. If you accidentally press the [BREAK] key, you can return to the menu screen by entering the following command in immediate mode:
GOTO MENU
If you'd like to disable the [BREAK] key, add the following line to the program:
14001 POKE 16,64:POKE 53774,112
A WORD OF WARNING
Before we move on to the string array tutorial and some of the more technical information, there is one important point that you should understand. TELEPHON dimensions a string called ARRAYS according to the current amount of free memory in your Atari. This will leave very little RAM available for additional lines of code. If you [BREAK] into the program to add code, you should first issue a CLR command in immediate mode. This will make all of the string area available again, but it will also erase any data you have in memory. Therefore, you should always
SAVE your data, and the program itself, before making any changes to the program.
SIMULATING STRING ARRAYS
Atari BASIC is often derided by people who are familiar with Microsoft BASIC because it doesn't offer string arrays, although it does feature virtually un- limited string length and numeric arrays. BASIC XL, from Optimized Systems Software, offers both forms of string handling. But if you have only Atari BASIC, don't despair. String arrays can be simulated, and the TELEPHON pro- gram is a good example of this.
HOW TELEPHON WORKS
TELEPHON uses 34 characters for each record. The first 12 positions are assigned to the last name, and unused positions are padded with blanks. Posi- tions 13 through 24 are used for the first name, 25 through 27 for the area code, 28 through 30 for the exchange, and 31 through 34 for the remaining four digits of the telephone number.
Our data is stored in the string called ARRAYS. ARRAY${1,34) contains our first record, and is the equivalent of the first element in a Microsoft array. The equivalent of array element number two would be ARRAY${35,68). To find the tenth element (record) in Atari BASIC, we can simply set a variable that is equal to our record length multiplied by 10, and then print the record using the following routine:
STRPOS=10''-34: ?ARRAYS(STRPOS,STRPOS + 33)
MEMORY-SAVING TECHNIQUES
Our data and the TELEPHON program must share the computer's memory, so I've kept the program as small as pos- sible. If the program used all available RAM, there would be no room for data. As written, TELEPHON can store over 800 records of data on a 48K machine. If you delete the REM statements, you can salvage enough memory for about a dozen additional records.
One of the other memory-saving tech-
niques I used in TELEPHON was to use the variable O instead of the number 0 and the variable I instead of the number 1. Six bytes of RAM are saved each time that a numeric variable replaces a number. These variables and their numeric values look similar, so they don't detract very much from program readability.
By studying this program carefully, you can learn how to manipulate strings in Atari BASIC. Table 2 provides a list- ing of previously undefined key variables and strings, along with brief definitions. This will help you understand the pro- gram's logic.
Do you have any other questions on Atari BASIC? Would you like to see other programs like this one in future issues of ANTIC? Please send your questions and comments to Jerry White in care of ANTIC Magazine.
Table 2
VAR/STRS
ARRAY
BLANKS CHOICE
CHOICES
CLEAR
DEVS
DING
INLEN
MENU
PAPER REC$
DEFINITION
Maximum number of records ^
Stores 34 spaces^U Numeric value of ' chosen option ^i^ String value of ^H keyboard response Clear-screen routine (line 14000) Stores C: or D: TELEPHON.DAT Sound routine (line 17000) Length of keyboard input
Menu routine (line 12030) Printer flag Temporary record storage
I
RECLEN |
Record length of 34 |
RLMl |
Record length |
minus 1 |
|
SI'RPOS |
String position |
TABLEN |
RAM location 201 |
(tab length) |
|
TOTAL |
Current total of i |
records in memory ■ |
|
WORKS |
Temporary storage |
.mm |
used by sort |
continued on page 57
55
February 1984
CfflTection
S^ sinqde.
New Spell Perfect™ from UK does what your second grade teacher wanted to do, It corrects your spelling. Used with Letter Perfect it checks your work against an expandable dictionary Gives "sounds like" suggest ions. Counts words. Add words. Technical terms. States and towns,
You can do it all, all-in-one dictionary
When it comes to practical software for Ataris, Apples and look alikes, Spell Perfect is simple to learn. And hard to beat. Ask your dealer for a demonstration, or write UK for M more information.
LJK, INC, • 7852 Big Bend Blvd,, St, Louis, MO 63119 • (314) 962-1855
<c) UK Inc. 1983
PHONE BOOK continued from page 55
1
2
3
4
10
00
10
10
10
10
AL
10
7
RE 10 RA 10 AR LM 10 10 10 20 20 20 20 UR 20 20 CO 20 TR 2 30 30 30 30 ■ ?
REM
REM
REM
REM
0 R
30
00
10
20
30
: IF
40
II II
CLE
50
Y$(
60
RAY
1,L
70
80
90
00
10
20
30
16 40 50 RD 60 POS 050 00 10 20 30
Requires 16K RAM, 48K recommended * TELEPHONE DIRECTORY *
BY JERRY WHITE
ANTIC MAGAZINE
FEBUARY, 1984 ECLEN=34:I=1:RLM1=RECLEN-I:G0T0 1
REM REM REM GOSU V<2 V = IN ;:F0 N:LV IF A LV-R WORK $(ST
V)
ARRA
NEXT
GOSU
REM
REM
REM
GOSU
SORT ROUTINE
B CLEAR:? :? "S 0 R T I NO" ; : V = T G T
THEN GOTO MENU T(V/3)+I:F0R ME=I TO TOTAL-V: R L=ME TO I STEP -V:STRPOS=L* =(L+V) *RECLEN
RRAY$(STRP0S-RLM1,STRP0S)<=AR LM1 , LV) THEN POP :GOTQ 1 080 $=ARRAY$(STRP0S-RLM1,STRP0S): RP0S-RLM1,STRP0S)=ARRAY$(LV-R
Y$(LV-RLM1 ,LV)=WORK$ ME:IF V>I THEN 1040 B DING:GOTO MENU
READ DATA ROUTINE
NEXT L
B CLEAR:?
'READ DATA
GOS
CLOSE #I:OPEN #1 , 4 . 0 , 0 E V $ : T OT A L = 0 INPUT #I,REC$:TOTAL=TOTAL+I:? "RE #";TOTAL
STRP0S=T0TAL*RECLEN-RLM1:ARRAY$(S ,STRP0S+RLM1 )=REC$:? REC$:? :GOTO
WRITE DATA ROUTINE
"I
REM REM REM
GOSUB CLEAR:IF NOT TOTAL THEN ? HAVE NO DATA TO WRITE":GOTO 1501
3040 3050 3060 3070 (STR 3080 3100 4000 4010 4020 4030 4040 0 DA 4050 ;:IN 4060 EN 4 4070 4080 N-RL 4090
? :? "WRITE DATA:":GOSUB 16000
CLOSE #1 :OPEN #1,8,0, DEV$
FOR ME=I TO TOTAL:? "RECORD #";ME
STRP0S=ME*RECLEN-RLM1:REC$=ARRAY$ P0S,STRPOS + RLM1 )
? REC$:? #1 ;REC$:NEXT ME
CLOSE #I:GOTO 15000
REM
REM fiiaiaiMiuftMiiiimBiia
REM
GOSUB CLEAR:? :? "ALTER DATA:"
IF NOT TOTAL THEN ? :? "I HAVE N TA TO ALTER ":GOTO 15000
? :? "ENTER LAST NAME FOR SEARCH" PUT LAST$
IMLEN=LEN(LAST$) :IF NOT INLEN TH 050
? :? "SEARCHING";
FOR ME=I TO TOTAL :STRPOS=ME*RECLE Ml : ? ".";
IF LAST$=ARRAY$(STRPOS,STRPOS+INL
continued on next page
Prints your Atari"' Graptiics Screens iike you've never seen tiefore! Even prints GlIA mode 9 with 16 shades. Prints various sizes trom Vsth page to GIANT Wall Sizco Posters. Allows you to enlarge and print any ponion ot ttie screen. Worl<s with standard paper and Epson, NEC, CITOL or Gemini printers. Prints vertically or hor- izontally Special feature lets you niodily pictures on the screen. Accepts Graphics toaster, lylicropainter or your own screens. Only $20.95
FREE: Wilh any MiigniprinI order - PRINTAt,L. Allows you lo prim your programs or files iust as liic^' Mar on Hie screen. Clearlypnnlsallgrapl'^^
^canalgzer
I AT LAST A UTILI fY THAT DOES IT ALL, Scans & Analyses ALL Atari® prcpr,! r. - I Works on programs stored on: Disk, Cartridge or directly from memory • Con- I verls complex machine language into readable assembler • Transforms ANY I Atari '' BASIC program into listable, modifyable BASIC • Ciianges a 4, 8 or idK I cartridge into a binary load file and source file that you can view & change us!ni; I regular Atari-' assembler. Clearly shows protection techniques such as: ii-' i' I SECTORS, BAD DATA MAflKS, DUPLICATE SECTORS and FORCED ("IC I ERRORS, Even finds and displays hidden direclories. No other prqqram ciin I do all this! $29.95
I ( i'[ri-)lelR wilh inslfuclions in theory and use. Written with the help of George Morrison, aur-- ol ■ Sntiware Proleclton Techniques," and a leading authority on sohwafG!;'
I Customizes your Atari " to transform it into one of the most powerful program I development tools ever • Allows /ou to alter functions of your keyboard to fit I your personal needs • Allows you to give multiple commands that will execute i aulomalically on systems start up or whenever you wish • Makes the com- I puter seem to program itself • Can generate common program lines or state- f ments from a single keystroke, greatly reducing typing time. Imagine hitting f one key (or combination ol keys) to generate any statement ol your choice I instantly on the screen! • Lets cursor move 50% faster • Works perfectly with iBasicAssembler.Ptlol, or all by itself. This 100% machine language program I was developed by a large scale systems programmer for his own use, but is I now available to everyone • Increases programming efficiency by 70% I Reduces keying errors • Easy enough for a beginner. $16. T'
Btynffppcypn'imiTilllNltHltlllKmililililllllllllllllll/lllllllllllilllllillliy^
I Send Check Ot money order 10 ALPHA SYSTEMS u[ibS3 00 siiippmg & nanoiinq 4435 Maplepark Road
Ke.i«s,il.aaflV/,%s.les.,i< g^j,,^^ p„ 44224. J
216-374-7469 —
Call to charge to MasterCard or VISA,
All roryoul Alan' Compulers OiSk 0fiueant!48K:equifiJ(l Alriif IS S IfiiUfimark orw.irrer ConimjriiciUDn;
Top Selling Book (over too pages) ■■ATARI' SOFTWARE PROTECTION TECHNIQUES" Explains tiow to protect software against copyii Complete witti disk of protection programs
$18.95
lYSTEMS
BONUS: Order any 3 programs & get FREE, Deluxe Space Games (3 games on a t
A
OuinTech
A
graphics
dynamic computer art is here! express your artistic talent immediately with
VISUAL SYNTHESIZER 34.95 DISK
•menu driven • multi-window graphics • interactive function keys
• save visual productions on disk
• thousands of geometric variations possible
• machine language algorithm for enhanced speed
ALSO AVAILABLE:
VISUAL MOODS I, II, or III 19.95 EACH DISK
five complete VISUAL SYNTHESIZER productions with interactive function keys on each disk.
utilities —
BASIC HACKER'S PACK 19.95 DISK
a disk-full of Atari® Basic utilities
for your programming ease and enjoyment
• disk directory •disassembler •binary load
• find or list variables • immediate DOS commands and
• block line deletion hex/decimal conversion
S. E. SORT
24.95 DISK
• sort strings and/or disk files • 140 10-byte records per second ■ Basic USR statement call • input/output user exits
• enhanced tree algorithm • machine language
• up to 10 keys — each key ascending or descending • error handling
• sort statistics • full documentation -sample programs LICENSING AVAILABLE
OUTSIDE ILLINOIS
800-621-0660
IN ILLINOIS
800-572-0440
DEALER INQUIRIES INVITED CALL FOR OUR COfilPLETE CATALOG
Illinois residents add 6% sales tax. Allow 3 weeks for personal checks.
$3.00 shipping and handling.
QuinTech Systems, Inc.
1271 Dundee Rd., Suite #448, Buffalo Grove, IL 60090
®Atari is a registered trademark of Atari, Inc.
February 1984
57
PRINT DATA ROUTINE
EN-I ) THEN 41 1 0
4100 NEXT ME:? : ? :? LASTS;" NOT FOUND
"-.GOTO 15000
4110 ? :? :? ARRAY$(STRPOS , STRPOS + RLMl
)
4120 ? :? "IS THIS THE RECORD TO BE AL
TERED (Y/N)";: INPUT CHOICES
4130 IF CHOICE$="N" THEN 4100
4140 IF CHOICE$ = "Y" THEN A R R A Y $ ( S T R P 0 S
, STRPOS + RLMl ) = BLANK$ :GOTO 6050
4150 GOTO 4110
5000 REM
5 0 1 0 R E M
5020 REM
5030 GOSUB CLEAR:IF NOT TOTAL THEN ?
:? "I HAVE NO DATA TO PRINT ":GOTO 1500
0
5040 ? :? "PRINT D A T A : " : P A P E R = 0
5050 ? :? "TYPE S FOR SCREEN DISPLAY 0
NLY"
5060 ? "TYPE P TO USE SCREEN AND PRINT
ER";: INPUT CHOICES
5070 IF CHOICES="S" THEN 5100
5080 IF CHOICE$="P" THEN PAPER=I:GOTO
5100
5090 GOTO 5050
5100 GOSUB CLEAR:? : L I N E $ ( 2 5 , 2 5 ) =" ":L
INE$(29,29)="-":LINES(33,33)="-"
5110 FOR ME=I TO TOTAL
5120 STRP0S=ME*RECLEN-RLM1:REC$=ARRAY$
( STRPOS , STRPOS+RLMl )
5130 LINE$(I,24)=RECS(I , 24)
5140 LINE$(26,28)=REC$(25,27)
5150 LINE$(30, 32)=RECS( 28 , 30)
5160 LINES( 34,37) = RECS( 31,34)
5170 ? LINES:IF PAPER THEN LPRINT LINE
S
5180 NEXT ME