I remember writing some assembly code just recently where I needed at least one of the three standard FILE *'s.
You need to find the variable that represents all of the FILE *'s. The following code worked with Borland's assembler where I used fprintf() to print out an error message to stderr.
Obviously your situation will probably be much different, but the idea is the same. Find the way the standard FILE *'s are organized for your assembler/compiler and import them into your program.
Code:
extern __streams:near
....
push offset szMemErr
push dword ptr [__streams + 8]
call _fprintf
add esp, 8
Joys of assembly programming...