hey I would like to open and read a file using system calls and print the data in it letter by letter I have the function system_call in an assembly file and I want to "save" to pointer to the file descriptor from the system_call(SYS_OPEN to use it. the purpose is not using #include directory
my code is
system_call(SYS_OPEN,argv[2],0,)
where argv[2] = "a.txt" SYS_OPEN = 5 and the 4th param should be permission, and i dont know what to write there
after "saving" it to pointer I would like to read and print like this
while(system_call(SYS_READ,STDIN, input_char , 1)>0)
{
system_call(SYS_WRITE,STDOUT,input_char, 1);
}
thank you.