If the function prototype is:
void qsort ( void * first, size_t number, size_t size, int ( * comparator ) ( const void *, const void * ) ); So how to call it in assembler? I tried something like that
section .data a dd 1, 3, 2, 2 c dd 10 b dd 4 section .text CMAIN: ... push dword[comp] push dword[b] push dword[c] push dword[a] call qsort;программа вылетает на этом месте, дальше не идет add esp, 16 PRINT_DEC 4, [a + 4] xor eax, eax ret comp: push ebp mov ebp, esp mov edx, dword[ebp + 4] mov eax, dword[ebp + 8] sub eax, edx leave ret but in the end nothing works