Writing a Linux int 80h system-call wrapper in GNU C inline assembly [duplicate]
This question already has an answer here: How to invoke a system call via sysenter in inline assembly? 2 answers I'm trying to use inline assembly... I read this page http://www.codeproject.com/KB/cpp/edujini_inline_asm.aspx but I can't understand the parameters passing to my function. I'm writing a C write example.. this is my function header: write2(char *str, int len){ } And this is my assembly code: global write2 write2: push ebp mov ebp, esp mov eax, 4 ;sys_write mov ebx, 1 ;stdout mov ecx, [ebp+8] ;string pointer mov edx, [ebp+12] ;string size int 0x80 ;syscall leave ret What do I have