A82: Re: Re: sin, cos, tan


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

A82: Re: Re: sin, cos, tan




As far as I remember the problem with the FP math routines is that the
extra $1A bytes in ROM version 19 is "inserted" some where in the middle
of them. This means that some can be called using CALL, some using
ROM_CALL and some can not be called unless you make a special version of
ROM_CALL. I think that the routines you are talking about are placed after
the bytes are inserted, so ROM_CALL should work.

The easiest thing to seems to be to find out which of the routiens you can
call without problems, and which ones you can not. Then make a jumptable
for the routines which you can not call in another way. 

The routines you included should work with a few small changes. First of
all remove the LD DE,(PROGRAM_ADDR) \ ADD HL,DE, and change the CALL_('s
to CALL's.The rest of it should work with out changes, but they seem to
take up quite a lot af space, and they seem to be more precise than you
would need for most programs. Using a routine which gave 8 bits result
would be enough for most case, and it would be faster and smaller. Reading
the code was quite hard, but it looked like it could be optimized a bit.

Dines



_______________________________________

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


Follow-Ups: