Message-Id: Date: Tue, 5 Aug 97 22:10 MET DST To: djgpp AT delorie DOT com References: <199708042259 DOT KAA19700 AT teleng1 DOT tait DOT co DOT nz gatekeeper.tait.co.nz> Subject: Re: Strange loop with optimize MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk 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