I'm writing a small application which reads and writes to some files. MY problem is that when I write to the file in my program, I get an error, %eax is set to -14. strerror(-14) returns unknown error, and I was told on irc that posix write() doesn't return -14. As far as I can tell everything is fine with the syscall, I've triple checked everything, but it keeps failing, nothing is written to the file.
.equ SYS_WRITE, 4 .equ ST_BR_WOUT_DESC, -8 .equ LINUX_SYSCALL, 0x80 ... #write 7 to file movl $SYS_WRITE, %eax movl ST_BR_WOUT_DESC(%ebp), %ebx movl $7, %ecx #convert to ascii addl $48, %ecx movl $1, %edx int $LINUX_SYSCALL
Thanks in advance for any help