The value returned would be 0. CP temporarily does a subtraction: ie: cp 5 temporarily does a-5 You can check for whether or not a key would be pressed. Use: or a OR and a to check it instead of cp 0 it will still set the same flags