ARM Technical Support Knowledge Articles


Applies to: C51 C Compiler


Information in this article applies to:


When I use function pointers, the compiler outputs code that calls a library routine named ICALL as shown here.

              (*g) ();   // Call func indirectly
0004 AA06          MOV     R2,AR6
0006 A907          MOV     R1,AR7
0008 120000  E     LCALL   ?C?ICALL

What does this routine do and why is it necessary?


The ?C?ICALL library routine performs indirect function calls by:

Indirect function calls are handled with this function because there are 4 or 5 instructions necessary to execute the call. It is more memory efficient to have this routine if you have several indirect calls.

In addition there is a slightly different entry named ?C?ICALL2. This function expects the function address in DPL/DPH and does therefore not copy the function address anymore.


Article last edited on: 2005-04-18 05:28:19

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential