According to the documentation for fgets()
, the function takes three parameters:
- char * - a string that will hold the input
- int - an integer that represents the maximum number of characters to read
- FILE * - a
FILE *
to the stream to read from
I have no trouble calling the function. I just push
the three parameters onto the stack, call the function, and increase ESP
by 12.
My problem is with parameter #3. What should be passed in as the FILE *
for standard input? In C, I can just use stdin
, but I don't know what the equivalent is in x86 assembly.
Update: I'm using NASM on Linux.