Skip to content

clang-dos SDK

C and C++ for MS-DOS, 16-bit Windows and the rest of the retro family, with a modern clang. This repository builds the DOS sysroot (picolibc, compiler-rt and libc++ for every memory model, from tiny .COM files to huge), the DOS graphics and text-mode libraries, and the clang-dos toolchain packages that bundle every clang-retro target in one download.

clang --config=dos.cfg -Os hello.c -o hello.exe
clang --config=dos.cfg -mcmodel=tiny hello.c -o hello.com
clang++ --config=dos.cfg -mcmodel=large -Os app.cpp -o app.exe

The CXL demo, built with clang-dos, running in DOSBox

The CXL demo program, built with clang-dos, in DOSBox.