Code:
 1: void __fastcall fastpixel(long* surface) 
 2:  {
 3:    int iCount = 1152*864;
 4:    __asm
 5:    {
 6:    // Assign pointers to register
 7:    push edi;
 8:    push ecx;
 9:    push eax;
10:    mov edi, [surface] ; //put dest addr to edi reg
11:    mov ecx, [iCount] ;// put count to ecx reg
12:
13:    codeloop:
14:    mov eax, [edi] ; //mov a byte of src data to low
15:    xor eax, 0x00ffffff ;
16:    mov [edi], eax ;
17:    add edi,4;
18:    dec ecx ; //decrement count by 1
19:    jnz codeloop ; //jump to codeloop if not 0
20:    pop edi;
21:    pop ecx;
22:    pop eax;
23:    }
24: }
Ok so I've got this lovely bit of code that I've constructed and I need a few clerifications:

in theory I should have been able to replace lines 14 to 16 with this:

first:
xor [edi], 0x00FFFFFF

how ever this just turns my screen blue :\

second:
I seem to need to use add edi,4 instead of just inc because inc only seems to move it 1 byte forward, is there a way to fix this?

third:
This is in the help docs for MASM32 but I have no clue what idex, scale, and displacement are reffering to.

[ Base Address + Index * Scale + Displacement ]

[ebx + ecx * 4 + 8]

ebx is the base address.
ecx is the index.
4 is the scale based on the data size.
8 is the displacement in BYTES.