John, The IBM 360/67 had such an instruction; and the verdict on it was mixed, in part perhaps because its original implementation contained a logic error.
Look at the Compare Immediate and Trap, CIT and CGIT, instructions in the z/Architecture PrOp. They are more general, but they can do what you want to do. John Gilmore, Ashland, MA 01721 - USA
