Absolute jumps to the address. Can be conditional or unconditional. JP takes one more byte than JR, but is also slightly faster, so decide whether speed or size is more important before choosing JP or JR. JP (HL), JP (IX), and JP (IY) are unconditional and are the fastest jumps, and do not take more bytes than other jumps.
JP NN ;unconditional jump JP cond.,NN ;conditional jump JP (reg16) ;HL, IX and IY only
;Constants JP NN ;no condition JP C,NN ;jumps if C is set JP NC,NN ;jumps if C is reset JP Z,NN ;jumps if Z is set JP NZ,NN ;jumps if Z is reset JP M,NN ;jumps if S is set JP P,NN ;jumps if S is reset JP PE,NN ;jumps if P/V is set JP PO,NN ;jumps if P/V is reset ;HL points to address JP (HL) ;IX points to address JP (IX) ;IY points to address JP (IY)
All flags preserved.
cc is condition: NZ, Z, NC, C, PO, PE, P, M