Search code examples
cassemblyinline-assemblytasmturbo-c

How to include the assembly code in my C code in Turbo C?


How to include any assembly code lines into my C program ?

In turbo c is there a possibility to add an assembly code file (.asm) to a project of few .c files?


Solution

  • One way to include assembly code is to add a wrapper function and write the assembly code in the asm block, as shown in the example below:

    void wrapper_function()
    {
        asm
        {
            /* your assembly code */
        }
    }