Detecting floppy disk drives using CMOS

As a hobby project I am working on a small OS project for i386 (and ARM). Recently I was writing a driver for floppy disk drives and I stumbled on to a issue that I needed to find a solution for. The issue was how to detect if any or how many floppy disk drives are present on a given system. I quick google informed me that the CMOS was normally used for this and the page provided some getting started information on how to detect floppy disk drives. The #osdev wiki also had some good information about the CMOS. Using this information I started implementing a very simple FDD detection routine to use in my OS.

First a bit about the CMOS: The CMOS is a static memory chip used to store information for the BIOS while the computer is powered down. The CMOS memory is located on the same chip as the real time clock. Because of this developers normally think of the RTC to be a part of the CMOS, even though it is not. The CMOS can be accessed via port IO. It uses the ports 0x71 and 0x70. To read data you send the number/id of the register you want to read from to port 0x70 and the value of the register becomes available from port 0x71.

With this information in my mind I then started on my implementation. Using the documentation from the #osdev wiki I knew that the information about the floppy disk drives was present in register 0x10 and all I had to do was to read it.

My implementation became as follows:

New website and my experience with Jekyll

After I took down my old website I wanted to get a new site up and running. I did not want to use any CMS systems like WordPress, Joomla, Drupal etc. So I wanted to check out Jekyll. I had heard good things about this static CMS system.


Jekyll is a simple, blog-aware, static site generator. It takes a template directory containing raw text files in various formats, runs it through a converter (like Markdown) and our Liquid renderer, and spits out a complete, ready-to-publish static website suitable for serving with your favorite web server.

The documentation on was a bit of a letdown. It helps you getting started using Jekyll, but not too much more than that. I had trouble finding some examples that I could have a look at. Jekyll is used by many bloggers, and doing a quick google I found many blog posts on how to use Jekyll and many examples on github to get inspiration from.