Re: LZ: JR or JP?


[Prev][Next][Index][Thread]

Re: LZ: JR or JP?



On Thu, 1 Aug 1996, Marc Heikens wrote:


> Does anyone know if there's a reason to use JP instead of JR for a program
> jump?  The JR instruction, according to the book I have, uses one less byte
> to have in code, so that would help optimize memory; also the assembler
> resolves the relative (JR) addresses for you, doesn't it?
 
JR is shorter and faster.  Also, JP makes assumptions about your programs
current location in memory if it's jumping to a location within the program.


I'm doing my coding mostly in hex so using JR also makes it easy to move
routines around in my program.


Generally, use JR when you can and JP when you have to.


Yes the assembler resolves the references in either case.


Barry


References: