Gathering Information

Once you have considered your OS design you will need detailed information on hardware and CPU structures. Some information to start you off follows here.

The machine architecture

For the PC architecture including I/O port locations see the following.

  • Specific topics on this website
  • The Undocumented PC. Frank van Gilluwe
  • The Indispensable PC Hardware Book - second edition. Hans-Peter Messmer. Avoid the fourth edition which in many respects is more vague.
  • IBM Technical Reference: Personal Computer/AT. Hard copies are out of print and hard to obtain but see
  • IBM PS/2 and MCA reference manuals. While few machines still follow the PS/2 specifics the MCA manuals can provide details of operation of the basic PC hardware
  • HelpPC
  • ISA System Architecture. MindShare Inc. Tom Shanley, Don Anderson.
  • PCI System Architecture. MindShare Inc.
  • USB System Architecture. MindShare Inc.
  • Plug and Play System Architecture. MindShare Inc.
  • Other MindShare Inc PC System Architecture Series books.

For the Nintendo DS architecture see nintendo-ds.
For the Raspberry Pi see raspberry-pi.


A PC BIOS will boot the first user-provided code in 16-bit (x86-16) Real Mode (RM). If you want to write software to run at that point try a web search for 8086 programming.

You would probably prefer to write for at least the IA-32 Intel 32-bit architecture (also known as i386 or x86-32) as found on 80386 and later CPUs such as 80486, Pentium and 'Core' CPUs from Intel and on Duron, Athlon and Turion CPUs from AMD. Any of these CPUs can be transitioned from Real Mode to Protected Mode (PM). The instruction set of PM is much more regular and is easier to learn and use, albeit that the tables needed to maintain PM add complexity.


Memory Management

IA-32 Protected Mode

IA-32 Optimization

The Mouse and Keyboard

When programming keyboard operations it helps to bear in mind that the keyboard controller and the keyboard are distinct devices. Although some reference works mix the protocols together each device has its own set of commands and responses as shown below.

For your driver model you may find it helpful to have separate drivers for keyboard and controller. However, they must communicate. The keyboard driver can interact with the keyboard only by talking through the keyboard controller such as by using the services of the keyboard controller driver. Furthermore, a PS/2 mouse driver will also communicate via the same controller.

File Systems

A list of disk images that you can test your file system code with

Information on specific filesystems

File formats

Data structures

Most will be contained in the manual for your target CPU but see also

Media Devices

Some links:


  • You will need to know how to program the PCI, either via port IO, or via the BIOS
  • You will need to know which type of USB controller you are using: xHCI, EHCI, UHCI, or OHCI.
    • The EHCI controller has multiple UHCI or OHCI controllers.
    • The xHCI controller handles all speeds of the EHCI, UCHI, and OHCI controllers.

Some links:

Development tutorials

Also, search the Internet for OS development tutorial videos.

Other info

Next Step

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License