Proof of concept for building a Rust program for MS-DOS
APACHE-2.0 License
This is an attempt at building a Rust project to target MS-DOS in protected mode via DJGPP, supporting x86 CPUs architectures from i386 to i686.
To engage in the discussion to reach this goal, please check out this GitHub issue and this thread. After many different attempts, the one that seems the most promising right now is the conversion of ELF .o objects into DJGPP COFF32 objects.
This project also contains a few preliminary modules that grant easier access to DOS-specific capabilities, namely port I/O, calling interrupts, and VGA graphics.
In this repository you will find:
While there are not many stability and performance guarantees at the moment,
the proofs of concept written so far appear to work as intended.
There is no std
support,
but an allocator is available.
The development experience is also not as fluid as it could be.
The Rust program exports a C main function,
so it exists as a static C library.
The compiled objects need to be converted
before they are linked together using i686-pc-msdosdjgpp-gcc
.
Known caveats:
f32
or f64
may be unreliable,elf2dgpp
./build.sh
# or
./build.sh release
Some variables in the script can be tuned to your liking.
Copy the resulting dos_rs.exe
file into your DOS environment,
with CWSDPMI.EXE
alongside it.
It should then be ready to run on a DOS machine, virtual machine, or emulator.
Serentty/rusty-dos: a repository presenting a semi-successful attempt at compiling a Rust program running in 16-bit real mode DOS.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.