PMS2HP48 Documentation
----------------------

Mar. 17, 1990

Clint Hastings
Salt Lake City, UT


In  no  event  will  I be liable to you for any damages, including any lost
profits, lost savings, or other incidental or consequential damages arising
out  of  your use or inability to use this program.  PrintMaster, PrintShop
and Turbo Pascal are copyrights of their respective companies.

I hope that you will enjoy using this program.

Thank you.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




                                PMS 2 HP 48
                                ~~~~~~~~~~~

PMS2HP48 is a conversion program that works with printmaster and printshop
graphics.   Those  graphics  are  available  with  their programs, are sold
separately,  and  are  also  available  on  bulletin boards and from public
domain  software  companies.  There are probably tens of thousands of these
graphics  out there, and being 88 x 52 pixels big, they fill a good portion
of the HP-48's screen.

The files included are:

        PMS2HP48.TXT    Documentation (this file)
        PMS2HP48.PAS    Turbo Pascal source code for those with compilers

I have included the source code so that you may modify it FOR YOUR OWN USE.
This  program is copyrighted, so please do not distribute any modified code
without checking with me first.

To  run  this program, you will need an IBM compatible computer.  It may or
may  not work with any other MS-DOS machines.  It is known to work with the
Commodore  Amiga  running  the  Transformer  MS-DOS emulation software, and
should work with the Macintosh and Atari ST running their MS-DOS emulators.
You will need at least 256k of free memory if you want the graphic pictures
loaded  into  memory  (normal),  otherwise  even  64k  should suffice.  The
program  is  intended for a CGA video adapter or any card that emulates CGA
(most  EGA and VGA).  If you have a Hercules or a non-graphic video adapter
(or  an  MS-DOS  emulator which does not do graphics), you will need to use
the  No Picture mode (-NP).

                                   Usage
                                   ~~~~~
You  run  the program by moving to the program directory using the DOS 'cd'
command  and  typing  PMS2HP48.   This  is  the simplest way.  Defaults are
supplied  for  everything.   Each  input line gives you a default string or
number  that will be used if you simply hit return.  Some of the lines have
extra  input  features.  Shown at the bottom of the screen is a line or two
indicating what you need to type.

        Graphic file ? B:_____________________

This  input  line  comes up with the default "B:" if you are in the default
"Dir  Mode"  (directory  mode).   Hitting return will scan the directory on
disk  B:,  and  put  the first valid filename, if any, in the input string.
Then you can scan through the list of filenames using the up and down arrow
keys.   When  the one you want is displayed, hit return.  If your files are
in  another  directory, enter the drive and/or path, ending with a colon(:)
or  backslash  (\) respectively and the program will search that directory.
If  you  want  to  bypass  the  directory  search, you can always enter the
filename  directly  and  hit  return.   The  program  automatically selects
printshop  or  printmaster  mode  depending  upon  the file suffix (.DAT or
.SHP).


        Starting graphic number to print ? __0

This input line is expecting a number and comes up with the number zero for
default.   Also,  the  picture is displayed to the right of the input line,
with  the title underneath.  You can use the up and down arrow keys to scan
through  all  the pictures in the file.  Or you can enter a number directly
and  hit return.  To get to a specific picture quickly, you can type in the
number, but don't hit return - hit an up or down arrow key and you can scan
around through the graphics from that point.

IMPORTANT NOTE:

The  converted  graphic  is  saved  in  the  directory you were in when you
invoked  the  program.  The name under which it is saved is the same as the
name  of  the  graphic in the file, up to 8 characters, followed by ".G48".
For  instance,  if  the  graphic is entitled "Stocking", the converted file
will  be  called  "STOCKING.G48".   This  converted  file  is  meant  to be
downloaded  to  the  HP-48SX using the serial cable and Kermit protocol.  I
use  a  translation code of 2 in the HP-48's I/O setup menu.  What you will
have  is  a  -program-  that when executed leaves the graphic object on the
stack.   Erase  the HP-48 graphic screen if needed using the ERASE command,
then  show  the screen using GRAPH.  Position the cursor where you want the
upper  left  hand corner of the picture and press REPL, which will take the
graphic  off the stack and let you see it.  The graphic size will always be
88  x  52,  with  each  graphic  taking  607.5  bytes of memory.  Don't run
yourself out of memory.


        Convert more labels (y/n) ? N

'Yes'  lets  you  convert more labels from the same graphic file.  You must
quit  the  program  and  restart  it to convert labels from different file.
This  is  done  to  avoid  any problems with dynamic memory allocation when
loading the graphic file into RAM.


                           Command Line Options
                           ~~~~~~~~~~~~~~~~~~~~
You  can  change  some of the defaults through use of command line options.
For  example,  you  would invoke the program using "PMS2HP48 ?" to read the
online  help screen.  These options may be in upper or lower case.  You may
use  several  options,  but separate them from each other with a space.  If
you  are  using the same options all the time, I would suggest putting them
in  the  CONFIG.PMS  configuration  file.   This file contains command line
options,  each  on  a separate line, with END as the last line.  As you can
use  both,  a command line option will override one in the CONFIG.PMS file.

Here is a complete list of the options:

        ?       Displays the list of command line options and halts.

        -NP     No picture mode.  If you have a text-only video card, or
                your  MS-DOS  emulator  just won't do graphics, use this
                option.  The only difference is that the pictures  won't
                be shown on the screen.

        -NR     No RAM mode.  Normally the entire graphic file is loaded
                into RAM.  This  requires  approximately 100k bytes.  If
                you are short on memory for any reason, this option will
                read the  pictures as needed from the disk,  saving your
                memory for something else.

        -ND     No directory mode.  This will disable the directory scan
                in the graphic  file input line.   You will then have to
                type the file name in yourself.  There is a limit of 100
                directory entries in the program.

        -DG     Default graphic directory.  Sets the default directory to
                be used in the graphic file searches. Example: -DGa:

        -PS     Printshop only mode.  Normally the file requester  looks
                for both  printshop and printmaster graphic files.  This
                will force the program to look only for PrintShop files.

        -PM     Printmaster only mode.  Works like -PS,  but looks  only
                for printmaster files.

        -I      Inverse mode.  Prints (and  displays on the  screen) the
                picture with white and blacked dots swapped.  Not really
                common,  but  there  if you should need it.

        -NV     No Video Reset mode.  Normally  the  program  will reset
                the video mode when  finished.  If this doesn't function
                correctly on your system for any reason, this option
                will disable it.

                                 Problems?
                                 ~~~~~~~~~
This  program is written in Turbo Pascal version 3.0.  I will mention a few
error codes here that you may possibly encounter.

When  reading  the graphic picture file into RAM, the memory is dynamically
allocated.  This means that you might run out of memory if you're using too
much  memory  for  something else (TSR resident programs, RAM disks, etc.).
For this, Turbo Pascal gives a run-time error of 'FF' (Hex for 255).

Other possible errors:

      I/O 01   File does not exist.
          02   File not open for input.
          04   File not open.
          91   Seek beyond end of file.
          99   Unexpected end of file.

  Runtime 01   Floating point overflow.
          02   Division by zero.
          10   String length error.
          11   Invalid string index.
          90   Array index out of range.
          FF   Memory overflow


