Re: A86: FindPixel in 84 cycles and 19 bytes!
[Prev][Next][Index][Thread]
Re: A86: FindPixel in 84 cycles and 19 bytes!
On Fri, 8 Aug 1997 Dan Eble <eble@cis.ohio-state.edu> writes:
>On Fri, 8 Aug 1997 ariwsi@juno.com wrote:
>
>> ; Here it is: a FindPixel using only 84 clock cycles and 19 bytes!
>> ; Call with H = Y coordinate, L = X coordinate
>
>The routine modifies the input registers, which would have to be pushed
>and popped, or reloaded, if this were to be called multiple times (which
>is highly likely). This increases the number of clock cycles.
You shouldn't be calling it many times at all! If using it in a sprite
plotting routine, it should only need to be called once! After that,
you can just rotate the mask and increment the address when appropriate.
A sprite plotting routine would almost certainly use most of the
registers anyway, so you wouldn't have to push/pop any more than normal.
The only time that would be a problem is if you were using the FindPixel
routine for each pixel, which is a very bad idea!
(No, I don't really think there is much serious use for my routine,
but it is an entertaining idea!)
--
Patrick Davidson (ariwsi@juno.com)
Visit my home page! Stuff for Amiga, TI-85, TI-92, even DOS!
http://www.calweb.com/~kwdavids/patrick/
http://www.toptown.com/hp/ariwsi/
References: