Welcome to PDOS (Public Domain Operating System) and PDPCLIB (Public Domain Project C Library)

For the benefit of blind and deafblind users, the above pictures, which are in fact just text, as everything in PDOS is, can be found in text format here demonstrating it working from floppy under Bochs but not hard disk. Both sets of pictures are historical.

There are two major components to the PDOS project:

PDOS: Public Domain Operating System

This is an operating system, with a user interface as simple as MSDOS, but behind the scenes the story is quite different. One distribution supports both 32-bit Windows (subset) and 32-bit MSDOS (there was never a real one of those). One distribution supports the MVS API (subset) in AMODE 24, 31 and 32. One distribution supports 16-bit MSDOS (subset).

PDPCLIB: Public Domain Project C Runtime Library

The most commonly used component, thanks to GCCMVS (port of GCC to IBM mainframe) is PDPCLIB which is a public domain C runtime library which you can link your own C programs against to produce executables with no licencing restrictions (even if you use a compiler, commercial or non-commercial, that does have licencing restrictions). PDPCLIB works on MSDOS, OS/2, Win32, PDOS/386, MVS (mainframe), CMS, VSE, AmigaOS. The library conforms to the ISO/IEC 9899:1990 (aka ANSI X3.159-1989 aka C90 aka C89) standard. It has no extensions so is particularly good at finding out if your code is truly portable.

PDOS/386 hard drive image

Base functionality of PDOS/386 has now been completed. No further functionality is required for a basic functional system. What remains is debugging. A disk image is available here. It is suitable for burning to USB (using a utility such as Win32 Disk Imager) to boot on real hardware, or it can be run under an emulator, e.g. Qemu with "qemu-system-i386 -drive file=pdos.vhd,index=0,media=disk,format=raw" or Bochs. When you boot it, you can type "dir" or "help" or "type /p readme.txt" for more info. Every OS-related byte on that disk is public domain, starting with the MBR (which I didn't write, but I found a PD version). Note that the disk image is 1 GB so you need a USB stick that is at least 1 GB in size. In order for the USB stick to boot, you will need a PC that supports booting from USB stick as a hard disk image, and it will also need to support "legacy boot" (ie have a BIOS). You probably need to disable "secure boot" before legacy boot is allowed. Some modern PCs don't support legacy boot so maybe next time you buy a PC make sure you can boot PDOS/386 from USB stick. Also there is an old floppy disk image here if you prefer that. There is also a distribution of Freedos here built using this procedure that provides an alternative to developing PDOS using Windows. It is more robust than using PDOS to develop PDOS (PDOS is self-hosting to some extent).

University Challenge 80386

It is September 1986 and the Compaq Deskpro 386 has been released. This time the 40 MB drive has a PDOS/386 distribution installed on it. It contains pure public domain code. Due to the limits of what has been released to the public domain, only SubC is available, which gives you a subset of C90. But it's better than having to write in machine code. Your challenge is to produce a 32-bit competitor to MSDOS using just what is on this disk. Theoretically everything you need is on this disk. Get the 40 MB disk image here.

University Challenge 8086

It is March 1983 and the IBM PC XT has been released. You got a 20 MB drive instead of the standard 10 MB drive and instead of MSDOS/PCDOS 2.0, it comes with PDOS/86. It contains pure public domain code. Due to the limits of what has been released to the public domain, only SubC is available, which gives you a subset of C90. But it's better than having to write in machine code. Your challenge is to produce a better 16-bit competitor to MSDOS using just what is on this disk. Theoretically everything you need is on this disk. Get the 20 MB disk image here.


Because of the importance of SubC, that is where development is now focused. The latest source code and MSDOS library can be found here.

Android Smartphone

There is an emulator called "Bochs" available from the Google Play Store which essentially turns your phone into a PC. Even a cheap US$40 Android phone with 1 GB of memory and 8 GB storage can be used. No phone service is required. Using bluetooth, you can transfer data between an Android PC and a Windows PC using a VHD instead of what would traditionally have been done using a floppy disk. A small (9 MB) VHD is provided here. You use this as a second hard drive so that it becomes your D drive.

Public Domain Software Philosophy

It is hoped that programmers from around the world who subscribe to this worldview will make themselves available to push this project forward.

Source code and Documentation

You can find source code and documentation for PDOS and PDPCLIB in text files in the downloadables from the file area here. Don't just click on "download". That gets you a development tool. I'm not sure how to prioritize what "download" points to. Source code is also included on the hard disk image.

Development Tools

Note that I use custom tools which you can find here (and are included on the hard disk image) and binaries here to build PDOS/386 under Windows. The latest Freedos beta can also be used. In the past I did not provide executables for the tools so other people produced some (which are also useful even if you are using Windows). Vu The Huy (who also works on PDOS) from Vietnam has independently created executables which can be found here. I ran my 6144-byte (if you don't have a hex dump utility already, then at least verify this size when you download it) md5 "AD7DF06D7519EDD95AC902ACB6077C92" (and hexdump output is here) utility (but note that it is probably technically incorrect, because it doesn't produce the same value as seen here when run on those files) on pdwdev.zip and it produced an ID of "8BFF6BB095F5536307CB6CBC6792699E". I unzipped it using mvsunzip "249FDD9305AAD039998156A9882047C8" ("mvsunzip pdwdev.zip binary"). Both of those utilities come from OZPD and if you aren't running normal Windows (e.g. you are running Freedos + HX) you may need my own version of msvcrt.dll. The executables are basically identical (just timestamp differences I think) when a binary compare is done, but because ldwin embeds the executable name, and Huy changed windows.mak, to reproduce the results you also need to change gcc-new.exe to gccwin.exe/gcc386.exe. If you want total integrity, do not rely on any executables that you didn't build yourself from source. Not sure what you can use as a reliable starting point though. If you trust either Open Watcom or Borland C++, you can build gccwin using those tools (see the *.mak files in the GCC distribution I provide). Visual Studio can also be used to do the build, but for some reason the resultant executable isn't reliable enough to allow gccwin to rebuild itself. Hopefully Huy will also create a complete Freedos disk image and I will link to that if he is successful, so you will have a complete standalone build environment.


The PDOS/386 disk image I ship used to contain only public domain material. However, there is lots of other useful software out there that is freeware, just not public domain. I let other people build that and you can download that and copy it onto the disk yourself. Or they may provide complete disk images for your convenience. I will update this as more people report having built something useful.

Emy Grace Alday from the Philippines has compiled a modified (by me) Micro-Emacs 4.00 (a text editor, just like "notepad" is a text editor, except notepad is GUI-based while micro-emacs is a text mode application) and made it available here. I compared the e.exe, MD5 "0309E15406EF4BB869D75E14C17F44A8", and it is identical to the one I built on my own system. Not even timestamp differences, because this is an a.out executable which doesn't embed timestamps. Note that a.out executables ONLY work on PDOS/386. A version that works on both normal Windows and PDOS/386 will hopefully be produced in the future. Useful keystrokes are ctrl-x, ctrl-s to save, ctrl-x, ctrl-c to exit. ctrl-g a couple of times if you make a mistake. Put the emacs.rc in the same location as the e.exe.

Huy has built Micro-Emacs for Windows (should run on everything since Win95 plus Freedos+HX, but not PDOS/386) and it is available here. I compared the e.exe, MD5 "13C0F06BE476C6F5F3EAC14B67E1C663", and it is just 6 bytes different from the one I built, due to the usual timestamp differences. Also he has built bwbasic here. bwbasic.exe has MD5 of "6CC6C29991DC6EA06FEDBE38022D17B3" and renum.exe has MD5 of "2C8347CA01E0556FBBF89BEAA48338DE". 9 bytes and 8 bytes different to mine respectively.

Chabbie from the Philippines has built "rm" and made it available here with MD5 "1A54F4F9E78FF7F11257472202D0EC52" and it passed my usual checks (6 bytes of timestamp differences). Note that if you download any packages that say "use pdmake", the makefiles often have "rm" in them to delete files, but without rm available, pdmake will stop. Unless you specify "-i" to ignore errors, but that ignores all errors, so it is not a good option. So this is an important utility to have. The source code is available in the "ozpd" link. Note that it was built by renaming rm.c to pdptest.c and running "pdmake -i -f makefile.msv" so you will need to do that if you wish to reproduce the exact executable.

Official slogan

Whenever your computer is force-rebooting or crashing, or spending 5 hours doing an update, or running slow, always remind yourself "This wouldn't happen on PDOS".


"Best 32-bit 80386 public domain C90 operating system starting with the letter 'P' that fits on a 360k floppy that I have used in the last 2 weeks!" - Paul Edwards.

"fun fact: i have this PC i wanted to put windows 11 on, but windows 11 literally somehow doesn't fucking work, or it works every other boot, for some obscure reason -- you know what worked on every boot on the same machine? PDOS" - Mintsuki.

"when windows is busy bluescreening for no reason, pdos doesn't, which is good" - Killaship1

Programming Tutorial

Now that both BASIC and C are available, you may be interested in learning how to program by following the tutorial here or. here

Roll Your Own

Included here is a Windows VHD image that can be mounted by going to a command prompt and typing "diskmgmt.msc". You can then add your own things to it, dismount it, and boot it under Bochs. You should really replace the MSDOS.SYS and COMMAND.COM too, but the IO.SYS is a bit tricky to replace. A VHD can also be burned to USB stick with Win32 Disk Imager if you select "all files" instead of "*.img", so that you can have a standalone system. It can also be used with Oracle VM Virtualbox meaning that PDOS runs at full native speed.

Some old distributions were produced independently of me.

Chabbie has created her own distribution here called Chabbie/386 which includes bwbasic and micro-emacs plus the programming tutorial so you may be able to learn how to do programming using just this.

Red has created his own distribution here called Red/386. You'll have to download it yourself to see what it contains.


There is a beta version of PDOS for the mainframe (z/PDOS) available here.


There is a beta version of another form of PDOS, "generic", which relies on an existing OS to act as a glorified "bios" meaning it is written in pure C90 and should be able to run on any platform. Version tested for Windows available here and version tested for Amiga available here. You run by going "bios.exe pdos.exe pdos.vhd". Available commands are "dir", "type" and "exit".


Most discussion of PDOS and PDPCLIB takes place here, amongst mainframe enthusiasts. PDOS is also mentioned in the alt.os.development newsgroup. There is an old BBS sometimes available at bbs.pdos.org 64000 but it doesn't have functionality to field support questions. I am determined to ensure that PDOS is not a one man show. To that extent I am currently running a BBS that can be reached using the "devil dialer" (historical name) which sends and receives files using zmodem after a connection is established using a traditional protocol called Wazoo. You can reach the BBS at kerravon.mooo.com 64001. You can send a message in any file. If you send code, including bug fixes, please specify that it is public domain. Also let me know if you wish your message to be private, otherwise I treat incoming messages as forum posts, and you can keep track of progress by requesting "forum.txt" from my BBS.

E-mail Paul Edwards here.