Re: preserving flags across inline assembler blocks




First thing, since you are using c++ you'll have to worry about name
mangling and probably have to use the extern "C" declaration. You should
google it for more info (or check the MSDN docs).

You'll also have to consider calling conventions (_stdcall, _cdecl) and
decide who will pop argements off the stack.

Finally, you'll have to preserve at leasy EBX, EBP, EDI and ESI. The MSDN
docs make this VERY clear. Search for "calling conventions".

cheers,

snow.


"_Rob_" wrote:
> Does anyone know which flags need to be preserved across __asm blocks when
> using inline assembler in Visual C++? The MSDN documentation is unclear.
>
> I am guessing that you don't need to preserve the status flags but that
> the control flag and system flags do need to be preserved.
>
> Is this correct?
>
> Cheers,
>
> Rob
>


.



Relevant Pages

  • Re: [DESPERATE] Turn on/off Bluetooth, WiFi and an RFID tag reader.
    ... This mean Bitwise-or of all the flags or Bitwise-or of the needed ... MSDN says "pvDevice Must be a valid LPWSTR device name, for example, ... MSDN says "POWER_NAME specifies the name of the device whose power ...
    (microsoft.public.windowsce.app.development)
  • Re: SChannel CSP : Not up-to-date info in MSDN
    ... programming queries. ... I did search MSDN, and managed to find various pieces of information at ... different places regarding SChannel CSP development. ... >> documentation for CSP and CryptoAPI doesn't even mention these flags and ...
    (microsoft.public.security)
  • Re: [Q] QueueUserWorkItem()
    ... I have translated the header but Delphi 6 ENT does not ... > have any reference to the flags and MSDN does not have the flag ...
    (borland.public.delphi.language.objectpascal)