I use MASM but not when I'm programming C++. Then I use inline assembler.
I forgot to add these lines to the keycolor blitter:
mov edi,destination
mov esi,source
mov ebp,imageheight
They should be place just before the "alphaloop" (incorrect name).
This is an 8-bit blitter but it can be changed to a 16-bit blitter by adjusting the instructions a bit. I'm not sure if it can be used to create a 32-bit blitter because some MMX instructions can't be used with 32-bit packed data.