rcall vs call in Assembler

Status
Not open for further replies.

bryan

Member
Hello:

Dumb question but what is the difference in these two instructions rcall and call, don't they do the same thing? Is it because the rcall can only jump to a maximum of 1k from it's current location?
 
Normally, the advantage is code size and speed. The Relative Call instruction will use less memory and execute faster than a normal (long) call. Which processor are you using?

Mike.
 
Hi Mike:

Using 18f4520,2520. Perhaps the rcall can not reach past 1k in memory which may make it a problem if the subroutine is far from the calling routine in memory. At least that was my take on the Microchip clear as mud datasheet<G>

-=Bryan=-
 
In the case of the Pics there is no speed advantage just code size - rcall=1 word call=2 words.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…