I've looked at a few different websites and they all agree that a
JP nnnn instruction (where
nnnn is a 16-bit address) always takes 10 states to execute.
According to what I've read, all of the following instructions take 10 states, even the conditional ones, and even if the jump is not taken:
JP c, nnnn
JP nc, nnnn
JP z, nnnn
JP nz, nnnn
JP po, nnnn
JP pe, nnnn
JP p, nnnn
JP m, nnnn
These sources also agree that this is not the case for
RET: those instructions are faster when unconditional, and are also faster if the condition is false and no jump/call/return occurred. I would have expected the same to be true for
JP but apparently not. Why is this?
CALL are not faster when unconditional. That was a mistake I made when looking at my chart. I was only looking at
RET when I made that statement.
EDIT 2: The above edit should have said "