This commit is contained in:
william 2025-01-11 22:03:12 -05:00
parent d606446c12
commit 5ee985acce

View File

@ -1,6 +1,8 @@
use crate::cpu::op::Operand;
use crate::cpu::{Cpu, CpuInternals, CpuStatus};
// Unofficial ops documentation: https://www.masswerk.at/6502/6502_instruction_set.html#SAX
fn is_sign_overflow(val1: u8, val2: u8, result: u8) -> bool {
(val1 & 0x80 == val2 & 0x80) && (val1 & 0x80 != result & 0x80)
}