windows - passing arrays to functions in x86 asm -


I am learning x86 asm and using masm, and trying to write a function in which the following Signatures are equal to:

  zero function (double A [], double b [], double c [], int lane);   

I'm not sure how to implement it?

The ASM file will be compiled into a Win32 DLL.

How to do this, it can translate very simple functions into ASM for me:

  Zero function (Double A [], Double B [ ], Double C [], Intel lane) {// a, b, and c equal length given by LAN, (int i = 0; i & lt; length; i ++) c [i] = one [I] + b [i]; }   

I tried to write a function like this in C, compiled it, and seeing the related disalled code in the XE while using OLEDBG but I can not even find its function Found. / P>

Thanks.

I have not written x86 for some time but I give you a general idea of ​​how to do this Since I do not have a codeer working, it has been written in Notepad.

  func proc a: DWORD, b: DWORD, c: DWORD, len: DWORD mov eax, len test eax, Eax jnz @ f ret @@: Push EBX Push ESA XX EX, AXOSSEE , A MoB EBX, B MONACX, C @@Mov. ADX, Dvored PTR DS: [EBX + Ex * 4] ADX, DeWonder PTR DS: [ecx + eax * 4] mov [esi + eax * 4], edx Cmp eax, len jl @b pop esi pop ebx ret func endp   

The above work is analogous to stdcall and almost how you would translate it into x86 if your pluralities were integer bad luck From, you are using a couple. Loop itself, but you have to use the FPU stack and opodode to arithmetic. I have not used it for a while and unfortunately the directions above my head can not be missed.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

memcached - Django cache performance -