Palmtop News Reader
(c) Michael J. Leaver, January 1997
mickyj@pacific.net.sg


This file explains the source code for PNR, and makes excuses for the
bad programming! :)

I started PNR some time ago. Originally it was an update to the Tiny News
Reader which was an MS-DOS based text program. It was desinged to be as
small as possible, and run on any capable computer, with as little memory as
possible.

PNR has a different goal. It is for HPx00LX palmtops, which means it has to
be system manager compliant and look like the ROM based applications. To
achieve the look & feel I used the excellent PAL libraries. The harder part
was to make it both a PAL program & system manager compliant. At the time I
did not have the developer kit (do now!) or any documentation to do this.
To get around that problem I used the source code for the Freeyja (sp?)
editor, which is a HP-95LX sysmgr compliant editor.

That's right...PNR uses HP95 sysmgr calls, and unbelievably it still works
on HPx00LX palmtops (but not on HP95's :). I was going to update it to use
the correct calls, but why fix something thats not broken?

Also, it doesn't use the memory management routines provided by sysmgr.
It should, but it doesn't. Again, it works anyway.

Another thing to note is that PAL is being used. PAL is not sysmgr compliant,
nor is it meant to be. Still works though!

The biggest problem with sysmgr programs is that they *MUST* be compiled
in the small memory model. This puts a limit of 64K on the executable size,
and a 64K limit on the memory the program can allocate. PAL takes up a
fair amount of that 64K. If the proper look & feel routines were used,
a lot less memory would be used.

It's this memory barrier that causes lots of problems and is the reason why
PNR is not anywhere near as functional as it could be. But its also my
excuse for the bad programming (got to fit it into 64K!).

So basically, if you are looking for a good programming example on how to
write good sysmgr compliant code, look elsewhere!

To stuff keyboard scan codes into the keyboard buffer, so as to start
built-in applications (i.e. memo), I copied a section of assembly code
from 'keystuff'.

Oy you
------

Anyway, I'm releasing this as-is. Probably a mess, but I'm sure you can
sort it out. Hope it helps you.

If you update PNR please tell me so I can release another improved
version. Please, for everyones benefit, send updates to me so that a
central repository of updates can be kept. Don't want millions of
different version floating around! :)

Legal stuff
-----------

I'm releasing this software in the hope that it could actually be of
benefit to some people. To cover my ass, I retain copyright on all source
and documentation written by me. You are free to use any of the source
code as long as the resulting program is not a commercial or shareware
program. It must be freeware. Could mention my name if you wish in any
freeware software produced :)

Compiling
---------

PNR uses PAL v1.6 and compiled using Turbo-C V2 and Turbo-Assembler.
Look at the MAKEFILE and change as appropriate. If you have it right, it
will compile without errors.

You must compile PNRTI and other stuff seperately. REMEMBER, COMPILE PNR
AS A .EXE, THEN COMPILE PNRTI. IT DEPENDS ON SOME .OBJ FILES FROM PNR!

Where to find things
--------------------

Note that all the programs, source, and libraries mentioned above can be
found somewhere at ftp://eddie.mit.edu/pub/hp95lx

Thanks to
---------

PNR was written by looking at & using some code from:

  Freyja text editor, by Craig A. Finseth (April 1991)
  Keystuff V1.0, by Craig Payne (Oct. 14, 1993)

Thanks also to the PAL team and everyone who uses PNR.

