5 ms·
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
by strommen 11y ago
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.
- thlorenz 11y agoPlease 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 :)
- thlorenz 11y agoI addressed the styling issues you pointed out @strommen. If you still have problems reading things please supply a fix via a pull request.
- thlorenz 11y ago> 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.
- andrewstuart2 11y agoI mean, you could always compile some yourself. Separation of concerns and what not.
- pmalynin 11y agoCode 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.
- thlorenz 11y agoMore 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/fixtures 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.