I routinely compile my C code to assembly to read the output and learn about how the compiler interprets my code. While doing this, I often think, "maybe I should just write my software in assembly!"
But in all honesty I don't know how to begin. I've written 16 bit assembly compiled with tasm before and it was sorta fun. But I want to start writing assembly and interfacing it with C programs, etc--doing everything I can do with C, in assembly instead.
But, how?
Do I need to learn about executable headers (e.g. ELF)? (If not, I still want to--that's another thing--how can I write the header myself and just compile pure binary, without the compiler trying to add the header again?)
What is the (arguably) most common compiler? I wish to use the gcc since I use it already, but the AT&T assembly syntax causes me unbearable pain and suffering.
Can I still use the C standard library functions? I mean, I'm used to just calling an interrupt, which you can't do in protected mode--so is there an assembly version of printf? malloc? etc? I've seen them used in the assembly output of gcc, but how do I include those to begin with in a straight assembly project?
All this being said I can read assembly, and sort of know how to write it--I understand calling conventions and the like, I just want to actually write programs in it rather than having some theoretical knowledge of it.
Anyways, does anyone know any good tutorials? Recommended compilers/syntax? Common mistakes? Any tips that will make my life easier (inb4 don't use assembly)?
edit: one more thing:
I remember in my 16-bit assembling days stumbling over myself when the entry point of a "procedure" got too far away from the point where it was called because it was called with a short jump or something (a small offset from the point where it is called) instead of just a memory address, and I couldn't figure out how to do it otherwise.
Is this an issue in 32 bit? How can I be safe about the jumps in my code?