Hello blinkstar88,
humm sorry don't have any code example right now, (maybe someone else... hey freescalers heads up !!
) so I would suggest you to use Processor Expert, the Freescale Graphical code designer distributed with Codewarrior especially made to create header files and small applications/drivers etc...
Check out the following link: http://hc08web.de/
It is a website all in english with links, examples, forums, databases, etc etcabout HC08... and as additional tip (and for other readers
) here is the same site for HC12: http://hc12web.de/
Blackwolf