A86: Re: Assembly-86 Digest V1 #583
[Prev][Next][Index][Thread]
A86: Re: Assembly-86 Digest V1 #583
I don't know assembler, but I can tell you about AND, OR, and XOR with regards
to the screen.
AND is the operation
0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1
ANDing an image to the screen will:
not put pixels where there weren't any before, and aren't in the new image
wipe pixels where they were before, but they aren't in the new image
not put pixels, even if they are in the new image, but aren't already on the
previous screen.
Only leave pixels untouched that were there before, and still are in the new
image.
AND leaves a very sparse amount of pixels usually.
OR is simply like PtOn on the TI-85: It turns a pixel on if its in the new
image, regardless of whether there was one there previously or not, and leaves
pixels on if they were in the old image but not in the new. For reference:
0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1
1 OR 1 = 1
OR leaves a very thick amount of pixels, usually.
XOR, for reference:
0 XOR 0 = 0
1 XOR 0 = 1
0 XOR 1 = 1
1 XOR 1 = 0
XOR puts a pixel on if
it was on in the previous image, but not in the new
it wasn't on in the previous image, but it IS in the new
And it leaves/turns pixels off if neither or both of the images have them on.
XOR is OR minus AND.
XOR is inbetween.
STL