at 08046074 (I'm talking about Emerald here) there actually is some instructions, some code.
Just imagine code as a river. We change the way the river takes.
But I think you should read some part of this :
http://www.pokecommunity.com/showthread.php?t=343871
It's really well writted, there's no need to read all in a raw, but it'll help you to understand