Here is a RISC-V "Hello World" example Step 1: write rv-hello.s
rv-hello.s
.global _start _start: addi a0, x0, 1 la a1, helloworld addi a2, x0, 13 addi a7, x0, 64 ecall addi a0, x0, 0 addi a7, x0, 93 ecall .data helloworld: .ascii “Hello World!\n”
Step2: assemble rv-hello.s and link
riscv64-unknown-elf-gcc -o rv-hello rv-hello.s -nostdlib -static
Step3: run the program
riscv64-unknown-elf-run rv-hello
// Hello World!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here is a RISC-V "Hello World" example
Step 1: write
rv-hello.s
Step2: assemble rv-hello.s and link
Step3: run the program
// Hello World!