mirror of
https://github.com/mii443/rsrv.git
synced 2025-09-02 07:29:14 +00:00
Create README.md
This commit is contained in:
19
README.md
Normal file
19
README.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Rust bindings for RV
|
||||||
|
Safe bindings for the [RV](https://github.com/mnurzia/rv).
|
||||||
|
|
||||||
|
# Example
|
||||||
|
```rust
|
||||||
|
use rsrv::rv::*;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let cpu = RV::new(0x10000, vec![0x02A88893, 0x00000073]);
|
||||||
|
|
||||||
|
while RV::step(cpu) != RV_EECALL {}
|
||||||
|
|
||||||
|
println!(
|
||||||
|
"Environment call @ {:08x}: {}",
|
||||||
|
RV::get_pc(cpu),
|
||||||
|
RV::get_r(cpu)[17]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
Reference in New Issue
Block a user