|
-
Sep 11th, 2001, 04:33 PM
#1
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.
-
Sep 11th, 2001, 05:42 PM
#2
Monday Morning Lunatic
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
-
Sep 12th, 2001, 05:32 PM
#3
-
Sep 12th, 2001, 09:37 PM
#4
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.
-
Sep 13th, 2001, 04:02 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|