conio.h is a
C header file used mostly by
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few oper ...
compilers to provide console
input/output
In computing, input/output (I/O, or informally io or IO) is the communication between an information processing system, such as a computer, and the outside world, possibly a human or another information processing system. Inputs are the signals ...
. It is not part of the
C standard library or
ISO C
ANSI C, ISO C, and Standard C are successive standards for the C programming language published by the American National Standards Institute (ANSI) and ISO/IEC JTC 1/SC 22/WG 14 of the International Organization for Standardization (ISO) and the ...
, nor is it defined by
POSIX
The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming inte ...
.
This header declares several useful library functions for performing "istream input and output" from a program. Most C compilers that target
DOS
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicat ...
,
Windows 3.x Windows 3.x means either of, or all of the following versions of Microsoft Windows:
* Windows 3.0
* Windows 3.1x
Windows 3.1 is a major release of Microsoft Windows. It was released to manufacturing on April 6, 1992, as a successor to ...
,
Phar Lap
Phar Lap (4 October 1926 – 5 April 1932) was a champion New Zealand–bred Thoroughbred racehorse who is widely regarded as New Zealand's greatest racehorse ever. Achieving incredible success during his distinguished career, his initial u ...
, DOSX,
OS/2
OS/2 (Operating System/2) is a series of computer operating systems, initially created by Microsoft and IBM under the leadership of IBM software designer Ed Iacobucci. As a result of a feud between the two companies over how to position OS/2 ...
, or
Win32
The Windows API, informally WinAPI, is Microsoft's core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. The name Windows API collectively refers to several different platform implementations ...
have this header and supply the associated library functions in the default C library. Most C compilers that target
UNIX
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
do not have this header and do not supply the library functions. Some embedded systems or
cc65
cc65 is a cross development package for 6502 and 65C02 targets, including a macro assembler, a C cross compiler, linker, librarian and several other tools.
Overview
cc65 is based on a native C compiler that was originally adapted for the Ata ...
use a conio-compatible library.
The library functions declared by vary somewhat from compiler to compiler. As originally implemented in
Lattice C
The Lattice C Compiler was released in June 1982 by Lifeboat Associates and was the first C compiler for the IBM Personal Computer. The compiler sold for $500 and would run on PC DOS or MS-DOS (which at the time were the same product with differe ...
, the various functions mapped directly to the first few
DOS
DOS is shorthand for the MS-DOS and IBM PC DOS family of operating systems.
DOS may also refer to:
Computing
* Data over signalling (DoS), multiplexing data onto a signalling channel
* Denial-of-service attack (DoS), an attack on a communicat ...
INT 21H
The DOS API is an API which originated with 86-DOS and is used in MS-DOS/ PC DOS and other DOS-compatible operating systems. Most calls to the DOS API are invoked using software interrupt 21h ( INT 21h). By calling INT 21h with a subfunc ...
functions. The library supplied with
Borland's
Turbo C
Turbo C is a discontinued integrated development environment (IDE) and compiler for the C programming language from Borland. First introduced in 1987, it was noted for its integrated development environment, small size, fast compile speed, comp ...
did not use the DOS API but instead accessed video RAM directly for output and used
BIOS interrupt call
BIOS interrupt calls are a facility that operating systems and application programs use to invoke the facilities of the Basic Input/Output System firmware on IBM PC compatible computers. Traditionally, BIOS calls are mainly used by DOS programs ...
s. This library also has additional functions inspired from the successful
Turbo Pascal
Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the Pascal programming language running on CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at ...
one.
Compilers that target non-DOS operating systems, such as
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, which i ...
or OS/2, provide similar solutions; the unix-related
curses
A curse (also called an imprecation, malediction, execration, malison, anathema, or commination) is any expressed wish that some form of adversity or misfortune will befall or attach to one or more persons, a place, or an object. In particular, ...
library is very common here. Another example is
SyncTERM's ciolib. The version of done by
DJ Delorie
A disc jockey, more commonly abbreviated as DJ, is a person who plays recorded music for an audience. Types of DJs include radio DJs (who host programs on music radio stations), club DJs (who work at a nightclub or music festival), mobile D ...
for the
GO32 extender is particularly extensive.
Member functions
References
{{reflist
External links
Microsoft's documentation- explanation and suggestions for non-standard console IO
Borland-style CONIO implementation for MinGW/Dev-C++
C (programming language) headers
Conio
Text mode
Text user interface
Text user interface libraries