Subject: I was asked to post this
Organization: Tektronix TV Measurement Systems, Beaverton OR
Lines: 303
 
As the subjext line says, I was asked to post this by someone who is unable to
post to the net.  Please respond to him, not me.
 
-------------------------------------------------------------------------------
Date:    Fri, 15 Jun 90 17:04:18 EDT
>From:    Michael Woodhams <michael@astro.princeton.edu>
Subject: HP48sx
 
One solution that I have not yet seen mentioned is to save your
programs in "port 0" user memory. This is achieved simply by saving
the file to a name ":0:progname" and then assigning this name
(including the ":0:") to a key. The program is hidden, and accessable
from anywhere in the directory tree.
 
Secondly, I have found the following programs useful. This is my first
major programing project on the HP48sx, and I have since thought of
several ways of improving the program (primarily using the port 0
memory and saving the screen and heirarchical list in variables, and
secondly spliting the program into several subprograms.) However, I am
leaving to go on holiday tomorrow for a month, and I do not have time
to make the changes before I go.
 
If it is too difficult for you to repost these for some reason, send
me mail, and I will do it myself after my holiday.
 
Michael Woodhams.
 
michael@astro.princeton.edu
 
 
 
 
Below are listings of two programs for the HP-48SX. The second one
acts as a full-screen menu of physical constants and units. Running
the program turns the top 5 rows of the keyboard into menu keys, and
displays the menu items in the top part of the screen, leaving the
level 1 stack entry vissable. After a key press, this menu display
disappears, and if the key was from the top 5 rows, the appropriate
constant is put on the stack or a unit is applied in the normal
manner. (unshifted - multiply by the unit, right shift - divide by the
unit, left shift - convert level 1 entry to this unit.) I assign this
program to the 'CST' key and leave my calculator in user mode, but it
could be used in other ways. (Warning - whatever is on the graphics
screen is overwritten.)
 
I am an astrophysics student, and this is reflected in the choice of
units and constants in my menu. Other people will have different
preferences, so the first program is one that will create a program
like the second one, with your own choice of menu items. It first
prompts for labels for the menu display, and then for the commands to
be executed by each key. There is no error checking in creating the
display, so make sure your labels are short enough to fit in an
ordinary menu box. (Except for the enter key, which has a larger box.)
If you avoid wide characters like "M" and "W", this should be 5
characters per label. The command for each key is assumed to be either
a unit or a constant. For units, enter the standard abbreviation. For
constants, enter the constant. I think the program would work if you
entered a command instead of a constant, but I haven't tried it.
Finally, note that the program refers to the "+/-" key (to the right
of the enter key) as "5,3" because it seems more intuitive to me, and
because it simplifies the program logic. The calculator, however,
thinks this is key 5,2 because it is the second key in the 5th row.
 
I have not make allowance for shifted keys except for units. For just
a few keys, this could be done by editing the menu program and
inserting the desired commands in the hierarchical list. If you press
a shifted key for an ordinary command, or an alpha key for a unit
command, the program will crash with several new items on the stack.
These can be dropped, and the calculator will be back in its original state.
 
The programs are entered by hand, as I don't have the hardware
required to dump the program to computer electronically. There may be
typos. Anything following a "%" in the listing is a comment.
 
 
 
 
-- 
Bill McFadden    Tektronix, Inc.  P.O. Box 500  MS 58-639  Beaverton, OR  97077
bill@videovax.tv.tek.com,     {hplabs,uw-beaver,decvax}!tektronix!videovax!bill
Phone: (503) 627-6920       "The biggest difference between developing a missle
component and a toy is the 'cost constraint.'" -- John Anderson, Engineer, TI
 
 
