Fabrice Bellard has created a PC emulator written in Javascript. The emulated hardware consists in:
• a 32 bit x86 compatible CPU
• a 8259 Programmble Interrupt Controller
• a 8254 Programmble Interrupt Timer
• a 16450 UART.
The code is written in pure Javascript using Typed Arrays which are available in recent browsers. It was tested with Firefox 4 and Google Chrome 11 on Linux, Window and Mac (it does not work with Chrome 12 beta, it is a bug in the browser). In any case, a fast Javascript engine is needed to have good performance. Fabrice has compiled a 2.6.20 Linux kernel . An uncompressed kernel image is used instead of a compressed one to have a faster boot. It is generated with "objcopy -O binary vmlinux vmlinux.bin".
Javascript PC Emulator - Technical Notes
http://bellard.org/jslinux/ <- How much time takes your browser to boot Linux?