Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/08/00 00:39
Read: times


 
#2151 - RE: Target address exceeds relative address
Abdul,

The AJMP command should be fine for the entire address space of the 89C2051. An AJMP can jump to any location inside the 2K page from which it is executed.

If you need to extend a short jump command like a JB or JC etc, you can (1) reposition the jump destination closer, (2) reduce some of the code between the jump and the destination by moving some code into a subroutine CALLed, or (3) Simple and Best solution, do a short JB/JC/etc to a nearby AJMP to the final destination. Its like skipping a flat stone across still waters, except there is no need for more than skip. :)

. JB SENDDATA,SKIP2SEND
. ... (other code)
. RET
.SKIP2SEND: (within 127 bytes)
. AJMP SENDROUTINE ;final destination
.

Since the AJMP reaches any destination address inside the 89C2051's address space, you shouldn't need the LJMP at all.

Hope that helps,
-Jay C. Box

List of 4 messages in thread
TopicAuthorDate
Target address exceeds relative address            01/01/70 00:00      
RE: Target address exceeds relative address            01/01/70 00:00      
RE: Target address exceeds relative address            01/01/70 00:00      
RE: Target address exceeds relative address            01/01/70 00:00      

Back to Subject List