PUBLIC DOMAIN PROGRAMS FROM
The FastAid Co.
May 31, 1991
INTRODUCTION:
The two programs, and their Turbo C source code, contained in this
package are copyrighted by The FastAid Co.
They are hereby placed in the public domain. This means that you
may use them freely, modify them, copy them and give them away.
The only restriction that I would place on the code and executable
files is the restriction of intellectual honesty. If you use the
code in your own distributable programs, mention The FastAid Co.
in a footnote.
NOTE: The programs imply that you have the HP48 Serial Interface
Kit and an MS-DOS computer.
Please consider these programs as experimental. They both work,
however they may fail. There's only a small amount of error
trapping built in to the programs.
WHAT ARE THE PROGRAMS GOOD FOR?
In short, the two programs, GROB2DRW and DRW2GROB, are useful for
"grobbing around" on the HP 48 calculator in conjunction with a
desk top computer.
They were inspired by hours of frustration, trying to do free-hand
drawings on the HP 48.
Then I found Preston Brown's DRAW48 program on the HP Forum of
Compuserve. This program let's you draw grobs on a PC and port
them to the HP-48 where they are "compiled". This is great!
ASIDE: Preston Brown's DRAW48 program is "finest-kind-stuff": the
best thing since the fork-split English muffin." If you
haven't downloaded a copy, please do so. As a matter of fact,
you'll need a copy of DRAW48 to get the full benefit of
GROB2DRW and DRW2GROB.
Anyway, I got carried away and produced an elaborate picture on
the PC using DRAW48. When I saved it to disk and quit DRAW48, I
found, to my amazement, that the Draw-file was some 30K bytes in
size.
I tried porting the file to the HP48 and watched Kermit die while
trying. My HP48 has only 32K bytes of RAM. The solution was to
buy more memory or to write a "grob-compiler" for the PC. A
compiler would turn a 30K Draw-file into a 2K+ grob-file that
could be easily ported to the HP48. This idea was the start of
the DRW2GROB program.
If you think of DRW2GROB as a post-processor for DRAW48, then
GROB2DRW would have to be called a pre-processor. GROB2DRW will
take a grob-file, developed on the HP48, and convert it to a file
that can be loaded into DRAW48.
With GROB2DRW, you can start a free-hand drawing on the HP48, move
it to the desk top computer for refinement, compile the picture on
the desk top and move the GROB file back to the HP48.
***IN GENERAL***
A word about DRAW48:
The otherwise excellent DRAW48 program can't import "pure" GROB
files. The only files it can work with are grob "source files"
produced by DRAW48 or, gadzooks, those source files that were
written by hand. Such source files are usually full of statements
that contain the HP48 commands "LINE", "SUB", "REPL", "ARC",
"PIXON", etc.
Furthermore, elaborate free-hand drawings, done within the DRAW48
program, can produce GROB source files that mushroom to 45K or
larger. This is especially true if a picture is created free-hand-
style, with liberal use of the "Add dot" option.
The GROB2DRW and DRW2GROB programs overcome these limitations.
Here's How To Use GROB2DRW and DRW2GROB by way of an example.
1. Suppose you start to develop a GROB, on the HP48, using the
DOT+, LINE, BOX, ARC, commands.
2. You discover that this is slow-going.
Besides, looking for tiny dots to erase is driving you blind.
3. You decide, instead, to finish the drawing on your desk top PC.
4. You refer to the HP48 User's Manual and discover how to store a
GROB in a VARiable.
5. Then you refer to the Serial Interface Kit and learn how to set
protocols in Kermit and how to transfer variables from the HP48
to files on your desk top PC.
6. Having successfully moved a GROB file to the PC, you're ready
to get started.
7. Assume that your file is called "GNU". It's a picture of an
animal.
8. Use the command "GROB2DRW gnu gnu.drw" (without quotes) to
decompile the GNU file. (If you use a file browser to view the
decompiled version, you will find that it consists almost
entirely of PIXON statements.)
9. Start the DRAW48 program and "Get" GNU.DRW. Refine the
drawing. Use only the Add dot and Delete dot commands. (If you
want to draw boxes, arcs, or lines, do so on the HP48. )
10. Save the GNU.DRW file and Quit DRAW48.
11. Use the command "DRW2GROB gnu.drw gnu" to compile the grob
source file to a pure GROB file.
12. Send the GNU file to the HP48. Recall the variable to level 1:
and use PRG DISP LCD-> to view the GROB.
WHAT CAN GO WRONG?
If you forget to enter either or both of the file names, the
GROB2DRW, and DRW2GROB programs will halt and display a message
telling you the correct syntax of the command.
*Caution:* depending on how dense the picture is, the size of the
DRAW source file can mushroom to 40K-50K bytes. Be sure there's
room on the disk. There are no error traps for the event that
you're out of disk space. Will bad things happen? I don't know.
If you inadvertently use "Add Line," "Add Note," or "Add Arc" in
the DRAW48 program, the DRW2GROB program will list all such
commands on the screen with the warning "Not able to process the
above command." The rest of the file will be compiled to a GROB.
You can add lines, arcs, and notes on the HP48, after you move the
GROB file to the calculator.
LIMITATION: this first, alpha-test version of the GROB2DRW and
DRW2GROB programs work *only* with GROBS of 131 X 64 dimensions.
The workspace of the DRAW48 program accommodates GROBS of this
size.
DISCLAIMER
Please note that GROB2DRW and DRW2GROB are "fragile" programs.
That is, they will not stand up, well, to abusive treatment.
For example if you feed GROB2DRW something other than a real GROB
file, it will do its best to process the garbage and give you
garbage in return. It may even go bonkers and hang your computer
in a loop.
As such the programs are offered "as they are." There is no
guarantee that the programs will do exactly what you expect them
to. It is up to you to determine their useability. The FastAid
Co. cannot be held responsible for any incidental or actual loss
incurred while using the programs.
The source code was developed by Ed Keefe and compiled with Turbo
C 2.0 from Borland, International. The executable files were
compressed with the DIET file compression program.
Once again, this code is placed in the public domain. There are no
charges, no guarantees, and very little support.
Send any suggestions or refinements to Ed Keefe at CIS 73277,1064.
I'd really appreciate your insights. I plan to update the programs
only if there are any serious bugs that need correcting.
For more details about HP48 GROBS, I recommend HP 48 GRAPHICS by
Ray Depew, Grapevine Publ.