https://github.com/owlinux1000/rust-comet2
https://github.com/owlinux1000/rust-comet2
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/owlinux1000/rust-comet2
- Owner: owlinux1000
- Created: 2018-02-21T13:57:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-21T13:57:26.000Z (over 8 years ago)
- Last Synced: 2025-03-06T00:26:23.735Z (over 1 year ago)
- Language: Rust
- Size: 18.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# COMET II Emulator written in Rust
Rustの勉強用に書いたCOMET IIエミュレータ
## 使い方
### ツールとして
[rust-casl2](https://git.alicemacs.com/chihiro/rust-casl2)で生成したファイルを用いてエミュレータで実行することができます.
```
$ rust-comet2 sample
```
### ライブラリとして
```
extern crate rust_casl2;
use rust_casl2::emu::Emu;
fn main() {
let mut emu = Emu::new();
emu.gr[1] = 0x0;
emu.gr[2] = 0xdead;
emu.memory[0] = 0x1412; // LD GR1, GR2
let code = emu.fetch();
emu.execute(code);
println!("{:x}", gr[1]); //=> 0xdead
println!("{:x}", gr[2]); //=> 0xdead
}
```
## 補足
* SVC命令については未実装
* **Rust初心者なのでRustっぽい書き方を教えてください**