I came across this on Hacker News and it blew my mind. Fabrice Bellard just created a PC emulator that boots Linux, written in JavaScript. It even works on my iPad.
From the technical notes …
The PC emulator is written in Javascript. The emulated hardware consists in the following devices:
- 32 bit x86 compatible CPU
- 8259 Programmble Interrupt Controller
- 8254 Programmble Interrupt Timer
- 16450 UART
- Real Time Clock.
The code is written in pure Javascript using the W3C Typed Arrays. A slightly slower fallback mode is implemented for browsers missing this support. For the exact list of supported browsers, see the FAQ.
It’s officially supported by
- Firefox 4.x
- Chrome 11
- Opera 11.11
- Internet Explorer 9
Hot damn.