Hello everyone, what does JRT instruction, and which difference among JRT and JP instructions? Thank you!
..
..
Well, there is table 42 with the descriptions. The one for jrf states "never jump". The instruction set entry for nop (which is separate from jrf states "see also: jrf").
It might be there for orthogonality. The reasoning for including such an instruction in the HC08 / S08 architecture was that the jrf can be used as a placeholder for a jra to some debug instrumentation code (so the debug build would have the same code locations as the non-debug build).
An interesting aspect of jrf is that it is essentially a two-byte nop for any second byte. If you put a valid 1-byte instruction into the 2nd byte, you could see jrf as a jump over that 1-byte instruction (saving 1 byte over using a jra). That can be useful in a if/else, where the else consists of just a 1-byte instruction. SDCC actually uses jrf for such an optimization.
Philipp
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.