Results 1 to 5 of 5

Thread: Pointers ( I think )

  1. #1

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by CornedBee
    The return value of a function is usually in eax. (I think)
    For the C calling convention (__cdecl) and the Pascal calling convention (__stdcall) that's correct.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Which other conventions are used? For __fastcall (PASCAL using registers if possible) it is correct too...
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I didn't think there were any others which were standard on x86 other than those three.

    Of course on different architectures it's going to be different.

    MSVC only has those three (I never used fastcall because it a) wasn't any faster, and b) was a tad irrelevant since the compiler can optimise all your inline function calls anyway apart from DLLs)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Frenzied Member numtel's Avatar
    Join Date
    Apr 2000
    Location
    CA
    Posts
    1,163
    I don't know C so there's no reason to try and teach me anything about it.

  5. #5

    Thread Starter
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by numtel
    I don't know C so there's no reason to try and teach me anything about it.
    That's irrelevant.

    You still need to know about calling conventions, whatever language you use.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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