andrescv / jupiter

RISC-V Assembler and Runtime Simulator
https://jupitersim.gitbook.io/
GNU General Public License v3.0
417 stars 36 forks source link

Simulator assembly view - option to show Hex values? #31

Open dylanmc opened 5 years ago

dylanmc commented 5 years ago

Jupiter is great - thanks!

I'm puzzled by the choice to show immediate values in the Asseembly view in the Simulator tab as decimal values.

For example, I'm loading a symbol into A1 in order to call print_string, and see the following:

  lui x11, 16
  addi x11, x11, 36

When I look at the simulator's register value for a1/x11, the value I see is 0x00010024, which is the important information I need in order to check the Memory tab. It seems that it would make more sense to at least have the option of seeing the two instructions disassembled like this:

  lui x11, 0x10
  addi x11, x11, 0x24

If nothing else, so that it makes more sense to students when they're seeing things going on.

andrescv commented 5 years ago

Hi !

Totally agree with this, I will add this feature soon. Something like the behavior found in registers/memory tables, that when you do a right click on it a context menu shows up and you can change the display option (hex, unsigned, etc) or if you have a better idea please let me know.

dylanmc commented 5 years ago

That sounds great - consistency is good, and being flexible with output base would be helpful.