Hi,
yes the matrix is now global.
the variable a_asm have the line of my matrix[line][] and b_asm have the number to put in.
The problem is how can i get the right column and the space between the numbers
for example:
int inlineAddition(0,4) --> 0: 4
int inlineAddition(0,6) --> 0: 4 6
int inlineAddition(1,17) --> 0: 4 6
1: 17
int inlineAddition(0,15) --> 0: 4 6 15
1: 17
......
int inlineAddition(int a_asm,int b_asm) {
//a_asm = a;
//b_asm = b;
__asm__ (".intel_syntax noprefix");
__asm__ ("mov eax, [matrix + a_asm]");
__asm__ ("add eax,[b_asm]");
__asm__ ("mov [c_asm], eax");
__asm__ (".att_syntax noprefix");
return c_asm;
}