To build Snowdrop OS, simply download the source code package from the Downloads page. I recommend using Windows XP 32bit, since that's what my development environment was.
Requirements for building Snowdrop OS
Works on: Windows XP 32bit, Windows 98, Windows 95
Doesn't work on: Windows 7 64bit
The tools used to build Snowdrop may work on other Windows versions; just give it a try! However, I think that it is unlikely that they'll work on 64bit versions.
Building the Snowdrop OS is simple - run the "make.bat" file in the project's root directory, and then locate the generated Snowdrop OS disk images inside the "disk" directory.
The following are created:
- "output" directory - will contain all generated binaries, such as kernel, apps, and boot loader, as well as static files, such as the kernel configuration file
- "disk" directory - will contain Snowdrop OS disk images, such as the floppy disk image and the CD-ROM image
: if you have Cygwin installed, the generation of the CD-ROM image may fail (however, the floppy image creation should still succeed). The reason for this is that cygwin1.dll is included with the cdrtools (which create the CD-ROM image from the floppy image) so that it works on systems without Cygwin. The provided cygwin1.dll may conflict with the installed Cygwin.
Extending Snowdrop OS
You are encouraged to modify and extend Snowdrop OS with your own system calls (provided by the kernel), or by creating apps for it. I used the Nasm assembler for all the development, but you can use whichever one you prefer.
To extend the Snowdrop kernel:
- implement your service routine in a separate source file
- include your source file at the bottom of src\kernel\kernel.asm
- inspect the kernel_init_interrupts procedure in src\kernel\kernel.asm to see how each interrupt handler is registered, and register your own
Writing your own Snowdrop OS app
Writing your own app targeting Snowdrop OS is very similar to writing a COM program in DOS. The main exception is that you cannot rely on int 21h, which is DOS-specific.
Take a look at the source code of the "hello" app in src\apps\hello.asm. It is the most bare-bones program which fully respects the Snowdrop OS app contract.
Then take a look at build\assemble.bat to see how to assemble your program using Nasm. The binary has to have a .APP extension in order to be recognized as an app.
Make your own program bootable
You can also decide to have your app run automatically upon booting by specifying its name in the SNOWDROP.CFG kernel configuration file.