| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
return value in C code
I've made an assembly function in a C program. Now I'd like that function to return a value stored in AX, BX, CX, or DX. Does someone know how to do that?
Thanks... |
|
#2
|
||||
|
||||
|
Re: return value in C code
Suppose the following function which is written by asm (this is very simple, just to show):
Code:
void asmcode ( int param1, int* result)
{
__asm {
mov ax, param1
mov bx, 2
add ax, bx
mov result, ax }
}
Hope that helps.
__________________
Visit my page: http://usuarios.lycos.es/hernandp and my blog... http://hernandp.blogspot.com Last edited by indiocolifa; November 4th, 2004 at 10:33 AM. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|