DOS read - small program for reading long texts on the HP200LX
Since I carry my HP200LX almost everywhere I go, I started to load it up
with all kinds of digital texts - RFC documents, e-texts, essays downloaded
from the net and converted from HTML to plain text. First I used vertical
reader to read them, but the short line lengths were not exactly to my liking.
Since I already had the C Compiler at hand I got busy. The result is a
program to read long texts on the HP200LX. It displays 23 lines of text
followed by a status bar containing:
Upon start, the file is read completely to determine page break positions
(one page == 23 lines) and build an in-memory index of them. Then the first
page is loaded and displayed. Operation is pretty straighforward:
- current file name,
- current position in file (page number and percent),
- list of hotkeys.
I find the subshell feature particularly useful, since I can just suspend the
read program, do something else and return later. When suspended, the program
uses around 65 KBytes of DOS memory. It uses the HP200LX graphics routines
for the display to get very fast screen operations (< 1 second for screen
refresh). The program easily deals with large files - I've read textfiles
up 1.5 MByte size with it, just the initial reading of the file (for
determining the page marks) takes a bit of time.
- the space bar and the + key advance one page,
- the b and - keys go one back back,
- the h and ? keys display a short help screen,
- the g key (mnemonic: "go") opens a menu to jump to a
given page number,
- the Ctrl-Z combination spawns a DOS subshell (stolen from
UNIX job control, where Ctrl-Z suspends the current process), so
you can do something else and return to your reading later by typing
exit on the freshly spawned DOS shell and
- the q key quits.
This software is distributed unter the terms of the
GNU General Public License.
Thanks to Gilles
the Palm Application Library which I used in this program (graphics routines,
parts of the user interface) to make things easier.
The download archive contains both the C source and the DOS executable.
- 2003-04-21, version 0.6, first public release,
- 2003-04-28, version 0.7, added GPL license clause
back to software index
Last modified 2003-04-28 by Alexander Schreiber