delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/05/16:14:42

Message-Id: <m0wvpw2-0003GfC@fwd02.btx.dtag.de>
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
From: Georg DOT Kolling AT t-online DOT de (Georg Kolling)

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019