Identifying calc type in RPL



#10

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.


#11

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


#12

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


#13

That's normal, because the word VERSION will be treated as

an unevaluated expression, or just a name;-)

Raymond

#14

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]


#15

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.


#16

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

[VPN]


#17

?

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


#18

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....

#19

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]

#20

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]

#21

> 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


Possibly Related Threads...
Thread Author Replies Views Last Post
  Writing RPL programs on OS X Sean Freeman 18 1,363 11-30-2013, 03:59 PM
Last Post: Sean Freeman
  48G vs 49G+ User RPL Speed Comparison John Colvin 7 597 11-16-2013, 10:07 PM
Last Post: Han
  RPL 32 David Hayden 4 482 11-11-2013, 11:34 AM
Last Post: David Hayden
  HP Prime - local variables retain their initial type BruceH 4 504 11-10-2013, 12:42 PM
Last Post: Michael de Estrada
  HHC / HP Museum Programming Contest for RPN and RPL machines Gene Wright 18 1,348 09-22-2013, 09:39 AM
Last Post: Miguel Toro
  [HP-Prime CAS] list[x,y,z], vector[x, y, z ] ... data type operation? CompSystems 1 306 08-22-2013, 03:30 PM
Last Post: Joe Horn
  New article on a new type of neo linear equations Namir 0 318 08-11-2013, 10:27 AM
Last Post: Namir
  [HP-prime] Parallel Processing, vectors, matrices as a only data type =( CompSystems 1 298 08-08-2013, 04:48 PM
Last Post: peacecalc
  wp34s calc to calc communication Andrew Nikitin 1 337 07-29-2013, 01:57 AM
Last Post: Marcus von Cube, Germany
  Classic calculator display chip type number? Juergen Hofstaedter 3 397 01-22-2013, 12:47 PM
Last Post: Eric Smith

Forum Jump: