Frank,
if you want to make it smaller, look at the code and data :P
a lot of times, looking at the disassembled code will bring out things you don't notice in the source
and - when you have related data - put them in a structure
then, instead of...
mov SomeData1,1
mov SomeData2,20
mov SomeData3,30use
mov edx,offset SomeStruct
mov [edx].SOMESTRUCT.SomeData1,1
mov [edx].SOMESTRUCT.SomeData2,20
mov [edx].SOMESTRUCT.SomeData3,30
look at those 2 snippets in a disassembled listing :P
as Jochen mentioned, using m2m makes code smaller when the constants are small
push 20
pop [edx].SOMESTRUCT.SomeData2that's because the immediate data (20) is stored in the code stream in a reduced form
whereas
mov [edx].SOMESTRUCT.SomeData2,20the immediate data (20) is stored in the code stream as a dword (assuming SomeData2 is a dword)
however, push/pop is slower
it quite often doesn't matter when API calls are involved, anyway