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.
vlad9486 wrote:GCC thinks that registers is not changed in function.
GCC just follows ABI and you should do the same. If ABI claims that functions must preserve some registers, then you should save these registers before modification and restore their values before returning to caller.
If you don't know enough about ABI and calling conventions, you can find nice articles on wiki.
Well, the GCC source is freely available. If you think it is easier you could rewrite GCC to not use ebx rather than doing so for your sys_call_kernel. It would certainly be educational.