HP+.DOC ------- Documentation for HP+.COM Version 1.0 (c) Eric Meyer 9/84 Did you ever wonder what A00h/32 was, while editing source code? HP+.COM is a special version of my programmer's calculator program HP.COM, which allows the calculator to remain installed in RAM, always available for use, even within another program! The plain calculator program HP.COM will run on any CP/M 2 or 3 system. It operates much like a Hewlett-Packard RPN calculator, but has four display modes (bases). See HP.DOC for instructions on how to use the calculator. This file describes only the peculiar features of the RAM-based version, HP+. HP+.COM will ONLY work under CP/M Plus (3). When installed, it occupies 2.5K of RAM just under the BDOS. Do not install it more than once, or more RAM will be wasted. It can be called up for use at any time, until you do a cold boot (reset). It has "continuous memory" - if you exit and return to HP+, the stack and memories will remain unchanged. If you no longer need HP+ and wish to recover the memory it occupies, it can be removed from RAM. TO INSTALL THE CALCULATOR: A>HP+ TO REMOVE THE CALCULATOR: A>HP+ OFF TO USE THE CALCULATOR: Type control-caret (^^). (Note: if nothing happens immediately, follow the ^^ with RETURN.) The HP+ calculator should then appear on the line where your cursor was. Use the calculator according to the instructions in HP.DOC. When you're done, type a ^C to exit HP+. When you exit, HP+ returns you to EXACTLY where you were in the program you were running, which is still expecting input from you. The HP+ numeric display remains on your screen, but your program doesn't know that, so it doesn't matter. In an ordinary text editor, for example, it will be replaced by the text that's "really" there as soon as you start moving the cursor around. USING HP+ WITH UNUSUAL SOFTWARE HP+ will work as advertised above either from the CP/M "A>" prompt, or from within any program that does ordinary output to the screen, and ordinary input through a BDOS call (including BIOS calls through BDOS 50). HP+ may operate unexpectedly in programs that use memory-mapped video. For example, using HP+ from within the VDO-EX text editor on my Osborne Executive, the calculator appears at the bottom of the screen regardless of "cursor" position; and upon leaving HP+, that line may there- after appear in underlined video mode. However, these cosmetic differences do not interfere with use of the calculator, or normal editing. The only real problem is that HP+ will simply NOT work from programs that do input through direct BIOS calls. Now, there is NO excuse for software intended to be used under CP/M Plus to be written this way, but someone may have been sloppy. (My bundled Wordstar had this problem.) You may also be using software originally intended for CP/M 2. In any case, if you have some assembly language skills, you may be able to patch the offending program to work with HP+. You must replace any direct BIOS CONIN calls with a jump to a patch that sets up a BDOS 6 direct input call. Your program's operation should remain the same, but HP+ will now work in it. For example, here is the patch I had to install in my Wordstar 3.3. It has a routine 16DE that does direct BIOS calls by fetching the WMBOOT address from Page Zero. I found this by searching for LHLD 0001, which occurred at 1D75, followed by CALL 1777, MOV A,C, PCHL. When this is called for input, there is a 6 in A, which the subroutine at 1777 adds to WMBOOT, giving CONIN. So I changed CALL 1777 to CALL 02EB (a location in the MORPAT patch area), and at 02EB I put the following code: CPI 6, JNZ 1777, POP H, MVI C,6, MVI E,FD, JMP 0005. Thus the other BIOS calls continue undisturbed, but the jump to CONIN is replaced by one to BDOS 6. Afterwards, HP+ functioned perfectly from within Wordstar.