Post Reply 
50g questions (dispatch, menu number, CODEM)
07-21-2021, 11:29 AM
Post: #1
50g questions (dispatch, menu number, CODEM)
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?

S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX
Visit this user's website Find all posts by this user
Quote this message in a reply
07-21-2021, 07:45 PM
Post: #2
RE: 50g questions (dispatch, menu number, CODEM)
(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!

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
07-21-2021, 11:59 PM
Post: #3
RE: 50g questions (dispatch, menu number, CODEM)
(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.
Find all posts by this user
Quote this message in a reply
07-23-2021, 01:00 AM
Post: #4
RE: 50g questions (dispatch, menu number, CODEM)
Thanks for answering this, Joe and David.

S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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