1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-07-06 10:28:58 +00:00

bugfix: sbc calculation for 16-bit

This commit is contained in:
BigEd 2011-08-22 15:50:42 +01:00
parent c437d3ee3f
commit 3b70e8f495

View File

@ -437,7 +437,7 @@ class MPU:
data = result & self.byteMask
if data == 0:
self.p |= self.ZERO
if result & 0x100:
if result > self.byteMask:
self.p |= self.CARRY
self.p |= data & self.NEGATIVE
self.a = data