HP Forums
50g questions (dispatch, menu number, CODEM) - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: 50g questions (dispatch, menu number, CODEM) (/thread-17236.html)



50g questions (dispatch, menu number, CODEM) - BINUBALL - 07-21-2021 11:29 AM

I have two questions about hp 50g. Here are the questions.

1. Finding menu number using only hp 50g itself
Of course, I know there is menu number in AUR appendix H. But I'm curious if 50g itself can find menu number. Using trial and error costs much, much time.

2. Dispatch more than 5 objects
On sysRPL programming we can dispatch number with command like CK1&Dispatch, CK&Dispatch0.. and more. My major problem is, how to dispatch more than 5 objects. Binary Integal can be up to only # FFFFFh. So It may be impossible.

3. CODEM
CODE - ENDCODE syntax used for inserting saturn code. However some source code I've seen contains CODEM - ENDCODE. Why are them use CODEM and how to compile code which using CODEM?


RE: 50g questions (dispatch, menu number, CODEM) - Joe Horn - 07-21-2021 07:45 PM

(07-21-2021 11:29 AM)BINUBALL Wrote:  1. Finding menu number using only hp 50g itself
Of course, I know there is menu number in AUR appendix H. But I'm curious if 50g itself can find menu number. Using trial and error costs much, much time.

The RCLMENU command returns the current menu's number, in n.pg format, where pg is the page number. E.g. After pressing MTH NXT, RCLMENU returns 3.02 because the Math menu is menu #3, and pressing NXT put you on page 2.

Quote:2. Dispatch more than 5 objects
On sysRPL programming we can dispatch number with command like CK1&Dispatch, CK&Dispatch0.. and more. My major problem is, how to dispatch more than 5 objects. Binary Integal can be up to only # FFFFFh. So It may be impossible.

There are no built-in Dispatch-type commands for more than 5 arguments, but you know that already. Sorry!


RE: 50g questions (dispatch, menu number, CODEM) - DavidM - 07-21-2021 11:59 PM

(07-21-2021 11:29 AM)BINUBALL Wrote:  1. Finding menu number using only hp 50g itself
Of course, I know there is menu number in AUR appendix H. But I'm curious if 50g itself can find menu number. Using trial and error costs much, much time.

Joe has already answered this.

(07-21-2021 11:29 AM)BINUBALL Wrote:  2. Dispatch more than 5 objects
On sysRPL programming we can dispatch number with command like CK1&Dispatch, CK&Dispatch0.. and more. My major problem is, how to dispatch more than 5 objects. Binary Integal can be up to only # FFFFFh. So It may be impossible.

Nothing built-in, but you can always check in multiple stages. After the initial dispatch, check for further argument types and use case statements accordingly. Use a default action of raising a bad argument error for the case structure if none of the types match. This is essentially how certain built-in commands such as DOLIST and DOSUBS deal with optional arguments.

(07-21-2021 11:29 AM)BINUBALL Wrote:  3. CODEM
CODE - ENDCODE syntax used for inserting saturn code. However some source code I've seen contains CODEM - ENDCODE. Why are them use CODEM and how to compile code which using CODEM?

Different compilers, different syntax. CODEM starts a MASD code object if your project is developed in the Debug4x environment. The built-in ASM on the 50g doesn't recognize the CODEM keyword, however, and uses CODE for the same thing. It just depends on what compiler you use.


RE: 50g questions (dispatch, menu number, CODEM) - BINUBALL - 07-23-2021 01:00 AM

Thanks for answering this, Joe and David.