Visual x86 emulator
thlorenz.com
thlorenz.com
Seems to serve a different purpose tough. visulator is supposed to help you learn how a CPU processes opcodes (at an abstract level) instead of looking at actual hardware wiring.
I'll link to it from the visulator readme though.
But I'm kinda missing the point. I think it would be very helpful to put some corresponding C (or pseudo-C) code. I understand assembly, but it would take me forever to parse out what this program does.
Also, a few design issues (on Windows 8, Chrome):
- The bold font in the registers is difficult to read.
- The dark colors (blue and maroon) in the register names are difficult to read.
- The columns of the register table don't quite line up with their headers.
That's not the point. All this is trying to show is how assembly and a CPU works. Understanding the program is secondary.
Additionally there is no C code for this as the assembly was written directly.
unsigned short data[8] = {0, 0, 0, 0, 0, 0, 0, 0};
for(int i=0;i<8;i++) {
data[i] += 0xff1;
}for(int i=0;i<8;i++) {
data[i] += 1;
}data[0] = 0x7fff;
data[0] += 1;
data[0] += 1;
And so on.
So yea, nothing special.
I agree though that a more interesting example would be nice and I'll try to come up with one even with what it can do now.
It's interesting that the example shows overflow, but doesn't show the flags register. I'm not a web dev generally, but I think I may fork this one to show it as it exists in the emulator, it's just not rendered.
This is the next feature I've planned. Hopefully I can get this done tonight - check back soon :)
It'll be visualized with LEDs that light up when a flag is set.
Exactly this is just a start and I'm actively working on it. Editing the assembly could be an option, but I also plan to allow users to load simple binaries into it. This way you could edit the assembly, assemble it and load.
However please file an issue with feature suggestions on github so we can track what people want.
Also I do accept pull requests that fix some styling issues (I myself am color blind). Just update the CSS [here](https://github.com/thlorenz/visulator/blob/bad27bc164c1ba173...)
I think an "emulator" that doesn't let you run your own code in it is not an emulator. It's only an interesting visualisation.
See [status](https://github.com/thlorenz/visulator#status) -- indicating in experimental stage.
I'm planning to allow loading binaries and also editing assembly (assembling it in the browser so the CPU emulator can run the opcodes).
It currently already contains a memory unit and supports push/pop instructions. More memory related instructions will be added.