public void BIT(int tmp)
    {
        m6502.p = (m6502.p & ~(F_N|F_V|F_Z))&0xFF;
        m6502.p = (m6502.p | (tmp & (F_N|F_V)))&0xFF;
        if ((tmp & m6502.a) == 0)
            m6502.p = (m6502.p | F_Z)&0xFF;
    }