Implement more instructions
This commit is contained in:
10
src/cpu.rs
10
src/cpu.rs
@@ -10,6 +10,16 @@ pub struct Cpu {
|
||||
state: State,
|
||||
}
|
||||
|
||||
impl Cpu {
|
||||
pub fn ime(&self) -> bool {
|
||||
self.ime
|
||||
}
|
||||
|
||||
pub fn set_ime(&mut self, enabled: bool) {
|
||||
self.ime = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
impl Cpu {
|
||||
fn fetch(&self) -> u8 {
|
||||
self.bus.read_byte(self.reg.pc)
|
||||
|
Reference in New Issue
Block a user