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 en
My solution -- Just use .lcomm to create locations for all the named variables
movl inputfile, %ebx #Move file handler into ebx for system call
movl $0x6c, %eax #Stat Sys Call into eax
leal statlocation, %ecx #Move reserved location for stat structure into
int $0x80 #Execute System Call
movl 20(%ecx), %eax #20 to location of size variable, size is now in eax