~robalni/rvas

RISC-V assembler and disassembler

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~robalni/rvas
read/write
git@git.sr.ht:~robalni/rvas

You can also use your local clone with git send-email.

This is a RISC-V assembler and disassembler.  The assembler can only
compile to raw format which means the output is just the instructions
you write in the assembly file, no ELF headers or anything like that.


How to compile
--------------

Compile assembler:

    cc rvas.c -o rvas

Compile disassembler:

    cc rvdis.c -o rvdis


How to run
----------

The assembler takes the assembly file as argument and writes to
standard out. Here is a command example:

    rvas mycode.asm > myprogram

The disassembler takes the binary file on standard in and prints the
disassembled code to standard out:

    rvdis < code.bin