Re: A89: TIOS int format


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

Re: A89: TIOS int format




Hi!

> Little endian?  That's opposite order, I'm assuming that's because it
> comes out big endian off the ESI stack?
> ...
> Same format in the BASIC vars as on the stack, in little endian?

Fairly strange, but they are always in little endian!

> ...
> big_int* myint=malloc(size+2);
> for(int i=0;i<size;i++)
>     myint->data[i]=data[i];
> myint->size=size;

Your code is OK.

> That's really odd - they must plan to support that in the SDK, and it
> seems like a rather obvious entry point to include...

Odd, but they really don't exist, except as suborutines in NG_rationalESI.
You can do:

push_parse_text("1236524565234234786234");
push_parse_text("1232356723437652347623");
push_quantum(MUL_TAG);
NG_rationalESI(top_estack);

> Shouldn't really be hard - I've got a some nice binary
> multiplcation/division algorithms which could handle that easily...

Yes.

> binary, grrrr... and I can't receive it any cause I'm on the digest.  Can
> you send me a copy privately, off the list?

It is now in ticalc archive. Search for "Power modulo N" in
"TI-89 Assembly Math Programs".

Cheers,

Zeljko Juric