mirror of
https://github.com/mre/mos6502.git
synced 2025-02-20 09:29:02 +00:00
Show impl for machine
This commit is contained in:
parent
be65550525
commit
f2a47f4b00
@ -39,5 +39,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
println!("Ran program, output of Accum is {}", machine.registers.accumulator);
|
println!("Ran program, output of Accum is {}", machine.registers.accumulator);
|
||||||
|
println!("Machine dump: {}", machine);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
use address::Address;
|
use address::Address;
|
||||||
use address::AddressDiff;
|
use address::AddressDiff;
|
||||||
|
use std::fmt;
|
||||||
use instruction::Instruction;
|
use instruction::Instruction;
|
||||||
use instruction::ADC;
|
use instruction::ADC;
|
||||||
use memory::Memory;
|
use memory::Memory;
|
||||||
@ -100,6 +101,12 @@ impl Machine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Show for Machine {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
write!(f, "I am a machine")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn add_with_carry_test() {
|
fn add_with_carry_test() {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user