 | Discussion Forum |  |
|
|
Asembly code in CNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author aamir khan Posted 12-Jul-2008 14:23 GMT Toolset None |  Asembly code in C aamir khan Hi......... can anyone tell me how can i insert a few assembly instructions in a C code | | Read-Only Author Andy Neil Posted 12-Jul-2008 16:10 GMT Toolset None |  Why? Andy Neil The more important question is why you think you need to do this. Almost all such requests are based on a fundamentally flawed understanding You've posted this as "Non-specific (Generic)", but the answer will be specific to the particular compiler that you are using - so, in fact, nobody can really answer you question! | | Read-Only Author Eduard Jadron Posted 13-Jul-2008 08:40 GMT Toolset C51 |  RE: Asembly code in C Eduard Jadron Hi. You have must enable Generate Assembler SRC File switch and Assembler SRC File in Project Workspace.
#include <reg51.h>
#include <stdio.h>
#include <stdlib.h>
#include <rtx51tny.h>
void Delay(unsigned char Length)
{
#pragma ASM
djnz r7,$
#pragma ENDASM
}
Best Regards | | Read-Only Author Jon Ward Posted 14-Jul-2008 16:10 GMT Toolset None |  RE: Asembly code in C Jon Ward http://www.keil.com/support/docs/2308.htm Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|