1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-16 09:07:05 +00:00

Use a bitwise-and to determine carry

A bitwise-and is what we do in most (all?) other cases; it's a bit
jarring to read the current logic.
This commit is contained in:
Peter Evans 2018-03-26 23:10:57 -05:00
parent 8aef335f25
commit 5d55d5b258

View File

@ -38,7 +38,7 @@ DEFINE_INST(asl)
MOS_CHECK_NZ(result);
cpu->P &= ~MOS_CARRY;
if ((oper << 1) > 0xff) {
if (oper & 0x80) {
cpu->P |= MOS_CARRY;
}