Online RISC-V disassembler
Making a nicer disassembler
I’ve had a rudimentary disassembler in the emuriscv
emulator, but compared to other disassemblers out there it was not very refined. Debugging and fixing the emulator required me to read a lot of disassembled code, which I generated with GNU objdump
, but the problem was that my tool printed out a slightly different output format compared to objdump
. Having two separate disassembly listing formats to keep in my head was confusing enough, so I set out to achieve a comparable output to the reference tool.
Also, I kind of like the idea of doing web development in C.
After extracting the disassembly code from the emulator into a separate C project and implementing the improvements discussed below, I’ve also also converted it into a web tool, which you can try out below, as it’s embedded into this blog post: