can we write a code in C and use it as subroutine for a main program that is in assembly language??
if, yes can u suggest some example programs or websites which can help me...
How easily it can be accomplished, if at all, largely depends on the specific Assembler and C Compiler.
Typically, most C compilers allow for inline inclusion of assembler code.
To utilize C routines in an assembly program, would typically require the C code be compiled into a library or object file which is then linked with the object file generated from the assembly code.