System file (DOS BIOS in MS-DOS, combined with DOS kernel in Windows 9x)
IO.SYS is an essential part ofMS-DOS andWindows 9x. It contains the default MS-DOSdevice drivers[1] (hardware interfacing routines) and the DOS initialization program.
In thePC bootup sequence, the first sector of theboot disk is loaded into memory and executed. If this is the DOSboot sector, it loads the first three sectors ofIO.SYS into memory and transfers control to it.IO.SYS then:
Loads the rest of itself into memory.
Initializes each defaultdevice driver in turn (console, disk,serial port, etc..). At this point, the default devices are available.
Loads the DOS kernel and calls its initialization routine. The kernel is stored inMSDOS.SYS with MS-DOS and inIO.SYS with Windows 9x. At this point, "normal" file access is available.
Processes theMSDOS.SYS file with Windows 9x.
Processes theCONFIG.SYS file, in MS-DOS 2.0 and higher and Windows 9x.
In Windows 9x, theIO.SYS not only contains theDOS BIOS, but also holds the DOS kernel, which previously resided inMSDOS.SYS. Under some conditions, Windows 9x uses the alternative filenamesWINBOOT.SYS[4] orJO.SYS instead. When Windows 9x is installed over a preexisting DOS install, the Windows file may be temporarily namedIO.W40 for as long as Windows' dual-boot feature has booted the previous OS. Likewise, theIO.SYS of the older system is namedIO.DOS for as long as Windows 9x is active.
DR-DOS 7.06 (only this version) also follows this scheme and theIO.SYS filename in order to become bootable via MS-DOS boot sectors.
Similarly,FreeDOS uses a combined system file as well, but names itKERNEL.SYS.
However, MS-DOS version 3.3 allows sector 4 and higher to be fragmented; version 5.0 allows the first 3 sectors ofIO.SYS to be allocated anywhere (as long as they are contiguous).[nb 1][7][5][8]
COMMAND.COM can be treated like any ordinary file.
^TheMS-DOS 5.0 manual incorrectly states that the system files no longer need to be contiguous. However, for the boot process to work the system files still need to occupy the first two directory entries and the first three sectors of IO.SYS still need to be stored contiguously.SYS continues to take care of these requirements.
^Kurth, Rüdiger; Groß, Martin; Hunger, Henry (2016-11-29) [2007]."Betriebssystem DCP".www.robotrontechnik.de (in German).Archived from the original on 2019-04-03. Retrieved2019-04-28.