Calling assembly function from arduino IDE


I have a piece of code pertaining to atmega2560. It is written in assembly language. Can somebody please tell me how to compile the assembly code in a .S file from an arduino IDE and call the assembly functions from arduino code ?

Thank you.

If you want to use some assembly code, your basic options are to convert it into inline assembly, or make it into a library. The 2nd method is outlined here: