WEIRDBENCH
Programming Explained
September 1993
Copyright 1993 Daniel J. Barrett
As you sit spellbound in your chair, zooming through the latest
16-way hyper-parallax-scrolling arcade game extravaganza, do you ever
wonder how the heck Amiga programmers make all this stuff happen? How do
they create and control the zillions of graphic thingies on the screen? Why
does the little guy move when you push the joystick? And how does an A500
with only 4096 colors manage such spectacular-looking crashes?
Well, wonder no more! This month, WeirdBench explains it all to
you. It's very simple and doesn't require any programming background. In
fact, if you DO have a programming background, you probably will not
understand this article at all.
To begin, it's important to realize why programming seems like
"magic" to the uninitiated. The reason is simple: it IS magic. One day
when you are feeling brave, open up your Amiga and find the panel that
reads, "WARNING: NO USER-SERVICEABLE PARTS INSIDE. DO NOT REMOVE UNLESS
YOU WANT TO VOID YOUR WARRANTY AND LOSE SOME LIMBS." Behind the panel, you
will find voodoo dolls, newt eyes, several scrolls and potions, and an
engineer's half-eaten peanut butter sandwich sprinkled with whiffle dust.
But on the technical side, creating a program requires that you
know a programming language. This is a language for writing commands to
tell the computer what to do. Unlike human languages, programming
languages are rarely spoken aloud, or at least not in polite company. Some
of the more popular ones are called BASIC, "C", Pastel, FORSKIN, Kobold,
and Lithp. Most Amiga programs are written in C, a language invented at
AT&T/Bell Laboratories in the 1970's and widely praised by programmers as
being "easy to spell." Some people complain that C code is difficult to
read, but they are clearly wrong, as illustrated by the following simple
example:
while (((x
Home