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
-
Get the toolchain
One package for Linux or Windows with clang, lld, JWlink and every sysroot. Start with the toolchain package, or grab the nightly release.
-
Choose a memory model
Tiny, small, medium, compact, large, huge or huge16: which one fits your program, and the flags for it.
-
Write for DOS
Building programs, near and far pointers, interrupt handlers and C++ with libc++.
-
Full-screen programs
BGI graphics, Fastgraph, conio, curses, a text-mode Windows API, CXL and Turbo Vision: graphics, console and windows.
-
Windows, Amiga, Atari, Mac, OS/2
The other platforms have SDKs and sites of their own: see all clang-retro projects.
-
Build it yourself
What you need, building a sysroot, the tests and CI and releases.
