implemented CMP instruction