screenshot of DOS programming

For developers

Get started in programming with the compilers, debuggers, and other programming tools included in FreeDOS. You can also modify FreeDOS itself, because we provide our source code under an open source license.

These links are provided as a convenience and do not constitute endorsements or approval. The FreeDOS Project does not bear responsibility for what you download from these websites.

FreeDOS is a collection of programs and utilities, so not everything is in one place. The FreeDOS kernel is currently maintained by Jeremy Davis and the source code is on his GitHub project. Find all other FreeDOS source code in our GitLab repository:

Free programming tools

Our preferred C compiler for FreeDOS programs is OpenWatcom C, and our preferred assembler is NASM:

OpenWatcom 1.9

OpenWatcom is a great open source compiler that we recommend for FreeDOS programmers. Version 1.9 is the last official version, although that project seems to have stalled.

OpenWatcom 2

Developers have forked the OpenWatcom compiler to create a "version 2" under active development. You can also use this version of OpenWatcom to create your FreeDOS programs.

Netwide Assembler (NASM)

NASM is an open source assembler for the x86 CPU architecture, including DOS targets. We recommend NASM for assembly programming in FreeDOS.

You can also find great DOS programming tools on these websites:

No AI policy

Like many others in open source, the FreeDOS developers are concerned about AI creeping into open source projects. There are good reasons to not allow AI in the core parts of FreeDOS. Concerns include how the AI was trained, and if AI might (accidentally?) include verbatim code from proprietary or other incompatibly licensed projects. Also, US courts find that AI generated content is not eligible for copyright protection, which causes issues for open source licenses.

This policy captures the No AI consensus from the FreeDOS developer community:

Scope

Any package or program from the core parts of FreeDOS: the kernel, command.com, append, chkdsk, debug, edit, fc, graphics, himem, label, mem, and other standard "DOS" commands.

This also includes other packages that get installed with a plain DOS installation, such as the package manager and supporting tools.

Code

We do not allow AI for writing code.

It's okay to use AI to summarize a contribution such as a PR or email submission, or to use AI to help identify bugs. But the code must be 100% written by a human.

Documentation

We do not allow AI for writing documentation.

However, it's okay to use AI tools to provide spelling and grammar edits. But do not use an AI tool to rewrite a document to meet a target, such as Grammarly.

Translation

AI can be used to translate spoken languages.

This has been done for years, such as Google Translate. While machine translation isn't perfect, it is usually good enough until a human can provide a translation.

Technical information

We've collected links to several reference guides and tutorials here:

Ralf Brown’s Interrupt List

Ralf collected this comprehensive list of interrupt calls, IO ports, and more about DOS and the IBM PC. Divided into six parts, plus a FAQ list:

256-color VGA Programming in C

David Brackeen has assembled this five-part tutorial on VGA programming in DOS. This was originally created for a technical writing course in 1996:

Graphics Programming Black Book

Michael Abrash's book is a collection of tutorials and writings about assembly language and graphics programming. Published by Dr Dobbs Journal:

You can find more technical notes on these websites:

These YouTube videos show you how to write your first programs: