Hi! I am not sure whether I understand your method, so maybe you can explain it in more detail. Is the alpha mask 1 byte per pixel, either 00 or ff per pixel? The multiplication is costly. You can also use bit test and "set conditionally" (to 0 or 255) and "move conditionally" byte sized 386 operations, but then you are back to pixel wise processing. The good thing about conditional setting and moving is that you avoid conditional jumps which are always more time-consuming than a fixed calculation which can involve conditional setting and moving :-)
Eric > With 4 pixels loaded in a 32-bit register: > > AND the input pixels with the alpha mask > SHR this result so that the bit is in position 0 > Multiply so that this bit is expanded to a full byte of 1s > AND the input and screen with this mask > OR the modified input onto the screen ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel