Implement more instructions

This commit is contained in:
2020-09-04 00:41:19 -05:00
parent 11d2d26cdc
commit 213c5e5cb3
3 changed files with 215 additions and 26 deletions

View File

@@ -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)