It is platform specific, usually you don't need to specifically save and restore registers at the call site, the callee usually does it. You just need to follow the linkage convention for your particular platform. The C-library is not state-less, it is generally not a good idea to just call some functions without initializing the library as it is done in a typical c program object which contains main().