BIT instruction

This commit is contained in:
2021-10-19 09:53:50 -05:00
parent a64d15c9ce
commit edc8429aa2
2 changed files with 46 additions and 3 deletions
+3 -3
View File
@@ -92,8 +92,8 @@ impl Bus {
}
pub fn write_16bit(&mut self, address: u16, data: u16) {
let bytes = data.to_be_bytes();
self.write(address, bytes[1]);
self.write(address + 1, bytes[0]);
let bytes = data.to_le_bytes();
self.write(address, bytes[0]);
self.write(address + 1, bytes[1]);
}
}