If you enjoy reading about the early days of electronic computing, let me recommend Stephen Levy's book called The Hackers, (published by Dell paperback). It's an easy and enjoyable book to read.
The Hackers chronicles the exploits of a group of MIT students during the 1960's and '70's. The students were best known for breaking into the school's Artificial Intelligence lab just so they could get their hands on the sole minicomputer.
Over the course of several months these students taught themselves how to program the machine just by "poking around" and seeing what would happen. Their work resulted in one of the first text editors, a primitive sketch-pad program and even a flight simulator.
One of the tenets of these "hackers" was that their programs, and everything they learned while writing the programs, should be given away freely.
The last of the MIT "midnight hackers", Richard Stallman, believed so strongly in this "free exchange of information" that he formed an organization called the Free Software Foundation (FSF).
One of the first projects of the FSF was to write a clone of the popular, but expensive, UNIX operating system and give it away. EMACS, a very popular text editor, is another FSF program (see page 25, this issue for more on FREYJA, an EMACS editor).
Anatomy of Some Free Software for the HP 95LX
Craig Finseth, the author of MEMUTIL and FREYJA, obviously subscribes to the tenets of the Free Software Foundation. Not only has he placed both of these fine programs in the public domain, but he has also provided all the source code for both programs.
What makes this unique is that both programs are System-Manager Compliant. They run on the 95LX and can task switch with any of the built-in applications.
Both programs are written in C and contain a gold-mine of information for developers of programs for the HP 95LX.
Beyond the comments in the code, Craig has provided extensive documentation for the MEMUTIL program. The documentation is contained in a file called ANATOMY.TXT which comes on the distribution disk for MEMUTIL and FREYJA .
The full title of the documentation file is "Anatomy of an Application: What HP Doesn't Tell You About Developing System Manager Compliant Applications for the HP 95LX."
The printed document takes 32 single-spaced pages and is jam-packed with interesting discoveries. For example, Craig has discovered that the System Manager video display routines are fairly fast. One should use them before trying to write directly to the video memory.
Craig explains such things as why there is a 64K limit placed on all data files and why there can only be eight active system-compliant programs at any one time. He also goes into great detail about how to handle keyboard input.
There are sections on how to put a message on the screen and wait for user input, how to construct a menu that looks like those in the built-in applications, and how to use the file picker routines.
Craig also discusses how to use the clipboard to transfer data between your system-compliant application and the built-in applications. Finally, he spends a good amount of time explaining the nature of "fixups" and a major bug in the 95LX. He provides several pages of work-arounds for this flaw.
Craig has included many code snippets to illustrate his ideas and, for this reason, the article IS not for beginners. You have to be fairly conversant with C programming and familiar with the System Manager routines for event-driven programming. Otherwise this article will leave you scratching your head and wondering where you are.
Who is the Article For?
The "Anatomy of an Application" document is one of the best examples of program documentation that I've ever seen. It will be most appreciated by registered Independent System Developers for the HP 95LX.
If you've ever tried your hand at writing a system-compliant program, or if you're thinking seriously of writing one, I'd urge you to get your own copy of this priceless document. When you do, print it out, along with the source code for MEMUTIL and FREYJA. Read it all and store it with your copy of the ISV Manual. You'll have more than enough programming tips, traps and techniques to become a full-fledged programmer of System-Manager compliant applications.
To Craig Finseth, I extend a very great thank you, on behalf of myself and 95LX programmers everywhere.