I tried adding some new code to the hellow_world.c
demo program. This workswell as soon as I only add code to the
existing hello_world() function, but as soon as I add some
functions of my own, things go all haywire: the code of the
hello_world() function does not get executed correctly, and my
new function gets calles with unexpected arguments.
What's wrong?

Answer:

You probably failed to nottice that any code you add to
the example program may shift the entry point address.
You should check this using the nm program: