RE: LZ-Adv: JR or JP cc, *


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

RE: LZ-Adv: JR or JP cc, *



------ =_NextPart_000_01BBC6A2.22C41CE0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable


But if you're using jump tables, and replacing the addresses in the =
opcodes at the starting of the program, then I think JP (without any =
conditional statements) is 2 T-states faster than JR.  If there are =
conditional statements, then they are the same speed (but JP still has =
the advantage of more possible condition statements, such as PO, PE, P, =
amd M).


----------
From: 	Jason C. Wenger[SMTP:jwenger@juno.com]
Sent: 	Wednesday, October 30, 1996 6:24 PM
To: 	lz-adv@lists.ticalc.org
Subject: 	Re: LZ-Adv: JR or JP cc, *


>> You cant just say JR, there is a macro defined in the ti-85.h file
that
>> does it correctly for you.
>
>  Why?


He's got it backwards.  JR works, JP doesn't.


suppose you're at byte 0 of your program, (the first byte), and you want
to jump to byte 24


JR 24 says, essentialy, jump forward 24 bytes.  this works no matter =
what
byte you're on  if your program starts at byte 100, 24 bytes forward is
still the right place to be going.


JP 24 says "jump to to the byte that is 24 bytes from the start of the
memory."  if your program starts at byte zero, that's fine.  byte 24
would then be the 24th byte of the progeam.  But suppose your program
sterts at byte 100.  when your progam jumps to byte 24, it has just
jumped to a location that's completely outside of your program.  you
really need to jump to byte 124. 100  is the distance from the beginning
of memory, and 24 is the distance from program start.  Add them =
together,
and you've got the distance from beginning of memory to byte 24 of your
program.  but since programs can move around, you never know what the
first number is untill you run the program.  it might be 100, it might
not.  so what you do is use JUMP_(24) instead of JP 24.  JUMP_(x) is
actually a call to a routine that fugures out the location of the start
of your program, and adds it for you.  That way, it's all automated, so
you don't really have to think about it.  Just juse JUMP_(x) instead of
JP x.  (and JUMP_C(x) instead of JP  C,x and so on.)


Hope this helps,


Jason "Thursday" Wenger
jwenger@juno.com
Illegitimi no carborundum








------ =_NextPart_000_01BBC6A2.22C41CE0
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64


eJ8+Ig8BAQaQCAAEAAAAAAABAAEAAQ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