mcoster
Member level 2
Hi,
I am developing a program and i decided to build the user interface in C, since it is easier, and the main code in ASM, since it is time-critical.
Now i am facing a problem ! I don´t know how to pass a argument form the C code part to the ASM code part.
For example, i want to put a value in one of the registers or any part of the memory using C and then get this value using ASM.
Doing the ASM part is easy it is just a couple of MOV commands but how to store a value inside the RAM or a register using C is the part i can´t figure it out !
Can anyone help me ?
Code example
main()
{
code that store the value 0xC0 in R0
}
#pragma ASM
MOV P0,R0
#pragma ENDASM
Thanks !
I am developing a program and i decided to build the user interface in C, since it is easier, and the main code in ASM, since it is time-critical.
Now i am facing a problem ! I don´t know how to pass a argument form the C code part to the ASM code part.
For example, i want to put a value in one of the registers or any part of the memory using C and then get this value using ASM.
Doing the ASM part is easy it is just a couple of MOV commands but how to store a value inside the RAM or a register using C is the part i can´t figure it out !
Can anyone help me ?
Code example
main()
{
code that store the value 0xC0 in R0
}
#pragma ASM
MOV P0,R0
#pragma ENDASM
Thanks !