Skip to main content

Full text of "Commander - Volume 1 Issue 03 (1983-02)(Microsystems Specialties)(US)"

See other formats















744 


7o" 


12426 


02] 

















3>- «*fc 


L^kR 


^* 




■fclo 


;< 


fr ' - * 



* 



9 



"OBlS^. 



*>' 



r. 




o 



*MOfc 



UkP 



S£ ******? 



- MB ^ 1 ^ 



'ALJCN BL> 






W 



V ' 



^ s*vt 



^1 

AMOK 

GAME CARTBlEKSE 

POfi THE COMMODORE Vic ^O 



**> M satelute* 




□B A 



» 



__^ 






yicao- 



f* Llll iJ ; . 



UMI software. . .a world of choices 



A World of Fun! They're hot! They're new! The 
exceptional graphics and challenging play of UMI's 
games have made United Microware the leader in 
arcade-quality recreational software. 
A World of Help! UMI has created programs to 
help professionals and homeowners "take care of 
business." UMI can make your life a little easier 
with word processing, information storage, finan- 
cial management, hobbyist programs, utilities and 
communication programs — all with easy-to- 
understand instructions. 
A World of Choices! All programs come on cas- 



settes or UMI's own durable cartridges, depending 
on your selection. If you're looking for fun, or for 
an easier way to manage your personal business, 
look to UMI . . . the leader you can trust. UMI 
products are available at your favorite computer 
products store. 

Dealer inquiries invited. 



oiumi 



United Microware Industries, Inc. 
3503-C Temple Avenue 
Pomona, California 91768 
(714)594-1351 




Table of Contents 



STAFF 

Publisher 

THOMAS L. ROSENBAUM 

Editor 

ALICIA A. LINDEN 

Dealer Manager 
DEBBIE GABBARD 

Sales Manager 
TERILYN M. FLOYD 

Advertising/Article Manager 
LINDA L. LINDEN 

Typesetting 
GRANGE PRINTING 

Consultant 
EDWIN SUND 
GEORGE R. GAUKEL 

Printed By 
GRANGE PRINTING 

COMMANDER is published monthly by: 

MICRO SYSTEMS SPECIALTIES, P.O. Box 98827, 

Tacoma, Washington 98498 



Subscription Rates 

U.S. 

Canadian, Mexican 

Surface Rates 

Air Mail 



Per Year 
$22.00 
$26.00 
$37.00 
$54.00 



For back issues, subscriptions, change of address or 

other information, write to: 

COMMANDER 

P.O. Box 98827 

Tacoma, Washington 98498 

(206) 565-6816 



Copyright© 1982 by MICRO SYSTEMS SPECIALTIES 
All Rights Reserved 



10 

14 
17 
19 

24 
30 

34 
48 

50 
52 



VIC-20 

DOSPLUS: A DOS SUPPORT UTILITY FOR THE VIC-20 
By Eric Giguere 

ASSEMBLY LANGUAGE PROGRAMMING ON THE VIC- 
PART III 
By Eric Giguere 

RAVINGS OF A MADMAN 
By Tim Parker 

GOBBLE 

By Tim Parker 

PET/CBM 

A SUPER EDITOR FOR THE PET 
By F. Arthur Cochrane 

PROGRAMING TIME 
By Hal Bredbenner 

64 

A SPRITE EDITOR FOR THE COMMODORE 64 
By Garry Kiziak 

PEEK & POKE #8 
By George R. Gaukel 

FEATURES 

BYTES, BITS, AND BINARY 
By Tim Parker 

WHY DIDN'T I THINK OF THAT? 
By Howard N. Rotenberg 



DEPARTMENTS 



4 Letters to Editor 

5 Editorial 

6 New Products 
8 News Releases 

56 User Clubs 

57 Dealers 

66 Game Contest 

68 Advertisers Index 



Commander February 1983/1 



FORTHEVIC-20 ( 



THE COMPUTER REVOLUTION IS COMING! 
BE READY WITH A MASTERY OF THE COMPUTER KEYBOARD! 

IN THE AGE OF THE COMPUTER, EVERYONE FROM THE SCHOOL CHILD TO THE CHAIRMAN OF THE BOARD SHOULD 
BE AT HOME AT THE COMPUTER KEYBOARD. THESE PROGRAMS PROVIDE EVERYTHING YOU NEED TO MASTER THE 
KEYBOARD AND GAIN THE COMPETITIVE EDGE THIS BRINGS IN THE COMPUTER AGE. 

* Rated THE BEST educational program for the VIC-20 by Creative Computing Magazine 

* TYPING TUTOR PLUS WORD INVADERS — $21.95 

(2 programs on one cassette tape for the unexpanded VIC-20) 

Typing Tutor plus Word Invaders makes learning the keyboard easy and fun! Typing Tutor teaches the keyboard in easy 
steps. Word Invaders makes typing practice an entertaining game. Highly praised by customers: "Typing Tutor is great", 
"Fantastic", "Excellent", "High Quality", "A source of great learning and joy for our children." 

Customer comment says it all . . . 

". . . and it was everything you advertised it would be. In three weeks, my 13 year old son, who had never typed before, was 
typing 35 w.p.m. I had improved my typing speed 15 w.p.m. and my husband was able to keep up with his college typing 
class by practicing at home." 



FOR THE COMMODORE 64< 



SPRITE DESIGNER by Dr. Lee T. HIM - $16.95 

Save hours of work when designing sprites. Helps you create multiple sprites, copy and alter them to create views from 
different perspectives automatically for 3-D or animated effects. Options include: copy any of the previous sprites, reflec- 
tion, rotation, translation, shearing, reverse image, merge & intersect. Saves sprite data for merge into your program. 

SHIPPING AND HANDLING $1.00 PER ORDER. CALIFORNIA RESIDENTS ADD 6% SALES TAX. 
VISA AND MASTERCARD ORDERS MUST INCLUDE FULL NAME AS SHOWN ON CARD, CARD NUMBER, AND EXPIRATION DATE. 

FREE CATALOG SENT WITH ORDER AND ON REQUEST 



ACADEIilV 

p.o. box 9403 orvzr\A/J\nc 

SAN RAFAEL, CA 94912 O U T I WA I < t 



(415)499-0850 



Programmers. Write to our New Program Manager concerning any exceptional VIC-20 or C64 game or other program you have developed. 



Call for Clubs and Newsletters Directory 

To be included in the first edition of the Commander Clubs and 
Newsletters Directory, your club or publication must supply the 
following information: 

1 . name of organization or publication 

2. mailing address 

3. contact person and telephone number 

4. name of newsletter or publication 

5. special interests 

Send your information to Clubs and Newsletters Directory, 
Commander, P.O. Box 98827, Tacoma, Washington 98498. 



Commander— The Monthly Journal for Commodore Computer Users is published monthly by Micro Systems 
Specialties, P.O. Box 98143, Tacoma, WA 98498. Domestic Subscriptions, 12 issues, $22.00. Second Class 
Postage pending at Tacoma, WA 98404 and additional mailing offices. Postmaster: Send address changes to: 
Commander— The Monthly Journal for Commodore Computer Users, P.O. Box 98827, Tacoma, WA 
98498. Entire contents copyright © 1982 by Mirco Systems Specialties. All Rights Reserved. 



2/Commander February 1983 



CdMfi*DflTfl SOFTWARE 



GUIDES YOU AND YOUR 
VIC 20 s DOWN ROADS OF 
ADVENTURE WITH: 



Maelstrom* 
Escape MCP* 
Gator Chase* 
Astro Command 
Caves of Annod 
Capture the Beast 
Whirlwind Rescue* 
Street Maze 
The Market 
Chivalry 



THROUGH TRAILS OF 
CREATIVITY WITH: 

• Sketch and Paint 



"Ti2 



-..,.. 








Quality software also available 
for Pet and Commodore 64 computers 



ALONG THE PATH TO 
KNOWLEDGE WITH: 

• Wordspot 

• Math Tutor Series 

• Alphabet Tutor 

• Conversion 

• Gotcha Math 

• English Invaders 

• Math Invaders Series 

ASK FOR COMM*DATA 

COMPUTER HOUSE SOFTWARE 

AT YOUR LOCAL DEALER. 

Or Send for FREE Catalog: 

COMM*DATA COMPUTER HOUSE 

320 Summit Avenue 

Milford, Michigan 48042 

(313) 685-0113 

Dealer Inquiries Welcome, 



VIC 20 is a Registered Trademark of Commodore Business Machines, Inc 
*High Res Full Machine Code Arcade Style Games. 



Letters to the Editor 



For you dear readers that have not 
yet figured it out, let me begin by say- 
ing that I am a very opinionated fellow 
and will be happy to express by opi- 
nion at the drop of a hat, or anything 
else covenient. Lately I have formed 
the opinion that Commodore could 
have done a slightly better job with our 
VIC had they only included a RESET 
button. 

A RESET button is a very handy lit- 
tle device that could have been add- 
ed in the manufacturing process for a 
few pennies or maybe a couple of 
dollars at most, but costs many dollars 
to have added later if one is not able 
to do it himself. All of the necessary 
parts can be obtained at Radio Shack 
for those that are able to do things like 
this and it is well worth the time. If you 
can't then I'd recommend taking your 
VIC to a competent technician and 
having a reset switch put in. 

What is a reset switch and what is 
it used for? I'm glad you asked. A reset 
switch performs the same function as 
the on/off switch only it doesn't cause 
wear and tear on the sensitive power 
supply nor does it subject the sensitive 
CMOS circuitry inside the VIC to the 
transient voltages associated with turn- 
ing the power off and on. 

The reset switch performs its magic 
by applying a "ground" or low volt- 
age, or "zero," to a line inside the VIC 
that is designed for that purpose. 
When you RESET your VIC, the screen 
shows the familiar: 
****** CBM BASIC V2 ****** 
3583 BYTES FREE 
READY 

6 

just as if you had turned it off and on. 

Many of you may not see the advan- 
tage to the reset even now. The only 
way I can explain is to remind you of 

4/Commander February 1983 



the times that you have had a game 
loaded in that wouldn't repond to the 
RUN/STOP and RESTORE keys and 
the only way you had to get control of 
your VIC back was to turn it off. 
Another, perhaps less obvious, advan- 
tage is for those of you that have 
"mother boards" and want to switch 
games or cartridges in and out. 
Several mother boards come with 
reset switches on them but if you have 
one that doesn't (as I do) then you can 
now have a RESET to play with just like 
the big boys. The way to accomplish 
this miracle— simplicity itself as Com- 
modore brought the necessary lines 
right out to the expansion port so all 
that needs doing is to follow these sim- 
ple steps; 

1. Carefully take your VIC apart. 

2. Locate a convenient mounting 
spot for momentary switch. 

3. Locate pins X and Z on the bot- 
tom of the board at memory expansion 
port. 

4. Run one wire from pin X to one 
side of your switch, run another wire 
from pin Z to the other side of your 
switch. 

5. Carefully reassemble VIC. 

That should take care of that. There 
is an alternate method, and that is to 
mount your switch on your mother 
board if you have one. Additionally, 
you can always take your VIC to the 
competent technician mentioned 
above. 

On another subject entirely, for 
those of you that may have read any 
of my previous OPINIONS you know 
that I have had a very difficult time ob- 
taining a 16K memory expansion 
because the company I originally 
ordered from didn't have it in stock, 



etc., etc. Well, I finally got a 16K ex- 
pansion and was able, at last, to run 
my 'VIKING!' game that I had obtain- 
ed from Prickley-Pear Software. I want 
you to know it was worth the wait. 

'VIKING!' is an adventure type 
game that is available on disk, re- 
quires 1 6K of memory expansion and 
consumes HOURS. It can be played 
by one to four players and the pro- 
gram asks if each player is "man or 
woman" and then proceeds through 
the rest of the game with that 
information. 

The play is engrossing, everyone 
starts out as equals in the year 750 in 
Norway as "holders" with a certain 
amount of land, a boat, a few people 
and a few other items. The object of 
the game is to acquire land, people 
and goods in sufficient quantity to be 
promoted, ultimately, to King and thus 
win the game. It takes a very careful 
and skillful player to get the right items 
at the right time without some disaster 
befalling you such as plague, raiders, 
tax revolt, bankruptcy, poor harvests 
or other pitfalls. All in all a thoroughly 
enjoyable game and one I would 
recommend. 

We're also tried out the Discwasher 
"Pointmaster" joystick, available from 
Discwasher. The jury is still out around 
here on this one, about all I can say 
for it right now is that the feel is "dif- 
ferent." The kids seem to like it though 
and they are the ones that will use it 
the most so maybe my opinion will im- 
prove as I become more familiar with 
it. 

Until we meet again, that's my opi- 
nion, what's yours??? 

by Fred S. Dart 
Salem, Utah 



Editorial 



AN APOLOGY TO 
JIM STRASMA 

It has come to our attention that Mr. 
Jim Strasma, editor of the Midnite Soft- 
ware Gazette, has been unable to con- 
tact us by mail. I sincerely regret this 
occurence and hope that it will not 
happen again, but I have no record of 
having received any letter from Mr. 
Strasma. I have no intention of blam- 
ing the U.S. Post Office for this fiasco 
and accept full blame myself. Our 
lifeblood is the Commodore public and 
Commander will NEVER knowingly ig- 
nore the well intentioned request of 
any person, least of all someone of Mr. 
Strasma's stature. We strive to 
serve our readers to the very best of 
our ability and will reply to every letter 
which we receive. 

I apologize for this rtiixup, Mr. 
Strasma, and hope to be of service to 
you in the future. 

—Publisher 




We at Commander are very excited 
about some new departments which 

we are beginning this month. We 
received an enthusiastic response to 

our call for information on Commodore 
Users' clubs and want to provide a 
forum for the public exchange of infor- 
mation on other subjects in order to 
foster a spirit of cooperation among 
Commodore users worldwide. There 
are many people in various parts of the 
world with unanswered questions 

about their computer systems and just 
as many people who know the 

answers to their questions. We intend 
to bring the askers and the askees 

together in an effort to make com- 
puting more fun and enjoyable and 
less frustrating. 

Our new Bits and Pieces Depart- 
ment will spotlight questions put forth 
by our readers and feature the 
answers provided by other readers or 
one of Commander's technical ex- 
perts, if necessary. 

In order to make this project a suc- 
cess, we will need the help of our 

readership. No question should be 
considered too large or too small. 

Technical, non-technical, educational, 
business and recreational questions 
are all fair game and should be sub- 
mitted. A good example would be in- 
formation exchange between the scat- 
tered Superpet owners in the States 
and their Canadian compatriots. There 
is generally more Superpet knowledge 
in Canada since the Superpet was 
designed and developed there. 

The Live Wire Department will focus 
on the popular field of electronic 



bulletin boards— if you or your 
organization are running an electronic 
bulletin board, let us know the par- 
ticulars of your system so that we can 
spread the word. 

There is still no solid word from 
Commodore on whether or not they 
will market the Max Machine in the 
U.S. We have seen a recent news- 
release for the Max in an American 
magazine which leaves one with the 
impression that you should be able to 
buy one. Commodore public relations 
officials state that the release of the 
Max has been postponed indefinitely, 
which is not surprising in light of the 
fact that the VIC-20 can be purchas- 
ed at discount stores for less than 
$160.00. The Max is selling well in 
Japan at this time and we hope that 
Commodore will release it in the U.S. 
soon. 

One last hot tidbit this time 
around— Commodore and Zilog has 
reached an agreement and we should 
see a Z8000 based, low cost 16 bit 
microcomputer from Commodore in 
the future. This deal was a fine exam- 
ple of a true symbiotic relationship- 
Commodore did not want to spend the 

time and/or money to develop a 1 6 bit 
microprocessor and Zilog desperate- 
ly needed a major OEM to go for the 
Z8000 before Motorola's 68000 com- 
pletely buried it. The first inexpensive, 
powerful, 16 bit personal micro will 
definitely carve a niche for itself in the 
marketplace— look for Commodore to 

release this baby in the third quarter 
coupled with a price drop on the 64 

in order to establish a market position 
for each machine. 

Commander February 1983/5 



New Products 



CX6401B COMMODORE 
64/VIC-20 PARALLEL 
PRINTER INTERFACE 

ECX COMPUTER COMPANY an- 
nounces its new Model CX-6401B 
printer interface for the Commodore 
64 and VIC-20 computers. The 
CX6401 B interface allows these com- 
puters to use ANY type of standard 
commercially available parallel inter- 
face type printer. This new interface is 
fully compatible with the popular 
WORDPRO 3+ wordprocessing pro- 
gram. In addition CX6401B also has 
all of the features of the original 
CX6401 model. 

The CX6401 B interface connects to 
the SERIAL PORT/BUS on the com- 
puter, NOT the user port, allowing the 
user port to remain open for use by a 
MODEM or other RS-232C peripheral 
device. 

Some of the key features of the 
CX-6401Bare: 

* Compatible with WORDPRO 3 + 
wordprocessing program. 

* Eliminates hand shaking problem 
of RS-232C cartridge. 

* Mode switch to correct ASCII 
problem. 

* No expensive RS-232C cable 
necessary. 

* Lower cost than RS-232C type 
hook-up. 

* Allows use of lower cost parallel 
type printers. 

* No external power required. 

* Allows use of multiple printers. 

* Unused user port lines available 
for external usage. 

The CX-641 OB comes standard with 
a 3 ft. serial bus cable and connector 
for direct connection to the Com- 
modore 64 or VIC-20 and a 1 ft. 
parallel cable for connection to the 
printer. 

Suggested Retail Price: $89.95. 

6/Commander February 1983 



For more information contact: 
ECX Computer Company, 2678 

North Main St., Walnut Creek, Ca. 

94526. (415) 944-9277. 



direct connection to the Commodore 

64 or VIC-20. 
Suggested Retail Price: $79.95. 
For more information, contact: 
ECX Computer Company, 2678 

North Main St., Walnut Creek, Ca. 

CX6405 COMMODORE 94526 < 415 > ^4 9277 
64/VIC-20 EPSON MX 

SERIES PRINTER The AVALON HILL Game 

INTERFACE Company 

ECX COMPUTER COMPANY an- Perhaps it is pure luck of even sheer 

nounces its new Model CX6405 EP- genius but EIGHT MICROCOM- 

SON printer interface board. The PUTER GAMES CASSETTES FOR 

CX6405 allows the new Commodore THE PET 2001 are ALSO COMPATI- 

64 and VIC-20 computers to connect BLE WITH THE HOT, NEW COM- 

directly to any model of the EPSON MODORE 64 COMPUTER! 

MX series of printers, including the The following multi-cassette games 

new high speed FX-80 F/T. The are ready to run on the "64"; 

CX6405 installs internally within the #40001 B-1 Nuclear Bomber 

EPSON MX series printers. This new $16.00 

interface is fully compatible with the #40101 Midway Campaign. .16.00 

popular WORDPRO 3 + wordprocess- #40201 North Atlantic Convoy Raider 

ing program. 1 6.00 

The CX6405 interface connects to #40301 Nukewar 16.00 

the SERIAL PORT/BUS on the com- #40401 Planet Miners 16.00 

puter, NOT the user port, allowing the #41601 Draw Poker 16.00 

user port to remain open for use by a #40901 Computer Stocks & Bonds 

MODEM or other RS-232C peripheral 20.00 

device. #42001 Andromeda Conquest 

Some of the key features of the 18.00 

CX6405 are: #41501 Computer Football Strategy 

* Compatible with WORDPRO 3 + 1 6.00 

wordprocessing program. #42401 Telengard 24.00 

* Eliminates hand shaking problem We share Commodore's praise of 
of RS-232C cartridge. their new "64" as "The machine 

* Mode switch to correct ASCII their competitors couldn't do at half 
Problem. the price." And Avalon Hill is ready 

* No expensive RS-232C cable and able to supply your software 
necessary. needs with strategy games that 

* Lower cost than RS-232C type already have proven sales 
hook-up. performance. 

* No external power required. 

* Allows use of multiple printers. New Product Information 

* Unused user port lines available Please note that Cyberia Inc., Ames, 
for external usage. Iowa, has released a farm accounting 

The CX6405 comes standard with a package for the Commodore 64 com- 

3 ft. serial bus cable and connector for puter. Cyber-Farmer 64 is a new ver- 



sion of the Cyber-Farmer program 
which has been in use by many 
farmers in the midwest for more than 
two years. The retail price of Cyber- 
Farmer is $1 95. It is available through 
Commodore dealers or directly from 
Cyberia Inc. 



TM 



Sprite Shaper 

The Sprite Shaper™ program 
allows the Commodore 64 owner to 
quickly and easily design sprites 
(movable object blocks) for use in 
game programs or other applications. 
No graph paper is needed. No math 
is necessary to use the program. 

The Sprite Shaper has many useful 
features, yet it is very simple to use. 
Many safeguards and provisions have 
been built into the program to protect 
against user errors and to increase 
program speed. 

One of the unique features of the 
program is the constant display of the 
sprite being edited in all four possible 
sizes. Any change to the sprite will be 
immediately shown in all four sizes of 



sprites. This is a great help in design- 
ing sprites. The sprite color and 
background color can quickly be 
changed to see how different color 
combinations will appear. Up to four 
different shapes can be designed and 
saved to either printer, (VIC-1525) disk 
drive, or cassette. With the Deluxe Ver- 
sion, shapes can be reloaded later for 
further editing. 

A menu allows you to choose color, 
shape number, background or sprite 
priority, and size. The program 
automatically calculates the poke 
statements for your program. No more 
binary arithmetic necessary for most 
applications! 

Each Sprite Shaper Program comes 
with a thorough owner's manual that 
gives a complete lesson on using 
sprites as well as tips on using the 
program. 

The deluxe version allows the use of 
three colors per sprite. Each individual 
sprite color can be changed to try dif- 



ferent effects. The constant display of 
the four sizes of sprites is very useful 
in designing multi-color sprites. 

Regular Version 

Cassette $24.95 

Diskette $26.95 

Deluxe Version 

Cassette $29.95 

Diskette $31.95 

Shipping to USA and Canada includ- 
ed in above prices. 



TM 



Sound Shaper 

The Sound Shaper program allows 
you to fully explore the capabilities of 
the 6581 Sound Interface Device (SID 
chip). This chip has all the features and 
capabilities of a music synthesizer. The 
Sound Shaper program allows you to 
adjust various features of the SID chip 
quickly and easily. 

Four different waveforms can be 
chosen. Different attack, decay, and 
release rates, as well as different sus- 
tain ievels, can quickly be chosen. Dif- 

Continued on page 67 



V&T 



NEW 

VIC SOFTWARE VIC 



COMPUTERMAT • BOX 1664M 
LAKE HAVASU CITY, ARIZONA 86403 



NEW COMMODORE 64 SOFTWARE - FREE CATALOG 

(602) 855-3357 write for free catalog of vie software 



WARNING - BUYERS OF THESE GAMES HAVE BEEN KNOWN TO BECOME ADDICTS 



ALIEN INVASION — Arcade style excitement for your VIC. Look out here 
they come. Aliens are descending from the sky. Move your laser into position 
and defend the earth. The attacks are unending — can you survive or will 
Vader rule the galaxy. Many extras on this one. 20 levels of play. 
CATTLE-ROUNDUP — The cows are loose in the maze. You have 2 
minutes to get each cow back into the corral. You can push, coax and call the 
cows. Some cows are not very smart and some are very stubborn. You will 
have to help them. Be careful that you don't leave the corral gate open. Color 
graphics and sound. Eight levels of play and a time limit. 
HEAD ON — Your car moves forward around t he race track. You can move 
up, down, right and left. Try to score points by running over the dots on the 
track. Watch out for the crusher — if you crash you lose a car. Four cars and 
bonus levels. Full color graphics and sound. Fast action and very addicting. 9 
levels of play. 

SNAKEOUT — Blocks appear on the screen at random. You move up, 
down, right and left and try to move your snake over the blocks. Each block 
that you get raises your score. Keep building your score but watch out 
because the escape routes keep getting smaller. Time limit, color graphics 
and sound. 3 games on this cassette. Snakeout — 2 player Snakeout and 
Trapper. 9 Levels of Play. 

TARGET COMMAND — Move your laser into position and get ready for 
some quick action. Different types of missiles are dropping. How many can 
you shoot down. They all travel at different speeds and different levels. You 
must be fast on the trigger to get them all. Time limit, bonus points and very 
addicting. Color graphics and sound. Arcade style fun. 10 levels. 



RUNS IN STANDARD VIC-20 




$12.95 Each 



SOFTWARE FROM 

COMPUTERMAT 

WILL TURN YOUR 

VIC-PET-CBM INTO A 

HOME ARCADE! 



ADD $1.00 FOR SHIPPING AND HANDLING WE WELCOME YOUR PERSONAL CHECK 



Commander February 1983/7 



News Releases 



Superscript 

The Management Accountability 
Group, Inc. (MAG) has acquired 
marketing rights to Precision Soft- 
ware's new word processing software 
"Superscript." Under two separate 
agreements MAG will: 1) distribute the 
Commodore Business Machines ver- 
sion of Superscript throughout six 
southern states (North Carolina, South 
Carolina, Georgia, Florida, Alabama, 
and Tennessee) and 2) convert the 
program to Texas Instruments Busi- 
ness Systems and market it nationally. 

According to Peter Masterman, Vice 
President of Operations, word pro- 
cessing marketers have traditionally 
looked at themselves as "God's gift to 
computer retailers." Word processing 
has been sold like a commodity, thus 
carrying very low margins for the com- 
puter dealer. MAG plans on changing 
that by offering their Superscript 
dealers significant margins. This will 
enable dealers to provide better ser- 
vice to their end users. 

After several reviews of Superscript, 
MAG is convinced it is as powerful as 
any word processor on the market to- 
day including Word Pro 4 Plus, Magic 
Wand, and Word Star. 



Secure 

A new program encryption kit 
manufactured in England by Com- 
puter Applied Technology is now 
available in the United States. Called 
SECURE, the encryption kit is endors- 
ed by Commodore and produces 256 
encryptions of single programs at ran- 
dom. Before decrypting programs, 
SECURE performs a series of checks 
to insure that the system is normal and 
then continually monitors for improper 
hardware or software interruptions, 
SECURE will not react to any device 

8/Commander February 1983 



or any routine which is call enabled 
from a protected program. The unit is 
compatible with BASIC, Composite 
and Machine Codes, and consists of 
a leather-walleted key, a cassette or 
disk, a comprehensive manual and 
registration card. 

Priced at $1 00.00 retail, SECURE is 
available from a San Diego-based firm 
called Distribution Unltd., P.O. Box 
81702, San Diego, CA 92138-1702. 
(619) 299-3718. Dealer inquiries 
welcome. 

National Educational 
Computer Library 

NECOL is a non-profit educational 
organization that serves as a national 
resource center, assisting schools in 
their educational computer goals. 
Among other activities we review soft- 
ware and computer books to help 
schools locate suitable educational 
computer programs and we publish 
bibliographies on articles written in 
magazines relating to computers in 
education. Basically we act as a na- 
tional specialized informational center 
assisting schools in filling their educa- 
tional computer needs. In conjunction 
with the above we publish the National 
Educational Computer Review, a 
tabloid newspaper which is distributed 
free of charge to over 30,000 public 
and private grammar schools and high 
schools nationwide. National Educa- 
tional Computer Library, 1 6 Main 
Street, New Milford, CT 06776. 
(203) 354-7760. 

Software in 

The United Kingdom 

and Middle East 

The Management Accountability 
Group, Inc. (MAG) has consumated 
agreements to market their small 



business software in the United 
Kingdom and the Middle East. The 
programs will be available for the IBM 
PC, Texas Instruments 300, 600, and 
800 Series, Victor 9000 and Com- 
modore Business Machines computer 
lines. 

The MAG software will be distri- 
buted on a royalty basis allowing MAG 
to maintain control over marketing 
efforts. 

According to Peter Masterman, Vice 
President of Operations, MAG has 
declined several offers to purchase 
foreign marketing rights to MAG soft- 
ware. "MAG is and will remain a 
marketing organization. We began 
developing business software 
because of the lack of good quality, 
fully integrated business software for 
micro computers." 

For further information, please con- 
tact Peter H. Masterman, Vice Presi- 
dent of Operations. 




TYPE-SHARE TYPESETTING 

EDUCATIONAL SPECIALISTS 

SILICON OFFICE SPECIALISTS 



SOUTHERN CALIFORNIA 

MAINTENANCE CENTER 

FOR COMMODORE EQUIPMENT 




VIC-VILLE m SOFTWARE 

division of Data Equipment Supply Corporation 



BOSS (c) by Kavan Software 



Exclusive distributors of 
Kavan Software 



8|jR 


£? 


n 


& 


^ 


& 


hI 


Si 


H& 


A 


A 


n 




" 




n 


^ 








a 
















^ 
















i 
















2] A 




£ 




A 




A 




11 


PI 


* 


[5BJT 


*> 


El 


* 


HI 


IRIB IC ID IEIF I6IHI 




77?e Definitive Chess Game 
for the VIC-20 



- 02 . 1.5 



S1H 
2000 



- 00 . ©0 



* 10 Levels of Play 
& Beats Sargon II 

* Two Clocks 

ir Wide range of opening moves 

* En passant, queening, castling 

ir Change screen and board colors 

* Cassette 

-sir Requires 8K minimum expansion 

* 100% machine language 

$39.95 




BONZO (c) by Kavan 



HOPPER 



PIT (c) by Kavan 




One of the most popular games in 
Europe. You control BONZO as he climbs 
the ladders and picks up the'point blocks. 
Watch out for. the alien guards. 100% 
machine language, cassette based. 
Joystick or keyboard, minimum 8k ex- 
pansion. $20.00 



Avoid the cars, dragsters, buildings, logs 
and other obstacles to bring the frog 
safely home. Machine language for fast 
and smooth arcade action. Joystick, stan- 
dard VIC. $20,00 



BONZO strikes again as he takes money 
bags out of the pit Avoid the alien rain by 
standing under the shields. Every succes- 
sfully removed bag of money reinforces 
your sheilds. 100% machine language, 
cassette based. Joystick or keyboard, 
standard VIC. $18.00 



Commodore 64 YAHTZEE 



ii mm 



:! iE-IHC I 



Commodore 64 version of the famous 
dice game. 10 player capacity. Watch 
dice roll across the screen. Automatic 
tabulation of score and bonuses. Sprite 
graphics and sound. Cassette based. 

$20.00 



Night Crawtor $25.00 

by Interesting Software 

Shoot down centipedes, spiders, mushrooms and all 
kinds of bugs before they get you. Machine language 
arcade action on standard VIC with joystick. 

Tha Black Caatle $20.00 

Adventure, travel the countryside, fight demons, buy 
goods, storm the castle. Requires 3k or more expan- 
sion. 

A Maza Ing $12.00 

Travel through the maze. Game of skill and tense ac- 
tion. Standard VIC. 

Gobblar $11.00 

Sounds easy? You have 25 seconds to gel him and 
the time gets shorter at each higher level. Standard 
VIC. 

Hang U $12.00 

Traditional Hangman plays against the VIC'S 250 
wqrd dictionary or another person. Standard VIC. 

Coggla $11.00 

Computerized version of Boggle. Standard VIC. 

GoM Brick $14.00 

Many levels of play, sound, and color. 

Complete descriptive catalog $2.00 



3-0 Labyrinth $14.00 

Escape from the labyrinth. Shown in 3-D perspective 

view with randomly generated mazes. Standard VIC. 
Air Strlka $11.00 

Fly the new super bomber V-20 on a mission. Stan- 
dard VIC. 
Attack on Silo III $12.00 

You are the commander of Silo III. Defend your 

country. Standard VIC. 
Baaaball Strategy $12.00 

The excitement of baseball as a video strategic 

game. Standard Vic. 
Vic Pokar $14.00 

Play poker against the VIC. Hi-res graphics and 

sound. Standard VIC. 
Froggar by (c) Kavan $14.00 

Eat the flies and avoid the car. Standard VIC. 
Spaca Phraafcs $25.00 

by Intaraatlng Softwara 

Pilot the spaceship "Infinity" and fight the "Space 

Phreeks". 15 different attack patterns. 33 levels. 

Machine language, arcade quality. Standard VIC, 

joystick. 

Dealers Welcome - Authors Wanted I 



Mailing Ltat $25.00 

Keep mailing list, print reports, labels. 8k expansion 

or 16k expansion required. 
Aatro-Mlnare $17.00 

Hi-res graphics and sound space game. Requires 3k 

or 8k expansion. 
Panzar Attack $14.00 

Enemy tanks are attacking and you must destroy 

them. Hi-res graphics. Standard VIC. 
Padaatrlan Polo $14.00 

Drive your car thru the streets. Based upon Death 

Race. Standard VIC. 
Yahtzaa $12.00 

Solitaire version of this famous dice game. Standard 

VIC. 
Commodora $4 Softwara Avallabla Now II 

94 Monopoly from AP Software 

84 Mailing Uat from VIC-VILLE 1 " Software 

54 Flnanca from VIC-VILLE"" Software 

94 Tlma Managar 2.0 from TOTL Software 

Look for more 64 Software from VIC-VILLE 1 " & get on our 
mailing list for all 64 updates and users' group. 

Add $3.00 for shipping & handling 



Network your CBM, VIC and COMMODORE 64 with the PET SWITCH and VIC SWITCH from DATATRONICS. 

Distributors for Datatronic AB 



(714) 
778-5455 



Data Equipment Supply Corp. (213) 

8315 Firestone Blvd., Downey, CA 90241 923-9361 



Commander February 1983/9 




VIC 20 



DOSPLUS: A DOS Support Utility for the VIC-20 



For those of us lucky VIC owners 
who have a disk drive, it has to be ad- 
mitted that it's probably one of the best 
things we did for our computer (and 
ourselves!). The increased speed and 
storage capacity sure make a dif- 
ference over cassettes. But as for ease 
of use, well, it has to be admitted that 
it could have been done better. The 
manual is very hard to follow and in- 
structions not explained well or in 
detail. And for those of use who have 
worked on Apples and TRS-80s, the 
way that you control the disk is totally 
unfamiliar. It takes quite a bit of work 
just to prepare a disk for loading or 
saving. That is why I created 
DOSPLUS— a DOS Support program 
for use with the first disk drive (device 
no. 8). I'm sure that you'll find it very 
useful, because I have. So if you're in- 
terested, read on! 

Why a DOS Support Program? 

I was sitting at my computer one 
Sunday afternnon, with nothing too im- 
portant to do, when I decided to 
created a DOS support system. I had 
gotten sick and tired of having to 
OPEN a file each time I wanted to 
send a command to the disk drive, 
and so decided to do something about 
it. Thus, in the time from 2 p.m. to 4 
p.m., DOSPLUS was created! 

For those of you who don't yet know 
the intricacies of Commodore's DOS 
(Disk Operating System), it can be 
described, as I mentioned above, as 
cumbersome. To communicate with 
the disk, you have to OPEN a file in 
BASIC and then send the command 
to the disk through the file via a 
PRINT# command. An example would 
go as follows: 

OPEN15,8,15 
10/Commander February 1983 



by Eric Giguere 
Alberta, Canada 

READY. 

PRINT#15,"INITIALIZE" 

READY. 

What happened here is that you 
OPENed a file to what is called the 
"command channel" of the disk drive. 
Whatever you send to this command 
channel will be interpreted as a com- 
mand to be executed, not as data. 
Thus you are ready to send a com- 
mand, as flagged by the READY given 
by the VIC. (For those of you who don't 
know what the three numbers follow- 
ing OPEN are, they signify the follow- 
ing: 15 = file no., a reference for both 
you and the VIC; 8 = device no., which 
in this case means the first disk drive; 
and 15 = command channel, which 
allows you to send commands to the 
disk. Notice that the file no. is the same 
as the command channel. This allows 
us to easily remember which file gives 
access to the command channel. The 
result of the OPEN command will then 
be to OPEN logical file number 15 
which will access the command chan- 
nel 1 5 of the device number 8, the disk 
drive.) What you must now do is send 
the command, and this is achieved by 
using PRINT#. In the example we 
PRINT#15, "INITIALIZE". What this 
does is send the command "IN- 
ITIALIZE" through fife number 15 to 
the disk drive. The DOS in the drive will 
then interpret the command and pro- 
ceed to execute it. (INITIALIZE simply 
prepares the disk drive for the use of 
a different disk. It does not format a 
disk, as in other DOSs.) As you see, 
this is a very unwieldy way of telling the 
disk that a new floppy has been plac- 
ed in it. 

How to Use DOSPLUS 

As opposed to constantly OPENing 



and PRINTing to a file, DOSPLUS 
allows you to hit one key and then type 
your command. When you hit the 
RETURN key, the command will 
automatically be sent to the disk drive 
and executed (as long as it is a legal 
command). This greatly simplifies the 
use of the disk drive, as any command 
can now be instantly sent with only a 
few keystrokes. Following is how to 
use DOSPLUS: 

1) First activate DOSPLUS, using 
the instructions in the following part. 

2) Next, hit the right bracket key (']'), 
by using SHIFT and the semicolon 
key. 

