Skip to content

Commit e6a218d

Browse files
committed
Clean-up related to the last commit.
1 parent fa99db6 commit e6a218d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

redox-core/src/cpu.rs

-1
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,6 @@ impl Cpu {
830830
pub fn run(&mut self, com_bus: &mut CommunicationBus) {
831831
while !self.is_halted {
832832
let ins = self.fetch_decode_next_instruction(com_bus);
833-
eprintln!("ins = {ins}");
834833
self.run_instruction(com_bus, &ins);
835834
}
836835
}

redox-terminal/src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![crate_name = "redox_terminal"]
22

33
use redox_core::{
4-
compiling::compiler::Compiler,
4+
compiling::{compiler::Compiler, decompiler::Decompiler},
55
ins::instruction::Instruction,
66
mem,
77
reg::registers::RegisterId,
@@ -73,7 +73,7 @@ fn main() {
7373

7474
println!("{data:?}");
7575

76-
let instructions = &[
76+
/*let instructions = &[
7777
// Indicate that we want to make a seeded random number generator.
7878
Instruction::OutU8Imm(0x1, 0x0),
7979
// Specify our seed.
@@ -84,7 +84,7 @@ fn main() {
8484
Instruction::Halt,
8585
];
8686
87-
/*let mut compiler = Compiler::new();
87+
let mut compiler = Compiler::new();
8888
let data = compiler.compile(instructions);*/
8989

9090
let mut vm = VirtualMachine::new(
@@ -95,7 +95,7 @@ fn main() {
9595
);
9696

9797
println!("----------[Instructions]----------");
98-
for ins in instructions {
98+
for ins in Decompiler::decompile(data) {
9999
println!("{ins}");
100100
}
101101
println!();

0 commit comments

Comments
 (0)