Thread: size() in loops...

  1. #16
    Registered User
    Join Date
    Feb 2003
    Posts
    596
    Quote Originally Posted by anonytmouse
    Yes. This is the optimized assembly that MSVC7 produces:
    Code:
    	mov	eax, DWORD PTR _str$[esp+60]   // eax = str.size_member_variable
    	inc	ebp                            // ebp(idx)++
    	cmp	ebp, eax                       // if (ebp != eax)
    	jne	SHORT $L8528                   // goto $L8528
    Yes, that's similar to the code from my MSVC6, but I'm not familiar with that assembly language. I'm trying to understand the command
    Code:
    mov	eax, DWORD PTR _str$[esp+60]
    I understand that this is copying from memory into register eax.

    I believe that DWORD PTR just indicates that the value being copied is a double word (i.e. 32 bits), right?

    And [esp+60] gets the value stored at memory address esp+60 where esp is an address stored in register esp, correct?

    But what's the meaning of the "_str$"?
    Last edited by R.Stiltskin; 10-23-2005 at 08:29 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. size of array
    By goran00 in forum C Programming
    Replies: 38
    Last Post: 04-02-2008, 09:57 AM
  2. Heapsort
    By xENGINEERx in forum C Programming
    Replies: 2
    Last Post: 03-30-2008, 07:17 PM
  3. Invalid conversion from 'void*' to 'BYTE' help
    By bikr692002 in forum C++ Programming
    Replies: 9
    Last Post: 02-22-2006, 11:27 AM
  4. An exercise in optimization
    By Prelude in forum Contests Board
    Replies: 10
    Last Post: 04-29-2005, 03:06 PM