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


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

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.


Ok, JR is an unconditional jump.  What this does is it takes the current
val in PC (Program Counter, which is the address of the current instruction
executing), and jumps RELATIVE to that.  Lets say that you want to JR to a
function...  You have to know how many bytes that the calc needs to 'skip'
over.  To do this, you have to know where the program beginnig is, which
you can't know when you compile the program because of the Ti-Os's way of
defragmenting the ram.  The macro essentiall asks ZShell where the program
begins, and the jump points to the function address obtained on the
compilation of the program.  You say...


JUMP_(addr), which is esentially   call $8C27 \ .dw addr.
                                        ^^^^^ is the address of a ZShell
routine that calculates the address of the mem byte to jump to.  'addr' can
be the name of a function, like 'StoreRam'.  Tasm takes care of this for
you.


                                     -C.J.-






********************************************************************
Unsolicited commercial e-mail to the poster of this message
will be proofread at $70/hr, minimum charge $150.  Submission
of such e-mail to this address will suffice as contractual assent
to the said charging schedule.
********************************************************************


 


References: