@(#)top:
  
                   ########
             ##################
         ######            ######
      #####
    #####  ####  ####      ##      #####   ####  ####  ####  ####  ####   #####
  #####    ##    ##      ####    ##   ##   ##  ###     ##    ####  ##   ##   ##
 #####    ########     ##  ##   ##        #####       ##    ## ## ##   ##
#####    ##    ##    ########  ##   ##   ##  ###     ##    ##  ####   ##   ##
#####  ####  ####  ####  ####  #####   ####  ####  ####  ####  ####   ######
#####                                                                     ##
 ######            ######            Issue #14
   ##################               Version 1.0
       ########                    November 1996
				     
-------------------------------------------------------------------------

@(#)contents: Table of Contents
  

Features
   6. The Commodore Telnet BBS by Bo Zimmerman
      (Reference: net)
        In this age of internetworked computer systems, is the 
        Commodore left out?  No way, as Bo Zimmerman describes how to
        coax your Commodore BBS system to play the networking game.
        Bo shows how to set up your BBS so that Internet users can
        "telnet" to your BBS from anywhere on the 'Net.
   8. Menu Toolbox III by Jeff Jones
      (Reference: toolbox)
        You've got this neat idea for a game, utility, or productivity
        application.  The engine is complete and working, but the user
        interface is a mess.  Do you scrap the project because you're
        not up to the task of writing a whole UI engine?  Nonsense.  Jeff
        presents a rich set of functions and subroutines to tame that
        killer application.
  11. The CMD Nirvana: The Guts and Glory by Todd Elliott
      (Reference: hw)
        Has your computer system started looking like the multi-headed
        beast from a "B" movie?  Are you tired of having so many items
        on your desk?  Do you envy IBM PC owners with their all-in-one
        computer?  Well, if you answered YES! to any of the above, let
        Todd show you his souped up C128DCR.  Learn how you, too, can
        "upgrade" your computer system and refine its image.
  13. Jim Butterfield: The Commodore Guru - An Interview by Jim Lawless
      (Reference: jb)
        Jim Butterfield has long been associated with the Commodore
        computer system, from the days of the KIM-1 to the present.
        Many of us learned machine language through Jim's articles or
        books, while most have benefitted from his early work on
        creating memory maps and documenting KERNAL routines for the 
        Commodore line.  Jim Lawless talks to the ubiquitous Commodore
        Guru.

Columns
   4. Hi Tech Trickery by Alan Jones
      (Reference: trick)  
        In part II of Alan's "Heavy Math" series, he moves right into
        Linear Programming and how to accomplish it on the C64.  If you're
        still not sure what LP math is, read on, as you'll be surprised 
        at which everyday problems fall into this category of mathematics.
  15. Hacking BASICs by Richard T. Cunningham
      (Reference: basic)
        Even as more and more programmers take up the ML flag and wave it
        proudly, there are many who either use BASIC entirely, or prototype
        pieces of code in BASIC before converting to ML.  Richard outlines
        some common "gotchas" in the ever-present programming language.
  17. Twiddling the Bits by Ward Shrake
      (Reference: bits)
        OK, VIC-20 enthusiasts, listen up.  Resident VIC-20 cartridge expert
        Ward Shrake details exactly how the VIC-20 and its cartridges work
        together to allow the user to play games and use applications on
        cartridge.  Ward details how to archive your collection of VIC
        carts, as well as how the computer recognizes and executes code on
        a cartridge.
        
Departments
   1. The (cough, cough) Hacking Editor
      (Reference: editor)
   2. Input/Output
      (Reference: io)
   3. Newsfront
      (Reference: news)
   5. Hacking the Mags
      (Reference: mags)
   7. UseNuggets
      (Reference: usenet)
   9. FIDO's Nuggets
      (Reference: fido)
  10. The Hacking Review
      (Reference: review)
  12. Hack Surfing
      (Reference: surf)
  14. Commodore Trivia
      (Reference: trivia)
  16. ? DS, DS$: rem The Error Channel
      (Reference: error)
  18. The Next Hack
      (Reference: next)
  19. Hacking the Code
      (Reference: code)

-------------------------------------------------------------------------

@(#)legal: Commodore Hacking Legal Notice

Commodore and the respective Commodore product names are trademarks or 
registered trademarks of ESCOM GmbH or Visual Information Services 
Corporation.  Commodore Hacking is in no way affiliated with ESCOM GmbH 
or Visual Information Services Corporation (VISCorp), owners of said 
trademarks.  Commodore Hacking is published 4 times yearly by:			  
  					     		
Brain Innovations Inc. 
10710 Bruhn Avenue
Bennington, NE  68007

The magazine is published on on-line networks free of charge, and a nominal 
fee is charged for alternate mediums of transmission.  

Permission is granted to re-distribute this "net-magazine" or "e-zine" in
its entirety for non-profit use.  A charge of no more than US$5.00 may be 
charged by redistribution parties to cover printed duplication and no more
than US$10.00 for other types of duplication to cover duplication and media
costs for this publication.  If this publications is included in a
for-profit compilation, this publication must be alternately available
separately or as part of a non-profit compilation.
		
This publication, in regards to its specific ordering and compilations of
various elements, is copyright (c) 1995-96 by Brain Innovations,
Incorporated, unless otherwise noted.  Each work in this publication
retains any and all copyrights pertaining to the individual work's contents.
For redistribution rights to individual works, please contact the author
of said work or Brain Innovations, Inc.
       
Brain Innovations, Inc. assumes no responsibility for errors or omissions
in editorial, article, or program listing content.  
  
-------------------------------------------------------------------------

@(#)info: Commodore Hacking Information
  
Commodore Hacking is published via the Internet 4 times yearly, and is 
presented in both ISO-8859-1 and HTML versions.  This and previous issues
can be found at the Commodore Hacking Home Page 
(http://www.msen.com/~brain/chacking/), as well as via FTP 
(ftp://ccnga.uwaterloo.ca/pub/cbm/hacking.mag/)

In addition, the Commodore Hacking mail server can be used to retrieve each 
issue.  To request a copy of an issue, please send the following electronic 
mail message:

To: brain@mail.msen.com
Subject: MAILSERV
Body of Message:

help
catalog
send c=hacking13.txt 
quit

To retrieve a PKZIP 1.01 archive of the individual articles in Commodore
Hacking, request the file c=hacking13.zip

To subscribe to the Commodore Hacking and receive new issues as 
they are published, add the following command to you MAILSERV message 
prior to the quit command:

subscribe c=hacking Firstname Lastname msglen

(msglen is largest size of email message in line you can receive.  Each
line is roughly 50 characters, so 600 lines is about 30000 bytes.  When
in doubt, choose 600)

example:

subscribe c=hacking Jim Brain 600

Although no fee is charged for this magazine, donations are gladly accepted 
from corporate and individual concerns.  All moneys will be used to defray 
any administrative costs, subscribe to publications for review, and 
compensate the individual authors contributing to this issue.

As part of a magazine promotion, Commodore Hacking Issue #12 was 
professionally laid out on printed format.  These printed copies are for
sale.  

If you can not obtain Commodore Hacking through any other means and wish
to purchase a copy on disk or would like to purchase the professionally
printed Issue #12, please address a check or money order to "Jim Brain" 
and mail to:
				 
Jim Brain
10710 Bruhn Avenue
Bennington, NE  68007

Disk copies of each issue:                 USD$5.00
Professionally printed copy of Issue #12:  USD$6.00

All prices cover only duplication and materials and include shipping in
the United States.  For disk copies, please specify format:

Computer     Disk Size     Capacity   Notes
				      
CBM/PETSCII  5.25 inch     170 kB     1541 format
                           340 kB     1571 format
             3.50 inch     800 kB     1581/FD2000 format
                           1.6 MB     FD2000/FD4000 format
IBM/ASCII    3.50 inch     720 kB     Double Density
                           1.4 MB     High Density
                           
Any persons wishing to author articles for inclusion in Commodore Hacking
are encouraged to view the submission guidelines on the WWW
(http://www.msen.com/~brain/pub/c-hacking-submit.txt) or via the MAILSERV 
server (send c-hacking-submit.txt).  

=========================================================================

@(#)rch: Reading C=Hacking
  
Starting with Issue 11 of Commodore Hacking, the new QuickFind indexing 
system is utilized to aid readers of the text version in navigating the
magazine.  At the top  of each article or other important place in the
magazine, a word prefixed with a special string is present.  (See the
title of this article for an example.)  Throughout the magazine, if an
article is mentioned, it will be followed by a reference string.  For
example, if we mentioned this article, we would add (Reference: rch) after
the name.  By using your favorite editor's search function and searching
for the string after the word "Reference:", prefixed by the magic prefix
string, will move you directly to the article of choice.  To merely skip to
the next article in the magazine, search only for the magic prefix string.

Some handy indexing strings possibly not referenced anywhere are:

top      top of issue
bottom   bottom of issue
contents table of contents
legal    legal notice

For those with access to a UNIX system, the command "what" can be
run on the issue, which will result in all the article titles being
printed.

A slightly different magic prefix string "@(A)" is used to delimit
sub-topics or main heading in articles.  The text after the magic string
differs depending on article content.  For the Input/Output column
(Reference: io), the text after the magic prefix will either be "c" for 
comment, or "r" for response.  In features and columns, a number after
the prefix indicates the ordinal of that heading or sub-topic in the
article.  If a specific sub-topic is referenced elsewhere in the article,
a sub-topic reference will be indicated.  A reference to "@(A)r" would
be written as "(SubRef: r)".

As time goes on, the role of this indexing system will be expanded and
changed to ease navigation of the text version, but minimize the clutter
added by these extra items.

=========================================================================

@(#)editor: The Hacking Editor
            by Jim Brain (j.brain@ieee.org)

Sometimes, it's important to look back and see how far we've come.  
The following story comes to mind:

A young boy sits in the living room and flips earnestly through a 
Montgomery Wards catalog looking for some item.   The year is 1983.
At last he finds the item and presents the book to his father, who 
is reading a periodical in his easy chair.  "Dad," the boy begins,
"I want to buy one of these with my savings."  The father, startled
upon hearing of such a prospective purchase, looks up and reaches for
the catalog.  "What is it you want to buy?" he asks.  "That video game
on the top of the page is what I want," the boy explains.  The father
looks at the pertinent page and notices a glossy picture of an Atari 
VCS2600 console system, complete with options.  Frowning, the father
raises his head and look in the boy's eyes.  "Son," he starts, "I am
not going to let you buy one of these video game systems.  All they are
good for is playing games, and that's too much money to spend to buy a 
game."  The boy protests, stating that "all his friends" own one and
that it the "thing" to own today.  The father, known for being stubborn,
refuses to budge on the issues, but concludes the exchange by handing the
catalog back and saying, "If you want to buy a machine that plays games, 
buy one of those new computer systems.  That way, you can play games with
it and also use it for other things when the games get old and boring."
The boy takes back the book and sulks for a while as he flips through the
pages.  As the hurt wears off, he notices a section near the video console
page that shows off those new computer systems his Dad referred to.  At 
first, the kid's eye is drawn to the shiny silver Texas Instruments TI-99/4
computer system pictured in the catalog.  He is about to jump up and
again hand the catalog to his Dad when he realizes the "new-fangled"
item is priced at $322.00.  His heart sinks, for his savings account only
holds a bit over $250.00 and the machine looked so impressive.  So, beaten
again, the young boy flips the page and resigns himself to never owning
anything "cool".  However, the next page pictures a different computer
system and a quick check confirms the price is within budget: $233.00.
The computer isn't as impressive looking as the TI, but the boy will not
be without a "video game", and this fits the bill.

Needless to say, the computer was a Commodore VIC-20, and the boy bought
a few games for the unit, including a Space Invaders clone and a Pac-Man
clone.  As the father predicted, the boy lost interest in the unit after a
while and packed the system away.  However, as the boy entered 7th grade, he
again pulled the unit out when he learned that one of his classrooms was
equipped with Commodore VIC machines.  His interest in computers as tools
started there and grew with the years.
    		      
As I finish my first year of editorship of Commodore Hacking, I am looking
back at the events that have occurred in the last year and those that have
occurred over the years since I first learned about Commodore computers.
Commodore owners have come from 3.5kB and 22 by 23 screens with the
VIC-20 to CBM machines with features like multiple megabytes of RAM, 33.6
kbps FaxModems, gigabyte hard drives, 8-20 MHz operation, and a host of 
other options.  No, I don't think Commodore computers can solve all the
world's problems. However, they and their owners should be commended on
their loyalty and dedication to the market and to the advances that have
kept the machines out of closets and dumpsters.  While I won't doubt that
there are more IBM PC clones in the world today, I wonder how many PC
units are resting under tons of refuse in the city dump.  

Here at Hacking Headquarters, I am impressded by what we have accomplished
with the publication, but I have already outlined improvements that can be
made and things I didn't quite get implemented this past year.  As always,
your letters and comments are always appreciated.  The publication depends
on reader feedback to ensure that covers subjects of interest to the 
Commodore enthusiast.  Of course, some things, like the technical focus
of Commodore Hacking, define the magazine and its place among the various
Commodore publications.  However, even that can be continually improved.
So, as you look back on the past year of Commodore usage, take a look at
our progress or lack thereof and send us a note, if only to tell us to
change nothing.  Remember, we can't increase the publication's usefulness
to you if we don't know where it currently falls short.

As for the boy in the above story, I think he's come a long way since that
fateful day in 1983.  He no longer thinks TI's look better than CBM's.  In
fact, I think he has earned an impressive reputation as a Commodore 
advocate. Then again, I might be a bit biased, so you be the judge.  The
boy in the story was a youngster named Jimmy.  Jimmy Brain.

Enjoy YOUR magazine,
		    
Jim Brain (j.brain@ieee.org)
editor     

=========================================================================

@(#)io: Input/Output 
 		
Obviously, Commodore Hacking depends on the comments and article 
submissions from the Commodore community to flourish.  Everyone sees the 
articles, but let's not forget those comments.  They are very helpful, 
and every attempt is made to address concerns in them.  Address any 
comments, concerns, or suggestions to: 
 
Commodore Hacking 
10710 Bruhn Avenue
Bennington, NE  68007
j.brain@ieee.org (Internet) 
 	  
@(A)c: Hey! You Characters! Sit Down!
       	
From: Adam Vardy (abe0084@InfoNET.st-johns.nf.ca)
		 				
Dear C=Hacking,
       
In the last issue there was some source code for printing very big 
numbers.  This source code is all in uppercase.  This seems to be true 
whenever source code is included in the magazine.  I am wondering why 
that is.  This makes it rather difficult for me to extract the source and 
put it into a form that my assembler can deal with.  I can't load the 
source right into Power Assembler.  It only accepts lowercase code.  It 
is puzzling to me why you do this, because I would think any assembler 
that accepts plain text would work this way too.

Another thing is this.  In the last issue one of the uuencoded files in 
the magazine was dim4.  The source code for the included files is for the 
Merlin Assembler.  OK.  So I try to read these files.  I'm having 
problems with this.  If I try to More them in ACE, I can't.  It's 
unreadable.  They seem to be text, but however I try to read them, I get 
weird characters or other stuff.  Loading them into a word processor or 
into ZED, or anything doesn't work.

I don't have Merlin.  But I would think it must have some way to save 
plain text source.  That way, everyone can at least read it, right?

@(A)r: 
Code is printed in the magazine as it is received by Commodore Hacking.
The only formatting done to source code in articles and columns is to
indent each line 3 spaces.  The source code to which you refer above was
in a USENET posting and was captured from the comp.sys.cbm newsgroup in
uppercase.  Our theory is that some folks who upload code to the Internet
do not do an PETSCII-ASCII translation, which would cause the effect of
switching all lowercase characters to uppercase.  However, we are not
certain that there all assemblers expect lowercase, which is why we do
not try to alter case of source code.

As for your second problem, we accept part of the blame.  We are attempting
to obtain allof the source code used in the publciation in ASCII or
PETSCII format.  However, a number of assemblers, including Turbo-Assembler,
do have an internal format that is neither ASCII nor PETSCII.  Merlin may
also have such a format.  However, we are unfamiliar with Merlin, so it
may not have an option to output code in ASCII or PETSCII, as Turbo-
Assembler does.  Our suggestion is to contact the author of the article
directly and ask for an ASCII copy of the source and accept our apologies.


@(A)c: A Plea for Information
       	
From: MICHAEL I DEMING <m.deming@genie.geis.com>

Dear C=Hacking,

An article or series of articles on the 80 column chip would be very helpful
e.g. how to use sprites, a screen dump and other things like that. If I knew
how to do this I would write the articles but I don't so I am begging for
any info on this chip.

@(A)r:
Always check back issues of Commodore Hacking for prior articles on topics.
See Commodore Hacking Information (Reference: info) for directions on how
to access back issues.  VDC information is included in Issue 1 as part of
Craig Bruce's "Simple Hires Line Drawing Package for the C128" and as part
of Craig Taylor's "An In-Depth Look at the 8563 Video Chip on the C= 128" in
issue 2.  As for the other topics, other articles in Commodore Hacking touch
on those issues, but we always appreciate new articles dealing with these
topics.

@(A)c: All I Can Say is Wow!
       	
From: George Szaszvari <gsz@dial.pipex.com>

In Commodore Hacking #13 Preface:

>Whew! Folks, here is the long awaited Issue #13 of Commodore Hacking.
>Hacking Headquarters has produced an issue overflowing with technical
>articles sure to satisfy even the most discerning Commodore enthusiast.  
>In fact, this issue is OVERFLOWING with 384 kB of material, so empty out
>that mailbox.  Here it comes...

Yeah, a real BUMPER issue, thanks!

@(A)r:
Well, the size is a both a blessing and a curse.  While we are happy about
the number and diversity of articles, we know there are those who can't
handle a large issue like #13, so we are trimming the size a bit from #14.
However, thanks for the comments.

@(A)c: Speaking of Kudos!
       	
From: Brett Tabke

Dear C=Hacking,

Thank you!  One of, if not THE, best issues yet!
	  
I can't thank you enough for all the work you've done here Jim.
Between Hacking, The FAQ, and the CBM product documetation, you have
put out more valuable information in 6 months than most of the pay
magazines to in their lifetime.  The CBM products listing is a rare
treasure that every CBM owner should take time to read.

@(A)r:
We don't know what to say.  We're just happy that everyone stood by us
during the move and the delay in getting #13 out.  By th way, for those who
have not seen.  The CBM Products List to which Brett Tabke refers is 
available as "cbmmodel.txt" on the MAILSERV and through the WWW.
(http://www.msen.com/~brain/pub/cbmmodel.txt)  If you prefer to wait, an
updated copy will be presented in Commodore Hacking #15.

@(A)c: Who's Got the Right Copyright?

From: Ruth Hackley (fgm@rosenet.net)

Dear C=Hacking,

I am Ruth Hackley, Ron's wife, and newsletter editor for the L.C.C.U.G. in 
Eugene. Are there any portions of C=Hacking that can be used in the 
newsletter.  We plan to provide the magazine on disk to our library as
well.

@(A)r:
The entire publication can be redistributable as a complete work, as
explained in the Commodore Hacking Legal Notice (Reference: legal).  As
well, individual articles can be