Hello all, I would like to know how i can call ?C?FPMUL?A subroutine in my assembely code. I can see in my disassembled window that some calls are made to ?C?FPMUL?A....If I write my own assembly program and if I want to make use of this ?C?FPMUL?A sub routine how should I make a call to this subroutine...In which memory does this ?C?FPMUL?A resides? this is how it looks in the disassembled window
0x00000BA8 E28D0000 ADD R0,R13,#0x00000000 0x00000BAC E5900000 LDR R0,[R0] 0x00000BB0 EB00015E BL ?C?FCAST?A(0x00001130) 0x00000BB4 E1A01000 MOV R1,R0 0x00000BB8 E59F00B8 LDR R0,[PC,#0x00B8] 0x00000BBC EB00008B BL ?C?FPMUL?A(0x00000DF0) 0x00000BC0 E1A02000 MOV R2,R0
If Keil does not publish the interface specifications to their runtime libraries, it is likely that they do not intend for those routines to be called by user assembly code. If it is an unpublished interface, how will you deal with any subsequent interface changes that they might make to suit their needs? That aside, isn't it pretty clear by looking at this example that the function takes two parameters in R0 and R1 and returns the result in R0? That observation is, of course, would be substantiated by the manual. With the excerpted code's address of 0xBBC and ?C?FPMUL?A purported address of 0xDF0, it's probably safe to say that ?C?FPMUL?A resides in the same memory as the excerpted code.
thanks for your reply and... how will you deal with any subsequent interface changes that they might make to suit their needs? what do you mean by this?
If you are going to use an undocumented library routine, it is not wise to assume that the parameter interface to said routine will remain the same between different versions of the compiler.