Mail Archives: djgpp/1997/08/05/16:14:42
Bill Currie schrieb:
> ebx, edi, esi, esp, ds and es must be preserved. eax, ecx, edx, fs
> and gs are free for you to use, but libc uses gs, so stick to fs. To
> fix your problem, just put a `push ebx' at the beginning of your
> function and `pop ebx' at the end.
OK, thanx for the information! But in that case it's faster to use ecx instead
of ebx since push and pop also need a few cycles
> Also, as I have an allergy to global variables :), the function call
> protocol for gcc is (in nasm, sortof (haven't used it much yet)):
That's already mentioned in the NASM example code. I just left it out for
making it as fast as possible. Thank you, anyway
- Raw text -