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

Asembly code in C

Hi......... can anyone tell me how can i insert a few assembly instructions in a C code

Parents
  • 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

Reply
  • 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

Children
No data