Re: LZ: JR or JP?
[Prev][Next][Index][Thread]
Re: LZ: JR or JP?
On Fri, 2 Aug 1996, Rob Taylor 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.
> >
>
> No, IT WONT!
> JR is not to be used on teh TI-85 unless you REALLY know what you are
> doing... JUMP_(), JUMP_Z(), JUMP_NZ(), etc. shoud be used instead..
>
> Full information on these can be found in teh Zshell documentation..
I took that question as a Z80 question, not a zshell question. Remember,
I'm using a TI-83 that doesn't care about those limits.
I don't have any inside knowlege about this but I'll be that in the
next year there'll be a TI-86 that's a 85 with assembly support and
a promise to keep everything at a stable address.
On the TI-83 all assembly programs always load at the same address
so you can org at that address and not worry about it. Also TI has
promised that their published rom calls will stay at the same address
in future rom revisions.
Barry
References: