![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
Visual c++ inline assembly
How do i stop vc++ from adding default inline codes at the start and end of functions?
e.g. my code __declspec(dllexport) __stdcall XY(ST1*param1){
__asm{
mov ecx, 0x06;
mov esi, [param1];
mov edi, [local1];
rep movsd;
}
}_XY@4: push ebp mov ebp,esp push ebx push esi push edi mov ecx,00000006h mov esi,[ebp+08h] mov edi,[L100075C0] rep movsd pop edi pop esi pop ebx pop ebp retn 0004h I mean...i know it needs those...but i want to do them manually. Thanks ![]() win Xp, Visual c++ 6.0
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#2 |
|
Newbie
Join Date: Oct 2005
Posts: 6
Rep Power: 0
![]() |
I am not sure, but I think you should change the calling convension and use something else
|
|
|
|
|
|
#3 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
Put _declspec(naked) in the declaration. Not sure how you can combine it with the _declspec(dllexport), maybe just by doing it
. |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
kooooooooooolllllllllllllllllllllll thanks
![]()
__________________
Spread your wings and fly! Chicken! |
|
|
|
|
|
#5 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You could also write your code in an assembler and link it in, if you think you can roll your own correctly.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|