tlcs900.c: Fixed BIT operation on bytes for bit numbers > 7. (nw)

This commit is contained in:
Wilbert Pol 2013-01-14 20:55:39 +00:00
parent 235b191d31
commit 57e42cda31

View file

@ -1530,7 +1530,7 @@ static void _BITBIM(tlcs900_state *cpustate)
static void _BITBIR(tlcs900_state *cpustate)
{
cpustate->sr.b.l &= ~ ( FLAG_ZF | FLAG_NF );
if ( *cpustate->p2_reg8 & ( 1 << ( cpustate->imm1.b.l & 0x07 ) ) )
if ( *cpustate->p2_reg8 & ( 1 << ( cpustate->imm1.b.l & 0x0f ) ) )
cpustate->sr.b.l |= FLAG_HF;
else
cpustate->sr.b.l |= FLAG_HF | FLAG_ZF;