Re: A86: Re: Re: Re: Re: Re: Z80 & new game preview


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

Re: A86: Re: Re: Re: Re: Re: Z80 & new game preview




since it cancels algebraicly, that means it doesn't matter. seriously. in
fact, i was kind of doubting myself so i brute-force tested the algorithm
and worked (compared it's output to a brute force routine).

the table's a bit different now. it must be aligned on a 256-byte boundary.
it is:
.db 0*0/4,1*1/4,2*2/4,...,511*511/4 ; you need the lsb's for these
.db 0*0/4,1*1/4,2*2/4,...,511*511/4 ; and need the msb's for these

realistically, i think you need 2 tables, so it'd take 2048 bytes. hrm. i'm
working on it, that's why i haven't submitted an official routine yet! =)

----- Original Message -----
From: <rabidcow@juno.com>
To: <assembly-86@lists.ticalc.org>
Sent: Wednesday, October 13, 1999 6:37 AM
Subject: Re: A86: Re: Re: Re: Re: Re: Z80 & new game preview


> if you are multiplying, say 4 times 5, a+b=9, 9*9=81, 81/4=20 <- note the
> rounging error.  a-b=1, 1*1=1, 1/4=0 <- rounding error.  20-0=20.  now
> the thing is, does this rounding error always cancel, or with larger
> numbers is it possible for it to affect the result?  the fact that it
> cancels out when you simplify it algebraicly means nothing (or does it?)
> the concern is that you're rounding in the table, and that's what you're
> actually using to do the calculation.
>
> so with the table business, it's low byte table, then high byte table,
> not
> ;  .db 0*0/4,1*1/4,2*2/4,...,255*255/4
> ;  and then the msb's of those...
> ;  .db 256*256/4,...,511*511/4
> ;  and then the msb's of those.
> which sounds like 4 tables?  and how does the table get loaded to d&h?
> is one the high byte of the location, or is the table aligned on a 256
> byte boundary?  or is this all irrelivant in this new routine you've got?
>
> -josh




Follow-Ups: References: