Feeds

Linux kernel runs inside web browser

JavaScript mimics 486 PC

The Power of One Brief: Top reasons to choose HP BladeSystem

An independent programmer has used JavaScript to build a PC emulator capable of running Linux inside a web browser.

French hacker Fabrice Bellard says his JavaScript PC Emulator can run the 2.6.20 Linux kernel inside Mozilla's Firefox 4 and Google's Chrome 11, two browsers designed to significantly advance JavaScript speeds. "I did it for fun, just because newer JavaScript engines are fast enough to do complicated things," Belllard writes. But he believes the emulator could be used to benchmark JavaScript engines.

According to Bellard – known for creating the FFmpeg open source multimedia project and the QEMU processor emulator – his JavaScript PC emulator is about two times slower on Chrome's V8 JavaScript engine than on Firefox's Jaeger Monkey engine, and this was promptly seized upon by JavaScript creator Brenden Eich, who's now the chief technology officer at Mozilla. Bellard tested the 32-bit version of both browsers.

Douglas Crockford - the man who "discovered" JSON and now servers as senior JavaScript architect at Yahoo! – recently released a new JavaScript benchmark based on JSLint, his own JavaScript code quality tool. Firefox 4 bested Chrome on this test too, as did Microsoft's Internet Explorer 10 preview.

Fabrice Bellard wrote his PC Emulator with pure JavaScript using the typed array specification, which provides an API for using native binary data, and he has tested his creation on browsers running atop Linux, Windows, and Mac OS.

The emulated hardware includes a 32-bit x86 compatible CPU, a 8259 programmable interrupt controller, a 8254 programmable interrupt timer, and a 16450 UART (universal asynchronous receiver/transmitter). According to Bellard, the emulated CPU is comparable to an Intel 486 chip, though it does not include a floating point unit. Bellard was able to emulate a floating point unit, however, using the Linux kernel.

Bellard believes his emulator could be used for client-side cryptographic processing. Or – if you're looking for a more serious pursuit – he also points out it could eventually let you play old DOS games. ®

The Essential Guide to IT Transformation

More from The Register

next story
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
KDE releases ice-cream coloured Plasma 5 just in time for summer
Melty but refreshing - popular rival to Mint's Cinnamon's still a work in progress
NO MORE ALL CAPS and other pleasures of Visual Studio 14
Unpicking a packed preview that breaks down ASP.NET
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
Put down that Oracle database patch: It could cost $23,000 per CPU
On-by-default INMEMORY tech a boon for developers ... as long as they can afford it
Another day, another Firefox: Version 31 is upon us ALREADY
Web devs, Mozilla really wants you to like this one
Google shows off new Chrome OS look
Athena springs full-grown from Chromium project's head
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Securing Web Applications Made Simple and Scalable
Learn how automated security testing can provide a simple and scalable way to protect your web applications.