__declspec (naked)

来源:互联网 发布:邬贺铨 大数据 编辑:程序博客网 时间:2024/06/05 07:18
#include <stdio.h>#include <stdlib.h>__declspec (naked) int addNum (int a,int b){_asm{push ebxmov ebp,esppush    ebxpush    esipush    edimov eax,amov ebx,badd eax,ebxpop     edipop     esipop     ebxmov     esp, ebppop     ebpretn}}int main(void){printf("%d\n",addNum(5,6));return 0;}

0 0
原创粉丝点击