Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

New Articles From Microcontroller Tips

Back
Top