SERVICE · 01 / 07

MS-DOS Modernization:
Revive your legacy apps.

MS-DOS applications written in QuickBasic, Turbo Pascal, C, Basic PDS, and Visual Basic for DOS cannot run natively on 64-bit Windows. There are three paths: wrap the original in an emulator or virtual machine, port the source to C# .NET, Go, Rust, or Delphi, or rewrite around the business domain. The assessment recommends one in writing.

Book a free 1-hour consultation →

At a glance

Legacy sources: QuickBasic · Turbo Pascal · C · Assembly · Basic PDS · VB-DOS
Modern targets: C# .NET 10 · Go (Golang) · Rust · Delphi 13 · TypeScript
Typical timeline: Weeks (virtualization) to several months (re-architecture)
Project range: $5,000–$100,000
U.S. delivery: 100% U.S. citizen workforce, U.S.-soil delivery

What to know before you modernize

Which DOS toolchain built it, and what it implies

The language tells us what has to be replaced. A QuickBasic or Basic PDS program usually keeps its data in random-access files read and written as fixed-length records through TYPE definitions, and reaches the machine through PEEK, POKE, INP, OUT, and calls to assembly routines in Quick Libraries. A Turbo Pascal or Borland Pascal program is organized in units and often uses the Dos unit's Intr and MsDos procedures, the Port array, and overlays; its 6-byte Real type has no counterpart in .NET. A C program carries a memory model, near and far pointers, and compiler-specific library calls. An assembly program is its own interface to the machine. Visual Basic for DOS and Clipper add their own forms and database conventions. None of this is difficult, but every one of these constructs maps to a different replacement, so the inventory is by construct, not by line count.

Clipper modernization →

Interrupts, ports, and direct screen writes

Most DOS programs do not use an operating system API in the Windows sense. They call software interrupts: INT 21h for files, memory, and the clock; INT 10h for the display; INT 16h for the keyboard; INT 17h for the printer; INT 14h for the serial port. Many bypass even those and write straight to video memory, read hardware ports, or install a timer or keyboard handler. A port has to find each of these and replace it with a defined behavior: a screen layer, a file API, a printer driver, a serial library. Direct port access is the hard part. DOSBox-X's own printing documentation notes that direct access to real hardware ports may not work without additional steps on a modern host. We list every interrupt call and port access in the source before estimating anything.

Data files, record layouts, and DOS code pages

Text in a DOS data file is not Windows text. DOS used OEM code pages: 437 for US English, 850 for Western Europe, 852 for Central Europe, 865 for the Nordic languages, and others by country. Windows applications use ANSI code pages such as 1252, and Microsoft warns that ANSI code pages differ between machines and recommends Unicode for new work. Read a DOS file as 1252 and every accented letter, box-drawing character, and currency symbol in a name or address field comes out wrong. The migration therefore needs to know which code page each file used, and it converts to UTF-8 on the way into a database. Fixed-length records, packed numeric fields, and language-specific number formats get the same treatment: each layout is documented from the source, tested against real files, and loaded by a repeatable script.

FoxPro modernization →

Wrap, port, or rewrite

There are three ways to move a DOS application, and the right one depends on the source. Wrap keeps the original program and puts it in a managed emulator or virtual machine with the data on a shared drive and the printing fixed; it takes weeks, and it is the fallback when the source is lost or the budget is short. Port translates the source into C# .NET, Go, or Rust construct by construct, replacing the screen, file, and printer layers, and proves equivalence with recorded test runs. It suits programs with clear business rules and little hardware coupling. Rewrite rebuilds the application around the business domain, using the old program as the reference for behavior. It is the choice when users want a browser or mobile interface, when several DOS programs share the same data, or when the code is too tangled to translate. The assessment recommends one in writing.

Virtualization service →

Where NTVDM still exists

NTVDM, the NT Virtual DOS Machine, runs 16-bit DOS and Windows programs inside 32-bit Windows. Microsoft describes it as a Feature on Demand that is supported only on the x86 version of Windows, in maintenance mode, and not recommended. On a 32-bit Windows 10 machine an administrator can turn it on with a DISM command; x64 and ARM versions of Windows do not support 16-bit x86 code of any kind. Microsoft also says the technology may pose security risks and recommends turning it off in enterprise environments. A 32-bit Windows 10 workstation kept alive to host NTVDM is therefore a stopgap on an operating system whose support ended on October 14, 2025, the end date for Windows 10 22H2, its last version. It should not be the plan.

Proving a DOS port matches the original

A DOS application usually has no tests, so the original program becomes the test. The assessment identifies the screens, reports, and files that matter. Then the original is run, under an emulator or a virtual machine, with scripted keystrokes and a fixed set of input files, and the outputs are kept: data files saved byte for byte, report text, and printed output. DOSBox-X can send the print stream to a file or to image or PostScript output, which gives a stable reference for printed reports. The ported program runs the same scripts, and the two sets of outputs are compared. Differences are either defects or documented, approved changes. Tests like these run for the life of the new system, and they make a parallel run credible before cutover.

Rules as tests in AI-assisted modernization →

Why MS-DOS applications are still in service

MS-DOS applications were the backbone of business operations in the 1980s and 1990s, powering critical functions in manufacturing, government, and small and mid-sized companies. Many are still running because they do one job well and nobody has written their rules down anywhere else. What has changed is the hardware and the operating system: 64-bit Windows does not run 16-bit code, replacement parts for the machines that do are scarce, and the people who can read the source are retiring. Modernizing them means moving the rules onto a supported platform with a database other systems can read, and the benefit is specific to each system rather than a figure we can promise in advance.

Languages behind MS-DOS applications

MS-DOS applications were predominantly built in QuickBasic, Turbo Pascal, C, and assembly. Modernizing them presents specific challenges: limited developer expertise, no support from current IDEs, and incompatibility with 64-bit systems. Our experience across 14 verticals is applied to the same end every time: find every construct that maps to a different replacement, and move the business rules without losing them.

Challenges of Legacy Hardware

Legacy MS-DOS applications depend on 16-bit and 32-bit hardware that is increasingly difficult to replace. Scarcity of parts and unsupported operating systems like MS-DOS and Windows XP pose significant security risks. For industries like manufacturing and government, this leads to costly downtime and escalating maintenance expenses.

How we modernize MS-DOS applications

We port or re-architect your software onto a current platform (C# .NET, Go, Rust, or the latest Delphi) that runs on Windows, macOS, Linux, and mobile devices. The existing business logic is preserved and proven with parity tests against the original program. Where a faster or cheaper answer is enough, we provide virtualization so the MS-DOS application keeps running on current hardware while the longer move is planned, or as the final answer when the program is stable.

Symptoms that mean it is time

A DOS application seldom fails all at once. It keeps running on whichever machine still boots it while the hardware, operating systems, and network around it change. The symptoms below are documented behaviors of the platform rather than defects in the code: real-mode memory limits, timing loops calibrated for CPUs of the 1990s, direct port access, a file-sharing model built for SHARE.EXE, and a 16-bit executable format that 64-bit Windows does not load. Each one can be worked around for a while with a compatibility setting, a spare machine, a virtual machine, or an emulator such as DOSBox. When several appear together, the workaround is carrying the business process, and the application is a candidate for a fixed-scope assessment and a planned migration rather than another patch. Treat the list as a diagnostic aid, not as a substitute for reading the source and the deployment.

  • Runtime error 200 at startup
    Turbo Pascal 7 and Borland Pascal 7 programs that use the CRT unit calibrate a delay loop when they start. On a CPU faster than roughly 200 MHz the calibration result no longer fits in a 16-bit word, and the program halts with Runtime error 200 before it reaches its own code. Patched CRT units and executable patches exist; which one applies depends on whether the source and the original compiler are still available.
  • Out of memory below 640 KB
    A real-mode DOS program, its data, its drivers, and any resident utilities all share conventional memory, the first 640 KB of the address space. Anything larger reaches memory only through EMS page frames or XMS blocks, each with its own driver and its own code path, so growth in records or features hits a fixed ceiling that no newer PC can raise.
  • Printing tied to LPT1 or a serial port
    Many DOS programs write directly to a parallel or serial port, or send escape codes for one specific printer model. Current PCs ship without those ports, a USB or network printer does not appear as LPT1 unless it is explicitly redirected, and a replacement printer needs its own escape sequences.
  • Shared data files on a network drive
    Multi-user DOS applications share data by putting files on a mapped drive and relying on byte-range locks of the SHARE.EXE era. Modern SMB clients cache file and directory metadata for several seconds by default, and changes made from another workstation may not be visible until that cache expires, so two users can read different versions of the same record; check the client caching settings before trusting the locks.
  • dBASE or Clipper indexes out of step with the data
    dBASE, Clipper, and FoxPro tables keep the records in a .DBF file and the indexes in separate .NDX, .NTX, .MDX, or .CDX files. A write interrupted by a power loss, a dropped network session, or a failed lock leaves the index pointing at the wrong records, and the only repair is a full reindex that takes longer every time the tables grow.
  • Unsupported 16-bit application on 64-bit Windows
    64-bit Windows does not include NTVDM, the subsystem that runs 16-bit DOS and Windows programs, so a 16-bit executable fails to launch with an Unsupported 16-bit application message. Windows 11 ships only as 64-bit, and Microsoft describes NTVDM as in maintenance mode and recommends turning it off in enterprise environments, which leaves a virtual machine, an emulator, or a port as the remaining options.

Start with an assessment for a DOS codebase

For a DOS application the read-only assessment inventories what decides the path: whether source exists for every executable and which compiler and version built it, the languages and memory models in use, every interrupt call, port access, and direct video write, overlays and resident programs, the record layouts and index files, the code pages in the data, the printers, serial devices, and dongles the program talks to, the batch files and drivers that start it, and the machines it runs on today. Everything is read from source, files, and configuration; nothing in production is touched. The result is a written recommendation to wrap, port, or rewrite, with the data migration approach attached. The fee is quoted after the free 1-hour consultation and creditable toward a subsequent modernization project.

About the assessment →

Deliverables

  • Modernized codebase in C# .NET, Go, Rust, or Delphi
  • Cross-platform support (macOS, Linux, Windows, mobile)
  • Preserved business logic with full test coverage
  • Documentation, runbooks, and CI/CD pipeline
  • Optional virtualization fallback for rapid timelines

Common questions

Can MS-DOS programs run on Windows 11?

Not directly. Windows 11 is 64-bit only, and 64-bit Windows does not include NTVDM or run 16-bit x86 code of any kind. A DOS program on Windows 11 runs inside an emulator such as DOSBox-X or inside a virtual machine, or it is ported to a current language. Which one fits depends on the program's printing, serial devices, and data files.

How do I run a QuickBasic or Turbo Pascal program on a modern PC?

Run the compiled .EXE in DOSBox-X, or in a virtual machine with a DOS installation. Both work for many programs; speed settings, printing, and serial ports usually need adjusting. To change the program, you need the source and the original compiler, or a port of the source to C#, Go, or Rust. The assessment checks which of those you have.

What if we only have the .EXE and no source code?

Then the realistic options are to keep running the executable in a managed emulator or virtual machine, or to rebuild the application from its observed behavior, its screens, reports, and data files. Recovering readable source from a compiled DOS program is not something we promise. The assessment confirms first whether source or an older backup exists anywhere.

Will our dBASE, Clipper, or fixed-record data files carry over?

Yes, through a migration script. Each file layout is documented from the source, the text is converted from its DOS code page, such as 437 or 850, to Unicode, and the data is loaded into a database such as SQL Server or PostgreSQL. The load is rehearsed and compared against the original files before cutover, and the old files are kept as the reference.

How do I print from a DOS program to a USB or network printer?

Most DOS programs print to LPT1 and send printer-specific escape codes. DOSBox-X can emulate an Epson ESC/P2 printer and send the output to a Windows printer or to PNG, BMP, or PostScript files, but the output is black and white and not every command is supported. A port replaces the printing layer with a proper Windows or PDF report.

Can the DOS application keep running during the migration?

Yes. The original stays in production, on its current machine or in a managed emulator, while the replacement is built and tested beside it. Both run on the same inputs, the outputs are compared, and users switch module by module or site by site. The original is retired only after the comparison results are accepted.

How much does MS-DOS modernization cost and how long does it take?

The bands on this page apply: $5,000–$100,000, and weeks for virtualization up to several months for re-architecture. Wrapping the original program in a virtual environment sits at the low end. A full port or rewrite with data migration and parity testing sits at the high end. The price and schedule are fixed after the Legacy Software Assessment.

Sources

Not sure where to start?

Start with a fixed-scope Legacy Software Assessment: a read-only review of your application’s source, database, configuration, logs, and architecture, ending in findings with evidence and a written recommendation. Quoted after the free 1-hour consultation; creditable toward a subsequent modernization project.