8.3 Superseded Functions

MS-DOS version 2.0 and later versions have introduced functions that supersede many of the functions introduced in earlier versions. The newer functions are more efficient and easier to use. A programmer should not use a superseded function except to maintain compatibility with versions of MS-DOS earlier than version 2.0.

The following table shows the number and name of each superseded Interrupt 21h function and of any functions that supersede it:

Old function New function

00h Terminate Program 4Ch End Program
01h Read Keyboard with Echo 3Fh Read File or Device
02h Display Character 40h Write File or Device
03h Auxiliary Input 3Fh Read File or Device
04h Auxiliary Output 40h Write File or Device
05h Print Character 40h Write File or Device
09h Display String 40h Write File or Device
0Ah Buffered Keyboard Input 3Fh Read File or Device
0Fh Open File with FCB 3Dh Open File with Handle
10h Close File with FCB 3Eh Close File with Handle
11h Find First File with FCB 4Eh Find First File
12h Find Next File with FCB 4Fh Find Next File
13h Delete File with FCB 41h Delete File
14h Sequential Read 3Fh Read File or Device
15h Sequential Write 40h Write File or Device
16h Create File with FCB 3Ch Create File with Handle
17h Rename File with FCB 56h Rename File
1Bh Get Default Drive Data 36h Get Disk Free Space
1Ch Get Drive Data 36h Get Disk Free Space
21h Random Read 3Fh Read File or Device
22h Random Write 40h Write File or Device
23h Get File Size 42h Move File Pointer
24h Set Random Record Number 42h Move File Pointer
26h Create New PSP 4B00h Load and Execute Program
27h Random Block Read 3Fh Read File or Device
  42h Move File Pointer
28h Random Block Write 40h Write File or Device
  42h Move File Pointer

Some programmers may work on older software that still uses superseded functions. For the convenience of these programmers, this chapter includes reference pages for the superseded functions. New programs should not use superseded functions, because Microsoft may remove support for these functions at any time.