diff options
Diffstat (limited to 'src/cpu8051.rs')
-rw-r--r-- | src/cpu8051.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cpu8051.rs b/src/cpu8051.rs index 8702484..c76e9b6 100644 --- a/src/cpu8051.rs +++ b/src/cpu8051.rs @@ -4,9 +4,9 @@ use super::ram::Ram; use super::ram::RAM_OFFSET_ACC; use super::ram::RAM_OFFSET_SP; +use std::cell::RefCell; use std::fmt; use std::rc::Rc; -use std::cell::RefCell; #[derive(Debug, Clone, Copy)] pub enum Opname { @@ -486,7 +486,9 @@ impl Cpu8051 { fn fetch_operand(&self, operand: IncompleteOperand, offset: u16) -> Operand { match operand { IncompleteOperand::Acc => Operand::Acc, - IncompleteOperand::Direct => Operand::Direct(self.progmem.borrow().get(self.pc + offset)), + IncompleteOperand::Direct => { + Operand::Direct(self.progmem.borrow().get(self.pc + offset)) + } IncompleteOperand::Data => Operand::Data(self.progmem.borrow().get(self.pc + offset)), IncompleteOperand::Data16 => Operand::Data16({ let high = self.progmem.borrow().get(self.pc + offset); @@ -586,7 +588,7 @@ impl Cpu8051 { other ), }; - self.extmem.borrow_mut().set(dest as u16 ,value); + self.extmem.borrow_mut().set(dest as u16, value); } fn push(&mut self, operand: Operand) { |