Identifying calc type in RPL



Post: #13

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.


Post: #14

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


Post: #15

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


Post: #16

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

an unevaluated expression, or just a name;-)

Raymond

Post: #17

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]


Post: #18

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.


Post: #19

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

[VPN]


Post: #20

?

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


Post: #21

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

Post: #22

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]

Post: #23

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]

Post: #24

> 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


Forum Jump: