Replace instance of xori -1, with nor. xori constant is uint16 bits.
Fixup condition register setting in simulator.