3) Type in the DOS command, ex- 
cluding the PRINT# and quotations. 
Example: PRINT#1 5, "INITIALIZE" 
would become ]INITIALIZE. 

4) After making sure everything is 
OK, hit the RETURN key. PRESTO! 
The disk drive comes to life and ex- 
ecutes your command. Isn't that easy? 
And it works for every command, in- 
cluding NEW, COPY and SCRATCH. 
Now life is really easy. One note 
though: DOSPLUS does not work in 
a program. You can only use it in the 
direct mode, when not using line 
numbers. In a program you must use 
the procedure of OPENing and PRIN- 
Ting to files as usual. But then, I didn't 
promise you perfection! 

DOSPLUS also adds two new com- 
mands to your repertoire, though they 
really aren't commands. The first is the 
'E' command. This stands for 'Error' 
and prints to the screen the present er- 
ror status of the disk drive. So instead 
of having to type in 

10 OPEN15,8,15: 

INPUT#15,A,B$,C,D: 

PRINTA;B$;C;D 
and then running that line to get the 



present error condition of the drive, 
you simply type: 

]E (RETURN) 
and the same information will be 
displayed on the screen. To 
demonstrate this, type in the following: 

OPEN1,8,2, M XYZ" (RETURN) 
Now, assuming that you don't have a 
file by that name on the disk, the error 
light on the drive will begin to flash, 
signaling some kind of error. You then 
have two options to find out what kind 
of error it is. Either type in line 10 
above or simply use ]E (RETURN). 
Both will give you 

62, FILE NOT FOUND.00,00 
or some variant, but which is the easier 
to use? Unless you like doing things 
the hard way, I'm sure you'll agree that 
the E command is the easiest to use. 

The second "command" added by 
DOSPLUS is 'K\ for Kill. It disables 
DOSPLUS, which means that you 
won't be able to use the right bracket 
key anymore to send disk commands. 
Why is it needed, you ask? The fact is, 
if you load a program from tape or use 
the cassette recorder in any way, you 
will destroy the machine language pro- 
gram and effectively crash the com- 
puter. This is because the computer 
jumps to the cassette buffer when 
DOSPLUS is activated, where it en- 
counters some machine language 
code that makes it do abnormal things, 
like sending DOS commands to the 
disk drive. If you use the tape recorder 
in any way while DOSPLUS is ac- 
tivated, the cassette buffer is replaced 
with information from or going to the 
tape recorder, and so destroys your 
program. When the computer then 
jumps to the cassette buffer, it will on- 
ly find garbage and may then crash. 
That is why it's important to be careful 
in the use of the tape recorder while 
DOSPLUS is active. The use of the 'K' 
command (format: ]K) prevents all of 
this. (You may ask why I placed 
DOSPLUS in the cassette buffer. 
There are two reasons: firstly, if I had 
placed it at the top of memory, there 
would have been conflict with pro- 
grammable characters and BASIC, 
and secondly, because you need a 
disk drive to use DOSPLUS, you pro- 
bably won't use your tape recorder. 
Thus I felt that the cassette buffer was 



the ideal place to put DOSPLUS.) 
How to Type In DOSPLUS 

DOSPLUS is, as mentioned before, 
a machine language program. This 
means that it cannot be simply typed 
in as a BASIC program would. Instead, 
you can either use a monitor and do 
it using memory dumps, or you can 
poke the instructions into memory via 
a program. Program #2 is just that— a 
program that pokes DOSPLUS into 
memory. It also saves it to disk for you, 
which cannot be normally accomplish- 
ed from BASIC, and so saves you a 
lot of mess. Simply type in 
DOSPLUS/DATA, RUN it, and you 
can save DOSPLUS to as many disks 
as you wish. I have tried to make the 
program as user-friendly as possible, 
and so make it easy to abort the pro- 
gram if you make a mistake. It also 
provides error messages in case 
anything goes wrong. 

