I'm not really sure what you mean. You don't want the code for the URM04, but you want the code inside the AT-mega8?? What is the difference?
I'm sure that if you have a look on google you might be able to find some sample codes for AT-mega8. You can also have a look at our URM04 Arduino sample code and adapt it for the AT-mega8