Assuming that I have opened a file in assembly and have the file handle for that file in register eax. How would I go about getting the size of the file so I can allocate enough buffer space for it?   

I researched another discussion here that suggested using the `sys_fstat(28)` system call to get the file stats but couldn't implement it...

```
#My attempt at getting the file size

_test:  movl    filehandle, %ebx  #move filehandle (file descriptor) into ebx
        movl    $28, %eax         #fstat syscall
        int $0x80             # always end up with -14 in here not sure why

```