Live data from Hacker News

Visual x86 emulator

thlorenz.com

21–30 of 31 posts

Re: Visual x86 emulator

#21
post #20

How do I change the code?

That was my first thought too - "here are some example instructions, moving the cursor around changes some registers... but I want to assemble a little program to try it out."

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.

Re: Visual x86 emulator

#22
post #17

Not quite as cool as the visual 6502: http://www.visual6502.org/JSSim/index.html

That's nice, thanks for the link!

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.

Re: Visual x86 emulator

#24
post #20

How do I change the code?

That was my first thought too - "here are some example instructions, moving the cursor around changes some registers... but I want to assemble a little program to try it out." 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.

As I pointed out this project is in it's infancy. I merely tweeted about progress and it ended up here ;)

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).

Re: Visual x86 emulator

#26

Nice work, this is really cool! 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.…

Code is really not doing anything, it would be equivalent (in output that is) to he following code with some sort of optimization.

unsigned short data[8] = {0, 0, 0, 0, 0, 0, 0, 0};

for(int i=0;i

   data[i] += 0xff1;
}

for(int i=0;i

   data[i] += 1;
}

data[0] = 0x7fff;

data[0] += 1;

data[0] += 1;

And so on.

So yea, nothing special.

Re: Visual x86 emulator

#28

Nice work, this is really cool! 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.…

Code is really not doing anything, it would be equivalent (in output that is) to he following code with some sort of optimization. unsigned short data[8] = {0, 0, 0, 0, 0, 0, 0, 0}; for(int i=0;i data[i] += 0xff1; } for(int i=0;i data[i] += 1; } data[0] = 0x7fff; data[0] += 1; data[0] += 1; And so on. So yea, nothing special.

More interesting snippets are coming once I can emulate more instructions. These are the ones it currently can do: https://github.com/thlorenz/visulator/tree/master/test/fixtu...

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.

Post reply on HN