MARS & RARS contain a disassembler, but
- don't allow
.word
within.text
- will only disassemble the
.text
section
Is there a way to get these simulators to disassemble an instruction from hex?
(The common online disassemblers also don't support RISC V!)
The following code sequence will make RARS/MARS disassemble from hex (RARS version here). The program can be edited to use other instructions as hex, and, after running the program, disassembly can be seen in the "Text Segment" column "Basic". The option for "Self-modifying code" must be enabled in the "Settings" menu.