NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: Franciswalser on February 08, 2023, 09:03:51 AM

Title: Program crashes
Post by: Franciswalser on February 08, 2023, 09:03:51 AM
Hello,

I have a DLL created in NASM and linked with GoLink. There's one function that computes Vector x Matrix multiplication. When I try to call this function in external program (Matlab), it crashes. I think there is some detail I missed in my code. I'd appreciate every help.

The code below is one that computes big matrix (in my case 4096x4096) multiplication in single precision. The final result is computed in cycles - each cycle works with 4x4 submatrix (accroding to length of the xmm registers).

To make it as clear as possible, I added some notes to help you quickly understand the code. However, I have a feeling that something is wrong with stack or just with parameter passing. The computation itself is correct (tested with debugger). KohlsFeedback.com Survey (https://www.kohlsfeedback.org/)


Also, in debugger the whole computation works fine, even the jump back from the function works. I have no idea why Matlab crashes.
Title: Re: Program crashes
Post by: Frank Kotler on February 08, 2023, 11:03:10 AM
Code below?

You probably haven't made enough posts to attach code. Cut and paste!

Code tags:

Put the word "code" in square brackets at the top of your code and "/code" in square brackets at the end. No quotes.

Good luck!

Frank