This is an old revision of the document!
The following link explains how to run RiscV Debian in qemu:-
https://www.codeproject.com/Tips/5383029/Run-Debian-RISC-V-In-QEMU-Virtual-Environment-For
All work has been carried out in the resulting operating system.
assemble with: as test2.s -o test2.o
then compile with: gcc test2.o -o test2
run with: ./test
.section .rodata prompt: .asciz "Value of t0 = %ld and value of t1 = %ld\n" .globl main .section .text main: addi sp, sp, -8 sd ra, 0(sp) la a0, prompt li t0,44 li t1,88 mv a1, t0 mv a2, t1 call printf ld ra, 0(sp) addi sp, sp, 8 ret