CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2010
    Posts
    907

    Need help for converting some code to x64 platform

    Hello,
    Could anyone please convert the following code snippet to the x64 platform?

    Code:
    #define DBG_HALT __asm{ int 0x10 }
    
    #define DBG_ASSERT(exp) {if ( !(exp) ) {DBG_HALT;}}
    
    //#define THROW(exp) { DBG_HALT; }
    
    #define THROW(exp)	{ throw(exp);	}
    Thanks in advance
    Jack

  2. #2
    Join Date
    Nov 2003
    Posts
    1,902

    Re: Need help for converting some code to x64 platform

    Looks like you could use RaiseException() with EXCEPTION_FLT_DIVIDE_BY_ZERO.

    I'm guessing that interrupt 16 triggers a floating point error like in real mode: http://www.internals.com/articles/pr...interrupts.htm

    If you really want a debug break, then use __debugbreak() instead.

    gg

  3. #3
    Join Date
    Dec 2010
    Posts
    907

    Re: Need help for converting some code to x64 platform

    Hello Codeplug,
    __debugbreak() works really fine so far.
    Thanks
    Jack

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured