Merge branch 'decode_print' of https://gitlab.istic.univ-rennes1.fr/simpleos/burritos into decode_print

This commit is contained in:
Samy Solhi 2022-11-09 16:12:23 +01:00
commit a5dce2013e
2 changed files with 28 additions and 0 deletions

27
src/machine.rs Normal file
View File

@ -0,0 +1,27 @@
use crate::decode::*;
pub struct Machine {
pub _pc : u32,
pub _int_reg : [u32 ; 32],
pub _instructions : [u32 ; 100]
}
impl Machine {
fn _init_machine() -> Machine {
Machine {
_pc : 0,
_instructions : [0 ; 100],
_int_reg : [0 ; 32]
}
}
}
#[cfg(test)]
mod test {
use crate::{_init_machine};
}

View File

@ -1,5 +1,6 @@
mod decode; mod decode;
mod print; mod print;
mod machine;
fn main() { fn main() {
let instr = decode::decode(98); let instr = decode::decode(98);