# dos-rs **Repository Path**: necrocoder/dos-rs ## Basic Information - **Project Name**: dos-rs - **Description**: No description available - **Primary Language**: Rust - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-08-18 - **Last Updated**: 2026-08-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dos-rs Create DOS protected mode programs with Rust! ## Wait, what!? Why? Because it is possible! ![running hello in dosbox](./docs/hello.png) ## How? This (ab)uses the fact that the Watcom linker can consume elf objects. The Rust code creates a static library that then gets linked with a small OMF object, that just defines a stack segment, into a dos32x executable, using the dos32a extender. The idea is that the dos::* and dpmi::* modules will support all int 21h and DPMI calls, respectively. ## Dev setup This uses [Nix](https://nixos.org) for pulling in dependencies and creating a dev environment. Install Nix and issue `nix-shell` in the directory to get a shell with all the tools. If you are not using Nix, you will need - GNU Make - Rust nightly - OpenWatcom (with $WATCOM pointing to the installation) - Dosbox/MS-DOS/FreeDOS etc. for running the code To build all examples, use `make`. To build a specific example, use `make `. The resulting executables can then be run with dosbox (included in the shell) or on MS-DOS/FreeDOS etc.