Visual Studio stdcall and disassembly.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • eyald25
    New Member
    • Dec 2009
    • 4

    Visual Studio stdcall and disassembly.

    I'm having a problem regarding the assembly code with stdcall.
    "int main(void)
    {
    00F213A0 push ebp
    00F213A1 mov ebp,esp
    00F213A3 sub esp,0C0h
    00F213A9 push ebx
    00F213AA push esi
    00F213AB push edi
    00F213AC lea edi,[ebp-0C0h]
    00F213B2 mov ecx,30h
    00F213B7 mov eax,0CCCCCCCCh
    00F213BC rep stos dword ptr es:[edi] \
    ... "
    I want that the commands will be just push ebp mov ebp,esp and then disassembly the other commands in the block, as cdecl basic convention is defined. I guess it is some sort of optimization but I couldn't find a way to cancel it. How can I do it?

    Thanks,
    Eyal.
  • solita
    New Member
    • Jun 2009
    • 17

    #2
    You can disable optimization in the c/cpp tab of project settings of vcpp

    Comment

    • eyald25
      New Member
      • Dec 2009
      • 4

      #3
      Optimizations are disabled.

      I've already checked this tab and none of them are enabled.

      Thanks.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        Use your project properties to set the calling conventioon to __cdecl.

        Comment

        • eyald25
          New Member
          • Dec 2009
          • 4

          #5
          It is already defined.

          I attach the project optimization and and advanced tabs:
          1. advanced

          2. optimization

          Comment

          • weaknessforcats
            Recognized Expert Expert
            • Mar 2007
            • 9214

            #6
            Yes, that's what I would have done.

            Comment

            • eyald25
              New Member
              • Dec 2009
              • 4

              #7
              Well, I did it yesterday and I reset all VS settings. Still it doesn't work.
              Any ideas?

              Comment

              Working...