2023-01-11 14:58:12 +01:00
|
|
|
mod simulator;
|
2023-02-15 14:56:11 +01:00
|
|
|
mod kernel;
|
2023-02-15 18:10:08 +01:00
|
|
|
pub mod utility;
|
2023-01-11 14:58:12 +01:00
|
|
|
|
|
|
|
use simulator::machine::Machine;
|
2022-10-19 16:39:38 +02:00
|
|
|
|
2022-10-05 16:30:21 +02:00
|
|
|
fn main() {
|
2022-11-09 17:35:16 +01:00
|
|
|
let mut m = Machine::_init_machine();
|
2022-11-23 18:04:35 +01:00
|
|
|
m.main_memory[4] = 43;
|
|
|
|
m.main_memory[5] = 150;
|
|
|
|
let a : u8 = 128;
|
|
|
|
let b : i8 = a as i8;
|
|
|
|
let c : u8 = b as u8;
|
2023-02-04 18:16:52 +01:00
|
|
|
println!("aaa {c}");
|
2022-11-23 18:04:35 +01:00
|
|
|
println!("read_memory : {}", Machine::read_memory(&mut m, 2, 4));
|
2022-10-05 16:30:21 +02:00
|
|
|
}
|