Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Silly question, but is there an x86 instruction set emulator written in JavaScript? Not even Linux, just something that takes x86 instructions into a "virtual CPU" and lets you run the assembly statements?


Yep, v86 [0] is what you're looking for!

There's even a demo with Linux 3. [1]

[0] https://github.com/copy/v86 [1] https://copy.sh/v86/?profile=linux3


Not a silly question at all. I would also like to know this. Would be a fun way to play around with assembly without the need of a tool chain etc. Maybe even on your phone while on the train. If this doesn't exist already, I'd be happy to start working on something like this.


You could probably start from here: x86 Linux running in a web browser, also by Fabrice Bellard. http://bellard.org/jslinux/


Well, each and every PC emulator implemented in Javascript contains an x86 instruction emulator.

For example: http://copy.sh/v86/

And many others...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: