Omnimaga

General Discussion => Other Discussions => Miscellaneous => Topic started by: AngelFish on February 09, 2011, 03:26:01 pm

Title: Math functions
Post by: AngelFish on February 09, 2011, 03:26:01 pm
If you would like to see non-math related things, like string operations, just mention them...

...Unless it involves division by 0. I don't want to create a wormhole in my Prizm.  :P
Title: Re: Math functions
Post by: jnesselr on February 09, 2011, 03:37:46 pm
I voted. ;-)
Title: Re: Math functions
Post by: holmes221b on February 09, 2011, 04:08:40 pm
I haven't a clue what RNG is...
*light bulb turns on*
Oh, wait, that's Random Number Generator, isn't it?
Title: Re: Math functions
Post by: jnesselr on February 09, 2011, 04:15:13 pm
I haven't a clue what RNG is...
*light bulb turns on*
Oh, wait, that's Random Number Generator, isn't it?
Quite right!  Although now that I think about it, the secure one would be kinda cool, too.
Title: Re: Math functions
Post by: AngelFish on February 09, 2011, 07:10:49 pm
Everyone wants calculus...  :P
Title: Re: Math functions
Post by: holmes221b on February 09, 2011, 07:58:35 pm
Calculus is very important.
Title: Re: Math functions
Post by: AngelFish on February 09, 2011, 08:24:28 pm
Yeah, but I'm not sure how you pass a function to another function in an assembly program.
Title: Re: Math functions
Post by: Xeda112358 on February 09, 2011, 08:36:27 pm
You just leave the result either in a register or in memory and then the next function uses that. I imagine that you could set up a spot in RAM that holds the address of where the arguments are, but that isn't very useful. Also, I don't know how the stack works on the Prizm, but if it doesn't push PC onto the stack when you use CALL, then you could pass arguments through the stack.
Title: Re: Math functions
Post by: AngelFish on February 09, 2011, 08:55:38 pm
It pushes PC and SR onto the stack, so I'd have to pop those and repush them afterwards.
Title: Re: Math functions
Post by: Xeda112358 on February 09, 2011, 09:00:11 pm
Eww, I don't like that because sometimes I forget and then I crash my calc :(
Title: Re: Math functions
Post by: AngelFish on February 09, 2011, 09:02:04 pm
I'm not sure what happens if I screw up the stack on my Prizm. I've never used it. Let's try it  >:D
Title: Re: Math functions
Post by: holmes221b on February 10, 2011, 10:31:52 am
I'm not sure what happens if I screw up the stack on my Prizm. I've never used it. Let's try it  >:D
Take photos, I wanna see if it goes boom.

edit: oh wait, that only happens if you manage to divide by zero successfully...
Title: Re: Math functions
Post by: Builderboy on February 11, 2011, 12:43:01 pm
I am confused as to which place these math functions are going to be added?  There really isn't anything explaining O.o
Title: Re: Math functions
Post by: holmes221b on February 11, 2011, 01:29:44 pm
I think it's a poll?
Title: Re: Math functions
Post by: Builderboy on February 11, 2011, 01:32:56 pm
right, but for which purpose?  Just math in general?
Title: Re: Math functions
Post by: Xeda112358 on February 11, 2011, 01:42:34 pm
I think Qwerty plans to create routines on the Prizm for these functions... I'm not sure?
Title: Re: Math functions
Post by: Builderboy on February 11, 2011, 01:45:37 pm
ooooooooooh gotcha!  That would be epic!
Title: Re: Math functions
Post by: DJ Omnimaga on February 12, 2011, 09:08:11 pm
You're not just planning to make math-only routines in long terms, right? new math stuff would effectively be cool, though, for the Prizm. Would they be useable through a parser hook?
/me would like a sprite library, although you would need to figure out how to draw to the screen or the buffer. X.x