Program #1 can only be used once 
you have a disk with the machine 
language program saved on it, using 
DOSPLUS/DATA. Type it in, and then 
save it to disk, as it automatically 
NEWs itself when finished. This pro- 
gram is a BASIC loader program 
which loads the actual machine code 
(saved as DOSPLUS. OBJ by program 
#2) into the computer, activates it by 
a SYS828, and then resets the pro- 
gram pointers by executing a NEW, 
which also clears the program. It 
simplifies loading DOSPLUS. OBJ 
because all you have to do is LOAD 
the program (saved as DOSPLUS— 
but remember, it isn't the actual pro- 
gram, but a BASIC loader. The actual 
program goes by as DOSPLUS.OBJ) 
and run it. If everything went OK, the 
computer should respond with the 
message "DOS OK." This is your 
signal that DOSPLUS is up and runn- 
ing, and that you can now use the ']' 
key to send disk commands. That's all 
there is to it! Once you've loaded and 
activated the machine code, it 
becomes easy as pie to use all those 
great disk commands. 

For those of you who like doing it the 
hard way, you can also load and ac- 
tivate DOSPLUS using the following: 

LOAD"DOSPLUS.OBJ",8,1 

READY. 

NEW 



READY. 
SYS828 
DOS OK. 
READY. 

This has the same effect as loading 
and running DOSPLUS. 
Program details: 

DOSPLUS— this is the BASIC loader 
for DOSPLUS.OBJ, and is only three 
lines long. Line 10 checks to see if 
DOSPLUS is already in memory, and 
if not, loads it. The line must be typed 
in exactly as is, otherwise it will not 
work, and the VIC will be constantly 
loading and re-loading the machine 
code. Line 15 pokes the keyboard buf- 
fer pointer with 6, and then pokes six 
numbers into the buffer itself, which 
starts at 631 . What this does is, upon 
the end of the program, act as if you 
had typed in SYS828 in direct mode. 
If you examine the numbers being 
poked into the buffer, you'll notice they 
represent the ASCII of S, shifted- 
Y,8,2,8, and RETURN (the key, not 
RETURN after GOSUB). When the 
program encounters line 20, it erases 
itself and then checks location 198 to 
see if there are any numbers stored in 
the keyboard buffer, and if there are, 
print them on the screen as their ASCII 
representations. Since we poked a 6 
in 198, it will print the first six keys it 
finds in the buffer, which we have 
made to be S(shift)Y828 and RETURN. 
Because of the RETURN at the end, 
the line is entered and executed by the 
computer, as if we had typed it in 
ourselves. The screen should then 
show "DOS OK.", indicating that 
DOSPLUS is ready to be used. 

DOSPLUS/DATA-This is a more 
complicated program which both 
POKEs the machine code into 
memory and saves it to disk as many 
times as you want it to. Lines 1 to 30 
read the data and poke it into memory, 
making sure that it is correct by the use 
of a checksum. If it encounters any er- 
rors, the program stops. Lines 40 to 
65 display a prompt to save 
DOSPLUS to disk by hitting RETURN, 
or to abort the program using the F7 
key. Lines 70 to 90 do the actual sav- 
ing. First the program opens a pro- 
gram file on disk called 
'DOSPLUS.OBJ'. Then it reads the er- 
ror channel to make sure there aren't 
Commander February 1983/11 



any error conditions— if there are, the 
program aborts, the program then 
sends the starting address of the pro- 
gram to the file, which in this case 
equals 3 *256 + 60, or 828, in standard 
low-byte, high-byte order. The data is 
then read and sent to the disk by line 
80. Finally, the computer prints that the 
save is successful and closes the files. 
Line 95 asks if you want to save it 
again to another disk, and if not, ends 
with line 99. Lines 1 00 to 250 store the 
machine code as DATA statements. 
There are ten such statements on 
every line, plus a checksum, which is 
a total of all the preceding numbers on 
that line, and is used to check that the 
data has been entered correctly. A 
note of warning: if you don't type in the 
checksum correctly, the program 
could give you errors, or your data 
may be incorrectly saved to disk. 
Please type these in carefully. 
The Program Itself: 

This part is only meant for those who 
know something about assembly 
language, as it details how 
DOSPLUS.OBJ works. Feel free to 
skip this part if you wish. 

Program #3 is the actual 
disassembly of DOSPLUS itself, as it 
resides in the cassette buffer. If you 
have the VICMON cartridge, you can 
type it in exactly as it is. I have written 
in some comments beside the actual 
code, so that you can see exactly how 
it works, though I'm going to give a 
brief explanation right now. 

First, DOSPLUS places a JMP 
$0359 in the CHRGET routine which 
starts at $0073. This routine is respon- 
sible for getting the next character for 
the BASIC interpreter to handle, and 
because it is located in RAM, we can 
fool around with it. After the program 
has placed the JMP in the proper ad- 
dress, it loads Y with $03, and A with 
$4F, and then jumps to the routine at 
$CB1E, which prints the message it 
finds at the address specified by Y and 
A, which in this case equals $034F. 
Note that the bytes from $034F to 
$0358 don't represent any actual code 
but instead are the data for DOS OK. 
in ASCII, preceded and followed by 
$OD, ASCil for carriage return. The 
program then exits back to BASIC 
after having printed the message. 

12/Commander February 1983 



PROGRAM 1 






1 P0KE36873 , 27 : PR I NTCHR* '■ 1 4 


5.':'"Z3BDO 


SPLUS 


C;fli..lfrp | ITTI TTU 




It 


-_' 1 IVtl', ■_> 1 J. 1 — 1 1 1 

5 PR I NT "CHECKING MEMORV." 






1 6 F R I = 1 S T 2 5 3 S T E P 1 2 : B = : 


FORJ^ST 


03 :RER 


Dfl : P0KE728+ I + J , fl : B=B+fl : NEXT 


T 




20 REROC : I FBOCTHENPR I NT " 2£ 


RROR IN 


LINE" 


;I :ST0P 






30 NEKTI:FRINT"H0PERfiTION S 


UCCESSF 


UL. " 


40 PRIW'HPLEflSE INSERT DEE 


T. DI 


SK AND 


press aauiaai <3& to abort > 


= = "> " ; 




45 '/,■$=" S !i" :Z=0 






50 T=T I -i- 1 8 : Z= 1 -Z : PR I NTM I D* (. 


:■■<■$■ ,z+i > 


;"SII"; 


55 GETfi* : I FT<T I THEN5S 






60 IFfl*=""THEN55 






65 PR I NT " " : I Ffl*= " ||" THENPR I NT " SI3RBORT . M 


" :END 






70 OPEN 1 5 , 8 , 1 5 , " I" : I NPUT# 1 5 


,E:IFE> 


13THEN 


PR I NT " HD I SK I /O ERROR . " : CLC 


SE15:ST 


OP 


75 OPEN 1 , 8 , 2 ., " @ : DOSPLUS . OBJ 


,P,W" :PRINT#1 


,CHR$'::60::',"CHR*'::3>.; 






SO RESTORE : FOR I =STO 1 5 : FOR J= 


0TO9:RERDfl:PR 


I NT# 1 , CHR* ■:: fl > ; : NEXT J : REflOfi : 


NEXT I 




30 PRINT"SE;flVE SUCCESSFUL." 

15 

95 I NPUT " ffiTR Y RGB I N " .; fl¥ : I F L 


: CLOSE 1 


; CLOSE 


EFT*<R* 


, 1 -j = " V 


"THENGOTO40 






33 END 






1 OO DflTfl 1 69 , 76 , 1 33 , 1 24 , 1 69 , 


33 , 1 33 , 


125,16 


3,3,1130 






1 1 DflTfl 1 33 , 1 26 , 1 68 , 1 63 , 73 , 


32,30,2 


93,96, 


13., 1043 






1 20 DflTfl63 , 73 , S3 ., 32 , 73 , 75 , 4 


6 , 1 3 , , 


201 ,67 


1 30 DflTfl33 ... 208 , 8 , 72 , 1 65 , 1 23 


, 20 1 , 2 , 


248,9, 


1121 






1 4 O DflTfl 1 4 ., 2 1 , 5 S , 1 4 4 ... 1 , 3 6 

,912 

1 50 DRTR32 ,115,6,144,19, 20 1 

>Z\ Cj O "T 1 


,76,128 


, 0, 104 


,75,268 


, 20 , 1 6 


1 60 DRTR20 1 , 1 33 , 1 24 , 1 S3 , 53 , 


1 33 ,125 


, 1 €3 , 1 


76,133,1421 






1 70 DRTR 1 26 , 76 ,116,1 96 , 1 62 , 


11,76,58,136, 


133,1150 






1 SO DRTR0 , 1 63 , , 32 , 1 83 , 255 , 


163,127 


, 1 62 , 8 


,1111 






1 30 DRTR 1 60 ,15, 32 , 1 86 , 255 , 3 


2,132,2' 


55 , 1 65 


,0,1292 






200 DRTB20 1 , 63 , 240 , 28 , 1 62 , 1 


27,32,2 


_' j. , ir_ ^. i ■-' 


,165,1480 






2 1 DRTRO , 32 ,210 , 255 , 32 ,115 


, , 20 1 , I 


3 , 208 , 


1 053 






220 DRTR246 , 32 , 204 , 255 , 1 63 , 


127,32, 


195,25 


5,76,1531 






230 DflTfl 1 16,196,162,127 , 32 , 


138,255 


,169,1 


3,32,1300 







Following this and starting at $0359, 
comes the routine which is jumped to 
by CHRGET after we placed our 
'wedge'.. This routine checks for the 
right bracket key and if the computer 
is presently in direct mode. If not, it 
processes everything as per usual, 
and eventually returns from the 
routine. If the right bracket has been 
hit and the computer is in direct mode, 
then the routine jumps to $036D, 
which then processes the next 
character it finds. If 'K', then it kills 
DOSPLUS by replacing the JMP we 
put in CHRGET with the normal 
values. Not that it does not erase the 
program, and so can be reactivated 
using SYS828 from BASIC OR .G 
033C from monitor. 

The rest of the program is pretty well 
self-explanatory. It opens a logical file 
to the disk (no. 127) command chan- 
nel, and then opens it either for input 
or output, depending on whether the 
first letter after the right bracket is an 
'E' for 'Error' or another letter to be 
sent to the disk. If the letter is E, it will 
input the error message from the disk, 
print it out to screen, and return to 
BASIC. Otherwise it will take what you 
have typed in and transfer it to disk as 
a command, and then return to 
BASIC. All this is done through the use 
of Kernal routines, as shown in the 
listing. 

Note: For those of you who are in- 
terested, there are two useful routines 
accessed in the program. The first is 
the routine at $C474. A JMP to this 
location will return you toBASIC, print 
the 'READY.' message and turn on the 
cursor as if nothing had happened. 
The second routine is also useful. It 
prints out the error message cor- 
responding to the number in the X 
register. Error number 11 ($10B) is 
7SYNTAX ERROR, and this is used by 
the program when you type a number 
afrer the ']' key. Other messages can 
be found by loading the X register with 
a different value, and so can be used 
by any machine language routine that 
uses error checking. 
A Final Note 

DOSPLUS is meant as a DOS sup- 
port program, and does exactly what 
it is supposed to. I gave it the name 
DOSPLUS because I have not heard 



3^^267 



: 1 6 , ; 



248 DRTH21U,25, 

1 S 13. r 1679 

25m DflTfl208 .r 246 ., 240 r 222 P Q r G P 9 , 9 r 9 , 8 



■'H 



91 



PROGRAM 2 

10 IFPEEK(828)<>169THENL0AD M D0SPLUS.0BJ M , 

8,1 

15 P0KE1 98 , 6 : P0KE631 , 83 : P0KE632 ,121: P0KE6 

33 , 56 : P0KE634 , 50 : POKE635 , 56 : P0KE636 , 1 3 

20 NEW 



of any program by that name. Feel 
free to call it anything you wish, so long 
as you make the appropriate changes 
to the programs. Why, you could call 
it DOSMINUS for all I care! Seriously, 
though, I have to admit that the pro- 
gram is far from perfect. For one thing, 
it doesn't make any syntax checks ex- 
cept to make sure no numbers are 
sent as the first characters to disk. If 
you type in "]STUPID'\ then that is ex- 
actly what DOSPLUS will send, and 
you'll get an error message. In any 



case, I feel that it is a practical program 
worth typing in, because it saves you 
a lot of trouble. But if you don't like typ- 
ing in programs, then send me a for- 
matted 1540/1541 disk, a self- 
addressed envelope or mailer (no 
stamps please), and $7 to: Eric 
Giguere, Box 901, Peace River, 
Alberta, Canada TOH 2X0, and I'll 
send you all three programs as soon 
as possible. (Please mark the 
envelope "Magnetic Materials— Do 
Not Fold.") 

(Program 3 see page 64) 



VIC 20/PET/CBM OWNERS 



WALLBANGER - Blast your way through the dodge'm, blast'm, 
and attack modes. If you destroy the bouncing balls before they destroy 
you, the walls close in for the next round. WALLBANGER is written in 
machine language, has great sound, and encourages complex strategies. 

CASS/5K/VIC 20/CBM 8032 

CASS/BK/40 COL SCREEN/OLO-NEW ROMS/FAT FORTY S 15.00 

[CALIF. RES. ADD 6% SALES TAX] 

MILLIPEDE - Exterminate the oncoming millipedes and fleas as 
they descend through the mushroom patch. Blast giant bouncing spiders 
before they pounce on you. Shoot a millipede in the body and suddenly two 
millipedes descend toward your ship. MILLIPEDE is written in machine 
language, has excellent graphics, and great sound. 

CASS/5K/VIC 20/CBM 8032 

CASS/8K/40 COL SCREEN/OLD-NEW ROMS/FAT FORTY $15.00 

[CALIF. RES. ADD 6% SALES TAX] 

ROADTOAD - Hop your toad across 5 lanes of traffic, avoid 
deadly snakes, and dodge the dreaded toad-eaters. Cross a raging river 
full of logs, turtles, alligators, and park your toad in the safety of a harbor. 
Each time you park 5 toads, you enter a tougher level where the action is 
faster and the toad-eaters are more numerous. ROADTOAD is written in 
machine language and uses high resolution graphics. The sound effects are 
excellent and you can use a joystick or the keyboard to control your toad. 

CASS/5K/VIC 20 $15.00 

[CALIF. RES. ADD 6% SALES TAX] 

Write for FREE game details: 

NIBBLES & BITS! INC. 

P.O. BOX 2044 

ORCUTT, CA 93455 



VIC 20/PET/CBM OWNERS 



Commander February 1983/13 



An Introduction to 

Assembly Language Programming on the VIC-20 

Part III: Registers and Addressing Modes 



by Eric Giguere 
Alberta, Canada 



In last month's column we took a 
look at monitors and assemblers. If 
you couldn't quite follow what I 
discussed, then don't feel too bad, 
because I'm sure that you'll be able to 
grasp the concepts after a while. In 
any case, you're probably itching to 
do some sort of programming in 
assembly language. Well, I'm afraid 
you are just going to have to wait some 
more, because we're only going to 
start programming next month. This 
month I've got to take you through a 
very important concept in assembly 
language— registers and addressing 
modes. 
Registers 

Perhaps one of the most important 
parts of your computer besides the 
microprocessor is something called a 
register. A register can be defined as 
really nothing but a "special storage 
location", to quote the VIC-20 Pro- 
grammer's Reference Guide. And 
though it doesn't sound too impressive 
a definition, it is quite an accurate 
description of what a register is. But 
what we want to concentrate on is the 
word "special." What makes these 
registers so different from other 
memory locations? What's the use of 
having them? Why all the fuss over 
them? Those are probably some of the 
questions you're asking yourself— and 
with good reason. The answer to all of 
these is as follows: registers are impor- 
tant because they allow the 
microprocessor to keep track of where 
it's at and what it's doing. They are on- 
ly different from other memory loca- 
tions in that they are reserved for ac- 
cess by the microprocessor itself. You 
can mess around with them, but if 
you're not careful you can very well 
crash the system (it's unlikely, though). 
That's why all the fuss over them— you 
use them to "manipulate" the 
microprocessor. These registers are 

14/Commander February 1983 



the only ways in which the 
microprocessor can communicate with 
you and thus using them to your ad- 
vantage can sometimes do wonderful 
things for you (sometimes . . . ). So is 
it clear now? Now do you see why they 
are so important? If not, then you had 
better read on, because now I'm go- 
ing to describe the registers to you. 

The Accumulator: This is probably 
the most important register from our 
point of view. Almost everything the 
microprocessor does uses the ac- 
cumulator (the "ace") in some way, 
and for good reason. It has the most 
machine language instructions to use 
and affect it, including the only math 
instructions. I have yet to see a 
machine language program that 
doesn't use it in some way. 

The X and Y Registers: Often call- 
ed the "index" registers, these are us- 
ed mainly as indexes or offsets and as 
temporary storage while the ac- 
cumulator is busy doing something 
else. They both have most of the in- 
structions as the accumulator, excep- 
ting the math instructions, as well as 
a few unique ones of their own. It's 
also rare to find a program that doesn't 
use one of these, if not both. 

The Status Register: This register 
really isn't the same as the preceding 
three in that it isn't used to move or 
change data around, but instead uses 
each of its bits (except one) to act as 
flags for certain conditions (the other 
bit is simply not used). A bit may be 
set in this register when only one 
specific condition occurs. This allows 
you to make comparisons and then 
use the status register to decide what 
to do next. The updating of the status 
register is automatic, and so you real- 
ly don't worry about it too much. Quite 
a few instructions use or affect it. (More 
on the status register when we get to 
part V— Branches and Comparisons) 



The Stack Pointer: This register is 
used as a pointer to the next free loca- 
tion on the Stack. It isn't of much use 
now to you, since you probably don't 
know what the Stack is, so I won't go 
any further in detail until we get to part 
VI— Sub-routines and the Stack. (If you 
really want to know what the Stack is, 
refer to page 1 33 of the Programmer's 
Reference Guide.) 

The Program Counter: This is the 
"master" register and also the biggest 
one. Whereas all the other registers 
are only 8 bits long (one byte), this 
register is 16 bits long (two bytes). You 
see, the program counter, PC for 
short, contains the address of the in- 
struction currently being executed. 
And if you remember last month's ar- 
ticle, the last memory address in the 
VIC or any PET/CBM is $FFFF, or 
65535 decimal, which cannot fit in one 
byte, no matter which way you try. But 
it will fit in two bytes (exactly), and that 
is the reason for having the PC two 
bytes long. Otherwise it couldn't keep 
track of where the computer is. I said 
that it could be considered the 
"master" register. This is because it 
determines where the microprocessor 
will get its next instruction from, sort of 
like BASIC linenumbers. Thus you 
could say that it controls the chip, 
because it tells it where it will get the 
next byte of data. The only instructions 
that affect it directly are the branch, 
jump and jump-to-subroutine com- 
mands. (More on that later on). 

Well, there you have it. I've just 
described to you the functions of each 
register and why they are important. 
I hope that it's evident why registers 
form an integral part of machine- and 
assembly-language programming. If 
you're really stuck, though, I suggest 
you get some kind of book on machine 
or assembly language that will explain 
to you in detail all that you'd like to 



know about the registers and their 

importance. 

Addressing Modes 

As you'll soon learn, each instruction 
in assembly language has what is call- 
ed an addressing mode. "What is 
that," you say? It is simply the way in 
which the instruction currently being 
executed by the microprocessor will 
get or store its data. This can also be 
done in BASIC. For example, the line 
10 A= PEEK (309 + X*Z)-1 will give 
the variable A whatever value is found 
at 309 + X*Z and then add one to that 
figure. You see, here we are giving it 
information as to where to find the data 
it needs, and so we are giving it an ad- 
dressing mode, which in this case is 
309 + X*Z. Although it doesn't 
operate quite like that in assembly 
language, I think it gives you an idea 
as to how an addressing mode 
operates. To further demonstrate it, I'm 
going to give you examples of all the 
addressing modes available using one 
of the most common assembly 
language instructions— LDA. Can you 
guess what it means? (Remember how 
I said that assembly language was 
composed of mnemonics, or memory 
joggers?) If you said "LoaD the Ac- 
cumulator" then you were right! This 
instruction (which well learn more 
about next month) loads or places a 
new value in the accumulator, sort of 
like POKEing it. In any case, it can be 
used in a lot of different addressing 
modes, which go as follows: 

Zero Page: This mode will take the 
data from page zero (the first 256 
bytes from $00 to $FF) and place it in 
the accumulator. Example: LDA 
$06— load the accumulator with the 
value found in byte $06. 

Absolute: This is the same as Zero 
Page, but instead loads the ace. from 
the address specified by the two bytes 
following the instruction. Example: 
LDA $1 F2A— will load the ace. with the 
value in byte $1F2A (7978 dec.) 

Immediate: Probably the simplest, 
this loads the ace. with the value of the 
byte following it, which you have 
already defined. To separate it from 
Zero Page mode, the pound sign '#' 
precedes the byte. Example: LDA 
#$09— will place the value $09 in the 
accumulator. 



Zero Page indexed with X: Loads 
the ace. with the value of the byte 
following it plus the value in the X 
register and then loads the ace. from 
the address obtained by the addition 
of both registers. Example: LDA 
$1F,X (where X = $05 - will load the 
ace. from the byte found at $1F + 
$05, or $24. 

Indexed Indirect: This one is com- 
plicated, as it will load the ace. from 
the address which it determines by first 
taking the address you specified, ad- 
ding the X register, and then taking the 
two bytes it finds at that location to find 
the true address from which to load the 
accumulator (whew!) Example: LDA 
($00,X) where X = $01 and where ad- 
dresses $01 and $02 both contain 
$11. First the byte in the brackets is 
taken and added to the X register to 
equal $01 ($00 + $01). Then it takes 
the value it finds at $01 and $02 (ad- 
dresses have to be two bytes long), 
puts them together (not add) to equal 
$1111 and then goes over to $1 1 1 1 
and places whatever value it finds 
there in the accumulator. 

Indirect Indexed: This is sort of the 
same idea as indexed indirect, except 
it uses the Y register outside the 
brackets, which then means it calc- 
ulates the address differently. First it 
takes the byte in brackets, goes over 
to that address and then calculates an 
address from the two bytes at that 
location and at that location plus one. 
It then goes over to this address, adds 
Y to it, and then loads the ace. from 
the byte at that address. Example: 
LDA ($05), Y where Y = $08, and $05 
and $06 equal $13. The value is to be 
taken from the address at $05 and $06 
plus Y. Thus the value will be taken 



from $1313 + $08, or $131 B. 

Absolute indexed by Y or X: This 
is the same as absolute except that it 
will add the value of one of the 
registers (which you specify) to the 
two-byte address that follows the in- 
struction. Example: LDA $5000,Y 
where Y = $07 - will load the ace. from 
$5000 + $07, or $5007. 

Implied: This mode isn't really a 
mode since there are no addresses to 
be calculated. Instead the instruction 
simply executes, just as long as it 
doesn't need any address to execute. 
To show you this, I'll have to introduce 
a new instruction: NOP, which stands 
for No-OPeration. All it does is cause 
the microprocessor to wait a few 
microseconds and then continue on 
with its work. Example: NOP (that's it!) 

Well, that's basically all the address- 
ing modes there are for the 6502. 
There is still another one that affects 
the JMP (jump) instruction, but I'll 
leave that for later. In any case, you 
can see that there are a lot of address- 
ing modes to use, and though some 
may seem confusing now, they'll 
become clear as we use them in our 
explorations in the coming months. 
Next Month . . . 

Next month we are going to actual- 
ly start some programming, as I'll give 
you some examples to use on your 
computer. Not only will they be in- 
teresting (at least, after a while), they 
will also clear up and reinforce all that 
you've learned so far in this column. 
If you want to participate, you'll need 
some form of monitor. I recommend 
the Vic MON cartridge, but as long as 
you've got some kind of monitor you 
should be O.K. So until next month, 
happy computing! 



o 

CO 



o 

CM 

O 
> 



»4ivA • DISKOMATE " iw .rPn„i 

A must for 2040/4040 disk owners. Write protect indicators/ 
switches, power indicator and error beeper, 

• "Real World" SOFTWARE lit...., 

Word Processor. Mailing List. Catalog. Ham Radio. Frequency Counter. 



r -"OLD M 8K PETs- 



| • 21 14-TO-6550 RAM ADAPTER ,*i*.usi 

Replace 6550 RAMs with low cost 21 14s. Hundreds Sold! \ 

1 ... • 4K MEMORY EXPANSION ,*i 6 .seai 

Low cost memory expansion using 21 14s 'or bigger programs. | 

OPTIMIZED DATA SYSTEMS 

Dept.O- P.O. Box 595 - Placentia. CA 92670 

D1SKO-MATE trademark Optimized Data System* ■ P£T/CBM trademark. Commodore 




o 

CO 



o 

CM 

■ 

O 



Commander February 1983/15 



5^?SSSSSS«S^S?5SS®SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS^(i 






n'-CQ^PU SENSEl :/ 



VIC-20® 

VIC-20® Personal Computer g 

VIC-1011A RS232C Interface 

VIC-1515 Printer 

VIC-1530 Datasette 

VIC-1540 Disk Drive 

VIC-1010 Expansion Module 

VIC-1311 Joystick 

VlC-1312 Game Paddles 

VIC-1600 Telephone Modem 

CM-151 Terminal 40 

Produces 40 column output of information received through the modem 

VIC-1210 VIC 3K Memory Expander Cartridge 

Plugs directly into the VIC'S expansion port. Expands to 8K RAM total. 

VIC-1110 VIC 8K Memory Expander Cartridge 

8K RAM expansion cartridge plugs directly into the VIC. 

VIC-1011A RS232C Terminal Interface 

Provides interface between the VIC-20 and RS232 telecommunications 
Connects to VICs user port 



CM 
CM 



16K Memory Expander 
24K Memory Expander 



179.95 
39.95 

334.95 
67.50 

349.95 

139.95 

9.95 

19.95 

99.95 

29.95 

34.95 

52.50 

39.95 

modems. 

89.95 
110.95 



CARDBOARD 6 $87 95 

An expansion interface for the VIC-20. Allows expansion to 40K or accepts up to six 
games. May be daisy chained for more versatility. 

CARDBOARD 3 $29.95 

Economy expansion interface for the VIC-20. 

CARD "?" CARD/PRINT $79 95 

Universal Centronics Parallel Printer Interface for the VIC-20 or CBM-64. Use an 
Epson MX-80 or OKIDATA or TANDY or just about any other. 

CARDETTE $39 95 

Use any standard cassette player/recorder with your VIC-20 or CBM-64. 

CARDRITER $29.95 

A light pen with six good programs to use with your VIC-20 or CBM-64. 

BUSINESS & HOME APPLICATIONS FOR VIC-20® 

$48.95 
14.95 
30.95 



CW-107A Home Calculation Program Pack 

CPV-31 Data Files - your storage is unlimited 

CPV-96 Household Finance Package - to keep records of an 

your household expenses 
CPV-208 Bar-Chart - display your numerical data 
CH Turtle Graphics - learn programming 
CH VIC Forth - is a powerful language for BASIC programming 
CH HES MON - is a 6502 machine language monitor with 

a'mim-assembler 
CH HES Writer - time-saving word processing tool 

Encoder - keep your personal records away from prying eyes 
Statistics SadlstfCS - statistical analysis 
Total Time Manager 2.0 - creates personal or 
business schedules 
Totl Label - a mailing list and label program 

Totl Text BASIC 

Research Assistant - keep track of reference data 

Totl Text Enhanced 

Grallx Designer - design graphic characters 
Minimon - allows you to program, load. save, or execute 
machine language programs 

CT-3 Order Tracker 

CT-4 Business Inventory - to maintain record of inventory 



CT-21 
CT-121 

CT-124 
CT-125 
CT-126 
CT-140 
CM-152 
CQ-5 



CPV-210 
CPV-217 
CPV-220 
CPV-221 
CPV-224 
CPV-236 



determine cash flow 



8.95 
34.95 
49.95 
34.95 

34.95 
34.95 
14.95 
1595 

13.95 
15.95 
17.50 
29.95 
12.95 
13.95 

15.95 
15.95 
13.95 
12.95 
16.95 
13.95 
9.95 
12.95 

10.95 
12.95 
13.95 
14.95 
16.95 
9.95 
14.95 
14.95 

12.95 
40.95 

19.95 

12.95 

7.95 

24.95 
29.95 
17.95 
14.95 

19.95 

BUSINESS & HOME APPLICATIONS FOR C-64 

CHC-504 HES Writer - word processor $39.95 

CHC-503 Turtle Graphics II - utilizes the fun graphics of your 64 49.95 

CHC-502 HESMON - machine language monitor w/mini-assembler 34.95 

CHP-102 6502 Professional Development System 29 95 

CFC Data Files - a management program 27.95 

MANY MORE PROGRAMS FOR YOUR 64 & 20 



CPV-251 

CPV-269 

CPV-270 

CPV-274 

CPV-276 

CPV-286 

CS-111 

CPV-294 

CPV-296 
CPV-327 

CPV-328 

CHV 

CPV-367 

CC 

CS 
CS 

CS 



Bidder 

Cash Flow Model 

Client Tickler 

Club Lister 

Depredator 

Investment Analyst - keep track of investments 
and investment opportunities 

Present Value 

Super Broker 

Syndlcator - calculates whether to buy or sell 

Ticker Tape - maintains investments profile 

Un-Word Processor - screen editor 

Phone Directory - never lose a phone number again 
Checkbook - home "utility" program 

Calendar My Appointments - print a calendar 

for every month in any year. 

The Budgeter - place your personal finances in order 
HESCOM - transfers data and programs bidirection- 
aliy between VICs at three times the speed of a disk drive 
HESCOUNT - monitors program execution 
HESPLOT - Hi-res graphics subroutines 
Conversions - figures, volume, length, weight, area. 
and velocity to all possible configurations 
The Mall - your complete mail program Cassette 

Disk 

Home Inventory - lists your home belongings 

Check Minder - (V-20 & 64) 

keep your checkbook the right way 

General Ledger - a complete general ledger 



COMMODORE SOFTWARE 
VIC-1211A VIC-20 Super Expander $57.99 

Everything Commodore could pack into one cartridge - 3K RAM memory expansion, 
high resolution graphics plotting, color, paint and sound commands. Graphic, text, 
multicolor and music modes. 1024x1024 dot screen plotting. All commands may be 
typed as new BASIC commands or accessed by hitting one of the VIC'S special 
function keys. Includestutorial instruction book Excellent forall programming levels. 

VIC-1212 Programmer's Aid Cartridge $45.99 

More than 20 new BASIC commands help new and experienced programmers 
renumber, trace and edit BASIC programs Trace any program line-by-line as it 
executes, pause to edit. Special KEY command lets programmers redefine function 
keys as BASIC commands, subroutines or new commands. 

VIC-1213 VICMON Machine Language Monitor $48.99 

Helps machine code programmers write fast efficient 6502 assembly language 
programs. Includes one line assembler/disassembler. 



GAMES FOR YOUR VIC-20® 
Cribbage 
Motor Mouse 

Avenger Carl. - an invasion of space intruders 
and you're the VIC "Avenger" 

Superslot Cart. - great music and sound effects! 
Super Alien Cart. - you're trapped in a maze 

Jupiter Lander Cart. - pilot your -Jupiter Lander- 
Draw Poker Cart. 

Midnight Drive Cart. - authentic night driving 

Radar Rat Race 
Sky Falling 

Mole Attack - a colorful "cartoon action" game 

Raid on Ft. Knox - try to escape the guards 

Adventure Land - Formerly available only on larger 

more expensive computers. All Adventure games are decoded to 

"talk" on the Type N Talk voice synthesizer (available from VOTRAX) 

Pirate Cove Adventure - yo. no. ho. & a bottle of rum 31 .95 
Mission Impossible Adventure 

The Count Adventure - trapped in Dracula 's castle 
with 3 days to find and destroy the vampire 
CW-1918 VoodOO Castle Adventure - you have to free 
Count Yorga from a curse 

Sargon II CheSS - seven challenging play levels 
Gorl - (The smash-hit arcade game!) 
Omega Race - the ultimate space game 
Seawolf — an explosive Bally Midway arcade "classic" 
Maze Ol Mikor - adventure-packed game with 
stunning graphics 

Tank Wars 
Pinball 

Simon - It gets tougher as you get better. Great for 
kids of all ages. 

Fuel Pirates 
Laser Blitz 
Tank Trap 
Concentration 

Dam Bomber - pilot your plane, avoid enemy fire 
Shamus - search room after room for the shadow- 
eluding androids, two levels of intense arcade action 

Protector 

Breakout 

Hangman - unbelievable graphics and sound 

Memory - VIC challenges your memory 

Match - hand and eye coordination 

Monks - a devilish game of logic 
Bomber - you must decide who you want to fly for, 
then pick a target and your experience level 
Amok - the halls of Amok are populated by robots that 
obey one instruction - get the intruder 
Tank VS. UFO - the tank is moving back and forth 
along the base, shoot the UFO before it shoots you 
Snakman - Pacman for the VIC 
Defender On Tri - you're the pilot of the experimental ship. Defender 
3-D Man - the popular arcade game, requires 3K 
Exterminator - a game full of bugs 



CCS 
CCD 
CW-1901 

CW-1904 
CW-1906 
CW-1907 
CW-1908 
CW-1909 
CW-1910 
CW-1911 
CW-1912 
CW-1913 
CW-1914 

CW-1915 
CW-1916 
CW-1917 



CW-1919 
CW-1923 
CW-1924 
CW-1937 
CH-G202 

CH-G203 
CH-G205 
CH-G206 

CH-G207 
CH-G209 
CH-G210 
CH-G211 
CH-G212 
CH-C307 

CH-C308 

CPU-79 

CPU-85 

CPU-87 

CPU-88 

CPU-89 

CPU-108 

CPU-109 

CPU-153 

CPU-194 



$14.95 
12.99 
24.95 

24.95 
24.95 
24.95 
24.95 
24.95 
24.95 
24.95 
24.95 
24.95 
31.95 



31.95 
31.95 

31.95 

31.95 
31.95 
31.95 
24.95 
15.95 

15.95 
13.45 
13.45 

13.45 
15.95 
15.95 
13.45 
13.45 
34.95 

36.95 
7.95 
9.95 
9.95 
7.95 
7.95 
9.95 

20.95 

9.95 

14.95 
17.95 
17.95 
20.95 



GAMES FOR YOUR 64 



CCS 
CFC 



CFC 



Cribbage 

Flight 64 - what a program' 

Spright Generator 

$12.95 



Cassette 
Disk 

Cassette 
Disk 



Mastermind (VIC-20) 
Star Trek (VIC) 
Black Jack (VIC) 
Tic-Tac-Toe 
Backgammon 
Maze 64 



$17.95 
14.95 
16.95 
15.95 
17.95 
(C-64) 19.95 

9.95 
11.95 

7.95 
14.95 
15.95 



Prices subject to change. 

TO ORDER: 

P.O. Box 18765 E2£L 

Wichita, KS 6721 8 rT^7 I — W*5_ 

(376; 684-4660 K : 

Personal checks accepted (Allow 3 weeks) 

or C.O.D. (Add $2) Handling charges $2.00 

VIC-20® is a registered trademark of Commodore 



| 

I 



RAVINGS OF A MADMAN 



by Tim Parker 
Ontario, Canada 



Last month I took a few lines to look 
at quicky fingersavers for the VIC-20. 
I promised to pass on a couple of 
tricks for protecting your programs this 
month, and being a (somewhat) 
honest type, I'll do exactly that, after 
a slight diversion. 

Unfortunately, there is really no way 
to protect a program in absolute terms. 
If it can be written, it can be figured 
out. Ask any Apple II owner how he 
gets into protected program disks, and 
he'll probably respond that he uses 
one of the commercially available 
routines that decode protection cir- 
cuits. Two spring to mind, namely 
"Locksmith," and "Quick and Dirty." 
Their programmers wrote them to 
allow "cracking" of protection 
routines. And they work— very well! 

But such a program doesn't exist as 
such for the VICs, PETs, or other 
similar computers (although the 
chances of one floating around that I 
don't know about are quite large). The 
primary reason for this is that all Com- 
modore computer programs can be 
accessed very easily by a knowledg- 
able programmer, simply because the 
Commodore's operating systems are 
different from Apple's. (I know of 
several people who have even 
downloaded every game cartridge 
available for the VICs, and possess 
large libraries of "bootleg" disks.) 

This of course brings up the in- 
evitable question of ethics. Is if legal 
(or fair) to duplicate a program without 
paying for it? The legal answer is 
rather straightforward: NO! It is in viola- 
tion of copyright laws to duplicate a 
program, except as a backup. Note, 
however, that few, if any, suits have 
been won on this issue. The laws in 
most countries do not directly address 
computer software. 

As for whether it is fair, that is a 
dangerous question. It can perhaps 
be answered in a round-about way by 
considering that if a program you 



would never ordinarily buy is offered' 
to you simply to look at for curiosity's 
sake, then who gets hurt? The owners 
of the copyright would not make any 
money from you anyway, as you 
wouldn't have forked over the mega- 
bucks required to purchase the thing 
in the first place. But if you find the pro- 
gram useful, should you then pay for 
it? These, gentle reader, are questions 
I cannot answer: if I did, I would get 
into trouble, as every programmer 
feels differently. 

I can pass on the overwhelming opi- 
nion of many of the higher level com- 
puter users (of which I classify myself 
one). Software costs a bundle these 
days. A PASCAL program can cost 
from three hundred bucks up. The 
average software price in CP/M 
systems is about six hundred. These 
are overinflated, without a doubt. And 
that is definitely why there is such a 
problem with software piracy. If my 
friends had bought every piece of soft- 
ware they owned, they would have 
been bankrupt very quickly. The 
answer is simple: lower software 
prices. As an example, there is one 
company that now offers a CP/M 
PASCAL (a good one, as it happens) 
for thirty bucks! They feel that too 
much was being charged before, and 
that more people will feel like buying 
it not because of the low price, but 
because they can get a legal package 
for a reasonable price. I bought one 
of the first of their shipments, and after 
friends saw it, they decided that since 
thirty bucks wasn't much more than 
the price of copying the disks and 
photocopying the manual, they might 
as well order their own. And they did. 
The company picked up ten 
customers they wouldn't have had at 
the higher price. 

Such a problem, although not so 
rampant, does exist in Commodore 
land. Games, especially, are 
somewhat on the high side. One 



manufacturer sent me his brochure, 
and the games were on the far side of 
forty bucks each. Now for a game I 
haven't even seen, that seems like a 
big gamble to me. (By the way, have 
you noticed the pictures in the ads and 
on the game boxes never reflect the 
game itself?) 

What can we do about it? Not much. 
But we can be more selective in what 
we buy. Don't throw good cash on an 
untried game or program. Check it out 
first! As for copying a friend's pro- 
grams, only you can decide whether 
to do it or not. But remember . . . it's 
not ethical! I doubt anyone will lose too 
much sleep about it though. 

After that diatribe, I get back to 
where I wanted to be: on protecting 
programs. The Commodore, as noted 
above, cannot be completely pro- 
tected. After a program is loaded into 
memory, anyone can examine it as 
long as it hasn't been RUN. The 
reason is that certain memory loca- 
tions that control the RUN/STOP key, 
LIST and SAVE functions can be set 
to disable, but only during a RUN. (Ac- 
tually they can be done before the 
RUN, but who is going to disable a 
LIST of a program they are trying to 
copy?) 

The way to prevent a LIST of the 
program being made is to add the 
command POKE 755,200 to your pro- 
gram. To undo the command, POKE 
755,199. 

A look at memory maps for the VIC, 
PET or whatever will show a few other 
tricks. For example, the VIC-20 
employs memory locations 818 and 
819 for the SAVE functions (816 and 

817 are for LOAD). Thus, POKEing 

818 to 165 will kill the SAVE to an ex- 
tent . . but the RUN/STOP and 
RESTORE keys must also be deac- 
tivated. The routine to prevent SAVE- 
mg of your programs is POKE 
818,165:POKE 802,0:POKE 803,0. 
(Locations 802 and 803 control the in- 

Commander February 1983/17 



put/output restore function.) The com- 
mand is revoke by POKE 
818.133:POKE 802,243:POKE 
803,243. 

A study of memory maps will reveal 
other tricks . . . more will be reported 
in upcoming columns. (Memory maps 
are published in several different 
magazines and books. Dig for them!) 

Last month I mentioned video ex- 
pansion boards for the VIC-20 to give 
40, 60 and 80 columns. Some of these 
are advertised in the magazines with 
extravagant ads, some of which I feel 
are slightly misleading. One thing to 
understand from the start: the video 
image will be different. Although some 
boards utilize a matrix of 5 x 7 (or bet- 
ter), when projected onto a television, 
there is inevitable picture disintegra- 
tion. (If you happen to own a monitor 
. . . don't worry about it!) 

Also, most boards do not offer col- 
or. That is not a problem for those peo- 
ple who buy VIC-20s for business use 
(but then why did they buy a VIC-20?) 
or for the occasional telecommunica- 
tion use. But games on an expanded 
screen are a wipeout when the usual 
VIC-20 programs are run. Certainly, 
the PET games can be used, and 
some boards will apparently support 
VIC-64 games, but don't buy without 
checking them out first. Being stuck 
with a board that costs several hun- 
dred dollars and sits unused is very 
frustrating. 

This doesn't mean not to look at 
them. Programming with even a forty 
character screen is so much easier on 
the eyes than the VICs twenty-odd. 
Programs actually become readable. 
That alone may be worth the purchase 
price to some who do a lot of develop- 
ment work. As for POKEing screen 
locations and colors, ask the dealer or 
manufacturer. Some will have an en- 
tirely new screen map, while some 
don't allow individual character POKE- 
ing. That makes game design near im- 
possible (and that is, after all, very 
important). 

Speaking of games, after sending 
off last month's column on games, a 
new catalog arrived from United 
Microware Industries (UMI). (See ad in 
this month's issue for address— ed.) 
They have added a few new products 

18/Commander February 1983 



to their line. Write for their color 
brochure. 

A relatively new game that has at- 
tracted a lot of attention is Super 
Paratrooper, by Nic Dudzik. (Protecto 
is one distributor: they had a sale price 
on it last I heard, although that may 
have expired. Get in touch with them 
for details.) The graphics on the copy 
I saw were very well done. They com- 
pare very favourably to those on the 
Atari, although there are the subtle dif- 
ferences of not having player/missile 
graphics. 

As could have been expected, a 
whole series of arcade game look 
alikes for the VIC have been appear- 
ing. Some are well done, while others 
seem best left in their boxes. Again, 
the old advice applies: look before you 
buy! If your dealer will not give you a 
demo, there must be some reason 
why. Mail order is a different problem 
entirely. The key is to make sure the 
company will back their products. 
Some are even giving a money back 
guarantee if the products are not up 



to your satisfaction. Personally, I'd 
rather pay a buck or two extra to get 
that kind of commitment, than save 
pennies and be stuck with a shelf load 
of garbage. 

Shop around, also. There are a few 
dealers engaged in the old price war 
game. All that is to the benefit of the 
consumer, but be wary of extravagant 
claims. You simply cannot get fifty dif- 
ferent games on one tape for ten 
bucks. (Although, if anyone offers that, 
let me know, huh?) 

(Editor's note— We all acknowledge 
the high price of some software, but 
must also accept the fact that software 
piracy (copying) is rampant. Most soft- 
ware manufacturers raise their prices 
to compensate for high losses due to 
theft (copying). As more companies 
produce quality software, competition 
will force prices down. Copying soft- 
ware is unethical and illegal— just 
because other people do it does not 
make it legal.) 



VIC-20® 

COMMODORE 





ADVENTURES' 

The best adventures at the 
best prices! Controlled from 
the keyboard. 

GRAVE ROBBERS* $14.95 

Introducing the firstGRAPHIC 
ADVENTURE ever available 
on the VIC-20! Explore an old 
deserted graveyard. Actually 
see the perils that lie beyond. 

ADVENTURE PACK I* 

{3 Programs) $14.95 

MOON BASE ALPHA- 
Destroy the meteor that is rac- 
ing towards your base. 
COMPUTER ADVENTURE- 
Re-live the excitement of get- 
ting your first computer. 
BIG BAD WOLF-Don't let 
the wolf gobble you up. 

ADVENTURE PACK II* 

(3 Programs) $14.95 

AFRICAN ESCAPE-Find 
your way off the continent 
after surviving a plane crash. 
HOSPITAL ADVENTURE- 
Written by a medical doctor. 
Don't check into this hospital! 
BOMB THREAT-Get back to 
town in time to warn the 
bomb squad of the bomb. 

•ONLY ADVENTURES ARE AVAILABLE FOR THE COMMODORE 84 



TREASURES OF 

THE BAT CAVE $14.95 

Explore the ancient caves 
filled with treasures and 
guarded by deadly vampire 
bats. The realistic 3-D dis- 
play brings out your claus- 
trophobia. Machine code 
for fast action: keyboard or 
joystick. Over 6xl0 23 dif- 
ferent caves to explore! 

ENCODER $14.95 

Use your VIC to keep prying 
eyes away from your per- 
sonal matters. Encoder uses 
your password to scramble 
whatever you store in the 
computer: bank account 
numbers, household inven- 
tory, where you hid the 
jewelry. The scrambled data 
can be saved, or retrieved 
from tape. A 90 minute tape 
holds approximately 120 dou- 
ble spaced typed sheets. 
Keep a copy in your safety 
deposit box. 



COMMODORE 
64®* 



s&^&Z 



ANNIHILATOR $19.95 

Protect your planet against 
hostile aliens in this 
defender-like game. All 
machine code for fast ar- 
cade action. Joystick 
required. 

KONGO KONG $19.95 

Climb ladders: avoid barrels 
the crazy ape is rolling at 
you. Rescue the damsel. Par- 
tially machine code for 
smooth, fast action. Key- 
board or joystick- 
Send for free catalog 
All programs fit in the standard 
VIC memory, and come on 
cassette tape. 

Ordering— Please add $1.50 

postage & handling per order. 

PA residents add 6% sales tax. 

Foreign orders must be drawn 

in U.S. funds or use 

credit card. 

Credit card users— include 

number and expiration date. 

VICTORY SOFTWARE CORP. 

2027-A S.J. RUSSELL CIRCLE 

ELKINS PARK, PA 19117 

(215) 576-5625 



GOBBLE! 



by Tim Parker 
Ontario, Canada 



Gobble! is relatively easy to play, but 
is not such a simplistic game that in- 
terest quickly fades. It is a game ideally 
suited to the screen size of a VIC-20, 
although it can easily be modified to 
the larger size of the VIC-64, PET, or 
other computers. It fits inside the 
memory of an unexpanded VIC-20. 

The game is based upon a maze 
generation program that draws a uni- 
que maze (i.e. has one entrance and 
one exit). Several people have 
developed the algorithms required for 
this purpose, including David 
Matuszek {BYTE, December 1981 , Vol 
6 No 12) and Charles Bond {COM- 
PUTE!, December 1 981 , Vol 3 No 1 2). 
The latter has been adapted for use in 
this program, although most variables 
had to be changed to accomodate the 
screen size. The details of the maze 
generator segment will be left for the 
reader to investigate. 

The object of the game, simply 
stated, is to "eat" as many dots as 
possible with your character (a ball) 
while avoiding the enemy (a square) 
that runs the maze at the same time 
as you, albeit slower. For each dot you 
eat, you get one point. For each dot 
the enemy eats, you lose one point. 

In the early levels of the game, there 
are several cross connections provid- 
ed to make escaping the enemy easy. 
As the levels are completed, the 
number of connections becomes 
fewer, and the game subsequently 
more difficult. 

Bonus points are awarded on com- 
pletion of the fourth, ninth, and four- 
teenth rounds (assuming you get that 
far). A player may exit the maze 
through the hole in the bottom at any 
time, whether all the dots are eaten or 
nDt. The next level will then be 
generated. 

The version printed here is intend- 
ed for keyboard control. Modification 
of joystick is easy, and the details are 



JOYSTICK MODIFICATIONS 




Add the following lines: 




9000 


DD = 37154: P1 =37151: P2 = 37152 




9010 


POKE DD, 127: P = PEEK(2)AND128: jO= -(P = 0) 




9020 


POKE DD.255: P = PEEK(P1) 




9030 


J1=([PAND8]=-0): J2= -([PAND16] = 0): J3= - 
([PAND4] = 0): RETURN 




90 


GOSUB 9000 




100 


IFJQANDPEEK(L + 1)<> 160THENPOKEL,32:L = L 
:GOSUB600: POKEL.81 


+ 1 


110 


IFJ2ANDPEEK(L-1)<> 160THENPOKEL,32:L= L 
:GOSUB600: POKEL81 


-1 


120 


IFJ1ANDPEEK(L + 22)<>160THENPOKEL,32:L = L + 
:GOSUB600: POKEL.,81 


22 


130 


IFJ3ANDPEEK(L - 22)<> 1 60THENPOKEL,32:L+ L - 
:GOSUB600: POKEL.,81 


22 



10 REM TIM PARKER. . .GOBBLE! 

15 PRINT" {CLEAR}" 

20 P0KE36879 , 25 : V=36878 : S0=36875 : PT=0 : D 

L=0 

30 P0KEVJ0 

40 G0SUB6000 

50 L=INT(RND(-TI)) :DEFFNA(X) = INT(RND( 1 ) 

*X) + 1 

60 DL=DL+1 :IPDL=50RDL=100RDL=15THENG0SU 

B5000 

65 G0SUB1000 

70 L=7734:P0KEL,81 : POKEL-22 , 1 60 

80 G0SUB2000 

90 GETA$:IPA$<>""THENB$=A$ 

100 IPB$="K"ANDPEEK(L+1 ) <>1 6OTHENP0KEL, 

32:L=L+1 :G0SUB6OO:P0KEL,81 

1 10 IPB$="J"ANDPEEK(L-1 ) <>1 6OTHENP0KEL, 

32:L=L-1 :G0SUB600:P0KEL,81 

120 IPB$="M"ANDPEEK(L+22)O160THENP0KEL 

, 32 : L=L+22 : G0SUB600 : P0KEL , 81 

130 IPB$="I"ANDPEEK(L-22)O160THENP0KEL 

, 32 : L=L-22 : G0SUB600 : P0KEL ,81 

1 40 IPL+1 =A0RL-1 =A0RL+22=A0RL-22=ATHEN8 

000 

150 

160 

170 



IPL=8152THEN60 

P0KES0,0 
G0SUB2010 



Commander February 1983/19 



given at the end of this article. The 
joystick version runs approximately 
twice as slow as the keyboard, due to 
the frequent subroutines required for 
joystick commands. 

Instructions are given at the begin- 
ning of the game, after an introductory 
title and short tune. 

The program is constructed in a 
series of subroutines to allow modifica- 
tions to be easily added. The routines 
are explained below. 

The maze generation section is lines 
1000-1999. The color of the back- 
ground is controlled by variable CL. 
Lines 1210-1230 add cross connec- 
tions at the lower difficulty levels, con- 
trolled by variable DL. 

The enemy is moved by lines 2000- 
2999. The movement is executed in 
line 2010. Lines 2500-2510 subtract 
one point from the score for every dot 
the enemy eats. 

Lines 5000-5999 control the in- 
troductory title and jingle. The prompt 
for instructions is given. 

Instructions are in lines 7000-7999. 

The game termination sequence is 
given in lines 8000-8999. 

The major control loop is at lines 
60-1 60. Here the enemy is controlled, 
and the keyboard input obtained and 
analyzed. A joystick branch to lines 

9000-9999 is used here for joystick 
control. 

The meaning of most of the 
variables should be obvious from their 

context. 

Strategy in Gobble! will become ob- 
vious after a few games. Study of the 
enemy's movement will reveal a very 
useful fact about the direction it takes. 
You may find it is not always a good 
idea to clean out a level before mov- 
ing to the next. 

Only one "life" has been used here, 
although more could be added. Also 
only one enemy has been added. At 
higher levels, more can be introduc- 
ed, although the game slows down 
considerably if a large number are 
controlled. 

Good luck, and start Gobbling! 



20/Commander February 1983 



500 G0T09O 

600 IFPEEK(L)=46THENPT=PT+1 : 

610 RETURN 

1000 A(0)=2:A(1)=-44:A(2)=~2 

CL=CL+1 

IFCL=1THENPRINT" 

IFCL=2THENPRINT" 

IFCL=3THENPRINT" 



P0KES0,231 
:A(3)=44 



1001 
1002 
1003 
1004 
1005 
1006 
1007 
1008 
1010 
1020 
1030 
1040 



IFCL=4THENPRINT" 
IFCL=5THENPRINT" 
IFCL=6THENPRINT" 
IFCL=7THENPRINT" 



BLACK]" 
RED } " 
CYAN}" 

1 purple!" 
green!" 

BLUE}" 
YELLOW}" :CL=0 



WL=160:HL=46: 
PRINT" {CLEAR! 
P0RI=1T021 
PRINTSPC(1 )"| 



SC=7690:A=SC 



REV} 



1050 NEXTI 

1060 P0KEA,4 

1070 POKES0,143:K=FNA(4)-1 :X=K 

1080 B=A+A(K) :POKESO,0:IFPEEK(B)=WLTHEN 

POKEB , K : POKEA+A ( K ) /2 , HL : A=B : G0T01 070 

1090 K=(K+1 )*-(K<3) :IFKOXTHEN1080 

1 1 00 K= PEEK ( A ) : POKEA , HL : IFK< 4THENA= A- A ( 

K) :G0T01070 

1200 P0KE8152,32:P0KE8130,32 

1210 F0RZ=1T0(10-DL) :X=FNA(16) :Y=FNA(18 

) 

1220 P0KE7704+X+Y*22,46 

1 230 NEXT 

1240 P0KE8174J60 

1 250 PRINT" { HOME} SC0RE=" ; PT ; " { HOME } " ; SP 

C(12)"HI=";HS 

1 300 P0KE7788 , 1 40 : P0KE7832 ,133: P0KE7876 

,150: P0KE7920 ,133: P0KE7964 , 1 40 

1310 IFDL<10THENPOKE8030,DL+176 

1320 IFDL>9THENS1=INT(DL/10) :P0KE8030,S 

1+176:P0KE8052,DL+176-S1*10 

1500 RETURN 

2000 A=8152:P0KEA,102:K=2 

2010 B=A+A(K)/2:IFPEEK(B)O160THENG0SUB 

2500 : POKEB , 1 02 : POKEA , 32 : A=B : K= ( K+2 ) +4* 

(K>1) 

2030 K=(K-1 )-4*(K=0) 

PRINT" { HOME } SC0RE= " ; PT ; " { LEFT } " 

RETURN 

IFPEEK(B)=46THENPT=PT-1 :IFPT<OTHEN 



2040 
2050 
2500 
PT=0 
2510 
5000 



RETURN 

print" {clear: 
down} {down} {down! 
rev} bonus score" 
5030 print" {down} | 



{DOWN} {down} {down! 

";SPC(5) m {GREEN! 
DOWN} {DOWN} {DOWN} 









{DOWN} 500 POINTS BONUS!" 

5040 PT=PT+500 

5050 PRINT" {HOME} SCORE=";PT 

5060 F0RWL=1T01OO:P0KES0,INT(RND(1 )*128 

)+128 

5070 F0RT=1T010: NEXT: NEXT 

5080 POKESO,0 

5090 F0RT=1T01OOO:NEXT 

5160 RETURN 

6000 PRINT" {CLEAR} {DOWN} {DOWN} {DOWN} 

{ DOWN } { DOWN } " ; SPC ( 5 ) ; " { GREEN } ********* 
**" 

6002 PRINTSPC(5)"* *" 
6004 PRINTSPC(5)"* GOBBLE! *" 
6006 PRINTSPC(5)"* *" 

6008 PRINTSPC( 5 )"***********" 

6009 G0T065OO 

6010 PRINT" {DOWN} {DOWN} {DOWN} {DOWN} 
{RIGHT} {RIGHT} {RIGHT} {RIGHT} {CYAN} INST 
RUCTIONS?" 

6060 GETA$:IFA$=""THEN6060 
6070 IPA$="Y"THEN7000 
6120 RETURN 
6500 F0RWL=1T03 
6505 P0RSC=1T09 
6510 READX:POKESO,X 
6520 P0RT=1T01OO:NEXT 
6530 NEXT: RESTORE: NEXT 

6535 P0KES0,219 

6536 P0RQ=1OT0OSTEP-1 : P0KEV,Q:P0RT=1 T01 
00: NEXT: NEXT 

6540 P0KEV,1O:P0KES0,O:G0T06O1O 

6560 DATA215,201 ,228,207,215,219,207,20 

1,219 

7000 PRINT" {CLEAR} {REV} GOBBLE" 

7010 PRINT" {DOWN} {BLACK} A RANDOM MAZ 

E WILL" 

7020 PRINT"BE DRAWN ON THE SCREEN"; 

7030 PRINT"CONSISTING OP DOTS." 

7040 PRINT" {CYAN} ON THE SCREEN, YOU" 

7050 PRINT" ARE SHOWN AS q, AND" 

7060 PRINT"YOUR TASK IS TO EAT AS"; 

7070 PRINT"MANY DOTS AS YOU CAN." 

7080 PRINT"YOU SCORE ONE POINT" 

7090 PRINT"POR EACH DOT EATEN." 

7110 PRINT" {PURPLE} ALSO ON THE SCREEN 

7120 PRINT"IS YOUR NEMESIS, SHOWN"; 
7130 PRINT"AS &. THIS TRAVELS" 
7140 PRINT"THROUGH THE MAZE, ALSO"; 
7150 PRINT"EATING DOTS. YOU LOSE" 
7160 PRINT"ONE POINT FOR EACH DOT"; 
7170 PRINT" IT EATS." 



Commander February 1983/21 



7180 PRINT" {GREEN} IP THE & GETS CLOSE 
it 

7190 PRINT"TO YOU, IT WILL EAT" 
7200 PRINT" YOU, AND YOU LOSE. {DOWN}" 
7210 PRINTSPC(12)"{REV}HIT A KEY{OFP} 

7220 GETA$:IPA$=""THEN7220 

7250 PRINT" {CLEAR} THERE IS AN ENTRANC 

E"; 

7240 PRINT"T0 THE MAZE THAT SHUTS"; 

7250 PRINT "AFTER YOU ENTER. ONLY" 

7260 PRINT"ONE EXIT EXISTS. TO" 

7270 PRINT"LEAVE THE MAZE, AND GO"; 

7280 PRINT"TO THE NEXT LEVEL, YOU"; 

7290 PRINT"MOVE INTO THE EXIT." 

7300 PRINT"AS THE LEVELS INCREASE"; 

7310 PRINT"S0 DOES THE DIFFICULTY"; 

7320 PRINT"OP THE MAZE." 

7330 PRINT "{BLACK} BONUS POINTS ARE GIVE 

N"; 

7340 PRINT "AT LEVELS 5 10 AND 15." 

7345 PRINT"{BLUE} {DOWN} " ;SPC( 10) ;"I=UP" 

7346 PRINTSPC(5)"J=LEPT K=RIGHT" 
7348 PRINTSPC(10)"M=D0WN" 

7350 PRINT "{DOWN} {CYAN} TRY FOR A HIGH S 
CORE." 

7360 PRINT "IT'S NOT THAT EASY " 

7370 PRINT" {DOWN} {RED} { REV } HIT A KET 
TO START{OFF}"; 

7380 GETA$:IPA$=""THEN7380 

7390 RETURN 

8000 POKEL ,102: POKEA , 32 : CL=0 : POKESO , 

8010 PRINT" {HOME} GAME OVER " 

8015 IFPT>HSTHENHS=PT 

8020 F0RT=1T01 000: NEXT 

8030 PRINT" {CLEAR} {UP} {UP} {UP} ANOTHE 

R GAME?" 

8040 GETA$:IPA$=""THEN8040 

8050 IFA$<>"Y"THENEND 

8090 PT=0:DL=0 

8100 G0T06O 



To save wear and tear on the fingers, a copy of this game can be 
obtained by sending $3 (to cover first class postage and 

duplicating), a mailer, and a blank cassette to: 
Tim Parker, 66 McKitrick Dr., Kanata, Ontario, K2L 1T7. 



22/Commander February 1983 



, -;. ' R . 













H^HH 




GAME PROGRAM 
DEVELOPMENT KIT 




^fl^^^^HflHKI 



for the 



H 



VIC - 20 and COMMODORE - 64 

Registered trademarks of Commodore Business Machines, Inc. 

SIX TOOLS TO HELP YOU WRITE YOUR OWN 
FAST ACTION ARCADE-STYLE GAMES 



) ^B&x&^& 



'-'-'■■■■■ 



DECODER — Decodes programs written in machine language (like game cartridges, utility cartridges , and even the 
computer's own internal operating programs). Produces a program in an English-like language (Assembler) which can 
be studied to figure out how they did it. The programs created with the decoder can be customized with the EDITOR 
AND INCORPORATED INTO YOUR OWN NEW GAME PROGRAM. The ASSEMBLER turns your programs 
created with the Decoder and the Editor back into machine language and puts them out to tape or disk so the LOADER 
can load them into the computer's memory to be tested and RUN. The MONITOR assists you in debugging your new 
game program by allowing you to run it a step at a time and making modifications if you need to. The INSTRUCTION 
GUIDE is written so that even a beginner can learn the skills needed to become a pro!!! 

DESIGNED TO RUN ON ALL VIC-20's 

f $49,95 plus $2.00 p&h buys the kit that could make you rich. Why wait? 

Send check, M.O., VISA/MC ($2.00 s.c, please include expiration date), or specify COD (add $3.00) to: 



P.O. Box 207, Cannon Falls, MN 55009 
507-263-4821 





PET/ C B M 



A Super Editor for the PET 



For those who may not know what 
Basic— Aid is I will start with a little 
background. Basic-Aid is a BASIC 
program development too! for the PET 
and was originally written by Bill Seiler 
of Commodore and is very much like 
the Toolkit. It has the following 
commands; 

Aid— A Help function when a 
BASIC program error occurs. 

Auto— Auto line numbers for pro- 
gram entry. 

Break— Break to the TIM machine 
language monitor in the PET. 

Change— Search for an old string 
and replace it with a new string in a 
BASIC program. 

Delete— Delete a range of lines 
from a BASIC program. 

Find— Find a string in a BASIC pro- 
gram and print the lines where it 
occurs. 

Kill— Disable Basic-Aid from use. 

Number— Renumber a BASIC pro- 
gram correcting all GOTOs and 
GOSUBs. 

Repeat— Enable repeat keys. 

Trace— Enable the trace function, 
which prints the line number and token 
in a window when a program is run. 

The program was a 2K program 
which loaded into the top 4K of a 32K 
PET and worked only on Upgrade 
BASIC. 

The next version of Basic-Aid that I 
know about was a version from Com- 
modore Canada. This version was 
upgraded for BASIC 4.0 and added 
the following commands; 

First— List a BASIC program direct- 
ly from the disk to the screen. 

Hex— Convert HEX to decimal and 
24/Commander February 1983 



by F, Arthur Cochrane 
Beech Island, SC 

decimal to HEX. 

Lower— Put the PET into lower 
case. 

Merge— Merge a program from the 
disk with the one in memory. 

Read— Read a sequential file direct- 
ly from the disk to the screen. 

Start— Print the loading address of 
a program on the disk. 

Upper— Put the PET into upper 
case. 

The next version of Basic-Aid that I 
came across had the following com- 
mands and functions added: 

Dump— Dump the variables defin- 
ed in the program. 

Crt— -Dump the screen to the 
printer. 

Pack— Remove the extra spaces 
and REM's from a BASIC program. 

Dos— Also the DOS Support com- 
mands (@j>,/,a) were included. 

The ability to print the screen with 
the press of a key and to escape from 
the quote/insert mode were also 
added. 

My additions to Basic-Aid have 
been the following commands and 
functions: 

Size— Give the size of a program in 
memory or on the disk. 

Spool— Send a file from the disk 
directly to the printer, 

Un-new— Restore a program after 
a NEW. 

The ability to scroll the BASIC pro- 
gram with the cursor control keys was 
added. The scroll feature was adopted 
from code for a version of the CBM 
assembler editor by Bill Seiler. 

Many bugs were also fixed. I would 
like to thank Jim Butterfield for the 



AID4 program which allowed me to fix 
a renumber bug in Basic-Aid. The 
DOS commands also had bugs which 
were fixed. Also when upgraded to 
BASIC 4.0 the trace would not func- 
tion because a compare was now in- 
correct. The screen dump was 
modified to allow printing to an ASCII 
printer. 

Basic-Aid is a very powerful BASIC 
program development aid, but how 
does it compare to other programs 
available for the PET? 

Basic-Aid has more features than 
the Toolkit and is more useful than a 
Toolkit alone. 

The Disk-O-Pro has some useful 
features. The most important is the ad- 
dition of BASIC 4.0 commands to 
Upgrade BASIC. Also the Print Using 
command for formated output is 
useful The Disk-O-Pro will function 
with a Toolkit if one is present. A disad- 
vantage is that the Disk-O-Pro must be 
in place for these commands to work 
in a program and it slows BASIC 
down. See Compute issue #8 page 
112 for a complete review. 

The Command-0 adds the Print Us- 
ing command, the Toolkit commands, 
and others to BASIC 4.0. The Re- 
number command is improved to 
allow renumbering in a line range in- 
stead of the whole program and the 
Trace function has been improved to 
show the whole line that is being trac- 
ed. But again the Command-0 must 
be enabled for the Print Using com- 
mand and others to work in a 
program. 

Power has some different com- 
mands also. It has the improved 



Renumber command and a very 
powerful Trace function, it has a 
Search and Replace command with 
the option for don't care characters in 
the search string. Power also has ins- 
tant keywords and instant subroutines 
options which can be useful. The XEC 
command is \/ery powerful and has 
many options, such as merging a pro- 
gram from disk. Power has the option 
for other commands to be added to it. 
In fact there is a Power-Aid available 
from the user groups below. For a full 
review of Power see the Overview in 
Compute issue #18 page 136. 

SYSRES is the newest BASIC utility 
on the market and has every com- 
mand you can think of. It has com- 
mands to change with don't cares and 
at the start of lines, formated outputs 
to Commodore and ASCII printers, list 
program, sequential, and relative files 
from the disk. The GET and PUT com- 
mands allow editing sequential files. 
The thing I personally dislike is that you 
have to load SYSRES each time from 
the disk on reset or cold start. SYSRES 
can't be killed then SYSed to enable 
it, it must be reloaded from disk. Also 
SYSRES eats up 8K of memory. 
SYSRES can be loaded into RAM at 
$9000 and $A000 if the PET owner 
has RAM in the 2 sockets. I wish the 
author of SYSRES would sell a version 
of SYSRES in two 4K EPROMs so on 
cold start SYSRES could be called with 
a SYS. 

So if you have a PET which Super- 
editor is for you? The answer will de- 
pend on the BASIC your PET has and 
the features you want a super-editor to 
have. Upgrade BASIC users can 
choose from the Toolkit with a Disk-O- 
Pro, Power, SYSRES, or Basic-Aid. 
Basic 4.0 users can choose the Toolkit, 
Command-O, Power, SYSRES, or 
Basic-Aid. Each super-editor has some 
features not included in the others. The 
user should get all the information on 
each and decide for himself. In this 
evaluation Basic-Aid has a strong sell- 
ing point in that it is in the public do- 
main and is FREE. There are other 
Super-editors not mentioned here but 
these are the ones most seen in ads 
and the ones with which the author is 
familiar. 

Note that Original BASIC users are 



limited to a Toolkit only. Because of 
vast Zero page changes between 
Original BASIC and Upgrade BASIC 
and Original BASIC not being able to 
work with the Commodore disk, Basic- 
Aid as it stands now will not assemble 
for Original BASIC. 

After Basic-Aid was done it was 
noticed that Basic-Aid was very similar 
to the Commodore Assembler Editor 
that is supplied with the Assembler 
Development Package. The only thing 
Basic-Aid lacked was a method to 
GET and PUT the source code files to 
the disk. Since the source code for the 
Commodore Editor is supplied with the 
Development Package it is available 
for easy modification and use. 

The Assembler- Aid program 
changes the CHRGET Wedge routine 
to point to itself. A line that is input 
beginning with a line number is in- 
serted into memory without being 
tokenized. Otherwise this program 
checks to see if the direct command 
is in its command list, and if it is the 
command is executed. If the com- 
mand is not an editor command then 
a jump is made to Basic-Aid to let it 
check its commands. 

Along with the GET and PUT com- 
mands the Format command was 
added to list out source code formated 
like the assembler formats. Also the 
Loader function was added so that the 
separate loader program is not need- 
ed unless the object code would load 
over the Assembler-Aid. 

Using Basic-Aid as part of an 
assembler editor allows the program- 
mer all the features of Basic-Aid to be 
used in the editing of matching 
language source code. The most 
powerful of these is the ability to scroll 
through the code with the cursor con- 
trol keys. 

But where do you get Basic-Aid and 
the Assembler-Aid programs? A PET 
user group is the best source, two user 
groups which can provide Basic-Aid 
are ATUG and TPUG (addresses 
below). For those who would like 
source code, Basic-Aid and 
Assembler-Aid source code in Carl 
Moser's MAE assembler format is 
available and there are programs 
available to convert MAE format files 
to CBM format files. Basic-Aid and 



Assembler-Aid can be assembled and 
burned into an EPROM and plugged 
into one of the empty sockets in the 
PET so it is available with a SYS and 
does not have to be loaded from disk 
each time the PET is reset or powered 
up. 

In my 4032 PET I have Basic-Aid in 
the $9000 socket and the Assembler- 
Aid and Extramon in the $A000 
socket. With these two EPROMs I on- 
ly need the assembler program on 
disk to have a complete 6502 develop- 
ment system with editor, assembler, 
and debugger. 

I hope that you will pass Basic-Aid 
and Assembler-Aid on to your friends. 
These programs are in the public do- 
main and should be passed around 
freely. If anyone finds bugs or has 
comments please contact me about 
them. The command list for Basic-Aid 
and Assembler-Aid follows. 

BASIC-AID COMMAND LIST 
AUTO LINE NUMBERING 

Syntax: AUTO inc. 
AUTO 
Auto prints the BASIC line numbers 
for you as you key-in a program. Enter 
AUTO with an increment, then enter 
the first line of the program. After hit- 
ting RETURN Basic-Aid will provide 
the next line number. Turn AUTO off 
by entering the command with no in- 
crement. Increment can be from 1 to 
127. 

BREAK TO THE MONITOR 

Syntax: BREAK 

The BREAK command calls the 
machine language monitor in the PET. 
This is a call to the monitor and not a 
break, so open files on BASIC 4.0 will 
remain open for printing from the 
monitor. 

CHANGE TEXT 

Syntax: CHANGE @ search string @ 
replacement string @, line range 

The CHANGE command will search 
through a BASIC program for a string 
and change it to a replacement. The 
changed lines are displayed as they 
are changed. Because BASIC lines 
are tokenized it may be necessary to 
enclose the strings in quotes to 
change them. The whole program is 
searched unless a line range is given. 
Commander February 1983/25 



The line range has the same format as 

the list command. 

DUMP THE SCREEN TO A 

PRINTER 

Syntax: CRT 

The screen is printed to a printer 
connected to the PET as device 
number 4. There are versions of Basic- 
Aid for ASCII and Commodore 
printers. The screen dump to a Com- 
modore printer will be exactly like the 
screen. The screen dump to an ASCII 
printer will be in upper case only if the 
PET is in graphics mode or lower/up- 
per case if the PET is in lower case 
mode. 

DELETE A RANGE OF LINES 
Syntax: DELETE line range 

Deletes a given line range of lines 
from a BASIC program. The line range 
has the same format as the list 
command. 

DISPLAY THE BASIC VARIABLES 

Syntax: DUMP 

DUMP will list the variables used in 
a BASIC program and their values. 
Dump does not list arrays. The 
variables are listed in the order in 
which they were created. The 
variables are printed in such a way that 
they can be edited with the screen 
editor so that a program can be stop- 
ped, the variables dumped, edited to 
new values, and the CONT command 
given to continue the program with the 
new values. 

FIND TEXT 

Syntax: FIND ©search string®, line 
range 

The FIND command searches a 
BASIC program for a string and 
displays the lines where it occurs. 
Because BASIC lines are tokenized it 
may be necessary to enclose the 
search string in quotes to find it. The 
whole program is searched unless a 
line range is given. The line range has 
the same format as the list command. 

LIST A PROGRAM FROM THE DISK 

Syntax: FLIST "program filename" 

This command will list a BASIC pro- 
gram on the disk directly to the screen 
without affecting the contents in the 
memory. WARNING: DO NOT use the 
keyprint function to try and dump the 
screen to the printer while this com- 
mand is executing. 
26/Commander February 1983 



DISPLAY WHERE AN ERROR 
OCCURED. 

Syntax: HELP 

The HELP command will display the 
BASIC line that caused the BASIC pro- 
gram to stop and highlight where in 
the line the problem occured. 
CONVERT HEX AND DECIMAL 
NUMBERS 
Syntax: HEX $hex number 

HEX decimal number 

The HEX command will convert 
HEX to decimal and decimal to HEX. 
This will be very useful in figuring 
POKE, PEEK, and SYS address. If the 
number input is preceded by a dollar 
symbol then the number is taken to be 
HEX and the decimal value for it is 
printed. If a decimal number is entered 
then the HEX value for it is returned. 
The range for conversion is to 65535 
or $0000 to SFFFF. 
KILL BASIC-AID 
Syntax: KILL 

Basic-Aid can be disabled with the 
KILL command. This restores the IRQ 
vector and CHRGET routine in zero- 
page. Basic-Aid and be reenable with 
a SYS. to the start of the Basic-Aid 
machine code, for the RAM version for 
32K PETs this address is 7*4096. 
PUT THE PET INTO LOWER CASE 
Syntax: LOWER 

This command puts the PET into 
lower case mode. This is the same as 
a POKE 59468,14. 
MERGE A PROGRAM WITH ONE IN 
MEMORY 
Syntax: MERGE "program filename" 

This command will merge a BASIC 
program on the disk with one in 
memory. The merging will be just like 
the program was typed in from the 
keyboard so lines are merged bet- 
ween ones in memory if necessary 
and duplicate lines in memory are 
replaced with the merged lines. The 
program is listed as it is merged. 
TURN OFF REPEAT AND SCROLL 
Syntax: OFF 

This command restores the PETs 
normal IRQ vector. This will cancel 
repeat keys (except on FAT 40s and 
8032s), scrolling, and keyprint. 
PACK A PROGRAM 
Syntax: PACK 

This command will remove remarks 
and waste spaces in a BASIC pro- 



gram. Note: don't branch in a BASIC 
program to deleted remarks. This 
command is fooled easily so keep a 
copy of the original in case the pack- 
ing does not function properly. 
READING A SEQUENTIAL FILE 
Syntax: READ "seq filename" 

The READ command will read a se- 
quential file from the disk and print it 
to the screen. This command can be 
very handy for viewing data created 
by programs. WARNING: DO NOT 
use the keyprint function to try and 
dump the screen to the printer while 
this command is executing. 
RENUMBER A BASIC PROGRAM 
Syntax: RENUMBER 

RENUMBER start line number 
RENUMBER start line 
number, increment 

This command will renumber a 
BASIC program correcting all GOTOs 
and GOSUBs in the program. The pro- 
gram is renumbered starting at 100 
and with an increment of 10. A start- 
ing line number can be input other 
than 1 00 and an increment other than 
10 can be input. 
ENABLE REPEAT KEYS 
Syntax: REPEAT 

SCROLL (FAT 40s & 8032s) 

This command will enable repeat 
keys, scrolling, and keyprint. Repeat 
keys are set automatically when Basic- 
aid is first called and automatically 
cancelled each time a program is 
loaded. 

GIVE THE SIZE OF A PROGRAM 
Syntax: SIZE 

SIZE "program filename" 

The SIZE command will give the size 
of a BASIC program in memory or any 
program on disk. The size of a pro- 
gram in memory is found by subtrac- 
ting the end of the program location 
from the start of the program location. 
The size of a program on disk is found 
by counting the bytes in the file. The 
size is given in decimal and HEX. 
SPOOL A FILE FROM DISK TO 
PRINTER 

Syntax: SPOOL "sequential file- 
name." 

SPOOL 

This command will send a file direct- 
ly from the disk to the printer. The PET 
can then do other things, such as 
Continued on page 28 








Simplify your printer set-up with 

SMART ASCII $59.95 

At last! A simple, convenient, low-cost printer interface. 
It's ASCII: connects the VIC or '64 to your favorite parallel 
printer (Epson, Microline, Smith-Corona TP-l t etc.). 
It's SMART: translates unprintable cursor commands and 
control characters for more readable LISTings. 
Converts user port into parallel port with Centronics protocol, ad- 
dressable as Device 4 or 5. Three print modes: CBM ASCII (all 
CAPS for LISTing); true ASCII (UPPER/lower case for text); and 
TRANSLATE (prints (CLR), (RED), (RVS), etc.). For any size 
VIC or the '64. Complete with printer cable and instructions. 

UN-WORD PROCESSOR 2... $19.95 

The improved UN-WORD retains the practicality and 
economy of the original. Easy-to-use text entry and screen 
editing. Use with any size VIC (5K to 32K). Supports VIC 
printers, RS-232 printers, and now parallel printers*, too. 

Handy user Menu selects: single- or double-space, form 
feed, print width, number of copies. Supports printer control 
codes. With complete documentation. 

"Parallel printers require an interface. See SMART ASCII. 

BANNER/ HEADLINER $14.95 

Make GIANT banners on your printer. Prints large characters across 
the page or sideways down the paper roll. . .how about a 10-ft. 
long "Welcome Home!". VIC or RS-232 printers. 

viC-20 Is a trademark of Commodore Business Machines 



PICs. .IMPROVED! . .$19.95 

Now with hi-rez draw routine for your joystick PLUS hi- 
rez dump to VIC printer. Features 19 fascinating hi-rez 
digitized pictures. Capture your creativity, or ours, on 
paper. Amazing funf 

GRAFIX DESIGNER $14.95 

Design your own graphic characters! Recall, erase, edit, copy, 
rotate . . . save to tape or disk for use in your own programs. Simple 
to use. Includes examples and demo routines. 

GRAFIX MENAGERIE $14.95 

Three-program set shows off VIC graphics potential for art, science, 
music, business. . .learn by seeing and doing. Contains BASIC 
plotting routines you may extract and use 



TERMINAL-40 



$29.95 



Join the world of telecommunications in style: 
40-character. lines and smooth scrolling text for easy 
reading! All software — no .expensive hardware to buy. 4K 
(or larger) Receive Buffer with optional dump to VIC 
printer. Function key access to frequently- used modes. Fully 
programmable Baud, Duplex. Parity. Wordsize, Stopblt. and 
Linefeed; supports control characters. Requires VIC -20, 8K (or 
larger) memory expansion and suitable modem. With 24 p. manual 
and Bulletin Board directory. 



ORDER DESK 

Open 9 am - 4 pm 

(816) 254-9600 

VISA/Mastercard add 3% 
COD. add $3.50 







r^ 


MIDWEST 

MICRO associates 


PO BOX 6148, KANSAS CITY, MO 64110 



MAIL ORDER: Add $1.25 shipping 
and handling. Send money order for fastest 
delivery. VISA/Mastercard send *and exp. 
date (3% added). Missouri residents include 
4.6% sales tax. Foreign orders payable U.S.$, 
U.S. Bank ONLY; add $5 shipping/handling. 

All programs on 

high quality digital 

cassette tape. 

Write for free brochure. 
Dealer inquiries invited. 



AtJiCing SOFTWARE FOR THE NEW 




COMMODORE 6 A- 



'64 TERMINAL ($29.95).Same impressive features as 
TERMINAL-40: smooth-scrolling, 40-character lines, VIC 
printer dump, etc. GIANT 24K Receive Buffer. No memory 
expansion required; requires '64 and modem. 

'64 GRAFIX SAMPLER ($19.95). indulge in the 

graphics splendor of the '64. Interact with demos of techniques 
such as plotting of points, lines and 3-D objects; drawing in 
the hi-rez mode (joystick control); animating sprites; plus 
assorted graphics displays. Routines may be extracted for use in 
your own programs. 

'64 PANORAMA ($19.95). Explore picture graphics 
on the amazing '64! Nineteen fascinating digitized pictures PLUS 
hi-rez draw routine for your joystick AND hi-rez dump to 
VIC printer. Capture our pics or your creativity on paper. 

'64 BANNER /HEADLINER ($19.95). Make 

GIANT banners and posters with your '64 and printer. Sup- 
ports VIC printers, RS-232 printers (requires interface), and 
parallel printers (requires Smart Ascii). 



Continued from page 26 

editing a program or running a pro- 
gram (but with no access to the IEEE 
bus). The command is started with the 
command and a filename of a sequen- 
tial file name. Basic-Aid opens the file 
and listens. The printer then gets off 
the IEEE bus which allows the disk to 
talk directly to the printer. When the 
printer stops printing enter Spool with 
no file name to unlisten the printer, un- 
talk the disk, and close the file. 

Use the spool command to list a 
long program while you use the PET 
for something else. Create a file with 
OPEN8 l 8 1 8, i, 0:TEMP l S I W ,, :CMD8:L- 
IST 

PRINT#8:CLOSE8 
Then spool this to the printer. 
FIND THE LOAD ADDRESS 
Syntax: START "program filename" 

This command will give the load ad- 
dress of a program on the disk. The 
load address is found by reading the 
first two bytes of the file which is the 
address where the program is loaded. 
The load address is given in decimal 
and HEX. This command can be us- 
ed to find where machine language 
programs load. 

TRACE A PROGRAM EXECUTA- 
TION 

Syntax: TRACE speed 
TRACE 

The TRACE command enables or 
disables the tracing of a BASIC pro- 
gram. Tracing is enabled with the 
command and a number and disabl- 
ed with the command alone. The 
number input controls the speed of the 
tracing. The number can be from 1 to 
127 with 1 being the fastest and 127 
the slowest. Tracing takes place in a 
window in the upper right of the screen 
with the lost nine lines traced and the 
current line that is executing. The line 
number and what is executing in the 
line are listed. 

RECOVER A PROGRAM AFTER A 
NEW 
Syntax: UN-NEW 

If after a New command is entered 
it is discovered that a program has not 
been saved it can be recovered with 
this command. 

PUT THE PET INTO UPPER CASE 
Syntax: UPPER 

28/Commander February 1983 



This command puts the PET into up- 
per case mode. This is the same as a 
POKE 59468,12 
DOS SUPPORT 

Syntax: ► 

► disk command 

► $0 

/program name 
Aprogram name 

The DOS support commands are 
supported. The at sign and greater 
than (@, ►) symbol are used to read 
the error channel, send commands, 
and display the disk directory. The 
symbol alone will read the error chan- 
nel and print it to the screen. The sym- 
bol followed by a disk command will 
send that command to the disk. The 
symbol followed by the dollar symbol 
will display the directory to the screen. 
WARNING: DO NOT use the keyprint 
function to try and dump the screen to 
the printer while this command is ex- 
ecuting. The slash (I) will load a pro- 
gram from the disk. Repeat keys are 
not disabled by this load. The uparrow 
(a) will load and execute a program 
from disk. 
ESCAPE QUOTE MODE 

The stop key on graphics and the 
escape on business keyboards can be 
pressed to get out of insert mode and 
quote mode. This function will only 
work when repeat keys are enabled. 
(This is a normal feature on the 8032.) 
KEYPRINT 

This function allows the screen to be 
printed to the printer with the press of 
one key. This is the same as the CRT 
command except that it can occur in 
a program. On graphics keyboards 
use the shifted backslash and oh 
business use the shifted escape. This 
function is available only when repeat 
keys are enabled. This can be very 
useful for printing instructions of a pro- 
gram that will then only print to the 
screen. 
SCROLL A PROGRAM 

The up and down cursor control 
keys can be used to scroll through a 
BASIC program. When the cursor is at 
the bottom of the screen and a cursor 
down is pressed, the next line will be 
printed and when the cursor is at the 
top of the screen and a cursor up is 
pressed, the previous line will be listed. 
The cursor must be in the first two col- 



umns for scrolling to take place. This 
function is only available when repeat 
keys are enabled. 

NOTE: The commands which. print 
to the screen (Change, Dump, Find, 
Flist, Merge, Read, Trace, and Direc- 
tory (►$)) can be paused, held, or 
stopped. Pause by holding the shift 
key down and stop with the stop key. 
To hold the display use the space bar 
on graphics keyboards and 6 on 
business keyboards. To continue the 
display use the ^ key on graphics 
keyboards and 9 on business 
keyboards. 

ASSEMBLER-AID 
COMMAND LIST 

BASIC-AID 

Syntax: BASIC-AID 

This command will disable these ex- 
tra commands and initialize Basic-Aid 
only. 

COLD 

Syntax: COLD 

The COLD command will do a soft- 
ware reset of the PET. This reset is like 
a power-on restart. 

FORMATTED PRINT 

Syntax: FORMAT (line range) 

The FORMAT command is used to 
print the text file in tabbed format like 
the assembler. For this function to 
work correctly you must type 
mnemonics in column two, or one 
space from labels. The line range is the 
same as for a LIST. The same keys as 
for Basic-Aid can be used for to hold, 
pause, and stop the listing. 

GET 

Syntax: GET "file name"(,line #) 

The GET command loads 
assembler text files from disk. This 
command is used to load source files 
into the editor and append to files 
already in memory. The file is input 
beginning at the line number given. 
GET starts numbering at 1000 by 10. 

PUT 

Syntax: PUT "dr:file name;; 
(.line ;; = "; range) 

CPUT "dnfile name;; 
(.line ;; = "; range) 
The PUT command outputs source 

Continued on page 67 



AARDVARK - THE ADVENTURE PLACE 

ADVENTURES FOR OSI, TRS-80, TRS-80 COLOR, SINCLAIR, PET, VIC-20 



ADVENTURES — Adventures are a unique 
form of computer game. They let you spend 
30 to 70 hours exploring and conquering a 
world you have never seen before. There is 
little or no luck in Adventuring. The rewards 
are for creative thinking, courage, and wise 
gambling — not fast reflexes. 

In Adventuring, the computer speaks and 
listens to plain English. No prior knowledge 
of computers, special controls, or games is re- 
quired so everyone enjoys them — even people 
who do not like computers. 

Except for Quest, itself unique among Ad- 
venture games, Adventures are non-graphic. 
Adventures are more li ke a novel than a comic 
book or arcade game. It is like reading a par- 
ticular exciting book where you are the main 
character. 

AH of the Adventures in this ad are in Basic. 
They are full featured, fully plotted adventures 
that will take a minimum of thirty hours {in 
several sittings) to play. 

Adventuring requires 16k on Sinclair, TRS- 
80, and TRS-80 Color. They require 8k on OSI 
and 13k on VIC-20. Sinclair requires extended 
BASIC. 

TREK ADVENTURE by Bob Retelle - This 
one takes place aboard a familiar starship and 
is a must for trekkies. The problem is a famil- 
iar one — The ship is in a "decaying orbit" 
(the Captain never could learn to park!) and 
the engines are out (You would think that in 
all those years, they would have learned to 
build some that didn't die once a week). Your 
options are to start the engine, save the ship, 
get off the ship, or die. Good Luck. 

Authors note to players — I wrote this one 
with a concordance in hand. It is very accurate 
— and a lot of fun. It was nice to wander 
around the ship instead of watching it on T.V. 

CIRCLE WORLD by Bob Anderson - The 

Alien culture has built a huge world in the 
shape of a ring circling their sun. They left 
behind some strange creatures and a lot of ad- 
vanced technology. Unfortunately, the world 
is headed for destruction and it is your job to 
save it before it plunges into the sun! 

Editors note to players — In keeping with 
the large scale of Circle World, the author 
wrote a very targe adventure. It has a lot of 
rooms and a lot of objects in them. It is a very 
convoluted, very complex adventure. One of 
our largest, Nat available on OSI. 

HAUNTED HOUSE by Bob Anderson - This 
one is for the kids. The house has ghosts, gob- 
tins, vampires and treasures — and problems 
designed for the 8 to 13 year old. This is a 
real adventure and does require some thinking 
and problem solving — but only for kids. 

Authors note to players — This one was fun 
to write. The vocabulary and characters were 
designed for younger players and lots of things 
happen when they give the computer com- 
mands. This one teaches logical thought, map- 
ping skills, and creativity while keeping their 
interest. 



DERELICT by Rodger Olsen and Bob Ander- 
son — For Wealth and Glory, you have to ran- 
sack a thousand year old space ship. You'll 
have to learn to speak their language and 
operate the machinery they left behind. The 
hardest problem of all is to live through it. 

Authors note to players — This adventure 
is the new winner in the "Toughest Adventure 
at Aardvark Sweepstakes". Our most difficult 
problem in writing the adventure was to keep 
it logical and realistic. There are no irrational 
traps and sudden senseless deaths in Derelict. 
This ship' was designed to be perfectly safe for 
its' builders. It just happens to be deadly to 
alien invaders like you. 




PYRAMID by Rodger Olsen - This is one of 
our toughest Ad ven tu res . Average time 
through the Pyramid is 50 to 70 hours. The 
old boys who built this Pyramid did not mean 
for it to be ransacked by people like you. 

Authors note to players — This is a very 
entertaining and very tough adventure. I left 
clues everywhere but came up with some in- 
genous problems. This one has captivated 
people so much that I get calls daily from as 
far away as New Zealand and France from, 
bleary eyed people who are stuck in the 
Pyramid and desperate for more clues. 

QUEST by Bob Retelle and Rodger Olsen - 

THIS IS DIFFERENT FROM ALL THE 
OTHER GAMES OF ADVENTURE!!!! It is 
played on a computer generated map of 
Alesia. You lead a small band of adventurers 
on a mission to conquer the Citadel of Moor- 
lock. You have to build" an army and then arm 
and feed them by combat, bargaining, explora- 
tion of -ruins and temples, and outright ban- 
ditry. The game takes 2 to 5 hours to play 
and is different each time. The TRS-80 Color 
version has nice visual effects and sound! Not 
available on OSI. This is the most popular 
game we have ever published. 

MARS by Rodger Olsen - Your ship crashed 
on the Red Planet and you have to get home. 
You will have to explore a Martian city, repair 
your ship and deal with possibly hostije aliens 
to get home again. 

Authors note to players - This is highly 
recommended as a first adventure. It is in no 
way simple — playingtime normally runs from 
30 to 50 hours — but it is constructed in a 
more "open" manner to let you try out ad- 
venturing and get used to the game before 
you hit the really tough problems. 



NUCLEAR SUB by Bob Retelle - You start 
at the bottom of the ocean in a wrecked Nu- 
clear Sub. There is literally no way to go but 
up. Save the ship, raise her, or get out of her 
before she blows or start WWIII. 

Editors note to players — This was actually 
plotted by Rodger Olsen, Bob Retelle, and 
someone you don't know — Three of the nas- 
tiest minds in adventure writing. It is devious, 
wicked, and kills you often. The TRS-80 Color 
version has nice sound and special effects. 

EARTHQUAKE by Bob Anderson and Rodger 
Olsen - A second kids adventure. You are 
trapped in a shopping center during an earth- 
quake. There is a way out, but you need help. 
To save yourself, you have to be a hero and 
save others first. 

Authors note to players — This one feels 
good. Not only is it designed for the younger 
set (see note on Haunted House), but it also 
plays nicely. Instead of killing, you have to 
save lives to win this one. The player must 
help others first if he/she is to survive — I like 
that. 

Please specify system on all orders 




ADVENTURE WRITING/DEATHSHIP by 
Rodger Olsen — This is a data sheet showing 
how we do it. It is about 14 pages of detailed 
instructions how to write your own adven- 
tures. It contains the entire text of Deathship. 
Data sheet - $3.95. NOTE: Owners of OSI, 
TRS-80, TRS-80 Color, and Vic 20 computers 
can also get Deathship on tape for an addi- 
tional $5.00. 

PRICE AND AVAILABILITY: 

All adventures are $14.95 on tape except 
Earthquake and Haunted .House which are 
$9.95. Disk versions are available on OSI and 
TRS-80 Color for $2.00 additional. 



ALSO FROM AARDVARK - This is only a partial list of what we carry. We have a lot of other games (particularly for the 
TRS-80 Color and OSI), business programs, blank tapes and disks and hardware. Send $1.00 for our complete catalog. 



va 



AARDVARK - 80 

2352 S. Commerce, Walled Lake, Ml 48088 

(313)669-3110 

Phone Orders Accepted 8:00 a.m. to 4:00 p.m. EST. Mon.-Fri. 



* 



TRS-80 COLOR 



SINCLAIR 



OSI 



VIC-20 



NEW WORD PROCESSOR FOR VIC 20/CMDR 64— $19.95 (tape) • $24.95 (disk) 

Commander February 1983/29 






Programing Time 



by Hal Bredbenner 



INTRODUCTION 

One of the most useful features of 
Commodore computers is the Real 
Time Clock. This article describes 
some short subroutines that will 
simplify the use of the clock in your 
programs. Also included is a test pro- 
gram that will demonstrate the use of 
the subroutines. Hopefully the test pro- 
gram will spark some ideas of your 
own about how to use the clock. All 
Commodore systems include the Real 
Time Clock feature and the routines 
given will work on any one of them. 

Years ago, as an early entry in the 
microprocessor market, Commodore 
introduced the PET 2001 . At the time 
the PET was a very good buy because 
of the many features in one small 
package. 8K of RAM, an integral 
cassette deck, CRT with graphics, and 
MICROSOFT BASIC were hard to 
pass up at only $799.00. I suppose 
that because it had so many advan- 
tages over the competitors offerings 
some of its more useful functions were 
not well advertised. One such in- 
dispensible function that was on even 
the earliest models was a Real Time 
Clock (RTC). The RTC has been incor- 
porated into the design of all Com- 
modore systems since then. For some 
reason the RTC, which is directly 
setable and readable from BASIC, has 
not been used in many of the available 
software packages. Perhaps this is 
because most hardware vendors on- 
ly supply a RTC as an option or costly 
addition. 

UNDERSTANDING Tl$ 

Before using the RTC, which is 
always available as the string variable 
Tl$, you must understand the format 
in which the time is presented. The Tl$ 
is always six characters in length. The 
first two are the hours, the middle two 

30/Commander February 1983 



characters are the minutes, and the 
last two are the seconds. In addition 
to this HHMMSS format the RTC is 
also a 24 hour clock. A 24 hour clock 
is the format used in the military and 
most communications fields. To con- 
vert standard time to 24 hour clock 
time simply add 12 hours to the stan- 
dard time if it is after 12:00 noon. For 
example 2:00 p.m. standard time is 
14:00 24 hour clock time. 

MAKING TIME CALCULATIONS 

Whether you use the RTC for timed 
data logging, device scheduling, or 
game timing you will eventually want 
to perform some mathematical opera- 
tions on the time. Perhaps the total 
time between events, time left in a cy- 
cle, or average duration of a cycle 
must be calculated. Since the RTC is 
available as a string variable some 
manipulation must take place before 
any time calculations can be made. 
The most common way of reducing 
this data to a usable format is to con- 
vert the HHMMSS string to its 
equivalent number of seconds. Any 
computations can then be made to this 
numeric quantity and then a conver- 
sion made back to the HHMMSS for- 
mat. Using the string manipulation and 
numeric-to-string conversion 

statements of BASIC these conver- 
sions are fast and simple. 

TIME CONVERSION 
SUBROUTINES 

The subroutine at line 1000 of 
LISTING ONE converts the HHMMSS 
format to a total number of seconds. 
Enter the subroutine with X$ set to the 
HHMMSS time needed to convert. 
Upon returning from the routine X is 
equal to the total number of seconds 
in the time given. When the subroutine 
at line 2000 is called X should be equal 



to the number of seconds to convert. 
The correct HHMMSS format for the 
number of seconds is returned in X$. 
In line 2060 a check is made to see 
if complete days, groups of 84600 
seconds, are included in the X value. 
If they are they are included in the 
returned data by placing the variable 
D equal to the number of complete 
days. 

FURTHER FORMATTING 
SUBROUTINES 

Frequently it is necessary to not on- 
ly perform calculations using the data 
in the RTC but also to display the time 
on the CRT. The time in HHMMSS for- 
mat is a little crude for direct display 
so the subroutine at line 3000 allows 
a more readable format of the time 
data to be generated. Two colons are 
inserted into the HHMMSS string 
assigned to X$ so that the string ends 
up like HH:MM:SS. I have found this 
subroutine saves memory rather than 
having to do the string manipulations 
each time jn the PRINT statement. The 
final subroutine of LISTING ONE at line 
4000 is just the reverse of the previous 
one. It removes the colons from the 
HH:MM:SS format and returns a 
HHMMSS format that can be used for 
further processing. 

A DEMONSTRATION PROGRAM 

USTING TWO is of a short program 
that uses the four subroutines just 
described. The program first prompts 
for an INPUT of Tl$, the RTC string 
variable. The string input should be six 
characters in length and in the 
HHMMSS format. After printing the 
time headers (lines 140-172) a loop is 
entered. This loop (lines 190-280) 
checks for a key depression and con- 
stantly updates the screen display with 



the real and calculated time values. 
When a key is depressed the program 
jumps to line -300 where the times 
shown are operated on mathmatical- 
ly. Note in line 400 that any value (in 
this case AT) should be rounded, trun- 



cated, or otherwise made into a whoie 

integer form for use in these PTC 
subroutines. 

The RTC routines given can be us- 
ed in a variety of programs. Program 
execution time, printing time, average 



user response time and countdown 
timing for games are but a few ways 
to use the clock. On Commodore 
systems the RTC is available whether 
it is used or not, so why not use it to 
its fullest? 



LISTING ONE 

1090 REM** HHMMSS TO TOTAL SECS **** 

1010 REM ENTER WITH X* = HHMMSS 

1026 REM RETURNS WITH X = TOTAL SECS 

1030 REM 

1040 H*=LEFT*<X*,2> :M*=MID*<X*,3,2> :S*=RIGHT*<CX*,2> 

1 050 H= VflL < H* :> : M= VflL < M* > = S= VflL < S* > 

1 060 X= ( H*3600 > + <. M*S0 > +S 

1070 RETURN 

10S0 REM 

2000 REM** SECONDS TO HHMMSS ******** 

2010 REM ENTER WITH X = # OF SECONDS 

2020 REM RETURNS WITH X* = HHMMSS 

2030 REM ALSO RETURNS D = # OF DflVS 

2040 REM 

2050 D=0 

2060 I FX>84600THENX=X-84600 = D=D+ 1 : GOTQ206O 

2070 H= I NT ■:: X/3600 > ■ M= I NT (. < X- (. H*3600 > > /60 > 

2080 S=X- < H*3600 > - < M*60 > 

2030 H*=RIGHT*<STR*<H+100> , 2> : M*=RIGHT*<STR*<M+100> 

= S*=R I GHT* < STR* < S+ 1 00 > > 2 ) 
2100 X*=R I GHT* < H* , 2 > +R I GHT* < M* , 2 > +R I GHT* < S* , 2 > 
2110 RETURN 
2120 REM 

3000 REM** HHMMSS TO HH=MM:SS ******** 
3010 REM ENTER WITH X* 
3020 REM RETURNS X* 
3030 REM 

3O40 S*=LEFT* C X* , 2 > + " : " +M I D* i. X* , 3 > 2 > + " : " +R I GHT* < X* , J 
3050 X*=S* = RETURN 
3060 REM 

4000 REM** HH^MM^SS TO HHMMSS ******** 
4010 REM ENTER WITH X* 
4020 REM RETURNS X* 
4030 REM 

4040 S*=LEFT*<X*,2>+MID*<X*,4,2>+RIGHT*<X*,2> 
4050 X*=S* = RETURN 
READY. 



:, .i 






100 


REM 


110 


REM 


120 


REM 


130 


PRINT 


140 


PRINT 


150 


PRINT 


160 


PRINT 


170 


PRINT 



LISTING TWO 



TIME TEST PROGRAM 

"mWENTER CURRENT TIME C HHMMSS) 
"mWWWFRESS ANY KEV. . . 
"MM ^CURRENT" STTIhE SINCE" 

"aTI ME OF BAY! SLflST KEVi 
"MMMMSRVG TIME BETWEEN" 



INPUTTI* 

ST I ME" 
O" 



SPRESSi 



Commander February 1983/31 






171 PRINT" ^DEPRESSIONS" 




172 PRINT"MHWWMWFRESS 'S' TO END 




1 88 LK$=T I $ = ET$= " 600906 " : flT$= " 000099 " 




130 GETS*-" IFS*= ,, S"THENEND 




200 IFS$O""THEN360 




219 PRINT M JfflWMHMia*WM 




220 X#=T 1$ : GOSUB3000 




230 PRINT" "K$.: 




240 X$=ET* : GOSIJE3090 




250 PRINT" "X*; 




260 X*=LK* : GOSUB3090 




270 PRINT" "X$ 




27 1 PR I NT " XUUM" ■ X*=fiT* = GOSUE3000 = PR I NT " 


"X* 


280 GOTO 190 




290 REM 




300 X$=T I $ : GOSUB 1 OOO 




310 fll=X 




320 X*=LK*= GOSUB 1800 




330 B1=X 




340 X*=TI* = GOSUB3060 = LK$=TI$ 




350 X=R1-B1 




360 GOSUB2000 




370 ET$=X* 




380 GOSUB 1900 




390 flV=flV+X:PC=PC+l 




409 flT=INT<fl'vVPC> 




READY. 





ssssssssssssssssssssssssss 

ii'-tQiDPU SENSEO 1 

CENTIPOD $27.95 

Like Centiped, only better! 

FROGEE $27.95 
The exciting arcade game of Frogger. 

MOTOR MOUSE $29.95 

What a cheese'ee game! 

CRIBBAGE 

VIC-20 $14.95 C-64 $17.95 

This is the game of Cribbage. 

STAR TREK 

VIC-20 $12.95 C-64 $17.95 

Excellent adventure game! 

MASTER MIND 

VIC-20 $12.95 C-64 $19.95 

Makes you think. 

ROACH MOTEL $9.95 

Kill the bugs! 

YAHTZEE1.1 $12.95 
YAHTZEE2.1 $14.95 

GENERAL LEDGER $19.95 
(VIC-20) 

CHECK MINDER 
VIC-20 $19.95 C-64 $24.95 

HOME INVENTORY $19.95 
(VIC-20) 

TO ORDER: 
P. 0. BOX 18765 
WICHITA. KS 67218 
(316) 684-4660 



ft******** ************* *********** * *** ****** 



Personal checks accepted 
(Allow 3 weeks) or 
CO.D. {Add $2.00) 
Handling charges $2.00 
VIC-20*' is a registered trademark of Commodore 



I 
I 
t 

I 
I 
I 

i 

-k 
i 
t 

<i 
i 
i 
i 
t 
i 
i 

% 

i 
t 
i 
i 
i 



t 
i 
t 
i 
i 
i 
i 

i 
i 



POWERBYTE SOFTWARE™ 

Pr6scnts 

APPLICATION SOFTWARE 
Business and Home 

for the 

• Commodore 64 
•Vic20andTRS80CC 

65 Applications Available including: 

THE EDITOR - Advanced Word Processor $34.95 

with Powerful Editing Features (64 & 8K Vic 20) 

THE ACCOUNTANT - General Ledger, Income $29.95 

Statement & Balance Sheet 

ACCOUNTS RECEIVABLE/PAYABLE - Create $21 .95 

Journal for Current Accounts & Record of Paid Accts. 



BUSINESS INVENTORY 


$19.95 


AT HOME INVENTORY 


$12.95 


ORDER TRACKER 


$19.95 


CHECKBOOK BOOKY 


$12.95 


MY PROFIT MARGIN 


$16.95 


THE STOCK TICKER 


$16.95 


BILLING SOLVER 


$19.95 


TAPE 




CASH FLOW MODEL 


$16.95 


UTILITY BILL SAVER 


$12.95 


THE CLIENT TICKLER 


$19.95 


THE BAR CHART 


$8.95 


INCOME & EXPENSER 


$15.95 


MOTHER'S RECIPES 


$12.95 


BUSINESS 


$16.95 


THE MAILMAN 


$12.95 


APPOINTMENTS 




GRADE MY KIDS 


$15.95 



AND MANY, MANY MOREM 

FOR CASSETTE OR DISC ($10.00 Extra - 64 & Vic 20) 

•FREE CATALOG 

WITH INTRODUCTORY SPECIALS 

POWERBYTE SOFTWARE 

2CHIPLEYRUN 

WEST BERLIN, NJ 08091 

(609) 346-3063 



[A^A*^^iA i t^^A»AA» *i tA*» l» *i i tAA»^ <lt ^ i k< k AAAA A AAAAArf 



3 • 

)> 

J' 

J 

I 

1 

J- 

1 

I- 

l> 

1 

1 

1 

J> 

I 

1 

1 

1 

1 

I 

% 

1 

i 

J> 

J> 

1> 

l> 

J 

i> 

i 

i- 

i> 

i> 

!► 
I- 

>► 

J> 
I" 
I> 

1> 



32/Commander February 1983 




Vanilla Pilot? 

Yes, Vanilla Pilot! 
What is Vanilla Pilot? H^ 



Vanilla Pilot is a full- featured pilot 
language interpreter including TURTLE 
GRAPHICS for the PET or CBM 4000, 
80C0, 9000 and CBM-64 series computers 

At last! A Pilot interpreter for the 
Commodore computers. This Pilot in- 
cludes some powerful extensions to 
the screen editor of the computer. 
Things like FIND /CHANGE, TRACE 
and DUMP enhance the programming 
environment. 



The TURTLE has a very powerful set 
of graphics commands. You can set the 
Turtle's DIRECTION and turn him LEFT 
or RIGHT. The pen he carries can be 
set to any of the 16 colors in the CBM- 
64. He can DRAW or ERASE a Line. 

What else? Vanilla Pilot is all this and 
much, much more. In fact, we can't 
tell you about all of the features of 
the language in this small ad. So 
rush down to your local Commodore 
computer dealer and ask him to show 
you Vanilla Pilot in action. Be sure 
to take the $2.00 discount coupon. 

Hurry, you have only a short time to 
redeem your coupon. So use it now! 

8 

Tamarack Software [^ rj 
Darby, MT. 59829 )m 



u> 




VANILLA PILOT 

Retailer: Send the redeemed coupons to 
Tamarack Software. Darby. MT 59829. We will 
pay S2. plus $.35 handling for the redemption 
of these coupons. If requested . invoices shoe- 
ing sufficient purchase of Vanilla Pilot must be 
submitted. Coupons submitted to us more than 
30 days after the expiration dntc will not be 
honored . 

April 15, 1983. 



Commander February 1983/33 




$4 



A Sprite Editor for the Commodore 64 

by Garry Kiziak 

One of the most exciting features of 
the new COMMODORE 64 computer 
is its ability to display high resolution 
graphics in up to 16 different colours. 
These graphics can be achieved in 
several different ways. In bit-mapped 
mode a resolution of 320 pixels by 200 
pixels can be achieved. RAM based 
character sets can provide high. resolu- 
tion capabilities on the normal text 
screen. Finally sprite graphics provide 
bit-mapped resolution on the normal 
text screen with special features not 
available through RAM character 
sets— notice that I said the normal text 
screen, not just the high resolution 
screen. 

Briefly, sprite graphics can be com- 
pared to the high resolution shapes of 
the APPLE or the player/missile 
graphics of the ATARI. However, the 
implementation of the COMMODORE 
64 is without question superior. Sprites 
can be multi-coloured. They have dif- 
ferent priority levels— enabling one 
sprite to be displayed in front of 
another (without requiring special filter- 
ing techniques). Collision detection 
between different sprites is handled 
automatically. They can be expanded, 
contracted and moved about easily. 
The most important feature is that this 
can all be accomplished easily within 
BASIC. This means that arcade quali- 
ty graphics will become available to 
the BASIC programmer. The potential 
for educational programs is limited on- 
ly by your imagination. 

This summer I had the opportunity 
to work for COMMODORE CANADA, 
under the direction of Frank Winter, on 
a project that involved the use of COM- 
MODORE 64 computers. An offshoot 

34/Commander February 1983 



16 REM 












15 REM SPRITE EDITOR 


BOOT 






26 REM 












25 PRINT " 
30 PR I NT "9 
ING . . . " :g 


IE" :POKE 53280. 
'BlPMdMdMfllPMPle* k M 


14 


:POKE 53281,6 

p»ppi*i*»i_. ord 


OSUfo 100 










46 PRINT " 


ffl_ORO"CHR*< 


34! 


)IIC 


CROLL.OATA"CH 


R*<34>",8, 


1" 










41 PRINT " 


SBtSHMEM" 










42 PRINT " 


Hfl-OflD"CHR*<: 


34: 


1 "C 


PRITE EDIT 


CHR* < 34 > " , 


8" 










50 POKE 19 


8, 10 










55 DATA 19 


,13,13,13,32 


,32,82,85,78,13 


60 FOR 1=1 


TO 10: READ 


4 : POKE 630+I,X:NEX 


T 












76 POKE 44 


,64: POKE 16* 10c 


-•4, 


: POKE 


56,126 


:CLR:NEW 












100 PRINT" 


a m 
a ■ 


a 

a 


■ 


■ a 

a ■ a 


■ a ■ 
■ a ■ 


H H 1 


110 PRINT" 


■ ■ ■ 
120 PRINT" 


a m 


a 








■ 


a w 


— i a ■ 


■ 1~ 
130 PRINT" 








■ — 


— — 




140 PRINT" 


a ■ 


a 




■ a ■ 


a 


150 PRINT" 


a m 


a 


■ 


a ■ a 


m a 


■ ■ ■ 


■ 










160 PRINT" 


a ■" 


a 


■ 


a ■ a 


■ a 


■ ■ l~ 
178 PRINT" 

■ 


n 








180 RETURN 












EADV. 













of this project was the development of 
two programs that should simplify 
even further the use of high resolution 
graphics. The first program, which is 
presented in this article, is a SPRITE 
EDITOR— to simplify the creation of 
sprites. The second program, to be 
presented next month, is a 
CHARACTER EDITOR— to simplify the 
creation of RAM-based character sets. 

Some Details About Sprites 

A sprite is a high resolution shape 
that is 24 pixels wide and 21 pixels tall. 
Figure 1 . shows an example. The pix- 
els that are turned on (indicated in 
black) determine the shape that is 
displayed on the screen. This shape 
can be displayed in 16 different col- 
ours, but usually only one colour at a 
time. (Multi-coloured sprites are possi- 
ble through specially arranged bit pat- 
terns and the use of the colour 
registers— see your manuals for 
details.) 

To display a sprite, the computer 
must know which pixels to turn on and 
which pixels to turn off. This informa- 
tion is stored in 64 consecutive bytes 
of memory called a page or more ac- 
curately a sprite page. (Do not confuse 
this with the usual page concept 
associated with the 6502 or 6510 
which is 256 bytes long.) 

Why 64 bytes? And how is this data 
organized? Well, if you look at a single 
line of a sprite, say line 1 in Figure 1 , 
there are 24 bits of information 
required— one bit for each pixel. This 
information can be stored in 3 bytes 
of memory if we match each pixel with 
a corresponding bit in the byte— 
means the pixel is turned off, 1 means 
the pixel is turned on. 

For example, the first 8 pixels would 
correspond to the bit pattern (i.e. 
binary number) 001 1 0000 which is 48 
decimal. Similarly the next 8 pixels 
would correspond to 000011 10 or 14 
decimal while the last 8 pixels would 
correspond to 00000001 or 1 decimal. 
Thus the pixel information for the first 
line of the sprite in Figure 1 . would be 
contained in the three numbers (bytes) 
48, 14, and 1. Twenty-one such lines 
would require 21 x 3 or 63 bytes of 
storage. To simplify the organizational 



structure of sprite data, the COM- 
MODORE 64 actually uses 64 bytes 
(one byte, the last one, is wasted). 

Hopefully you can see that creating 
the data for a complete sprite manually 
in this way would require a substan- 
tial amount of work. Creating a series 
of sprites this way would be very time 
consuming and error prone. Finally, 
editing a sprite, that dicjn't Quite look 
like you wanted it to, would require a 
very careful examination of the data 
that you had created previously and 
changing appropriate values, again a 
time consuming and error prone 
venture. 

This Sprite Editor will take all the 
hard work out of creating sprites and 
in fact should even make it an en- 
joyable experience. The inclusion of 



sprites within your own programs 
should become a natural and common 
occurence, as it was intended to be. 

The sprite pages, that we mention- 
ed above, must occupy specific por- 
tions of the computer's memory. For 
example, the first page, called page 0, 
occupies the first 64 bytes of memory 
(locations 0-63). Page 1 occupies the 
next 64 bytes (locations 64-127), and 
so on. Two hundred and fifty-six sprite 
pages are possible with page 255 oc- 
cupying locations 16320-16383. 

Notice that up to 16K of memory 
can be devoted to sprite definitions — 
at least in theory. In reality many of 
these pages are used by the operating 
system and are not available for sprite 
usage. The actual breakdown is as 
follows. 




FIGURE 1 



Sprite 
Pages 
- 12 

13 - 15 
16 - 31 

32 - 63 

64 - 127 

128 - 255 



Memory 
Locations 
0- 831 



832 
1024 



1023 
2047 



2048 - 4095 
4096- 8191 
8192 - 16383 



Status Reason 

Not Avail. Zero page, operating 

system pointers, etc. 
Available Cassette Buffer. 

Not Avail. Screen Memory and 

sprite pointers. 
Available See note 3) below. 

Not Avail. I don't know why!! 

Available See note 3) below. 



Commander February 1983/35 



Notes: 

1) Why sprite pages 64-1 27 are not 
available is not clear to me at this time. 
I only know that they don't work. Put- 
ting a sprite definition into this area and 
then trying to display it using the ap- 
propriate pointers does not produce 
the shape that was defined. 

2) Although 256 sprite definitions 
are theoretically possible, only 163 are 
actually usable. Also only 8 sprites can 
be displayed at any given time (at least 
from BASIC). 

3) A BASIC program is normally 
stored starting at locations 2048. Thus 
one might assume that pages 32-63 
(and possibly some of 1 28-255, 
depending on the length of the pro- 
gram) are not available. As we shall 
shortly see, it is easy to move a BASIC 
program upwards in memory to start 
at any loation that we choose. With this 
in mind, we can consider sprite pages 
32-63 and 1 1 8-255 as being available. 
The Sprite Editor itself will be moved 
beyond the 16K mark so that sprites 
can be created and edited on these 
pages. 

Using the Sprite Editor 

For the moment, I will assume that 
the Sprite Editor (Listings 1 , 2, and 3) 
has been typed in, debugged, and is 
up and running. 

You should see a 24 x 21 grid 
situated at the left side of the screen 
with a cursor flashing at the upper left 
(homes position). 

All the commands that allow you to 
create and edit a sprite on this grid are 
invoked by pressing a single key (or 
two keys simultaneously— the CTRL 
key and some other key). 

For example, the 7 key (the period 
key) when pressed will plot a 
large dot at the position of the cursor 
on the edit grid— the cursor will also 
move one position to the right. In ad- 
dition, the actual sprite will begin to 
take form to the right of the grid with 
the corresponding pixel being turned 
on. Press the '.' key again several 
times in succession. A line of dots 
should appear on the edit grid. As 
well, the corresponding pixels of the 
sprite should be turned on at the right. 

The cursor can be moved around 
without turning on or off any pixels, us- 
ing the normal cursor keys (up, down, 
36/Commander February 1983 



93 : 

180 PRINT "33" ;;IF G=8 THEN DIM C0*<15) 

1 1 8 DEF FNX C X > =X- 1 NT C X/24 > #24 

129 DEF FNV<X>=X-INT-::X/2i::-*21 

130 V$~ " HMHMMIM^ 

140 D0T*= M " sBL*= 

1 42 CO* <. > = " BLACK " : CO* < 1 > = " WH I TE " : CO* ■; 2 > 
= " RED " : CO* >: 3 > = " CVflN " : CO* < 4 > = " PURPL " 
144 C0*<5>="GREEN" :C0*<6?="BLUE " :C0*<7> 
= " VELOW " : CO* < 8 > = " ORNGE " : CO* < 9 > = " BROWN" 
1 46 CO* < 1 @ > = " LT RD " : CO* < 1 1 > = " GRAY 1 " : CO* < 
1 2 > = " GRAY2 " : CO* < 1 3 > = " LT ON " 

1 48 CO* U 4 > = " LT BL " : CO* < 1 5 > = " GRAV3 " : MR-P 
EEK< 53276 > 

1 49 M0=PEEK < 53283 > AND 1 5 : M 1 =PEEK < 53286 > AH 
D 1 5 : B-PEEK < 5328 1 > AND 1 5 : E=PEEK < 53280 > AND 1 5 

1 50 G= 1 3*4096 : CR*=CHR* < i 3 > : DE*=CHR* < 20 > : 
OPEEK < G+39 > AND 1 5 : SX=30 : SV= 1 50 : X 1 =0 : V 1 =0 
1 60 PA=200 : SP=0 : SC= 1 024+80+ 3 : AD=32608 
170 GOSUB 960 

180 GOSUB 870 

190 GOSUB 939 

200 GOSUB 850 

210 PX=0:PV=0 

220 P=SC+PV*40+PX : Q=PEEK C P > : R-Q 

230 R= < NOTRAND 1 28 > OR < NOT 1 28 ANDR > 

240 POKE P,R 

250 FOR 1=1 TO 30: GET A*: IF A*="" THEN N 

EXT: GOTO 230 
260 POKE P,Q 

270 IF A*="|J" THEN PX=FNXCPX+ 1 > :GOTO 220 

230 IF fl*="||" THEN PX=FNX<PX-1 > :GOTO 220 

290 IF A*="a" THEN PV=FNV<PV+1 > :GOTO 220 

300 IF A$="D" THEN PV=FNV<PV-1 > :GOTO 220 

310 IF A*=DE* THEN POKE P,PEEK<P> AND 12 
7: GOTO 680 

320 IF A*=" " THEN GOSUB 660 :PX=FHX<PX+1 
> :GOTO 220 

330 IF A*=CR* THEN PX=0 :PV=FHV<PV+1 > :GOT 

220 

340 IF A*=" . " THEN 740 

350 IF A*="3" THEN GOSUB 826: GOTO 210 

360 IF A*="U" THEN GOSUB 830: GOTO 210 

370 IF A*="+" THEN 780 

380 IF A*="-" THEN 8QQ 

390 IF A*="Q" THEN POKE G+21,8:PRINT "3" 

; i END 

400 IF A*=">" THEN C=CC+1 > AND 15 :POKE G+3 

9, C: GOSUB 3020 

418 IF A*="5J" THEN B=<B+1> AND 15 :POKE 532 

81,BiG0SUB 3010 

420 IF A*="3" THEN E=<E+1 > AND 15 :POKE 532 

80, E: GOSUB 3000 

430 IF A*="a" THEN XI =1 -XI : GOSUB 900:GOS 

LIB 870: GOTO 220 

440 IF A*="ffl" THEN V1=1-V1 : GOSUB 900:GOS 

LIB 870: GOTO 220 



left, and right)— notice that when you 
reach the edge of the grid, the cursor 
wraps around to the opposite edge of 
the same horizontal/vertical line. 

The space key can be used to erase 
any plotted dot under the cursor and 
turn the corresponding pixel of the 
sprite off. This is essentially how a 
sprite is created. 

'.' turns a pixel on 

space turns a pixel off 
while the cursor keys move the cursor 
around without affecting any pixels. 
However, a number of other com- 
mands are included to make the en- 
tire editing process somewhat easier. 
These commands are summarized 
below, 

Keystroke(s) Action 

HOME— Moves the cursor to the up- 
per left (home position) of the edit 
grid. Nothing else on the screen is 
affected. 

CLR— Clears the entire edit grid (as 
well as the corresponding sprite). 

DEL— Deletes any point to the left of 
the current cursor position. 

RETURN— Moves the cursor to the 
beginning of the next line. 



456 IF 


fl$="I" 


THEN 


580 


460 IF 


fl*="H" 


THEN 


600 


470 IF 


fl*="||" 


THEN 


620 


480 IF 


fl*="||" 


THEN 


640 


430 IF 


fl*="B" 


THEN 


1510 


500 IF 


fl*="S" 


THEN 


1270 


510 IF 


fi$="ja" 


THEN 


1030 


520 IF 


fl*=»a» 


THEN 


1070 


530 IF 


H*="I" 


THEN 


1430 


540 IF 


fl$="S" 


THEN 


210 


550 IF 


fl$="ffl" 


THEN 


GOSUB I860: GOTO 170 


555 IF 


fi*="£" 


THEN 


698 


556 IF 


fi*="M" 


THEN 


MR=255-MR :POKE 53276, 


MR : GOSUB 3030 






557 IF 


fl*="@" 


THEN 


MO= ■■■: MO+ 1 > AND 1 5 : POKE 5 


3285, MG 


i : GOSUB 


3030 




558 IF 


fi*="l" 


THEN 


M 1 = < M 1 + 1 '•' AND 1 5 : POKE 5 


3286, Ml 


: GOSUB 


3030 




56E1 GOTO 220 






570 POKE G+21. 


,6:G0S 


':UB 330 : GOSUB 870 : GOSU 


B 850: GOTO 210 




574 REf- 


I ***>:**********if:***********i+i* 


575 REM * 




* 


576 REh 


1 * MOVE ENTIRE SPRITE UP, * 


577 REM * DOWN, LEFT, OR RIGHT if: 


578 REP 


1 * 




* 


573 REM *.#####*#######*###*#***##*#* 


580 J=Pfl#64:P0KE 25 


".3 , J-256* I NT < J/256 > : PO 


KE 254, 


•J/256 







STCP 

Standard Terminal Communications Package 

•PFO* IOO OOA CP<01>02 BELL = 12:30:00 10:14:36 

Don't settle for non-standard Communications Protocol! 
Access Micro Net, Source. Bulletin Boards. Local Main- 
frame, etc. 

^_ • Complete Package - Includes RS232 inter- 

^^^^ face Board and software (does not include 

H ^m modem) 

• Communicates in Industry Standard ASCII 
^m • Upload/Download to/from Disk 

• Automatic File Translation 

^^^H • Can be controlled from keyboard or user sup- 
H -a^a? plietf basic or machine language program 

Specify: 3.0 or 4.0 ROMS or 8032 Commodore Computer 
4040 or 8050 or PEDISK II Disk 

Price: $129.95 



ATARI AND PET 
EPROM PROGRAMMER 

Programs 2716 and 2532 . 
EPROMs. Includes hardware 'I 
and software. PET = $75.00- 
ATARI (includes sophisticated 
machine language monitor} = 
$119.95 



Prownter Printer - Excellent dot matrix print Parallel - $48906 
Serial - $600 00. IEEE = $569.00 




VIC RABBIT CARTRIDGE 



"High-Speed 

Cassette 

Load and Save!" 




$39.95 

(includes Cartridge 
and Manual) 



Expansion Connector 



"Don't waste your Life away waiting to LOAD and SAVE 

programs on Cassete Deck." 

Load or Save 8K in approximately 30 seconds! Try 

it — your Un-Rabbitized VIC takes almost 3 minutes. 

It's not only Fast but VERY RELIABLE. 

Almost as fast. as VIC Disk Drive! Don't be foolish - 

Why buy the disk when you can get the VIC Rabbit 

for much, much less! 

Easy to install — it just plugs in. 

Expansion Connector on rear. 

Works with or without Expansion Memory. 

Works with VIC Cassette Deck. 

12 Commands provide other neat features. 

Also Available for 2001 , 4001 , and 8032 



TRAP 65 

TRAP 65 is a hardware device that 

plugs into your 6502's socket. Prevents 

execution of unimplemented opcodes 

and provides capability to extend the 

machines' instruction set. 

For PET/APPLE/SYM. 

Reduced from $149.95 to $69.95 



DC Hayes Smart Modem = $235 00 
DC Hayes Micro Modem ll = $289 00 



Rana Disk Drive - 375 
4 Drive Controller - 114 



It's a 

Professionally 

Designed 

Software 

Development 

System 



More than just an Assembler/Editor! 

MAE 

for 

PET 

APPLE 

«et/p*/c£ 

Blast off with the software used on the space 
shuttle project! 

• Designed to improve Programmer Productivity. 

• Similar syntax and commands - No need to reteam peculiar 
syntaxes and commands when you go from PET to APPLE 
to ATARI. 

• Coresident AssernoterflEditor - No need to load me Editor men the 
Assembler then me Editor, etc. 

• Abo includes Word Processor, Relocating Loader, and much 
more 

• Options: EPROM Programmer, unimplemented opcode circuitry 

• STILL NOT CONVINCED: Send tor free spec sheet! 




5% INCH SOFT 
SECTORED DISKETTES 

Highest quality. We use them on 
our PETs, APPLEs, ATARIs, and other 
computers. $22.50/10 or $44 50/20 

EPROMS 2716 - $650. 2532 « $12.50 

Over 40 Commodore Programs by Bake/ (on 4040) • 




$25.00 



3239LindaDr. 
Winston-Salem, N.C. 27106 
(919)924-2889 (919)748-8446 
Send for free catalog! 




Notice the similarities between the ac- 
tion of these keystrokes and their ac- 
tion when editing a normal BASIC 
program. 

CTRL-P— Prompts you for the page 
number of the sprite that you wish 
to edit— only the pages available 
above are accepted. When the 
editor is first run, page 200 is 
displayed as the default value, but 
you can begin wherever you wish 
by using this command. 

+ —Displays the next sprite for editing. 
In most applications, you will likely 
use more than one sprite. The def- 
initions for these sprites will likely be 
stored one after the other in 
memory. When you finish working 
on one sprite page, use this com- 
mand to display the next page so 
you can begin creating the next 
sprite. 

Displays the previous page for 

editing. 

Note: Moving from one page to 
another does not destroy the contents 
of either page. 

CTRL-R— This reverses the sprite Cur- 
rently being edited; that is, each pix- 
el that is on is turned off and each 
pixel that is off is turned on. 

Fi— Moves the entire grid up one line. 
The data that was originally on the 
first line is now lost and the bottom 
line is blanked. You will likely use 
this command when you find that 
the sprite you are editing is not posi- 
tioned exactly as you would like it. 

F 3 — Moves the entire grid down one 
line. 

F 5 — Moves the entire grid left one 
column. 

F 7 — Moves the entire grid right one 
column. 

(The Pound Key)— This rotates the 
sprite 90 degrees. Notice that the 
rotated sprite will be slightly 
distorted. This is because the 
horizontal and vertical sides of a 
pixel are not the same length. 

The rotate command poses one 
potential difficulty. It arises from the 
fact that we are rotating a shape that 
is not a perfect square (i.e. a 24 x 21 
sprite). To get around this problem, 
when the pound key is first pressed, 

38/Commander February 1983 



59@ SVS AD:GOSUB -350:0010220 

600 J=PA*64+59 : POKE 253 , J-256* I NT < J/256 > 

:POKE 254, J/256 

610 SVS l=)D+42:G0SUB S50:GOTO220 

620 J=PA*64 : POKE 253 , J-256* I HT < J/256 > : PO 

KE 254, J/256 

630 SVS RD+88:G0SUB 850:GOTO220 

640 J=PA*64:P0KE 253, J-256* I NT < J/256 > :PO 

KE 254, J/256 

650 SVS RD+US:GOSUB 350:GOtO220 

655 REM **************************** 

656 REN * * 

657 REM * ERASE OR DELETE A POINT * 

658 REM * * 

659 REM **************************** 
66@ POKE P , 46 : PP=PA*64+P V*3+ 1 HT < PX/8 > 
670 POKE PP,PEEK<PF) FIND 255-2T<7-<PX-IN 
T<PX/8>*8)> : RETURN 

