Results 1 to 5 of 5

Thread: External asm in c

  1. #1
    ChimpFace9000
    Guest

    Post External asm in c

    This could go in either the c or asm forum, but i choose c cuz more people visit it. This is also c specific, not C++. How do i write external assembly code to be used in C? I found one tutorial but it was tasm specific, and it also didnt work. So i need to know how to do it in just standard assembly, not tasm specific. Thanks.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Basically, you need to have your procedure defined, and you need to know what calling convention you're using (how the parameters are passed). You can find that by looking at an assembly listing of a small compiled C program.

    For the __cdecl calling convention, you need to decorate the name in your asm with "_name" (so just prepend the "_").

    Then make a header, and link with the .obj file.
    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

  3. #3
    jim mcnamara
    Guest
    This is a step by step howto:

    http://support.microsoft.com/directo...icle.asp?ID=KB;EN-US;Q106399

  4. #4
    ChimpFace9000
    Guest
    The link doesnt work. But for the most part ive got it figured out. For some reason though, nothing will work when i start using virtual screens and having to pass the address as one of the variables.

  5. #5
    jim mcnamara
    Guest
    I know why - I didn't set the url/url and the default handler got confused: search msdn for

    Q106399

    It has full details

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