Bochs is an open-source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms. It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently, Bochs can be compiled to emulate a 386, 486, Pentium, Pentium Pro or AMD64 CPU, including optional MMX, SSE, SSE2 and 3DNow! instructions.
Bochs is capable of running most Operating Systems inside the emulation including Linux, DOS, Windows 95/98 and Windows NT/2000. But because Bochs emulates every x86 instruction and all the devices in a PC system, it is used extensively for debugging new operating systems. The Bochs debugger lets you simulate quickly or slowly, pausing whenever you want to look at the contents of memory or the CPU registers. Or, if you wanted to study which parts of a program take the most time, you could use Bochs to measure how often certain pieces of the code were executed.