9.2. Keyboard and Display I/O

A standard system-supplied C library provides functions to perform text-oriented I/O from the standard input (stdin), normally the keyboard, and to the standard output (stdout), normally the display. Errors are sent to the standard error (stderr), which may be the display, a file, or the null device.

Some of those functions may be provided in “macro form” (see Kernighan), which is entirely inside the <stdio.h> header file that is compiled with almost every C program. This is why, in Section 6.7, we first compiled getchar and putchar on their own before linking them with some of our assembly language programs.

Other functions may be provided in system libraries that the linker can match according to the name of the ...

Get Itanium® Architecture for Programmers: Understanding 64-Bit Processors and EPIC Principles now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.