문제

void empty() { }

will be compiled to

push ebp
mov ebp, esp
ret

How do I declare the function so that it has no "decoration" code? just plain ret. If that is not possible, is this possible to define completely assembler function inside the .C file? It is possible to define assembler function in the .asm file.

도움이 되었습니까?

해결책

Declare the function with the __declspec(naked) modifier.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top