[net.micro.cbm] March 85 Ready newsletter

bllklly@uwmacc.UUCP (Bill Kelly) (03/25/85)

Ready Newsletter Digest        17 March 1985             Vol 3, No 3

Contents:
	Turtle Talk - Sprites in Logo
	Magazine Reviews, Part 4: Ahoy!
	Basic Clinic: Answers to Questions Asked: Scrolling
	Tech Note #7: Resetting/restarting 
	Review: The GOLD Disk
	Editorial - Computers No Time-Saver
--------------------------------------------------------------------------

Subject: Masthead
From:    The Editor

This information, in a somewhat different form, appeared in READY, the
newsletter of the Madison Area Commodore Users Group.  You can contact the
editor through network mail as ...uwvax!uwmacc!bllklly, or through US Mail
at 2721 Granada Way #2, Madison WI 53713.

Copyright 1985 Madison Area Commodore Users Group.  All rights reserved.
Published on a monthly basis by MADISON AREA COMMODORE USERS GROUP,
3634 Swoboda Road, Verona, WI 53593.

   Material appearing in READY is copyrighted and therefore cannot
be used without written authorization.  The exception is that users
groups may publish articles without prior authorization if credit is
given to the author and Ready, and a copy of the newsletter is
sent (after publication) to the editor at the address listed above.
---------------------------------------------------------------------

Subject: Turtle Talk
From: John Stremikis  

Sprites are often considered one of the most powerful of the Commodore 
64's features.  Yet, they are often found to be one of the most difficult  
for beginning users to control.  Logo offers a built-in set of commands
to talk directly to each sprite to get it to change its properties 
(for instance, PENCOLOR, SHOWTURTLE and HIDETURTLE, PENUP and PENDOWN, 
LEFT and RIGHT, and a TELL command to talk to individual sprites). 

   However, when it comes to giving sprites motion -- speed and direction  
-- the Commodore 64 version of Logo has no built-in commands.  A few
other versions of Logo do have such commands as SETSPEED to give the
active sprite a given speed, FREEZE to stop all sprite motion, and 
THAW to restore sprite movement after a FREEZE command.  Luckily,  
we can do something about this in our version. 

   In several previous columns, I've described Logo as being an "extensible
language", meaning that you can teach it new commands based on its 
basic commands or ones that you have defined earlier.  These new commands  
can then be used just like the basic Logo vocabulary.  If you save 
the new commands on a disk, over several weeks or months you will  
find the disk will become a "dictionary" where Logo can read definitions
of words you have defined previously, as you need them.

   This month I'd like to teach Logo some new tricks -- some new words 
-- in the easiest possible way.  By having Logo read a dictionary. 
 I'll also suggest some other words for you to type in directly towards
the end of this column.

   The "dictionary" in this case is the Logo Utilities Disk, containing
a not-so-well known set of procedures -- definitions -- that Logo  
will instantly understand and obey.

   Let's begin by starting with a fresh Logo, and a clear workspace.

   1.  READ "VEHICLES (which in turn will get seven sprite shapes from 
the disk to your screen).  We'll need to see these vehicles, so type
TELL 1 ST, TELL 2 ST, TELL 3 ST, and so on.  Get the sprites out from  
under one another by giving each one some LEFT or RIGHT and FORWARD
commands.  

   2.  If you now type EDIT ALL, you will see that Logo has given names
to each of the sprites.  So, if you want to, from now on you may type  
TELL :TRUCK when you want to talk to sprite 1, TELL :CAR when you  
want to talk to sprite 2, and so on.

   3.  Now, let's have Logo read the "dictionary".  Type READ "VELOCITY
and wait a moment.  Logo now understands these definitions:

   SETSPEED: gives the active sprite a given speed.  For instance, TELL
1 SETSPEED 5.  

   SPEED:  returns the speed value of the active sprite.  For example, 
if you type SPEED while talking to sprite 1, Logo will respond with
RESULT: 5. 

   THAW:  restores sprite movement after they are frozen.  

   EACH:  allows a set of commands to be applied to each of a group of 
sprites, in turn.  For example EACH [1 3 5 7] [SETHEADING 90 SETSPEED  
5] THAW will send sprites 1, 3, 5, and 7 shuffling off to the right.
 EACH [0 2 4 6] [SETHEADING 270 SETSPEED 15] will send sprites 0,  
2, 4, and 6 zooming off to the left.

   You may find that the Logo primitive command SETHEADING (or SETH for
short) will be a useful command in your explorations.  SETHEADING  
and a number will give the active sprite or turtle a given heading.
 For example, SETH 0 will point the sprite towards the top of the  
screen, SETH 90 will point it towards the right, SETH 180 towards  
the bottom, SETH 270 towards the left, and so on.  Since the sprites
other than the turtle do not rotate, you should start by giving the
turtle these directions.  When you are comfortable commanding a sprite 
whose rotation you can see, then go on to talk to sprites whose rotation
you won't be able to see.  

   When using Logo with sprites and small children, I find that teaching
Logo several new words is often helpful in making up for the lack  
of sprite rotations and a corresponding orientation on the screen. 

   Teach Logo the following:


   TO NORTH
   SETH 0  
   END 
   TO EAST 
   SETH 90 
   END 
   TO SOUTH
   SETH 180
   END 
   TO WEST 
   SETH 270
   END 

   Now, Logo will understand the directions of the compass, and you can
type  TELL :TRUCK NORTH SETSPEED 2 if you want to. 

   If you want to be a bit more clever, define a few more words into
Logo's vocabulary: 

   TO FAST 
   SETSPEED 15 
   END 
   TO SLOW 
   SETSPEED 1  
   END 

   TO BACKUP
   SETSPEED -5 
   END 

   Now, you might type TELL :CAR EAST FAST or BACKUP.  

   Finally, you might define some relative words for Logo and the sprites. 
 For example:  

   TO FASTER
   SETSPEED ( SPEED + 2 )  
   END 

   TO SLOWER
   SETSPEED ( SPEED - 2 )  
   END 

   Here, you might try typing TELL :CAR EAST FAST  

   Then, type FASTER


   FASTER  
   NORTH
   WEST
   SLOWER  
   BACKUP  

   and so on.  

   I feel that I must warn you.  As you begin to teach Logo new words  
like these, and as you begin to put these new words into simple English
sentences that the sprites will obey, you may get the feeling that 
they are actually becoming intelligent.  Please don't stay up too  
late, please choose the shapes and your Logo definitions with caution, 
and please be careful! 

   I hope to continue in next month's column.  
-----------------------------------------------------------------------

Subject: Magazine Reviews, Part 4
From: Bill Kelly  

   _Ahoy!_ is a young and promising magazine, a year old in January.
 The title plays on the nautical meaning of "commodore."  I have a 
harder time finding _Ahoy!_ than _Compute!_ or _Run_.  
It is geared to Commodore users of any experience level.

   Regular departments are: Scuttlebutt, rumors and facts about new
products (the January issue discussed the Commodore 128);  
S.O.S., questions and answers; reviews, of course; and Commodares, 
programming challenges.

   I was impressed by the quality of programs _Ahoy!_ offers, such 
as 40 column emulator for the Vic-20.  Another very nice article (Jan  
85) discusses how the Vic and 64 operating system works, and what you  
can do by POKEing around in it.  The better you understand your Commodore, 
the better you can use it.   If you're handy with a soldering iron,
you'll like the occasional articles on hardware modifications.  These  
are rare in Commodore magazines.

   _Ahoy!_ has two other strong points.  Like *Compute!'s Gazette_,
it has an error checker to help you type in the program listings correctly.
 And you can buy disks of each month's programs, individually or by
subscription.  


Publishing data: 12 issues a year, $2.50 per issue, $19.95 per year.
 Disks are $7.95 apiece, or $79.95 a year. 

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

