Hello everyone,
I wanted to share a success story regarding the use of the Ada programming
language on FreeDOS. After some trial and error with modern cross-compilers and
various DJGPP versions, I have successfully stabilized a native Ada development
environment.
Environment:
I am currently running FreeDOS 1.3 in QEMU (on a Fedora host), but given the
nature of the toolchain, this setup should work perfectly on the newer FreeDOS
1.4 as well.
The GNAT/DJGPP Stack:
To get GNAT working, I used the following specific versions from the DJGPP
archives, as they provide the most stable 32-bit protected-mode experience:
djdev205.zip (C Library & development base)
bnu2351b.zip (Binutils)
gcc346b.zip (GCC 3.4.6 core)
ada346b.zip (GNAT 3.4.6 compiler and runtime)
csdpmi7b.zip (CWSDPMI for DPMI support)
Installation Steps:
I bundled these ZIP files into a custom ISO under Linux using mkisofs:
mkdir -p ~/dos_transfer/djgpp
mkisofs -o ~/djgpp_install.iso -J -r -V "DJGPP_ADA" ~/dos_transfer
I launched QEMU with sufficient memory for the Ada compiler:
qemu-system-i386 -enable-kvm -m 64 -hda freedos.img -cdrom install.iso
I extracted all archives into C:\DJGPP and updated FDAUTO.BAT with:
SET PATH=C:\DJGPP\BIN;%PATH%
SET DJGPP=C:\DJGPP\DJGPP.ENV
Result:
The command gnatmake hello.adb successfully compiles, binds, and links the
source into a functional DOS executable. The 32-bit Ada runtime feels very
responsive under FreeDOS when backed by the CWSDPMI provider.
I am glad to confirm that in 2026, Ada remains a viable option for those of us
interested in modern-ish programming on a retro-DOS platform. If anyone is
planning to try this on a fresh FreeDOS 1.4 install, I would be interested to
hear if the experience is as smooth as it was on 1.3!
The goal is to use this ADA environment to compile:
https://github.com/zertovitch/hac/tree/master
"HAC is perhaps the first open-source (albeit very partial) Ada compiler fully
programmed in Ada itself."
Which should make it easier to people to use ADA in DOS in a "interpreter"
way... but limited programming.
Best regards,
Paul
Content of HELLO.ADB:
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line("GNAT sur FreeDOS fonctionne!");
end Hello;
gnatmake HELLO.ADB
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel