Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Feb 24, 2021
1 parent b1179f6 commit 5c199cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,18 @@ pub fn main() -> i32 {
```
Compile `foo.rc` to RISC-V assembly language.
```shell
./rcc foo.txt -o foo.S
$ ./rcc foo.txt -o foo.S
```

Assemble and link to executable file.
```shell
riscv64-unknown-elf-gcc -march=rv32im -mabi=ilp32 foo.S -o foo
$ riscv64-unknown-elf-gcc -march=rv32im -mabi=ilp32 foo.S -o foo
```

Run in QEMU
```shell
qemu-riscv32 ./foo
$ qemu-riscv32 ./foo
hello
```

## References
Expand Down

0 comments on commit 5c199cd

Please sign in to comment.