Text content (OCR)
FOR APPLE II USERS
| (COMPUTING
U.S.A. $2.95 CANADA $3.50 OCTOBER/NOVEMBER 1985
PREMIERE ISSUE
Look! en
Up in the sky >
It’s Halley’s
Comet
plot the orbit
Z-RAM for
the IIc
Pro Football
Prognosticator
College Credit
On Line
Spreadsheet
Horrors
How to avoid them
Computer
Frontiers
{| 17795
10
Why every Kgs should have
an Apple afte
Today there are more
Apple® computers in schools
than any other computer.
Unfortunately, there
are still more kids in schools
than Apple computers.
So innocent youngsters
(like your own) may have
to fend off packs of bully
nerds to get some time on a
computer.
Which is why it makes
good sense to buy them an
Apple Ic Personal Computer
of their very own.
Send them home
to a good school system.
The IIc is just like the leading
computer in education, the
Apple Ile. Only smaller. About
the size of a three-ring note-
book, to be exact.
Of course, since the
IIc is the legitimate of
spring of the Ile, it can
access the worlds largest
library of educational
software. Everything
from Stickybear
r school.
Shapes” for preschoolers to
SAT test preparation programs
for college hopetuls.
In fact, the IIc can run
over 10,000 programs in all.
More than a few of which you
might be interested in yourself.
, For example, the
best-selling, AppleWorks"
3-in-l integrated soft-
ware package. Personal
finance and tax pro-
grams. Diet and fit-
ness programs.
Not to mention
fun programs for the whole
family, Like“Genetic Mapping’
and “Enzyme Kinetics’
One Apple that won't
leave them hungry
The Apple IIc is easy to set up
and learn. And it comes com-
plete with most everything
you need to start computing
in one box.
Including a free, easy-to-
use 4-diskette course to teach
you all about the IIc—when
your kids get tired of your
questions.
As well as a long list of
built-in features that would
add about $800 to the cost of
a smaller-minded computer.
The features include:
128K of internal memory—
as powerful as the average
office computer.
The ImageWriter II prints high quality
color graphics.
A built-in disk drive
that could drive up the price
of a less-senior machine
considerably.
And built-in adaptors for
adding accessories, like our
new ColorMonitor IIc, Image-
removing the sprocket paper”
If local color isnt enough,
Writer" II printer and the Apple you can talk to the rest of the
Personal Modem 300/1200.
A feast for their eyes.
The big 14-inch ColorMonitor
lc displays crisp, color graph-
ics or a high resolution 80-
column monochrome text for
word processing.
You can print sharp color
graphics, too, with our new
ImageWriter IL. It also prints
And speaking of high quality color, introducing
ColorMonitor Ilc.
near-letter-quality text in
black and white, quickly and
quietly. And, with its new
SheetFeeder, you can switch
to single sheets without
The most popular peripherals plug right into the back of the Apple Ic.
world through our new wall-
mounted Apple Personal
Modem 300/1200. With it, you
can do your banking at home,
check your stocks, gain access
to all kinds of information
libraries and much more.
Which would all add up to
avery impressive list of expand-
able accessories if it werent
for all the others. Like an Apple-
Mouse. And an extra disk
drive when the time comes.
Avoid growing pains.
So while your childrens shoe
sizes and appetites continue
to grow at an alarming rate,
theres one thing you know
can keep up with them. Their
Apple IIc.
To learn more about it,
visit any authorized Apple
dealer. Or talk to your own
computer experts,
As soon as they get home
from school. =
@.
* Optional accessory may be purchased for ImageWriter I, © 1985 Apple Computer Inc. Apple and the Apple logo, AppleWorks, and Imageliiter are trademarks of Apple Computer, Inc
Stickybear Shapes is a trademark of Optimum Resource. Foran autborized Apple dealer near you. call (800) 538-9696. In Canada, call (800) 268-7796 or (800) 268-7637.
How to get
the most
bytes out of |
your Apple.
Read why Steve Wozniak recommends RamWorks™ expansion cards.
Tk machine that Woz built is a powerful
business computer. AppleWorks gave it a
potent 1-2 combination. Now, RamWorks has
added the knock out punch, With RamWorks
expand the total memory of your Ile up to
an incredible 2.5 MEG. Your AppleWorks
will no longer be limited by the amount of
factory supplied RAM. And you'll be able to
perform virtually any application you want
with far greater speed and ease.
programs written for them without
modification
RamWorks was designed so you could
take full advantage of future developments
in 16 and 32 bit microprocessors. As your
needs grow, so can RamWorks. A handy
expansion connector allows the latest and
greatest co-processor cards to access
RamWorks’ memory. And allows you to
piggyback another 2 MEG. Clear instructions
show you how to plug in more memory.
For only $129 you can add an RGB option
to your RamWorks and get double high
resolution color graphics. All with a super
sharp brilliance that’s unsurpassed in
the industry.
How AppleWorks works best
with RamWorks.
RamWorks plugs into the Ile auxiliary
slot and acts just like Apple’s extended 80
column card, If you buy a 256K or larger
card, AppleWorks will automatically load
itself into RamWorks. This dramatically More features than you can shake a
increases AppleWorks’ speed because it a é | mouse at.
effectively eliminates time required to access Aword from the Woz should be sufficient
disk Drive 1. Now, switch from word pro- Because there's only one card like
cessing to spreadsheet to database manage- T wanted A MeMOLY _ Ramvorks. imagine how you will benefit
ment at the speed of light. AppleWorks card for my Apple that _ from these features: + 15 DAY MONEY BACK
responds the moment your fingers touch aa GUARANTEE * Sharp 80 column text (with
the keyboard, was fast easy 10 USC, without RGB option)» Double high
But AppleWorks has certain internal and very compatible; so _ resolution graphics (with or without RGB
limits, independent of available memory. ” option) * EXPANDABLE TO 2.5 MEGABYTES
Fear not. Only RamWorks removes those I bought RamWorks” year ise 64K or 256K RAMs in any
limits with a proprietary, easy to operate combination + Adds memory to AppleWorks
program that “patches” onto the boot disk + Co-processor connector + Accelerates
in seconds. Only creases the speed of AppleWorks * 100% COMPATIBLE
maximum number of re ilable WITH ALL Ile SOFTWARE * RAM disk
to you from 1,350 to over 5,000. And only software available (compatible with
RamWorks actually increases the number of Applesoft, PRO-DOS, DOS 3.3 and PASCAL—
lines permitted in the word processing mode. $29) * RAM disk available for CP/M ($29;
is, when you create an AppleWorks file larger than your disk included with our CP/M card) * RGB color option « Takes only
nly RamWorks automatically segments it to the appro- one slot ¢ FIVE-YEAR NO HASSLE WARRANTY.
priate size. RamWorks then prompts you to insert more disks, so RamWorks with 64K ($179); 128K ($219); 256K ($249); 512K
you can save any size file on regular floppies or hard disk. ($319); 1 MEG ($519); 2.5 MEG ($1599). CALL 214/241-6060 TO
ORDER YOUR RamWorks TODAY. (9 a.m. to 11 p.m. 7 Days, or
send check or money order to Applied Engineering,
RamWorks is compatible with more off-the-shelf software MasterCard Vistand © OD iwelconieTesas resides add Sie
than any other RAM card. Popular programs like Magic Office sales tax, Add $10.00 outside US.)
System, Flashcalc, The Spread Sheet, Diversi-DOS, Supercalc 3A,
The most friendly, most expandable card available.
Magicalc, etc. (And hardware add-ons like Profile and Sider hard y= i A i
disks.) Fact is, RamWorks is 100% compatible with all software Applied Engineering
written for the Apple 80 and extended 80 cards. In addition, P.O. Box 798, Carrollton, TX 75006
RamWorks can emulate other RAM cards, so you can use (214) 241-6060
FOR APPLE II USERS
COMPUTING
Volume 1, Number 1, October/November 1985. If Computing—For Apple II Users is
published bimonthly by Antic Publishing, Inc. Editorial offices are located at 524 Second
Street, San Francisco, CA 94107. Second class postage applied for at San Francisco and
additional mailing offices. POSTMASTER: Send address change to I! Computing, P.O.
Box 1922, Marion, OH 43306
FEATURES 36 Education: College
Credit On Line
16 Track Halley’s Comet by Paul Cohen ‘
by Donald Tattersfield 5 E
Where To Look, When To Look 43 Reviews: E
Kermit’s Electronic StoryMaker; E
32 Spreadsheet Horrors The Speller; Newsroom & Print a
by Robert Freeman Shop; Visible Pascal —
And How to Avoid Them . E
0 44 Sneak Preview: |
40 Pro Football Hardware m3
Prognosticator Z-RAM from Applied
by William Marquardt Engineering
Beat the Spread With Your Apple i
45 Sneak Preview: 24 For the Fun of It
Software by Neil Shapiro
Fantavision from Broderbund Games & Entertainment
A Software
53 For Kids:
Ladybug Color 27 Tales From The Crypt
by Caxton C. Foster
Drawing Program Cracking Ciphers with
by Steven Koepke
Computers
79 Graphics: 39 Sotto Voce
Color Weaver by Margot Comstock
by Gerald Hagopian Reflections by a Former Softalk
Editor
SOFTWARE
LIBRARY
58 Type-In Listings
READER
SERVICES
6 Editorial
Brave New Words
DEPARTMENTS
11 Profile: Christopher
Cerf, Creative
Catalyst
by Michael Ciraolo
19 Assembly Language:
New 65C02
Instructions
by Morgan P. Caffrey
23 Game Frame: 8 Perspectives:
: Whither Apple?
Ecto Blasters by DeWitt Robbeloth
by Stephan Schwirzke
DE ee eat ae COLUMNS 51 Top Software Charts
30 Power Programming: 3
ALI 15 Computer Frontiers 52 o II
Text Handling in by James Capparell type Ghecken
Hi-Res Cutting Edge of Computer
by William V. R. Smith Technology 82 New Products
FOR APPLE Il USERS
OMPUTING
Publisher
James Capparell
Editorial
DeWitt Robbeloth, Editor
Anita Malnig, Assistant Editor
Gerry Villareal, Tichnical Assistant
Rebecca Hale, Editorial Assistant
Art & Production
Marni Tapscott, Art Dinctor
Diane Lindley, Production Supervizor
Linda Tapscott, Ad Production Coordinator
Julianne Ososke, Production Assistant
Cover Artist
Dave Jensen
Contributing Artists
Beatrice Benjamin, Alan Okamoto, Paul Ollswang
Circulation
Les Torok, Manager
Hun-sik Kim, Shipping
Eve Gowtley, Dealer Sales
Brandt-Klingel, Cireulation Consultants
Marketing
Gary Yost, Director
Lisa Wehrer, Mer. Product Distribution
Brad Kershaw, Product Specialist
Administration
Clay Selland, Contaler
Lorene Kaatz, Credit Manager
Andrew Pope, Retail Service
Brenda Oliver, Accounts Receivable
Griselda Frias, Accounts Payable
Nelly Rodriguez, Data Processing
Fidez Bituin, Clerk Tpist
Advertising Sales
‘John Taggert, Director
Steve Randall
Harvey Bernstein
Leslie Bouffard
Garland & Associates
Receptionist — Maria Chavez
General Offices and
Catalog Customer Service
(415) 957-0886
Subscription Customer Service
(614) 383-3141
Advertising Sales
(415) 661-3400
Garland & Associates
(617) 749-5852
Credit Card Subscriptions &
Catalog Orders
outside California
(800) 227-1617 ext. 700
inside California
(800) 772-3545 ext. 700
Editorial submissions should include program list-
ing on disk and text on disk and paper if prepared
with a word procesor. Media will be returned if
self-addressed stamped mailer is supplied. Antic
Publishing assumes no responsibility for unsolic-
ited editorial material
No part of this publication may be stored in an elec
tronic retrieval system except by the purchaser for
his own use, nor reproduced by any means (elec
tronic, magnetic, mechanical, optical, photo-
graphic, or other) by anyone without prior written,
permission of the publisher.
I Computing — for Apple IT Users is an indepen-
dent periodical not affliated in any way with Apple
Computer, Inc. Apple, Apple IT, Apple II+, Apple
He and Apple //c are registered trademarks of
Apple Computer, Inc. All references to Apple prod-
ucts are trademarked and should be so noted.
POSTMA‘ Send address change to II
Computing, PO. Box 1922, Marion, OH 43306.
Copyright 1985 by Antic Publishing, Inc. All rights
reserved, Printed in USA
EDITORIAL
Brave
New Words
Thanks for giving us a chance to
introduce ourselves. IT Computing
is a new magazine specifically for
those of us who own or use some
type of Apple II computer. That in-
cludes the II, II+, IIe and IIc and
all future computers built around the
TI design. We'll also cover the peri-
pherals, software and firmware for
Apple II machines.
Browse through this issue and you
will see a mix of informative articles
and useful, entertaining programs.
We are especially proud to offer you
the work of two prestigious authors,
astronomer Donald Tattersfield
(Halley's comet program) and com-
puter scientist Caxton Foster (on
cryptanalysis), plus two old friends
of yours, Margot Comstock Tom-
mervik (of Softalk) and Neil Shapiro
(SYSOP of CompuServe's MAUG).
Our program lineup also includes
“Pro Football Prognosticator;’ which
we hope will be more than useful to
you. If you prefer not to type in the
programs by hand, we offer an at-
tractively priced companion disk
with the programs already on it. Ask
your retailer for details, or call our
toll-free number listed on the enclos-
ed subscription order form.
You may be curious about our
bravery (or foolhardiness) in laun-
ching a new computer magazine
when computer mania seems to be
at an ebb, and about our dedication
to machines from a company so
recently buffeted by internal strife.
Well, it is a gamble, but we believe
a sound basis exists for taking the
chance. Our most important prem-
ise is that the computer revolution
isn’t over, it has hardly begun!
Maybe the fad days are over, but for
substantial numbers of us, working
and playing with our computers will
remain an integral part of our daily
lives for years to come.
As for supporting Apple IT com-
puters, why not? You have one, I
have one, and so do a couple million
other people. The II’s are fine, ver-
satile machines, well supplied with
software and peripherals, and still in
production from the company that
virtually invented _ personal
computing.
We have confidence in Apple, but
even if the company were to falter,
that doen’t mean your computer
would self-destruct. In some ways,
trouble at Apple makes a magazine
like ours even mor valuable to you.
Valuable to you—that’s what we
must be to succeed. If we give you
your money’s worth each issue, I
think we will have a long, pleasant
association. What does value in a
magazine mean to you? We think
it means: useful, stimulating, chal-
lenging, helpful, convenient, eco-
nomical, informative, pertinent, at-
continued on page 8
LORRAINE CAPPARELL
I COMPUTING
‘Superstars aren't just the best in their
fields. They're the best, year after year. In
the wide world of sports simulations, SSI's
COMPUTER QUARTERBACK™ and
COMPUTER BASEBALL™ stand out as
true superstars. To date, tens of thousands
of enthusiastic fans and dozens of maga-
zine reviewers alike have cheered their
‘superb display of realism and excitement.
By consistently outplaying the competi-
tion, our games stand head and shoulders
above the crowd.
If you're scouting for the best football
and baseball strategy games around, take
a good look at ours — the ones with the
proven performance. You'll know these are
the superstars you want to play on your
‘computer. Sign them up at your local
computer/software or game store today!
If there are no convenient stores near
you, VISA & M/C holders can order these
$39.95 games direct by calling 800-227-
1617, x335 {toll free). In California, 800-
772-3545, x335.
Please specify computer format and
add $2.00 for shipping and handling.
To order by mail, send your check to:
Strategic Simulations, Inc., 883 Stierlin
Road, A-200, Mountain View, CA 94043.
(California residents, add 7% sales tax.)
All our games carry a “14-day satisfaction
or your money back” guarantee.
WRITE FOR A FREE COLOR CATALOG OF
‘ALL OUR GAMES TODAY.
Computer Quarterback is on diskette for
48K APPLE II series, ATARI® home
computers, and the COMMODORE 64
Computer Baseball is on diskette for
APPLE, ATARI, C-64 and IBM PC® and
PCI.
APPLE, ATARI, COMMODORE 64 and IBM PC/PCjr
are trademarks of Apple Computer, Inc, Atari, In,
Commodore Electronics, Ltd, and international
‘Business Machines Corp, respectively
STRATEGIC SIMULATIONS, IN
PERSPECTIVES
BRAVE NEW WORDS
continued from page 6
tractive, amusing, profitable, plea-
surable, clear, accurate, diverse, and
personally enhancing. These are the
attributes we strive to achieve in
IT Computing.
That's a tall order. We know your
standards are high, but we are deter-
mined to meet them. We want I
Computing to be your most welcome
companion at your Apple keyboard.
We are not competing with other
magazines, we are serving you. If
you get what you want from us, the
competition will take care of itself.
Your ideas and suggestions are
always welcome. //
Dh bte Rabbit
DeWITT ROBBELOTH,
EDITOR
FOR BASIC SKILLS INSTRUCTION
SIMPLICITY SUPPORTS
SUCCESS!
Centurion software programs present les-
son material in a straightforward, con-
tent-oriented format. No distracting
“video game" embellishments compete
for attention. Centurion Software pro-
grams are even more exciting and motiva-
tional because they allow students to
compete with themselves, not the com-
puter, while gaining skill mastery.
Centurion software combines microcom-
puter versatility and proven learning
principles to provide both interactive an
high-speed drill practice learning oppor-
tunities. We have the largest, most com-
prehensive library of software supporting
mastery level learning of Basic Reading,
Spelling and Mathematics. Grades K-12.
EDUCATIONAL SOFTWARE
— BEST FOR BASIC SKILLS —
Order either Mixed Math Exercises or
Word Unscramble (Grades K through 8)
for the sale price of $29.95 (Reg. $39.95)
and get our catalog free. (Each Centurion
Software Program includes the program
diskette, a detailed Learning Guide and a
printed Diagnostic/Test Lesson.)
Check or money orders only:
Name.
Address.
City.
State. Zip.
Mail to: Centurion Industries, Inc.
2000 Broadway, Redwood City, CA 94063
Allow 3 weeks for delivery
Whither Apple?
by DeWITT ROBBELOTH, EDITOR
The computer world was stunned in.
June when Apple Computer, Inc.
announced, in effect, that cofounder
and Chairman of the Board Steven
Jobs had been unhorsed in a cor-
porate joust with Apple’s President
and Chief Executive Officer, John
Sculley.
Sculley convinced the Board of
Directors to reorganize the company
in a way that removed Jobs from his
executive role as general manager of
the Macintosh Division. The new
“functional” organization did not in-
clude a managerial job for Jobs. Of
course, he remains as Chairman and
major stockholder, and is now char-
acterized as “chief visionary” for the
company.
Most industry savants agree the
move was good for Apple, or even
crucial. Why? There were serious,
fundamental differences between the
two about what Apple products
should be like, how they should be
marketed, and how the company
should be run. (What else is there?)
Jobs and cofounder Steve Woz-
niak epitomized the boy-genius
entrepreneurial style. In Apple’s 1984
Annual Report, Jobs appears con-
spicuously coatless amid his sar-
torially staid executive staff. Having
achieved the American dream, Jobs
was seen as “cocking a snoot” at cor-
porate traditions, according to
Apple-watcher Paul Evans of the
securities firm S.G. Warburg, Rowe
& Pitman, Akroyd.
Seemingly at odds with the con-
cept that had made the Apple IT such
a success, Jobs advocated the closed-
box approach to products, with most
resources backing the Mac as a
business machine to challenge the
IBM PC. Sculley favored open, ex-
pandable product lines like the Apple
II, aimed at soaking up sales where
IBM's corporate clout wasn't devast-
ating—in education, small busi-
nesses and the home.
With Jobs in the Macintosh sad-
dle, Sculley apparently had little con-
trol over half the company. Finally,
the failure of the Mac to significantly
dent IBM’s armor resulted in losses
that gave Sculley a good business
reason to challenge Jobs’ control by
reorganizing.
Apple’s former organization
divided the company along product
lines—Apple II on one side, Macin-
tosh on the other. It was really two
companies running side by side, with
some glaring duplication of services.
The new organization is functional,
with sales and marketing on one
side, and product operations, includ-
ing new product development, on
the other.
Now what? At his first public ap-
pearance since the coup (at Future
Computing’s MacForum in San
Francisco), Sculley assessed the
situation. Apple is still healthy, he
said, and will be trimmer after the
reorganization. A more disciplined
approach to business enacted by
Apple’s many good managers and
some new outsiders will concentrate
on selling all Apple's existing prod-
ucts primarily through dealers (as
opposed to direct sales by the Apple
sales force).
continued on page 10
1 COMPUTING
There’s More to Managing
Your Money Than Dollars & Cents
The Home Accountant
The all-time #1 best-selling home finance
package. The Home Accountant will
wisely manage your money on a daily
basis as well as plan your financial future.
The Home Accountant lets you flag trans-
actions for tax time, print net worth and
other financial statements, handle multi-
ple credit cards and checking accounts
PEsgeRenest and can have up to 100 budget categories.
i Available for Apple !l/lle
THE HOME ACCOUNTANT”
‘nd Financial Panne forthe Macintosh
% yee
The Home Accountant Expanded
Designed for each of use on Apple Ilc/Ile
computers. Beside all the great Home
The Home Accountant and
Financial Planner for the
Macintosh
Accountant features, the new ProDOS
feature provides speedy and accurate disk
access, amemo module for appointments
and pending bills, and 80-column display.
“Home Accountant is considered the
granddaddy of personal finance
packages.”"—San Jose Mercury News
Voted ‘Best Software of the Year’ by A+
readers.
The Home Accountant”
FCM
FCM (Filing, Cataloging, and Mailing) is the perfect mailing list manager for your
personal computer. Prints mailing lists and labels, and it’s terrific for other applications
such as organizing your record collection
or keeping track of party guest lists.
One of the few programs designed for the
Macintosh that fully employs its unique
capabilities. It’s great for running a small
business or for department project
accounting in a large business. The Home
Accountant and Financial Planner for the
Macintosh will enable you to wisely man-
age your money on a daily basis as well as
help you plan your financial future.
FCM.
Get Rich:
Financial Strategies (Module 1)
It’s a competitive world. Do you have the
financial tools to survive? Get Rich, a
handy “reference” program, will give you
the right tools to organize your finances.
Real Estate Planning (Module 2)
For most of us, a home is the biggest
investment we ever make. Don’t make a
mistake! Consult Real Estate Planning.
Insurance Planning (Module 3)
We insure our cars, our homes, and our lives, but are we properly covered? Is there a
less expensive way? Insurance Planning concentrates on different types of insurance,
including life, social security, disability, property, auto, and health.
Arrays, Inc. ® 6711 Valjean Avenue @ Van Nuys, California 91406 @ 818-994-1899
WHITHER APPLE
continued from page 8
The vision for Apple remains the
same, Sculley said. “Apple builds
personal computers for individuals,
not institutions.” There will be new
Apple products, but their develop-
ment will be “market driven.” He
urged his listeners to stop focusing
on “what comes next, and look at
what we have to offer people today.”
Nevertheless, there will be new
products. Sculley firmly supported
continuing production and develop-
ment for the Apple IT line and en-
couraged other companies to jump
on Apple’s bandwagon. He specifi-
cally instructed Apple’s legal and
marketing groups “to Build bridges
with outside software and hardware
developers, to make it easier for them
to work with Apple.”
One widely rumored direction is
towards the 65C816 chip. This
microprocessor from Western
Design Center operates in cither of
two modes. In emulation mode it
works identical to the 6502 or 65C02
chip, so it could maintain com-
patibility with existing Apple II soft-
ware. In native mode it operates as
a 16-bit (or 8-bit) processor and will
need new software, but can directly
address 16 megabytes of memory
(about the same as most main-
frames). An operating system for this
chip's native mode is being designed
that will do for it what CP/M did
for the Z-80.
The Apple II market continues
strong. Future Computing, a
research firm, pegs Ie sales in 1984
at about 500,000 units and holding
steady, with Ic sales expected to sur-
pass that number in 1985. Even if
demand is only half that much, it
would still indicate substantial inter-
est-in this venerable line of com-
puters. There are good reasons for
this. The open architecture of the IT
line continues to stimulate third-
party development of hardware and
firmware, while a vast library of soft-
ware and established user networks
help retain the loyalty of Apple II
owners.
It seems the furor has settled
down, but there are still doomsayers.
Robert Lydon, publisher of Personal
Computing magazine, predicts that
Apple Computer, Inc. will not last
as a separate company for another
two years. As for the home market,
“Tt never really existed,” he says. “It
was a fad. Just about everyone who
was going to buy a computer for
their home has done it. And my
guess is that most of the computers
actually used at home tie in with
some business use”
Paul Evans, on the other hand,
thinks Apple will make it. “It’s a big
company, and now it's going to be
run like one. It has viable products
and a great reputation. There’s room
in the market for Apple. It’s going
to take a bad quarter or two and
write off a lot of problems, then come
back strong this Christmas. No
question in my mind, Apple will be
around a long time.” //
COMING NEXT ISSUE:
Charles Rubin on
“The Ilc As A Business Machine”
Muppet Key Software Round-Up
High-Tech Toys
Analyzing Your Skiing Style
Create Your Own Holiday Cards
More From our columnists:
Comstock, Shapiro, Foster, Capparell. . .
Plus: Free Software, Activities for Kids, Bestsellers. . .
I COMPUTING
[Rourvtine No More Typing
SEASONS SPECIAL CHARTER RATE!
r] HA RATE!
pra hl Action Edition includes Action Disk of software with every issue. :
Il Computing YE |] Send me 6 issues of II Computing :
m= Action Edition at the special a
To. introductory price of $59.95. | understand that every
FREE (OD) issue includes a diskette with all software ready to
24 load and go.
hours-a-day O Check enclosed 1 Bill my creditcard O VISA CMC
800 Name Co.
227-1617 Address
ext. 700 City State Zip
(in Calif. Credit Card #
AOp-722: 8545 Exp.Date____——_- Signature
EKS4 Please allow 4-6 weeks for delivery of your first issue. All Foreign subscriptions add $25.00 per year.
ORDERS
ONLY!
5 5 ae Charter rate
[ OMPUTING over 35% off newstand
SPECIAL CHARTER RATE!
: ES m Send me 6 issues of // Computing
at the special introductory (charter)
subscription rate of $11.97. © Check enclosed © Bill me
Name
Company
Address
City State Zip
Please allow 4-6 weeks for delivery of your first issue.
Canadian and Mexican residents add $5.00 Per year.
Other Foreign subscriptions add $10.00 per year.
i
i
|
I
|
I
!
I
I
!
!
|
!
!
|
I
l
I
ext. 133) f
!
!
!
|
|
!
!
|
|
1
|
1
l
1
!
I
!
|
!
!
]
l
i]
i]
BUSINESS REPLY MAIL
FIRSTCLASS PERMITNO.645 MARION, OH 43306
POSTAGE WILL BE PAID BY ADDRESSEE
[ompvtine-
ll Computing
PO. Box 1922
Marion, OH 43306
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
as BUSINESS REPLY MAIL
PERMIT NO.645 MARION, OH 43306
POSTAGE WILL BE PAID BY ADDRESSEE
FOR APPLE Il USERS
COMPUTING “
{| Computing
PO. Box 1922
Marion, OH 43306
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES
CHRISTOPHER CERF,
CREATIVE CATALYST
Moves Muppets into software
by MICHAEL CIRAOLO
Christopher Cerf is a joy to be around. He's a
bright, bubbling man whos always in motion—
not with manic energy, but with the enthusiasm
of someone who can’t stop having a good time.
It isn’t easy to capture Cerf on paper. It would
be easy to simply say he helped launch the Na-
tional Lampoon, designed award-winning software,
earned wide acclaim as a writer and editor and
won two Grammy awards, one for “The Electric
Company” score. Nor would it do justice to his
creativity, genius and energy to blithely describe
his latest contributions to the Muppet Learning
Keys, Kermit’s Electronic StoryMaker, or other
software reflecting a 16-year association with the
Muppets.
tion because he transcends conventional levels of
energy and enthusiasm. More than anything else,
he likes to have fun.
Fortunately, for Apple computer owners, the
42-year-old “Renaissance Kid” has brought his
sense of fun to software, in the guise of Jim Hen-
son's familiar Muppets. The teams of Henson
Associates (HA!) and Christopher Cerf Associates,
both of New York, jointly produce software con-
sidered educational, though it is far removed from
traditional drill-and-practice software.
The association started shortly after the begin-
funny. . .and useful —a little bit of music, educa-
tion and humor” At the time, he worked for
Random House’s Beginner Books division, pub-
lisher of Dr. Seuss. Excited by the potential of
“Sesame Street,’ Cerf joined the multimedia divi-
sion of Children’s Television Workshop (produce
of “Sesame Street”) the following year. It was there
that he met Jim Henson. They collaborated on
many successful projects in a variety of media:
books, games, toys. “We wanted to do something
unusual, unique, useful and state-of-the-art. We
Christopher Cerf defies conventional descrip- |
ning of “Sesame Street” in 1969. Gerf was already |
“hopelessly hooked on doing things that were [§
Gi
wanted to be at the cutting edge in something we
enjoyed.”
Cerf and Henson started, among other projects,
M._LT., the Muppet Institute of Technology, where
the motto is “Learnum est Funum.’ One of the
first M.L'T. products was the Muppet Learning
Keys, a colorful, oversized keyboard with numbers,
continued on next page
OCTOBER / NOVEMBER 1985
letters in alphabetical order, and Stop, Go, Erase
and Oops functions. The keyboard plugs into
Apples or other computers and is now being sup-
ported by other software adapted to work with the
Learning Keys. The Learning Keys, named one
of the products of the year (1984) by InfoWorld, sold
an impressive 60,000 units during its first year.
THE BEST PEOPLE
When you talk to Cerf about his contributions,
he stresses not his accomplishments, but the nature
of the team to which he lends his talents as coor-
dinator and catalyst. That team is composed of
the best people available, according to Cerf. “You
don’t teach someone new. You go to the best.” This
group of Henson Associates, Cerf Associates and
individuals from various publishers is one team —
“you can't tell who's working for whom, when it’s
working”
‘There are two ways to produce software, accord-
ing to Cerf. The first, traditional approach, is to
come up with an idea, write a program to repre-
sent that idea, and then sell the package.
Cerf prefers a second approach, which helps
define his role in creating and developing software.
Cerf describes his role as that of coordinator, sup-
plying creativity and acting as a catalyst. Making
excellent software products is akin to producing
a movie or a children’s book, wherein, for exam-
ple, “The writer doesn’t do everything. You need
an illustrator, who can communicate with the
author, a cover illustrator and someone to keep all
this from becoming too expensive.”
Similarly, he says, “A good educational program
has clear and well-written text, animation that is
effective and a good sense of movement. You want
entertaining pacing and the best mus
puter can support. Bring all this together with
education on the top. The general rules are that
you take the best people available who have fun
working together, people who are goal-oriented,
and you end up being funny and silly and creative”
Since few people are top-notch at all the aspects
involved in producing state-of-the-art software,
Cerf’ team includes writers, animators, artists and
programmers. It also includes pioneering computer
educators, some of the original Muppet illustrators,
ex-Disney animators and former National Lampoon
staffers.
None of these people are confined to the bounds
of their professions—each team member must
understand how the group fits together and under-
stand the process, so that each request to other
members is realistic.
Christopher Cerf Associates have made some
in-house developments that contributed to the
> the com-
larger Henson/Cerf team. One such effort was a
technique for digitizing illustrations into Apple pro-
grams. This enabled them to bring in illustrators
who didn’t necessarily have computer experience.
COMMITTED TO HAVING FUN
Cerf believes that “if you can do something enter-
taining and educational, kids will learn. Products
have to be entertaining — people have to choose to
use the software.
“You should be able to explore what you want
in the computer, not what the programmer
wanted... Early educational software would ask
Johnny, what's the capital of Pennsylvania?” and
if he couldn't answer, he'd be there all day. Pro-
grammers should keep computers from being
aggravating”
Explorable software lets you change one variable
at a time, so that you can understand what your
command did. The change, according to Cerf,
should change both a sentence and the animation
on the screen (in a typical Muppet program). “The
ability to change one variable and see the result
gives children a sense of total control and power
over the program.” Cerfs understanding of kids
comes not from parenting—he hasn't —but from
understanding his own sense of fun and curiosity.
The entertaining nature of Cerf’s software does
more than teach. It also sells programs in a sensi-
ble, old-fashioned way. “You can’t just throw money
at something to have it sell — products have to sell
themselves. It has to be word of mouth between
kids and parents.”
A QUIET TIME?
Some would say it is foolish to design software and
even introduce products when the entire industry
is approaching a standstill. But Cerf has no pa-
tience for those who claim the home-computer
market is dead or software sales are “flat” “I just
want them to go away! Alll the gadget freaks bought
computers, and the industry produced 411 nearly
identical programs, all with the same ads. We're
growing naturally, and that may be slow.”
A slow market doesn’t bother him. “It's nice to
have some quiet time. We're in a quiet time right
now.” Indeed, Cerf is looking beyond the quiescence
to things he'd like to see in educational software.
“The next big breakthrough in educational soft-
ware is sound. Imagine a program that could read
a sentence (from StoryMaker) to you. Fd love to
hear a character say the letter or word, as it ap-
pears on the screen, in the voice of Kermit, not
in conventional speech-synthesizer noises.”
Although Cerf won't discuss his long-range plans,
I. COMPUTING
he is willing to talk about some of his upcoming
Collaborating with author, humorist and
ex-bodyguard Douglas Adams, who wrote the
Hitchhikers Guide to the Galaxy (as well as related
books, radio show and software), Cerf is working
on a conversation program that lets you “talk”
with Ronald Reagan. This program would add
artificial-in techniques to an updated
Eliza-like program. Eliza was a program that could
carry on a conversation with you, asking questions
and making comments much like a psychiatrist
might. In addition, Cerf asks, “What if parody,
satire and good writing are added?” He calls the
pre of bringing artificial intelligence to Reagan
“challenging.”
In time for Christmas, Cerfs team will probably
The
addition to the Muppet Discovery Disk will be a
multipurpose program covering most of the kin-
proje
have more products for the Learning Ke
PRODUCT
de
garten curriculum, according to Cerf. One part
will focus on numbers, the structure of words and
putting words together. Another part will involve
ifying shapes and color
ferences. The packz will come on two disks in
the school version from Sunburst, and on three
disks for the home market from Koala.
Another upcoming product is The Mystery of
the River of Song, the first in a series of Fraggle
imilarities and dif-
Rock adventures. These adventures will let you
become a Fraggle, in situations where the graphics
and text change dynamically: the same situation
isn’t always accompanied by the same graphics.
CBS will release the Fraggle adventures
Looking further, you can expect to see the fruits
of collaboration between Lucasfilm and Cerf in
conjunction with the upcoming movie Labyrinth.
Beyond that, Cerf won't say. //
Michael Ciraolo is
a researcher for the
Boston-based Yankee
Group when he’s not
honing his skills as
a part-time
dilettante. His most
serious concern is the
impact of modern
sctence and
technology on our
society,
INFORMATION
Muppet Learning Keys
Koala Technologies, Corp.
3100 Patrick Henry Drive
Santa Clara, CA 95052-8100
(408)946-4483
Kermit's Electronic
StoryMaker
Simon & Schuster, Inc
1230 Ave. of the Americas
New York, NY 10020
(212)245-6400
OCTOBER / NOVEMBER 1985
Expandin
Z-RAM for the IIc is available with 256K or 512K of
additional memory and a powerful Z-80 microprocessor
for running CP/M software.
Z-RAM fits neatly inside the IIc. Installation is easy, clear
instructions show you how. You'll need a screwdriver and
about 10 minutes (if you can change a light bulb you can
install Z-RAM).
Z-RAM and Appleworks will knock your socks off.
A 256K Z-RAM will give you a 229K av
and Appleworks will be completely loaded into memory
lable desktop
Appleworks will now run about 10 times faster in your IIc
with 1 disk drive than in other
disk drives. And only
Z-RAM increases the maximum
llc’s with 2
number of records in the data
bas
processor
nd lines in the word
And only Z-RAM will
auto segment large files so any
1 size file can be saved on regular
floppies or a hard disk, A 512K
Z-RAM will give you a 413K
6K Z-RAM
can be upgraded to 512K by just
available desktop. A 2:
plugging in more memory
chips
Z-RAM is also a high speed solid state disk drive. With
Z-RAM, your programs will load and save over 20 times
faster. Z-RAM’s RAM disk is compatible with Applesoft, Pro-
DOS, DOS 3.3, PASCAL and CP/M. And with Z-RAM, you
can copy a disk in one pass. Just insert the original,
remove the original, insert blank disk! That's it! Z-RAM is
another disk drive, only 20 times faster, 4 times larger
capacity, and no whirring, clicking or waiting!
But before you start panting over all that
don’t forget that the Z-RAM card has a buil
7-80 processor chip that allows you to run CP/M programs
like Wordstar, dBASE II, Turbo PASCAL, Microsoft BASIC,
FORTRAN and COBOL and over 3,000 other CP/M
programs. So Z-RAM not only makes Apple programs run
better and faster, it lets you run MORE programs.
xtra memory,
-in high speed
g Your IIc
With the Z-RAM card installe
only now you'll have that extra memory that Appleworks
and other programs need. And you can run all that great
CP/M software that others can only dream about.
, your IIc is still your IIc
Z-RAM is 100% compatible with all IIc software and
hardware including the mouse, 2nd disk, modem and
printer, Z-RAM is easily handled by the IIc power supply as
power consumption is kept very low by using two custom
integrated circuits and a patent pending power saving
design. And Z-RAM is from Applied Engineering, the
‘cessories for the
acknowledged leader and innovator of a
Apple.
Z-RAM comes complete with manual, RAM disk soft
Z-80 operating system, CP/M manual and a 5 year no
hassle warranty
So the next time somebody asks you why you didn’t get
an IBM, tell him you bought a IIc because the IBM didn't have
enough memory and was too slow and couldn't run CP/M
software. And tell him you made it past the 8th grade
Z-RAM with 256K
Z-RAM with 512K
$399
$479
If you want to run CP/M software, but don’t need more
memory, may we suggest our Z-80c card. The Z-80c offers
the same CP/M performance as Z-RAM but has no memory
expansion ports. And the Z-80c will not affect the running
of Apple programs. The Z-80c is priced at only $159.00 and
should you ever want to upgrade to Z-RAM, we'll refund
your full purchase price.
Call (214) 241-6060
9 am. to 11 p.m. 7 days a week or
Send check or money order to:
Applied Engineering
P. O. Box 798
Carrollton, Texas 75006
MasterCard gam Vi
C.O.D. welcome. No extra charge for credit cards.
Texas residents add 54% sales tax. Add $10.00 if
outside U.S.A.
S
a and
AR
APPLIED ENGINEERING
“We Set the Standard”
PHOTOGRAPHY LORRAINE CAPPARELL
COMPUTER FRONTIERS
TO BOLDLY GO
by JAMES CAPPARELL, PUBLISHER
“Computers—the final frontier, these are the
voyages. . ” An unusual introduction to a new col-
umn perhaps, but as an old Star Trek fan, I
remember it was an invitation like this that opened
the door to “strange new worlds.” The impossible
became real. I loved it.
Similarly, I invite you to join me on a bold ex-
pedition, one that should be every bit as exciting
and challenging to your imagination. This column,
to run in every issue, will take you on your own
mission to the edge of computer technology, where
the impossible becomes real.
lintend to bring you face to face with the issues
and problems of this frontier, and introduce you
to the scientists and others working there. Much
of what I will write about here will be commonplace
within five years. You will discover philosophical
implications, new vocabulary, and new professi
Among these are:
knowledge engineering
artificial intelligence
expert systems
fuzzy set logic
knowledge representation
language translation
cybernetics
speech recognition
robotics
computer-enhanced learning
The current level of software development is
primitive compared to what is coming. Integrated
products and fancy word processors notwithstand-
ing, software has a long way to go before J will
The current buzz word is “user friendly.’ I would
like to replace that with “mind-amplifying” or
“ability enhancing” After all, this equipment we
are so pleased with should amplify our ability to
perform. It should act synergistically with the
motivator behind it, and that’s you.
Software should adapt to your particular style
of language and comprehension. A more verbal
person would access the same software differently
than someone visually-oriented and still feel satisfied
with the outcome. The system would adapt to your
skills, preferences and goals. This may sound
somewhat farfetched, but I hope to show you that
such programs are only a beginning.
As you will see, terms like word-processing and
integrated software describe very limited, unimag-
inative interactions. What can be enhanced on a
word-processor? Counting words and spelling them
correctly? That’s not the stuff I envision. Perhaps
because I've been an inveterate Science Fiction
reader, I have always expected more.
Can you recall the time when you could not say
“xerox this?” Xerox, the company, only flourished
since 1960. It quickly took its place among the For-
tune 500 companies. The next “xerox” is around
the corner, and it may be a typewriter that you
talk at. What verb will come to mean “talk-typing”
a letter? Will most of us still refer to this equip-
ment as a typewriter? How about a command
writer? “Here, co-write this.” If any of you come
up with some good verbs, let me know.
Iam sure many of you recall the famous com-
puter in the movie “2001” It was the H.A.L. 9000
(Did you ever notice whose initials follow h-a-l in
the alphabet?). Stanley Kubrick, the director, in-
terviewed many computer specialists of the time.
This was about 1966 and he embodied in H.A.L.
those functions then thought attainable by the year
2001. Remember, we did not have handheld cal-
culators and digital watches then. They may have
underestimated the potential. The Apple most of
you have on your desk is more powerful than the
computer I first programmed in engineering school
in 1964, and it’s 1/1000 the size.
continued on page 57
James Capparell,
publisher of IT
Computing and
Antic, the Atari
Resource, formerly
worked as a pro-
grammer at NASA’
Ames Research
Center and for Ford
Aerospace
OCTOBER / NOVEMBER 1985
15
TRACK
HALLEY’S COMET
Where to look, when to look
HALLEY’S COMET
1985-1986
y now you must know—
via newspapers, television
and scientific journals—
that Halley’s comet ap-
proaches. It last appeared in 1910.
In the intervening time it has fol-
lowed an elongated elliptical orbit
around the Sun, out beyond the or-
bit of the planet Neptune, and back
again to the vicinity of the Earth. We
know that it has been doing this
every 76 years or so since 239 BC,
and possibly for the last 3000 years.
This once-in-a-lifetime event has
aroused great interest worldwide.
But the coming apparition, unfor-
tunately, will not be as spectacular
as it was on some previous occasions.
So this program will help you to
locate the comet at any time —when
you are able to see it and even when
you cannot.
WHAT THE PROGRAM
DOES
Here is a line breakdown, explain-
ing the program for you. You will
be prompted to enter your latitude
(line 280) in degrees. Enter a positive
value if you are north of the equator,
or a negative value if south. Before
entering your local time (300-350),
adjust to normal local time if daylight
saving time is in effect.
The display will inform you how
far the comet is from the Sun and
also from the Earth (590, 820). The
unit used is the astronomical unit
by DONALD TATTERSFIELD
(AU), or 150 million km. A display
of the current coordinates of the
comet will follow (subroutines
5000-5070 and 4000-4030). The
former gives right ascension and
declination, used by astronomers to
describe the position of a heavenly
body. Of more immediate use to the
layman, the latter subroutine gives
the altitude (angle above the horizon
in degrees) and the azimuth (bear-
ing measured eastwards from north
in degrees).
Similar information for the posi-
tion of the Sun is also displayed us-
ing the same subroutines. See below
why we need to involve the Sun. If
you then opt for a pictorial represen-
tation of the position of the comet
(reply Y at 1260), the vertical axis
represents the altitude from your
horizon (0 degrees ) to your zenith
(90 degrees), and the comet is shown
in the correct quadrant of the com-
pass horizontally (subroutines 6000-
6210, 7000-7070, and 9000-9070).
The program then gives you the op-
portunity to repeat the calculation,
cither for a different latitude(1310)
or for a different time (1340), or both.
WHAT ABOUT THE SUN
THEN?
The predicted brightness of Halley's
comet at this appearance is about
that of an average star. Although the
comet will be in the sky during the
daylight for some of the time, it is
most unlikely that you shall see it
then because it will be masked by
the brightness of the Sun.
The sky is dark when the Sun is
more than 18 degrees below the
horizon. The program will warn you
(1300) if the sky is not dark at the
time you have selected. Further-
more, as the comet approaches the
Sun, a tail will develop from the
head, or coma. This might spread
over an arc of tens of degrees in the
sky.
‘The tail always points away from
the Sun, so you need the position of
the Sun to help calculate the pre-
dicted direction (6000-6020) of the
comet's tail.
MORE ABOUT THE
PROGRAM
For the comet, variable AA is the
semimajor axis and C is the eccen-
tricity of the orbit. JD(1) is the Julian
date of the time when the comet is
nearest the Sun (at perihelion) — look
up Julian date in an astronomy
book. A(I), B(I) are also constants
of Halley's orbit. For the Sun, you
can find the data of 260 in the
Astronomical Almanac (in this case page
C24 of the 1984 edition), as well as
the formulas for calculating the coor-
dinates of the Sun (640-770). Your
selected time is converted to Julian
date (370-430).
The determination of the position
of the comet involves an iterative
solution of Kepler's equation, for
which there is no known classical
solution (440-570). The remainder
of the calculations needed for the
position of the comet will be found
continued on page 18
1 COMPUTING
NaSN3F 3AVG NOLWHISNTI
in (840-1070) and for the position of
the Sun in (1080-1240).
Finally, throughout the program
there are various safeguards to put
calculated angles in the correct
quadrant of the circle. In particular,
note that since azimuth is measured
from 0 to 360 degrees of the com-
pass, and you are displaying the
comet in one quarter of the compass,
you must bring the azimuth ZC of
the comet into the range 0 degrees
to 90 degrees (6080-6090). Proper
scaling for the computer screen takes
place in (6100-6120).
The color of the d
ayed comet
and its tail was acceptable on my
monitor, but either or both can be
changed at (160) and (170)
respectively.
WHAT HALLEY’S COMET
WILL NOT DO
Halley's comet will not flash across
the sky like a shooting star, nor move
even at the apparent speed of an arti-
ficial Earth satellite. It should be
ble in binoculars by November of
this year, and without any optical aid
by December —before, if you have
a good telescope. It will still be visi-
ble in May 1986 in the southern
hemisphere. You have plenty of time
to see it, but do not expect to see it
around February 9, 1986 —it will be
behind the Sun.
Donald Tattersfield, former head of the Dept.
of Mechanical and Production Engincer-
ing at North Gloucestershire College of
Tichnology in England, is the author of
Halley's Comet (Basil Blackwell
Publishers), Orbits for Amateurs and
other writings on astronomy and astomaulics.
He is a member of the British Astronomy
Association and a Fellow of the Royal
Astronomy Society.//
| COMPUTING
ASSEMBLY LANGUAGE
A CHANGE OF
HEART
New instructions grace the 65C02
by MORGAN P. CAFFREY
The heart of any computer is its Central Pro
ing Unit (CPU). Ina microcomputer this is a chip,
usually referred to by its number. The revolution
in personal computing was built largely on the back
of a workhorse chip called the 6502, which was
used in Apple II computers and in several other
brands.
The 6502 chip is a capable CPU, but it could
be better, and now it is. Apple Computer is cur-
rently installing a more powerful version, called
the 65C02, in all new Apple IIc and Apple Ile com-
puters. The 65C02 bestows several new options on
assembly language programmers — for whom the
balance of this article is written.
But don't go away, beginners. Though technical,
this article includes concepts and language you will
confront again.
OPCODE: An executable instruction for the
microprocessor such as add, substract,
read, store, AND, OR, shift-left, shift-right,
and so on.
OPERAND: The data or location being
acted on by the opcode. An immediate
value, the content of a location.
MODE: A method of using an opcode that
differentiates between accessing the
operand from an absolute location, froma
location pointed to by another location, and
so on. Modes provide flexibility to the
microprocessor, and it is usually nicer to
have a smaller number of opcodes with a
variety of modes than a large number of dif-
ferent opcodes.
‘The 65C02 is a pin-compatible replacement for
the 6502 in all Apple II-type computers. It is part
of the “enhancement” upgrade for older Ile’s. It
offers lower power consumption and some deft ex-
tensions to the parent processor's instruction set.
The advantages are very real.
The improvements consist of 27 new opcodes
made up of ten new instructions and two new ad-
dressing modes. (See box for explanation of terms.)
Some things ha “ome much simpler, some
faster; some more elegant, requiring code.
Let's look first at those instructions that are essen-
tially extensions of existing instructions, but with
different or augmented modes.
SIMPLIFIED BRANCHING
Was I waiting for this one? You bet! A Branch
Always (BRA) instruction. It has no flags to con-
trol or predict or manipulate, no faked comparison;
you need only branch relative to the present pc
tion +127 or -128. It does not change th
any processor flag. This change adds simplicity and
legibility, but I still wish for a signed, 16-bit branch
for additional ease in writing relocatable code.
INCREMENT AND DECREMENT
ACCUMULATOR
I sometimes need to add one or subtract one from
the accumulator. Compare the sad methods I have
used to the new, simpler version.
Table 1
6502
ADDITION SUBTRACTION
TAX | STAZPDEST | TAX | STA ZPDEST
INX | INC ZPDEST | DEX | DECZPDEST
TXA_| LDA ZPDEST | TXA__| LDAZPDEST
65C02
ADD OR SUB
INA] DEA
It is nice to substitute one instruction for three,
even if I don’t use the instruction often.
continued on next page
te of
Morgan P. Caffiey
is a programmer/
analyst concentrating
on expert systems,
databases and tele-
communications. soft-
war. He was an
carly Apple IT
owner and former
technical editor for
Apple Orchard
magazine,
OCTOBER / NOVEMBER 1985
ASSEMBLY LANGUAGE
PUSHING THINGS AROUND
Similarly, there are new push instructions. Now,
stacks are nice. I like stacks. The stack keeps track
of subroutine calls and saves register values that
must be restored. The 6502 offers a quick stack
(you need to look at other processors to appreciate
the speed), but restricts the programmer to 255
bytes. Let’s look at the old and new methods to
save the processor status and ail the registers.
Table 2
6502 65C02
PHP PHP
PHA PHA
TXA PHX ; new
PHA PHY ; new
TYA JSR DOSOMETHING
PHA PLY ; new
JSR DOSOMETHING PLX ; new
PLA PLA
TAY PLP
PLA -
TAX =
PLA -
PEP -
13 Instructions versus 9
This difference might seem trivial, but if you
examine code that extensively uses registers, you'll
see this is frequently done. The old processor’s need
te channel registers through the A-register is time-
consuming and not elegant. The newer method
is better.
ZERO
Zero is so useful. It clears the high-resolution screen
to black. It sets my numeric arrays to naught. The
65C02 offers the following simple saving and doesn't
bother a single flag:
Table 3
6502 65C02
PHA =
LDA #0 STZ DEST ; store a zero
STA DEST -
PLA -
4 Instructions versus 1
In both cases the contents of the A, X and Y
registers are the same after as before the opera-
tion. This is not always necessary, but frequently
it is. The new instruction supports ABS, ZPG,
ABS,X and ZPG,X modes.
ABSOLUTE INDIRECT ADDRESSING
A sweet feature of the 6502 is the indirect address-
ing. If you use the Y-register with a single byte loca-
tion in the zero page, you can reference any loca-
tion in memory. It’s great for accessing and main-
taining tables and also for various memory moves.
Viewed this way, the 6502 has 128 16-bit memory
pointers, any of which you can access with a sim-
ple two-byte instruction.
The trouble is always that you have had to use
the Y-register, which at times is awkward. Fre-
quently it is easier and defter to leave Y=0 and
manipulate the zero-page pointer directly.
The 65C02 has absolute indirect addressing: for
example, LDA (ZPG). You don't have to be con-
cerned with the Y-register. A single two-byte in-
struction can now load, store, add, subtract, com-
pare, AND, OR, and EOR anywhere in memory.
EXTENDING THE USE OF TABLES
The following instructions make a widened use of
tables:
TABLEBASE EQU « ; symbolic pointer to base
of table of routines
DA NATIONALDEBT
DA BASEBALLAVERAGE
DA SUBTRACTION
DA DIVISION ~
DA INSERT
DA LOWERCASE
The construction above creates a table of two-
byte execution addresses. You can do something
similar with most assemblers; that is, if the pro-
gram executes at the location pointed to by any
table entry, the described function is performed.
The 6502 provides a slightly awkward method to
jump to any one of these addresses, but the 65C02
more elegantly indexes the Jump Indirect by X.
The problem with the 6502 Jump Indirect is
that if, by chance, the assembler that stores the code
locates the table entry such that the two-byte value
crosses a page boundary (bytes 0, 256, 512, and
so on, throughout memory), the low byte would
be taken properly but the next byte would be taken
from 256 bytes lower. You would execute code at
the wrong address. A sharp programmer learns
to watch for and avoid these problems. A better
processor avoids the problem, and the 65C02 fixes
it at the cost of just one cycle—a good trade.
20
1 COMPUTING
ASSEMBLY LANGUAGE
TABLE JUMPS
When preparing the equivalent of a CASE state-
ment in assembler, the 6502 has a slightly split per-
sonality: nice architecture, but awkward in use. The
user presses a key and the code “vectors” to the
right routine for the key pressed. In the 65C02,
utility is about the same but the routine is simpler.
TABLE 4
A = 0,1,2,3,4 ... 127—returned from keyboard
6502
ASLA ; mult by 2
TAX ; make index
LDA TABLEBASE,X
STA LOC
INX
LDA TABLEBASE,x ;
STA LOC+1 ; high byte
JMP (LOC) ; jump indirect
65C02
ASL A
TAX
JMP (TABLEBASE, X)
8 Instructions versus 3
This new construction saves both space and time.
READ/WRITE INSTRUCTIONS
Some of the instructions indexed by X that do both
a read and a write in a single instruction have been
speeded up.
ASL LOC,X~—arithmetically shift left the byte
LSR LOC,X~—arithmetically shift right the byte
INC LOC,X—read, increment, store
DEC LOC,X—read, decrement, store
These can be used for bit manipulation and for
multiplication and division. A savings of one cy-
cle may not seem like much, but if the cycle is
repeatedly saved all day long, or at a critical junc-
ture, the savings become noticeable. (In process-
ing every bit on a high-resolution screen — 57,344
bits—you generate some time savings if the im-
age changes frequently.)
BIT FLIPPERS’ DELIGHT
Bit manipulation can seem like Greek even to
seasoned assembly language programmers. The
idea is to isolate and process a bit (in a number,
on the graphic screen, in a controller device). Once
again the 6502 seems a little too hard to use,
although programmers have coped with and even
triumphed over it in various machines.
There have been a couple of changes in the bit
manipulation capabilities. [ll start with the bad
news, which isn’t very bad.
A good method for testing individual bits in a
memory location, the BIT instruction has lost one
rarely used ability. If you perform the BIT instruc-
tion in the immediate mode (the same result each
time the code is executed), the 6th and 7th bit are
not reflected in the processor status flag. If the im-
mediate operand is a zero, the Z-flag is set, so the
instruction may still be useful.
In the 6502 the bit is frequently tested by shift-
ing the byte left or right until a processor status
flag is altered, then you branch appropriately. The
65C02 design simplifies this read-manipulate-store
sequence.
The TRB (Test and Reset Bit) does an AND
with the present contents of the A-register (usual-
ly the “mask”), sets the new value of the bit(s), and
automatically stores the results back.
TSB (‘Test and Set Bit) does an OR of the A-
register and the memory location contents and
stores the results back.
The only processor flag affected is the zero-flag.
‘The addressing modes are somewhat limited; only
absolute and zero-page is provided (no indexing).
CONCLUSION
Notwithstanding all the wonderful upgrades, the
65C02 could be improved even more. I would like
a real 16-bit register. When I increment a zero-
page location, I want an increment instruction that
can detect a carry and automatically increment the
next sequential location. I also want the same thing
in reverse for the decrement. I don’t suppose I'll
get them soon, but there’s no harm in mentioning it.
Finally, the new chip has a few drawbacks. If
you use this nice extended set of instructions, the
software written won't be compatible with a lot of
the existing earlier Apple IT computers, unless the
owners individually decide to upgrade. This makes
commercial application of the processor's features
somewhat more complicated. Also, the exisitng
monitor in ROM does not disassemble the new
mnemonics, nor can the old mini-assembler in
ROM assemble the new instructions.
Most of the existing assemblers won't be able
to compile the new instructions. I’m sure most
assembler manufacturers will upgrade, and some
have already. These include Merlin PRO from
Roger Wagner Publishing, Lisa 2.6X from Lazer-
ware, and Big MACC from Call A.P.P.L.E. //
OCTOBER / NOVEMBER 1985
a
APPLEWORKS
ENHANCEMENTS
Read why Applied Engineering
is the acknowledged leader in AppleWorks enhancements
@ Applied Engineering was first to expand
Appleworks beyond 55K.
™@ Applied Engineering was first to eliminate disk
access on Drive 1 in Appleworks, thereby
dramatically speeding up the program and
reducing disk drive wear.
@ Applied Engineering was first to expand
AppleWorks to 1 megabyte of memory.
@ Applied Engineering was first to expand
AppleWorks to 2.5 megabytes.
™@ Applied Engineering was first to provide auto
segmenting on large files so any size file can be
saved on regular floppies.
@ Applied Engineering was first to increase the
maximum number of records in the data base
from 1350 to 5100.
™@ Applied Engineering was first to increase the
number of lines in the AppleWorks word
processor from 2250 to 5100.
@ Applied Engineering was first to display the
time and date on the AppleWorks screen.
@ Applied Engineering was first to provide auto
dating as part of the data base field.
@ Applied Engineering was first to provide auto
time stamping as part of the data base field.
@ Applied Engineering was first to give push-
button telecommunication power to AppleWorks
by merging the word processor to M.C.I. mail.
With all of these firsts, it's no wonder most people choose Applied Engineering when they want
enhancements to Appleworks.
Especially when you consider that nearly all the “firs
” listed above are
“onlys” too. And our Appleworks enhancements are as easy to use as inserting a disk and pressing return
because all enhancements are merged with the AppleWorks program disk and stay there out of sight until
needed, only now AppleWorks will run up to 20 times faster, and be easier to use at the same time.
And we're working on new improvements to AppleWorks all the time, so the few remaining criticisms
the software reviewers gave AppleWorks will vanish forever. So if you want more out of AppleWorks, order
RamWorks and Timemaster H.O. for the Ie or Z-RAM and IIc System Clock for the IIc. You'll find specifi-
cations and prices for these products listed in this magazine. Please look for Applied Engineering in the
advertiser's index.
There’s no question about how they'll increase your productivity. The only question you'll have is how
you ever got along without them.
214-241-6060
A
APPLIED ENGINEERING
“We Set the Standard”
ECTO BLASTER
Works with DOS 3.3 and ProDOS.
by STEPHAN SCHWIRZKE
The house is dark, and worse, it’s haunted! Ghosts
appear out of nowhere and rush about trying to
drive you away. You have been called in to rid the
house of these ectoplasmic interlopers, which you
can only do by de-energizing them as they come
towards you.
You are armed with the latest anti-ghost weapon.
Its laser-driven sight projects a “prohibited” sign
wherever the joystick directs. When you press the
joystick button, a gout of entropy juice squirts out
from your position at the bottom of the screen
towards the place marked by your sight. If the juice
hits a ghost, the ghost shrivels and disappears.
Every time you successfully blast a ghost, a can-
dle lights on the chandelier so you can see a bit
more of the room you are in. When all ten candles
are lit, you win the game. But every time a ghost
gets past you, a skull is added at the bottom of
the screen. Collect ten skulls and you lose.
Those of you without a joystick can play from
the keyboard by using the alternative lines 320-400
(see listing), and by changing line 4050 to read
GET A$: GOTO 60. Keys I, J, K and M control
direction of your sight, and the space bar substitutes
for the trigger button. There is no TYPO II table
for the keyboard alternative. To use TYPO II, enter
the entire program for joystick, verify its accuracy,
then carefully replace the joystick lines with the
keyboard lines.
Some Important Variables:
S= number of current shape being
drawn
A(S)=0 shape not being drawn
A(S)=1 shape being drawn
X= horizontal position of sight
y- vertical position of sight
S4- speed adjustment in line 5005
to increase difficulty
G(S)= horizontal position of ghost
U(S)= vertical position of ghost
JS)= scale of ghost
U(S)= speed of ghost
Q(S)= previous scale of ghost (used to
erase)
Explanation of Program Lines:
80 draws bullet and explosion
90-140 checks for hit
150-170 adjusts difficulty (speed, rate of
scaling)
180-200 lights candle
210-270 explodes ghost
280-300 clears room to brightest color,
gets rid of any leftover ghost
320-410 reads joystick (or keyboard)
430 erases and draws laser sight
440-550 erases and draws ghosts, adjusts
scale, moves ghost left or right,
determines if ghost has escaped
1000-1050 resets variables for new ghost
2000-2190 resets variables to draw room
3000-3040 sets up collision values
3050-3100 values used to check for colli-
sions, plot room colors, and
POKE machine language sound
routine
3110-3140 shape tables
4000-4040 = “you lose” message
4050-4060 = awaits button press for new
game Ua
Listing on page 62
Stephan Schwirzke
ts a college student
studying computer
science. Hes
currently writing an
arcade game in
assembly language.
hitiwese™
B. BENJAMIN
OCTOBER / NOVEMBER 1985
23
Neil Shapiro is
editor-in-chief of
MacUser Maga-
zine and is also
chief sysop of the
MAUG Apple
Group on
CompuServe.
FOR THE FUN OF IT
OF JEWELS AND
GHOULS AND
BUTTERFLIES AND
STRATEGIES OF WAR
by NEIL SHAPIRO
The world of gaming on the Apple II is as varied
as the people who own the machine. Creating soft-
ware ranging from dazzling graphics and anima-
tion to complex brain-wrenching games of strategy
and tactics, programmers on the Apple II are con-
stantly striving to achieve new goals and more ex-
citing products.
Here are some games that demonstrate this
wonderful ability of the Apple IT to amaze and
entertain anew.
CHAOS AND ORDER RETURN
Archon II: Adept from Electronic Arts is a follow-
up to its game Archon. That first game was played
on a chessboard-like field with pieces moved by
joystick. When one piece attempted to take another,
the two pieces would engage in fast, arcade-like
action to contest ownership of the square. Archon
quickly became a classic, with its ingenious com-
bination of chesslike strategy and arcade tactics.
Well, Adept is even more challenging than its
predecessor, and features exciting innovations.
In Adept, the Master of Order must struggle
against the Mistress of Chaos on a battlefield of
the four elements of Earth, Water, Air and Fire.
The battlefield screen is a bright, almost dazzling
display of the four elements arranged in concen-
tric rectangles. The bright-red outer area represents
(of course) Fire and features animated flames. In
the inner Water area, waves move. Juxtaposed with
the rocky green Earth and the calm violet Air, the
animated elements make the battlefield screen a
visual feas
The players each control the Adepts of Order
or the Adepts of Chaos. One of the players may
be the computer opponent, as the computer can
play either side. Two people may play each other,
but that requires either the special equipment
needed to hook two joysticks to an Apple or
keyboard control by one of the players. Unfor-
tunately, the quick action in the game makes the
keyboard fairly impossible to use. So figure that
most of your play will be against the computer,
but that’s okay because the computer plays a most
respectable game.
Each Adept shown on the screen may cast spells,
summon an army of demons and monsters, or
simply move and fight. The object is to capture
six flashing power points that, from turn to turn,
move about the outermost corners of each of the
four elements.
An Adept who casts a spell may summon one
of eight varieties of demons or monsters, may heal
an ally or weaken an enemy, release an ally or im-
prison an enemy, or (not very often) banish one
enemy from the board. An aptly named Apoca-
lypse spell decides everything in one immense
battle.
In most moves, the Adepts summon the crea-
tures of Order or Chaos to serve them in subse-
quent turns. The creatures all have different modes
of fighting and different amounts of life force (stay-
ing power), depending on which element they are
fighting in. The Firebird, for example, can take
more blows before dying if it fights in the domain
of Fire than in Water.
When one creature or Adept challenges another,
the battlefield screen clears to a tactical display. This
tactical display may feature various obstacles or ter-
rain, depending on the element field. But th
tion can be fast and furious, as the fighters are con-
trolled by joystick. Some fighters, such as Giants,
throw rocks; others, such as Sirens, have more in-
novative ways of close-in fighting. Learning how
the various occult soldiers fight is one of the game's
most attractive features.
It’s good to see a sequel to a successful game
that is not only as good as the first but extends
the boundaries of that game's system. Adept is such
a success.
24
I COMPUTING
GF JEWELS, BUTTERFLIES AND
AMOEBAS
Finding a new idea in arcade games that is both
different and playable is like finding a jewel in the
rough. And no one knows more about finding
jewels than Rockford, the personably animated
main character of Boulder Dash from MicroFun,
a rock-and-rolling excursion into fantasy and tac-
tically governed reflexes.
Featuring 16 caves, this game can satisfy the most
jaded arcader. At first glance it s
the Dig-Dug school of games:
little guy who tunnels about underground. As he
tunnels, he can undermine various boulders, caus-
ing them to fall through tunnels already dug and
crush his enemies —or himself. But whereas Dig-
Dug depends on a shoot-em-up philosophy (or at
least blow them up), Boulder Dash demands that
you think almost as fast as you can scream, madly
yanking the joystick back and forth.
You see, scattered about in the caves are both
jewels to grab and strange enemies that you must
overcome. For example, the amoeba, a green amor-
phous blob, inexorably advances on Rockford from
behind and begins to fill the tunnels as Rockford
digs them. But wait, the deadly butterflies hover
and glide about in the dangerous caverns— and
their very touch is death to Rockford. But if you
drop boulders just right, you can guide the but-
terflies to impact the sides of the growing amoeba.
When that happens, a quick flash lights the screen
as the butterfly explodes from its brief amoeba con-
tact and turns into a scintillating jewel for Rockford
to try to pocket.
Bright, colorful animation coupled with a breezy
story line make this game more than just a momen-
tary diversion
TWO GAMES: TWO THEATRES
Simulation gaming used to require a person who
wasn't afraid to learn a lot of complex rules and
do hundreds of calculations, could find up to twenty
square feet of floor on which to pla:
juggle thousands of tiny cardboard pie
knew at least one other person who shared all these
traits and skills. That is no longer true.
The Apple II can bring complex, historical
simulations to its screen in a way that makes such
simulation games easier than ever to learn and play.
Although these simulations do require thought and
concentration, they bring a feeling of reality and
veracity to gaming.
Carriers At War from Strategic Studies Group
(SSG) and Kampfgruppe from Strategic Simula-
tions Inc. (SSI) both simulate various World War
FOR THE FUN OF IT
II actions at a tactical level. Rather than the bold,
strategic action of moving entire armies and divi-
sions, these games simulate the multitude of smaller
events and movements that make up a battle.
Carriers At War magnificently simulates the war
in the Pacific fought by naval fleets. But even though
the rules are com-
plex and tightly in-
terwoven, it uses
command menus
that make it easy to
enter into play and
to keep track of hun-
dreds of different
items.
The
display
from menus to a
strategic map that
shows the Pacific
islands and the fleets present. You may overlay
the map with a weather map, which also indicates
the wind or storm velocity. Furthermore, you
may zoom in for a closer look at any part of the
strategic map.
You can keep track of every plane aboard every
aircraft carrier — individually — as well as each plane
and ship present at various bases. The amount of
detail would be truly staggering but for the text
screens of multiple-choice menus that quickly
become second nature to you. By using these
s, you can arm aircraft and send them out
ir missions. You can also control the move-
on thi
ment and the mis:
sion ability of every
ship in all the fleets
you command.
Many details are
taken into account
—how long it will
take the planes to
clear the runways,
how long it takes to
arm them, the dis-
tance to the target,
and so on. And be-
cause the computer
is doing the calculations, you need only sit back
and see how your decisions have turned out.
Once you have played the six scenarios cover-
ing Pearl Harbor, Coral Sea, Midway, Eastern
Solomons, Santa Cruz, and Philippine Sea (and
you may take any side in each action, or even play
opposing subsidiary commands!), you can design
your own dramas. Using keyboard control to move
n cursor, you can first design a map
an on-
PAUSE ON
BOULDER DASH
STRIKE
ORDER
CARRIERS AT WAR
continued on next page
OCTOBER / NOVEMBER 1985
25
KAMPFGRUPPE
iON DD
cuinera coBHONS"
ARCHON II:
ADEPT
FOR THE FUN OF IT
of water, islands, airports, and bases. Although a
joystick might have been more useful here, you can
draw maps quickly once you have the hang of it.
Then you can design the individual characteristics
of planes, ships, and carriers, and even program
the weather. It's no wonder that the Design Manual
that comes with the game has 24 pages and the
Player's Manual only 16.
Besides its histori-
cal accuracy, Car-
riers At War is the
best-playing simula-
tion of naval warfare
I have seen on either
tabletop or video
monitor.
Kampfgruppe
from SSI recreates
the fire and move-
ment of the bitterly
contested Eastern
Front campaigns.
For two-player action, each player may take the
Russian or German side; solitaire play is also
allowed, as the computer can take either side.
Of all the computer simulation games on the
market, Kampfgruppe gives the most realistic feel
of tactic mored combat. Although played on
the video game brings to mind tabletop
armies of small lead models of tanks and men
favored by many so-called miniaturist war gamers
as well as by the more serious folk in the Pentagon.
On the battlefields of Bryansk, Stalingrad, Kiev,
and Berlin (as well as random terrain), the Ger-
man and Soviet commanders in the game have
to face many of the same strategic decisions made
historically as well as taking a hand in the minute-
by-minute tactical maneuvering of tanks, artillery,
armored guns and
infantry.
Each grouping of
units i
ANEPT
shown on
the screen
silhouette.
direction a tank is
facing, and the ter-
But
rain. what
makes this game
innovative is that it implements sight or LOS rules.
In noncomputerized gaming, line-of-sight rules
often add realism at the expense of playability.
| Many tabletop players rue the day they started a
game that required long rulers, protractors, pieces
of string, and the patience of Job. But add an Apple
computer to such a brew and the LOS rules come
alive.
In Kampfgruppe, all you have to do is to move
the cursor atop a unit, press V for view and—
presto! — the territory that the unit can see and fire
into lights up. There’s no longer any doubt as to
whether you can spot a particular unit or if the
corner of a wooded area blocks your view.
Kampfgruppe is not an easy game, but this new
method of showing LOS calculations makes it
attractive to the computer war gamer. //
PRODUCT INFORMATION
ARCHON II; ADEPT
Electronic Arts
2755 Campus Dr.
San Mateo, CA 94403
(415)571-7171
Requires 64K; $39.95.
BOULDER DASH
MicroLab, Inc.
2699 Skokie Valley Rd.
Highland Park, IL 60035,
(312)433-7550
Requires 48K; $40.00.
CARRIERS AT WAR
Strategic Studies Group TTY. Ltd.
336 Pitt St.
Sydney, Australia 2000
Requires 64K; $59.95.
KAMPFGRUPPE
Strategic Simulations, Inc.
883 Stierlin Rd.
Building A-200
Mountain View, CA 94043
800-772-3545 X335
Requires 48K; $59.95.
ACTION DISK OWNERS!
See page 77 for instructions on
DOS 3.3 conversion, if necessary.
26
I COMPUTING
TALES FROM THE CRYPT
CRACKING CIPHERS
WITH YOUR COMPUTER
An Introduction
by CAXTON C. FOSTER
Cryptography is the science of writing messages
that no one but the intended receiver can read.
Cryptanalysis is the science of reading them
anyway.
Both sciences date back to antiquity. One of the
earliest ciphers, known to the Greeks, is called the
skytale (Figure 1).
Creencaemerenten
ig
Figure 1
‘The sender took a straight rod, and around this
he wrapped a long, narrow strip of parchment,
spiral fashion, with the edges of the spiral touching.
Then he wrote his message on the parchment along
the length of the rod, with successive lines around
the rod (like on a typewriter platen.) The parch-
ment, when removed from the rod, read like gib-
berish. It was sent to the recipient whose duplicate
rod served to recover the message.
Politics and romance have generated the long
history of secret writing, and indeed, much of the
best work in cryptology was done before the com-
puter was invented. However, because the com-
puter is so good at detailed routine work, it makes
a perfect tool for those of us devoted to reading
ciphered messages
The computer can’t do all the work, of course.
You have to program it to do your dogwork while
you use your trained intuition. Training your in-
tuition will be the purpose of this column, both
in terms of cryptology and of applying your com-
puter to the problems that arise. Il supply sam-
ple crypts and programs as we go along. Solutions
will appear in following i:
As you become proficient, our problems will get
harder, and eventually we may jointly put our
minds to solving the most difficult codes that exist
today. They say it can't be done, but never
underestimate curious minds served by a computer!
I will assume you do know the fundamentals
of BASIC and have some kind of Apple II com-
puter system. A printer is very helpful, but not
necessary. I won't assume you know anything about
cryptanalysis, so we'll have to spend some time
learning fundamentals.
In the “big picture” (Figure 2), Alphy wants to
send a me > to Betty so that Charlie can’t read
it, even if he can intercept it.
sues.
PLAINTEXT CIPHERTEXT PLAINTEXT.
A ENCODER t DECODER B
1 | eee
t
J ~interceprion
CRYPT.
ANALYSIS.
oes PLAINTEXT
c
Figure 2
Alphy composes the message in plaintext, a
language he and Betty know, which we will assume
is English. Alphy puts the message through a pro-
cess known as encipherment. The result, ciphertext, is
sent to Betty. Betty then puts the ciphertext through
decipherment and recovers the plaintext.
Meanwhile, Charlie intercepts the ciphertext.
He can't read it unless he can solve the cipher. This
process is called cryptanalysis.
continued on next page
Caxton C. Foster, a
Ph.D. in Electrical
Engineering, was a
Computer Science
professor at Univer-
sity of Massachusetts.
Presently he ts a
consultant to Mount
Castor Industries of
E. Orleans, MA,
which designs com-
puter programs for
school administrative
use, Dr. Foster is
the author of five
books and numerous
technical articles.
OCTOBER / NOVEMBER 1985
27
TALES FROM THE CRYPT
Even if Charlie can solve the cipher, he must
do it in time to use the information. With enough
time virtually any cipher can be broken, provided
there is enough ciphertext to work on.
But consider Paul Revere’s code. We all know
what two lights in the steeple meant, but the British
could never have figured it out because of lack of
data.
Notice I called Revere's lights a code. A code deals
with symbolic substitution of whole words or
phrases, whereas a cipher deals with individual let-
ters. In the computer world, one meets codes in
the guise of passwords, for example, those used to
log onto CompuServe. A computer could con-
ceivably discover a password by trial and error if
the host system did not reject repeated attempts,
but usually breaking codes requires much more
memory than your Apple II provides.
Therefore, we will stick to ciphers. ‘These come
in two kinds: transposition ciphers and substitution ciphers.
In a transposition cipher the plaintext stands for
itself but the letters are arranged in an unusual
order. In a substitution cipher, other letters stand
for the plaintext letters. Here are two examples.
Suppose you found a strip of paper with the
following series of letters: PSLCLEEEPNEE-
SNHAOADT. It’s obviously ciphertext of some
kind. You may want to wrestle with it a bit before
looking at the solution below.
Ciphertext: PSLCLEEEPNEESNHAOADT
Figure 3
When you do solve it, you will notice that the
solution depends on the physical placement of the
letters, and not on the substitution of the letter by
other letters or symbols.
This is the railfence cipher, a simple form of
transposition cipher. The letters stand for them-
selves, but the plaintext message is written in a series
of V's, while the ciphertext reads in a single horizon-
tal row. We will devote considerable attention to
transpositional ciphers.
Here is an example of a substitution cipher:
KDYLQJ D ZRQGHUIXO WLPH. Can you
discover its meaning, knowing that in this case let-
ters have been systematically substituted for other
letters? The single D is a big clue. This is known
as a Caesar cipher because it is of a kind used by
Julius himself. Actually, a BASIC program could
test for the premise of this substitution, but it’s easy
enough without a computer.
Give up? Each plaintext letter has been replaced
by the letter that occurs three positions later in the
alphabet. The single D is a clue because the 2
cle “a” is one of the few one-letter words in English.
The peculiarities of the plaintext are very impor-
tant in solving substitution ciphers.
Substitution ciphers can get very complex. In
addition to letter-for-letter substitution, there is a
polyalphabetic substitution in which several substitu-
tion alphabets are used in rotation (or otherwise),
and polygraphic substitution where two or more
plaintext letters form the unit for encipherment.
The U.S. National Bureau of Standards’ “Data En-
cryption Standard” consists of 16 stages of substitu-
tion, each followed by a transposition.
Almost a century ago, Auguste Kerchoffs laid
down six general rules for military cryptography
which still hold true today:
ii
1. The system should be unbreakable in practice,
if not in theory.
2. Assume the enemy knows the system except for
the key being used.
3. The key should be easily remembered.
4. Ciphertext must be transmittable by telegraph
or teletype.
5. Apparatus must be portable and operable by
one person.
6. The system must be easy and uncomplicated.
Several of these rules have implications for our
work, for example, “transmittable by teletype” im-
plies use of letters and symbols belonging to the
character set of our computers. But an important
additional concept here is the notion of key.
The key to a cryptic system is a piece of infor-
mation that determines how the system will work
in a specific instance. Knowledge of the system is
(almost) useless without it, and the key can be
changed as often as needed, even at the moment,
as long as both sender and receiver have it. Often
the key is a single word (easy to remember) whose
inherent characteris
determine procedure.
Consider the following ciphertext:
LMVSL SNSNA AIA
EI PLI TOPS B LS D
OB UUAs UR YS
Suppose you know we are using a transposition
system in which the plaintext is written out horizon-
28
I COMPUTING
TALES FROM THE CRYPT
tally in rows of six letters each, and that each col-
umn formed by this proc is “read” into the
ciphertext format (horizontal groups of five letters)
one column at a time. The order of the columns,
first to last, is determined by a six-letter key word.
A key word can dictate procedure in many ways,
but a common way is by the precedence of the
various letters in the alphabet. If the key word were
HAYDEN, the first column of plaintext to be read
out would be the second, or “A’ column, next would
come the fourth, or “D” column. The third col-
umn to be taken would be the fifth, or “E” column
of plaintext, etc. The last column would be the
third, or “Y” column.
Ofcourse, HAYDEN is not the key word in this
cryptogram. But knowing this much, you can solve
this cipher by hand, or with a computer program,
even if you don’t know the key word.
‘To make it interesting I challenge you all to come
up with a BASIC program to mplish this solu-
tion. The winners (in our subjective judgment) will
receive an appropriate reward yet to be determined
(at least their name in print). The key word and
how it works will be described in the next install-
ment of “Tales from the Crypt.”
Send your program to: CRYPT #1, Antic |
Publishing, Inc. 524 second St., San Francisco, CA
94107. //
Start An Apple Computer Club!
If you’re a teacher, community activist, interested parent —
you can start an Apple Computer Club.
Apple Computer, Inc. organized the Apple
Computer Clubs International in 1983; now
there are over 15,000 clubs worldwide.
You don’t need to be a computer expert to run
a club; you just need a sincere interest in com-
puters and the role they play in the lives of
young people. The Clubs are committed to
“improving educational computing by encour-
aging the positive use of microcomputers by
youth.” Mini and major competitions are held
to encourage excellence. Prizes often include
trips and computers.
An advisor receives Computer Club News, the
advisor newsletter, and The Apple Computer
Club's International Handbook which provides
background and ideas.
Register before November 1, 1985 and you'll
receive a year of Club benefits for only $10 (half _,_
the regular $20 registration fee) and two blank
disks.
For more information, contact:
APPLE COMPUTER CLUBS INTERNATIONAL
Box 948
217 Jackson St.
Lowell, MA 01852
(800) 343-1425
OCTOBER / NOVEMBER 1985
29
POWER PROGRAMMING
HI-RES LABELER
Small caps character set for HGR
by WM. V.R. SMITH and STEVE KOEPKE
Bill Smith is presi-
dent of Artsci, a
software company
specializing in
business products for
the Apple IZ, and a
former participant in
Softalk where this
program first
appeared. It has
been enhanced by
Steve Koepke
s graphics is one of the mos
of the Apple IT computers. Here
gram that puts small cap text at your disposal for
labeling hi-res screens.
Several commercial products now facilitate draw-
ing or “painting” in hi-res, and a few give custom
character to superimpose on pictures (S
NOTES.) The machine language character gen-
erators in some of these programs are so sophisti-
cated that the simulated text acts exactly as you
would expect real text to behave.
This program is not as fast or fancy as com-
but it works, and it shows you one
way to accomplish this task. You will be able to
load and save hi-res pictures, write labels using
capital letters, numbers and red symbols, posi-
tion them on the screen, put optional borders
around them, and put optional pointers from them
to any area on the screen. Once you understand
the program, you may be able to design different
custom characters of your own.
mercial ones
The characters generated by this program are
limited to 70 per line. This is because the hi-res
screen can display a maximum of 280 pixels (points
of light) from left to right. Divide 280 by 70 and
you get a width of four pixels per character, Each
character needs at least one pixel for horizontal
separation, |
pi
wing an absolute minimum of three
to define the character.
Note that these characters are reGuite small. They
look best on a monochrome monitor or printout.
On a color monitor some letters lose definition due
to artifacting (unintentional color resulting from
the pe
on the
ion of the pixels relative to the phosphors
n).
The routine i
efficient and adaptable to your
own programs. The section at the end, beginning
with line 1060, is the first part that runs. It sets
up an array, B$(X), and stores the data for creating
the characters. Then it builds two shapes: cross hairs
for positioning the pointers and brackets for posi-
tioning your labels. We put these functions at the
end because they are used only once.
Data in lines 1150-1230 defines 61 characters from
! through ] (ASCII 33-93). Each is three pixels wide
and five pixels tall. Another way to say this is that
each character is composed of five rows of three
pixels each. Each pixel is either on or off, lit or
dark, so there are only eight possible combinations
for any row. Let’s represent this in standard binary
form as shown below. A dot means the pixel is off,
an asterisk means it is on.
=n0
wom]
* s2
ee = 3
* 4
or)
** 6
sa eee
ibilities
can be stacked in five rows to create the shape of
a character, for example, the letter A.
22
* eo
se 7
* ea 5
* gor}
Each row of three pixels can be thought of as
a binary number for which the decimal equivalent,
30
I COMPUTING
POWER PROGRAMMING
a single digit, is shown to its right. String the
decimal equivalents of the rows together to create
a code from which the program can reconstruct
the character. For example, 25755 represents the
letter A.
All the five-digit numbers in the DATA state-
ments were determined this way. Each represents
-odes, but there are
heme — size of character, for
the characters by changing th
limitations to this
example.
The program works in stages. We'll break the
program down into component parts and describe
them sequentially. The first chore is to set up
variables and data tables, so line 70 jumps to to
the end of the program to do this. Then lines
80—140 establish overall functional structure. Lines
160 through 290 load or save a hi-res picture for
you to label.
Lines 300—340 accept your input from the
keyboard and put it in ANSR$. Notice GET is
used instead of INPUT becauseApplesoft BASIC
will not accept the comma and colon characters
as input. The label can be up to 70 characters long
(one line). There is no limit to the number of labels
per picture.
Lines 350—480 position the label. Use the four
keys I, J, K, M as up, left, right, and down, respec-
tively to move the positioning brackets around the
screen. Lines 490 —520 darken the area where the
label goes. This makes the characters more visible.
At line 530 the program begins to plot the in-
dividual characters of the label. It takes the string
in ANSR$ and breaks it into individual characters.
The program then translates each character into
an ASCII code (See box, page xx), and puts the
value into the variable C.
one character. You can change the appearance of
Then the program looks up the character in the
array B$(x) and determines from the code how each
of the five rows should look. It puts the number
code for each row into variable PL and plots it on
the screen in lines 840 —920.
Option for the border is in lines 610 — 640; op-
tion for the pointer begins at 650
CHALLENGE: Can you redesign the characters
in lower case?
CHALLENGE II: Can you make the character
set taller and wider?
ASCII Values for this Program
33 =! 48=0 6=@ 79=0
34 = ¢ 49=1 65=A 80=P
3=# 50=2 6=B 81=Q
36=$ S51=3 67=C 82=R
7=% 5254 6=D 8=5
B=6 58=5 6G=E 84=T
39.=.' 54= 6 ‘OS F 85=.U
40 = ( S5=7 71=G 8=V
41 =) 56'S 8s. “72 =H. Bea Ww
42=* 57 = 9) 73= 1 88 = X
48=+ 58 =. | BS y
44=, 59 W=K 90 =Z
45 =- 60 Tesi 91S
46=. 61 Tf SIM, 92k \
47 =/ 62 = (8s) N)1: 93'S) )
= 63 = = =
NOTES:
Some commercial hi-res drawing programs:
Fontrix (Data Transformers); Apple Mechanic
(Beagle Bros.); Flex Text (Beagle Bros.) //
Listing on page 65
NO MORE TYPING!!
It’s true when you subscribe to Il Computing’s ACTION EDITION! Every issue
will contain programs for Education, Adventure, Utilities, Business and more.
Instead of keyboard frustrations and program debugging, all you have to do is
Load and Go! Find out more details in the easy-order Subscription forms in
this issue.
OCTOBER / NOVEMBER 1985 a
32
SPREADSHEET
HORRORS
And how to avoid them...
by ROBERT M. FREEMAN
Pe CN
preadsheet horror stories. No
for Multiplan is kludged to
a mutant surge suppressor.
Spreadsheet horror stories are the
recent revelations showing the risks
and hazards of careless spreadsheet
use. Thousands of would-be analysts
are setting up computerized spread-
sheets to assist them in business or
personal decision making. They ex-
pect the computer to chew up their
data and spit out the right answers.
So confident are they that they often
don't recognize wrong answers when
they them.
If a person uses a calculator, for
instance, to compensate for weak
math skills, chances are this person’s
math conceptual skills are weak as
well. When this conceptual weakness
is applied to spreadsheet design, you
can imagine what the potential for
error might be.
Don Valentine, a venture
capitalist quoted in Jnc. magazine,
said of some entrepreneurs who
didn’t make it: “Their thinking is
hindered by their reliance upon
computers. Since the advent of elec-
tronic spreadsheets, projections are
no longer written out by hand and
really thought about, with the result
that many people have no personal
understanding of the numbers
they're projectin;
The Wall Street Journal recently
reported an acquisition blunder that
cost a Texas oil and gas company
millions of dollars—and several ex-
ecutives their jobs. The error was
1 COMPUTING
ILLUSTRATION PAUL OLLSWANG
ii
he
traced to a faulty financial analysis
done with a personal computer
spreadsheet model.
A marketing manager at a Silicon
Valley computer firm, Business Week
reported, made an eight-million-
dollar mistake on for s for anew
line of computers. The manager
used the wrong formula for a price
discount on components which re-
sulted in underestimating co:
In Chicago a novice real estate in-
vestor used a spreadsheet program
template to forecast expenses and
OCTOBER / NOVEMBER 1985
Met tii
returns on a small office building.
Encouraged by the analysis, he
bought it. But while the building was
an open architecture design, the
template formulas for allocating
pace reflected traditional
closed-office design. As a It, the
investor seriously overestimated
potential revenue growth and suf-
fered a much lower
than he had ex
e of return
d.
> using spread-
than ever before; more
business and personal applications
are being programmed using
spreadsheets. In addition to the
above examples, typical applications
inventory man-
agement, sales forecasting, budget-
ing and a host of others.
Experienced spreadsheet users
will understand how blunders occur.
Most, in fas
own horror stories. And, what they
include accounting
could recount their
might agree upon is that cer
common problems relate to the very
essence of spreadsheet functions
continued on next page
33
34
WHAT SPREADSHEETS DO
Let’s look briefly at an example of
how spreadsheets work and where
problems can arise. Then welll ex-
plore ways to prevent spreadsheet
disasters from happening to you.
First, we need an explanation.
Personal computer spreadsheets
define and preserve numeric élations
between measurable entities. This
idea of relations is important because
a spreadsheet allows users to play
with many different combinations of
numbers without affecting the rela-
tion those numbers have to each
other.
In forecasting profits, a small
business owner might use a spread-
sheet program and define profits
quite simply: Profits are what’s left
from Revenues after Costs of Do-
ing Business have been met. The
algebraic presentation in a spread-
sheet would be Profits = (Revenues
— Costs of Doing Business). Note
that though Revenues or Costs of
Doing Business might change, their
relation to one another and to Pro-
fits remains the same.
A more sophisticated model
might include Units Sold, Price,
Unit Costs and Overhead.
Algebraically, Profits = (Units Sold
* Unit price) — (Units Sold * Unit
Cost) + (Overhead). (See accom-
panying figures.)
Even at this level, the formulas are
quite simple. A more sophisticated
profit equation could include hun-
dreds of variables from trade and
volume discounts to interest pay-
ments and inventory charges as
Figure 3 suggests. This kind of com-
plexity and repeated elaborations of
the spreadsheet model open up enor-
mous possibilities for spreadsheet er-
ror and, unless discovered, spread-
sheet disaster.
THE PROBLEMS
Specific problems can take many
forms: here are several examples.
1. Formulas are inconsistent. The
profit equation for one month or
quarter is different from other simi-
lar periods. This can occur in a var-
iety of ways including simple mis-
takes in construction, overwriting
formulas with other formulas or
data, or referencing a field which is
used for consolidation or other
purposes.
2. Formulas, though consistent,
are logically incorrect. This is com-
mon in spreadsheets of all sizes and
complexities. Ways for this to hap-
pen include: simply omitting some
entities; misgrouping brackets for
isolating algebraic operations; add-
ing subtotals instead of subtracting
(or vice versa); applying the wrong
formula (even though you use it cor-
rectly) to a particular function, for
example, using a logarithmic growth
formula for compound growth;
simply omitting some entities.
3. Formulas may reference them-
selves, other data or formulas that
contribute to their construction.
This problem, known as “circular
referencing)’ leads to a formula
feeding on itself, producing even
larger or smaller results as you repeat
calculations.
4. Data may be reported in con-
flicting magnitudes. Spreadsheet
analysts commonly represent mil-
lions as thousands. Reconversion
(using the thousand figure literally
in other parts of the spreadsheet) or
misinterpretation by other users may
lead to confusion and error. This
problem is especially troublesome
when consolidation of several
spreadsheets is involved, such as
when departmental budgets are
summed into a company budget.
5. Spreadsheet output is applied
inappropriately. “Profits” may
mean one thing for financial ac-
counting and something entirely dif-
ferent for tax accounting or
budgeting purposes. Similar
amounts entered into the wrong
spreadsheet or wrong spreadsheet
cell could prove difficult or impossi-
ble to reconcile. Gross errors result-
ing from these problems usually
stand out quickly. The real hazard
comes when errors are subtle or
when proven spreadsheets are mod-
ified without the user being aware
of their changed structure or
functioning.
In these cases, errors frequently
go unnoticed. Even when someone
does detect them, they are often im-
possible to isolate. Imagine having
to “cursor” through hundreds or even
thousands of cells, reading one for-
mula at a time, trying to track down,
a problem! And, spreadshe
Showing the first 100000 of 249432 characters.