Fix O-flag computation

This commit is contained in:
Gabriel Tofvesson 2019-04-08 12:38:17 +02:00
parent b0099046b6
commit 55c5f4a31d

View File

@ -119,7 +119,7 @@ class MachineState {
flag_Z = result == 0.toShort()
flag_N = result < 0
flag_C = result <= registers.ar
flag_O = result.getBitAt(6) != registers.ar.getBitAt(6)
flag_O = (result.getBitAt(7) == bus_to.getBitAt(7)) && (registers.ar.getBitAt(7) != result.getBitAt(7))
result
}
5 ->{