import Instruction and use print in main

This commit is contained in:
Baptiste 2022-10-26 15:06:37 +02:00
parent f67bd4a5a8
commit 7f9fb76513
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,7 @@
mod decode; mod decode;
mod print;
fn main() { fn main() {
let instr = decode::decode(98); let instr = decode::decode(98);
println!("Hello, world! opcode : {}", instr.opcode); println!("{}", print::print(instr, 0));
} }

View File

@ -1,4 +1,4 @@
mod decode.rs use crate::decode::Instruction;
const RISCV_LUI: u8 = 0x37; const RISCV_LUI: u8 = 0x37;
const RISCV_AUIPC: u8 = 0x17; const RISCV_AUIPC: u8 = 0x17;