HP's Palmtop Home Page
Most Web pages about writing software for the HP DOS Palmtops deal mainly with the use of the Palmtop Applications Library. PAL is a great way to write Palmtop software, but for those of us who actually want (or need) System Manager-compliant applications, it's not quite the same. There are, however, a few available examples and resources on System Manager-compliant Palmtop programming.
The key resource for anyone seriously interested in System Manager programming is the HP 100LX/200LX Developer's Guide. This is available from Thaddeus Computing, publisher of the HP Palmtop Paper: you can obtain it in the original hardcopy form, with accompanying floppy disk, or on CD as part of the Palmtop Paper Infobase along with the accompanying software. The Guide is a (pretty) complete source of information on the Palmtop's hardware and software, including the various System Manager built-in functions and the interface functions developed by Lotus for the Palmtop, and you should never write Palmtop software without it. The accompanying software includes various tools developed by HP and Lotus to assemble, compile, and test EXM (System Manager-compliant) programs on a PC, and to convert EXE files to EXM files for execution on the Palmtop itself, as well as one complete sample application (HEXCALC, the hexadecimal calculator that is included on D: drive in the English version of the 200LX). More about these below.
Other resources available on the Web include:
Since the Palmtop is essentially a pocket-size IBM PC/XT, any DOS application program will run on a Palmtop. This includes any compiler that will fit in 640K or less of main memory. It is possible to develop Palmtop apps on a Palmtop... but it's probably a bit inconvenient.
In the Developer's Guide, HP suggests using Microsoft C, version 6.0, for Palmtop C development (and MASM 6.0 for assembler program development). Finding a copy of Microsoft C 6.0 may be a little difficult, though.
However, some versions of Microsoft C beyond 6.0 will work, and there are easy and cheap ways to acquire them. Example: a while back Microsoft published a book titled Learn Visual C++ Now. It can still be found as a remainder in some bookstores. The included CD-ROM contains a copy of Visual C++ 1.0, which in turn contains a (full, working) copy of C 8.0. I have also seen Visual C++ 1.0 included in other publications, including (I'm really dating myself here) a Game Programming Starter Kit published by Sams a few years ago. You can write Palmtop apps in C++ (although I've never tried). The important thing, though, is that you can use the C 8.0 compiler to "make" Palmtop programs. In fact, that is precisely how I do it; I point the HP skeleton app makefile to the C 8.0 compiler, and let nmake do the rest. Note that later versions of Microsoft C will not compile code for anything less advanced than a Pentium and thus won't work for Palmtop programming. An example of an unsuitable compiler is version 11.0, which underlies Visual C++ 5.0.
For those of you who prefer the Turbo C environment for writing and debugging C programs (I usually do myself -- I use the Microsoft route mainly because alternatives weren't available when I started writing Palmtop apps), NKIT (mentioned above) allows you to compile, link, and make EXM versions of C programs. The details, and the modified header, library, and startup files are in the kit with the sample programs. (NKIT also has provision for using LSI C-86, a C compiler available in a freeware trial version in Japan.) I have also heard reports of people using MIX Software's Power C compiler for Palmtop development: I have used, and like, the compiler, but I have not had any experience with it in Palmtop development.
Any standard DOS application can be run on a Palmtop without modification. It must run in 640K or less of RAM, of course (less if that's where your Palmtop's working RAM is set), but most DOS apps -- including many of the compilers mentioned above -- were written to do just that.
The converse isn't quite true. Since System-Manager compliant programs need to access System Manager services (including System Manager versions of normal DOS calls), you have to arrange for the service routines to be present. Also, the Palmtop display is a non-standard CGA display, and requires special access routines which are also lacking in normal DOS.
HP provides, both in the Developer's Kit and in the Connectivity Pack, two tools to overcome these deficiencies in your desktop PC. The first is TKERNEL.EXE, which is a TSR program that serves INT 7E and 7F as the System Manager does in the Palmtop. The second is CG.COM (a second version, CGAGRAPH.COM, is included in the Developer's Kit), which provides the graphic interface.
There are two ways to invoke these tools and run a Palmtop app in DOS.
One is to use the Connectivity Pack Application Manager, which also uses
TKERNEL and CG: just add your program to the App Manager
application menu, and run it from there. The other is to use the tools
directly:
TKERNEL
CG (or CGAGRAPH)
<your program> (or CV <your program> if
you're using CodeView)
CG (to unload the graphic drivers)
The Connectivity Pack also includes a program called UN200 which
unloads TKERNEL. If you look at APP200.BAT (the batch
file that invokes the App Manager) you will see how the tools interact.
You may want to rewrite this batch file to allow you to run a Palmtop
program directly from C:>.
Unfortunately, you can't just move an EXE file to the Palmtop and run it under System Manager. On the Palmtop, under System Manager, System Manager itself does the program loading, and it looks for indicators that the program is indeed System-Manager compliant. The executables have the extension EXM, and are rather different from normal EXE executables. In particular:
HP provides a tool called E2M.EXE which converts an EXE file to EXM format, using information in the compiler-generated MAP file. (The need for the MAP file, which contains information on where the code segment ends and the data segment begins, is one reason that early attempts at Turbo C app development were difficult: the MAP file available from Turbo C is not in the same format as the Microsoft MAP file, and E2M couldn't read the segment information. NKIT contains versions of E2M that work with the Turbo and LSI compilers and their MAP files.) Once the EXM file is created, it can be transferred to a Palmtop and run like any other Palmtop app (you can't directly run an EXM on a desktop PC, even with TKERNEL and CG, although I have heard rumours of recent, successful experiments with doing so).
In Part II I'll talk about how a System-Manager compliant application is structured.
This HP Palmtop Ring Site is owned by Vinay N. Reddy, M.D. Visit The Webring.
[ Next | Skip Next | Next 5 | Previous | Previous 2 ]