First page Back Continue Last page Overview Text

Notes:


Since the original register is unchanged (as it would be in the case of a subtraction) multiple compare instructions can be executed without reloading the source register.

The compare instructions are extremely useful when comparing the magnitudes of two numbers. The compare instruction performs a subtraction but does not modify the destination register. The carry flag will be set whenever the subtrahend is larger than the minuend. The numbers are compared as unsigned numbers when modifying the borrow (carry) flag. That is $ff (would be -1 if considered signed and smaller than +1) is considered larger than $01 (would still be 1 if considered signed).