汇编中怎么样才可以写出像__declspec(nake)那样的函数
我使用ML是Microsoft (R) Macro Assembler Version 6.14.8444
有些需要需要写一些完全控制的函数过程,换句话说,过程中不能有自动生成的任何代码
下边是我写的一个函数,要求连push eax都不能有
TestProc1 proc uses eax
jmp TestProc
TestProc1 endp
2012-03-27 21:51
2012-03-27 22:09
2012-03-28 09:50
2012-03-28 09:52
2012-03-28 09:53
程序代码:OPTION PROLOGUE:NONE
OPTION EPILOGUE:NONE
align 16
arrget proc arr:DWORD,indx:DWORD
mov eax, [esp+4] ; write array adress to EAX
mov ecx, [esp+8] ; write required index to ECX
mov eax, [eax+ecx*4] ; write array member address to EAX
ret 8
arrget endp
OPTION PROLOGUE:PrologueDef
OPTION EPILOGUE:EpilogueDef
程序代码: align 16
arrget:
mov eax, [esp+4] ; write array adress to EAX
mov ecx, [esp+8] ; write required index to ECX
mov eax, [eax+ecx*4] ; write array member address to EAX
ret 8
2012-04-06 11:22

2012-04-06 19:15
2012-04-07 12:43