Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I have searched all over and I havent found anything can someone please help me?
EDIT: why do I want to do this? because I want to start an os, I would just like to display a simple text message on the screen thro C, so then I can continue developing.
There are 2 things you could mean here - calling a C function from your assembly stub, or loading a binary which you have written in C and executing that. From the context of your question, I guess you have created an ASM boot loader and want to run a kernel-type binary.
Let's assume that you have loaded the C executable (bit of a misnomer - there's nothing special about the executable just because it was written in C) in to memory. Before you run your C code, there are a few things to do. Firstly, your asm code needs to set up a stack to allow C functions to call each other and pass parameters. Next, you need to push any c parameters to the stack in a right-to-left order. Now, simply call the C function as if it was written in asm.
Some compilers append a leading underscore to the C function name but you can avoid this with compiler flags / a cross-compiler.
For far more information than I have given you, Google for the System V ABI.
or the like.
If you have dynamically loaded it (from disk etc.) then replace _main with eax or another register that contains the entrypoint (first instruction)