ArticleslgStudy

science

DOS API

DOS API is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand DOS API rather than just read about it. In short: 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).

Key takeaways

  • DOS API belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect DOS API to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of DOS API from memory before moving on to harder problems.

Reference excerpt

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 subfunction number in the AH processor register and other parameters in other registers, various DOS services can be invoked. These include handling keyboard input, video output, disk file access, program execution, memory allocation, and various other activities. In the late 1980s, DOS extenders along with the DOS Protected Mode Interface (DPMI) allow the programs to run in either 16-bit or 32-bit protected mode and still have access to the DOS API.

History of the DOS API The original DOS API in 86-DOS and MS-DOS 1.0 was designed to be functionally compatible with CP/M. Files were accessed using file control blocks (FCBs). The DOS API was greatly extended in MS-DOS 2.0 with several Unix concepts, including file access using file handles, hierarchical directories and device I/O control. In DOS 3.1, network redirector support was added. In MS-DOS 3.31, the INT 25h/26h functions were enhanced to support hard disks greater than 32 MB. MS-DOS 5 added support for using upper memory blocks (UMBs). After MS-DOS 5, the DOS API was unchanged for the successive standalone releases of DOS.

The DOS API and Windows In Windows 9x, DOS loaded the protected-mode system and graphical shell. DOS was usually accessed from a virtual DOS machine (VDM) but it was also possible to boot directly to real mode MS-DOS 7.0 without loading Windows. The DOS API was extended with enhanced internationalization support and long filename support, though the long filename support was only available in a VDM. With Windows 95 OSR2, DOS was updated to 7.1, which added FAT32 support, and functions were added to the DOS API to support this. Windows 98 and Windows Me also implement the MS-DOS 7.1 API, though Windows Me reports itself as MS-DOS 8.0. Windows NT and the systems based on it (e.g. Windows XP and Windows Vista) are not based on MS-DOS, but use a virtual machine, NTVDM, to handle the DOS API. NTVDM works by running a DOS program in virtual 8086 mode (an emulation of real mode within protected mode available on 80386 and higher processors). NTVDM supports the DOS 5.0 API. DOSEMU for Linux uses a similar approach.

Interrupt vectors used by DOS The following is the list of interrupt vectors used by programs to invoke the DOS API functions.

DOS INT 21h services The following is the list of functions provided via the DOS API primary software interrupt vector.

Operating systems with native support MS-DOS – most widespread implementation PC DOS – IBM OEM version of MS-DOS OS/2 1.x – Microsoft/IBM successor to MS-DOS and PC DOS SISNE plus – Clone created by Itautec and Scopus Tecnologia in Brazil DR-DOS – Digital Research DOS family, including Novell DOS, PalmDOS, OpenDOS, etc. PTS-DOS – PhysTechSoft & Paragon DOS clone, including S/DOS ROM-DOS – Datalight ROM DOS version Embedded DOS – General Software version FreeDOS – Free, open source DOS clone ReactOS (IA-32 and x86-64 versions) Windows 95 – contains MS-DOS 7.0 Windows 98 – contains MS-DOS 7.1 Windows 98 SE – contains MS-DOS 7.1 Windows ME – contains MS-DOS 8.0

Operating systems with DOS emulation layer Concurrent CP/M-86 (3.1 only) with PCMODE – Digital Research CP/M-86-based OS with optional PC DOS emulator Concurrent DOS – Digital Research CDOS family with built-in PC DOS emulator DOS Plus – a stripped-down single-user variant of Concurrent PC DOS 4.1–5.0 Multiuser DOS – Digital Research/Novell MDOS family including Datapac System Manager, IMS REAL/32, etc. OS/2 (2.x and later) – IBM operating system using a fully-licensed MS-DOS 5.0 in a virtual machine Windows NT (all versions except 64-bit editions and 32-bit ARM editions)

Other emulators NTVDM for Windows NT DOSEMU for Linux DOSBox ReactOS

See also BIOS interrupt call Ralf Brown's Interrupt List (RBIL) Comparison of DOS operating systems DOS Protected Mode Interface (DPMI) DOS extender DOS MZ executable COMMAND.COM

References

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with DOS API

Start with the simplest possible case. Write down what DOS API claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to DOS API before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about DOS API ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of DOS API

In research
DOS API appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses DOS API in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
DOS API is common in secondary-school and first-year university syllabi. It links to neighbouring topics DOS technology, Interrupts, Operating system APIs, so understanding it makes those chapters shorter.
In everyday life
Look for DOS API outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “DOS API” →

How to study DOS API in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what DOS API means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain DOS API out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is DOS API in simple terms?

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).

Why does DOS API matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study DOS API?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on DOS API.

Tags

  • DOS technology
  • Interrupts
  • Operating system APIs
  • X86 architecture

Keep exploring