Conio.h
Introduction


**conio.h** is a [C](/wiki/C_%28programming_language%29 "C (programming language)") header file used mostly by [MS\-DOS](/wiki/MS-DOS "MS-DOS") compilers to provide console [input/output](/wiki/C_file_input/output "C file input/output"). It is not part of the [C standard library](/wiki/C_standard_library "C standard library") or [ISO C](/wiki/ISO_C "ISO C"), nor is it defined by [POSIX](/wiki/POSIX "POSIX").

This header declares several useful library functions for performing "istream input and output" from a program. Most C compilers that target [DOS](/wiki/DOS "DOS"), [Windows 3\.x](/wiki/Windows_3.x "Windows 3.x"), [Phar Lap](/wiki/Phar_Lap_%28company%29 "Phar Lap (company)"), DOSX, [OS/2](/wiki/OS/2 "OS/2"), or [Win32](/wiki/Win32 "Win32") have this header and supply the associated library functions in the default C library. Most C compilers that target [UNIX](/wiki/UNIX "UNIX") and [Linux](/wiki/Linux "Linux") do not have this header and do not supply the library functions. Some embedded systems or [cc65](/wiki/Cc65 "Cc65") use a conio\-compatible library.

The library functions declared by  vary somewhat from compiler to compiler. As originally implemented in [Lattice C](/wiki/Lattice_C "Lattice C"), the various functions mapped directly to few of the first [DOS](/wiki/DOS "DOS") [INT 21H](/wiki/INT_21H "INT 21H") functions. The library supplied with [Borland](/wiki/Borland "Borland")'s [Turbo C](/wiki/Turbo_C "Turbo C") did not use the DOS API but instead accessed video RAM directly for output and used [BIOS interrupt calls](/wiki/BIOS_interrupt_call "BIOS interrupt call"). This library also has additional functions inspired from the successful [Turbo Pascal](/wiki/Turbo_Pascal "Turbo Pascal") one.

Compilers that target non\-DOS operating systems, such as [Linux](/wiki/Linux "Linux") or OS/2, provide similar solutions; the unix\-related [curses](/wiki/Curses_%28programming_library%29 "Curses (programming library)") library is very common here. Another example is [SyncTERM's ciolib](/wiki/SyncTERM%23Libraries "SyncTERM#Libraries"). The version of  done by [DJ Delorie](/wiki/DJ_Delorie "DJ Delorie") for the [GO32](/wiki/GO32_%28DOS_extender%29 "GO32 (DOS extender)") extender is particularly extensive.


How do different compilers implement conio.h and its associated functions?