Skip to content

rizwan3d/SharpRISCV

Repository files navigation

SharpRISCV

SharpRISCV is an implementation of RISC-V assembly in C#. First RISC V Assembly that build windows executable file.

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

Output Image

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

  1. R Type
  2. U Type
  3. I Type
  4. B Type
  5. I Type
  6. S Type
  7. J Type

To Do

  1. Gererate Console output.
  2. Lable Support.
  3. Read form file (*.s).
  4. Ignore Comments
  5. Generate PE (Even windows cannot support RISC V) AKA exe file - Virustotal's Details
  6. Generate Hex (FOR MCUs)
  7. Generate Hex (FOR MCUs) on Web Browser
  8. Generate Windows PE on Web Browser - Virustotal's Details
  9. Generate ELF - Virustotal's Details
  10. Generate Xilinx
  11. Generate Altera
  12. Generate Verilog

Assembler Directives

  1. .text
  2. .data
  3. .bss
  4. .space
  5. .string and .asciz
  6. .word
  7. .%hi
  8. .%lo

UesFull links and tools:

  1. RISC-V Instruction Formats
  2. The RISC-V Instruction Set Manual PDF Page 116
  3. RISC-V ASSEMBLY LANGUAGE Programmer Manual
  4. RISC-V Instruction Encoder/Decoder
  5. PE file format - Introduction
  6. Intel HEX
  7. PE-bear for inspecting Windows PE (Portable Executable) files. - Download from here; I have added RISC-V machine code detection
  8. ELF file viewer/editor for Windows, Linux and MacOS

Support:

rizwan3d




PayPal