[comp.sys.handhelds] HP 48 Object types

jmorriso@ee.ubc.ca (John Paul Morrison) (11/21/90)

Here's a little item that may be of interest, which is not documented in
the (error)
messages section of the manuals. Try  this:

STYPE

\<< TYPE 263 + DOERR \>>

In case you see an object, and you  don't recognize what it is, you can
run
this program on the object, and it will tell you what it is.

eg. if you find this on the stack after CHIP:

<0h>

STYPE will tell you that it is a System Binary

from this you can deduce that an object of
type 20 =	System Binary (called shorts by some) 
type 21	=	Long Real
type 22	=	Long Complex
type 23 = 	Linked Array
type 24	=	Character
type 25 =	Code
type 26 =	Library Data
type 27 =	External

of these object types, has anyone actually seen types 21,22,23,24 or 26
on the stack?

jpm

bson@rice-chex.ai.mit.edu (Jan Brittenson) (11/21/90)

In article <1990Nov20.140927@ee.ubc.ca> jmorriso@ee.ubc.ca writes:

 >from this you can deduce that an object of
 >type 20 =	System Binary (called shorts by some) 
 >type 21 =	Long Real
 >type 22 =	Long Complex
 >type 23 = 	Linked Array
 >type 24 =	Character
 >type 25 =	Code
 >type 26 =	Library Data
 >type 27 =	External

   An interesting side-note here is that objects with types #2baa,
#2bcc, #2bee, and #2c10 all appear as External on the stack, and have
TYPE 27. They can be recognized in a type switch as <1ah>, <1bh>,
<1ch>, and <1dh>. They are Library Data objects, i.e. a type followed
by a 5-nibble size word, followed by the data, and evaluate to
themselves.

akcs.dnickel@hpcvbbs.UUCP (Derek Scott Nickel) (11/22/90)

Oh, yes!  They really do exist.  Here are two short ASC programs to play
with Long Real numbers.

"D9D202BA819AF819FF301C5A2B2130496B" ASC\-> 'R\->LR' STO
"D9D202BA819AF810DB460B5A2B21304635" ASC\-> 'LR\->R' STO

These two routines do type checking, the real heart of them is the
routines at 2A5C1 and 2A5B0 (respectively).

        Derek S. Nickel

smithj@jacobs.CS.ORST.EDU (Jeremy Smith) (11/23/90)

Wlodek told me that 2EC11 SYSEVAL converts the number in level 1 to
system binary (object type 22).  I don't know what use this is, but does
anyone know of sysevals to convert to the others?

Example:

   123 #2EC11h SYSEVAL

gives:

   <7Bh> in hex mode, <123d> in dec mode, <173o> in octal mode, and <1111011b>
   in binary mode.

--
Jeremy |-) Smith
smithj@jacobs.cs.orst.edu