Last Modified: 2025-05-06 08:54:00Z
Table of Contents
RISC-V (Pron. Risk-Five) is an open source instruction set of based on RISC.
1. Hello World Example
I compiled a program with simple hello-world code.
#include <stdio.h>
int main() {
printf("Hello RISC-V!\n");
return 0;
}
And this is its disassembly.
0000000000000668 <main>:
668: 1141 addi sp,sp,-16
66a: e406 sd ra,8(sp)
66c: e022 sd s0,0(sp)
66e: 0800 addi s0,sp,16
670: 00000517 auipc a0,0x0
674: 02050513 addi a0,a0,32 # 690 <_IO_stdin_used+0x8>
678: f29ff0ef jal ra,5a0 <puts@plt>
67c: 4781 li a5,0
67e: 853e mv a0,a5
680: 60a2 ld ra,8(sp)
682: 6402 ld s0,0(sp)
684: 0141 addi sp,sp,16
686: 8082 ret
3. See Also
-
Arkitekturo RISC-V: Rigardo al Plene Malfermfonta Procesoro (Esperanto)
-
Clockwork DevTerm R-01 μ¬μ©κΈ° (Korean)
-
LekKit/RVVM is the RISC-V Virtual Machine which can run Arch Linux, Debian Linux, and FreeBSD.
-
RP2350 chip is in a Raspberry Pi Pico 2 board, the chip has the Hazard 3 RISC-V cores.
-
felix86 is an x86-64 userspace emulator for RISC-V devices.