Thanks to visit codestin.com
Credit goes to github.com

Skip to content

karanagi/riscv-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RISC-V Assembly Playground

Some programs written in RISC-V 64 assembly for linux.

These programs can be built using the RISC-V gnu tool chain, and run using qemu's riscv user space emulator.

Example: Running hello/hello.s on Arch linux:

$ riscv64-linux-gnu-as hello.s -o hello.o
$ riscv64-linux-gnu-ld hello.o -o hello
$ qemu-riscv64 hello
Hello RISC-V!

Program Listing

  • hello: hello world.
  • args/count_args.s: count the number of command line arguments (which is kind of useless since one could simply look at argc).
  • args/print_args.s: prints all of the command line arguments.
  • cp/cp.s: a simple and crude implementation of cp.
  • print_load_addr/print_load_addr.s: prints the load address.

Links and Resources

About

Programs written in RISC-V Assembly

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published