Console and Port I/O
These routines read and write on your console or on the specified port. The console I/O routines are not compatible with stream I/O or low-level I/O library routines. The console or port does not have to be opened or closed before I/O is performed, so there are no open or close routines in this category. In the Windows operating systems, the output from these functions is always directed to the console and cannot be redirected.
|
Routine |
Use |
|---|---|
|
Read string from console |
|
|
_cprintf, _cwprintf, _cprintf_s, _cprintf_s_l, _cwprintf_s, _cwprintf_s_l |
Write formatted data to console |
|
Write string to console |
|
|
_cscanf, _cwscanf, _cscanf_s, _cscanf_s_l, _cwscanf_s, _cwscanf_s_l |
Read formatted data from console |
|
Read character from console |
|
|
Read character from console and echo it |
|
|
Read one byte from specified I/O port |
|
|
Read double word from specified I/O port |
|
|
Read 2-byte word from specified I/O port |
|
|
Check for keystroke at console; use before attempting to read from console |
|
|
Write one byte to specified I/O port |
|
|
Write double word to specified I/O port |
|
|
Write word to specified I/O port |
|
|
Write character to console |
|
|
"Unget" last character read from console so it becomes next character read |