improved debug log formatting
This commit is contained in:
parent
907b9da1fc
commit
73c14ff893
8 changed files with 160 additions and 15 deletions
20
src/instructions.rs
Normal file
20
src/instructions.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
use crate::cpu::CPU;
|
||||
|
||||
impl CPU
|
||||
{
|
||||
fn fetch(&mut self) -> u8
|
||||
{
|
||||
let bus = self.bus.upgrade().unwrap();
|
||||
return bus.borrow().read_cpu(self.absolute_addr);
|
||||
}
|
||||
|
||||
pub fn jmp(&mut self)
|
||||
{
|
||||
self.pc = self.absolute_addr;
|
||||
}
|
||||
|
||||
pub fn ldx(&mut self)
|
||||
{
|
||||
self.x = self.fetch();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue