SharpRISCV
SharpRISCV copied to clipboard
SharpRISCV is an implementation of RISC-V assembly in C#. First RISC V Assembly that build windows executable file
SharpRISCV
SharpRISCV is an implementation of RISC-V assembly in C#. First RISC V Assembly that build windows executable file.
Featured on RISC-V official website news section on home page.
Try in Web Browser
Write RISC-V ASM code in your browser
RISC-V Virtual Machine
You can use RISC64-VM to run elf file on x86-x64 pc on linux and windows.
Desktop Exectuable

Usage
Build Bin file
SharpRISCV.exe -i file.s -o out.o -p bin
Build Windows EXE
SharpRISCV.exe -i file.s -o out.exe -p pe
Console Output
SharpRISCV.exe -i file.s -o console
Build Linux ELF
SharpRISCV.exe -i file.s -o out.o -p elf
Build HEX
SharpRISCV.exe -i file.s -o out.o -p hex
Supported Instruction
- [X] R Type
- [X] U Type
- [X] I Type
- [X] B Type
- [X] I Type
- [X] S Type
- [X] J Type
To Do
- [X] Gererate Console output.
- [X] Lable Support.
- [X] Read form file (*.s).
- [X] Ignore Comments
- [X] Generate PE (Even windows cannot support RISC V) AKA exe file - Virustotal's Details
- [X] Generate Hex (FOR MCUs)
- [X] Generate Hex (FOR MCUs) on Web Browser
- [X] Generate Windows PE on Web Browser - Virustotal's Details
- [X] Generate ELF - Virustotal's Details
- [ ] Generate Xilinx
- [ ] Generate Altera
- [ ] Generate Verilog
Assembler Directives
- [X] .text
- [X] .data
- [X] .bss
- [X] .space
- [X] .string and .asciz
- [X] .word
- [X] .%hi
- [X] .%lo
UesFull links and tools:
- RISC-V Instruction Formats
- The RISC-V Instruction Set Manual PDF Page 116
- RISC-V ASSEMBLY LANGUAGE Programmer Manual
- RISC-V Instruction Encoder/Decoder
- PE file format - Introduction
- Intel HEX
- PE-bear for inspecting Windows PE (Portable Executable) files. - Download from here; I have added RISC-V machine code detection
- ELF file viewer/editor for Windows, Linux and MacOS
