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

mix assmbly and c

Hi all, can any one tell me the way how to mix c and assembly programing....... i know one way of inline programming i.e.

.......
.......
C code....
.....
.....

#pragma asm
........
assembly code....
........
#pragma endasm

but this type of file written cannot be included in any other file......

i have used IAR assembler for other microcontroller, in which writting

asm ("assembly code");

was working perfectly......

i dont know wether keil supports this.... if yes than what prototype file has to be included for this......

Any help is appriciated....

Thanking You,
Pranav Saraswala.

Parents
  • I totally agree with you. The SRC directive can effectively be a template generator, and have its value as a learning tool, as I have said before.

    I usually write several functions in assembly for any large project in C51, for both space and performance sake. When you are seeking any of those, the SRC templating method is not indicated, due to the reasons discussed above.

    The procedure call standard for C51 is described in the compiler manual, has fixed rules and is very simple. Actually, knowing it helps to write fast C/C function prototypes, not just only ASM/C prototypes.

Reply
  • I totally agree with you. The SRC directive can effectively be a template generator, and have its value as a learning tool, as I have said before.

    I usually write several functions in assembly for any large project in C51, for both space and performance sake. When you are seeking any of those, the SRC templating method is not indicated, due to the reasons discussed above.

    The procedure call standard for C51 is described in the compiler manual, has fixed rules and is very simple. Actually, knowing it helps to write fast C/C function prototypes, not just only ASM/C prototypes.

Children
No data