Subject: Basic Clinic: Answers to Questions Asked: Scrolling
From: Lou Goodman 

     At the last meeting I was asked about how to do smooth scrolling. 
The problem arises in that you can shift the whole screen one character
but to do a second character you have to start over after doing a real 
shift, line by line.  This can be done best by an assembler routine
and two of these have been published (that's my answer as the routines 
are too large to print here [Ed: not to mention proprietary]). The 
magazines are as follows:  

          Jun 84 Run Magazine (p118-128)
          May 84 Commodore Computing (p40-46)  

Both articles have assembler code for the needed routine (missing in
the programmer's reference guide), both in assembler and in the form
of a loader. The Run article has a game (in Basic) that uses the assembler
routine.
--------------------------------------------------------------------------

Subject: Tech Note #7: Resetting/restarting 
From: Lou R. Goodman  

  At a recent meeting, a comment was made about resetting or restarting
the C64, both from software and from hardware standpoints.  Any one
who has looked into the Programmer's Reference Guide (pages 396-397)
will know several of the hardware reset capabilities.  The one I was
familiar with (from reading only) was the one from the I/O serial bus  
connector. From the diagram you can see pin 2 listed as GND (ground)
and pin 6 as reset (with a bar above it). If these two pins are connected  
*momentarily*, the machine will reset, just as if you had turned
it off and then waited several seconds and turned it back on.  Notice  
that you can do the same thing in the User I/O port as connector 3 
also has the same reset capabilities.  If you decide you want these
capabilities, you can make a switch that will give either port reset
capabilities, *BUT* be *sure* you know what you're doing!  
An incorrect connection (in this case known as SHORTING the bus or 
port) will *PERMANENTLY DAMAGE* your machine!! (Well, permanently  
enough to demand repair, the extent of which will depend on how the
error is made).  I can show you where in the book it is, but it remains
for you a _caveat emptor_ (buyer beware); I take no responsibility 
for what YOU do.  At the February meeting, enough interest was shown
that at this or some future meeting more will be said/shown of a more  
practical (i.e. show and tell) manner. 

     Soft restarting is easier, though not always possible.  The easiest
restart is known as a "Warm Start".  It is called that in that it will 
reset some of the vectors (addresses used by the machine to operate),  
stop the program going (if the warm start has not been disabled) and
will NOT remove the program currently in memory.  The warm start is
obtained by holding down the RESTORE key and then typing the RUN/STOP  
key.  The result will usually be the resetting of the screen to the
default color, clearing of the screen (with a READY at the top), the
clearing of sprites, turning off of the SID chip (sound goes off), 
etc.  It is the simplest and least altering of restarts.

     The "cold start" is the equivalent of turning off the machine 
and turning it back on, almost the same as the hardware reset indicated
above.  It demands, however, that the Basic interpreter be intact and  
that you can get to monitor mode (i.e. can get to or have gotten the
READY).  To get a cold start, type in the statement

           SYS 64738

followed by a <return>.  The result will be a pause when the center
portion of the screen (type in area or area that can be changed color  
ignoring the border color) will shrink on the right by one character
followed by its restoring to normal width and the banner at the top
of the page (**** COMMODORE 64 BASIC V2 ****, etc.).  The program you  
had may be retrievable or in part by an UNNEW program, but may just
as well be lost, depending, among other things, on what caused the 
system to go bonkers in the first place.  For all of the owners of 
the Fast-Load cartridge, be aware that this cold start will DISABLE
the cartridge.  The hardware restart mentioned above will not disable  
it (you could consider putting a reset switch into the cartridge since 
it plugs into the user port).  

   Remember, a simple rule of thumb on program development...  Save
it before running it if there is the merest shadow of doubt and if 
you have made sufficient changes, additions to made retyping/redoing
a significant job! ... better safe than sorry! 
-------------------------------------------------------------------------

Subject: Review: The GOLD Disk  
From: Lou Goodman 

     Recently in the last few months we have been regaled in many Commodore
type magazines with full page ads about a "Gold Disk", or "almost" 
free software.  As of this writing, 3 of the disks have appeared and
have been met by me, at least, with mixed emotions as the disks have
not been without problems.  But, they seem to have a way of rising 
above those so far encountered.  Problems of a major nature that I 
encountered were 1) the initial disk was not loadable; solution, return
for a new disk which was loadable;  2) the word processor on disk 2
would not print; solution, new version put out on disk 3 that does 
work.  These to me are major problems, 2 of 3 disks, though you could  
argue the majorness of the 1st problem.  The unreadable disk was quickly
replaced; however, a letter of inquiry seems to have been lost weeks
ago.  So, it is with an initial _caveat emptor_ that I looked into 
them.  

     Each disk has a feature (#1 data base, #2 word processor, #3 typing
tutor), two games each (5 out of the 6 require a joy stick), and a 
bunch of columns which include the following:  

     jukebox (music)
     Sound FX (birds, claxton, footsteps: with code)
     Crossword (moderate to difficult, good in my opinion) 
     Computer trivia (obvious to not so)
     Business (budgeting, home purchase, loans/mortgages)  
     Basic tutorial (I, II & III (end))
     Challenge (towers of Hanoi, 8 queens, bubble sort)
     Programmer's corner (speed, random, on-keys)  

To these you can also add, assorted letters, editorials, a software
review (e.g. ASI Forth), some ads (as one loads a particular program/column),  
and reviews of past disks (for those starting the subscription late)
and/or previews of coming features (e.g. a Painter type program and
a sprite creation system). 

     Most all of the data and programs are useful and to some degree
informative or entertaining. There are also some "carry overs" like
disk 3's "oops" for the correction on disk 2's word processor or a 
set of utilities (on disk 3) for accessing a database file (disk 1)
for printing (with a sample program and data base files).  Of course,  
having the rpg (report generator) is only valid if one also has disk
1 to create the database.  So, there is also a certain amount of "cross
referencing" or intermeshing of the disks (above and beyond having 
the answer to the crossword puzzle on the next disk).  

     It is hard to give a multiple operation software package a full
review as space would not allow.  The disks can most easily be viewed  
as an electronic magazine or journal on disk.  Some of the parts such  
as the data base manual or the word processor reference can be printed 
out (with directions on how to do it).  Like any magazine, you may 
not want to "read" all of the articles or you may want to browse, and  
the means for browsing are there as each has it's own table of contents
that can be used to call the "article" into memory.

     In the "challenge" column, the towers of Hanoi and 8 queens problems  
are some of the classic problems considered in artificial intelligence 
(i.e. making the machine "think").  Many computer scientists, on the
other hand, consider the bubble sort as one of the more inefficient
sorts available for use in most data sets.  Yes, it is a challenge,
but it decreases my estimation of this particular column's value, even 
though, as with all solutions, the graphics solution is well done. 
 A selection sort or insertion sort would have been better and could
be done well in graphics (with insertion sort you could even show how  
to use it to build a table in sequence, something the bubble sort would
do more inefficiently).

     As to the feature articles, the data base is a cut above most 
of the "data managers" I've seen (but, to be truthful, I haven't looked
all that many).  Most generally a data base is a base of data used 
for some purpose.  Many data base programs of the simple sort are data 
managers that allow retrieval and manipulation of a specific file based
on a set of descriptors.  Data base managers allow for more complicated
relations among data: manipulation of subsets, multiple file access,
etc.  This system allows "collection" of a subset of the file, a step  
in the direction of full data base operation.  It's not "full featured"
but is quite usable.

     The word processor has a number of excellent features including
left and right justification.  I found a number of the descriptors 
used to be incomplete.  For example, there are commands given to "start"
filling or "start" justification, but there is no directive or instructions
on how to stop these actions.  Only when one has worked with a number  
of word processors will some of the missing descriptions be not necessary. 
 Nonetheless, the word processor does allow a large range of formatting
and text manipulating commands.  It is definitely not bad, but needs
to be used with the manual at hand until you become used to the multiple
command formats and manipulators.  The manual is written in the processor's
format and has directions on how to print it out in the "article". 

     I did not look deeply into the typing tutor since I have typed
