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

Calling asm routines from C source

Hi,
I've got a project containing a c source file and an a51 assembler file. I need to be able to call some of the asm routines from the C file.
I'm after a tutorial describing what you need to do to export the required routines from the asm file and to make the call from the C source. I'd also like an example of how to cope with function arguments, too! And any other relevant stuff.

I'm using the uVision/51 environment which comprises a Keil 8051 C complier (V5.20) which is 2K limited, and doesn't allow embedded ASM.

Thanks for any advice.

David

  • Download the latest C51 (or request the free CD). I think the current Eval does allow inline assembler?
    You get the full manuals, which include the details you require.

    Having understood it with the up-to-date tools, you could then work back to your old uVision51, if you really have to stick with that (you appear to be using a free eval anyway, so why not get a free up-to-date eval!?)