[A83] Re: Storing a 'Word' to user var


[Prev][Next][Index][Thread]

[A83] Re: Storing a 'Word' to user var




> > No, by word I mean the real meaning of word, two-byte.  How do i go
about
> storing a
> > two-byte register to a user variable?
> >
> > I did try storing the register to op1, _pushrealo1 and then storing it
to
> 'Z', but
> > when i queried the value of Z i ended up with about 5 non-number
> characters.
>
> Wow, cool! Could you send the source?
>
> > I was surprised that the TI-OS would display this instead of crashing.

That's nothing estonishing for me. Just store a byte whose hexadecimal form
hasn't
two digits in OP1 (e.g. $A3, $EF or $4C, but not $33), then call PushRealO1,
save it to a uservar and voilą: it seems that a string had been saved to the
uservar instead of a number. This is because of the form numbers are stored
in the uservars. They are not in hexadecimal form but decimal form (quite
strange, huh?). So e.g. pi is stored in OP1 as $008031415926540000
(ignore the first 2 bytes; they're for mantissa and exponent).

- Patrick




Follow-Ups: References: