The clockwork of console/file-streams?

How might I program something such as the standard streaming features for Input/Output in console windows and files? I want to know how they work. I don't care if it requires inline ASM or even NASM, I just want to know!
Writing/reading in the low level uses different things depending on the platform. On unix it uses the write,read,open,close system calls.
Last edited on
It's the same for Windows. The native calls are ReadFile/WriteFile/CreateFile/OpenFile/CloseHandle.

GetStdHandle(STD_INPUT_HANDLE) returns the handle for stdin
GetStdHandle(STD_OUTPUT_HANDLE) for stdout
GetStdHandle(STD_ERROR_HANDLE) for stderr
Topic archived. No new replies allowed.