Post Reply 
HP 28S - Custom Menu
03-23-2019, 02:56 AM
Post: #1
HP 28S - Custom Menu
I'd like to add several simple functions such as 1/x, y^x, and sqrt to the Custom menu to keep from having to hit the second function button every time I use these.

Can someone point me to an example of how to do this quickly? Much appreciated.

Brad
Find all posts by this user
Quote this message in a reply
03-23-2019, 01:19 PM (This post was last modified: 03-24-2019 06:35 AM by Giuseppe Donnini.)
Post: #2
RE: HP 28S - Custom Menu
It's actually very straightforward:

1. Build a list with the commands/functions/variables you want.
2. Execute MENU (it's in the MEMORY menu, but on an HP-28 you might as well type it in).

To implement your example, the actual keystrokes would be:

1. {
2. α   (to deactivate immediate-execution mode)
3. SHIFT + 1/x
4. SHIFT + ^
5. SHIFT + √
6. ENTER
7. SHIFT + MEMORY
8. [MENU]
Find all posts by this user
Quote this message in a reply
03-23-2019, 02:05 PM
Post: #3
RE: HP 28S - Custom Menu
Giuseppe,

Thank you very much for posting such a clear step-by-step process. It worked perfectly!

I have had my 28S since 1990 and really like most aspects of it. I abandoned using it 10-15 years ago because I got tired of pressing shift for all those basic functions. I've been using a 32S for a while because almost all of my essential functions are first functions. I've never gotten used to not being able to see multiple lines of the stack.

This should re-invigorate my 28S!

Brad
Find all posts by this user
Quote this message in a reply
03-24-2019, 06:28 AM (This post was last modified: 04-24-2019 02:08 PM by Giuseppe Donnini.)
Post: #4
RE: HP 28S - Custom Menu
Enjoy your HP-28S, it is a very fine and beautiful calculator!

If you use CUSTOM menus a lot, here are a few tips:
  1. Store your custom menu in a variable before executing MENU, i.e. instead of:

    { A B C D E F ... } MENU

    do:

    { A B C D E F ... } DUP 'CST1' STO MENU

    This doesn't take any extra memory (except for the variable name), and the benefits are multiple:
     
    • You can retrieve your menu after a warmstart, which clears CUSTOM menu memory, but not USER memory.
       
    • You can retrieve your menu after running a program which happens to use the MENU command with a list
      argument, overwriting CUSTOM menu memory in the process.
       
    • You can modify the menu at any moment without having to rebuild it from scratch.
       
    • You can use several custom menus and easily change between them. In that case, you may want to store
      them as self-executing programs (at a slightly higher price of memory) so that they can be activated
      with a single key stroke from the USER menu, i.e. instead of:

      { A1 B1 C1 D1 E1 F1 ... } 'CST1' STO
      { A2 B2 C2 D2 E2 F2 ... } 'CST2' STO etc.

      do:

      << { A1 B1 C1 D1 E1 F1 ... } MENU >> 'CST1' STO
      << { A2 B2 C2 D2 E2 F2 ... } MENU >> 'CST2' STO etc.

      This opens up the possibility to have CUSTOM menus call each other, by including
      an appropriate entry in the definition of each menu, e.g.:

      << { CST2 A B C D E ... } MENU >> 'CST1' STO
      << { CST1 X Y Z T W ... } MENU >> 'CST2' STO
      CST1


      will store and activate the first menu (CST1) as the current CUSTOM menu;
      then, pressing CST2 within that same menu will activate the second CUSTOM menu.
      To go back to the first one, just press CST1.

      (Just to be clear: There's no limitation in the number of keys you can assign to a menu,
      but it may be preferable to have different sets of menus, rather than having to cycle
      through many pages of the same menu.)
     
  2. Normal menus could be described as "output" menus: you press a key in order to get an "answer",
    or to "recall" a variable. But sometimes, you want the reverse: pressing a key to "store" something
    in a variable, like in the SOLVR menu.

    Accordingly, the MENU command also allows you to build CUSTOM "input" menus. This is done by including
    the STO command in the list as its very first element (STO will not be visible in the menu, it just tells
    the HP-28S to create an "input" menu). E.g.

    { STO A B C D E F ... } MENU

    will create a SOLVR-like menu with inverse labels (black on white), where you can easily
    input your data in any order you like, simply by putting the values on the stack and pressing
    the corresponding variable keys.

    However, it is not possible to mix "input" and "output" keys in the same CUSTOM menu.
    Also note that, for the same reason, an "input" menu may not contain keys which activate
    another menu.
     
  3. CUSTOM has menu number 19. So, if you want to display the current CUSTOM menu in a program, use:

    << ... 19 MENU ... >>
Find all posts by this user
Quote this message in a reply
03-24-2019, 04:49 PM
Post: #5
RE: HP 28S - Custom Menu
thank you Giuseppe, I will find that useful too.

I thought I more or less understood custom menus from my 50g, but it seemed a little different on my 28S, which I'm just starting to play with.

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot/C47
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
03-24-2019, 07:00 PM
Post: #6
RE: HP 28S - Custom Menu
Thanks again. Very useful!
Find all posts by this user
Quote this message in a reply
03-25-2019, 07:14 AM
Post: #7
RE: HP 28S - Custom Menu
(03-24-2019 06:28 AM)Giuseppe Donnini Wrote:  { STO A B C D E F ... } MENU

will create a SOLVR-like menu with inverse labels (black on white), where you can easily
input your data in any order you like, simply by putting the values on the stack and pressing
the corresponding variable keys.
:O
does it work even on 48/50 series?

Hardware: Hp48S - Hp50g (5x black + 1 blue) - HP39gII - Hp27s - Casio fx-CG50
Find all posts by this user
Quote this message in a reply
03-25-2019, 10:05 AM (This post was last modified: 03-25-2019 10:10 AM by Giuseppe Donnini.)
Post: #8
RE: HP 28S - Custom Menu
Yes and no.

No, on the HP-48 you can't just use STO as the first element of a list to get an "input" menu.

But the good news is that you don't need to! Since the HP-48 has two shift keys,
the whole menu system was extented so that, for variable names, any normal
CST menu now provides both "output" and "input" capabilities (like the VAR menu itself):

(NO SHIFT)    [Name] -->  Executes the contents of the variable named "Name".
LEFT SHIFT  + [Name] -->  Stores the object on stack level 1 in the variable named "Name".
RIGHT SHIFT + [Name] -->  Recalls the contents of the variable named "Name" to stack level 1.

Or did you mean the inverse labels? These are possible, too, but the technique is entirely different.
In the 48 the user is given the option to handle key labels and key actions completely separately,
and the key actions themselves may be specified differently for each key plane (unshifted, left-shifted,
right-shifted). In other words, the custom menu system in the 48 is orders of magnitude more advanced
than its ancestor in the 28S. Just to give you an idea of its capability: you can even display a running
clock in a menu key! But this additional power naturally comes at the price of greater complexity.

So, to get inverse labels in User RPL, you would have to define your CST menu in the following way:

{
 {
  GROB 21 8 ... @ MENU KEY 1 Label Object
  A             @ MENU KEY 1 Action Object
 }
 {
  GROB 21 8 ... @ MENU KEY 2 Label Object
  B             @ MENU KEY 2 Action Object
 }
 {
  GROB 21 8 ... @ MENU KEY 3 Label Object
  C             @ MENU KEY 3 Action Object
 }

 ...

}


where GROB 21 8 ... is a 21 pixels wide by 8 pixels high graphics object depicting the inverse label.
The problem is that you have to provide that GROB yourself.

In System RPL, on the other hand, the task is much easier, because you have all the necessary tools
to create the desired graphics object from a simple string representation of the label:

{
 {
  :: TakeOver $ "A" MakeInvLabel ;     ( *MENU KEY 1 Label Object* )
  ID A                                 ( *MENU KEY 1 Action Object* )
 }
 {
  :: TakeOver $ "B" MakeInvLabel ;     ( *MENU KEY 2 Label Object* )
  ID B                                 ( *MENU KEY 2 Action Object* )
 }
 {
  :: TakeOver $ "C" MakeInvLabel ;     ( *MENU KEY 3 Label Object* )
  ID C                                 ( *MENU KEY 3 Action Object* )
 }
 
 ( ... )

}
Find all posts by this user
Quote this message in a reply
03-25-2019, 10:32 AM
Post: #9
RE: HP 28S - Custom Menu
thank you so much!
of course I already knew the storage functions with the shift keys also from the CST menu, but not the other information! very useful!

in reality I didn't have immediate need to use these functions, I just thought I had never read a function so powerful and simple to use (which instead doesn't exist). Wink

Hardware: Hp48S - Hp50g (5x black + 1 blue) - HP39gII - Hp27s - Casio fx-CG50
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 3 Guest(s)