Re: A85: Find_pixel


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

Re: A85: Find_pixel




On Fri, 09 Jan 1998 18:39:19 -0600, you wrote:

>
>When you call find_pixel, what exactly gets returned?  HL points to 
>the first byte containing (b,c), right?  But what is returned in the A 
>register?
>

Register a has the bit mask of the pixel you are looking for.  To find
what is going to be in the a register, you do the modulus operation
(gives the remainder of a division).  To find the value in a you have
x-position MODULUS 8 (8 is #pixels in 1 byte) which gives a number
0-7.  For the remainder being 0, the value in a = 10000000b, for 1 a =
01000000b, for 2 a = 00100000b, etc, for 7 a = %00000001b.  So this
tells the specific pixel in the byte (byte is in hl).

-mike pearce
mgp4007@omega.uta.edu


References: