mirror of
https://github.com/mre/mos6502.git
synced 2024-12-23 03:29:51 +00:00
Add and().
This commit is contained in:
parent
5e0d151f12
commit
413d063f82
@ -459,6 +459,11 @@ impl Machine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn and(&mut self, value: i8) {
|
||||||
|
let a_after = self.registers.accumulator & value;
|
||||||
|
self.load_accumulator(a_after);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Implement binary-coded decimal
|
// TODO: Implement binary-coded decimal
|
||||||
fn subtract_with_carry(&mut self, value: i8) {
|
fn subtract_with_carry(&mut self, value: i8) {
|
||||||
if self.registers.status.contains(PS_DECIMAL_MODE) {
|
if self.registers.status.contains(PS_DECIMAL_MODE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user