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 Headman8. Only difference: In the latter the commands FLASH and HDxy (also in Msgman) are replaced by Ebook and Edocu, making these programmable commands. Store the library in any port and attach it as usual with a warmstart. Headman commands respect your flag setting. Tested in ROM 1.23. Only HP49G+ in RPN mode.
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)View any input object 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 to be viewed on one screen. RS and RS move to the begin and the end of the viewed object. RS and RS are working 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 NXT key toggles the current font with minifont without leaving the viewer. An algebraic object is cycled through with NXT in 4 different views. NoHD
(No header)Uses 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 this 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 131x16. Reading it in with HD may not be the true header since you may have changed HEX to DEC, for instance. HD
(to Header)Set any grob (normally of size 131x16 ) as the current header and freezes it. If the input grob is too large/small it is displayed only partially or the header is used only partially. LCD2
(get screen)Get entire screen grob (131x80), not only the part below the header which is recalled with LCD from the GROB menu as usual. LCD2
(to Screen)Set 131x80 grob from level 1 as current screen and freeze it. Behaves similar to 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. Menu options in upper case are well known from the filer. Some additonal options are on hard keys as in the filer. For instance, enters a selected subdirectory and goes UPDIR (mostly to the TREE). NXT just toggles the browser look since there is one menu page only. T (= COS) does type sorting and may sometimes be useful. For other hard keys consult the filer documentation. The most interesting menu options are Ebook and Edocu for reading books or documents. Both work on a text file (string) only which may also be BZ-compressed. Long text files are usually made on the 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 in standard ports by navigating there from the card browser by using the TREE.
Ebook is designed for long flowing text. It breaks the lines properly to match the screen width like a HTML reader. Edocu respects 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. Both options interpret the first line of a scanned string file as the title, the rest is divided into pages to be read in minifont. First a page-selector is launched for choosing any available page. By pressing the CHOOSE option or browsing with the +/- key any page can be selected. Also numeric keys may be used for page selection. While paging the text with and , one may always return to the page selector with (backspace), whereas key P (SYMB) flashes the current/total page number while reading. Note that that RS and RS set the last and first page, resp. And the NXT key works as a magnifying-glass: NXT swaps minifont display of the current page with display in bigger fonts.
In Edocu also and and its right-shiftings are active for scrolling sideways like in ViewP whenever a text contains lines with more than 32 characters. In all cases, CANCEL returns to the brower which is left with another CANCEL. The package contains an 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..It should be read with Ebook but you may read it also with Edocu to see how long the lines are in reality. The screen at left shows the page selector, at right you see the last page of Headman.txt.
Note: Ebook or Edocu may error with "Insufficient Memory" if the input string is too large. Try again after clearing LastStack and LastArg in the MODES/MISC menu.
FLASH Make string from input (if not already a string) and flash it as a message about 1.5_s. This command (also in Msgman) and HDxy below have been replaced by Ebook and Edocu in Headman8 which run as described under READ but take an argument from the stack. Disp
(improve DISP)Line display for the 49+. Display object (level 2) in current font in line n (level 1). n=1 or n=2 displays in the header, 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 which displays in level 1. Should be used in connection with FREEZE or WAIT. Special feature: n = -1 displays the object 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 » HDxy (Header
display at (x,y)Display & freeze an object at position (x,y) in the header in minifont. (0,0) is the upper left header corner. Input: level 3: Any object, level 2: zint/real x, level 1: zint/real y. You'll see something from the input in the header only if x<131 and y<16.
Example. We create a language toggler similar to that of OT49 which cycles through the languages and displays the actually choosen language in the new header. The following program realizes this:
« "español" "français" "english" LANGUAGE 1. + 3. MOD DUP LANGUAGE 1. + ROLL 95. 1. HDxy DROP2 »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 needs more time. StErr
(Start Error)If you store the command StErr in the reserved variable STARTERR you've got some alternative error out. Outside 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. jorgecevallos@hotmail.com
Wolfgang Rautenberg - raut@math.fu-berlin.de