Rautenberg Logo

Headman

A powerful manager of the new HP49+ header.

This 2-page library makes it easy to use the new HP49+ header and to integrate it into the display for various environements. The commands are explained below, with examples if necessary. You have the choice between Headman7 and Headman9. Only difference: In the latter the commands FLASH and HDxy (also in Msgman) are replaced by programmable commands Ebook and Edocu. This document refers to Headman9. Store the library in any port and attach it as usual with a warmstart. Headman respects your flag setting. Tested in ROM 1.23. Only HP49G+ in RPN mode.

Version 9.2004  improving version 8.2004. + and - page forward and backward, resp. LCD2 and LCD2 renamed.  

Version 8.2004  named Headman8. Version 7.2004 remains in the package under the name Headman7.

Version 7.2004  READ command completely reprogrammed. Library smaller and text scrolling faster

Version 6.2004  READ command sets card browser with choice for book or technical document reading.

Version 5.2004  HDF replaced by the more general Disp which improves DISP for the 49+.

Version 4.2004  flashes current/total page number while reading with Ebook

Version 3.2004  Ebook and the description below improved. Bug in NoHD fixed.

Version 2.2004. Ebook errors for strings or objects whose string representation contains no linebreak.

FIRST version 1.2004 (made December 2003).


Here the description of the six Headman commands. Abbrevivations: RS = RigthShift, LS = LeftShift.

ViewP
(ViewPlus)
An algebraic object in full-screen displayView any object from level 1 using the entire screen. The screen-shot shows an example of an algebraic contained in Headman.zip under the name AlgExample. The arrow keys are scrolling if the object is too large fore one screen. RS and RS move to the begin and the end of the viewed object. RS and RS work similarly whenever the width of viewed object doesn't fit the screen. If the input is a nonempty list, the grob images of its elements will be glued together and you see the list elements in separate lines with no list delimiters. To view a list as it stands, first apply STR. For big objects, ViewP is obviously more handy than the standard VIEW. To leave ViewP press CANCEL. Nice extra feature: The SPC key makes more space for your eyes. It toggles current font with minifont without leaving the viewer. An algebraic object is cycled through with SPC in 4 different views. The same when viewing global names.
NoHD
(No header)
The last 10 messages from library 1Uses the entire screen for stack display, in all possible fonts including minifont. In the latter case or in FONT6 NoHD displays12 stack levels. The screen shows the last 10 messages from the internal library 1 in FONT7 in which 10 levels are visible. NoHD displays level 1 as a single line, independently on the current setting of the multiline flag -52. To return to multiline display of the level 1 object, simply press CANCEL which returns also the normal header.
HD
(Get Header)
Get current header grob which is of size 131×16. Reading it in with HD may not be the true header since you may have changed meanwhile HEX to DEC, for instance.
HD
(to Header)
Set a grob (normally of size 131×16 ) as the current header and freezes it. If the input grob is too large/small it is displayed only partially or uses the header only partially.
SCR
(get screen)
Was LCD2 in earlier versions. Get entire screen grob (131×80) to stack, not only the part below the header. Only this part is recalled with LCD from the GROB menu.
SCR
(set Screen)
Was LCD2 in earlier versions. Set grob from stack (normally of size 131×80) as current screen and freeze it. Behaves like HD if the input grob is too small/large. For hight <16  the area below the header is blanked.
Example: « "" 1  GROB LCD  »  clears the entire screen temporarily. This may still simpler be programmed as  « ""  ViewP  ».
READ
(card browser
for reading books
or technical docs)