longer than I usually want to remember.  It does have, however, some
excellent features that can help a typist trying for speed and accuracy.
 It can time the typist, it keeps track of errors and it also allows
you to set up your own exercises.  One must remember, however, that
if it is to be used as a tutor for a specific typewriter, only those
keys that match must be used.  Anyone who has worked with many computers
will know the woes of the many nonstandard features of computer keyboards. 
 As a simple example, most computers (not HP) have the control key 
where Commodore has put the run/stop key.  This is a real pain when
using Speedscript or any program that needs control characters.  But
for typing, that key can be avoided.  If you need practice, then this  
program can be quite usable.

     In summary, I'd say that for the money paid, I have been quite
satisfied with the software that I have received. For $10.95 a disk
($9.95 + $1 postage), it would make an excellent addition to a computer
user's collection.  But, remember only the one tenet about software:
 it is only valuable if you *USE* it.  
-------------------------------------------------------------------------

Subject: EDITORIAL  
Subject: Computers No Time-Saver
From: Bill Kelly

The press loves to expose popular myths and reveal the dirty truths
behind them.  This month _Ready_ takes on one of the many myths
surrounding computers, namely their magic ability to save time, money, 
and work.  

   One common reasons people give for using a computer, whether at 
home or in business, is to save time.  If that's your intent, you would
do well to think carefully about the particular job you're trying to
automate before investing a lot of time or money.  

   Computers excel at processing information.  Give a computer your
business's expenses, receipts, and so on, and it'll tally your ledgers 
faster than an army of accountants.  It's *giving* the computer
the information that can offset the time savings.  In the case of accounting,  
you'll spend a great deal of time gathering and recording the data 
in any case, so you probably will save time.  But that's not the case  
with many applications at home.

  For instance, I've heard people say how nice it would be to have 
a computer print out their shopping lists automatically.  Certainly
the computer can compare what you have on hand with your expected needs,
but *you* have to tell it what's in the pantry.  If you typed everything
in the house into your Commodore, you'd have to run to the computer
every time you finished a box of Twinkies or a gallon of milk; otherwise
the computer would have no idea what was still on hand.

   I suffer from the same delusions myself at times.  As an example from my
own experience, I've occasionally thought it would be nice to have our 
recipe file online.  Then if I want ideas on what to fix with ground
beef, I could ask the computer.  As my wife points out, a well organized
recipe file accomplishes the same thing with considerably less effort  
to set up.  Often what you get with a computer is better information.  
 For instance, a recipe file could quickly tell you what to make with  
hamburger if you're out of rice, onions, and tomato sauce.  Or it could
point out the substitutions you can make for the missing items.

   If you've got the programming bug, as I do, you might decide to 
write the program anyway, knowing you weren't saving time or effort,
just for the challenge.  Most programmers will spend 5 hours automating
a half hour job!

   Apart from time lost in providing data to the computer, don't forget
about the time it takes to write (or learn to use) a program.  In one  
educational journal, two researchers wrote of how they decided to write
a program to help them in their area of study.  They ended up spending 
unexpected months away from their research because the programming 
took much longer than they anticipated -- and it always does!  In retrospect,  
they wished they had thought more carefully about adapting an available
product to their needs (or vice versa).

   The point I'm making isn't to avoid making the fullest use of your  
computer.  Just use it for the right jobs and for the right reasons.
 Use it because you're *sure* it will save time or money, or because
you want better information, or just for the fun of it!
--------------------------------------------------------------------------
End of March Ready digest
-- 

Bi||    {allegra, ihnp4, seismo}!uwvax!uwmacc!bllklly
Ke||y   1210 West Dayton St/U Wisconsin Madison/Mad WI 53706

"I will not harm any vehicle or the physical contents thereof,
 nor through inaction allow harm to come to a vehicle or the
 physical contents thereof."  -- The Repo Code
 (Not many people live by a code these days.)