Re: A82: Scientific functions in ASM


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

Re: A82: Scientific functions in ASM



Using the math function from the rom is actually quite easy. If you look
in 82-ROM.TXT you
will find a list of the functions known now. All the functions uses the FP
"registers" 
called OP1, OP2 .. OP6 which each holds a real number. So what you do when
you want to use 
these math functions is that you load the registers with the values you
want to use, and 
then just call the function.

For exampel look at the program below (uses adrs for rom version 19)

call 1ABF ; OP1 = 1.0
call 1ADC ; OP2 = 2.0
call 085A ; OP1 = OP1+OP2 = 1.0+2.0 = 3.0

This would leave 3.0 in OP1.

If what you wnt to graph is always the same function, it would probably be
faster to use 
these asm functions to do it. But if what you wanted to do was just misc
graph, it would probably
not be faster.

I think that a 3d graphing program might as well be programmed in basic,
since the speed gain
would not be that big, and the functions which evaluates n expressins has
not been found.
Maybe the best solution would be a combination of basic an asm (basic to
calc the points and
asm for showing the graph), the problem is that none of the shells
availble supports this.
I think i have figured out a way in which this might be possible, but it
would require a 
new version of Ash.



_______________________________________

Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________

On Sun, 10 Aug 1997 osprey@barney.nwinfo.net wrote:

> I was wondering how to use scientific functions in ASM, such as sin, cos,
> tan...Could someone show how?  If that is possible, would it then be faster
> to graph a function in a ASM program than just on the 82's OS?  I think a 3d
> graphing program would be pretty cool, if somebody wants to make it.
> 
> Ben Bardill
> 
> 


References: