Hacker News new | past | comments | ask | show | jobs | submit login

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.

- The columns of the register table don't quite line up with their headers.




> I think it would be very helpful to put some corresponding C (or pseudo-C) code

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.


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


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.


Please file an issue on github, so I can track these problems and fix them. As I mentioned I'm color blind and could use some styling help via a pull request :)


I addressed the styling issues you pointed out @strommen. If you still have problems reading things please supply a fix via a pull request.


I mean, you could always compile some yourself. Separation of concerns and what not.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: