The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

Identifying calc type in RPL
Message #1 Posted by valentino ducati (switzerland) on 15 Mar 2005, 8:25 a.m.

Hi all

I'm a RPN (hp41 system) fellow. Back to that times it was fairly easy to check for memory (SIZE), peripherals (FS? 21, XROM...) and many other environment details (maybe with some synthetic commands) for a program package.

This to allow single source for hp41 with few/much memory, with or without printer, with or without X-Functions etc.

After aquiring a 48SX and two 48GX now I will give a try to the 49G+. My question:

Are there any Flag combinations or SYSEVAL or some other way to check if my program is running on a 48S, 48G or /X or 49 series? Provided it uses only backward compatible functions in the main \<< \>> brackets?

Thank you for help.

      
Re: Identifying calc type in RPL
Message #2 Posted by Raymond Del Tondo on 15 Mar 2005, 9:43 a.m.,
in response to message #1 by valentino ducati (switzerland)

On the 'G' or 'g' type calcs,
you can use the keyword VERSION.
If the version returned is higher than "HP48-J", it's a G type.
If VERSION returns something with "HP49" somewhere
in the string, it's a 'g' (small G) type, or in other words, a 49g...
The 'S' type calcs don't have the VERSION keyword.
On the S types, there exists a suitable SYSEVAL address,
which I don't recall right now.
In most cases, I used the following code,
which returns TRUE if the current machine is a G type,
or FALSE if the code is running on an S type:

*NULLNAME GX?
CODE
addrVDISP EQU #1263A
GOSBVL =SAVPTR
D1=(5) (addrVDISP)+6
C=DAT1 A
?CBIT=1 3
GOYES isGX
isGX GOVLNG =GPPushT/FLp
ENDCODE

HTH

Raymond

            
Re: Identifying calc type in RPL
Message #3 Posted by Arnaud Amiel on 15 Mar 2005, 10:16 a.m.,
in response to message #2 by Raymond Del Tondo

And on teh 28, VERSION returns 'VERSION' at least on the S, I don't have a C so can't comment on this one.

Arnaud

                  
Version
Message #4 Posted by Raymond Del Tondo on 15 Mar 2005, 12:13 p.m.,
in response to message #3 by Arnaud Amiel

That's normal, because the word VERSION will be treated as
an unevaluated expression, or just a name;-)

Raymond

            
Re: Identifying calc type in RPL
Message #5 Posted by VPN on 15 Mar 2005, 2:09 p.m.,
in response to message #2 by Raymond Del Tondo

This is an untested program for all RPL models

<< IF ? TYPE 6. # THEN "49G" ELSE IF ! TYPE 6. # THEN "48" NOVAL TYPE 6. # "G" "S" ITE + ELSE "28" PATH TYPE 6. # "S" "C" ITE + END END >>

Could you all kindly test it, please? [VPN]

                  
NO-VAL on the S
Message #6 Posted by Raymond Del Tondo on 15 Mar 2005, 8:57 p.m.,
in response to message #5 by VPN

I haven't tested your program (did you?),
but the 48S series doesn't have the self-referencing keyword NOVAL,
so it can't be created or used on the 48S.
The 28C doesn't have the keyword PATH,
so same effect as above (not usable;-)...

BTW: A test for the HP-28 C/S is somewhat pathetic, isn't it?

Raymond

Edited: 15 Mar 2005, 8:59 p.m.

                        
Re: NO-VAL on the S
Message #7 Posted by Veli-Pekka Nousiainen on 16 Mar 2005, 1:16 p.m.,
in response to message #6 by Raymond Del Tondo

BUT the whole point is that there is *no* such keyword!
[VPN]

                              
Re: NO-VAL on the S
Message #8 Posted by Raymond Del Tondo on 16 Mar 2005, 4:45 p.m.,
in response to message #7 by Veli-Pekka Nousiainen

?

Hope I didn't get you wrong,
but the point is that you can't even key in
the program on an HP-48S, nor on an HP-28.

Raymond

                                    
Re: NO-VAL on the S
Message #9 Posted by VPN on 17 Mar 2005, 1:52 a.m.,
in response to message #8 by Raymond Del Tondo

Darn!
but you've got the idea and can probably make a simple UserRPL program that will give you the answer
[VPN]
PS: I should have all those calcs for testing....

                  
Re: Identifying calc type in RPL
Message #10 Posted by Les Bell [Sydney] on 16 Mar 2005, 8:00 p.m.,
in response to message #5 by VPN

I tried keying it into a 48GX, out of curiosity, but get a syntax error on the first THEN. . .

Best,

--- Les
[http://www.lesbell.com.au]

                  
Re: Identifying calc type in RPL
Message #11 Posted by VPN on 17 Mar 2005, 4:51 a.m.,
in response to message #5 by VPN

This is a partially tested 
(28S, 48gII, 49G, 49g+)
program for all RPL machines

<< IF ? TYPE 6 == THEN IF GROB 1 1 11 TYPE 11 == THEN "48" NOVAL TYPE 6 == "S/SX" "G/G+/GX" ITE + ELSE 3 DROPN "28" "SC" PATH TYPE 6 == 1 + DUP SUB + END ELSE "49-Series" END >> BYTES # 2B92h 183. "49-Series" Could you all kindly test it again, please? [VPN]

            
Re: Identifying calc type in RPL
Message #12 Posted by sjthomas on 15 Mar 2005, 3:32 p.m.,
in response to message #2 by Raymond Del Tondo

> The 'S' type calcs don't have the VERSION keyword. > On the S types, there exists a suitable SYSEVAL address, > which I don't recall right now.

I *think* its #Ah SYSEVAL


[ Return to Index | Top of Index ]

Go back to the main exhibit hall