set card browser with a one-page menu as shown in the screen capture. If no card is inserted, READ scans HOME. Menu options in upper case are well known from the filer. Some additonal options are on hard keys as in the filer.card browser for reading with Ebook or Edocu For instance, enters a selected subdirectory and goes UPDIR (mostly to the TREE). Since READ sets a one-page menu, NXT just toggles the browser look. T (= COS) does type sorting and may sometimes be useful. For other hard keys consult a filer documentation. The most interesting menu options are Ebook and Edocu for reading books or documents and described in detail below. Inside the browser they work only on a scanned text file (string) which may be BZ-compressed. Both options choose the scanned object as an argument and will error if no text file is scanned. They also error on a BZ-string not decompressing to a normal string. Both interpret the first line of the argument string as the title, the rest is cut into pages. Normally these are read in minifont. Long text files are usually made on a PC and directly saved on the card. How to compress them on the PC or on the 49+ is explained in Docreader.htm. Basically, you may also read documents in HOME or elswhere by navigating there from the card browser via the TREE. While reading, CANCEL always returns to the brower which is left with another CANCEL.

Ebook
(book reader)
Expects a string which should be a long flowing text. It breaks the lines properly to match the screen width like a HTML reader. First a page-selector is launched for choosing a start page. By pressing the CHOOSE option or browsing with the +/- key or the numeric keys any page can be selected. Confirm with OK or ENTER  Paging is done with + (forward) and - (backward). The page number to be set and the total page number are briefly flashed. + and - are repeaters. If longer hold you're leafing through several pages, maybe to the first or last page. One always returns to the page selector with ENTER which toggles current page with page number. Important: the SPC key is a magnifying-glass as in ViewP. It swaps minifont (default) with larger font. When starting Ebook, the text is cut for minifont. Hence, use the arrow keys and its right-shifttings for scrolling the current page if reading in larger font. Headman.zip contains the example Headman.exp. Simply load and execute it. This creates the dicrectory DOCS on the card (if not already present) containing essentially this document under the name Headman.txt. The screen at left shows the page selector, at right you see the last page of Headman.txt.
The Page selector Last page of Headman.txt
Edocu
(document reader)
 
Like Ebook but preserves the original text format (more precisely, breaks lines only after 80 characters). Suitable for technical documents containing charts or formulas too broad to fit the screen width. In Edocu use and for scrolling sideways like in ViewP whenever a text contains lines with more than 32 characters. The example Headman.txt should be read with Ebook but you may read it also with Edocu to see how long the lines are in reality. Clearly, the text may be read also in larger font by pressing SPC. But then you have to use also and or its right-shiftings for reading a page completely.
Disp
(improve DISP)
Line display for the 49+. Display any object (level 2) in current font in line n (level 1). Important: n=1 or n=2 displays in the header (impossible with standard commands), n=3 in the first row below the header, etc. If the input object is a 2-line string, also the next line is used. The highest n in FONT7 is n=10 (display in level 1). Should be used in connection with FREEZE or WAIT. Special feature: n = -1 displays in the menu row.
Example. « -56 DUP IF FS? THEN CF "BEEP" ELSE SF "SILENT" END -1 Disp 1 WAIT » toggles the BEEP flag and flashes current state in the menu area. If -1 is replaced by 1, flashing takes place in the header. This may shorter be written as   « -56 DUP IF FS? THEN CF "BEEP" ELSE "SILENT" END FLASH »
CDown
(Count down)
Do garbage collection and display count-down numbers 9 ... 0 in steps of 1 second to announce a turn-off whenever the calculator is idle. The count-down can be aborted with any key. No input or output. We propose to store CDown in STARTOFF, a reserved variable which runs each time when the calculator turns off, either by itself after 5 minutes or after the time coded in the reserved variable TOFF (a good time is 40 seconds which means # 50000h in TOFF). The advantage is avoidance of spontaneous garbage collection in subsequent applications.
Attention:
count-down is skipped in edit mode because programming usually demands more time.
StErr
(Start Error)
If you store the command StErr in the reserved variable STARTERR you've got some alternative error out (for a silent error out see Msgman). Outside STARTERR StErr needs an argument. A string will be displayed. If the argument is a number (zint, real or binary) the corresponding message is displayed in the new header together with the warning symbol.

Credits. Headman was entirely programmed on the HP49+ itself with Emacs, Nosy, Keyman and OT49. Thanks to Jurjen Bos, Carsten Dominik, Peter Geelhoed and Eduardo Kalinowski for their tools, and Mika Heiskanen for his wunderful BZ.


Jorge Cevallos M.
Wolfgang Rautenberg  †