|
Think of it like this: if you want 'jne', what isn't equal to what? You have to set up some equality test somewhere and store the result somewhere. In assembly language this is in the nuts and bolts part of the processor. Many instructions include the states of the flag register as part of the conditions for their execution. Some that you might think should do so, do not. This can bite you in the butt. In the 8080, incrementing a register and adding 1 to a register were the same operation, and set the zero flag according to the result. The Z80, which was SUPPOSED to be perfectly downward-compatible with the 8080 missed a beat. Adding 1 to a register set the zero flag appropriately; incrementing the register didn't touch the flag.
|