Re: A86: Graphics
[Prev][Next][Index][Thread]
Re: A86: Graphics
Steve86Asm@aol.com (Steve86Asm@aol.com) wrote:
>horizontal/vertical line. Anyway, OR's, AND's, and XOR's can all be used
>that way (except for AND, you should use the compliment accumulator opcode
>(forgot the mneumonic - CCA maybe?) first, so that when you AND it, it will
The mneumonic is CPL.
Here's a more basic (better) explanation:
When you call findpixel, the hl register is set to the memory
location with the 8 bits in it that contains the bit (E, D) that you want
to set. The accumulator holds a byte that is blank except for the bit
corresponding to the specific pixel you requested. To use this
information, you can make the processor change the contents of a in
memory location (hl). So, if hl is $FC00 and A is %01000000, 'or (hl)\ld
(hl), a' will fill in the second pixel from the right at the top line of
the screen. If you want to do more complex things than that, you can use:
'CPL\and (hl)\ld (hl),a' to clear a bit, 'xor (hl)\ld (hl),a' to change a
bit, or 'and (hl)\ld (hl), a' to use a bit as the mask for that byte's
worth of video memory. As with all graphics applications, I would like
to suggest that you use Dan Eble's and my FindPixel routine, which is
blisteringly fast and very small.
James Yopp
jyopp@pobox.com
"Time is the fire in which we burn."