680 PX=FNX < PX- 1 > : P=SC+P V*40+PX : GOSUB 66Q 
:G0T0 220 

685 REM **************************** 
636 REM * * 

687 REM * ROTATE SPRITE 90 DEGREES * 
683 REM * * 

689 REM **************************** 
69Q HI=INT<Pfl/4> :L0=PR*64-256*HI :POKE 25 



1,L0:P0KE 252, HI 



>422 



700 SVS 32443: SVS 32526: POKE 251,L0:P0KE 

252, HI 
710 GET A*: IF fl*0"£" AND fl*OCR* THEN 7 
10 

720 IF A*="£" THEN 700 
730 GOTO 220 
735 REM **************************** 



'36 REM * 



PLOT A POINT 



* 
* 
* 



738 REM * 

739 REM **************************** 

740 POKE P,81 

750 PP=PA*64+P V*3+ 1 NT <. PX/8 > 

760 POKE PP,PEEK<PP> OR 2K7-<PX-IHT<PX/ 

8>*8>> 

770 PX=FNX<PX+1> :G0TO 220 

775 REM **************************** 

776 REM * * 

777 REM * NEXT OR PREVIOUS SPRITE * 

778 REM * * 

779 REM **************************** 

780 IF PA<15 OR <PA>31ANDPA<63> 0R<PA>12 
7RNDPA<255> THEN Pfl-Pfl+1 :G0T0578 

798 GOTO 220 

800 IFCPA>13RHDPA<16> OR <PA>32ANDPA<64^ 

0R<PA>128ANDPA<256.> THEN PA=PA-1 :G0T057G 
810 GOTO 220 

8 1 5 REM **************************** 

816 REM * * 

817 REM * CLEAR SPRITE * 

818 REM * * 

819 REM **************************** 



the sprite is put into a 24 x 24 buffer 
with the bottom 3 lines initially all blank. 
This buffer is then rotated 90 degrees. 
The top 21 lines of this buffer are then 
displayed on the screen, the bottom 
3 lines are not. 

When you press the pound key to 
rotate the sprite, you will notice that the 
flashing cursor disappears. At this 
point, only two keystrokes are 
recognized. The pound key can be 
pressed again (or as often as you like). 
Each keypress wijl rotate the sprite, ac- 
tually the buffer, another 90 degrees. 
So for example, pressing the pound 
key twice in succession will turn the 
sprite upside down. 

The other acceptable keypress is 
the RETURN key. This causes the 
flashing cursor to reappear signifying 
that you are once again in EDIT mode. 
One other important thing happens 
however. Whatever is visible on the 
screen (i.e. the top 21 lines of the buf- 
fer) is stored in the sprite definition and 
whatever was in the last 3 lines of the 
buffer is lost forever. 

This has the following conse- 
quences. Suppose you press the 
pound key to rotate a sprite and follow 
it with the RETURN key. Then you 
decide that you really wanted to turn 
it upside down, so you press the 
pound key once again. Chances are, 
depending on the size of your sprite, 
that you will have lost a portion of it; 
namely, whatever was in the bottom 
3 lines of the buffer. The only way to 
avoid this is to make certain that you 
have rotated the sprite as many times 
as you require before you press the 
RETURN key. 

More Commands 

Keystrokes Action 

CTRL-X— Expands/contracts the size 
of the sprite horizontally. This key 
acts as a toggle; that is, pressing it 
the first time expands (doubles) the 
size of the sprite. Pressing it a se- 
cond time restores it to its normal 
size. 

CTRL-Y— Expands/contracts the size 
of the sprite vertically— again it acts 
like a toggle. 

CTRL-B— Each keypress here will 
change the background to a new 
colour. Actually it steps through the 



328 FOR X=S TO 63: POKE PA*64+X,0 :NEXT :GO 
SUB .350: RETURN 

825 REN **************************** 
326 REN * * 

82? REN * REVERSE SPRITE * 
823 REN * * 

823 REN **************************** 
836 FOR X=S TO 63:V=PEEK<Pfl*64+X>:V=<N0T 
VAND255) OR <N0T255ANDV> .-POKE PA*64+X,V 
840 NEXTrGOSUB 358: RETURN 

845 REN **************************** 

846 REN * * 

847 REN * DISPLAY SPRITE ON SCREEN * 

848 REN * * 

849 REN **************************** 
858 POKE 251,PR*64-INT(Pfi/4::-*256:P0KE 25 
2,Pfl/4 

860 SVS 32526 : PR I NT " aH" : RETURN 

865 REN **************************** 

866 REN * * 

867 REN * INITIALIZE SPRITE DATA * 

868 REN * * 

869 REN **************************** 

870 POKE G+2 1,0s POKE 2040+SP,PR :POKE G+3 
9,C 

880 POKE G+SP*2,SXsP0KE G+SP*2+1 ,3V : POKE 

G+23,V1 sPQKE G+29,X1 
890 POKE G+16,2TSP:P0KE G+2 1 ,2tSP : RETURN 
835 REN **************************** 

896 REN * * 

897 REN * EXPAND/CONTRACT SPRITE * 

898 REN * * 
839 REN **************************** 
980 SX=17:IF X1=0 THEN SX=38 

910 SV=13S:IF VI =9 THEN SV=158 

920 RETURN 

325 REN **************************** 

926 REN * * 

927 REN * DISPLAV EDITING SCREEN * 

928 REM * * 
923 REN **************************** 
330 PRINT ,, S8EIS ,, TAEK29> ,1 | |" :PRIN 
T TflB<29>"| PAGE |" 

940 PRINT TAB(29>"| |" sPRINT "XT 

TAB < 34 > PA 

950 RETURN 

96Q PRINT "S 



978 PRINT " 3 123456789012345678301234 

tm lnd.HI — I I H I 1 1 Mil 
980 FOR X=l TO 21 

930 PRINT " a"RIGHT*<" "*STR*<X> ,2> "l"DO 
T#"fl 1" :NEXT 

1000 PRINT " 3 
it 

1001 PRINT LEFT*<V*,18>TfiB<30> ,, COLQURS" : 
PR I NT TAB < 39 >" " 



Commander February 1983/39 






16 colors— black, white, red, cyan, 
purple, green, blue, yellow, orange, 
brown, light red, gray 1, gray 2, 
light green, light blue, and gray 3 
so that pressing it 16 times in suc- 
cession will restore the background 
to its original colour. The current 
background colour is always 
displayed near the bottom right of 
the screen. 
This command should be useful if you 
have an application program that 
makes use of sprites on a background 
different from that used by the Sprite 
Editor. It allows you to view your sprite 
as it would appear in your program on 
the background of your choice. 
CTRL-E— This has the same effect as 
CTRL-B only applied to the Border 
of Edge around the screen. The 
current border colour is also 
displayed at the right of the screen. 
►—This allows you to change the col- 
our of the sprite being edited— 
again it steps through the 16 col- 
ours and is displayed at the right of 
the screen. 
M— This allows you to change to Multi- 
colour sprite mode. Actually, it acts 
as a toggle, allowing you to change 
back and forth between Multi- 
colour mode and Standard mode. 
You can tell when you are in Multi- 
colour mode because the colours 
in colour registers and 1 are also 
displayed at the bottom right of the 
screen. 
& 1 —These keystrokes allow you to 
change the colours in the colour 
registers, again stepping through 
the sixteen available colours. Press- 
ing changes register 0, while 
pressing 1 changes the colour in 
register 1 . 
CTRL-D— This command allows you to 
display a range of sprites for view- 
ing only. You are prompted for the 
beginning page number of the 
range as well as the ending page 
number. The sprites are then 
displayed 8 at a time until the en- 
tire range is displayed. 
CTRL-C— This command allows you to 
copy a range of sprites from one 
area to another. You are prompted 
for the source pages (starting page 
and ending page) and the target 
pages (start only). 

40/Commander February 1983 



1 ©62 PR I NT TAB < 29 > " BRDR : " : GOSUB 3000 
1004 PRINT TAB C 29 >"BKGD:"s GOSUB 3019 
1 006 PR I NT TAB < 29 > " SPRT : " : GOSUB 3020 : 1 F 
MR==6 THEN RETURN 
1008 GOSUB 3030 
1010 RETURN 

1015 REM **************************** 

1016 REM * * 

1017 REM * PROMPT FOR NEN PAGE * 

1018 REM * * 

1019 REM **************************** 

1020 IF IN*= H " THEN PA=AP:GOTO 180 

1030 LI = 10:COL=31 sLE=3 sMSG*= M SPAGE!" sGOS 

UB 1 700 : AP=PA : PA=VRL < I N* > 

1 040 PR I NTLEFT* < V* , L I > TAB < COL- 1 > '* 
it 

1Q50 IF IN$="" OR PFK13 OR <Pfl>15flNDPfl<3 
2>0R ';Pfi>S3flHDPFK12S:> OR Pfl>255 THEN F'A=AP 
1066 GOTO 180 

1 065 REM **r*r*'***r*****r**********:+:* 

1066 REM * if: 

1067 REM * DISPLAY RANGE OF SPRITES * 

1068 REM * * 

1069 REM if******;********************* 

1070 POKE 0+2 1,0: POKE 6+16,0 -.POKE G+23,0 
:POKE 0+29,0: GOSUB 1250 

1 080 L I =8 : C0L=6 : LE=3 : MSG*= " "FROM PAGE : ■" 

1 090 GOSUB 1 700 : GP=PG : PG-VRL < I H* > : I F I N*= 

"" THEN PRINT "3" : GOTO 170 

1100 IF PG<0 OR PG>255 OR <PG=0 AND IN*< 

>"0"> THEN 1G80 

1110 L I =8 : C0L=22 : MSG*= " WTO PAGE : I" 

1120 GOSUB 1700:PH=VAL<IN*>:IF PH<PG OR 

PH>255 THEN 1110 

1130 SW=PG 

1140 SUM=@:EN=SW+7:IF EN>PH THEN EH=PH : I 

F SW>PH THEN 170 

1150 GOSUB 1250: FOR I=SW TO EN:K»I-SW:M= 

K:IF M>3 tHEN M-M-4 

1 1 60 POKE 2040+K , I : SUM=SUM+21K 

1170 POKE G+K*2,M*48+104:L=98:L1=10:IF K 

>3 THEN L=155:L1=17 

1130 POKE G+K*2+1,L:P0KE G+39+K, 1 :POKE G 

+21, SUM 

1190 PRINT LEFT*<V$,Ll>TRBai*6+9>I 

1200 NEXT 

1210 PRINTLEFT*<V*,20>TflB<?>" 



1220 PRINTTABC7) "PRESS 3SPRCE BARI TO CO 

NT I HUE" 

1230 GET A*: IF A*<>" "THEN 1230 

1240 POKE G+21,0 sPRINT "3" :SW=EN+1 sGOTO 

1140 

1250 PRINT "3 



1260 PRINT " 
S ": RETURN 



A DISPLAY SPRITE 



You could require this command in 
the development stages of an applica- 
tion program. For example, you may 
have created your sprites on certain 
pages located right after your BASIC 
program. However, as your program 
grows beyond your expectations, it 
starts to overwrite your sprites (or vice 
versa). Thus you have to move the 
sprites to a higher location in memory. 

This copy command can move your 
sprites higher in memory, lower in 
memory, or even to overlap the source 
range. 

You might wish to use this com- 
mand when creating sprites to 
simulate motion. One sprite will be ex- 
actly the same as the previous one ex- 
cept for some minor change. Display- 
ing these sprites rapidly in succession 
would give the impression of motion. 
The creation of these sprites can be 
simplified by first creating one of the 
sprites, then copying it to the next 
page, and then making the necessary 
changes to it. 

S— This command allows you to save 
a range of sprite definitions to disk. 
You are prompted for a filename, 
and for the starting page and end- 



1265 REM mmmmmMM*m***m*m*** 

1266 REN * * 

1267 REM * SAVE SPRITES TO DISK * 

1268 REM * * 

1269 REM **************************** 

1270 POKE 6+21., 6: PR I NT "3 _ 



3 SAVE SPRITE DAT 



1286 PRINT " 
A " 

1 230 L I =8 : C0L=6 : LE=3 : MSG*= " 1FROM PAGE : I" 
1300 GOSUB 1708:PG=VRL<IN*>:IF IN*= ,,n TH 
EN PRINT "3": GOTO 170 

1310 IF PG<13 OR CPCO-15 AND PG<32) OR CP 

G>63 AND PG<128> OR PG>255 THEN 1290 

1 320 L I =8 : C0L=22 : MSG*= " WTO PAGE : ■" : GOSUB 

1700:PH=VALaN*> 
1330 IF PH<PG OR <PH>15 AND PH<32> OR CP 
H>63 AND PH<128> OR PH>255 THEN 1320 
1340 BEG=PG*64 :EH=PH*64+63 :H 1=1 NT < BEG/25 
6> :L0=BEG-HI*256 

1 350 L I = 1 : COL= 1 2 : LE= 1 6 : MSG*= " IF I LENAME : 
" : GOSUB 1700:FLt.= "0s ,, + IN*+ ,, ,PRG.WRITE" 
1360 OPEN 1,8, 15," 18" sGOSUEi 1810 
1370 OPEN 2,8,l,FL*sG0SUB 1816 
1 380 PR I NT#2 , CHR* (. LO > ; CHR* < H I > ; 
1390 FOR I=BEG TO EN sX=PEEK< I > :PRINT#2,C 
HR*<X>; sNEXT 
1480 CLOSE 2 
1410 CLOSE 1 
1420 PRINT "3": GOTO 170 



Sx a /COMPUTERS 






BRINGS YOU THESE NEW ITEMS! 



5Va" FLOPPY DISCS, Boxes of 10, Guaranteed 
5 yrs. 12MM Passes. . . SS, SD $20.30/SS,DD 
S23.1Q/DS DP $27.30 

C-10 Blank Cassette Tapes, Case of 50, 
screw-pac Commercial Grade. . . $25.00 

The TAPEWORM™ the Amazing Cassette 
Recorder interface for all COMMODORE™ 
Products. . . $24.95 

COMPUTER FURNITURE, All styles and sizes 
Ask for our catalog 

S w COMPUTERS 



SPEECH SYNTHESIZER • by METAVOX™ for 
Vic-20™ and COMMODORE™ 64. . . $168.00 

BACK ISSUES • COMPUTE! Magazine • 5 Issue 
minimum, $2.50 per issue, specify month 

A/V Interface for COMMODORE™ 64. . . $19.95 

VISA, MASTERCHARGE, No COD's 

Prices exclude delivery COSt (allow 30 days delivery) 

Dealer Inquiries Invited 

1125 N.E. 82nd 

Portland, OR 97220, (503) 257-9464 



ing page to be saved. You mighi 
want to use the display command 
first to verify that you are selecting 
the right pages. The sprite defini- 
tions are saved as a PGM file and 
can later be loaded in by your ap- 
plication program. 
CTRL-L— This loads a previously sav- 
ed range of sprites into memory. 
You are prompted for the filename 
and then the sprites are loaded in- 
to exactly the same location from 
which they were saved. You will 
want to use this to edit sprites that 
you previously created, to move 
them to a different location in 
memory, etc. 
CTRL-V— This command allows you to 
view the sprite, currently being 
edited, moving about on a clear 
screen. This should give you some 
idea as to how it will look in your 
program. 

While the sprite is moving about, 
several keypresses are still recogniz- 
ed. CTRL-B, CTRL-E, CTRL-X, 
CTRL-Y, and ► have the same effect 
as mentioned above. The ' + ' key will 
speed up the motion, the ' - ' key will 
slow it down. Pressing the SPACE key 
will stop the motion and pressing it 
again will restart it. Finally, the 
RETURN key will return you to the 
Editor so you can continue editing 
your sprites. 

The final command that the Sprite 
Editor will accept is the 'Q' 
command— used to quit the Editor. If 
you should press this key accidently, 
you can restart the Editor simply by 
typing RUN. All your sprites will still be 
intact and you can continue editing as 
before. 
Typing in the Sprite Editor 

To get the Sprite Editor up and run- 
ning, you will have to type in three 
separate programs. 
1 . The SPRITE BOOT program (Listing 

1.) 

The Sprite Editor itself must be 
relocated to start at location 16384 (i.e. 
above the last possible sprite page). 
The purpose of the SPRITE BOOT pro- 
gram is to change the pointers 
necessary to effect this relocation. It 
also loads in the actual Sprite Editor 
and a machine language utility used 
by the editor. It uses the 'Dynamic 

42/Commander February 1983 



1425 REN **************************** 

1426 REM * * 

1427 REN * LOAD SPRITES FROM DISK if: 

1428 REM * * 

1429 REM ******************=********** 
1436 POKE G+21,G:PRINT "3 _ 



3 LOAD SPRITE DAT 



1440 PRINT " 

Pi " 

1 458 L I = 1 : COL = 1 2 : LE= 1 6 : MSG*» " IF I LENAME : 

" : GOSUE 1 700 : FL*= " : " + I H* 

1460 IF IN$="" THEN PRINT "J": GOTO 170 

1470 0PEN1,S,15,"I0" 

1 4S0 0PEN2 , 8 , , FL* : GOSUE: 1819: CLOSE 2 : CL 

OSE 1 

1490 LOAD FL$,8,1 

15O0 END 

1504 REM *******=+:*************=+£**=+£=+:** 

1505 REM * * 
1566 REM * COPY SPRITES TO ANOTHER * 

1507 REM * AREA IN MEMORV * 

1508 REM * * 

1 509 REM **************************** 

1510 POKE G+21,0:PRINT "3 



J3 COPY SPRITE DAT 



1526 PRINT " 

A " 

1530 PRINT LEFT*<Vt,4>" 

■■ : PR I ht " ;gg«aiiua<aig;ifljME3:iii 

1540 LI=7:C0L=4:LE=3:MSG$="!FR0M PRGErl" 

1 550 GOSUB 1 700 : PG= VAL < I N$ > : I F I N*= " " TH 

EH PRINT "3": GOTO 178 

1568 IF PG<13 OR <PG>15 AND PG<32> OR <P 

G>63 AND PG<128> OR PG>255 THEN 1540 

1 570 L I =9 : C0L=4 : LE=3 : MSG*« " ■. . TO PAGE : I" 

: GOSUB 1 700 : PH=VRL < I N* > 

1580 IF FH<PG OR <PH>15 AND PH<32> OR <P 

H>63 AND PH<128> OR PH>255 THEN 157© 

1590 PRINT LEFT*0/*,4.>TAB<21>" 

":Print TAB < 21 > " izmfa&tis*m*sTti*m:£w 
1600 LI=7:C0L=24:LE=3:MSG$="IFRGM PAGE:! 
" : GOSUB 1 700 : PD= V AL < I H* > 

1610 IF PD<13 OR <PD>15 AND PD<32> OR <P 
D>63 AND PD<128> OR PD>255 THEN i6Q0 
1620 PE=PD+PH-PG:IF PE>255 THEN PE=255 
1630 PRINTLEFT*<V*,9>TflB<:23:> ,, ..T0 PAGE : " 
PE 

1640 IF PD>PG AND PD<»PH THEN 1670 
1650 FOR I=PD TO PE -.PRINT LEFT*<V*, 12;TA 
B< 1 2 > "COPYING PAGE" I 

1660 FOR ,T=@ TO 63: POKE I*64+.J,PEEK-:: <PG+ 
I-PD>*64+..T>:NEXT:NEXT:PRINT "3" s GOTO 170 
1670 FOR I=PE TO PD STEP -1 :PRINT LEFT*< 
V*, 12>TABC 12> "COPYING PAGE" I 
1680 FOR J=0 TO 63: POKE I #64+ J, PEEK < <PG+ 
I -PD > #64+ J > s NEXT : NEXT : PR I NT " 3" : GOTO 1 7G 
1698 END 



Keyboard' technique (so often used 
with the PET) to load these programs, 
but it does it in a way that the usual 
messages are not displayed on the 
screen. 

2. The SPRITE EDITOR program 
(Listing 2.) 

This is the actual Sprite Editor. The 
listing includes many REM statements 
to set off the various routines and 
make it easier to make any modifica- 
tions or additions to the program. 
These can be omitted if you wish to 
reduce the size of the program (it can 
almost be cut in half). 

3. The M/L DATA program (Listing 3.) 
The Sprite Editor requires several 

machine language routines for rotating 
a sprite, moving a sprite up/down, etc. 
This program contains that M/L pro- 
gram in data statements and when run 
will create a PGM file called 
SCROLL. DATA that the SPRITE 
BOOT program loads in along with the 
Sprite Editor. 

You need only run the M/L DATA 
program once. The SCROLL. DATA 
program will then be on your disk. 
From then on, whenever you want to 
use the Sprite Editor, simply load and 
run the SPRITE BOOT program. It will 
do all the necessary housekeeping 
chores to get the editor up and 
running. 

Saving a Sprite Table Along with 
Your Basic Program 

The Sprite Editor creates a PGM file 
for the sprites that you create using a 
name that you specify. This file, says 
SPRITE TABLE, can be loaded into 
memory by your BASIC program by 
including a statement such as the 
following as the first line of your 
program. 

10 IF FLAG = THEN FLAG = 1 : 

LOAD "SPRITE TABLE", 8,1 
Note: 

1) The ',1' at the end of the load 
command is necessary since it tells the 
computer to load the program without 
relocating it. Leave it out and you will 
overwrite the beginning of your BASIC 
program. 

2. When a program is loaded from 
within another program, that program 
is automatically run (with all variables 
created up to that point preserved). 
When the sprites are loaded in line 10, 



1695 REM ft*************************** 

1696 REM * * 
1637 REM * INPUT ROUTINE * 
1698 REM « * 
1693 REM **=************************** 

1 700 V9=2 : 1 N*= " " : UC=@ : UB*=LEFT* < EL* , LE > : 

ftOSUB 1S0@:UB*=" " :UC=3 

1716 UT=TI 

1720 GET Z3*:IF 29*="" THEN 1780 

1730 IF Z9*=CR* THEN V9==2:G0SUB 1800: PR I 

NT "III " : RETURN 

1740 IF Z9*=GE* JTHEN ON - <. LEN < I N* > =0 > GO 

TO 1 780 s I N*=LEFT* < I N* ', LEN ■: I N* > - 1 > : GOTO 1780 

1750 IF <flSC<Z9*> AND 127X32 OR Z9*=CHR* < 

34 > THEN 1780 

1760 IF UE=LEN<IH*> THEN 1780 

1770 IH*=IN* + Z9* 

1780 GOSUB 1800: IF TI-UT<10 THEN 1720 

1790 V9=3-V9:G0T0 1710 

1 300 PR I NT LEFT* < V* r L I > f R8< COL- 1 ) M I D* < MS 



G* , V3 ) UB* I N*M I D* < " S ■" , V9 « UC ) 



: RETURN 



REM **:+:*if:****************:if:*i***** 
REM * * 

REM * CHECK FOR DISK ERRORS * 
REM * * 

1809 REM *##*#*###*##***!###**##***### 

1 8 1 I NPUT# 1 , fl* , B* , C* , D* 
1820 IF Vfll_<fl*>=0 THEN RETURN 
1830 PRINT-aSSliaiilSK ERROR:" "B* 
1840 CLQSE2 

1850 END 

* * 

* VIEW SPRITE IN MOTION * 

* * 

1 860 POKE G+2 1 , : PR I NT " 3" : POKE G+ 16,0 
1 870 X= I NT t RND C 1 > * 1 00 J + 1 55 ; V= I NT i RND ■; 1 > * 

1 00 > +75 : DX=2 : OV= 1 : X2=0 : V2=0 

1880 POKE G,X:POKE G+l,V:POKE G+2 1,1 

1890 B*=" " :X=X+DX:V=V+DV:GET n*:IF H*<> 

"" THEN 1950 

1900 IF X>255 THEN X=255:0X=-DX 

IF V>200 THEN V=200:DV=-DV 

IF X<65 THEN X=65:DX=-DX 

IF V<75 THEN V=75:DV=-DV 



1 805 
1806 
1807 
1808 



1855 REM 

1856 REM 

1857 REM 

1358 REM 

1853 REM 



1910 
1 920 
1930 



1940 GOTO 1880 

1950 IF fi*=" + " THEN DX»DX+SGN<DX> :DV=DV+ 

SON < DV :> : DX=DX- < DX=0 > : DV=DV- < D V=0 > 

I960 IF fl*="-" THEN DX=DX-SGN<DX> :DV=DV- 

SGN < DV > : DX=DX+ -.■: DX=0 > : DV=DV+ ■; DV=0 > 

1970 IF fi*="+" OR R*="-" THEN 1890 

1980 IF fl*="s3" THEN B=<B+1 > RND 15 :POKE 53 

281,B 

1990 IF R*="a|" THEN E=<E+i >flND15 :POKE 53 
280, E 

2000 IF R*=">" THEN C=<C+1 > RND 15 :POKE G+ 

39, C 



Commander February 1983/43 



it will automatically run the BASIC pro- 
gram in memory (Note: not the Sprite 
PGM but the BASIC program in 
memory). In this case it is still your 
original BASIC program since the 
sprites were presumably loaded after 
the end of your program. Thus the first 
line to be executed will be line 10 
again. This time however, since FLAG 
now has the value 1 , the load com- 
mand will not be executed and the 
program will carry on. 

Replace line 10 with 
10 LOAD "SPRITE TABLE", 8,1 

and see what happens. 

One more thing has to be taken care 
of before your program will run suc- 
cessfully. Since your sprites are load- 
ed after your BASIC program and the 
start of variables pointer points to the 
end of your program, as variables are 
created within your program, they may 
eventually overwrite your sprites. This 
can be avoided by changing the start 
of variables pointer to point to a spot 
just after your last sprite. 

As an example suppose the last 
sprite in your table is on page 150. It 
will be stored in memory beginning at 
location 150 x 64 = 9600 and exten- 
ding to location 9663. You must 
change the start of variables pointer to 
point to any location after 9663. The 
following line in your program will ac- 
complish this. 

20 X = 151*64 : HI = INT(X/256) : 

LO = X-256*HI : POKE 45,LO : 

POKE 46.HI : CLR 

The CLR in line 20 will destroy all 
variables, so this line should be ex- 
ecuted before any variables required 
by your program are created— 
preferably immediately after line 10. 

One minor annoyance with this 
setup arises if the program is stopped 
and run again. Each time this hap- 
pens, the sprites will be reloaded into 
memory even though they are already 
there. This can be avoided by saving 
the sprite tables along with the BASIC 
program. To accomplish this, delete 
lines 10 and 20 from your BASIC pro- 
gram and save the result under some 
name, say 'ORIGINAL PGM' Then 
essentially what you do is execute lines 
10 and 20 in direct mode and resave 

44/Commander February 1983 



2610 IF fl*="ffl" THEN X2= 1 -X2 : POKE G+29,X2 
2020 IF R*="fl" THEN V2=l-V2 :POKE G+23,V2 
2030 IF fl*=CR* THEN POKE G+21 .,0 s RETURN 
2046 IF RS-OB* THEN 1890 
2050 GET B*:R$=B*:IF B*O n " THEN 1980 
2069 GOTO 1830 

2095 REN .*********-**if:**if:**if:*****i+i*if:** 

2096 REM * * 

2097 REN * DISPLflV COLOUR REGISTERS * 

2098 REN * * 

2099 REN MMMmM+*mmmMm*M*M 
3000 PRINT LEFT$<:V$,20;'TfleO34:>eO*'::E> :RET 
URN 

30 1 PR I NT LEFT* < V* , 2 1 > TAB < 34 > CO* < B > : RET 

URN 

3020 PR I NT LEFT* <■. V* , 22 > TAB < 34 .:■ CO* < C > : RET 

URN 

3030 fl 1 *= " RG-0 : " +CG* <. NO > : R2*= " RG- 1 : " +CG* 

< N 1 ::■ : I FNR=0THEH fl 1 *= " " : R2*=fl 1 * 

3O40 PRINT LEFT*'::V*,23>TflB'::23>Rl*:PRINT 

TRB < 29 > R2* " 3" : RETURN 

1616 0PEN1 ,8,15,"I0" 

1617 0PEN2,8,1 , "SCROLL. DAT A" 

1618 PRINT#2,CHR$(166)CHR$(126) ; :G0SUB6 
000 

1619 FOR 1=32422 TO 32761 

1620 READ J:PRINT#2,CHR$(J); 

1621 GOSUB 6000 

1622 NEXT 

1623 CL0SE2 

1624 CL0SE1 

1625 END 

6000 INPUT#1 , A$ , B$ , C$ , D$ 

6010 IF VAL(A$)=0 THEN RETURN 

6020 PRINT" {CLEAR} {DOWN} {DOWN} { REV } DISK 

ERROR "A$ 
6030 PRINT" { DOWN} "B$ 
6040 CL0SE2 
6050 END 

9000 DATA169, 0, 160, 71, 153, 0, 126, 
136, 192, 62, 208, 248, 177, 251, 153, 


9010 DATA126, 136, 16, 248, 96, 160, 71 
, 185, 0, 126, 141, 13, 127, 136, 185, 


9020 DATA126, 141, 12, 127, 136, 185, 
, 126, 141 , 11 , 127, 162, 2", 46, 13, 12 
7 

9030 DATA46, 12, 127, 46, 11, 127, 62, 
72, 126, 202, 62, 72, 126, 202, 62, 72 
9040 DATA126, 232, 232, 232, 232, 232, 
224, 74, 144, 227, 136, 192, 255, 208, 
200 

9050 DATA162, 71, 189, 72, 126, 157, 0, 
126, 202, 16, 247, 160, 62, 185, 0, 12 

6 



the program. Here are the actual 
steps. 

1. In direct mode, type LOAD 
"SPRITE TABLE",8,1 

—this loads you ( r sprites. 

2. Type NEW to fix up the pointers. 

3. Type LOAD "ORIGINAL PGM",8 
—now your BASIC program and your 
sprites are in memory. The pointers, 
however, are not properly set. 

4. In direct mode, type 

X= 151*64 : HI = INT(X/256) : 
LO = X-256*HI : POKE 45,LO : 
POKE 46.HI :CLR 

Now resave this program under a 
different name and your sprite table 
will be saved along with this program. 
All pointers will be properly set too. 

Relocating a Basic Program 

The above procedure works fine as 
long as your BASIC program is 
relatively small (actually BASIC PRO- 
GRAM + SPRITE TABLE must be less 
than 14K). If your program is larger 
than 14K and requires the use of 
sprites, another technique is required. 
This involves storing your sprite tables 
where BASIC normally begins and 
moving your BASIC program up in 
memory. 

Here's how it is done. 

1 . First find a location that is above 
the last sprite in your table (as in line 
20 above). Let's suppose that this 
value is stored in X. 

2. Change the beginning of BASIC 
pointer to point to X by typing in the 
following in direct mode. 

HI = INT(X/256) : LO = X-256*HI : 
POKE 43.LO : POKE 44, HI : CLR 

3. The tocation immediately before 
the start of the BASIC must be a zero. 
Therefore type in 

POKEX-1,0 

4. Now load in your BASIC program 
as you normally would. It will be stored 
in memory beginning at location X. 

All of the above seems a bit com- 
plicated, especially if somebody else 
is going to be using your program. 
Thjs can be avoided by having a little 
BOOT program do all of this for you. 
Then a user would simply have to load 
and run the BOOT program. The 
SPRITE BOOT program is an example 
of this technique. 

ENJOY!!! 



9060 DATA145, 251, 136, 16, 248, 96, 23 


4, 234, 234 






10010 


DATA 


169, 


21, 


141 , 2, 0, 169, 83, 


141, 


253, 


0, 169, 4, 141 , 254, 


10020 


DATA 


162, 


0, 1 


60, 0, 161 , 251 , 10 


, 72, 


169, 


46, 


144, 


2, 169, 81 , 145 


10030 


DATA 


253, 


200 


, 104, 192, 24, 240, 


16, < 


92, ' 


6, 240, 4, 192, 8, 208, 232 


10040 


DATA 


230, 


251 


, 208, 2, 230, 252, 


208, I 

4 

10050 


222, c 


230, 


251, 


208, 2, 230, 252, 2 


^ATA 


173, 


253 


, 0, 105, 40, 141 , 2 


53, 


, 1< 7 5 


, 254 


-, o, 


105, 0, 141 , 254, 


10060 


DATA 


206, 


2, 0, 208, 192, 96 


10080 


DATA 


169, 


20, 


133, 251, 162, 3, 1 


34, 2[ 

6 

10085 


52, 160, I 


», 177, 253, 136, 136, 13 


DATA 


145, 


253 


230 


10090 


DATA 


253, 


208, 


2, 230, 254, 198, 


252, 208, ; 
o 


?37, 


198, 


251 , 208, 231 , 169, 


10100 


DATA 


145, 


253, 


200, 145, 253, 200 


, 145 
3 
10110 


, 253 


, 96, 


169, 


20, 133, 251 , 162, 


DATA 


134, 


252, 


160, 0, 177, 253, 


200, 200, 200, 


145, 


253, 165, 253, 208 


10115 


DATA 


2, 198, 254, 198 


10120 


DATA 


253, 


198, 


252, 208, 235, 198 


, 251 


, 208 


, 229 


, 16S 


), 0, 160, 1 , 145, 2 


53 










10130 


r>ATA 


200, 


145, 


253, 200, 145, 253 


, 96, 


162, 


21, 


160, 


2, 24, 177, 253, 42 


10140 


DATA 


145, 


253, 


136, 16, 248, 24-, 


169, 3, 101 


, 253, 133, 253, 169, 0, 101 


10150 


DATA 


254, 


133, 


254, 202, 208, 229 


, 96, 


169, 


21, 


133, 


251 , 160, 0, 162, 3 


10160 


DATA 


24, 


177, 


253, 106, 145, 253, 


200, 


202, 


208, 


247, 


24, 152, 101 , 253 


10170 


DATA 


133, 


253, 


169, 0, 101 , 254, 


133, 254, 206, 


251, 


0, 208, 225, 96 


READY 


• 









Subscribe Now! 

Call 
1-800-426-1830 



Commander February 1983/45 



||li3 V| C"20 SOFTWARE 

Will mPHHBV e 

100% MACHINE 100% FAST 



j that 



WAHP runner b a mUD-caor ln-res arcade game thai 
runs on the unexpanQgrj VIC-20. JOYSTICK REQUIRED 



A report by MIS Software Test Pilot Tony Scioppazi, the Bronx, 
New York. 

Look, bud, if you want to be a Warp Runner, you've got to 
be good, right? You've got to be celm and steady, but you've 
got to be quick. You know whet I mean? You've got to be eble 
to jockey those sub-light cuuisers just like e Bronx cabbie during 
rush hour, in and out. Do you catch my drift? Don't even THINK 
ebout running into enything. Put even e scratch on one of those 
bebies end its a strike on you. Three strikes, end you're 
yesterdey's news — strictly out. Are you with me? Just make 
sure you don't zig when you should have zagged. 

Aim those laser blasts carefully. A missed shot could be bed 
for business. Get right up on those pigeons; shorter shots ere 
faster shots. Don't worry about blasting everything in sight; just 
get through. You reed me? Good luck! 



WARP RUNNER is available on cassette with complete 
documentation, enclosed in an attractive vinyl binder for 
$16.95 each. 

MIS produces the finest educational, recreational, and 
functional software available for the Commodore VlC-20 
Personal Computer, Ask for MIS software at your local 
computer store or order direct from MIS. VISA, MASTER- 
CARD, phone orders, and CO. D. accepted. California res- 
idents add sales tax. 




250 FERN ROCK WAY • BOULDER CREEK, CA • 408-338-9546 



COMING SOON! "THE FINAL CONFLICT" 

A HI-RES, MACHINE LANGUAGE ARCADE GAME FOR THE VIC-64 



Introducing The \ k / /_ *r **« 

FIMMCIALW^W 

/rnu * 



Diskette Programs for 16K PET/CBM 




Financial Programs 



The Wizard helps you quickly calculate 12 major types 
of Financial Transactions with ease and accuracy. 

Created for businesses and individuals, this DISK 
PACKAG€ has 9 programs plus instructions. The Wizard 
delivers answers on the screen or printer. 



V 



CASCADE COMPUTERWARE 

Box 2364 • Everett, WA 98203 



(206) 355-6121 

Dealer inquiries invited 




UMI Software is Making 
"Home" Work Fun 



V\fofdaaft 20 Werm B 



BUTI 



UMI gives you sophisticated word 
processing software complete in 
one package! Wordcraft 20©, with 
a tutorial tape, contains 8K RAM, a 
unique automatic mail list feature, 
and everything else you'll need to 
create picture-perfect documents. 
This fully featured system lets you 
change a character, a word, an entire 
block of text; and sends encoded 
electronic mail. With 4-direction 
scrolling, you see it before you print; 
and it's compatible with any printer. 
With Wordcraft 20©, you'll never be 
at a loss for words again. 



A sophisticated communications pro- 
gram that finks you and your VIC™ to 
the world of information, VITERM B is 
compatible with virtually any modem. 
Your access to information banks and 
services over the telephone system is 
astonishing. At your fingertips, you'll 
have UP! news and features, informa- 
tion encyclopedias, discount buying 
services, the stock market and educa- 
tional programs. And, VITERM B 
accesses CompuServe, THE SOURCE, 
and other similar computer services. 
You'lf be able to send and receive 
personal electronic mail, set up per- 
sonal finance programs, make travel 
reservations — all at electronic speed. 
The world is yours at the touch of a 
key with UMI's VITERM B. 



Improve your BASIC program with 
UMI's BUT! treatment. Adding 17 new 
commands to the BASIC language in 
your computer, BUTI formats the VIC™ 
to imitate 8K, 3K, or minimum mem- 
ory configurations. BASIC program 
errors will stop program execution, 
list and mark the line of BASIC where 
the error occurred. Other features are 
singfe-step execution, renumbering, 
block search & replace, block line 
delete, tape append, and BASIC 
variable dump. 

Simple . . . quick . . . and on command. 
That's the BUTI treatment for your VIC™ 




VICEPS — Connects Epson MX100 or MX80 to your VIC20™ • Prints 
high-resofution graphics and character sets using Epson 
Graftrax • Does formatted BASfC program listings 



VI-CALC — 10 memory registers and 4 stacked data • Registers al- 
ways visible • Math function results visible at a single keystroke 



VI-DATA — Powerful data base program on cassette or disk • User- 
defined screen format • Print screen format • Format print 
output • Alphanumeric sort 



VI-CHECK — Manages checkbook • Lists accounts • Makes de- 
posits • Keeps balance current • Lists transactions • Catches 
duplicate entries • Features calculator mode 



FORTH 20 

Structure of PASCAL or COMAL: 

• Speed of machine code — 10 times faster than BASIC • Inter- 
active; both a compiler and an interpreter • Transportable — 
based on FORTH 79-Standard • A language you tailor toyour 
application by adding new commands • Comes complete 
with an extensive instuction manual and examples. 



oi umi 



United Microware Industries, fnc. 
3503-C Temple Avenue 
Pomona, CA 91768 (714) 594-1351 

VIC & VJC20 are trademarks of Commodore. Inc. Wordcraft 20 is 
copyrighted by P.L Dowson. CompuServe is a registered 
trademark of H.R Block, THE SOURCE is a registered trademark 
of Source Telt'compunng Corporation. 



Peek & Poke #8 



by George R. Gaukel 



In my last article we discussed 
memory mapping in the VIC. Now we 
will take a look at how the VIC uses the 
data at the various locations. First I will 
define the terms we will be using and 
some addresses. 

VIDEO MEMORY-The mapped 
area of 1000 bytes contains character 
pointers or color data. On power-up 
this area is located at 1024-2023 
$400-$7E7. 

COLOR MEMORY— The mapped 
area of 1 000 bytes containing COLOR 
NIBBLES with a byte to byte congrui- 
ty to the video memory. This area is 
always located at 56295-57294 
$D800-$DB7E. 

VIDEO BASE— The mapped area of 
2048 or 8000 bytes containing the bit 
pattern for character or graphic 
display. On power-up the character 
ROM is used as the display base. The 
ROM contains two bases, the graphics 
character set or the upper/lower case 
set. 

BACKGROUND COLOR REGIS- 
TERS— There are four background 
registers which can contain a color 
value from 0-15. On power-up BGC0 
contains the current background 
color. 

BGC0— 53281 $D021 

BGC1— 53282 $D022 

BGC2-53283 $D023 

BGC3— 53284 SD024 

MCM— The multicolor mode control 
BIT4 at 53270 $D016. The value is 
zero on power-up. 

ECM— The extended color mode 
control BIT6 at 53256 SD011. The 
value is zero on power-up. 

BMM— The bit map mode control 
BITS at 53265 $D011. The value is 
zero on power-up. 

There are three character modes 
and two bit mapped modes. 
STANDARD CHARACTER MODE 

48/Commander February 1983 



■ MCM = ECM = BMM = 
EXTENDED COLOR CHARACTER 
MODE 

ECM = 1 MCM = BMM = 
MULTICOLOR CHARACTER MODE 

MCM = 1 ECM = BMMM0 
STANDARD BIT MAP MODE 

BMM = 1 MCM = ECM = 
MULTICOLOR BIT MAP MODE 

BMM = MCM = 1 ECM = 

Type in, save and then run the 
CHARS program (it self-destructs). 
CHARS generates a machine langu- 
age program at 49152 $C000 which 
copies the character ROM to 1 6384 
$4000, sets the video page to 31744 
$7000 and resets the top of memory 
pointers. We can now alter the 
character set to any degree desired 
and save custom sets to tape or disk 
using peeks or a monitor. 

We will look at the standard 
character mode first, as this is default 
on power-up. The video base contains 
8 bytes * 256 starting at $6384. The 
alternate character set starts at 1 8432 
$4800. The first character is '@' which 
is what we get if we poke a zero to 
video memory. The second character 
is 'A' and so on. The eight bytes for 
each character are mapped in to an 
8x8 matrix: 

16384./**.. 60$3C 

16385/*..**. 120 $66 

16386.**.***. 110 $6E 

16387.**/**. 110 $6E 

16388.** 96 $60 

16389/*..*.. 98 $62 

16390..****.. 60$3C 

16391 00 $00 

Note that the low bit is to the right 
and that there is no rotation as the ar- 
ray is displayed. The low bit and bot- 
tom row are clear to provide separa- 
tion. The letter 'A' would be the next 
eight bytes starting at 16392. We can 
now redefine keys for special 



characters such as math characters, 
rotate characters, or create special 
graphic characters. 

The extended color character mode 
allows us to select up to four different 
background colors for each individual 
character, with each character being 
available in any of the 16 colors. The 
trade-off is that only the first 64 8x8 
characters in the video base can be 
used. This is because the high two bits 
in the video memory are used as col- 
or pointers. The character color is still 
determined by color memory as in the 
standard mode. 

BIT7 BIT6 
BGC0 + CHAR- 

ACTER VALUE 0-63 

1 BGC1 64 + CHAR- 

ACTER VALUE 0-63 

1 BGC1 128 + CHAR- 

ACTER VALUE 0-63 
1 1 BGC2 192 + CHAR- 

ACTER VALUE 0-63 
To set the ECM bit enter 
X = PEEK(53265)OR64: 
POKE53265.X. We can now use the 
ECM mode by poking color values to 
the background registers. If we poke 
a zero to the video memory, we should 
get '@' BGCO. Poke 193 would get 
an 'A' with BGC3. This is a nice mode 
for making widows for text applica- 
tions. To clear the ECM bit enter 
X = PEEK(53265)AND191 : 
POKE53265.X. 

The last character mode is the 
multicolor character mode. To set the 
MCM bit enter X = PEEK(53270) 
OR1 6:POKE53280,X. In this mode we 
can mix 8x8 characters with 4x8 
graphics. If the high bit of the color 
memory is clear (B-IT3) the eight bytes 
are displayed as a 8x8 character. As 
the high bit is used as a toggle, only 
the low eight colors are available for 
individual characters. If the high bit in 






the color nibble is set the eight bytes 
are displayed in a 4x8 graphics mode. 
We still use the full eight bytes of the 
base but the bits are now used as a 
paired color pointers to color registers. 
Each bit pair will display the indicated 
color as two dots. 

BIT PAIR COLOR 

BGCO 

1 BGC1 

1 BGC2 

1 1 COLOR NIBBLE 

This mode allows user graphic 
character of up to four colors. The 
background colors will be common to 
all characters and one of eight colors 
available for a any individual character 
using the color nibble. To clear the 
ECM bit enter X = PEEK(53270)AND 
239:POKE53270,X. 

Think of the above character modes 
as 256 tiny sprites that can be put 
anywhere on the screen any number 
of times. Their location in the video 
base has no bearing on where they 
are displayed on the screen. The bit 
mapped modes however have a one 
to one bit congruity with each dot on 
the screen and require 8000 bytes of 
video base (320*200/8). In the stan- 
dard bit mapped mode the color is 
determined by the video memory 
pointer. The color nibbles are not us- 
ed. The first video pointer controls the 
color of the first 8x8 mapped array. If 



a bit is set the color will be that of the 
hi nibble of the video pointer. A clear 
bit will use the low nibble of the video 
pointer for its color value. Any of the 
16 colors can be used in either nibble. 
So, within an 8 byte block we can have 
two colors. There will be 1000 8 byte 
blocks with their color controlled by the 
1000 video memory bytes. 

The last mode is the multi-colored bit 
mapped mode. The horizontal resolu- 
tion is half that of the standard mode 
because we again go to paired color 
pointers. The 8 byte block now maps 
to 4x8 with each byte containing 4 col- 
or pointers. 

BIT PAIR 
0-BGC0 

1 HIGH NIBBLE OF 

VIDEO POINTER 

1 LOW NIBBLE OF VIDEO 

POINTER 
1 1 COLOR NIBBLE VALUE 

With the reduced resolution we can 
now have a standard background col- 
or or any of three other colors. The 
background color will be common to 
the total display. The other colors can 
be changed as we move from one 
eight byte block to another. This mode 
will allow adequate resolution for most 
applications. 

The mapping of the bit mode blocks 
is the same as for the character blocks. 
If we wanted to put text on a mapped 



C H 


ARS 












1 00 


FOR (■ 


,=49i 


52TD49234: 


READ 


D:PDKI 


~, A, D: NEXT 


1 1 


DATA 


216, 


169, 


208, 


133,, 


"■> i=;; ■-> 
j:.. \J ,c. if 


169 


:l. 20 


DATA 


64, 


133, 


254 „ 


1.69, 


0, 


160 


1 30 


DATA 






133, 


r "\ ir.r ■■:«- 


120, 


1 69 


140 


DATA 


V.J 1 „ 


1 3 3 t 


1, 


177., 


251, 


72 


1 50 


DATA 


169, 


rer c.r 


133, 


1, 


88, 


104 


1 60 


DATA 


145, 


253, 


1 4 1 „ 


TO 


4„ 


200' 


170 


DATA 


208,, 


234, 


230, 


r"\ l£* f\ 

j:,. %.J .!-.; if 


230, 


254 


180 


DATA 


165, 


252, 


201, 


224, 


208, 


224 


1 90 


DATA 


169, 


255, 


1 4 1 ,, 


1 3 1 „ 




1 33 


200 


DATA 


SS ? 


169, 


63, 


141, 


i TO 




2 1 


DATA 




56 , 


173, 


0, 


.i~.il,. J. * 


41 


220 


DATA 


,l-< \,J x~ , 


9, 


2, 


141, 


0, 


221 


230 


DATA 


169, 


240, 


1 4 1 , 


24, 


208, 


1 69 


240 


DATA 


124, 


141, 


1 36 , 


.ill. h 


96 




250 


SYS49152 


: NEW 











screen we could copy the character as 
it appears in the character ROM, and 
it would appear normal in the standard 
bit mode. We would have to copy 
eight bytes for each character used or 
we could set up software character 
generators. 

I expect to see cartridges or soft- 
ware very soon, that will make the 
graphic capabilities available to BASIC 
programs using standard commands 
such as DRAW, PAINT, PLOT and 
such. Until then, we can still get some 
very useful results for applications and 
games. 

In the CHARS program I copied the 
character ROM into the middle of 
BASIC RAM so we could get a good 
look at it. We could now copy it to the 
RAM under the KERNAL ROM at 
SEOOO and put the video page in the 
$C000 area. This would leave the 
BASIC work space free. The VIC 
always looks at the RAM in this area 
and not at the ROM. This area could 
also be used for bit mapped displays. 



■■■■■tOZDPU SENSEi :■• 

"CARD/?" 
(CARD/PRINT) 

UNIVERSAL CENTRONICS 
PARALLEL PRINTER 
INTERFACE FOR THE VIC-20® 
Now you can use your VIC-20 (o with 
\ an EPSON MX-80 printer, or an OKI- 
DATA printer, or a TANDY printer, or | 
just about anybody's printer. And you 
j don't have to give up the use of your 
user port (MODEM), or change to 
1 special printer commands, or load any , 
| special software driver programs to do j 
it. 

• Outputs standard ASCII codes to j 
the printer. 

• Plugs in the VIC-20® printer serial 
i/o port. 

• Understands all standard VIC-20® i 
print commands. 

• No modification to your VIC-20®. 

• No special programs required. 

• Includes all necessary cables to 
hook up a standard printer using 
Centronics parallel input. 

• MADE IN THE U.S.A. 

The XARD/?" is a product of CARDCO. Inc. 

$79.95 

TO ORDER. 
P O BOX 18765 
WICHITA, KS 67218 
(316) 684-4660 



Personal checks accepted 
{Allow 3 weeks) or 
COD. (Add S2.00) 
Handling charges S2.00 



IBS! 



:-20* is a registered trademark of Commodore 



Commander February 1983/49 



Bytes, Bits and Binary 



by Tim Parker 
Canada 



Most computer users are ac- 
quainted with the "high level" 
languages such as BASIC, FORTRAN, 
or PASCAL, and consider these to be 
powerful. AH have one common 
feature that most people do not realize: 
they are all converted by the computer 
to the same fundamental units: binary 
digits. 

Binary programming is a feat that re- 
quires an extraordinary amount of pa- 
tience, and a not inconsiderable 
amount of fortitude. However, the 
binary language is the one that is 
ultimately used by every computer, 
every computer language, and every 
operating system in the world. It is 
perhaps a symptom of our computer 
society that a large percentage of the 
population can consider themselves to 
be "computer literate," and yet be 
totally lost when confronted with the 
strings of zeros and ones of binary. 

This article is not intended to make 
binary programmers of you: such a 
creature would be very unusual. Its 
purpose is to give a brief insight into 
binary, and the way a computer can 
use the binary strings for the manipula- 
tion of data. 

On the road to the "low level" 
languages such as binary, machine 
language programming comes into 
play. Machine language is in fact a 
glorified binary programming. By 
assigning a mnemonic code to certain 
functions that the machine can unders- 
tand directly, a fast, reliable program 
can be constructed. 

Two other forms of simple codes are 
used by computers: octal and hex- 
adecimal. As the name suggests, oc- 
tal is based on eights, and hex- 
adecimal on sixteens. The root of this 
is not difficult to determine. 

Most computers in use in the home 
are eight bit machines: they use 

50/Commander February 1983 



"blocks" of eight binary digits to con- 
trol the functions of the computer. 
Thus, having a counting system bas- 
ed on eights seems logical. (Our ten- 
based system arose because of the 
multitude of ten-based objects around 
us— our fingers are the prime ex- 
ample.) 

Counting in octal is not difficult, but 
will not be delved into here, as it is 
rarely found on home machines. Far 
more common is hexadecimal. Hex- 
adecimal numbers are based on a 
combination of two eight binary 
blocks. (An eight binary block is call- 
ed a byte, while each binary digit is a 
bit: There are eight bits to a byte.) 

The usual counting system is used 
up to hexadecimal 9 (hex numbers are 
symbolized by the letter H after them, 
such as 5H). After nine, the problem 
arises in finding a one digit symbol for 
what we normally think of as a two digit 
number. The answer is to use the first 
six letters of the alphabet. Thus, in 
binary, the following letters are used 
for hexadecimal ten though fifteen: 

10 = A 

11 =B 

12 = C 

13 = D 

14 = E 

15 = F 

When counting in hexadecimal, 
each digit in a number represents a 
power of 1 6. Just as 1 57 in ten-based 
systems means 1 hundred unit (ten to 
the second power) plus 5 ten units (ten 
to the first power) and 7 one units (ten 
to the zero power), in hexadecimal, 
3C2 represents 3 sixteen to the se- 
cond power units plus 1 2 sixteen to the 
first power units plus 2 sixteen to the 
zero power units. 

All this takes a little getting used to. 
Seeing the number 5H obviously 
represents 5 in the decimal system. 



FH, from the rules above, represents 
15 decimal, but the sight of 1B15H 
can be a little awe inspiring at first 
sight. But working it out as done above 
shows it to be 457 decimal. [1 x 256 
+ 11 x 16 + 5 x 1]. 

What use is hexadecimal? When 
programming machine language, 
many of the lines are displayed as hex- 
adecimal codes representing different 
functions. Also, memory locations are 
indexed by hexadecimal. So while a 
BASIC programmer may not care 
what the hex code for a screen 
memory location is, the chances are 
the machine language programmer 
will have very little choice but to know 
it. 

Binary programming, on the other 
hand, doesn't have to be known by 
anyone: it serves no major program- 
ing function. It is important in that it is 
how the machine does everything. 

Each bit in the computer can be 
either on or off (empty or full). It is con- 
venient to think of an off bit as possess- 
ing the value O, while an on bit has the 
value one. 

A byte (eight bits together) can then 
have any combination of the bits on or 
off, for a total of 255 different arrays. 
To count in binary, the bits are turned 
on or off from the right to left: 

DECIMAL HEXADECIMAL BINARY 



1 1 1 

2 2 10 

3 3 11 

4 4 100 

5 5 101 

6 6 110 

7 7 111 

8 8 1000 

9 9 1001 

10 A 1010 

11 B 1011 

12 C 1100 



13 


D 


1101 


14 


E 


1110 


15 


F 


1111 


16 


10 


10000 


17 


11 


10001 


18 


12 


10010 



and so on. The space filling method 
is easily determined by examination of 
the series above. Extension to any 
number up to 255 is simply a matter 
of filling in the ones where needed. 
(255 is FFH.) 

Addition of two binary numbers can 
then be seen as simply a matter of 
positioning the bits so they correspond 
with each other, and adding together. 
Where a two would appear, a zero is 
placed, and one carried. As long as 
the total doesn't exceed 255, there is 
qo problem with this method. 

The problem arises when subtrac- 
tion is considered. Subtraction is to 
take the negative of one number and 
add it to the other. This could be done 
by using one of the bits as a symbol 
of whether the number is positive or 
negative, but that leaves only seven 
bits left for number crunching. That 
limits the maximum number to 127! 
Obviously a better scheme must be 
found. 

The better scheme is called two's 
complement. The reason will be ob- 
vious in a moment. If all bits were 
reversed in a byte (i.e. 00010010 
would become 11101101) then sub- 
traction would work the same way as 
addition seen above. A one is added 
to the result to convert the zeroes to 
ones, and vice versa. This reversal of 
bits is called one's complement. A pro- 
blem arises with one's complement 
when one number and its complement 
are added. For example, 16 + (116) 
should total zero. If the bits are added 
together, though, an extra one ap- 
pears at the left of the byte: 



00010000 
+ 11101111 



16 
-16 



11111111 

For one's complement, now, a one 

is added to the result: 
11111111 

+ 00000001 



If the extra digit is ignored, the result 
(00000000) is exactly what we want, 
but the extra digit cannot be just 
discarded and ignored. The extra digit 
has no place in memory, and so the 
one's complement method will not suf- 
fice. Two's complement grew out of 
this failure. Simple stated, two's com- 
plement is formed by adding one to 
the one's complement! 

Consider a calculation similar to the 
one above, where the two's comple- 
ment of twenty-five will be found: 

1 1 1 00 1 1 one's complement of 25 
+ 00000001 



11100111 two's complement of 25 

A few examples of arithmetic here 
will help illustrate the use of two's com- 
plement. Addition is the same as ever: 

00000011 3 

+ 00000101 +5 



00001000 



8 



while subtraction requires use of two's 
complement: 

00000011 3 

+ 11111011 -5 

two's complement of five 



11111110 



The result is obtained by taking the 
two's complement of the number (i.e. 
adding one to the one's complement): 

00000001 one's complement of 

11111110 

+ 00000001 adding 1 



1000000000 



00000010 =2 in decimal 

As the true result was' 11111110, 
this represents a negative number, so 
the answer is -2! 

This obviously is a very elaborate 
way to calculate answers to questions! 
However, it does work, and is the on- 
ly way a machine with only two states 
(on/off) can do it. A few more elaborate 
proposals have been made, but two's 
complement remains in use. Although 
it takes a lot of getting used to, it does 
on study appear to be an elegant 
method of taking the problem. 

Luckily, programmers don't need to 
know binary. But it's nice to have an 
inkling what goes on deep in those 
chips. 



"■••■tUiXJPU SENSEi:/ 

CARDBOARD 3 

An Economy Expansion Interface 

(Motherboard) 

For the VIC-20® Personal 

Computer 

The 'CARDBOARD/3" is an expansion inter- 
face designed to allow ihe user to access more 
than one of the plug-in-type memory or utility 
cartridges now available. It will accept up to 3 
RAM or ROM cartridges at once For example: 

• 16k RAM + 16k RAM + 3k RAM 

• 16k RAM + 8k RAM + Super Expander 

• 16k RAM * 8k RAM + Vic-Mon 

• 16k RAM + 3k RAM + Programmer's Aid 

• High quality T.R.W. gold plated connectors 

• This board is fused 

• 90 day free replacement warranty covering I 
everything except the fuse 

$39.95 

CARDBOARD 6 

An Expansion Interface for VIC-20® 

• Allows memory expansion up to 40K 

• Accepts up to six games 

• Includes a system reset button 

• All slots are switch selectable 

• Daisy chain several units for even more 
versatility 

$87.95 

TO ORDER: 
P. O. BOX 18765 
WICHITA. KS 67218 
(316) 684-4660 



Personal checks accepted 
(Allow 3 weeks) or 
COD. (Add $2) 
Handling charge $2.00 



(ggj 



'IC-20 ; "' is a registered trademark of Commodore 




DON'T 
BLAME 
THE 
SOFTWARE 

Power Line Spikes and Hash often cause 
memory loss or erratic operation. Often 
floppies, printer & processor interact! 

OUR patented ISOLATORS eliminate 
equipment interaction AND curb damag- 
ing Power Line Spikes, Surges and Hash. 

Filtered 3-prong sockets and integral 

Spike Suppression. 125 VAC, 15 Amp, 

1875 W Total - 1 KW per socket. 

ISO-1 ISOLATOR. 3 Filtered Sockets; 
1000 Amp 8/20 usee Spike Sup- 
pressor $76.95 

ISO-4 ISOLATOR. 6 Filtered Sockets; 
1000 Amp 8/20 usee Spike Sup- 
pressor $128.95 

ISO-3 SUPER-ISOLATOR. 3 DUAL fil- 
tered Sockets; 2000 Amp 8/20 usee 
Spike Suppressor $115.95 

ISO-7 SUPER-ISOLATOR. 5 DUAL fil- 
tered Sockets; 2000 Amp 8/20 usee 
Spike Suppresor $186.95 

Master-Charge, Visa, American Express 

TOLL FREE ORDER DESK 1800-225-4876 

(except AK, HI, MA, PR & Canada) 



Electronic Specialists, Inc. 

171 South Mam Street. Natick. MA 01760 
Technical & Non-800: 1-617-655-1532 



Commander February 1983/51 



WHY DIDN'T I THINK OF THAT? 



by Howard Rotenberg 
Toronto, Canada 



Have you ever been using a routine 
for a long time assuming that it was 
common knowledge? I have met a lot 
of people using useful routines that I 
wished that I had in my little bag of 
tricks. The funny thing about them is 
that they are usually so simple the 
question arises, Why didn't | think of 
that? These were the exact words that 
a friend of mine used the other day 
that inspired me to pass on these few 
routines. NOTE: Usually he is the one 
to figure them out first. 

The routine that he spoke about is 
the one I will present first. This small 
routine may be used in a program to 
see if the printer is turned on before 
trying to print text. (See program 1) 

I have used the word "home" to 
represent the home key on the key- 
board. As you see, the routine is sim- 
ple and may be easily put into any pro- 
gram. The crucial lines are 15 and 20. 
After the printer is opened, we do a 
simple pnnt#4. Line 20 checks the 
status at this point and it should be 
zero if the printer is on. If it is not, it 
looks back and tries again. The pro- 
gram loops until the printer is finally 
turned on in which case you are gra- 
ciously thanked. You may, of course 
put in any type of error detection you 
wish (ie: flashing messages), however, 
I chose to keep it simple for the exam- 
ple. One strange occurance was that 
we tried the routine with the IEEE cable 
disconnected expecting to see a 
DEVICE NOT PRESENT error, how- 
ever, we did not. This one I will let you 
figure out. 

A short but useful routine to read se- 
quential files follows. I have used a 
small machine language routine to 
read the file and will explain exactly 
what it does and its BASIC equivalent. 

10 FOR J = TO 22 
52/Commander February 1983 



20 READ A 

30 POKE 634 + J, A 

40 NEXT J 

50 INPUT "FILENAME";F$ 

60 DOPEN#1,(F$) 

70 SYS 634 

80 DCLOSE 

90 GOTO 50 

95 DATA 162, 1,32, 198, 255,32, 

228, 255, 32 
97 DATA 210, 255, 166, 150, 208, 

2, 240, 244 
99 DATA 162, 1, 32, 166, 242, 96 

Line 70 jumps to the machine lan- 
guage routine loaded by the first four 
lines. The BASIC equivalent to this line 
is: 

70 GET#1,A$: PRINT A$;: IF 
ST XX 64 GOTO 70 

The main reason for using the ma- 
chine language is of course the speed 
at which it will read and display the in- 
formation. You may easily substitute 
the BASIC line 70 to see the different 
yourself. Since the routine is just load- 
ed as data statements that don't mean 
too much to a lot of users, program 2 
will show exactly what the routine is. 

The two JSR instructions ($FFC6 
and $F2A6) are ROM dependent for 
BASIC 4. The other routines are Ker- 
nal routines that may be used on all 
Commodore computers. To find the 
proper routines for the VIC 20 or the 
Commodore 64, you may just look in 
any memory map. I have the maps but. 
without the computers to test it on I 
would rather not print the addresses 
in case of error. 

Another routine I have found many 
opportunities to use is one that takes 
Tl$ and converts it into a regular every- 
day 1 2 hour clock. It even displays AM 
or PM. It's not that I am opposed to 
the 24 hour military clock but unless 
you are in the service or a hospital 



(hospitals like to use the 24 hour 
clock), the more familiar 12 hour clock 
seems more friendly. (See program 3) 

I have included a return statement 
in line 70 since this routine lends itself 
to be called as a subroutine. I have 
found that displaying the time in the 
more common way adds (ess confu- 
sion to an end user of one of my pro- 
grams. 

! imagine I could go on for a long 
time sharing these small routines as I 
am sure we all could. Rather than 
doing that I would like to end oft with 
just a few very small but extremely 
useful ones that I find very handy. 

The version of MICROSOFT BASIC 
that comes on the Commodore com- 
puters lacks an extremely useful logi- 
cal operation. They have included the 
AND, OR and NOT function (even 
though the NOT function is NOT what 
you would expect it to be), however, 
unless you get into machine code you 
do not have an exclusive or function. 
The truth table for this function is as 
follows: 

0:0 = 

0:1 = 1 

1:0 = 1 

1:1 = 

To EOR or as some languages pre- 
sent it (XOR) the variable A with B the 
following may be done: ((A) AND (NOT 
(B))) OR ((B) AND (NOT(A))) 

Next we will round oft the number 
(N) to (D) decimal places: 

10 INPUT D 

20 INPUT N 

30 N = INT(N M0! D + .5)/10!D 

40 PRINT N 

I have used an exclamation mark in- 
stead of the exponent or up arrow sign 
in line ten, since my method of writing 
this text does not include that char- 
acter. If you use the routine, please 



Program 1 

5 REM *** TEST AND WAIT FOR PRINTER *** 

10 OPEN 4,4 

15 PRINT#4 

20 IF ST XX THEN PRINT "/HOME/TURN ON PRINTER' 

30 PRINT "THANKYOU" 

40 REM *** THE REST OF THE PROGRAM *** 



GO TO 15 



Program 2 



GETCH 



CLOSE 



* = $027A 
LDX #$01 
JSR $FFC6 
JSR $FFE4 
JSR $FFD2 
LDX $96 
BNE CLOSE 
BEQ GETCH 
LDX#$01 
JSRSF2A6 
RTS 
.END 



START OF ML (634 DECIMAL) 

GET THE FILE NUMBER 

SET THE INPUT DEVICE 

GET A CHARACTER 

WRITE ONE CHARACTER 

GET THE STATUS VALUE (ST) 

IF NOT ZERO THEN GOTO END OF ROUTINE 

GO BACK FOR ANOTHER CHARACTER 

GET THE FILE NUMBER AGAIN 

CLEAR THE CHANNEL 

BACK TO BASIC 



Program 3 

10 INPUT "TIME";TI$ 

20 01$ = "" 

30 IF VAL (LEFT$(TI$,2))) = 12 AND VAL (MID$(TI$,5,2))) = 1 GOTO 80 

40 LK$ = "AM.": IF VAL (LEFT$(TI$,-2)) (= 9 THEN Ol $ = 

MID$ (Tl$,2,1): GOTO 60 
50 OI$ = MID$ (Tl$,1,2) 
60 OI$ = OI$+ MID$ (Tl$,3,2) + LK$ 
70 PRINT "THE TIME IS" OI$: RETURN 
80 IF VAL (LEFT$(TI$,2)) = 12 THEN OI$ = LEFT$ (Tl$,2): LK$ = 

"PM.": GOTO 60 
90 OI$ = STR$ (VAL(LEFT$(TI$,2))-12): LK$ = "PM.": GOTO 60 



Program 4 

10 L = 0: FOR J = 1T04: L°/o = ASC (L$): L% = L% - 48 + (L%)64) * 7 
20 L$ = MID(L$,2): L = 16*L + L%: NEXT: PRINT L 

Program 5 

10 L = L/4096: FOR J = 1T04: L°/o = L: L$ = CHR$(48 + L% - (L%)9) * 7 
20 PRINT L$;:L = 16*(L-L%): NEXT 

Program 6 

10 FOR J = 634 TO 656 

20 READ H$: M$ = LEFT$(H$,1): L$ = RIGHT$(H$,1) 

30 POKE J, (ASC(M$)-48 + ((M$)"9")*7))*16 + ASC(L$)-48 + ((L$)"9")*7)) 

40 NEXT J 

50 DATA A2, 01, 20, C6, FF, 20, E4, FF, 20, D2, FF 

60 DATA A6, 96, DO, 02, FO, F4, A2, 01, 20, A6, F2, 60 



CARDBOARD 6 
$87.95 

An expansion interface for the VIC-20. 
Allows expansion to 40 K or accepts up 
to six games. May be daisy chained for 
more versatility. 

CARDBOARD 3 
$39.95 

Economy expansion interface for 
the VIC-20 

CARD "?" CARD/PRINT 
$79.95 

Universal Centronics Parallel Printer 
Interface for the VIC-20 or CBM-64. 
Use an Epson MX-80 or OKIDATA or 
TANDY or just about any other. 

CARDETTE 
$39.95 

Use any standard cassette player/re- 
corder with your VIC-20 or CBM-64 

CARDRITER 
$39.95 

A light pen with six good programs to 
use with your VIC-20 or CBM-64 

Prices subject to change. 
TO ORDER: P.O. BOX 18765 

WICHITA, KS 67218 
(316) 684-4660 
Personal Checks Accepted (Allow 3 Weeks) 
or COD. (Add $2) Handling Charges $2.00 



PUT SOME MUSCLE 
IN YOUR 

VIC 20 

16K RAM 
EXPANSION 

$66.90 

8K RAM 
EXPANSION 

$47.70 

•DIRECT FROM 
MANUFACTURER 

•HIGHEST QUALITY 

•LOW PRICE 

•90 DAY WARRANTY 

»■ CENTURY ° 
■micro 

7881 La Riviera Dr. Suite 131 
Sacramento. CA 95826 

Add $2 for shipping & handling 

(California Residents add 6% sales tax) 

DEALER INQUIRES WELCOME 



Commander February 1983/53 



use the proper key as I can guarantee 
you that the exclamation mark will not 
work. 

In an earlier example I used a basic 
loader to poke a small machine sub- 
routine into memory. These numbers, 
however, had to be converted to deci- 
mal first so here are two one liners to 
do conversions for us. First we submit 
the routine where our hex number is 
in the variable L$, and is returned in 
L as a decimal number. (See program 
4) 

Now we submit the variable L to this 
decimal to hex routine. (See program 
5) 

The two conversion routines may be 
put into one line, however, I decided 
for the sake of clarity to display them 
as two. 

Lastly, if you do not want to convert 
a hex number to decimal but prefer to 
list it in data statements as hex and still 
poke it into memory, then the final 
routine is for you. (See program 6) 



The data statements contained the 
same sequential file reading routine 
that I used earlier. 



Conclusion: 

We over the years seem to acquire 
a number of subroutines that we like 
to use in our programs. Some of 
course are much more difficult than 
others, however, even if we don't fully 
understand them, with the proper in- 
structions, we may all benefit from 
them. There is a limit on the number 
of ways that one can implement the 
same function using any one given 
premise. I am sure that there are a lot 
of routines out there being used every 
day that do the same as the few I have 
shown. I hope mine will be of use to 
some of the readers and if so, please 
let us in on your tricks that you assume 
that everyone else already knows. If 
you do, I am sure that just like that 
friend and myself, a lot more people 
out there will benefit greatly while say- 
ing: "Why didn't I think of that?" 



Debugging & Fixes 
of Programs 



Commander has dedicated this col- 
umn exclusively to the Debugging and 
Fixes of Programs. We want to keep 
our readers informed of any changes 
or mistakes in programs we publish. 
This column is designed for that pur- 
pose only. If you as a reader find any 
bugs, please let us know. —Editor 



FIXES 

Volume 1, Issue 2 

Page 16, first paragraph: 50 octal 
converts to 40 decimal. 

Page 20, bottom, line 0020: WHILE 
I X s 10 

Page 21 , top, line 0050: UNTIL I X 
10 

Page 21 , third paragraph: A8 (6.2) 
would be IS 



flTfa^ 




Quit Playing Games . . . 

Disk Based Software to Make Your 
Computer Get Down to Business 

Disk Data Manager— Create and manage your own data 

base. Allows you to create, add, change, delete, search, 

sort, print, etc. Up to 1200 records on a single disk. 

VIC 20. . . 59.95 CBM 64 . . .79.95 



Payroll System— Full featured 
tern. Even prints checks. 

VIC 20. . . 89.95 CBM 64 



complete payroll sys- 
99.95 



Mailing List— Up to 1200 records on a single disk. 
Presorts by Zip Code. Prints on stock up to four 
labels wide. 

VIC 20 . . . 44.95 CBM 64 . . . 54.95 

Inventory Package — Maintains quantity on nand, cost, 
sales price, reorder point, etc. Generates suggested 
reorder, sales report, and sales analysis. 

VIC 20. . . 79.95 CBM 64 . . . 99.95 

General Ledger— up to 75 accounts! Generates Balance 
Sheet, Income Statement, Update Report, etc. 
VIC 20. . . 89.95 CBM 64 . . . 99.95 

Checkbook Manager— up to 2 5 expense categories. 

Tracks all outstanding checks until they are paid. 

VIC 20. . . 49.95 CBM 64 . . .49.95 

CONTACT US FOR ALL YOUR 
DISK BASED SOFTWARE NEEDS 

Call for specifics on Hardware Configurations. 

Send Self-Addressed Stamped Envelope for 

Catalogue of Games and other Applications 

DEALER INQUIRIES WELCOME 



M 



2905 Ports O'Call Court 
Piano, Texas 75075 

(214) 867-1333 

VISA and MASTERCARD Accepted 



^MostwCoPdj 



VIC-20 -. CBM 64 

EXPANDER BDHRD5 



4 Slot for the 64. Toggle switches and 
reset switch. 



P/N C64 



$ 69.95 




6 Slot for the VIC. Toggle switches 
and reset switch. 

P/N V36 




4 Slot for the VIC. Toggle switches and 
reset switch. 



P/N V24 



^.SS 



PTI offers the finest selection 
of expander boards available 
for the VIC-20 and CBM 64. 
The design features, quality 
construction, and competitive 
prices make any of them an 
exceptional value. New pro- 
ducts are being added monthly, 
so write for complete catalog. 




Slot for the VIC. No switches, reset, or 
fuse. 

$ 49.95 



$ 79.95 P/N V13 




PRECISION TECHNOLOGY, INC. 

COMPUTER PRODUCTS DIVISION 
P.O BOX 15454 
i SALT LAKE CITY, UTAH 84115 

(801) 487-6266 



3 Slot for the Vic. Slide switches, no 
reset switch. 

P/N V23 $ 59.95 

See your dealer, or place 
your order direct 

VISA-M/C-CHECK-COD 



54/Commander February 1983 





DATA MANAGER & WORD PROCESSOR 

For COMMODORE 4032/8032 Computer with 4040/8050 Disk Drive 



DATA MANAGER 

• Number of records is only 
limited by disk capacity. 

• Unlimited fields per record. 

• Up to 75 characters per field. 

User formatted. 
Screen editing. 
Sort/Search feature. 
Pattern matching search. 
Selective field printing. 
Form letter address insertion. 



WORD PROCESSOR 

Screen Editing. 
Automatic line set. 
Add, move or delete text. 
Global edit. 

Page numbering/titling. 
Form letter address insert. 
File append for printing. 
Selective underlining. 
Line justification. 



Special Introductory Offer. 

Both DATA MANAGER and WORD PROCESSOR for only $89.00 
(or either one @ $55.00 each.) 
When ordering: Specify Computer model number and Disk model number. 
For Instruction Manual only: send $3.50 (Refunded with first order.) 



INPUT SYSTEMS. INC. 25101 S.W. 194 Ave. Homestead, FL 33031 (305) 245-3141 
DEALER INQUIRIES INVITED. 



TAYLORMADE SOFTWARE • TAYLORMADE 



Expanded offering of Educational Software 
for the COMMODORE 64 

♦ Touch Typing Tutor (TTT64) diskette $24.95 

cassette $19.95 
Ideal for typing students or computer users. Learn to type with all 
fingers on your computer's keyboard by following the keyboard and 
finger placement pictured on your TV screen. 19 lessons fully de- 
scribed in 12-page manual. Select PRACTICE and type computer 
generated pseudo words for your rate and list of errors. Select TEXT 
and practice English words for timed test of any duration. 

for the VIC-20 

♦ Touch Typing Tutor 3.0 (TTT5K) cassette $19 95 

Has same features as TTT64 above. Will run on basic VIC. Four 
separate programs. Enhanced version now provides practice typing 
English words. Includes 12-page manual. Selected by Denver Public 
Schools to train 700 elementary students in keyboard skills. 

♦ Fun Fractions (FF + 8K) diskette $24.95 

cassette $19.95 
The tun way to learn addition, subtraction, multiplication, and divi- 
sion of fractions tor grades 4-9 with sound, color, and graphics. 
Watch VIC show you all the intermediate steps on the screen black- 
board. Then take a turn and see if you can answer before the 
parachute jumper crashes. Three levels of difficulty. Help is given 
for incorrect answers: learn your score. Requires 8K (or more) 
memory expansion Includes 16-page manual. 

Foreign orders payable U.S. dollars plus $3.00 shipping/handling 

TAYLORMADE SOFTWARE 



P.O. Box 5574 

Lincoln, NE 68505 

(402) 464-9051 



wsr 



Commodore 64 and VIC-20 are trademarks of Commodore Business Machines Inc 



TAYLORMADE SOFTWARE • TAYLORMADE 2 



COMMODORE 6A- 

ACCOUNTING SOFTWARE 

General Ledger $129.95 

Detail G/L Income Stmt. • Bal. Sheet Journals • Budget 
Voriance Stmt. • Trial Bal. Cash Flow Analysis • 300 
Chort of Accounts • 700 J /E . 

Payroll System $ 129.95 

Emp. Time Card Lists • Work. Comp. Rept. Ck. Register 

• W-2 Forms • Payroll Cks. • 94 1 Reports Employee Wage 
Analysis • Pre-Pymt. Register Emp. Info. Labels • 300 
Emp. YTD • Hourly Employees (50). 

Accounts Payable $ 129.95 

Purchases Journal • Vendor Report • Pre-Payment Reg. 

• Open Invoices (300) • Cash Register Projection 

Accounts Receivable $ 129.95 

Cus. Sales History • Cust. List (300) • Sales Journals* 
Inv. Income Pro|. • Cust. Stmts. • Labels • Open Inv. (300) 

Client Accounting . $ 229.95 

Everything a bookkeeping service needs to keep books for 
a typical small business client. Includes all features on 
G/L, plus the ability to produce disbursements registers, 
941-B Forms and W-2 Forms. 

Each of the modules includes all logic to allow it To post to 
the G/L. All interface logic for these systems is included in 
this software. This is a simple disk system. It will operate 
on o Commodore 64. using a 154] disk drive. 

ORDER FROM 

TEXAS TECHNICAL SERVICES, INC. 
3115 W. Loop, S., Suite 26 • Houston, Tex. 77027 

Dealer Inquiries Welcome 

VISA & Master Card Accepted 



Commander February 1983/55 



Join the 




Micro-Ed 




educational 
software 

Send for free catalogs 

Specify: Pet • VIC 

• Commodore 64 

telephone 

us at 

612-926-2292 

Micro-Ed Inc. 
P.O. Box 24156 

Minneapolis, MN 55424 



User Clubs 



New Hampshire 

TBH VIC-NIC CLUB 

P.O. Box 981 

Salem, NH 03079 

Contact— J. Newman 

Publication— VIC-NIC NEWS 

Interests— VIC-20 Exclusively 

Kentucky 

The Commodore Connection 

1010 South Elm 

Henderson, Kentucky 42420 

Contact— Jim Kemp (502) 827-8153 

Interests— VIC, CMB 64, PET 

Ohio 

SW OHIO VIC USERS CLUB 

659 Carthage Ave. 

Cincinnati, Ohio 45215 

Contact— Tom E. Harris 761-7510 

Indiana 

The VIC Indy Club 

P.O. Box 11543 

Indianapolis, IN 46201 

Contact— Linda Kropzer 

(317) 878-3342 

So. Dakota 

VIC/64 USERS CLUB 
203 East Sioux Ave. 
Pierre, So. Dakota 57501 
Contact— Larry J. Lundeen 
(605) 224-4863 

Illinois 

The Fox Valley PET User's Club 
833 Willow St. 
Lake in the Hills, IL 60102 
Contact— Art Dekneef (312) 658-7321 

Washington 

A.T.S. VIC-20 Computer Club 

7906 34th Ave. S.W. 

Seattle, WA 98126 

Contact— Ken Gazaway (206) 935-2697 

Publication— For VIC-20 only 

Central Washington Commodore 

User's CLub 
1222 So. 1st St. 
Yakima, WA 98902 
Contact— Bob Wood or Tim McElroy 



56/Commander February 1983 



Commander Dealers 



Given here, in zip code order, is a 
partial list of the Charter Dealers who 
will be carrying the COMMANDER. 
We will provide updates for this list in 
following issues as a service to provide 
our readers with a local source at 
which they will find information, hard- 
ware, or software for their Commodore 
Computers. 

U.S.A. 

Puerto Rico 

The Micro Computer Store 

1408 Ave. Jesus T. Pinero 

Rio Piedras, P.R. 00921 

(809) 781-0350 

Manager-Owner: Julio C. Martinez 

Computech Ltd. 
214 Derby Street 
Salem, MA 01970 
(617) 741-1724 
Manager-Owner: Tim Bush 

Omicron Corporation 
1416 Providence Highway 
Norwood, MA 02062 
(617) 769-6867 
Manager-Owner: Steve Gavrilles 

Rhode Island 

International Computer Services 
165 Oyerville Ave. 
Johnston, Rl 02919 
(401) 273-1001 
Manager-Owner: Steve Lablanc 

New Hampshire 

Compu-Craft, Inc. 
17 Dunbar St. 
Keene, NH 03431 
(603) 357-3901 
Manager-Owner: Richard Bishop 

Echo Consulting Services 
P.O. Box 1199 
Conway, NH 03818 
(603) 447-5455 
Manager-Owner: George Epotien 



Maine 

Maine Micro Systems, Inc. 
55 Center St. 
Auburn, ME 04210 
(207) 786-0696 
Manager: Nancy Lecompte 

Vermont 

Computeam 

205 Dorset St. 

S. Burlington, VT 05401 

(802) 862-2802 

Manager-Owner: Mark Robinson 

Connecticut 

Multi-Business Computers Inc. 
28 Malborough Street 
Portland, CT 06480 
(203) 342-2747 
Manager-Owner: Bob Stasko 

New Jersey 

Micro Computer Services 
61 Mountain Blvd. 
Warren, NJ 07060 
(201) 561-3111 
Manager-Owner: Jerry Prevete 

Computer Workshop 
1200 Haddenfield Rd. 
Cherry Hill, NJ 07013 
(609) 665-4404 
Manager-Owner: Charles Kolbe 

Computerability, Inc. 

441 Route 23 

Pomton Plains, NJ 07444 

(201) 835-0688 

Manager-Owner: Dennis Mull 

Wayne Computer Store 
1459 Route 23 
Wayne, NJ 07470 
(201) 628-7318 
Manager-Owner: Rick Delti 

Software City 

147 N. Kinderkamack Rd. 

Montvale, NJ 07645 

(201) 391-0931 

Manager-Owner: CM. Hatfield 



Computer Workshop 
1200 Haddenfield Rd. 
Cherr Hill, NJ 08034 
(609) 665-4404 
Manager-Owner: Chris Kolbe 

Electronic Service Assoc, Inc. 
Route 541 N. 
Medferd, NJ 08055 
(609) 953-1200 
Manager-Owner: John Handfield 

Software-n-Such 
Warren Plaza, Route 130 
E. Windsor, NJ 08520 
(609) 443-8984 
Manager-Owner: Paul Hammer 

BB/The Computer Store 
216 Scotch Rd. 
Trenton, NJ 08628 
(609)883-2050 
Manager-Owner: Barry Brown 

New York 

CompTek 

90 John Street 

New York, NY 10038 

(212) 962-6131 

Manager-Owner: Frances Banks 

Computer Emporium 
37 North Street 
Middletown, NY 10940 
Manager-Owner: Kate Honders 

B.C. Communications, Inc. 
World Wide Electronics Dist. 
207 Depot Rd. 
Huntington St., NY 11746 
(516) 549-8833 

Computer Headquarters 
1245 Middle Country Road 
Selden, NY 11784 
(516) 698-9373 

Manager-Owner: James & Kathy Lyon 
Commander February 1983/57 



Dealers continued 



Upstate Computer Shop 
1823 Western Ave. 
Albany, NY 12203 
(518) 456-3019 
Manager-Owner: William J. Smith 

Future Distribution 
Trimex Bldg. — Route 11 
Mooers, NY 12958 
(514) 861-2831 
Manager-Owner: Phillippe Faure 

Durmac Cash Registers 

1628 Erie Blvd. E. 

Syracuse, NY 13210 

(315) 472-4531 

Manager-Owner: William McCarthy 

Personal Computers, Inc. 
3251 Bailey Ave. 
Buffalo, NY 14215 

(716) 832-8800 
Manager-Owner: Frank C. Smeirciak 

Pennsylvania 

One Stop Computer Shope 
65 N. 5th St. 
Lemoyne, PA 17043 

(717) 761-6754 
Manager-Owner: Joanne Wright 

Micro Age Computer Store 
1352 Tilghman St. 
Allentown, PA 18102 
(215) 434-4301 
Manager-Owner: Ed Eichenwald 

Maryland 

Professional Micro Service 
100 W. 22nd St. 
Balto, MD 21218 
(301) 366-0010 
Manager-Owner: James A. Breen 

Tri-State Computers 
1504 S. Salisbury Blvd. 
Salisbury, MD 21801 
(301) 742-2020 
Manager-Owner: Tom Weiland 

Virginia 

Virginai Micro Systems 
13646 Jeff Davis Highway 
Woodbridge, VA 22191 
(703) 491-6502 
Manager-Owner: Suart Mitchell 

CALPRO— The World of Computers 
3119 Waterlick Road 
Lynchburg, VA 24502 

58/Commander February 1983 



(804) 237-3825 

Manager-Owner: Walter Leroy Ashley 

West Virginia 

Computer Associates, Inc. 
113 Hale St. 
Charleston, WV 25301 
(304) 344-8801 
Manager-Owner: Jeff Knapp 

North Carolina 

The Program Center 

3400A W. Wendover Ave. 

Greensboro, NC 27407 

(919) 855-8667 

Manager-Owner: Rupert Fenequito 

Piedmont Microsystems Inc. 
Route 3 Box 150 H 
Frazier Professional Bldg. 
Newton, NC 28658 
(704) 465-3600 
Manager-Owner: Lome Machael 

Bob West Computers 
54 West Main St. 
Brevard, NC 28712 
(704)883-2595 
Manager-Owner: Sylvia West 

Georgia 

Cardinal Computers 
903 N. Gleenwood 
Dalton, GA 30720 
(404) 226-0502 

Florida 

COMPUTECH 
1415 Timberlane Rd. 
Tallahassee, FL 32312 
(904) 893-1743 
Manager-Owner: Dan Evans 

Random Access Computers 
296 Eglin Parkway 
Ft. Walton Beach, Vl 32548 
(904) 862-7763 
Manager-Owner: Joanne Dodd 

Florida Book Store 
1614 West University Ave. 
Gainesville, FL 32604 
(904) 376-6066 

Skippers Inc. 

217 S.E. 1st Ave. 

Ocalm, FL 32671 

(904) 732-3221 

Manager-Owner: David Lee Skipper 



Osceola Computer 

1300 Dakota Ave. 

St. Cloud, FL 32769 

(305) 892-1501 

Manager-Owner: Raymond Barrieau 

Sigma Systems of Orlando 
590 N. Semoran Blvd. 
Orlando, FL 32807 
(305) 273-2434 
Manager-Owner: Tom Clance 

Computer Specialties, Inc. 

701 E. Lincoln Ave., P.O. Box 1718 

Melbourne, FL 32901 

(305) 725-6574 

Manager-Owner: Otis P. Lutz 

Micro Byte, Inc 
13710 SW 56 Street 
Miami, FL 33175 
(305) 385-2108 

Manager-Owner: Ed Silverman, 
Lyman Conover 

Focus Scientific 
224 N. Federal Highway 
Fort Lauderdale, FL 33301 
(305) 462-1010 
Manager-Owner: M. Rienhardt 

The Software Connection 
5460 N. State Rd. 7, Suite 108 
Ft. Lauderdale, FL 33319 

Business Machines 

2821 Pinewood Ave. 

West Palm Beach, FL 33407 

(305) 655-4730 

Manager-Owner: Robert Frazier, Jr. 

The Software and Computer Store 
1506 Gulf-to-Bay 
Clearwater, FL 33515 
(813) 442-8803 
Manager-Owner: Charles Kautz 

Alabama 

Tricelin Corporation 
Route 1, Box 128 
Bankston, AL 35542 
(205) 689-4999 

Tennesee 

American Computer Co. 
1004 8th Ave. S. 
Nashville, TN 37203 
Manager-Owner: Jane Maggard 

Metro Computer Ctr. 
416 W. Main St. 



Chattanooga, TN 37402 

(615) 875-6676 

Manager-Owner: Wayne F. Wilson 

Mississippi 

Sunrise Persons Supplies 
901 So. John St. 
Corinth, MS 38834 
(601) 287-4721 
Manager-Owner: Felex Gathings 

Kentucky 

All Business Computers 
Suite C-2317 Versailles Rd. 
Lexington, KY 40504 
(606) 253-2545 
Manager-Owner: Bud Wilson 

Stowehuewge Computer, Inc. 
2026-29th St. 
Ashland, KY 41101 
(606) 359-0545 

Ohio 

Earthrise Micro Systems, Inc. 
562 W. Central Ave. 
Delawar, Ohio 
(614) 363-1100 
Manager-Owner: John Kessler 

Office Mart, Inc. 
1151 East Main St. 
Lancaster, OH 43130 
(614) 687-1707 
Manager-Owner: Pat Blake 

The Computer Store of Toledo, Inc. 

18 Hillwyck Dr. 

Toledo, OH 43615 

(419) 535-1541 

Manager-Owner: Al and Jackie Miller 

Computer Corner Inc. 
5104 Mayfield Rd. 
Lyndhurst, OH 44124 
(216) 423-5010 
Manager-Owner: Ross Black 

Computer Showcase 

5855 Youngston-Warren Rd. SE 

Niles, OH 44446 

(216) 652-2571 

Waltz Photo 
438 Sixth St. 
Canton, OH 44701 
(216) 455-9421 
Manager-Owner: Brad Zupp 

Wards Computers, Inc. 
868 Ohio Pike 



Cincinnati, OH 45245 
(513) 752-2882 
Manager-Owner: Carl Ward 

Indiana 

Allan's Jewelry & Loan Co. 
130 E. 10th St. 
Anderson, IN 46016 
(317)642-7978 
Manager: Jerry Rubenstein 

McCarels Computers 
1204 Meridian Plaza 
Anderson, IN 46016 
(317)643-2662 

AVC Corporation 
2702 Applegate 
Indianapolis, IN 46203 
Manager-Owner: Brent Enderle 

Impair 
342 Bosart 

Indianapolis, IN 46201 
(317) 353-9947 
Manager-Owner: Fred Imhausen 

A Computer Store 
2140 N. Mithoefor Rd. 
Indianpolis, IN 46229 
(317) 898-0331 
Manager-Owner: Skip Robbins 

Computer People 
900 Highway 212 
Michigan City, IN 46360 
(219) 879-8557 
Manager-Owner: Harry Hopkins 

Computer Corner 
6722 E. State Blvd. 
Fort Wayne, IN 46815 
(219) 749-8338 
Manager-Owner: Tom Kutina 

Custom Software 

3197 South 3rd Place 

Terre Haute, IN 47802 

(812) 234-3242 

Manager-Owner: Vicki McEntaffer 

Michigan 

Micro Station Inc. 
24484 W. 10 Mile Rd. 
Southfield, Ml 48034 
(313) 358-5820 
Manager-Owner: Jerry Goldberg 

Comm Data 
320 Summit 



Milford, Ml 48042 
(313) 685-0113 

Roseville Computer 
25929 Gratiot 
Roseville, Ml 48066 
(313) 772-0760 
Manager-Owner: Tom Potter 

Allen Park Computer Center 
7000 Roosevelt, Suite 109 
Allen Park, Ml 48101 
(313) 383-8254 
Manager-Owner: Sam Noble 

Haney's Stereo, Inc. 
15270 Gratiot 
Detroit, Ml 48205 
(515) 752-8845 
Manager-Owner: Paul M. Paul 

Computer Mart 
915 S. Dort Hwy. 
Flint, Ml 48503 
(313) 234-0161 
Manager-Owner: Pat McCollem 

Computer Connection 
444 W. Maumer Street 
Adrian, Ml 49221 
(517) 265-7872 
Manager-Owner: Ron Gamling 

Newman A/V Communications, Inc. 
400-32nd Street SE 
Grand Rapids, Ml 49508 
(616) 243-3300 

Computers and More 

2915 Dretom 

Grand Rapids, Ml 49508 

Computer Tutor 

502 E. Front 

Traverse City, Ml 49684 

(616) 941-5320 

Manager-Owner: Caroline Garrick 



Iowa 

Micro Computer Applications 
111 E. Church St. 
Marshalltown, IA 50158 
(515) 752-8845 
Manager-Owner: Harold Montover 

Gronert Computers, Ltd 
4505 Forest Ave. 
Des Moines, IA 50311 
(515) 255-0618 
Manager-Owner: Frank Gronert 

Commander February 1983/59 



Dealers continued . . . 



Cosmos Computers 
1721 Grant Street 
Bettendort, Iowa 52722 
(319) 355-2641 
Manager-Owner: Paul Rung 

Wisconsin 

Majic Business Systems 

3519 W. Wanda Ave. 

Milw, Wl 53221 

(414) 282-8072 

Manager-Owner: Dennis Woitekaitis 

Computerland of Madison 
6625 Odana Rd. 
Madison, Wl 53719 
(608) 833-8900 
Manager-Owner: James Sullivan 

South Dakota 

Computerland Rapid City 
738 St. John St. 
Rapid City, SD 57701 
(605) 348-5384 
Manager-Owner: John Mattson 

Illinois 

The Software Store, Inc. 
1767 Glenview Rd. 
Glenview, IL 60025 
(312)724-7730 

Manager-Owner: David Pokritis 
and Jeff Rayer 

Digital World 

711 Army Trail Rd. 

Addison, IL 60101 

(312) 628-9222 

Manager-Owner: Sam Gunda 

B-A Computer Sys. 
2 N. Batavia Ave. 
Batavia, IL 60510 
(312) 879-2350 
Manager-Owner: Robert Appel 

Softwareland, Inc. 
420 West 75th St. 
Downers Grove, IL 60516 
(312) 852-6340 
Manger-Owner: Maureen Quinn 

Rozel Industries, Inc. 

7360 N. Lincoln Ave. 

Lincolnwood, IL 60646 

(312) 675-8960 

Manager-Owner: Fred Whitlock and 

Becky Kowalsky 

Fisher Scientific 

4901 W. Lemoyne Ave. 

60/Commander February 1983 



Chicago, IL 60651 
(312) 378-7770 
Manager-Owner: A.C. Heidrich 

Kappel's Computer Store 
125 E. Main 
Belleville, I L 62220 
(618) 277-2354 
Manager-Owner: Tom Kappel 

Data Plus, Inc. 
1706 Broadway 
Quincy, IL 62301 
(217) 222-65602 
Manager-Owner: James Moore 

Missouri 

Micro Age Computer 
11413 Olive Blvd. 
St. Louis, MO 63141 
(314) 567-7644 
Manager-Owner: Norm Fisher 

Common Wealth Computers 
5214 Blue Ridge Blvd. 
Kansas City, MO 64133 

(816) 356-6502 
Manager-Owner: Dick York 

Kansas 

Computer Business Machines 

Officenter 357 S. Lulu 

Wichita, KS 67211 

(316) 267-1150 

Manager-Owner: Mrs. R. Santoscoy 

Nebraska 

Hobby Town 
220 N. 66th Street 
Lincoln, NB 68505 

Central Office Equipment 
2020 Central Ave. 
Kearey, NB 68847 
(308) 234-2515 
Manager-Owner: Byron Hanse 

Louisiana 

The Computer Center 
1 1 1 C Rena Drive 
Lafayette, LA 70503 
(318) 988-2478 
Manager-Owner: Robert Jones 

Texas 

Taylor Computer Systems 
949 Melbourne Road 
Hurst, Texas 76503 

(817) 284-5251 
Manager-Owner: Mike Taylor 



Computer Home 
431 East Ave. C. 
San Angelo, TX 76903 
(915) 653-7488 
Manager-Owner: Brent DeMpville 

Texas Technical Services 
3115 W. Loop S., #26 
Houston, TX 77027 
(713) 965-9977 
Manager-Owner: Phil Ray 

The Computer Experience 

125 Southbridge 

San Antonio, Texas 78217 

(512) 340-2901 

Manager-Owner: Carolyn Roberts 

Software-N-Things 
2141 W. Anderson Lane 
Austin, TX 78757 
(512) 451-4347 
Manager-Owner: John Krieg 

Professional Computer Associates 
5326 Cameron 
Austin, TX 78723 
(512) 459-1220 
Manager-Owner: Steve Derosa 

Computerland of Amarillo 

2300 Bell St. 

Amarillo, TX 79106 

(806) 353-7482 

Manager-Owner: Mark Trowbridge 

Colorado 

Whole Life Distributors 
965 Washington St. #6 
Denver, Co. 80203 
(303) 861-2825 
Manager-Owner: Tom Tarbart 

Zero Page, Inc. 

2380 Naegele Rd. 

Colorado Springs, CO 80904 

(303) 633-0211 

Manager-Owner: David C. Cooper 

Idaho 

Electronic Specialties, Inc. 
8411 Fairview Ave. 
Boise, ID 83704 
(208) 376-5040 
Manager-Owner: Terry. Romero 

Wyoming 

Computer Concepts 
3125 E. Grand Ave. St. 
Laramie, WY 82070 



Utah 

Computer Plus 
1078 East Ft. Union Blvd. 
Midvale, UT 84047 
(801) 566-3902 

Manager-Owner: Steve Whitzelor/ 
Allen Vincent 

Mnemonics Memory Systems 

(DBA Mnemonics Computer Store) 

141 E. 200 South 

Salt Lake City, UT84111 

(801) 266-7883 

Manager: Rick Giolas 

The Hi-Fi Shop 

2236 Washington Blvd. 

Ogden, Utah 84401 

(801) 621-5244 

Manager-Owner: Brent Richardson 

Arizona 

Personal Computer Place 
1840 W. Southern Ave. 
Mesa, AZ 85202 
(602) 833-8949 
Manager-Owner: Roger Smith 

Computer Depot 
1201 Iron Springs Rd. 
Prescot, AZ 86301 
(602) 778-7473 
Manager-Owner: Brice Eldridge 

Nevada 

PCS Computer 
3900 W. Charleston, Ste R 
Las Vegas, NV 89102 
(702) 870-4138 
Manager-Owner: Mickey Cole 

Harry's Business Machines, Inc. 
323 West Street 
Reno, NV 89501 
(702) 322-4559 
Manager-Owner: Gordon Foote 

California 

Opamp Tech Books 
1033 N. Sycamore 
Los Angeles, CA 90038 
(213) 464-4322 
Manager-Owner: Alicion 

Opamp Tech Books 
1033 N. Sycamore 
Los Angeles, CA 90038 
(213) 464-4322 
Manager-Owner: Alicion 



v^Full Screen Editing 
^Copy-Move sentences, paragraphs 
^Insert-Delete letters, sentences 
^Form letters-User defined data 
v/Shorthand-words, phrases 
v'Centering-Justification-Tabs 
v'Headers-Footers-set page size 
*/ Automatic Page Numbering 
^Double columns-set margin, line size 
v" Printer graphics-send hex codes 
^Set up to support most printers 
v'Disk file concatenation 
v" Program update support provided 

THE NEXT LOGICAL 
STEP IN THE 

EVOLUTION of 
WORD PROCESSING 



COPY-WRITER 



Copy-Writer is a full featured professional quality 
word processor. It offers all the capabilities required 
for high performance and efficiency. In addition, 
advanced features such as double columns, multiple 
disk files, printer hex control, etc. Copy-Writer is 
written in FORTH, a unique language that runs 
nearly as fast as machine code but actually occupies 
less memory. This allows more room in memory for 
lines of text. More than otherwise possible. 
Copy-Writer updates will be distributed on request 
to all registered users for just the update cost. Even 
when a more powerful version is 'introduced! 

AVAILABLEFOR 40XX/8032/C64 
only $145.00 

SEE YOUR DEALER OR: 

C»«m ^P.Q. Box 102 

MICROTECH j Langhorne, Pa. 19047 

' 215-757-0284 

DEALER INQUIRIES INVITED 

COLOR VIDEO 

for 
40XX, 8032,AIM 

$139 COLOR CHART 

AIM/SYM system video display, 64 x 1 6 

characters, 8 colors, plugs into ROM 

socket, 4K RAM Multiple modes; semi 

graphics, alpha. 

PET/CBM color graphic display, 1 28 x 

1 92 pixels, generate color bar graphs 

on one screen with data on main 

screen. RS170 video color chart. 

6847 based video output. 

COLOR VIDEO FOR PET/CBM/ AIM/SYM 



ROMSWITCH - 4 ROMS IN 1 

SPACEMAKER $39.95 

Switch 4 ROMs into the same socket. 
A slide switch activates one of four. 
Electronic controls insure no glitches 
and allow ROM switching under soft- 
ware control. ROMs can be switched 
from the keyboard. 

fullFORTH+ for APPLE/PET 

FULL FIG FORTH implementation plus 
conditional assembler, floating point, 
string handling, multi-dimensional arrays, 
and disk virtual mamory 

ful1FORTH+ from IDPC Co $100. 

Target Compiler $ 50. 



SEE YOUR DEALER OR: 
^■»m i P.O. Box 102 

[ MICROTEC H J Langhorne, Pa. 



TRANSFER 

"BASIC DATA EXCHANGE" 

DISKETTES 



s5s 



MAINFRAME 

to/from 

CBM/PET 



PEDISK Model 877 is an 8" SD floppy disk system that uses 
the IBM 3740 format. Using FILEX. a program by Wilserve. 
PEDISK 877 can read and write records on a "Basic Data 
Exchange" diskette. Routines read the table of contents. 
Records are read and converted from EBCDIC TO ASCII. 
Records can be converted from ASCII to EBCDIC and recorded. 
Multiple volume files can be handled and FILEX even has 
facilities to soft format a new diskette. The FILEX program 
resides on ROM. 

floppy 
disk 



8" C 



^ITOISKII 



5" 



19047 
215-757-0284 

DEALER INQUIRIES INVITED 



877-1 Single drive system. . . $ 995.00 
877-2 Dual drive system $1 695.00 

PEDISK877 also provides a high performance general floppy 
disk for any Commodore system. Its simple design gives 
greater reliability and it offers much faster performance than 
the IEEE type drives. A considerable amount of standard 
software is available. Eight inch SO CPM (trademark of Digital 
Research) diskettes can also be read/written with the 877 
system. A complete CPM system using the Z-RAM (trademark 
of Madison Computer) can exchange standard CPM diskettes. 

[ otinaiBKH ) fl disk y 

540-1 Singledrivesystem...$ 595.00 
540-2 Dual drive system. . ..$ 895.00 

SEE YOUR DEALER OR: 

C 1 "" s P.O. Box 102 

MICROTECHl Langhorne. Pa. 19047 
/ 215-757-0284 

PEDISK AVAILABLE for 
40XX, 8032, C64 

DEALER INQUIRIES INVITED 



Commodore 
Gets Smart 

"Having a modem and a good terminal 
software package like this can really open 
up a new world of applications for your 
Commodore system." — Robert W. Baker 
-MICROCOMPUTING 

v 7 record to disk/transmit from disk 
v 7 output to Commodore/ ASCII printer 
S XON/XOFF control capability 
V translates files ASCII/BASIC/W-PRO 
v 7 system status line-clock with alarm 
v 7 user table allows encoded data 
*/ user access to routines-telemetry 

The most sophisticated terminal package 
available. Gives you all the features need- 
ed now and for the future. Available - 
Commodore 40XX,8032 with 4040,8050, 
PEDISK II 

Available from cgrs MICROTECH, 
P.O. Box 102, Langhorne, PA 19047 
215-757-0284 

$1 29.00 DEALER INQUIRIES INVITED 



with Intelligent Terminal 
Communications Package 



COMPACK 

Commander February 1983/61 






Dealers continued 



Data Equipment Supply Corp. 
8315 Firestone Blvd. 
Downey, CA 90241 
(213) 923-9361 
Manager: Robert Johnson 

Computer Place 
23914 Crenshaw Blvd. 
Torrance, CA 90505 
(213) 325-4754 
Manager-Owner: Wen T. Huang 

Fyrst Byte 

10053 Whittwood Dr. 

Whittier, CA 90603 

(213) 947-9411 

Manager-Owner: Darrell Miller 

Game Room 
5675 Kanan Room 
Agora, CA 91301 
(213) 707-0142 
Manager-Owner: Jean Collier 

General Computer Store 
22323 Sherman Way Unit #7 
Canogca Park, CA 91303 
(213) 704-6600 
Manager-Owner: Anita Broadway 

HW Electronics 
19511 Business Center Dr. 
North Ridge, CA 91324 
(213) 886-9200 
Manager-Owner: Ronda 

Levity Distributers 

6857V2 Ben Avenue 

North Hollywood, CA 91605 

(213) 982-2514 

Manager-Owner: Melinda Plesha 

Data Systems West 
421 West Las Tunas Dr. 
San Gabriel, CA 91776 
(213) 289-3791 
Owner: Frank J. Mogavero 

Consumer Computers 
8314 Parkway Dr. 
La Mesa, CA 92041 
(714) 465-8888 
Manager: Steve Scott 

Calco Digital Equpiment Inc. 

1919 ApleSt. 

Oceanside, CA 92054 

(714) 433-4119 

Vice President: Ronald N. Paperno 

20-64 Software Center 
9829 Mira-Mesa Blvd 
62/Commander February 1983 



San Diego, CA 92131 
(619) 695-0214 
Manager-Owner: Larry Skaggs 

Inland Electro Mart 
8624 California Ave. 
Riverside, CA 92504 
(714) 687-3776 
Manager-Owner: Jack 

Quality Computer Center 
801 S. Victoria St., #104 
Ventura, CA 93003 
(805) 642-1979 
Manager-Owner: David Stewart 

Jay-Kern Electronics 
1135 Columbus 
Bakersfield, CA 93305 
871-5800 
Manager-Owner: Don Taylor 

Micro Pacific Computer Center 
5148 N. Palm 
Fresno, CA 93704 
(209) 229-0101 
Manager-owner: Mike Reinhold 

J. Snell & Co., Inc. 

657 Mission St. 

San Francisco, CA 94105 

(415) 421-5898 

Manager-Owner: James Snell 

PC Computers. 
10166 San Pablo Ave. 
El Cerrito, CA 94503 
(415) 527-6044 
Manager-Owner: Gary Guttebo 

Computer Ideas, Inc. 
1029 Tennesee Street 
Vallejo, CA 94590 
(707) 552-5076 
Manager-Owner: J. Gavin 

Fox Computer Co. 
2678 N. Main Street 
Walnut Creek, CA 94596 
(415) 944-9277 
Manager-Owner: Stan Nielson 

Albany Typewriter & Computer 
923 San Pablo Ave. 
Albany, CA 94706 
(415) 526-1959 
Manager-Owner: Bill Tichy 

Idea Computers 

301 North Santa Cruz Avenue 

Los Cratos, CA 95030 



(408) 354-1210 
Manager-Owner: Tom Wolf 

The Computer Room 
230 Mt. Herman Rd. 
Scotts Valley, CA 95066 
(408) 438-5001 
Manager-Owner: Gary Guttebo 

The Computer Center Stores 
930 Town & Country Village 
San Jose, CA 95128 
(408) 246-5710 
Manager-Owner: R. Reid, 
J. Barlow, N. Kinney 

Inland Electro Mart 
8624 California Dr. 
Riverside, CA 95204 
(714) 687-3776 
Manager-Owner: Jack 

Educational Connection 
1508 Coffee Rd. 
Modesto, CA 95355 
(209) 576-1611 

Software Plus 

6201 "C" Greenback Lane 

Citnes Heights, CA 95610 

(916) 726-4979 

Manager Owner: Carolyn Webster 

The Radio Place 
2964 Freeport Bl. 
Sacramento, CA 95818 
(916) 441-7388 
Manager-Owner: Gary Stilwell 

Ray Morgan Co. 
554 Rio Lindo Ave. 
Chico, CA 95926 
(916) 343-6065 
Manager: Dave Wegner 

Computer Place 
1698 Market St. 
Redding, CA 96001 
(916) 221-1312 
Manager-Owner: John Fredricks 

Radio Mart 

1075 Cypress 

Redding, CA 96001 

(916) 241-3000 

Manager-Owner: John Cokeley 

Oregon 

SW Computers 

1125 N.E. 82nd 

Portland, OR 97220 

Manager-Owner: Jerry 

Edu-Tech 
1575 N.W. 9th 



Corvallis, OR 97330 

(503) 758-5577 

Manager-Owner: L. Clark/W. Brown 

Ace-Tec 

Highway 101 S. Sypress Center 

Bandon, OR 9741 1 
(503) 347-9322 
Manager-Owner: Ace Egnew 

Washington 

Compu-Play 
1320 S. 324th Suite A-3 
Federal Way, WA 98003 
(206) 839-4453 
Manager-Owner: Kevin Mitchell 

Electronic Supermart 
7040 S. 180th St. 
Kent, WA 98032 
(206) 251-8484 
Manager-Owner: Richard Thorp 

Programs Plus 

16874 Southcenter Parkway 

Seattle, W A 98188 

(206) 575-1375 

Manager-Owner: Nick Smith 

Conti Electronics Ltd. 

c/o Afcon 

140-1 4th 

Blaine, WA 98230 

Manager-Owner: G.W. Harder 

Computer Corner 
1610 N. Laventure 
Mt. Vernon, WA 98273 
(206) 428-1840 
Manager-Owner: Kirk D. Shroyer 

Computer + 
2504 Jefferson Ave 
Tacoma, WA 98402 
(206) 272-2329 
Manager-Owner: David Dodd 
Computer Town 
1215 Center 
Tacoma, WA 98409 
(206) 272-2271 

Nibles & Bytes 
4020 S. Steel St. Suite 105 
Tacoma, WA 98409 
(206) 475-5938' 
Manager-Owner: John Clark 

The Electronics Shop 

131 N. Decator 

Olympia, WA 98502 

(206) 357-6304 

Manager-Owner: Frank & 

Tim Linaham 



Bits, Bytes and Nibbles, Inc. 
209 Northtown Shopping Center 
Spokane, WA 99207 
(509) 487-1601 
Manager-Owner: Richard Shulman 

Alaska 

BG Systems Co. 

204 East International 

Anchorage, AK 99502 

(907) 276-2986 

Manager-Owner: Robert DeLoach 

Micro Age Computer Store 
2440 Seward Highway 
Anchorage, AK 99503 
(907) 279-6688 
Manager-Owner: Jay Wisthoff 

CANADA 

Systems Ornic Ltd 

999 deBouragogue 

Sinte Foy, Quebec G1W 4S6 

Manager-Owner: Yvon Labbee 

Caleq Inc. 

331 Sir Walter Lourier Blvd. 



1040 U.Sjndi^ 

and initial (if joint return, also^ 



St. Lambert, Quibec J4R 2L1 
Manager-Owner: Marcel Bourcier 

Electronics 2001 
5529 Yonger Street 
Willowdale, Ontario M2N 5S3 
Manager-Owner: Chris Bennett 

House of Computers 
368 Eglinton Ave. W. 
Toronto, ON MSN 1A2 
(416) 482-4336 

Manager-Owner: Mark Herzog 
The Computer Circuit Ltd. 
733 Richmond Street 
London, Ontario N68 3H2 

Kelley Software Dist. Ltd 
P.O. Box 11932 
Edmonton, Alberta T5J 3L1 
Manager-Owner: Robert Owen 



For the year 



Use 



Other- 
wise, 
please ( 
prirf 



. 



It's that time again . . . 
This year, make it easy with 

TAX-MAN 

For the Commodore 64 



The Tax-Man is friendly, easy-to-follow, 
and generous! Program computes tax 
table, sched. XYZ, income averaging 
rates, and finds your lowest tax rate! 
Available in diskette or cassette and 



includes 1040 and Schedule G forms. 
Fits standard printers, 10-pitch/6 Ipi. 



$39.95 



master charge 




VISA 




Computer Software 
& Consulting 

7510 Foxridge Way 
Anchorage, Alaska 99502 
(907) 272-1373 



Commander February 1983/63 



PROGRAM 3 



tt THIS IS CALLED WITH THE SYS 828 tt 


0377 A9C9 


tt IT PLACES A JflP $0359 IN THE tt 


0379 857C 


tt CHRGET ROUTINE tt 


037B A93A 


t 




037D S57D 


033C 094C 


LDA t$4C OP CODE OF JNP 


037F A9B0 


033E 857C 


STA $7C 


0381 S57E 


0340 A959 


LDA t$59 HSB OF ADDRESS 


0383 4C74C4 


0342 857D 


STA $7D 


0386 A20B 


0344 A903 


LDA t$03 LSB OF ADDRESS 


0388 4C3AC4 


0346 S57E 


STA $7E 


038B 8500 


0348 A8 


TAY 


038D A900 
038F 20BDFF 


tt tCBlE IS A RON ROUTINE WHICH tt 


0392 A97F 


tt WILL PRINT A NESSAGE FROM THEtt 


0394 A208 


tt ADDRESS SPECIFIED IN THE ACC tt 


0396 AOOF 


tt AND Y REGISTERS (Y=HIGH BYTE,tt 


0398 20BAFF 


tt ACC=LOH BYTE) tt 


039B 20C0FF 






039E A500 


034B 201ECB JSR $CB1E 


03A0 C945 


034E 60 


RTS 


03A2 F01C 


034F OD 


FCB $0D CARRIA6E RETURN 


03A4 A27F 


0350 444F53 FCC 'DOS OK/ 


03A6 20C9FF 


204F4E 




03A9 A500 


2E 




03AB 20D2FF 


0357 OD 


FCB $0D CARRIA6E RETURN 


03AE 207300 


0358 00 


FCB $00 


03B1 C900 


0359 C95D 


CNP t$5D IS CHAR AT 


03B3 D0F6 


035B D008 


BNE $0365 NO 


03B5 20CCFF 


035D 48 


PHP 


03B8 A97F 


035E A57B 


LDA $7B 


03BA 20C3FF 


0360 C902 


CNP #$02 IN DIRECT NODE? 


03BD 4C74C4 


0362 F009 


BEQ $036D 


03C0 A27F 


0364 68 


PLA 


03C2 20C6FF 


0365 C93A 


CNP f: IS IT A COLON? 


03C5 A90D 


0367 9001 


BCC $036A 


03C7 20D2FF 


0369 60 


RTS 


03CA 20CFFF 


036A 4C8O0O JNP $0080 CONTIN CHR6ET 


03CD 20D2FF 


036D 68 


PLA 


03D0 C90D 


036E 207300 JSR $0073 GET FIRST LETTER 


03D2 D0F6 


0371 9013 


BCC $0386 SKIP IF NUNBER 


03D4 FODF 


0373 C94B 


CNP #'K IS FIRST LETTER A 'K' 


03D6 00 


0375 DOM 


BNE $038B BRANCH IF NOT 


03D7 00 


tt KILL CQHHAND RESTORES ORIGINAL tt 


03D8 00 


tt BYTES IN THE CHR6ET ROUTINE tt 





LDA t$C9 

STA $7C 

LDA t$3A 

STA $7D 

LDA t$BO 

STA $7E 

JNP $C474 JlfflP TO BASIC READY 

LDX til ERROR 11 (SYNTAX) 

JNP $C43A PRINT ERROR NESSA8E 

STA $00 

LDA 1$00 

JSR $FFBD KERNAL 'SETNAM' ROUTINE 

LDA t$7F L06ICAL FILE #127 

LDX 18 DEVICE 18 

LDY #15 SECONDARY ADDR #15 

JSR $FFBA SET UP LOGICAL FILE 

JSR $FFCO GO OPEN FILE 

LDA $00 GET BACK FIRST CHARACTER 

CNP t'E IS IT 'E ? ? 

BEQ $03C0 YES, GO OPEN FOR INPUT 

LDX t$7F NO, OPEN FOR OUTPUT 

JSR $FFC9 KERNEL 'CHKOUT' ROUTINE 

LDA $00 GET FIRST CHARACTER 

JSR $FFD2 PRINT TO DISK 

JSR $0073 GET NEXT CHARACTER 

CNP #$00 NULL CHARACTER? 

BNE $03AB NO, PRINT IT TO DISK 

JSR $FFCC CLEAR SERIAL BUS 

LDA t$7F 

JSR $FFC3 CLOSE FILE #127 

JNP $C474 GO PRINT 'READY' 

LDX t$7F OPEN FILE FOR INPUT 

JSR $FFC6 'CHKIN' 

LDA t$OD PRINT CARRIAGE RETURN 

JSR $FFD2 

JSR $FFCF GETS ERROR MESSAGE 

JSR $FFD2 PRINT TO SCREEN 

CNP t$OD CARRIAGE RETURN?? 

BNE $03CA NO, GET NEXT CHARACTER 

BEQ $03B5 BRANCH TO 'READY' 

BRK 

BRK 

BRK 

©Copyright 1983 by Eric Giguere 



64/Commander February 1983 




SUBSCRIBE TO 



ommanoer 



<fe 



Now, and take advantage of our Charter Subscriber Discount of $4 OFF 



THE MONTHLY JOURNAL FOR 

COMMODORE 
COMPUTER USERS 



sOPll| BT VIC - 20 




I (nnnnnnnnnnnnn-^r 



64 




"COMMANDER will be dedicated to communicating the fun of, as well as the 
latest information about the COMMODORE COMPUTERS/' 

EACH MONTH COMMANDER WILL HAVE: 

• the latest information and news releases 

• software for education, business and fun 

• reviews on hardware and software 

• program listings 

• application (how-to) articles 

• a contest and MUCH, MUCH MORE!! 

DON'T MISS OUT 

on the most informative magazine dedicated to the 

COMMODORE COMPUTERS 

HAVE YOU GOT WHAT IT TAKES TO BE A 



\aert 



\jommanK 



Commander February 1983/65 



Game- CONTEST 




The Game Contest is a continuing feature of Com- 
mander magazine aimed at providing entertainment for 
and promoting competition among our readers. United 
Microware Industries has graciously provided us with 
February's Game Contest. 

DEADLINE FOR ENTRIES: APRIL 1, 1983 

Video Vermin may be purchased from United Micro- 
ware Industries or any one of its fine dealers. 
3503-C Temple Ave. 
Pomona, California 
1-714-594-1351 

66/Commander February 1983 



Terms for Game Contest 

First prize will be awarded to the 
person with the highest score. The 
winning entry must contain a photo- 
graph of the highest score of the 
game. A Video Vermin package front 
and proof of purchase slip. 

Entries must be mailed to Com- 
mander, Video Vermin Contest, PO 
Box 98827, Tacoma, WA 98498. All 
entries must be mailed, as postmarks 
are required to determine the earliest 
winning entry. In the event of a tie, 
duplicate prizes will be awarded. 
Employees of United Microware In- 
dustries and their families may not par- 
ticipate. First prize will be $250, se- 
cond prize $100, third prize $50. 

The contest will run until a first prize 
is awarded. United Microware Indus- 
tries will notify Commander Magazine 
of the winner(s) and provide copy and 
photographs for a follow-up story. 

Video Vermin 

Your once-peaceful garden is being 
invaded by a hoard of hungry Vermin. 
Shoot them and their fallen bodies 
sprout a barricade of mushrooms to 
conceal more swarming raiders. Snails 
oil path on which the Vermin slither er- 
ratically toward you. Dropping but- 
terflies leave a trail of mushrooms in 
their wake, and pouncing spiders, 
ants, beetles, and fleas infest the area. 
One vigilant gardener strikes first. If 
he's destroyed by the fatal touch of the 
invaders, two more defenders lie in 
wait to take his place. If the third 
gardener succumbs, and you have 
10,000 points, another gardener will 
emerge to help save the garden from 
devastation. 

I thought it was going to be a 
peaceful afternoon, just me and my 



Vic. I turned my set on, and started to 
play Video Vermin, the Centipede type 
arcade game by UMI. Before I realiz- 
ed it I found myself in the midst of a 
large infestation of snails, butterflies, 
beetles, fleas and ants. I was trying 
diligently to kill them but to my dismay 
they just sprouted into mushrooms. It 
seemed as though my garden would 
never flourish. 

Video Vermin is a fast paced intense 
arcade game. Your garden is being at- 
tacked by vermin, and as you shoot 
them they sprout into mushrooms 
which rain down on your garden. You 
begin the game with three gardners 
and with each 10,000 points you are 
awarded an extra man. The highest 
score is saved from game to game, 
and as you improve your aim the skill 
level increases automatically, so it's a 
constant battle to keep ahead. 

Video Vermin is a fantastic Cen- 
tipede type arcade game sold by UMI, 
with the highest arcade quality 
features. The sound is superb and the 
graphics are so excellent that I found 
myself reaching for the big spray more 
than once. 

I recommend Video Vermin to 
anyone who loves fast action, great 
sound and realistic graphics. All you'll 
need to play this great game is a 
VIC-20, one joystick, a fast hand, and 
a cool head! 

Debbie Gabbard 



Sound Shaper 

Continued from page 7 



ferent types of filters can be selected. 
The filter resonance can also be 
changed. 

The POKE commands necessary 
for the sound desired can be 
displayed at any time on the screen. 
The POKE commands can be printed 
out at any time to the VIC-1 525 printer. 
Sound Shaper for the 
Commodore 64 

Cassette $9.95 

Diskette $11.95 




A Super Editor for the Pet 

Continued from page 28 



files to the disk for later assembly. PUT 
has the ability to output all or part of 
the memory resident file. The CPUT 
command will remove extra spaces 
not in comments or ASCII text. 
LOADER 

Syntax: LOADER "file name"(,hex 
offset) 

The loader command does the 
same function as the separate loaders 
on the disk. The hex offset allows the 
object code to be stored at an address 
other than the assembled address. 
The same keys as for Basic-Aid can be 
used for to hold, pause, and stop the 
listing. 

ATUG (ASM/TED Users Group) 

c/o Brent Anderson 

200 S. Century 

Rantoul, III 61866 

USA 

217-893-4577 

TPUG (Toronto PET Users Group) 

c/o Chris Bennett 

381 Lawrence Ave. West 

Toronto, Ontario 

Canada M5M 1B9 

416-782-9252 



SAV 



Also SAVE on ... 
A COHPLETE line of C0IW0D0RE Accessories 




VIC-1541 <Disk Drive >.. 

VIC-1525 (Printer) 

VIC-153B <D»t»sett»> 

VIC-1600 <node»> 



Price 
. 399. 00 
.395.00 
. 74.95 
. 109.95 



339.ee 

329.00 
62.95 
97.95 



XW STOCK NOW 



FULL FACTORY WARRANTY 
CALL FOR OUR LOW PRICE 



Special Package Prices Available ! 
Ue SERVICE ALL COttdOIQRI Counters 

(313) 295-2330 



Call or Urite for a FREE catalog 

LIBERTY C0HPUTER DISTRIBUTORS 

P.O. Box 1786 

Dearborn, Hichigan 48121 

(313) 295-2330 

HOMEY ORDERS AM) CASHIER'S CHECKS-FREE BHIPPINB 




l.SO 

MICH. 



RES. ADO 4% SALES TAX 



SHOP 
COMPARE 
SAVE ! 



SAVE with LIBERTY your FULL SERVICE Computer Center 



Send for Catalog and Information about FREE SOFTWARE * 



or the 64 



CITY _ 
STATE 



LIBERTY COMPUTER DISTRIBUTORS 
P.O. BOX 17B6 
DEARBORN, MI 40121 
(313) 295-2330 



' COMM ODORE 64' RES. TRADEMARK CBM, INC. 



Commander February 1983/67 



Advertising Index 



Aardvark 29 

Academy Software 2 

Cascade Computerware 46 

Century Micro 53 

CGRS Micro Tech 61 

Comm Data Software 3 

Compu-sense 1 6, 32, 49, 51 , 53 

Computer Mat 7 

Data Equipment 9 

Eastern House 37 

Electric Company 46 

Electronic Specialties, Inc 51 

French Silk 23 

Input Systems, Inc 55 

Leading Edge Back Cover 

Liberty Computer Distributers 67 

Luna Software Inside Back Cover 

Midwest Micro 27 

Micro-Ed 56 

Micro Spec 54 

MIS 46 

Nibbles & Bits, Inc 13 

Optimized Data Systems 15 

Precision Technology 54 

Saura 63 

SW Computers 41 

Tamarack Software 33 

Taylor Made Software 55 

Texas Technical Services, Inc 55 

Tsasa, Inc 32 

Victory Software 18 

United Microware Industries 47, Inside Front Cover 

68/Commander February 1983 



fiffl 



SOFTWARE 



LUNA SOFTWARE is quickly becoming one of 
the largest manufacturers of software for the 
Commodore 64™ and Vic 20™ . The reason 
behind our growth is that we offer the consumer 
only the best in quality, service and price. 
We have now available for immediate delivery a 
diverse line of software — ranging from 
business programs to arcade style games. 
Call us today and shoot for the stars with LUNA. 



DISKETTES & CASSETTES FOR THE 
COMMODORE 64™ AND VIC 20" 



**> 



ft 



& 



& 






<r 



&• 



* 
















<y s& it? 



j* 



$■ 












<<&& 









&S 



o<$-~ &'<* 



s> & 



v/ 






5? 







frJW 








"NEVEI 



forgets: 



MORE THAN JUST MOTHER PRETTY MCE. 



Says who? Says ANSI. 

Specifically subcommittee X3B8 of the American 
National Standards Institute (ANSI) says so. The fact 
is all Elephant™ floppies meet or exceed the specs 
required to meet or exceed all their standards. 

But just who is "subcommittee X3B8" to issue such 
pronouncements? 

They're a group of people representing a large, 
well-balanced cross section of disciplines— from 
academia, government agencies, and the computer 
industry People from places like IBM, Hewlett-Packard, 
3M, Lawrence Livermore Labs, The U.S. Department 
of Defense, Honeywell and The Association of Com- 
puter Programmers and Analysts. In short, it's a bunch 
of high-caliber nitpickers whose mission, it seems, in 
order to make better disks for consumers, is also to 



make life miserable for everyone in the disk-making 
business. 

How? By gathering together periodically (often, 
one suspects, under the full moon) to concoct more 
and more rules to increase the quality of flexible 
disks. Their most recent rule book runs over 20 single- 
spaced pages— listing, and insisting upon— hundreds 
upon hundreds of standards a disk must meet in 
order to be blessed by ANSI. (And thereby be taken 
seriously by people who take disks seriously.) 

In fact, if you'd like a copy of this formidable docu- 
ment, for free, just let us know and well send you 
one. Because once you know what it takes to make 
an Elephant for ANSI . . . 

We think you'll want us to make some Elephants 
for you. 



ELEPHANT. HEAVY DUTY DISKS. 

For a free poster-size portrait of our powerful pachyderm, please write us. 

Distributed Exclusively by Leading Edge Products, Inc., 225 Turnpike Street, Canton, Massachusetts 02021 

Call: toll-free 1-800-343-6833; or in Massachusetts call collect (617) 828-8150. Telex 951-624.