This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

storing two programs at different memory location

Hello All,

I want to write some algorithm (program) in C and store it in some specifc memory area .In between my assembly code I would like to call my C routine stored at specific memory location.I wud like to know where i could store the algorithm ..I dont want this algorithm to be stored along with the memory area where my original program resides...I am giving an example below....


AREA PROGRAM,CODE, AT 0x40000000
ENTRY

//(a*b)+(c+d)
LDR r0,=numbers
ldr r1,[r0],#4 //a
ldr r2,[r0],#4 //b
ldr r3,[r0],#4 //c

function(1102);//this is the function writen in C that I want to store at some specific memory location.I would lie to know where I could store this and how I can insert a C fuction in between an assembly program?
ldr r4,[r0],#4 //d
mul r2,r1,r2 //a*b
add r3,r3,r4 //c+d
add r4,r3,r2 //(a*b)+(c+d)
str r4,[r0,#4]


AREA DATAMEM ,DATA,READWRITE

numbers :DD 0x5,0x6,0x7,0x8

End


looking for your help.

t.senthil

Parents Reply Children
No data